diff --git a/src/openrct2-ui/CursorRepository.cpp b/src/openrct2-ui/CursorRepository.cpp index 5b66fe5f49..afea5f6e83 100644 --- a/src/openrct2-ui/CursorRepository.cpp +++ b/src/openrct2-ui/CursorRepository.cpp @@ -27,7 +27,7 @@ CursorRepository::~CursorRepository() void CursorRepository::LoadCursors() { - SetCursorScale(static_cast(round(gConfigGeneral.window_scale))); + SetCursorScale(static_cast(round(gConfigGeneral.window_scale))); SetCurrentCursor(CURSOR_ARROW); } @@ -46,19 +46,19 @@ void CursorRepository::SetCurrentCursor(CURSOR_ID cursorId) } } -static bool getBit(const uint8 * data, size_t x, size_t y, size_t width) +static bool getBit(const uint8_t * data, size_t x, size_t y, size_t width) { size_t position = y * width + x; return (data[position / 8] & (1 << (7 - (x % 8)))) != 0; } -static void setBit(uint8 * data, size_t x, size_t y, size_t width) +static void setBit(uint8_t * data, size_t x, size_t y, size_t width) { size_t position = y * width + x; data[position / 8] |= (1 << (7 - (position % 8))); } -static void drawRect(uint8 * data, size_t x, size_t y, size_t width, size_t scale) +static void drawRect(uint8_t * data, size_t x, size_t y, size_t width, size_t scale) { for (size_t outY = (y * scale); outY < ((1 + y) * scale); outY++) { @@ -69,10 +69,10 @@ static void drawRect(uint8 * data, size_t x, size_t y, size_t width, size_t scal } } -static uint8 * scaleDataArray(const uint8 data[], size_t width, size_t height, size_t scale) +static uint8_t * scaleDataArray(const uint8_t data[], size_t width, size_t height, size_t scale) { size_t length = width * height; - auto * ret = static_cast(calloc(sizeof(uint8), length * scale * scale)); + auto * ret = static_cast(calloc(sizeof(uint8_t), length * scale * scale)); for (size_t y = 0; y < height * 8; y++) { @@ -88,7 +88,7 @@ static uint8 * scaleDataArray(const uint8 data[], size_t width, size_t height, s return ret; } -SDL_Cursor * CursorRepository::Create(const CursorData * cursorInfo, uint8 scale) +SDL_Cursor * CursorRepository::Create(const CursorData * cursorInfo, uint8_t scale) { SDL_Cursor * cursor; @@ -112,7 +112,7 @@ SDL_Cursor * CursorRepository::Create(const CursorData * cursorInfo, uint8 scale return cursor; } -void CursorRepository::SetCursorScale(uint8 cursorScale) +void CursorRepository::SetCursorScale(uint8_t cursorScale) { if (cursorScale > 0.0) { @@ -121,7 +121,7 @@ void CursorRepository::SetCursorScale(uint8 cursorScale) } } -void CursorRepository::GenerateScaledCursorSetHolder(uint8 scale) +void CursorRepository::GenerateScaledCursorSetHolder(uint8_t scale) { if (_scaledCursors.find(scale) == _scaledCursors.end()) { diff --git a/src/openrct2-ui/CursorRepository.h b/src/openrct2-ui/CursorRepository.h index cda1898414..6122e8f90b 100644 --- a/src/openrct2-ui/CursorRepository.h +++ b/src/openrct2-ui/CursorRepository.h @@ -50,24 +50,24 @@ namespace OpenRCT2::Ui } }; - constexpr static sint32 BASE_CURSOR_WIDTH = 32; - constexpr static sint32 BASE_CURSOR_HEIGHT = 32; + constexpr static int32_t BASE_CURSOR_WIDTH = 32; + constexpr static int32_t BASE_CURSOR_HEIGHT = 32; CURSOR_ID _currentCursor = CURSOR_UNDEFINED; - uint8 _currentCursorScale = 1; + uint8_t _currentCursorScale = 1; - std::map _scaledCursors; + std::map _scaledCursors; public: ~CursorRepository(); void LoadCursors(); CURSOR_ID GetCurrentCursor(); void SetCurrentCursor(CURSOR_ID cursorId); - void SetCursorScale(uint8 cursorScale); + void SetCursorScale(uint8_t cursorScale); private: - SDL_Cursor * Create(const CursorData * cursorInfo, uint8 scale); - void GenerateScaledCursorSetHolder(uint8 scale); + SDL_Cursor * Create(const CursorData * cursorInfo, uint8_t scale); + void GenerateScaledCursorSetHolder(uint8_t scale); static const CursorData * GetCursorData(CURSOR_ID cursorId); }; } diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index 5f5c735893..bb5ef63cec 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -101,7 +101,7 @@ void TextComposition::HandleMessage(const SDL_Event * e) break; } - uint16 modifier = e->key.keysym.mod; + uint16_t modifier = e->key.keysym.mod; SDL_Keycode key = e->key.keysym.sym; if (key == SDLK_KP_ENTER) { @@ -241,7 +241,7 @@ void TextComposition::CursorRight() void TextComposition::Insert(const utf8 * text) { const utf8 * ch = text; - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(ch, &ch)) != 0) { InsertCodepoint(codepoint); diff --git a/src/openrct2-ui/TextComposition.h b/src/openrct2-ui/TextComposition.h index f6973f9209..aebd1411cc 100644 --- a/src/openrct2-ui/TextComposition.h +++ b/src/openrct2-ui/TextComposition.h @@ -26,8 +26,8 @@ namespace OpenRCT2::Ui TextInputSession _session = {}; bool _imeActive = false; - sint32 _imeStart = 0; - sint32 _imeLength = 0; + int32_t _imeStart = 0; + int32_t _imeLength = 0; utf8 _imeBuffer[32] = {}; public: diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index dbd52cb74f..03fae53d93 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -255,7 +255,7 @@ namespace OpenRCT2::Ui return DIALOG_TYPE::NONE; } - static sint32 Execute(const std::string &command, std::string * output = nullptr) + static int32_t Execute(const std::string &command, std::string * output = nullptr) { #ifndef __EMSCRIPTEN__ log_verbose("executing \"%s\"...\n", command.c_str()); diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index eed6a8dfde..2e6524bf32 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -130,10 +130,10 @@ namespace OpenRCT2::Ui std::string resultExtension = Path::GetExtension(resultFilename); if (resultExtension.empty()) { - sint32 filterIndex = openFileName.nFilterIndex - 1; + int32_t filterIndex = openFileName.nFilterIndex - 1; assert(filterIndex >= 0); - assert(filterIndex < (sint32)desc.Filters.size()); + assert(filterIndex < (int32_t)desc.Filters.size()); std::string pattern = desc.Filters[filterIndex].Pattern; std::string patternExtension = Path::GetExtension(pattern); diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index a64cbd7a13..f7fbdc3c59 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -59,7 +59,7 @@ using namespace OpenRCT2::Ui; class UiContext final : public IUiContext { private: - constexpr static uint32 TOUCH_DOUBLE_TIMEOUT = 300; + constexpr static uint32_t TOUCH_DOUBLE_TIMEOUT = 300; IPlatformUiContext * const _platformUiContext; IWindowManager * const _windowManager; @@ -67,9 +67,9 @@ private: CursorRepository _cursorRepository; SDL_Window * _window = nullptr; - sint32 _width = 0; - sint32 _height = 0; - sint32 _scaleQuality = 0; + int32_t _width = 0; + int32_t _height = 0; + int32_t _scaleQuality = 0; bool _resolutionsAllowAnyAspectRatio = false; std::vector _fsResolutions; @@ -80,10 +80,10 @@ private: KeyboardShortcuts _keyboardShortcuts; TextComposition _textComposition; CursorState _cursorState = {}; - uint32 _lastKeyPressed = 0; - const uint8 * _keysState = nullptr; - uint8 _keysPressed[256] = {}; - uint32 _lastGestureTimestamp = 0; + uint32_t _lastKeyPressed = 0; + const uint8_t * _keysState = nullptr; + uint8_t _keysPressed[256] = {}; + uint32_t _lastGestureTimestamp = 0; float _gestureRadius = 0; InGameConsole _inGameConsole; @@ -132,25 +132,25 @@ public: return _window; } - sint32 GetWidth() override + int32_t GetWidth() override { return _width; } - sint32 GetHeight() override + int32_t GetHeight() override { return _height; } - sint32 GetScaleQuality() override + int32_t GetScaleQuality() override { return _scaleQuality; } void SetFullscreenMode(FULLSCREEN_MODE mode) override { - static constexpr const sint32 SDLFSFlags[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP }; - uint32 windowFlags = SDLFSFlags[(sint32)mode]; + static constexpr const int32_t SDLFSFlags[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP }; + uint32_t windowFlags = SDLFSFlags[(int32_t)mode]; // HACK Changing window size when in fullscreen usually has no effect if (mode == FULLSCREEN_MODE::FULLSCREEN) @@ -187,13 +187,13 @@ public: bool HasFocus() override { - uint32 windowFlags = GetWindowFlags(); + uint32_t windowFlags = GetWindowFlags(); return (windowFlags & SDL_WINDOW_INPUT_FOCUS) != 0; } bool IsMinimised() override { - uint32 windowFlags = GetWindowFlags(); + uint32_t windowFlags = GetWindowFlags(); return (windowFlags & SDL_WINDOW_MINIMIZED) || (windowFlags & SDL_WINDOW_HIDDEN); } @@ -209,12 +209,12 @@ public: return &_cursorState; } - const uint8 * GetKeysState() override + const uint8_t * GetKeysState() override { return _keysState; } - const uint8 * GetKeysPressed() override + const uint8_t * GetKeysPressed() override { return _keysPressed; } @@ -229,7 +229,7 @@ public: _cursorRepository.SetCurrentCursor(cursor); } - void SetCursorScale(uint8 scale) override + void SetCursorScale(uint8_t scale) override { _cursorRepository.SetCursorScale(scale); } @@ -239,12 +239,12 @@ public: SDL_ShowCursor(value ? SDL_ENABLE : SDL_DISABLE); } - void GetCursorPosition(sint32 * x, sint32 * y) override + void GetCursorPosition(int32_t * x, int32_t * y) override { SDL_GetMouseState(x, y); } - void SetCursorPosition(sint32 x, sint32 y) override + void SetCursorPosition(int32_t x, int32_t y) override { SDL_WarpMouseInWindow(nullptr, x, y); } @@ -254,7 +254,7 @@ public: SDL_SetWindowGrab(_window, value ? SDL_TRUE : SDL_FALSE); } - void SetKeysPressed(uint32 keysym, uint8 scancode) override + void SetKeysPressed(uint32_t keysym, uint8_t scancode) override { _lastKeyPressed = keysym; _keysPressed[scancode] = 1; @@ -268,10 +268,10 @@ public: void DrawRainAnimation(IRainDrawer* rainDrawer, rct_drawpixelinfo* dpi, DrawRainFunc drawFunc) override { - sint32 left = dpi->x; - sint32 right = left + dpi->width; - sint32 top = dpi->y; - sint32 bottom = top + dpi->height; + int32_t left = dpi->x; + int32_t right = left + dpi->width; + int32_t top = dpi->y; + int32_t bottom = top + dpi->height; for (auto& w : g_window_list) { @@ -341,7 +341,7 @@ public: case SDL_WINDOWEVENT_RESTORED: { // Update default display index - sint32 displayIndex = SDL_GetWindowDisplayIndex(_window); + int32_t displayIndex = SDL_GetWindowDisplayIndex(_window); if (displayIndex != gConfigGeneral.default_display) { gConfigGeneral.default_display = displayIndex; @@ -364,8 +364,8 @@ public: } break; case SDL_MOUSEMOTION: - _cursorState.x = (sint32)(e.motion.x / gConfigGeneral.window_scale); - _cursorState.y = (sint32)(e.motion.y / gConfigGeneral.window_scale); + _cursorState.x = (int32_t)(e.motion.x / gConfigGeneral.window_scale); + _cursorState.y = (int32_t)(e.motion.y / gConfigGeneral.window_scale); break; case SDL_MOUSEWHEEL: if (_inGameConsole.IsOpen()) @@ -377,8 +377,8 @@ public: break; case SDL_MOUSEBUTTONDOWN: { - sint32 x = (sint32)(e.button.x / gConfigGeneral.window_scale); - sint32 y = (sint32)(e.button.y / gConfigGeneral.window_scale); + int32_t x = (int32_t)(e.button.x / gConfigGeneral.window_scale); + int32_t y = (int32_t)(e.button.y / gConfigGeneral.window_scale); switch (e.button.button) { case SDL_BUTTON_LEFT: store_mouse_input(MOUSE_STATE_LEFT_PRESS, x, y); @@ -398,8 +398,8 @@ public: } case SDL_MOUSEBUTTONUP: { - sint32 x = (sint32)(e.button.x / gConfigGeneral.window_scale); - sint32 y = (sint32)(e.button.y / gConfigGeneral.window_scale); + int32_t x = (int32_t)(e.button.x / gConfigGeneral.window_scale); + int32_t y = (int32_t)(e.button.y / gConfigGeneral.window_scale); switch (e.button.button) { case SDL_BUTTON_LEFT: store_mouse_input(MOUSE_STATE_LEFT_RELEASE, x, y); @@ -420,13 +420,13 @@ public: // Apple sends touchscreen events for trackpads, so ignore these events on macOS #ifndef __MACOSX__ case SDL_FINGERMOTION: - _cursorState.x = (sint32)(e.tfinger.x * _width); - _cursorState.y = (sint32)(e.tfinger.y * _height); + _cursorState.x = (int32_t)(e.tfinger.x * _width); + _cursorState.y = (int32_t)(e.tfinger.y * _height); break; case SDL_FINGERDOWN: { - sint32 x = (sint32)(e.tfinger.x * _width); - sint32 y = (sint32)(e.tfinger.y * _height); + int32_t x = (int32_t)(e.tfinger.x * _width); + int32_t y = (int32_t)(e.tfinger.y * _height); _cursorState.touchIsDouble = (!_cursorState.touchIsDouble && e.tfinger.timestamp - _cursorState.touchDownTimestamp < TOUCH_DOUBLE_TIMEOUT); @@ -449,8 +449,8 @@ public: } case SDL_FINGERUP: { - sint32 x = (sint32)(e.tfinger.x * _width); - sint32 y = (sint32)(e.tfinger.y * _height); + int32_t x = (int32_t)(e.tfinger.x * _width); + int32_t y = (int32_t)(e.tfinger.y * _height); if (_cursorState.touchIsDouble) { @@ -481,8 +481,8 @@ public: _gestureRadius += e.mgesture.dDist; // Zoom gesture - constexpr sint32 tolerance = 128; - sint32 gesturePixels = (sint32)(_gestureRadius * _width); + constexpr int32_t tolerance = 128; + int32_t gesturePixels = (int32_t)(_gestureRadius * _width); if (abs(gesturePixels) > tolerance) { _gestureRadius = 0; @@ -504,7 +504,7 @@ public: _cursorState.any = _cursorState.left | _cursorState.middle | _cursorState.right; // Updates the state of the keys - sint32 numKeys = 256; + int32_t numKeys = 256; _keysState = SDL_GetKeyboardState(&numKeys); } @@ -521,7 +521,7 @@ public: _scaleQuality = SCALE_QUALITY_NN; } - sint32 scaleQuality = _scaleQuality; + int32_t scaleQuality = _scaleQuality; if (_scaleQuality == SCALE_QUALITY_SMOOTH_NN) { scaleQuality = SCALE_QUALITY_LINEAR; @@ -529,7 +529,7 @@ public: snprintf(scaleQualityBuffer, sizeof(scaleQualityBuffer), "%u", scaleQuality); SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); - sint32 width, height; + int32_t width, height; SDL_GetWindowSize(_window, &width, &height); OnResize(width, height); } @@ -539,9 +539,9 @@ public: SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss ? "1" : "0"); // Set window position to default display - sint32 defaultDisplay = Math::Clamp(0, gConfigGeneral.default_display, 0xFFFF); - sint32 x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay); - sint32 y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay); + int32_t defaultDisplay = Math::Clamp(0, gConfigGeneral.default_display, 0xFFFF); + int32_t x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay); + int32_t y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay); CreateWindow(x, y); @@ -562,7 +562,7 @@ public: void RecreateWindow() override { // Use the position of the current window for the new window - sint32 x, y; + int32_t x, y; SDL_SetWindowFullscreen(_window, 0); SDL_GetWindowPosition(_window, &x, &y); @@ -608,16 +608,16 @@ public: } private: - void CreateWindow(sint32 x, sint32 y) + void CreateWindow(int32_t x, int32_t y) { // Get saved window size - sint32 width = gConfigGeneral.window_width; - sint32 height = gConfigGeneral.window_height; + int32_t width = gConfigGeneral.window_width; + int32_t height = gConfigGeneral.window_height; if (width <= 0) width = 640; if (height <= 0) height = 480; // Create window in window first rather than fullscreen so we have the display the window is on first - uint32 flags = SDL_WINDOW_RESIZABLE; + uint32_t flags = SDL_WINDOW_RESIZABLE; if (gConfigGeneral.drawing_engine == DRAWING_ENGINE_OPENGL) { flags |= SDL_WINDOW_OPENGL; @@ -643,15 +643,15 @@ private: TriggerResize(); } - void OnResize(sint32 width, sint32 height) + void OnResize(int32_t width, int32_t height) { // Scale the native window size to the game's canvas size - _width = (sint32)(width / gConfigGeneral.window_scale); - _height = (sint32)(height / gConfigGeneral.window_scale); + _width = (int32_t)(width / gConfigGeneral.window_scale); + _height = (int32_t)(height / gConfigGeneral.window_scale); drawing_engine_resize(); - uint32 flags = SDL_GetWindowFlags(_window); + uint32_t flags = SDL_GetWindowFlags(_window); if ((flags & SDL_WINDOW_MINIMIZED) == 0) { window_resize_gui(_width, _height); @@ -661,7 +661,7 @@ private: gfx_invalidate_screen(); // Check if the window has been resized in windowed mode and update the config file accordingly - sint32 nonWindowFlags = + int32_t nonWindowFlags = #ifndef __MACOSX__ SDL_WINDOW_MAXIMIZED | #endif @@ -683,8 +683,8 @@ private: void UpdateFullscreenResolutions() { // Query number of display modes - sint32 displayIndex = SDL_GetWindowDisplayIndex(_window); - sint32 numDisplayModes = SDL_GetNumDisplayModes(displayIndex); + int32_t displayIndex = SDL_GetWindowDisplayIndex(_window); + int32_t numDisplayModes = SDL_GetNumDisplayModes(displayIndex); // Get desktop aspect ratio SDL_DisplayMode mode; @@ -693,7 +693,7 @@ private: // Get resolutions auto resolutions = std::vector(); float desktopAspectRatio = (float)mode.w / mode.h; - for (sint32 i = 0; i < numDisplayModes; i++) + for (int32_t i = 0; i < numDisplayModes; i++) { SDL_GetDisplayMode(displayIndex, i, &mode); if (mode.w > 0 && mode.h > 0) @@ -710,8 +710,8 @@ private: std::sort(resolutions.begin(), resolutions.end(), [](const Resolution &a, const Resolution &b) -> bool { - sint32 areaA = a.Width * a.Height; - sint32 areaB = b.Width * b.Height; + int32_t areaA = a.Width * a.Height; + int32_t areaB = b.Width * b.Height; return areaA < areaB; }); @@ -733,11 +733,11 @@ private: _fsResolutions = resolutions; } - Resolution GetClosestResolution(sint32 inWidth, sint32 inHeight) + Resolution GetClosestResolution(int32_t inWidth, int32_t inHeight) { Resolution result = { 640, 480 }; - sint32 closestAreaDiff = -1; - sint32 destinationArea = inWidth * inHeight; + int32_t closestAreaDiff = -1; + int32_t destinationArea = inWidth * inHeight; for (const Resolution &resolution : _fsResolutions) { // Check if exact match @@ -748,7 +748,7 @@ private: } // Check if area is closer to best match - sint32 areaDiff = std::abs((resolution.Width * resolution.Height) - destinationArea); + int32_t areaDiff = std::abs((resolution.Width * resolution.Height) - destinationArea); if (closestAreaDiff == -1 || areaDiff < closestAreaDiff) { closestAreaDiff = areaDiff; @@ -758,7 +758,7 @@ private: return result; } - uint32 GetWindowFlags() + uint32_t GetWindowFlags() { return SDL_GetWindowFlags(_window); } @@ -766,10 +766,10 @@ private: static void DrawRainWindow( IRainDrawer * rainDrawer, rct_window * original_w, - sint16 left, - sint16 right, - sint16 top, - sint16 bottom, + int16_t left, + int16_t right, + int16_t top, + int16_t bottom, DrawRainFunc drawFunc) { rct_window * w{}; @@ -781,10 +781,10 @@ private: auto vp = original_w->viewport; if (vp != nullptr) { - left = std::max(left, vp->x); - right = std::min(right, vp->x + vp->width); - top = std::max(top, vp->y); - bottom = std::min(bottom, vp->y + vp->height); + left = std::max(left, vp->x); + right = std::min(right, vp->x + vp->width); + top = std::max(top, vp->y); + bottom = std::min(bottom, vp->y + vp->height); if (left < right && top < bottom) { auto width = right - left; @@ -818,7 +818,7 @@ private: return; } - sint16 w_right = RCT_WINDOW_RIGHT(w); + int16_t w_right = RCT_WINDOW_RIGHT(w); if (right > w_right) { DrawRainWindow(rainDrawer, original_w, left, w_right, top, bottom, drawFunc); @@ -835,7 +835,7 @@ private: return; } - sint16 w_bottom = RCT_WINDOW_BOTTOM(w); + int16_t w_bottom = RCT_WINDOW_BOTTOM(w); if (bottom > w_bottom) { DrawRainWindow(rainDrawer, original_w, left, right, top, w_bottom, drawFunc); diff --git a/src/openrct2-ui/UiContext.macOS.mm b/src/openrct2-ui/UiContext.macOS.mm index d68ca53efc..b7cecfe466 100644 --- a/src/openrct2-ui/UiContext.macOS.mm +++ b/src/openrct2-ui/UiContext.macOS.mm @@ -124,7 +124,7 @@ namespace OpenRCT2::Ui } private: - static sint32 Execute(const std::string &command, std::string * output = nullptr) + static int32_t Execute(const std::string &command, std::string * output = nullptr) { log_verbose("executing \"%s\"...\n", command.c_str()); FILE * fpipe = popen(command.c_str(), "r"); diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index 29e3d4ba87..95f44f9c09 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -132,7 +132,7 @@ public: } } - rct_window * OpenView(uint8 view) override + rct_window * OpenView(uint8_t view) override { switch (view) { @@ -168,7 +168,7 @@ public: } } - rct_window * OpenDetails(uint8 type, sint32 id) override + rct_window * OpenDetails(uint8_t type, int32_t id) override { switch (type) { @@ -212,7 +212,7 @@ public: return window_guest_list_open_with_filter(intent->GetSIntExtra(INTENT_EXTRA_GUEST_LIST_FILTER), intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID)); case WC_LOADSAVE: { - uint32 type = intent->GetUIntExtra(INTENT_EXTRA_LOADSAVE_TYPE); + uint32_t type = intent->GetUIntExtra(INTENT_EXTRA_LOADSAVE_TYPE); std::string defaultName = intent->GetStringExtra(INTENT_EXTRA_PATH); loadsave_callback callback = (loadsave_callback) intent->GetPointerExtra(INTENT_EXTRA_CALLBACK); rct_window *w = window_loadsave_open(type, defaultName.c_str()); @@ -363,7 +363,7 @@ public: case INTENT_ACTION_INVALIDATE_VEHICLE_WINDOW: { rct_vehicle * vehicle = static_cast(intent.GetPointerExtra(INTENT_EXTRA_VEHICLE)); - sint32 viewVehicleIndex; + int32_t viewVehicleIndex; Ride * ride; rct_window * w; @@ -418,7 +418,7 @@ public: case INTENT_ACTION_UPDATE_BANNER: { - uint8 bannerIndex = static_cast(intent.GetUIntExtra(INTENT_EXTRA_BANNER_INDEX)); + uint8_t bannerIndex = static_cast(intent.GetUIntExtra(INTENT_EXTRA_BANNER_INDEX)); rct_window * w = window_find_by_number(WC_BANNER, bannerIndex); if (w != nullptr) @@ -462,14 +462,14 @@ public: input_handle_keyboard(isTitle); } - std::string GetKeyboardShortcutString(sint32 shortcut) override + std::string GetKeyboardShortcutString(int32_t shortcut) override { utf8 buffer[256]; keyboard_shortcuts_format_string(buffer, sizeof(buffer), shortcut); return std::string(buffer); } - void SetMainView(sint32 x, sint32 y, sint32 zoom, sint32 rotation) override + void SetMainView(int32_t x, int32_t y, int32_t zoom, int32_t rotation) override { auto mainWindow = window_get_main(); if (mainWindow != nullptr) diff --git a/src/openrct2-ui/audio/AudioChannel.cpp b/src/openrct2-ui/audio/AudioChannel.cpp index fe9c856b32..b91151f02d 100644 --- a/src/openrct2-ui/audio/AudioChannel.cpp +++ b/src/openrct2-ui/audio/AudioChannel.cpp @@ -25,17 +25,17 @@ namespace OpenRCT2::Audio ISDLAudioSource * _source = nullptr; SpeexResamplerState * _resampler = nullptr; - sint32 _group = MIXER_GROUP_SOUND; + int32_t _group = MIXER_GROUP_SOUND; double _rate = 0; - uint64 _offset = 0; - sint32 _loop = 0; + uint64_t _offset = 0; + int32_t _loop = 0; - sint32 _volume = 1; + int32_t _volume = 1; float _volume_l = 0.f; float _volume_r = 0.f; float _oldvolume_l = 0.f; float _oldvolume_r = 0.f; - sint32 _oldvolume = 0; + int32_t _oldvolume = 0; float _pan = 0; bool _stopping = false; @@ -79,12 +79,12 @@ namespace OpenRCT2::Audio _resampler = value; } - sint32 GetGroup() const override + int32_t GetGroup() const override { return _group; } - void SetGroup(sint32 group) override + void SetGroup(int32_t group) override { _group = group; } @@ -99,34 +99,34 @@ namespace OpenRCT2::Audio _rate = std::max(0.001, rate); } - uint64 GetOffset() const override + uint64_t GetOffset() const override { return _offset; } - bool SetOffset(uint64 offset) override + bool SetOffset(uint64_t offset) override { if (_source != nullptr && offset < _source->GetLength()) { AudioFormat format = _source->GetFormat(); - sint32 samplesize = format.channels * format.BytesPerSample(); + int32_t samplesize = format.channels * format.BytesPerSample(); _offset = (offset / samplesize) * samplesize; return true; } return false; } - virtual sint32 GetLoop() const override + virtual int32_t GetLoop() const override { return _loop; } - virtual void SetLoop(sint32 value) override + virtual void SetLoop(int32_t value) override { _loop = value; } - sint32 GetVolume() const override + int32_t GetVolume() const override { return _volume; } @@ -151,12 +151,12 @@ namespace OpenRCT2::Audio return _oldvolume_r; } - sint32 GetOldVolume() const override + int32_t GetOldVolume() const override { return _oldvolume; } - void SetVolume(sint32 volume) override + void SetVolume(int32_t volume) override { _volume = Math::Clamp(0, volume, MIXER_VOLUME_MAX); } @@ -223,7 +223,7 @@ namespace OpenRCT2::Audio return !_done; } - void Play(IAudioSource * source, sint32 loop) override + void Play(IAudioSource * source, int32_t loop) override { _source = static_cast(source); _loop = loop; diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp index a20104e627..7efbd75254 100644 --- a/src/openrct2-ui/audio/AudioContext.cpp +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -45,8 +45,8 @@ namespace OpenRCT2::Audio std::vector GetOutputDevices() override { std::vector devices; - sint32 numDevices = SDL_GetNumAudioDevices(SDL_FALSE); - for (sint32 i = 0; i < numDevices; i++) + int32_t numDevices = SDL_GetNumAudioDevices(SDL_FALSE); + for (int32_t i = 0; i < numDevices; i++) { std::string deviceName = String::ToStd(SDL_GetAudioDeviceName(i, SDL_FALSE)); devices.push_back(deviceName); @@ -71,9 +71,9 @@ namespace OpenRCT2::Audio void StartTitleMusic() override { } - IAudioChannel * PlaySound(sint32 soundId, sint32 volume, sint32 pan) override { return nullptr; } - IAudioChannel * PlaySoundAtLocation(sint32 soundId, sint16 x, sint16 y, sint16 z) override { return nullptr; } - IAudioChannel * PlaySoundPanned(sint32 soundId, sint32 pan, sint16 x, sint16 y, sint16 z) override { return nullptr; } + IAudioChannel * PlaySound(int32_t soundId, int32_t volume, int32_t pan) override { return nullptr; } + IAudioChannel * PlaySoundAtLocation(int32_t soundId, int16_t x, int16_t y, int16_t z) override { return nullptr; } + IAudioChannel * PlaySoundPanned(int32_t soundId, int32_t pan, int16_t x, int16_t y, int16_t z) override { return nullptr; } void ToggleAllSounds() override { } void PauseSounds() override { } diff --git a/src/openrct2-ui/audio/AudioContext.h b/src/openrct2-ui/audio/AudioContext.h index a947123417..becb9eb235 100644 --- a/src/openrct2-ui/audio/AudioContext.h +++ b/src/openrct2-ui/audio/AudioContext.h @@ -26,24 +26,24 @@ namespace OpenRCT2::Audio #pragma pack(push, 1) struct WaveFormat { - uint16 encoding; - uint16 channels; - uint32 frequency; - uint32 byterate; - uint16 blockalign; - uint16 bitspersample; + uint16_t encoding; + uint16_t channels; + uint32_t frequency; + uint32_t byterate; + uint16_t blockalign; + uint16_t bitspersample; }; assert_struct_size(WaveFormat, 16); struct WaveFormatEx { - uint16 encoding; - uint16 channels; - uint32 frequency; - uint32 byterate; - uint16 blockalign; - uint16 bitspersample; - uint16 extrasize; + uint16_t encoding; + uint16_t channels; + uint32_t frequency; + uint32_t byterate; + uint16_t blockalign; + uint16_t bitspersample; + uint16_t extrasize; }; assert_struct_size(WaveFormatEx, 18); #pragma pack(pop) diff --git a/src/openrct2-ui/audio/AudioFormat.h b/src/openrct2-ui/audio/AudioFormat.h index 8d042f2d21..98d2ba9754 100644 --- a/src/openrct2-ui/audio/AudioFormat.h +++ b/src/openrct2-ui/audio/AudioFormat.h @@ -20,16 +20,16 @@ namespace OpenRCT2::Audio */ struct AudioFormat { - sint32 freq; + int32_t freq; SDL_AudioFormat format; - sint32 channels; + int32_t channels; - sint32 BytesPerSample() const + int32_t BytesPerSample() const { return (SDL_AUDIO_BITSIZE(format)) / 8; } - sint32 GetByteRate() const + int32_t GetByteRate() const { return BytesPerSample() * channels; } diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index e2a5a55fba..ed69d6fd2c 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -42,15 +42,15 @@ namespace OpenRCT2::Audio float _volume = 1.0f; float _adjustSoundVolume = 0.0f; float _adjustMusicVolume = 0.0f; - uint8 _settingSoundVolume = 0xFF; - uint8 _settingMusicVolume = 0xFF; + uint8_t _settingSoundVolume = 0xFF; + uint8_t _settingMusicVolume = 0xFF; IAudioSource * _css1Sources[SOUND_MAXID] = { nullptr }; IAudioSource * _musicSources[PATH_ID_END] = { nullptr }; - std::vector _channelBuffer; - std::vector _convertBuffer; - std::vector _effectBuffer; + std::vector _channelBuffer; + std::vector _convertBuffer; + std::vector _effectBuffer; public: AudioMixerImpl() @@ -73,7 +73,7 @@ namespace OpenRCT2::Audio want.format = AUDIO_S16SYS; want.channels = 2; want.samples = 2048; - want.callback = [](void * arg, uint8 * dst, sint32 length) -> void + want.callback = [](void * arg, uint8_t * dst, int32_t length) -> void { auto mixer = static_cast(arg); mixer->GetNextAudioChunk(dst, (size_t)length); @@ -139,7 +139,7 @@ namespace OpenRCT2::Audio SDL_UnlockAudioDevice(_deviceId); } - IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) override + IAudioChannel * Play(IAudioSource * source, int32_t loop, bool deleteondone, bool deletesourceondone) override { Lock(); ISDLAudioChannel * channel = AudioChannel::Create(); @@ -169,7 +169,7 @@ namespace OpenRCT2::Audio IAudioSource * source = _musicSources[pathId]; if (source == nullptr) { - const utf8 * path = context_get_path_legacy((sint32)pathId); + const utf8 * path = context_get_path_legacy((int32_t)pathId); source = AudioSource::CreateMemoryFromWAV(path, &_format); if (source == nullptr) { @@ -187,12 +187,12 @@ namespace OpenRCT2::Audio _volume = volume; } - IAudioSource * GetSoundSource(sint32 id) override + IAudioSource * GetSoundSource(int32_t id) override { return _css1Sources[id]; } - IAudioSource * GetMusicSource(sint32 id) override + IAudioSource * GetMusicSource(int32_t id) override { return _musicSources[id]; } @@ -212,7 +212,7 @@ namespace OpenRCT2::Audio } } - void GetNextAudioChunk(uint8 * dst, size_t length) + void GetNextAudioChunk(uint8_t * dst, size_t length) { UpdateAdjustedSound(); @@ -224,7 +224,7 @@ namespace OpenRCT2::Audio while (it != _channels.end()) { auto channel = *it; - sint32 group = channel->GetGroup(); + int32_t group = channel->GetGroup(); if (group != MIXER_GROUP_SOUND || gConfigSound.sound_enabled) { MixChannel(channel, dst, length); @@ -256,10 +256,10 @@ namespace OpenRCT2::Audio } } - void MixChannel(ISDLAudioChannel * channel, uint8 * data, size_t length) + void MixChannel(ISDLAudioChannel * channel, uint8_t * data, size_t length) { - sint32 byteRate = _format.GetByteRate(); - sint32 numSamples = (sint32)(length / byteRate); + int32_t byteRate = _format.GetByteRate(); + int32_t numSamples = (int32_t)(length / byteRate); double rate = 1; if (_format.format == AUDIO_S16SYS) { @@ -281,7 +281,7 @@ namespace OpenRCT2::Audio } // Read raw PCM from channel - sint32 readSamples = (sint32)(numSamples * rate); + int32_t readSamples = (int32_t)(numSamples * rate); size_t readLength = (size_t)(readSamples / cvt.len_ratio) * byteRate; _channelBuffer.resize(readLength); size_t bytesRead = channel->Read(_channelBuffer.data(), readLength); @@ -310,25 +310,25 @@ namespace OpenRCT2::Audio // Apply effects if (rate != 1) { - sint32 inRate = (sint32)(bufferLen / byteRate); - sint32 outRate = numSamples; + int32_t inRate = (int32_t)(bufferLen / byteRate); + int32_t outRate = numSamples; if (bytesRead != readLength) { inRate = _format.freq; outRate = _format.freq * (1 / rate); } _effectBuffer.resize(length); - bufferLen = ApplyResample(channel, buffer, (sint32)(bufferLen / byteRate), numSamples, inRate, outRate); + bufferLen = ApplyResample(channel, buffer, (int32_t)(bufferLen / byteRate), numSamples, inRate, outRate); buffer = _effectBuffer.data(); } // Apply panning and volume ApplyPan(channel, buffer, bufferLen, byteRate); - sint32 mixVolume = ApplyVolume(channel, buffer, bufferLen); + int32_t mixVolume = ApplyVolume(channel, buffer, bufferLen); // Finally mix on to destination buffer size_t dstLength = std::min(length, bufferLen); - SDL_MixAudioFormat(data, (const uint8 *)buffer, _format.format, (uint32)dstLength, mixVolume); + SDL_MixAudioFormat(data, (const uint8_t *)buffer, _format.format, (uint32_t)dstLength, mixVolume); channel->UpdateOldVolume(); } @@ -337,9 +337,9 @@ namespace OpenRCT2::Audio * Resample the given buffer into _effectBuffer. * Assumes that srcBuffer is the same format as _format. */ - size_t ApplyResample(ISDLAudioChannel * channel, const void * srcBuffer, sint32 srcSamples, sint32 dstSamples, sint32 inRate, sint32 outRate) + size_t ApplyResample(ISDLAudioChannel * channel, const void * srcBuffer, int32_t srcSamples, int32_t dstSamples, int32_t inRate, int32_t outRate) { - sint32 byteRate = _format.GetByteRate(); + int32_t byteRate = _format.GetByteRate(); // Create resampler SpeexResamplerState * resampler = channel->GetResampler(); @@ -350,8 +350,8 @@ namespace OpenRCT2::Audio } speex_resampler_set_rate(resampler, inRate, outRate); - uint32 inLen = srcSamples; - uint32 outLen = dstSamples; + uint32_t inLen = srcSamples; + uint32_t outLen = dstSamples; speex_resampler_process_interleaved_int( resampler, (const spx_int16_t *)srcBuffer, @@ -368,16 +368,16 @@ namespace OpenRCT2::Audio { switch (_format.format) { case AUDIO_S16SYS: - EffectPanS16(channel, (sint16 *)buffer, (sint32)(len / sampleSize)); + EffectPanS16(channel, (int16_t *)buffer, (int32_t)(len / sampleSize)); break; case AUDIO_U8: - EffectPanU8(channel, (uint8 *)buffer, (sint32)(len / sampleSize)); + EffectPanU8(channel, (uint8_t *)buffer, (int32_t)(len / sampleSize)); break; } } } - sint32 ApplyVolume(const IAudioChannel * channel, void * buffer, size_t len) + int32_t ApplyVolume(const IAudioChannel * channel, void * buffer, size_t len) { float volumeAdjust = _volume; volumeAdjust *= (gConfigSound.master_volume / 100.0f); @@ -396,34 +396,34 @@ namespace OpenRCT2::Audio break; } - sint32 startVolume = (sint32)(channel->GetOldVolume() * volumeAdjust); - sint32 endVolume = (sint32)(channel->GetVolume() * volumeAdjust); + int32_t startVolume = (int32_t)(channel->GetOldVolume() * volumeAdjust); + int32_t endVolume = (int32_t)(channel->GetVolume() * volumeAdjust); if (channel->IsStopping()) { endVolume = 0; } - sint32 mixVolume = (sint32)(channel->GetVolume() * volumeAdjust); + int32_t mixVolume = (int32_t)(channel->GetVolume() * volumeAdjust); if (startVolume != endVolume) { // Set to max since we are adjusting the volume ourselves mixVolume = MIXER_VOLUME_MAX; // Fade between volume levels to smooth out sound and minimize clicks from sudden volume changes - sint32 fadeLength = (sint32)len / _format.BytesPerSample(); + int32_t fadeLength = (int32_t)len / _format.BytesPerSample(); switch (_format.format) { case AUDIO_S16SYS: - EffectFadeS16((sint16 *)buffer, fadeLength, startVolume, endVolume); + EffectFadeS16((int16_t *)buffer, fadeLength, startVolume, endVolume); break; case AUDIO_U8: - EffectFadeU8((uint8 *)buffer, fadeLength, startVolume, endVolume); + EffectFadeU8((uint8_t *)buffer, fadeLength, startVolume, endVolume); break; } } return mixVolume; } - static void EffectPanS16(const IAudioChannel * channel, sint16 * data, sint32 length) + static void EffectPanS16(const IAudioChannel * channel, int16_t * data, int32_t length) { const float dt = 1.0f / (length * 2); float volumeL = channel->GetOldVolumeL(); @@ -431,53 +431,53 @@ namespace OpenRCT2::Audio const float d_left = dt * (channel->GetVolumeL() - channel->GetOldVolumeL()); const float d_right = dt * (channel->GetVolumeR() - channel->GetOldVolumeR()); - for (sint32 i = 0; i < length * 2; i += 2) + for (int32_t i = 0; i < length * 2; i += 2) { - data[i] = (sint16)(data[i] * volumeL); - data[i + 1] = (sint16)(data[i + 1] * volumeR); + data[i] = (int16_t)(data[i] * volumeL); + data[i + 1] = (int16_t)(data[i + 1] * volumeR); volumeL += d_left; volumeR += d_right; } } - static void EffectPanU8(const IAudioChannel * channel, uint8 * data, sint32 length) + static void EffectPanU8(const IAudioChannel * channel, uint8_t * data, int32_t length) { float volumeL = channel->GetVolumeL(); float volumeR = channel->GetVolumeR(); float oldVolumeL = channel->GetOldVolumeL(); float oldVolumeR = channel->GetOldVolumeR(); - for (sint32 i = 0; i < length * 2; i += 2) + for (int32_t i = 0; i < length * 2; i += 2) { float t = (float)i / (length * 2); - data[i] = (uint8)(data[i] * ((1.0 - t) * oldVolumeL + t * volumeL)); - data[i + 1] = (uint8)(data[i + 1] * ((1.0 - t) * oldVolumeR + t * volumeR)); + data[i] = (uint8_t)(data[i] * ((1.0 - t) * oldVolumeL + t * volumeL)); + data[i + 1] = (uint8_t)(data[i + 1] * ((1.0 - t) * oldVolumeR + t * volumeR)); } } - static void EffectFadeS16(sint16 * data, sint32 length, sint32 startvolume, sint32 endvolume) + static void EffectFadeS16(int16_t * data, int32_t length, int32_t startvolume, int32_t endvolume) { static_assert(SDL_MIX_MAXVOLUME == MIXER_VOLUME_MAX, "Max volume differs between OpenRCT2 and SDL2"); float startvolume_f = (float)startvolume / SDL_MIX_MAXVOLUME; float endvolume_f = (float)endvolume / SDL_MIX_MAXVOLUME; - for (sint32 i = 0; i < length; i++) + for (int32_t i = 0; i < length; i++) { float t = (float)i / length; - data[i] = (sint16)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); + data[i] = (int16_t)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); } } - static void EffectFadeU8(uint8* data, sint32 length, sint32 startvolume, sint32 endvolume) + static void EffectFadeU8(uint8_t* data, int32_t length, int32_t startvolume, int32_t endvolume) { static_assert(SDL_MIX_MAXVOLUME == MIXER_VOLUME_MAX, "Max volume differs between OpenRCT2 and SDL2"); float startvolume_f = (float)startvolume / SDL_MIX_MAXVOLUME; float endvolume_f = (float)endvolume / SDL_MIX_MAXVOLUME; - for (sint32 i = 0; i < length; i++) + for (int32_t i = 0; i < length; i++) { float t = (float)i / length; - data[i] = (uint8)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); + data[i] = (uint8_t)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); } } @@ -489,10 +489,10 @@ namespace OpenRCT2::Audio { size_t reqConvertBufferCapacity = len * cvt->len_mult; _convertBuffer.resize(reqConvertBufferCapacity); - std::copy_n((const uint8 *)src, len, _convertBuffer.data()); + std::copy_n((const uint8_t *)src, len, _convertBuffer.data()); - cvt->len = (sint32)len; - cvt->buf = (uint8 *)_convertBuffer.data(); + cvt->len = (int32_t)len; + cvt->buf = (uint8_t *)_convertBuffer.data(); if (SDL_ConvertAudio(cvt) >= 0) { result = true; diff --git a/src/openrct2-ui/audio/FileAudioSource.cpp b/src/openrct2-ui/audio/FileAudioSource.cpp index 55cdc38b9b..a812ec9575 100644 --- a/src/openrct2-ui/audio/FileAudioSource.cpp +++ b/src/openrct2-ui/audio/FileAudioSource.cpp @@ -25,8 +25,8 @@ namespace OpenRCT2::Audio private: AudioFormat _format = {}; SDL_RWops * _rw = nullptr; - uint64 _dataBegin = 0; - uint64 _dataLength = 0; + uint64_t _dataBegin = 0; + uint64_t _dataLength = 0; public: ~FileAudioSource() @@ -34,7 +34,7 @@ namespace OpenRCT2::Audio Unload(); } - uint64 GetLength() const override + uint64_t GetLength() const override { return _dataLength; } @@ -44,17 +44,17 @@ namespace OpenRCT2::Audio return _format; } - size_t Read(void * dst, uint64 offset, size_t len) override + size_t Read(void * dst, uint64_t offset, size_t len) override { size_t bytesRead = 0; - sint64 currentPosition = SDL_RWtell(_rw); + int64_t currentPosition = SDL_RWtell(_rw); if (currentPosition != -1) { - size_t bytesToRead = (size_t)std::min(len, _dataLength - offset); - sint64 dataOffset = _dataBegin + offset; + size_t bytesToRead = (size_t)std::min(len, _dataLength - offset); + int64_t dataOffset = _dataBegin + offset; if (currentPosition != dataOffset) { - sint64 newPosition = SDL_RWseek(_rw, dataOffset, SEEK_SET); + int64_t newPosition = SDL_RWseek(_rw, dataOffset, SEEK_SET); if (newPosition == -1) { return 0; @@ -67,11 +67,11 @@ namespace OpenRCT2::Audio bool LoadWAV(SDL_RWops * rw) { - const uint32 DATA = 0x61746164; - const uint32 FMT = 0x20746D66; - const uint32 RIFF = 0x46464952; - const uint32 WAVE = 0x45564157; - const uint16 pcmformat = 0x0001; + const uint32_t DATA = 0x61746164; + const uint32_t FMT = 0x20746D66; + const uint32_t RIFF = 0x46464952; + const uint32_t WAVE = 0x45564157; + const uint16_t pcmformat = 0x0001; Unload(); @@ -81,7 +81,7 @@ namespace OpenRCT2::Audio } _rw = rw; - uint32 chunkId = SDL_ReadLE32(rw); + uint32_t chunkId = SDL_ReadLE32(rw); if (chunkId != RIFF) { log_verbose("Not a WAV file"); @@ -90,21 +90,21 @@ namespace OpenRCT2::Audio // Read and discard chunk size SDL_ReadLE32(rw); - uint32 chunkFormat = SDL_ReadLE32(rw); + uint32_t chunkFormat = SDL_ReadLE32(rw); if (chunkFormat != WAVE) { log_verbose("Not in WAVE format"); return false; } - uint32 fmtChunkSize = FindChunk(rw, FMT); + uint32_t fmtChunkSize = FindChunk(rw, FMT); if (!fmtChunkSize) { log_verbose("Could not find FMT chunk"); return false; } - uint64 chunkStart = SDL_RWtell(rw); + uint64_t chunkStart = SDL_RWtell(rw); WaveFormat waveFormat; SDL_RWread(rw, &waveFormat, sizeof(waveFormat), 1); @@ -128,7 +128,7 @@ namespace OpenRCT2::Audio } _format.channels = waveFormat.channels; - uint32 dataChunkSize = FindChunk(rw, DATA); + uint32_t dataChunkSize = FindChunk(rw, DATA); if (dataChunkSize == 0) { log_verbose("Could not find DATA chunk"); @@ -141,18 +141,18 @@ namespace OpenRCT2::Audio } private: - uint32 FindChunk(SDL_RWops * rw, uint32 wantedId) + uint32_t FindChunk(SDL_RWops * rw, uint32_t wantedId) { - uint32 subchunkId = SDL_ReadLE32(rw); - uint32 subchunkSize = SDL_ReadLE32(rw); + uint32_t subchunkId = SDL_ReadLE32(rw); + uint32_t subchunkSize = SDL_ReadLE32(rw); if (subchunkId == wantedId) { return subchunkSize; } - const uint32 FACT = 0x74636166; - const uint32 LIST = 0x5453494c; - const uint32 BEXT = 0x74786562; - const uint32 JUNK = 0x4B4E554A; + const uint32_t FACT = 0x74636166; + const uint32_t LIST = 0x5453494c; + const uint32_t BEXT = 0x74786562; + const uint32_t JUNK = 0x4B4E554A; while (subchunkId == FACT || subchunkId == LIST || subchunkId == BEXT || subchunkId == JUNK) { SDL_RWseek(rw, subchunkSize, RW_SEEK_CUR); diff --git a/src/openrct2-ui/audio/MemoryAudioSource.cpp b/src/openrct2-ui/audio/MemoryAudioSource.cpp index fe8c2758f6..52ec39585c 100644 --- a/src/openrct2-ui/audio/MemoryAudioSource.cpp +++ b/src/openrct2-ui/audio/MemoryAudioSource.cpp @@ -27,11 +27,11 @@ namespace OpenRCT2::Audio { private: AudioFormat _format = {}; - std::vector _data; - uint8 * _dataSDL = nullptr; + std::vector _data; + uint8_t * _dataSDL = nullptr; size_t _length = 0; - const uint8 * GetData() + const uint8_t * GetData() { return _dataSDL != nullptr ? _dataSDL : _data.data(); } @@ -42,7 +42,7 @@ namespace OpenRCT2::Audio Unload(); } - uint64 GetLength() const override + uint64_t GetLength() const override { return _length; } @@ -52,17 +52,17 @@ namespace OpenRCT2::Audio return _format; } - size_t Read(void * dst, uint64 offset, size_t len) override + size_t Read(void * dst, uint64_t offset, size_t len) override { size_t bytesToRead = 0; if (offset < _length) { - bytesToRead = (size_t)std::min(len, _length - offset); + bytesToRead = (size_t)std::min(len, _length - offset); auto src = GetData(); if (src != nullptr) { - std::copy_n(src + offset, bytesToRead, (uint8 *)dst); + std::copy_n(src + offset, bytesToRead, (uint8_t *)dst); } } return bytesToRead; @@ -79,7 +79,7 @@ namespace OpenRCT2::Audio if (rw != nullptr) { SDL_AudioSpec audiospec = {}; - uint32 audioLen; + uint32_t audioLen; SDL_AudioSpec * spec = SDL_LoadWAV_RW(rw, false, &audiospec, &_dataSDL, &audioLen); if (spec != nullptr) { @@ -112,17 +112,17 @@ namespace OpenRCT2::Audio SDL_RWops * rw = SDL_RWFromFile(path, "rb"); if (rw != nullptr) { - uint32 numSounds; + uint32_t numSounds; SDL_RWread(rw, &numSounds, sizeof(numSounds), 1); if (index < numSounds) { SDL_RWseek(rw, index * 4, RW_SEEK_CUR); - uint32 pcmOffset; + uint32_t pcmOffset; SDL_RWread(rw, &pcmOffset, sizeof(pcmOffset), 1); SDL_RWseek(rw, pcmOffset, RW_SEEK_SET); - uint32 pcmSize; + uint32_t pcmSize; SDL_RWread(rw, &pcmSize, sizeof(pcmSize), 1); _length = pcmSize; @@ -160,9 +160,9 @@ namespace OpenRCT2::Audio if (SDL_BuildAudioCVT(&cvt, _format.format, _format.channels, _format.freq, format->format, format->channels, format->freq) >= 0) { auto src = GetData(); - auto cvtBuffer = std::vector(_length * cvt.len_mult); + auto cvtBuffer = std::vector(_length * cvt.len_mult); std::copy_n(src, _length, cvtBuffer.data()); - cvt.len = (sint32)_length; + cvt.len = (int32_t)_length; cvt.buf = cvtBuffer.data(); if (SDL_ConvertAudio(&cvt) >= 0) { diff --git a/src/openrct2-ui/drawing/BitmapReader.cpp b/src/openrct2-ui/drawing/BitmapReader.cpp index b281a578a2..7ae4f38ccc 100644 --- a/src/openrct2-ui/drawing/BitmapReader.cpp +++ b/src/openrct2-ui/drawing/BitmapReader.cpp @@ -14,9 +14,9 @@ #include #include "BitmapReader.h" -static std::vector ReadToVector(std::istream &stream) +static std::vector ReadToVector(std::istream &stream) { - std::vector result; + std::vector result; if (!stream.eof() && !stream.fail()) { stream.seekg(0, std::ios_base::end); @@ -58,11 +58,11 @@ static Image ReadBitmap(std::istream &istream, IMAGE_FORMAT format) std::fill(image.Pixels.begin(), image.Pixels.end(), 0xFF); // Copy pixels over - auto src = (const uint8 *)bitmap->pixels; + auto src = (const uint8_t *)bitmap->pixels; auto dst = image.Pixels.data(); if (numChannels == 4) { - for (sint32 y = 0; y < bitmap->h; y++) + for (int32_t y = 0; y < bitmap->h; y++) { std::memcpy(dst, src, bitmap->w); src += bitmap->pitch; @@ -71,9 +71,9 @@ static Image ReadBitmap(std::istream &istream, IMAGE_FORMAT format) } else { - for (sint32 y = 0; y < bitmap->h; y++) + for (int32_t y = 0; y < bitmap->h; y++) { - for (sint32 x = 0; x < bitmap->w; x++) + for (int32_t x = 0; x < bitmap->w; x++) { std::memcpy(dst, src, 3); src += 3; diff --git a/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp b/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp index e3eeca0f0b..7d55a7f73d 100644 --- a/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp +++ b/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp @@ -32,7 +32,7 @@ namespace OpenRCT2 public: std::unique_ptr Create(DRAWING_ENGINE_TYPE type, const std::shared_ptr& uiContext) override { - switch ((sint32)type) { + switch ((int32_t)type) { case DRAWING_ENGINE_SOFTWARE: return CreateSoftwareDrawingEngine(uiContext); case DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY: diff --git a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp index a49ed36917..4c5170f206 100644 --- a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp @@ -28,7 +28,7 @@ using namespace OpenRCT2::Ui; class HardwareDisplayDrawingEngine final : public X8DrawingEngine { private: - constexpr static uint32 DIRTY_VISUAL_TIME = 32; + constexpr static uint32_t DIRTY_VISUAL_TIME = 32; std::shared_ptr const _uiContext; SDL_Window * _window = nullptr; @@ -36,19 +36,19 @@ private: SDL_Texture * _screenTexture = nullptr; SDL_Texture * _scaledScreenTexture = nullptr; SDL_PixelFormat * _screenTextureFormat = nullptr; - uint32 _paletteHWMapped[256] = { 0 }; + uint32_t _paletteHWMapped[256] = { 0 }; #ifdef __ENABLE_LIGHTFX__ - uint32 _lightPaletteHWMapped[256] = { 0 }; + uint32_t _lightPaletteHWMapped[256] = { 0 }; #endif // Steam overlay checking - uint32 _pixelBeforeOverlay = 0; - uint32 _pixelAfterOverlay = 0; + uint32_t _pixelBeforeOverlay = 0; + uint32_t _pixelAfterOverlay = 0; bool _overlayActive = false; bool _pausedBeforeOverlay = false; bool _useVsync = true; - std::vector _dirtyVisualsTime; + std::vector _dirtyVisualsTime; bool smoothNN = false; @@ -90,7 +90,7 @@ public: } } - void Resize(uint32 width, uint32 height) override + void Resize(uint32_t width, uint32_t height) override { if (_screenTexture != nullptr) { @@ -99,16 +99,16 @@ public: SDL_FreeFormat(_screenTextureFormat); SDL_RendererInfo rendererInfo = {}; - sint32 result = SDL_GetRendererInfo(_sdlRenderer, &rendererInfo); + int32_t result = SDL_GetRendererInfo(_sdlRenderer, &rendererInfo); if (result < 0) { log_warning("HWDisplayDrawingEngine::Resize error: %s", SDL_GetError()); return; } - uint32 pixelFormat = SDL_PIXELFORMAT_UNKNOWN; - for (uint32 i = 0; i < rendererInfo.num_texture_formats; i++) + uint32_t pixelFormat = SDL_PIXELFORMAT_UNKNOWN; + for (uint32_t i = 0; i < rendererInfo.num_texture_formats; i++) { - uint32 format = rendererInfo.texture_formats[i]; + uint32_t format = rendererInfo.texture_formats[i]; if (!SDL_ISPIXELFORMAT_FOURCC(format) && !SDL_ISPIXELFORMAT_INDEXED(format) && (pixelFormat == SDL_PIXELFORMAT_UNKNOWN || SDL_BYTESPERPIXEL(format) < SDL_BYTESPERPIXEL(pixelFormat))) @@ -117,7 +117,7 @@ public: } } - sint32 scaleQuality = GetContext()->GetUiContext()->GetScaleQuality(); + int32_t scaleQuality = GetContext()->GetUiContext()->GetScaleQuality(); if (scaleQuality == SCALE_QUALITY_SMOOTH_NN) { scaleQuality = SCALE_QUALITY_LINEAR; @@ -141,7 +141,7 @@ public: _screenTexture = SDL_CreateTexture(_sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_STREAMING, width, height); SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); - uint32 scale = std::ceil(gConfigGeneral.window_scale); + uint32_t scale = std::ceil(gConfigGeneral.window_scale); _scaledScreenTexture = SDL_CreateTexture(_sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_TARGET, width * scale, height * scale); } @@ -150,7 +150,7 @@ public: _screenTexture = SDL_CreateTexture(_sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_STREAMING,width, height); } - uint32 format; + uint32_t format; SDL_QueryTexture(_screenTexture, &format, nullptr, nullptr, nullptr); _screenTextureFormat = SDL_AllocFormat(format); @@ -161,7 +161,7 @@ public: { if (_screenTextureFormat != nullptr) { - for (sint32 i = 0; i < 256; i++) + for (int32_t i = 0; i < 256; i++) { _paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].red, palette[i].green, palette[i].blue); } @@ -170,7 +170,7 @@ public: if (gConfigGeneral.enable_light_fx) { auto lightPalette = lightfx_get_palette(); - for (sint32 i = 0; i < 256; i++) + for (int32_t i = 0; i < 256; i++) { auto src = &lightPalette->entries[i]; _lightPaletteHWMapped[i] = SDL_MapRGBA(_screenTextureFormat, src->red, src->green, src->blue, src->alpha); @@ -190,15 +190,15 @@ public: } protected: - void OnDrawDirtyBlock(uint32 left, uint32 top, uint32 columns, uint32 rows) override + void OnDrawDirtyBlock(uint32_t left, uint32_t top, uint32_t columns, uint32_t rows) override { if (gShowDirtyVisuals) { - uint32 right = left + columns; - uint32 bottom = top + rows; - for (uint32 x = left; x < right; x++) + uint32_t right = left + columns; + uint32_t bottom = top + rows; + for (uint32_t x = left; x < right; x++) { - for (uint32 y = top; y < bottom; y++) + for (uint32_t y = top; y < bottom; y++) { SetDirtyVisualTime(x, y, DIRTY_VISUAL_TIME); } @@ -213,7 +213,7 @@ private: if (gConfigGeneral.enable_light_fx) { void * pixels; - sint32 pitch; + int32_t pitch; if (SDL_LockTexture(_screenTexture, nullptr, &pixels, &pitch) == 0) { lightfx_render_to_texture(pixels, pitch, _bits, _width, _height, _paletteHWMapped, _lightPaletteHWMapped); @@ -223,7 +223,7 @@ private: else #endif { - CopyBitsToTexture(_screenTexture, _bits, (sint32)_width, (sint32)_height, _paletteHWMapped); + CopyBitsToTexture(_screenTexture, _bits, (int32_t)_width, (int32_t)_height, _paletteHWMapped); } if (smoothNN) { @@ -257,17 +257,17 @@ private: } } - void CopyBitsToTexture(SDL_Texture * texture, uint8 * src, sint32 width, sint32 height, const uint32 * palette) + void CopyBitsToTexture(SDL_Texture * texture, uint8_t * src, int32_t width, int32_t height, const uint32_t * palette) { void * pixels; - sint32 pitch; + int32_t pitch; if (SDL_LockTexture(texture, nullptr, &pixels, &pitch) == 0) { - sint32 padding = pitch - (width * 4); + int32_t padding = pitch - (width * 4); if (pitch == width * 4) { - uint32 * dst = (uint32 *)pixels; - for (sint32 i = width * height; i > 0; i--) + uint32_t * dst = (uint32_t *)pixels; + for (int32_t i = width * height; i > 0; i--) { *dst++ = palette[*src++]; } @@ -276,26 +276,26 @@ private: { if (pitch == (width * 2) + padding) { - uint16 * dst = (uint16 *)pixels; - for (sint32 y = height; y > 0; y--) + uint16_t * dst = (uint16_t *)pixels; + for (int32_t y = height; y > 0; y--) { - for (sint32 x = width; x > 0; x--) + for (int32_t x = width; x > 0; x--) { - const uint8 lower = *(uint8 *)(&palette[*src++]); - const uint8 upper = *(uint8 *)(&palette[*src++]); + const uint8_t lower = *(uint8_t *)(&palette[*src++]); + const uint8_t upper = *(uint8_t *)(&palette[*src++]); *dst++ = (lower << 8) | upper; } - dst = (uint16*)(((uint8 *)dst) + padding); + dst = (uint16_t*)(((uint8_t *)dst) + padding); } } else if (pitch == width + padding) { - uint8 * dst = (uint8 *)pixels; - for (sint32 y = height; y > 0; y--) + uint8_t * dst = (uint8_t *)pixels; + for (int32_t y = height; y > 0; y--) { - for (sint32 x = width; x > 0; x--) + for (int32_t x = width; x > 0; x--) { - *dst++ = *(uint8 *)(&palette[*src++]); + *dst++ = *(uint8_t *)(&palette[*src++]); } dst += padding; } @@ -305,10 +305,10 @@ private: } } - uint32 GetDirtyVisualTime(uint32 x, uint32 y) + uint32_t GetDirtyVisualTime(uint32_t x, uint32_t y) { - uint32 result = 0; - uint32 i = y * _dirtyGrid.BlockColumns + x; + uint32_t result = 0; + uint32_t i = y * _dirtyGrid.BlockColumns + x; if (_dirtyVisualsTime.size() > i) { result = _dirtyVisualsTime[i]; @@ -316,9 +316,9 @@ private: return result; } - void SetDirtyVisualTime(uint32 x, uint32 y, uint32 value) + void SetDirtyVisualTime(uint32_t x, uint32_t y, uint32_t value) { - uint32 i = y * _dirtyGrid.BlockColumns + x; + uint32_t i = y * _dirtyGrid.BlockColumns + x; if (_dirtyVisualsTime.size() > i) { _dirtyVisualsTime[i] = value; @@ -328,9 +328,9 @@ private: void UpdateDirtyVisuals() { _dirtyVisualsTime.resize(_dirtyGrid.BlockRows * _dirtyGrid.BlockColumns); - for (uint32 y = 0; y < _dirtyGrid.BlockRows; y++) + for (uint32_t y = 0; y < _dirtyGrid.BlockRows; y++) { - for (uint32 x = 0; x < _dirtyGrid.BlockColumns; x++) + for (uint32_t x = 0; x < _dirtyGrid.BlockColumns; x++) { auto timeLeft = GetDirtyVisualTime(x, y); if (timeLeft > 0) @@ -347,20 +347,20 @@ private: float scaleY = gConfigGeneral.window_scale; SDL_SetRenderDrawBlendMode(_sdlRenderer, SDL_BLENDMODE_BLEND); - for (uint32 y = 0; y < _dirtyGrid.BlockRows; y++) + for (uint32_t y = 0; y < _dirtyGrid.BlockRows; y++) { - for (uint32 x = 0; x < _dirtyGrid.BlockColumns; x++) + for (uint32_t x = 0; x < _dirtyGrid.BlockColumns; x++) { auto timeLeft = GetDirtyVisualTime(x, y); if (timeLeft > 0) { - uint8 alpha = (uint8)(timeLeft * 5 / 2); + uint8_t alpha = (uint8_t)(timeLeft * 5 / 2); SDL_Rect ddRect; - ddRect.x = (sint32)(x * _dirtyGrid.BlockWidth * scaleX); - ddRect.y = (sint32)(y * _dirtyGrid.BlockHeight * scaleY); - ddRect.w = (sint32)(_dirtyGrid.BlockWidth * scaleX); - ddRect.h = (sint32)(_dirtyGrid.BlockHeight * scaleY); + ddRect.x = (int32_t)(x * _dirtyGrid.BlockWidth * scaleX); + ddRect.y = (int32_t)(y * _dirtyGrid.BlockHeight * scaleY); + ddRect.w = (int32_t)(_dirtyGrid.BlockWidth * scaleX); + ddRect.h = (int32_t)(_dirtyGrid.BlockHeight * scaleY); SDL_SetRenderDrawColor(_sdlRenderer, 255, 255, 255, alpha); SDL_RenderFillRect(_sdlRenderer, &ddRect); @@ -369,10 +369,10 @@ private: } } - void ReadCentrePixel(uint32 * pixel) + void ReadCentrePixel(uint32_t * pixel) { - SDL_Rect centrePixelRegion = { (sint32)(_width / 2), (sint32)(_height / 2), 1, 1 }; - SDL_RenderReadPixels(_sdlRenderer, ¢rePixelRegion, SDL_PIXELFORMAT_RGBA8888, pixel, sizeof(uint32)); + SDL_Rect centrePixelRegion = { (int32_t)(_width / 2), (int32_t)(_height / 2), 1, 1 }; + SDL_RenderReadPixels(_sdlRenderer, ¢rePixelRegion, SDL_PIXELFORMAT_RGBA8888, pixel, sizeof(uint32_t)); } // Should be called before SDL_RenderPresent to capture frame buffer before Steam overlay is drawn. diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 43c1a2e441..0e380b63e1 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -50,7 +50,7 @@ public: { } - void Resize(uint32 width, uint32 height) override + void Resize(uint32_t width, uint32_t height) override { SDL_FreeSurface(_surface); SDL_FreeSurface(_RGBASurface); @@ -84,7 +84,7 @@ public: if (windowSurface != nullptr && _palette != nullptr) { SDL_Colour colours[256]; - for (sint32 i = 0; i < 256; i++) { + for (int32_t i = 0; i < 256; i++) { colours[i].r = palette[i].red; colours[i].g = palette[i].green; colours[i].b = palette[i].blue; @@ -113,7 +113,7 @@ private: } // Copy pixels from the virtual screen buffer to the surface - std::copy_n(_bits, _surface->pitch * _surface->h, (uint8 *)_surface->pixels); + std::copy_n(_bits, _surface->pitch * _surface->h, (uint8_t *)_surface->pixels); // Unlock the surface if (SDL_MUSTLOCK(_surface)) diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp index c73d11a0b1..13cac0f622 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp @@ -85,7 +85,7 @@ void DrawLineShader::GetLocations() vVertMat = GetAttributeLocation("vVertMat"); } -void DrawLineShader::SetScreenSize(sint32 width, sint32 height) +void DrawLineShader::SetScreenSize(int32_t width, int32_t height) { glUniform2i(uScreenSize, width, height); } diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h index 62451277e6..791d85a471 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h @@ -33,7 +33,7 @@ public: DrawLineShader(); ~DrawLineShader() override; - void SetScreenSize(sint32 width, sint32 height); + void SetScreenSize(int32_t width, int32_t height); void DrawInstances(const LineCommandBatch& instances); private: diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp index 4626fb8178..c15ebc8fb4 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp @@ -126,7 +126,7 @@ void DrawRectShader::GetLocations() vVertVec = GetAttributeLocation("vVertVec"); } -void DrawRectShader::SetScreenSize(sint32 width, sint32 height) +void DrawRectShader::SetScreenSize(int32_t width, int32_t height) { glUniform2i(uScreenSize, width, height); } diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h index 3b32a21413..0cc9c448f6 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h @@ -49,7 +49,7 @@ public: DrawRectShader(); ~DrawRectShader() override; - void SetScreenSize(sint32 width, sint32 height); + void SetScreenSize(int32_t width, int32_t height); void EnablePeeling(GLuint peelingTex); void DisablePeeling(); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp index b785cec6bc..0e95f9d0f1 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp @@ -41,7 +41,7 @@ static const char * TryLoadAllProcAddresses() namespace OpenGLState { - uint16 ActiveTexture; + uint16_t ActiveTexture; GLuint CurrentProgram; void Reset() @@ -51,7 +51,7 @@ namespace OpenGLState } } -void OpenGLAPI::SetTexture(uint16 index, GLenum type, GLuint texture) +void OpenGLAPI::SetTexture(uint16_t index, GLenum type, GLuint texture) { if (OpenGLState::ActiveTexture != index) { diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h index 47f16ac46e..428aec8665 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h @@ -115,12 +115,12 @@ inline void CheckGLError() namespace OpenGLAPI { bool Initialise(); - void SetTexture(uint16 index, GLenum type, GLuint texture); + void SetTexture(uint16_t index, GLenum type, GLuint texture); } namespace OpenGLState { - extern uint16 ActiveTexture; + extern uint16_t ActiveTexture; extern GLuint CurrentProgram; void Reset(); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index f85131b274..9d561e660b 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -63,14 +63,14 @@ private: TextureCache * _textureCache = nullptr; - sint32 _offsetX = 0; - sint32 _offsetY = 0; - sint32 _clipLeft = 0; - sint32 _clipTop = 0; - sint32 _clipRight = 0; - sint32 _clipBottom = 0; + int32_t _offsetX = 0; + int32_t _offsetY = 0; + int32_t _clipLeft = 0; + int32_t _clipTop = 0; + int32_t _clipRight = 0; + int32_t _clipBottom = 0; - sint32 _drawCount = 0; + int32_t _drawCount = 0; struct { @@ -89,18 +89,18 @@ public: const OpenGLFramebuffer & GetFinalFramebuffer() const { return _swapFramebuffer->GetFinalFramebuffer(); } void Initialise(); - void Resize(sint32 width, sint32 height); + void Resize(int32_t width, int32_t height); void ResetPalette(); void StartNewDraw(); - void Clear(uint8 paletteIndex) override; - void FillRect(uint32 colour, sint32 x, sint32 y, sint32 w, sint32 h) override; - void FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) override; - void DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) override; - void DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) override; - void DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) override; - void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) override; - void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) override; + void Clear(uint8_t paletteIndex) override; + void FillRect(uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override; + void FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override; + void DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) override; + void DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) override; + void DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) override; + void DrawSpriteSolid(uint32_t image, int32_t x, int32_t y, uint8_t colour) override; + void DrawGlyph(uint32_t image, int32_t x, int32_t y, uint8_t * palette) override; void FlushCommandBuffers(); @@ -118,11 +118,11 @@ private: SDL_Window * _window = nullptr; SDL_GLContext _context = nullptr; - uint32 _width = 0; - uint32 _height = 0; - uint32 _pitch = 0; + uint32_t _width = 0; + uint32_t _height = 0; + uint32_t _pitch = 0; size_t _bitsSize = 0; - uint8 * _bits = nullptr; + uint8_t * _bits = nullptr; rct_drawpixelinfo _bitsDPI = {}; @@ -184,7 +184,7 @@ public: _applyPaletteShader = new ApplyPaletteShader(); } - void Resize(uint32 width, uint32 height) override + void Resize(uint32_t width, uint32_t height) override { ConfigureBits(width, height, width); ConfigureCanvas(); @@ -193,7 +193,7 @@ public: void SetPalette(const rct_palette_entry * palette) override { - for (sint32 i = 0; i < 256; i++) + for (int32_t i = 0; i < 256; i++) { SDL_Color colour; colour.r = palette[i].red; @@ -218,7 +218,7 @@ public: SDL_GL_SetSwapInterval(vsync); } - void Invalidate(sint32 left, sint32 top, sint32 right, sint32 bottom) override + void Invalidate(int32_t left, int32_t top, int32_t right, int32_t bottom) override { } @@ -276,16 +276,16 @@ public: // Not implemented } - sint32 Screenshot() override + int32_t Screenshot() override { const OpenGLFramebuffer & framebuffer = _drawingContext->GetFinalFramebuffer(); framebuffer.Bind(); framebuffer.GetPixels(_bitsDPI); - sint32 result = screenshot_dump_png(&_bitsDPI); + int32_t result = screenshot_dump_png(&_bitsDPI); return result; } - void CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) override + void CopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) override { // Not applicable for this engine } @@ -306,7 +306,7 @@ public: return DEF_NONE; } - void InvalidateImage(uint32 image) override + void InvalidateImage(uint32_t image) override { _drawingContext->GetTextureCache() ->InvalidateImage(image); @@ -329,10 +329,10 @@ private: return version; } - void ConfigureBits(uint32 width, uint32 height, uint32 pitch) + void ConfigureBits(uint32_t width, uint32_t height, uint32_t pitch) { size_t newBitsSize = pitch * height; - uint8 * newBits = new uint8[newBitsSize]; + uint8_t * newBits = new uint8_t[newBitsSize]; if (_bits == nullptr) { std::fill_n(newBits, newBitsSize, 0); @@ -345,12 +345,12 @@ private: } else { - uint8 * src = _bits; - uint8 * dst = newBits; + uint8_t * src = _bits; + uint8_t * dst = newBits; - uint32 minWidth = std::min(_width, width); - uint32 minHeight = std::min(_height, height); - for (uint32 y = 0; y < minHeight; y++) + uint32_t minWidth = std::min(_width, width); + uint32_t minHeight = std::min(_height, height); + for (uint32_t y = 0; y < minHeight; y++) { std::copy_n(src, minWidth, dst); if (pitch - minWidth > 0) @@ -401,7 +401,7 @@ private: } if (GetContext()->GetUiContext()->GetScaleQuality() == SCALE_QUALITY_SMOOTH_NN) { - uint32 scale = std::ceil(gConfigGeneral.window_scale); + uint32_t scale = std::ceil(gConfigGeneral.window_scale); _smoothScaleFramebuffer = new OpenGLFramebuffer(_width * scale, _height * scale, false, false); } } @@ -445,7 +445,7 @@ void OpenGLDrawingContext::Initialise() _drawLineShader = new DrawLineShader(); } -void OpenGLDrawingContext::Resize(sint32 width, sint32 height) +void OpenGLDrawingContext::Resize(int32_t width, int32_t height) { _commandBuffers.lines.clear(); _commandBuffers.rects.clear(); @@ -471,12 +471,12 @@ void OpenGLDrawingContext::StartNewDraw() _swapFramebuffer->Clear(); } -void OpenGLDrawingContext::Clear(uint8 paletteIndex) +void OpenGLDrawingContext::Clear(uint8_t paletteIndex) { FillRect(paletteIndex, _clipLeft - _offsetX, _clipTop - _offsetY, _clipRight - _offsetX, _clipBottom - _offsetY); } -void OpenGLDrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint32 right, sint32 bottom) +void OpenGLDrawingContext::FillRect(uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) { left += _offsetX; top += _offsetY; @@ -508,7 +508,7 @@ void OpenGLDrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint } } -void OpenGLDrawingContext::FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) +void OpenGLDrawingContext::FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) { left += _offsetX; top += _offsetY; @@ -529,7 +529,7 @@ void OpenGLDrawingContext::FilterRect(FILTER_PALETTE_ID palette, sint32 left, si command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) +void OpenGLDrawingContext::DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) { x1 += _offsetX; y1 += _offsetY; @@ -544,9 +544,9 @@ void OpenGLDrawingContext::DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) +void OpenGLDrawingContext::DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) { - sint32 g1Id = image & 0x7FFFF; + int32_t g1Id = image & 0x7FFFF; auto g1Element = gfx_get_g1_element(g1Id); if (g1Element == nullptr) { @@ -575,12 +575,12 @@ void OpenGLDrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 t } } - uint8 zoomLevel = (1 << _dpi->zoom_level); + uint8_t zoomLevel = (1 << _dpi->zoom_level); - sint32 left = x + g1Element->x_offset; - sint32 top = y + g1Element->y_offset; + int32_t left = x + g1Element->x_offset; + int32_t top = y + g1Element->y_offset; - sint32 zoom_mask = 0xFFFFFFFF << _dpi->zoom_level; + int32_t zoom_mask = 0xFFFFFFFF << _dpi->zoom_level; if (_dpi->zoom_level && g1Element->flags & G1_FLAG_RLE_COMPRESSION){ top -= ~zoom_mask; } @@ -592,8 +592,8 @@ void OpenGLDrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 t left &= zoom_mask; - sint32 right = left + g1Element->width; - sint32 bottom = top + g1Element->height; + int32_t right = left + g1Element->width; + int32_t bottom = top + g1Element->height; if (_dpi->zoom_level && g1Element->flags & G1_FLAG_RLE_COMPRESSION) { bottom += top & ~zoom_mask; @@ -645,7 +645,7 @@ void OpenGLDrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 t else if ((image & IMAGE_TYPE_REMAP) || (image & IMAGE_TYPE_TRANSPARENT)) { paletteCount = 1; - uint32 palette = (image >> 19) & 0xFF; + uint32_t palette = (image >> 19) & 0xFF; palettes.x = TextureCache::PaletteToY(palette); if (palette == PALETTE_WATER) { @@ -689,7 +689,7 @@ void OpenGLDrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 t } } -void OpenGLDrawingContext::DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) +void OpenGLDrawingContext::DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) { auto g1ElementMask = gfx_get_g1_element(maskImage & 0x7FFFF); auto g1ElementColour = gfx_get_g1_element(colourImage & 0x7FFFF); @@ -701,17 +701,17 @@ void OpenGLDrawingContext::DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskIm const auto textureMask = _textureCache->GetOrLoadImageTexture(maskImage); const auto textureColour = _textureCache->GetOrLoadImageTexture(colourImage); - uint8 zoomLevel = (1 << _dpi->zoom_level); + uint8_t zoomLevel = (1 << _dpi->zoom_level); - sint32 drawOffsetX = g1ElementMask->x_offset; - sint32 drawOffsetY = g1ElementMask->y_offset; - sint32 drawWidth = std::min(g1ElementMask->width, g1ElementColour->width); - sint32 drawHeight = std::min(g1ElementMask->height, g1ElementColour->height); + int32_t drawOffsetX = g1ElementMask->x_offset; + int32_t drawOffsetY = g1ElementMask->y_offset; + int32_t drawWidth = std::min(g1ElementMask->width, g1ElementColour->width); + int32_t drawHeight = std::min(g1ElementMask->height, g1ElementColour->height); - sint32 left = x + drawOffsetX; - sint32 top = y + drawOffsetY; - sint32 right = left + drawWidth; - sint32 bottom = top + drawHeight; + int32_t left = x + drawOffsetX; + int32_t top = y + drawOffsetY; + int32_t right = left + drawWidth; + int32_t bottom = top + drawHeight; if (left > right) { @@ -751,11 +751,11 @@ void OpenGLDrawingContext::DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskIm command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) +void OpenGLDrawingContext::DrawSpriteSolid(uint32_t image, int32_t x, int32_t y, uint8_t colour) { assert((colour & 0xFF) > 0u); - sint32 g1Id = image & 0x7FFFF; + int32_t g1Id = image & 0x7FFFF; auto g1Element = gfx_get_g1_element(g1Id); if (g1Element == nullptr) { @@ -764,15 +764,15 @@ void OpenGLDrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uin const auto texture = _textureCache->GetOrLoadImageTexture(image); - sint32 drawOffsetX = g1Element->x_offset; - sint32 drawOffsetY = g1Element->y_offset; - sint32 drawWidth = (uint16)g1Element->width; - sint32 drawHeight = (uint16)g1Element->height; + int32_t drawOffsetX = g1Element->x_offset; + int32_t drawOffsetY = g1Element->y_offset; + int32_t drawWidth = (uint16_t)g1Element->width; + int32_t drawHeight = (uint16_t)g1Element->height; - sint32 left = x + drawOffsetX; - sint32 top = y + drawOffsetY; - sint32 right = left + drawWidth; - sint32 bottom = top + drawHeight; + int32_t left = x + drawOffsetX; + int32_t top = y + drawOffsetY; + int32_t right = left + drawWidth; + int32_t bottom = top + drawHeight; if (left > right) { @@ -802,7 +802,7 @@ void OpenGLDrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uin command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) +void OpenGLDrawingContext::DrawGlyph(uint32_t image, int32_t x, int32_t y, uint8_t * palette) { auto g1Element = gfx_get_g1_element(image & 0x7FFFF); if (g1Element == nullptr) @@ -812,15 +812,15 @@ void OpenGLDrawingContext::DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * p const auto texture = _textureCache->GetOrLoadGlyphTexture(image, palette); - sint32 drawOffsetX = g1Element->x_offset; - sint32 drawOffsetY = g1Element->y_offset; - sint32 drawWidth = (uint16)g1Element->width; - sint32 drawHeight = (uint16)g1Element->height; + int32_t drawOffsetX = g1Element->x_offset; + int32_t drawOffsetY = g1Element->y_offset; + int32_t drawWidth = (uint16_t)g1Element->width; + int32_t drawHeight = (uint16_t)g1Element->height; - sint32 left = x + drawOffsetX; - sint32 top = y + drawOffsetY; - sint32 right = left + drawWidth; - sint32 bottom = top + drawHeight; + int32_t left = x + drawOffsetX; + int32_t top = y + drawOffsetY; + int32_t right = left + drawWidth; + int32_t bottom = top + drawHeight; if (left > right) { @@ -899,8 +899,8 @@ void OpenGLDrawingContext::HandleTransparency() _drawRectShader->Use(); _drawRectShader->SetInstances(_commandBuffers.transparent); - sint32 max_depth = MaxTransparencyDepth(_commandBuffers.transparent); - for (sint32 i=0; i < max_depth; ++i) + int32_t max_depth = MaxTransparencyDepth(_commandBuffers.transparent); + for (int32_t i=0; i < max_depth; ++i) { _swapFramebuffer->BindTransparent(); @@ -934,8 +934,8 @@ void OpenGLDrawingContext::SetDPI(rct_drawpixelinfo * dpi) assert(bitsOffset < bitsSize); - _clipLeft = (sint32)(bitsOffset % (screenDPI->width + screenDPI->pitch)); - _clipTop = (sint32)(bitsOffset / (screenDPI->width + screenDPI->pitch)); + _clipLeft = (int32_t)(bitsOffset % (screenDPI->width + screenDPI->pitch)); + _clipTop = (int32_t)(bitsOffset / (screenDPI->width + screenDPI->pitch)); _clipRight = _clipLeft + (dpi->width >> dpi->zoom_level); _clipBottom = _clipTop + (dpi->height >> dpi->zoom_level); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp index d138df75da..591c5df9d8 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp @@ -25,7 +25,7 @@ OpenGLFramebuffer::OpenGLFramebuffer(SDL_Window * window) SDL_GetWindowSize(window, &_width, &_height); } -OpenGLFramebuffer::OpenGLFramebuffer(sint32 width, sint32 height, bool depth, bool integer) +OpenGLFramebuffer::OpenGLFramebuffer(int32_t width, int32_t height, bool depth, bool integer) { _width = width; _height = height; @@ -88,15 +88,15 @@ void OpenGLFramebuffer::GetPixels(rct_drawpixelinfo &dpi) const { assert(dpi.width == _width && dpi.height == _height); - auto pixels = std::make_unique(_width * _height); + auto pixels = std::make_unique(_width * _height); glBindTexture(GL_TEXTURE_2D, _texture); glPixelStorei(GL_PACK_ALIGNMENT, 1); glGetTexImage(GL_TEXTURE_2D, 0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, pixels.get()); // Flip pixels vertically on copy - uint8 * src = pixels.get() + ((_height - 1) * _width); - uint8 * dst = dpi.bits; - for (sint32 y = 0; y < _height; y++) + uint8_t * src = pixels.get() + ((_height - 1) * _width); + uint8_t * dst = dpi.bits; + for (int32_t y = 0; y < _height; y++) { std::copy_n(src, _width, dst); src -= _width; @@ -136,7 +136,7 @@ void OpenGLFramebuffer::Copy(OpenGLFramebuffer &src, GLenum filter) Bind(); } -GLuint OpenGLFramebuffer::CreateDepthTexture(sint32 width, sint32 height) +GLuint OpenGLFramebuffer::CreateDepthTexture(int32_t width, int32_t height) { GLuint depth; glGenTextures(1, &depth); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h index 5af05d4426..d9ee3faff0 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h @@ -23,12 +23,12 @@ private: GLuint _id; GLuint _texture; GLuint _depth; - sint32 _width; - sint32 _height; + int32_t _width; + int32_t _height; public: explicit OpenGLFramebuffer(SDL_Window * window); - OpenGLFramebuffer(sint32 width, sint32 height, bool depth = true, bool integer = true); + OpenGLFramebuffer(int32_t width, int32_t height, bool depth = true, bool integer = true); ~OpenGLFramebuffer(); OpenGLFramebuffer(const OpenGLFramebuffer &) = delete; @@ -48,5 +48,5 @@ public: GLuint SwapDepthTexture(GLuint depth); void Copy(OpenGLFramebuffer &src, GLenum filter); - static GLuint CreateDepthTexture(sint32 width, sint32 height); + static GLuint CreateDepthTexture(int32_t width, int32_t height); }; diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp index 7819699900..750ecbdf07 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp @@ -76,7 +76,7 @@ std::string OpenGLShader::ReadSourceCode(const std::string &path) { auto fs = FileStream(path, FILE_MODE_OPEN); - uint64 fileLength = fs.GetLength(); + uint64_t fileLength = fs.GetLength(); if (fileLength > MaxSourceSize) { throw IOException("Shader source too large."); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h index 3013adce0e..f570a408c4 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h @@ -16,7 +16,7 @@ class OpenGLShader final { private: - static constexpr uint64 MaxSourceSize = 8 * 1024 * 1024; // 8 MiB + static constexpr uint64_t MaxSourceSize = 8 * 1024 * 1024; // 8 MiB GLenum _type; GLuint _id = 0; diff --git a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp index 4606e50079..b98ad505c2 100644 --- a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp @@ -16,7 +16,7 @@ constexpr GLfloat depthValue[1] = { 1.0f }; constexpr GLfloat depthValueTransparent[1] = { 0.0f }; constexpr GLuint indexValue[4] = { 0, 0, 0, 0 }; -SwapFramebuffer::SwapFramebuffer(sint32 width, sint32 height) : +SwapFramebuffer::SwapFramebuffer(int32_t width, int32_t height) : _opaqueFramebuffer(width, height), _transparentFramebuffer(width, height), _mixFramebuffer(width, height, false), _backDepth(OpenGLFramebuffer::CreateDepthTexture(width, height)) { diff --git a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h index cf1b82c273..b73e9176c6 100644 --- a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h +++ b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h @@ -31,7 +31,7 @@ private: GLuint _backDepth; public: - SwapFramebuffer(sint32 width, sint32 height); + SwapFramebuffer(int32_t width, int32_t height); const OpenGLFramebuffer &GetFinalFramebuffer() const { return _opaqueFramebuffer; } GLuint GetBackDepthTexture() const { return _backDepth; } diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp index 5315bfacd4..6268634b18 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp @@ -15,7 +15,7 @@ #include #include "TextureCache.h" -constexpr uint32 UNUSED_INDEX = 0xFFFFFFFF; +constexpr uint32_t UNUSED_INDEX = 0xFFFFFFFF; TextureCache::TextureCache() { @@ -27,9 +27,9 @@ TextureCache::~TextureCache() FreeTextures(); } -void TextureCache::InvalidateImage(uint32 image) +void TextureCache::InvalidateImage(uint32_t image) { - uint32 index = _indexMap[image]; + uint32_t index = _indexMap[image]; if (index == UNUSED_INDEX) return; @@ -58,11 +58,11 @@ void TextureCache::InvalidateImage(uint32 image) } } -BasicTextureInfo TextureCache::GetOrLoadImageTexture(uint32 image) +BasicTextureInfo TextureCache::GetOrLoadImageTexture(uint32_t image) { image &= 0x7FFFF; - uint32 index = _indexMap[image]; + uint32_t index = _indexMap[image]; if (index != UNUSED_INDEX) { const auto& info = _textureCache[index]; @@ -73,7 +73,7 @@ BasicTextureInfo TextureCache::GetOrLoadImageTexture(uint32 image) }; } - index = (uint32)_textureCache.size(); + index = (uint32_t)_textureCache.size(); AtlasTextureInfo info = LoadImageTexture(image); @@ -83,11 +83,11 @@ BasicTextureInfo TextureCache::GetOrLoadImageTexture(uint32 image) return info; } -BasicTextureInfo TextureCache::GetOrLoadGlyphTexture(uint32 image, uint8 * palette) +BasicTextureInfo TextureCache::GetOrLoadGlyphTexture(uint32_t image, uint8_t * palette) { GlyphId glyphId; glyphId.Image = image; - std::copy_n(palette, sizeof(glyphId.Palette), (uint8 *)&glyphId.Palette); + std::copy_n(palette, sizeof(glyphId.Palette), (uint8_t *)&glyphId.Palette); auto kvp = _glyphTextureMap.find(glyphId); if (kvp != _glyphTextureMap.end()) @@ -151,7 +151,7 @@ void TextureCache::GeneratePaletteTexture() for (int i=0; i < PALETTE_TO_G1_OFFSET_COUNT; ++i) { GLint y = PaletteToY(i); - uint16 image = palette_to_g1_offset[i]; + uint16_t image = palette_to_g1_offset[i]; auto element = gfx_get_g1_element(image); gfx_draw_sprite_software(&dpi, image, -element->x_offset, y - element->y_offset, 0); } @@ -183,7 +183,7 @@ void TextureCache::EnlargeAtlasesTexture(GLuint newEntries) _atlasesTextureIndices = newIndices; } -AtlasTextureInfo TextureCache::LoadImageTexture(uint32 image) +AtlasTextureInfo TextureCache::LoadImageTexture(uint32_t image) { rct_drawpixelinfo dpi = GetImageAsDPI(image, 0); @@ -198,7 +198,7 @@ AtlasTextureInfo TextureCache::LoadImageTexture(uint32 image) return cacheInfo; } -AtlasTextureInfo TextureCache::LoadGlyphTexture(uint32 image, uint8 * palette) +AtlasTextureInfo TextureCache::LoadGlyphTexture(uint32_t image, uint8_t * palette) { rct_drawpixelinfo dpi = GetGlyphAsDPI(image, palette); @@ -213,7 +213,7 @@ AtlasTextureInfo TextureCache::LoadGlyphTexture(uint32 image, uint8 * palette) return cacheInfo; } -AtlasTextureInfo TextureCache::AllocateImage(sint32 imageWidth, sint32 imageHeight) +AtlasTextureInfo TextureCache::AllocateImage(int32_t imageWidth, int32_t imageHeight) { CreateTextures(); @@ -227,13 +227,13 @@ AtlasTextureInfo TextureCache::AllocateImage(sint32 imageWidth, sint32 imageHeig } // If there is no such atlas, then create a new one - if ((sint32) _atlases.size() >= _atlasesTextureIndicesLimit) + if ((int32_t) _atlases.size() >= _atlasesTextureIndicesLimit) { throw std::runtime_error("more texture atlases required, but device limit reached!"); } - sint32 atlasIndex = (sint32) _atlases.size(); - sint32 atlasSize = (sint32) powf(2, (float) Atlas::CalculateImageSizeOrder(imageWidth, imageHeight)); + int32_t atlasIndex = (int32_t) _atlases.size(); + int32_t atlasSize = (int32_t) powf(2, (float) Atlas::CalculateImageSizeOrder(imageWidth, imageHeight)); #ifdef DEBUG log_verbose("new texture atlas #%d (size %d) allocated\n", atlasIndex, atlasSize); @@ -249,22 +249,22 @@ AtlasTextureInfo TextureCache::AllocateImage(sint32 imageWidth, sint32 imageHeig return _atlases.back().Allocate(imageWidth, imageHeight); } -rct_drawpixelinfo TextureCache::GetImageAsDPI(uint32 image, uint32 tertiaryColour) +rct_drawpixelinfo TextureCache::GetImageAsDPI(uint32_t image, uint32_t tertiaryColour) { auto g1Element = gfx_get_g1_element(image & 0x7FFFF); - sint32 width = g1Element->width; - sint32 height = g1Element->height; + int32_t width = g1Element->width; + int32_t height = g1Element->height; rct_drawpixelinfo dpi = CreateDPI(width, height); gfx_draw_sprite_software(&dpi, image, -g1Element->x_offset, -g1Element->y_offset, tertiaryColour); return dpi; } -rct_drawpixelinfo TextureCache::GetGlyphAsDPI(uint32 image, uint8 * palette) +rct_drawpixelinfo TextureCache::GetGlyphAsDPI(uint32_t image, uint8_t * palette) { auto g1Element = gfx_get_g1_element(image & 0x7FFFF); - sint32 width = g1Element->width; - sint32 height = g1Element->height; + int32_t width = g1Element->width; + int32_t height = g1Element->height; rct_drawpixelinfo dpi = CreateDPI(width, height); gfx_draw_sprite_palette_set_software(&dpi, image, -g1Element->x_offset, -g1Element->y_offset, palette, nullptr); @@ -279,10 +279,10 @@ void TextureCache::FreeTextures() std::fill(_indexMap.begin(), _indexMap.end(), UNUSED_INDEX); } -rct_drawpixelinfo TextureCache::CreateDPI(sint32 width, sint32 height) +rct_drawpixelinfo TextureCache::CreateDPI(int32_t width, int32_t height) { size_t numPixels = width * height; - auto pixels8 = new uint8[numPixels]; + auto pixels8 = new uint8_t[numPixels]; std::fill_n(pixels8, numPixels, 0); rct_drawpixelinfo dpi; @@ -311,7 +311,7 @@ GLuint TextureCache::GetPaletteTexture() return _paletteTexture; } -GLint TextureCache::PaletteToY(uint32 palette) +GLint TextureCache::PaletteToY(uint32_t palette) { return palette > PALETTE_WATER ? palette + 5 : palette + 1; } diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h index 8d89012887..824fe79eb1 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h @@ -21,8 +21,8 @@ struct rct_drawpixelinfo; struct GlyphId { - uint32 Image; - uint64 Palette; + uint32_t Image; + uint64_t Palette; struct Hash { @@ -47,11 +47,11 @@ struct GlyphId // This is the maximum width and height of each atlas, basically the // granularity at which new atlases are allocated (2048 -> 4 MB of VRAM) -constexpr sint32 TEXTURE_CACHE_MAX_ATLAS_SIZE = 2048; +constexpr int32_t TEXTURE_CACHE_MAX_ATLAS_SIZE = 2048; // Pixel dimensions of smallest supported slots in texture atlases // Must be a power of 2! -constexpr sint32 TEXTURE_CACHE_SMALLEST_SLOT = 32; +constexpr int32_t TEXTURE_CACHE_SMALLEST_SLOT = 32; struct BasicTextureInfo { @@ -64,7 +64,7 @@ struct AtlasTextureInfo : public BasicTextureInfo { GLuint slot; ivec4 bounds; - uint32 image; + uint32_t image; }; // Represents a texture atlas that images of a given maximum size can be allocated from @@ -74,22 +74,22 @@ class Atlas final { private: GLuint _index = 0; - sint32 _imageSize = 0; - sint32 _atlasWidth = 0; - sint32 _atlasHeight = 0; + int32_t _imageSize = 0; + int32_t _atlasWidth = 0; + int32_t _atlasHeight = 0; std::vector _freeSlots; - sint32 _cols = 0; - sint32 _rows = 0; + int32_t _cols = 0; + int32_t _rows = 0; public: - Atlas(GLuint index, sint32 imageSize) + Atlas(GLuint index, int32_t imageSize) { _index = index; _imageSize = imageSize; } - void Initialise(sint32 atlasWidth, sint32 atlasHeight) + void Initialise(int32_t atlasWidth, int32_t atlasHeight) { _atlasWidth = atlasWidth; _atlasHeight = atlasHeight; @@ -104,7 +104,7 @@ public: } } - AtlasTextureInfo Allocate(sint32 actualWidth, sint32 actualHeight) + AtlasTextureInfo Allocate(int32_t actualWidth, int32_t actualHeight) { assert(_freeSlots.size() > 0); @@ -131,35 +131,35 @@ public: // Checks if specified image would be tightly packed in this atlas // by checking if it is within the right power of 2 range - bool IsImageSuitable(sint32 actualWidth, sint32 actualHeight) const + bool IsImageSuitable(int32_t actualWidth, int32_t actualHeight) const { - sint32 imageOrder = CalculateImageSizeOrder(actualWidth, actualHeight); - sint32 atlasOrder = (sint32) log2(_imageSize); + int32_t imageOrder = CalculateImageSizeOrder(actualWidth, actualHeight); + int32_t atlasOrder = (int32_t) log2(_imageSize); return imageOrder == atlasOrder; } - sint32 GetFreeSlots() const + int32_t GetFreeSlots() const { - return (sint32) _freeSlots.size(); + return (int32_t) _freeSlots.size(); } - static sint32 CalculateImageSizeOrder(sint32 actualWidth, sint32 actualHeight) + static int32_t CalculateImageSizeOrder(int32_t actualWidth, int32_t actualHeight) { - sint32 actualSize = std::max(actualWidth, actualHeight); + int32_t actualSize = std::max(actualWidth, actualHeight); if (actualSize < TEXTURE_CACHE_SMALLEST_SLOT) { actualSize = TEXTURE_CACHE_SMALLEST_SLOT; } - return (sint32) ceil(log2f((float) actualSize)); + return (int32_t) ceil(log2f((float) actualSize)); } private: - ivec4 GetSlotCoordinates(GLuint slot, sint32 actualWidth, sint32 actualHeight) const + ivec4 GetSlotCoordinates(GLuint slot, int32_t actualWidth, int32_t actualHeight) const { - sint32 row = slot / _cols; - sint32 col = slot % _cols; + int32_t row = slot / _cols; + int32_t col = slot % _cols; return ivec4 { @@ -194,32 +194,32 @@ private: std::vector _atlases; std::unordered_map _glyphTextureMap; std::vector _textureCache; - std::array _indexMap; + std::array _indexMap; GLuint _paletteTexture = 0; public: TextureCache(); ~TextureCache(); - void InvalidateImage(uint32 image); - BasicTextureInfo GetOrLoadImageTexture(uint32 image); - BasicTextureInfo GetOrLoadGlyphTexture(uint32 image, uint8 * palette); + void InvalidateImage(uint32_t image); + BasicTextureInfo GetOrLoadImageTexture(uint32_t image); + BasicTextureInfo GetOrLoadGlyphTexture(uint32_t image, uint8_t * palette); GLuint GetAtlasesTexture(); GLuint GetPaletteTexture(); - static GLint PaletteToY(uint32 palette); + static GLint PaletteToY(uint32_t palette); private: void CreateTextures(); void GeneratePaletteTexture(); void EnlargeAtlasesTexture(GLuint newEntries); - AtlasTextureInfo LoadImageTexture(uint32 image); - AtlasTextureInfo LoadGlyphTexture(uint32 image, uint8 * palette); - AtlasTextureInfo AllocateImage(sint32 imageWidth, sint32 imageHeight); - rct_drawpixelinfo GetImageAsDPI(uint32 image, uint32 tertiaryColour); - rct_drawpixelinfo GetGlyphAsDPI(uint32 image, uint8 * palette); + AtlasTextureInfo LoadImageTexture(uint32_t image); + AtlasTextureInfo LoadGlyphTexture(uint32_t image, uint8_t * palette); + AtlasTextureInfo AllocateImage(int32_t imageWidth, int32_t imageHeight); + rct_drawpixelinfo GetImageAsDPI(uint32_t image, uint32_t tertiaryColour); + rct_drawpixelinfo GetGlyphAsDPI(uint32_t image, uint8_t * palette); void FreeTextures(); - static rct_drawpixelinfo CreateDPI(sint32 width, sint32 height); + static rct_drawpixelinfo CreateDPI(int32_t width, int32_t height); static void DeleteDPI(rct_drawpixelinfo dpi); }; diff --git a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp index 5895f6ef28..da2d08c15f 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp @@ -20,9 +20,9 @@ */ struct XData { - sint32 xposition; + int32_t xposition; bool begin; - sint32 top, bottom; + int32_t top, bottom; }; typedef std::vector SweepLine; @@ -38,10 +38,10 @@ static inline SweepLine CreateXList(const RectCommandBatch &transparent) for (const DrawRectCommand &command : transparent) { - sint32 left = std::min(std::max(command.bounds.x, command.clip.x), command.clip.z); - sint32 top = std::min(std::max(command.bounds.y, command.clip.y), command.clip.w); - sint32 right = std::min(std::max(command.bounds.z, command.clip.x), command.clip.z); - sint32 bottom = std::min(std::max(command.bounds.w, command.clip.y), command.clip.w); + int32_t left = std::min(std::max(command.bounds.x, command.clip.x), command.clip.z); + int32_t top = std::min(std::max(command.bounds.y, command.clip.y), command.clip.w); + int32_t right = std::min(std::max(command.bounds.z, command.clip.x), command.clip.z); + int32_t bottom = std::min(std::max(command.bounds.w, command.clip.y), command.clip.w); assert(left <= right); assert(top <= bottom); @@ -70,15 +70,15 @@ static inline SweepLine CreateXList(const RectCommandBatch &transparent) */ struct YData { - sint32 count, depth; + int32_t count, depth; }; -typedef std::map IntervalTree; +typedef std::map IntervalTree; /* * Inserts the interval's top endpoint into the interval tree. If the endpoint * already exists in the interval tree, it stacks the endpoints. */ -static inline IntervalTree::iterator InsertTopEndpoint(IntervalTree &y_intersect, sint32 top) +static inline IntervalTree::iterator InsertTopEndpoint(IntervalTree &y_intersect, int32_t top) { auto top_in = y_intersect.insert({top, {1, 0}}); IntervalTree::iterator top_it = top_in.first; @@ -102,7 +102,7 @@ static inline IntervalTree::iterator InsertTopEndpoint(IntervalTree &y_intersect * endpoint already exists in the interval tree, it stacks the endpoint. * This function can produce a new maximum depth. */ -static inline IntervalTree::iterator InsertBottomEndpoint(IntervalTree &y_intersect, sint32 bottom) +static inline IntervalTree::iterator InsertBottomEndpoint(IntervalTree &y_intersect, int32_t bottom) { auto bottom_in = y_intersect.insert({bottom, {1, 1}}); IntervalTree::iterator bottom_it = bottom_in.first; @@ -158,9 +158,9 @@ static inline void RemoveBottomEndpoint(IntervalTree &y_intersect, IntervalTree: * to render the command batch. It will never underestimate the number of * iterations, but it can overestimate, usually by no more than +2. */ -sint32 MaxTransparencyDepth(const RectCommandBatch &transparent) +int32_t MaxTransparencyDepth(const RectCommandBatch &transparent) { - sint32 max_depth = 1; + int32_t max_depth = 1; SweepLine x_sweep = CreateXList(transparent); IntervalTree y_intersect{}; diff --git a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h index fcf7f530d3..241d8abb49 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h +++ b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h @@ -17,4 +17,4 @@ * to render the command batch. It will never underestimate the number of * iterations, but it can overestimate, usually by no more than +2. */ -sint32 MaxTransparencyDepth(const RectCommandBatch &transparent); +int32_t MaxTransparencyDepth(const RectCommandBatch &transparent); diff --git a/src/openrct2-ui/input/Input.cpp b/src/openrct2-ui/input/Input.cpp index c0d1ca5ab1..28082823d1 100644 --- a/src/openrct2-ui/input/Input.cpp +++ b/src/openrct2-ui/input/Input.cpp @@ -25,7 +25,7 @@ using namespace OpenRCT2::Ui; -static void input_handle_console(sint32 key) +static void input_handle_console(int32_t key) { CONSOLE_INPUT input = CONSOLE_INPUT_NONE; switch (key) @@ -56,7 +56,7 @@ static void input_handle_console(sint32 key) } } -static void input_handle_chat(sint32 key) +static void input_handle_chat(int32_t key) { CHAT_INPUT input = CHAT_INPUT_NONE; switch (key) @@ -77,7 +77,7 @@ static void input_handle_chat(sint32 key) static void game_handle_key_scroll() { rct_window * mainWindow; - sint32 scrollX, scrollY; + int32_t scrollX, scrollY; mainWindow = window_get_main(); if (mainWindow == nullptr) @@ -97,7 +97,7 @@ static void game_handle_key_scroll() scrollX = 0; scrollY = 0; - const uint8 * keysState = context_get_keys_state(); + const uint8_t * keysState = context_get_keys_state(); get_keyboard_map_scroll(keysState, &scrollX, &scrollY); if (scrollX != 0 || scrollY != 0) @@ -107,7 +107,7 @@ static void game_handle_key_scroll() input_scroll_viewport(scrollX, scrollY); } -static sint32 input_scancode_to_rct_keycode(sint32 sdl_key) +static int32_t input_scancode_to_rct_keycode(int32_t sdl_key) { char keycode = (char)SDL_GetKeyFromScancode((SDL_Scancode)sdl_key); @@ -144,7 +144,7 @@ void input_handle_keyboard(bool isTitle) // Handle modifier keys and key scrolling gInputPlaceObjectModifier = PLACE_OBJECT_MODIFIER_NONE; - const uint8 * keysState = context_get_keys_state(); + const uint8_t * keysState = context_get_keys_state(); if (keysState[SDL_SCANCODE_LSHIFT] || keysState[SDL_SCANCODE_RSHIFT]) { gInputPlaceObjectModifier |= PLACE_OBJECT_MODIFIER_SHIFT_Z; @@ -178,7 +178,7 @@ void input_handle_keyboard(bool isTitle) } // Handle key input - sint32 key; + int32_t key; while (!gOpenRCT2Headless && (key = get_next_key()) != 0) { if (key == 255) diff --git a/src/openrct2-ui/input/KeyboardShortcut.cpp b/src/openrct2-ui/input/KeyboardShortcut.cpp index 69cbc40e87..7883dcd09c 100644 --- a/src/openrct2-ui/input/KeyboardShortcut.cpp +++ b/src/openrct2-ui/input/KeyboardShortcut.cpp @@ -32,7 +32,7 @@ #include #include "KeyboardShortcuts.h" -uint8 gKeyboardShortcutChangeId; +uint8_t gKeyboardShortcutChangeId; using shortcut_action = void (*)(); @@ -45,18 +45,18 @@ namespace * * rct2: 0x006E3E68 */ -void keyboard_shortcut_handle(sint32 key) +void keyboard_shortcut_handle(int32_t key) { - sint32 shortcut = keyboard_shortcuts_get_from_key(key); + int32_t shortcut = keyboard_shortcuts_get_from_key(key); if (shortcut != -1) { keyboard_shortcut_handle_command(shortcut); } } -void keyboard_shortcut_handle_command(sint32 shortcutIndex) +void keyboard_shortcut_handle_command(int32_t shortcutIndex) { - if (shortcutIndex >= 0 && static_cast(shortcutIndex) < Util::CountOf(shortcut_table)) + if (shortcutIndex >= 0 && static_cast(shortcutIndex) < Util::CountOf(shortcut_table)) { shortcut_action action = shortcut_table[shortcutIndex]; if (action != nullptr) @@ -68,7 +68,7 @@ void keyboard_shortcut_handle_command(sint32 shortcutIndex) #pragma region Shortcut Commands -static void toggle_view_flag(sint32 viewportFlag) +static void toggle_view_flag(int32_t viewportFlag) { rct_window * window; diff --git a/src/openrct2-ui/input/KeyboardShortcuts.cpp b/src/openrct2-ui/input/KeyboardShortcuts.cpp index d5248aaded..4e01d76ce4 100644 --- a/src/openrct2-ui/input/KeyboardShortcuts.cpp +++ b/src/openrct2-ui/input/KeyboardShortcuts.cpp @@ -54,14 +54,14 @@ bool KeyboardShortcuts::Load() if (File::Exists(path)) { auto fs = FileStream(path, FILE_MODE_OPEN); - uint16 version = fs.ReadValue(); + uint16_t version = fs.ReadValue(); if (version == KeyboardShortcuts::CURRENT_FILE_VERSION) { - sint32 numShortcutsInFile = (fs.GetLength() - sizeof(uint16)) / sizeof(uint16); - sint32 numShortcutsToRead = std::min(SHORTCUT_COUNT, numShortcutsInFile); - for (sint32 i = 0; i < numShortcutsToRead; i++) + int32_t numShortcutsInFile = (fs.GetLength() - sizeof(uint16_t)) / sizeof(uint16_t); + int32_t numShortcutsToRead = std::min(SHORTCUT_COUNT, numShortcutsInFile); + for (int32_t i = 0; i < numShortcutsToRead; i++) { - _keys[i] = fs.ReadValue(); + _keys[i] = fs.ReadValue(); } result = true; } @@ -81,10 +81,10 @@ bool KeyboardShortcuts::Save() { std::string path = _env->GetFilePath(PATHID::CONFIG_KEYBOARD); auto fs = FileStream(path, FILE_MODE_WRITE); - fs.WriteValue(KeyboardShortcuts::CURRENT_FILE_VERSION); - for (sint32 i = 0; i < SHORTCUT_COUNT; i++) + fs.WriteValue(KeyboardShortcuts::CURRENT_FILE_VERSION); + for (int32_t i = 0; i < SHORTCUT_COUNT; i++) { - fs.WriteValue(_keys[i]); + fs.WriteValue(_keys[i]); } result = true; } @@ -95,10 +95,10 @@ bool KeyboardShortcuts::Save() return result; } -void KeyboardShortcuts::Set(sint32 key) +void KeyboardShortcuts::Set(int32_t key) { // Unmap shortcut that already uses this key - sint32 shortcut = GetFromKey(key); + int32_t shortcut = GetFromKey(key); if (shortcut != SHORTCUT_UNDEFINED) { _keys[shortcut] = SHORTCUT_UNDEFINED; @@ -109,9 +109,9 @@ void KeyboardShortcuts::Set(sint32 key) Save(); } -sint32 KeyboardShortcuts::GetFromKey(sint32 key) +int32_t KeyboardShortcuts::GetFromKey(int32_t key) { - for (sint32 i = 0; i < SHORTCUT_COUNT; i++) + for (int32_t i = 0; i < SHORTCUT_COUNT; i++) { if (key == _keys[i]) { @@ -121,11 +121,11 @@ sint32 KeyboardShortcuts::GetFromKey(sint32 key) return SHORTCUT_UNDEFINED; } -std::string KeyboardShortcuts::GetShortcutString(sint32 shortcut) const +std::string KeyboardShortcuts::GetShortcutString(int32_t shortcut) const { utf8 buffer[256] = { 0 }; utf8 formatBuffer[256] = { 0 }; - uint16 shortcutKey = _keys[shortcut]; + uint16_t shortcutKey = _keys[shortcut]; if (shortcutKey == SHORTCUT_UNDEFINED) return std::string(); if (shortcutKey & SHIFT) { @@ -155,12 +155,12 @@ std::string KeyboardShortcuts::GetShortcutString(sint32 shortcut) const return std::string(buffer); } -void KeyboardShortcuts::GetKeyboardMapScroll(const uint8 * keysState, sint32 * x, sint32 * y) const +void KeyboardShortcuts::GetKeyboardMapScroll(const uint8_t * keysState, int32_t * x, int32_t * y) const { - for (sint32 shortcutId = SHORTCUT_SCROLL_MAP_UP; shortcutId <= SHORTCUT_SCROLL_MAP_RIGHT; shortcutId++) + for (int32_t shortcutId = SHORTCUT_SCROLL_MAP_UP; shortcutId <= SHORTCUT_SCROLL_MAP_RIGHT; shortcutId++) { - uint16 shortcutKey = _keys[shortcutId]; - uint8 scancode = shortcutKey & 0xFF; + uint16_t shortcutKey = _keys[shortcutId]; + uint8_t scancode = shortcutKey & 0xFF; if (shortcutKey == 0xFFFF) continue; if (!keysState[scancode]) continue; @@ -213,30 +213,30 @@ bool keyboard_shortcuts_save() return _instance->Save(); } -void keyboard_shortcuts_set(sint32 key) +void keyboard_shortcuts_set(int32_t key) { return _instance->Set(key); } -sint32 keyboard_shortcuts_get_from_key(sint32 key) +int32_t keyboard_shortcuts_get_from_key(int32_t key) { return _instance->GetFromKey(key); } -void keyboard_shortcuts_format_string(char * buffer, size_t bufferSize, sint32 shortcut) +void keyboard_shortcuts_format_string(char * buffer, size_t bufferSize, int32_t shortcut) { auto str = _instance->GetShortcutString(shortcut); String::Set(buffer, bufferSize, str.c_str()); } -void get_keyboard_map_scroll(const uint8 * keysState, sint32 * x, sint32 * y) +void get_keyboard_map_scroll(const uint8_t * keysState, int32_t * x, int32_t * y) { _instance->GetKeyboardMapScroll(keysState, x, y); } // Default keyboard shortcuts -const uint16 KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] = +const uint16_t KeyboardShortcuts::DefaultKeys[SHORTCUT_COUNT] = { SDL_SCANCODE_BACKSPACE, // SHORTCUT_CLOSE_TOP_MOST_WINDOW SHIFT | SDL_SCANCODE_BACKSPACE, // SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS diff --git a/src/openrct2-ui/input/KeyboardShortcuts.h b/src/openrct2-ui/input/KeyboardShortcuts.h index 4d1436189d..7651937161 100644 --- a/src/openrct2-ui/input/KeyboardShortcuts.h +++ b/src/openrct2-ui/input/KeyboardShortcuts.h @@ -110,11 +110,11 @@ namespace OpenRCT2 class KeyboardShortcuts { private: - constexpr static sint32 CURRENT_FILE_VERSION = 1; - static const uint16 DefaultKeys[SHORTCUT_COUNT]; + constexpr static int32_t CURRENT_FILE_VERSION = 1; + static const uint16_t DefaultKeys[SHORTCUT_COUNT]; std::shared_ptr const _env; - uint16 _keys[SHORTCUT_COUNT]; + uint16_t _keys[SHORTCUT_COUNT]; public: KeyboardShortcuts(const std::shared_ptr& env); @@ -124,28 +124,28 @@ namespace OpenRCT2 bool Load(); bool Save(); - std::string GetShortcutString(sint32 shortcut) const; + std::string GetShortcutString(int32_t shortcut) const; - void Set(sint32 key); - sint32 GetFromKey(sint32 key); - void GetKeyboardMapScroll(const uint8 * keysState, sint32 * x, sint32 * y) const; + void Set(int32_t key); + int32_t GetFromKey(int32_t key); + void GetKeyboardMapScroll(const uint8_t * keysState, int32_t * x, int32_t * y) const; }; } // namespace Input } // namespace OpenRCT2 /** The current shortcut being changed. */ -extern uint8 gKeyboardShortcutChangeId; +extern uint8_t gKeyboardShortcutChangeId; extern const rct_string_id ShortcutStringIds[SHORTCUT_COUNT]; void keyboard_shortcuts_reset(); bool keyboard_shortcuts_load(); bool keyboard_shortcuts_save(); -void keyboard_shortcuts_set(sint32 key); -sint32 keyboard_shortcuts_get_from_key(sint32 key); -void keyboard_shortcuts_format_string(char * buffer, size_t bufferSize, sint32 shortcut); +void keyboard_shortcuts_set(int32_t key); +int32_t keyboard_shortcuts_get_from_key(int32_t key); +void keyboard_shortcuts_format_string(char * buffer, size_t bufferSize, int32_t shortcut); -void keyboard_shortcut_handle(sint32 key); -void keyboard_shortcut_handle_command(sint32 shortcutIndex); -void keyboard_shortcut_format_string(char *buffer, size_t size, uint16 shortcutKey); +void keyboard_shortcut_handle(int32_t key); +void keyboard_shortcut_handle_command(int32_t shortcutIndex); +void keyboard_shortcut_format_string(char *buffer, size_t size, uint16_t shortcutKey); -void get_keyboard_map_scroll(const uint8 * keysState, sint32 * x, sint32 * y); +void get_keyboard_map_scroll(const uint8_t * keysState, int32_t * x, int32_t * y); diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index 3e4a4f92c1..e80df4c758 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -36,67 +36,67 @@ struct rct_mouse_data { - uint32 x; - uint32 y; - uint32 state; + uint32_t x; + uint32_t y; + uint32_t state; }; static rct_mouse_data _mouseInputQueue[64]; -static uint8 _mouseInputQueueReadIndex = 0; -static uint8 _mouseInputQueueWriteIndex = 0; +static uint8_t _mouseInputQueueReadIndex = 0; +static uint8_t _mouseInputQueueWriteIndex = 0; -static uint32 _ticksSinceDragStart; +static uint32_t _ticksSinceDragStart; static widget_ref _dragWidget; -static uint8 _dragScrollIndex; -static sint32 _originalWindowWidth; -static sint32 _originalWindowHeight; +static uint8_t _dragScrollIndex; +static int32_t _originalWindowWidth; +static int32_t _originalWindowHeight; -static uint8 _currentScrollIndex; -static uint8 _currentScrollArea; +static uint8_t _currentScrollIndex; +static uint8_t _currentScrollArea; -sint32 gInputDragLastX; -sint32 gInputDragLastY; +int32_t gInputDragLastX; +int32_t gInputDragLastY; -uint16 gTooltipTimeout; +uint16_t gTooltipTimeout; widget_ref gTooltipWidget; -sint32 gTooltipCursorX; -sint32 gTooltipCursorY; +int32_t gTooltipCursorX; +int32_t gTooltipCursorY; -static sint16 _clickRepeatTicks; +static int16_t _clickRepeatTicks; -static sint32 game_get_next_input(sint32 * x, sint32 * y); -static void input_widget_over(sint32 x, sint32 y, rct_window * w, rct_widgetindex widgetIndex); +static int32_t game_get_next_input(int32_t * x, int32_t * y); +static void input_widget_over(int32_t x, int32_t y, rct_window * w, rct_widgetindex widgetIndex); static void input_widget_over_change_check(rct_windowclass windowClass, rct_windownumber windowNumber, rct_widgetindex widgetIndex); static void input_widget_over_flatbutton_invalidate(); -void process_mouse_over(sint32 x, sint32 y); -void process_mouse_tool(sint32 x, sint32 y); +void process_mouse_over(int32_t x, int32_t y); +void process_mouse_tool(int32_t x, int32_t y); void invalidate_scroll(); static rct_mouse_data * get_mouse_input(); -void tile_element_right_click(sint32 type, rct_tile_element * tileElement, sint32 x, sint32 y); -static void game_handle_input_mouse(sint32 x, sint32 y, sint32 state); -static void input_widget_left(sint32 x, sint32 y, rct_window * w, rct_widgetindex widgetIndex); -void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetindex widgetIndex, rct_window * w, +void tile_element_right_click(int32_t type, rct_tile_element * tileElement, int32_t x, int32_t y); +static void game_handle_input_mouse(int32_t x, int32_t y, int32_t state); +static void input_widget_left(int32_t x, int32_t y, rct_window * w, rct_widgetindex widgetIndex); +void input_state_widget_pressed(int32_t x, int32_t y, int32_t state, rct_widgetindex widgetIndex, rct_window * w, rct_widget * widget); -void set_cursor(uint8 cursor_id); -static void input_window_position_continue(rct_window * w, sint32 lastX, sint32 lastY, sint32 newX, sint32 newY); -static void input_window_position_end(rct_window * w, sint32 x, sint32 y); -static void input_window_resize_begin(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void input_window_resize_continue(rct_window * w, sint32 x, sint32 y); +void set_cursor(uint8_t cursor_id); +static void input_window_position_continue(rct_window * w, int32_t lastX, int32_t lastY, int32_t newX, int32_t newY); +static void input_window_position_end(rct_window * w, int32_t x, int32_t y); +static void input_window_resize_begin(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void input_window_resize_continue(rct_window * w, int32_t x, int32_t y); static void input_window_resize_end(); static void input_viewport_drag_begin(rct_window * w); static void input_viewport_drag_continue(); static void input_viewport_drag_end(); -static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void input_scroll_continue(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void input_scroll_continue(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void input_scroll_end(); -static void input_scroll_part_update_hthumb(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 scroll_id); -static void input_scroll_part_update_hleft(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id); -static void input_scroll_part_update_hright(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id); -static void input_scroll_part_update_vthumb(rct_window * w, rct_widgetindex widgetIndex, sint32 y, sint32 scroll_id); -static void input_scroll_part_update_vtop(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id); -static void input_scroll_part_update_vbottom(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id); -static void input_update_tooltip(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void input_scroll_part_update_hthumb(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t scroll_id); +static void input_scroll_part_update_hleft(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id); +static void input_scroll_part_update_hright(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id); +static void input_scroll_part_update_vthumb(rct_window * w, rct_widgetindex widgetIndex, int32_t y, int32_t scroll_id); +static void input_scroll_part_update_vtop(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id); +static void input_scroll_part_update_vbottom(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id); +static void input_update_tooltip(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); #pragma region Mouse input @@ -113,7 +113,7 @@ void game_handle_input() invalidate_all_windows_after_input(); - sint32 x, y, state; + int32_t x, y, state; while ((state = game_get_next_input(&x, &y)) != MOUSE_STATE_RELEASED) { game_handle_input_mouse(x, y, state & 0xFF); @@ -125,8 +125,8 @@ void game_handle_input() } else if (x != MONEY32_UNDEFINED) { - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); x = Math::Clamp(0, x, screenWidth - 1); y = Math::Clamp(0, y, screenHeight - 1); @@ -145,7 +145,7 @@ void game_handle_input() * * rct2: 0x006E83C7 */ -static sint32 game_get_next_input(sint32 * x, sint32 * y) +static int32_t game_get_next_input(int32_t * x, int32_t * y) { rct_mouse_data * input = get_mouse_input(); if (input == nullptr) @@ -186,7 +186,7 @@ static rct_mouse_data * get_mouse_input() * * rct2: 0x006E957F */ -static void input_scroll_drag_begin(sint32 x, sint32 y, rct_window * w, rct_widgetindex widgetIndex) +static void input_scroll_drag_begin(int32_t x, int32_t y, rct_window * w, rct_widgetindex widgetIndex) { _inputState = INPUT_STATE_SCROLL_RIGHT; gInputDragLastX = x; @@ -204,41 +204,41 @@ static void input_scroll_drag_begin(sint32 x, sint32 y, rct_window * w, rct_widg * Based on (heavily changed) * rct2: 0x006E9E0E, 0x006E9ED0 */ -static void input_scroll_drag_continue(sint32 x, sint32 y, rct_window * w) +static void input_scroll_drag_continue(int32_t x, int32_t y, rct_window * w) { rct_widgetindex widgetIndex = _dragWidget.widget_index; - uint8 scrollIndex = _dragScrollIndex; + uint8_t scrollIndex = _dragScrollIndex; rct_widget * widget = &w->widgets[widgetIndex]; rct_scroll * scroll = &w->scrolls[scrollIndex]; - sint32 dx, dy; + int32_t dx, dy; dx = x - gInputDragLastX; dy = y - gInputDragLastY; if (scroll->flags & HSCROLLBAR_VISIBLE) { - sint16 size = widget->right - widget->left - 1; + int16_t size = widget->right - widget->left - 1; if (scroll->flags & VSCROLLBAR_VISIBLE) size -= 11; size = std::max(0, scroll->h_right - size); - scroll->h_left = std::min(std::max(0, scroll->h_left + dx), size); + scroll->h_left = std::min(std::max(0, scroll->h_left + dx), size); } if (scroll->flags & VSCROLLBAR_VISIBLE) { - sint16 size = widget->bottom - widget->top - 1; + int16_t size = widget->bottom - widget->top - 1; if (scroll->flags & HSCROLLBAR_VISIBLE) size -= 11; size = std::max(0, scroll->v_bottom - size); - scroll->v_top = std::min(std::max(0, scroll->v_top + dy), size); + scroll->v_top = std::min(std::max(0, scroll->v_top + dy), size); } widget_scroll_update_thumbs(w, widgetIndex); window_invalidate_by_number(w->classification, w->number); - sint32 fixedCursorPositionX = (sint32)std::ceil(gInputDragLastX * gConfigGeneral.window_scale); - sint32 fixedCursorPositionY = (sint32)std::ceil(gInputDragLastY * gConfigGeneral.window_scale); + int32_t fixedCursorPositionX = (int32_t)std::ceil(gInputDragLastX * gConfigGeneral.window_scale); + int32_t fixedCursorPositionY = (int32_t)std::ceil(gInputDragLastY * gConfigGeneral.window_scale); context_set_cursor_position(fixedCursorPositionX, fixedCursorPositionY); } @@ -247,7 +247,7 @@ static void input_scroll_drag_continue(sint32 x, sint32 y, rct_window * w) * * rct2: 0x006E8ACB */ -static void input_scroll_right(sint32 x, sint32 y, sint32 state) +static void input_scroll_right(int32_t x, int32_t y, int32_t state) { rct_window * w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); if (w == nullptr) @@ -278,7 +278,7 @@ static void input_scroll_right(sint32 x, sint32 y, sint32 state) * * rct2: 0x006E8655 */ -static void game_handle_input_mouse(sint32 x, sint32 y, sint32 state) +static void game_handle_input_mouse(int32_t x, int32_t y, int32_t state) { rct_window * w; rct_widget * widget; @@ -453,7 +453,7 @@ static void game_handle_input_mouse(sint32 x, sint32 y, sint32 state) #pragma region Window positioning / resizing -void input_window_position_begin(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void input_window_position_begin(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { _inputState = INPUT_STATE_POSITIONING_WINDOW; gInputDragLastX = x - w->x; @@ -463,15 +463,15 @@ void input_window_position_begin(rct_window * w, rct_widgetindex widgetIndex, si _dragWidget.widget_index = widgetIndex; } -static void input_window_position_continue(rct_window * w, sint32 lastX, sint32 lastY, sint32 newX, sint32 newY) +static void input_window_position_continue(rct_window * w, int32_t lastX, int32_t lastY, int32_t newX, int32_t newY) { - sint32 snapProximity; + int32_t snapProximity; snapProximity = (w->flags & WF_NO_SNAPPING) ? 0 : gConfigGeneral.window_snap_proximity; window_move_and_snap(w, newX - lastX, newY - lastY, snapProximity); } -static void input_window_position_end(rct_window * w, sint32 x, sint32 y) +static void input_window_position_end(rct_window * w, int32_t x, int32_t y) { _inputState = INPUT_STATE_NORMAL; gTooltipTimeout = 0; @@ -479,7 +479,7 @@ static void input_window_position_end(rct_window * w, sint32 x, sint32 y) window_event_moved_call(w, x, y); } -static void input_window_resize_begin(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void input_window_resize_begin(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { _inputState = INPUT_STATE_RESIZING; gInputDragLastX = x; @@ -491,11 +491,11 @@ static void input_window_resize_begin(rct_window * w, rct_widgetindex widgetInde _originalWindowHeight = w->height; } -static void input_window_resize_continue(rct_window * w, sint32 x, sint32 y) +static void input_window_resize_continue(rct_window * w, int32_t x, int32_t y) { - if (y < (sint32)context_get_height() - 2) + if (y < (int32_t)context_get_height() - 2) { - sint32 dx, dy, targetWidth, targetHeight; + int32_t dx, dy, targetWidth, targetHeight; dx = x - gInputDragLastX; dy = y - gInputDragLastY; targetWidth = _originalWindowWidth + dx; @@ -532,7 +532,7 @@ static void input_viewport_drag_begin(rct_window * w) static void input_viewport_drag_continue() { - sint32 dx, dy, newDragX, newDragY; + int32_t dx, dy, newDragX, newDragY; rct_window * w; rct_viewport * viewport; @@ -595,7 +595,7 @@ static void input_viewport_drag_end() #pragma region Scroll bars -static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { rct_widget * widget; @@ -608,7 +608,7 @@ static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, sint gTooltipCursorX = x; gTooltipCursorY = y; - sint32 eax, ebx, scroll_area, scroll_id; + int32_t eax, ebx, scroll_area, scroll_id; scroll_id = 0; // safety widget_scroll_get_part(w, widget, x, y, &eax, &ebx, &scroll_area, &scroll_id); @@ -624,15 +624,15 @@ static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, sint rct_widget * widg = &w->widgets[widgetIndex]; rct_scroll * scroll = &w->scrolls[scroll_id]; - sint32 widget_width = widg->right - widg->left - 1; + int32_t widget_width = widg->right - widg->left - 1; if (scroll->flags & VSCROLLBAR_VISIBLE) widget_width -= 11; - sint32 widget_content_width = std::max(scroll->h_right - widget_width, 0); + int32_t widget_content_width = std::max(scroll->h_right - widget_width, 0); - sint32 widget_height = widg->bottom - widg->top - 1; + int32_t widget_height = widg->bottom - widg->top - 1; if (scroll->flags & HSCROLLBAR_VISIBLE) widget_height -= 11; - sint32 widget_content_height = std::max(scroll->v_bottom - widget_height, 0); + int32_t widget_content_height = std::max(scroll->v_bottom - widget_height, 0); switch (scroll_area) { @@ -667,11 +667,11 @@ static void input_scroll_begin(rct_window * w, rct_widgetindex widgetIndex, sint window_invalidate_by_number(widgetIndex, w->classification); } -static void input_scroll_continue(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void input_scroll_continue(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { rct_widget * widget; - sint32 scroll_part, scroll_id; - sint32 x2, y2; + int32_t scroll_part, scroll_id; + int32_t x2, y2; assert(w != nullptr); @@ -687,7 +687,7 @@ static void input_scroll_continue(rct_window * w, rct_widgetindex widgetIndex, s if (_currentScrollArea == SCROLL_PART_HSCROLLBAR_THUMB) { - sint32 originalTooltipCursorX = gTooltipCursorX; + int32_t originalTooltipCursorX = gTooltipCursorX; gTooltipCursorX = x; input_scroll_part_update_hthumb(w, widgetIndex, x - originalTooltipCursorX, scroll_id); return; @@ -695,7 +695,7 @@ static void input_scroll_continue(rct_window * w, rct_widgetindex widgetIndex, s if (_currentScrollArea == SCROLL_PART_VSCROLLBAR_THUMB) { - sint32 originalTooltipCursorY = gTooltipCursorY; + int32_t originalTooltipCursorY = gTooltipCursorY; gTooltipCursorY = y; input_scroll_part_update_vthumb(w, widgetIndex, y - originalTooltipCursorY, scroll_id); return; @@ -740,13 +740,13 @@ static void input_scroll_end() * * rct2: 0x006E98F2 */ -static void input_scroll_part_update_hthumb(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 scroll_id) +static void input_scroll_part_update_hthumb(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t scroll_id) { rct_widget * widget = &w->widgets[widgetIndex]; if (window_find_by_number(w->classification, w->number)) { - sint32 newLeft; + int32_t newLeft; newLeft = w->scrolls[scroll_id].h_right; newLeft *= x; x = widget->right - widget->left - 21; @@ -778,14 +778,14 @@ static void input_scroll_part_update_hthumb(rct_window * w, rct_widgetindex widg * * rct2: 0x006E99A9 */ -static void input_scroll_part_update_vthumb(rct_window * w, rct_widgetindex widgetIndex, sint32 y, sint32 scroll_id) +static void input_scroll_part_update_vthumb(rct_window * w, rct_widgetindex widgetIndex, int32_t y, int32_t scroll_id) { assert(w != nullptr); rct_widget * widget = &w->widgets[widgetIndex]; if (window_find_by_number(w->classification, w->number)) { - sint32 newTop; + int32_t newTop; newTop = w->scrolls[scroll_id].v_bottom; newTop *= y; y = widget->bottom - widget->top - 21; @@ -817,7 +817,7 @@ static void input_scroll_part_update_vthumb(rct_window * w, rct_widgetindex widg * * rct2: 0x006E9A60 */ -static void input_scroll_part_update_hleft(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id) +static void input_scroll_part_update_hleft(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id) { assert(w != nullptr); if (window_find_by_number(w->classification, w->number)) @@ -834,7 +834,7 @@ static void input_scroll_part_update_hleft(rct_window * w, rct_widgetindex widge * * rct2: 0x006E9ABF */ -static void input_scroll_part_update_hright(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id) +static void input_scroll_part_update_hright(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id) { assert(w != nullptr); rct_widget * widget = &w->widgets[widgetIndex]; @@ -842,7 +842,7 @@ static void input_scroll_part_update_hright(rct_window * w, rct_widgetindex widg { w->scrolls[scroll_id].flags |= HSCROLLBAR_RIGHT_PRESSED; w->scrolls[scroll_id].h_left += 3; - sint32 newLeft = widget->right - widget->left - 1; + int32_t newLeft = widget->right - widget->left - 1; if (w->scrolls[scroll_id].flags & VSCROLLBAR_VISIBLE) newLeft -= 11; newLeft *= -1; @@ -860,7 +860,7 @@ static void input_scroll_part_update_hright(rct_window * w, rct_widgetindex widg * * rct2: 0x006E9C37 */ -static void input_scroll_part_update_vtop(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id) +static void input_scroll_part_update_vtop(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id) { assert(w != nullptr); if (window_find_by_number(w->classification, w->number)) @@ -877,7 +877,7 @@ static void input_scroll_part_update_vtop(rct_window * w, rct_widgetindex widget * * rct2: 0x006E9C96 */ -static void input_scroll_part_update_vbottom(rct_window * w, rct_widgetindex widgetIndex, sint32 scroll_id) +static void input_scroll_part_update_vbottom(rct_window * w, rct_widgetindex widgetIndex, int32_t scroll_id) { assert(w != nullptr); rct_widget * widget = &w->widgets[widgetIndex]; @@ -885,7 +885,7 @@ static void input_scroll_part_update_vbottom(rct_window * w, rct_widgetindex wid { w->scrolls[scroll_id].flags |= VSCROLLBAR_DOWN_PRESSED; w->scrolls[scroll_id].v_top += 3; - sint32 newTop = widget->bottom - widget->top - 1; + int32_t newTop = widget->bottom - widget->top - 1; if (w->scrolls[scroll_id].flags & HSCROLLBAR_VISIBLE) newTop -= 11; newTop *= -1; @@ -907,7 +907,7 @@ static void input_scroll_part_update_vbottom(rct_window * w, rct_widgetindex wid * * rct2: 0x006E9253 */ -static void input_widget_over(sint32 x, sint32 y, rct_window * w, rct_widgetindex widgetIndex) +static void input_widget_over(int32_t x, int32_t y, rct_window * w, rct_widgetindex widgetIndex) { rct_windowclass windowClass = WC_NULL; rct_windownumber windowNumber = 0; @@ -924,7 +924,7 @@ static void input_widget_over(sint32 x, sint32 y, rct_window * w, rct_widgetinde if (w != nullptr && widgetIndex != -1 && widget->type == WWT_SCROLL) { - sint32 eax, ebx, scroll_part, edx; + int32_t eax, ebx, scroll_part, edx; widget_scroll_get_part(w, widget, x, y, &eax, &ebx, &scroll_part, &edx); if (scroll_part != SCROLL_PART_VIEW) @@ -996,7 +996,7 @@ static void input_widget_over_flatbutton_invalidate() * * rct2: 0x006E95F9 */ -static void input_widget_left(sint32 x, sint32 y, rct_window * w, rct_widgetindex widgetIndex) +static void input_widget_left(int32_t x, int32_t y, rct_window * w, rct_widgetindex widgetIndex) { rct_windowclass windowClass = WC_NULL; rct_windownumber windowNumber = 0; @@ -1083,11 +1083,11 @@ static void input_widget_left(sint32 x, sint32 y, rct_window * w, rct_widgetinde * * rct2: 0x006ED833 */ -void process_mouse_over(sint32 x, sint32 y) +void process_mouse_over(int32_t x, int32_t y) { rct_window * window; - sint32 cursorId; + int32_t cursorId; cursorId = CURSOR_ARROW; set_map_tooltip_format_arg(0, rct_string_id, STR_NONE); @@ -1095,7 +1095,7 @@ void process_mouse_over(sint32 x, sint32 y) if (window != nullptr) { - sint32 ebx, edi; + int32_t ebx, edi; rct_window * subWindow; rct_widgetindex widgetId = window_find_widget_from_point(window, x, y); if (widgetId != -1) @@ -1149,8 +1149,8 @@ void process_mouse_over(sint32 x, sint32 y) case WWT_SCROLL: { - sint32 output_scroll_area, scroll_id; - sint32 scroll_x, scroll_y; + int32_t output_scroll_area, scroll_id; + int32_t scroll_x, scroll_y; widget_scroll_get_part(window, &window->widgets[widgetId], x, y, &scroll_x, &scroll_y, &output_scroll_area, &scroll_id); cursorId = scroll_id; @@ -1182,7 +1182,7 @@ void process_mouse_over(sint32 x, sint32 y) * * rct2: 0x006ED801 */ -void process_mouse_tool(sint32 x, sint32 y) +void process_mouse_tool(int32_t x, int32_t y) { if (_inputFlags & INPUT_FLAG_TOOL_ACTIVE) { @@ -1199,7 +1199,7 @@ void process_mouse_tool(sint32 x, sint32 y) * * rct2: 0x006E8DA7 */ -void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetindex widgetIndex, rct_window * w, +void input_state_widget_pressed(int32_t x, int32_t y, int32_t state, rct_widgetindex widgetIndex, rct_window * w, rct_widget * widget) { rct_windowclass cursor_w_class; @@ -1257,7 +1257,7 @@ void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetinde { if (w) { - sint32 dropdown_index = 0; + int32_t dropdown_index = 0; if (w->classification == WC_DROPDOWN) { @@ -1337,7 +1337,7 @@ void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetinde break; { - sint32 mid_point_x = (widget->left + widget->right) / 2 + w->x; + int32_t mid_point_x = (widget->left + widget->right) / 2 + w->x; audio_play_sound(SOUND_CLICK_2, 0, mid_point_x); } if (cursor_w_class != w->classification || cursor_w_number != w->number || widgetIndex != cursor_widgetIndex) @@ -1373,7 +1373,7 @@ void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetinde if (w->classification == WC_DROPDOWN) { - sint32 dropdown_index = dropdown_index_from_point(x, y, w); + int32_t dropdown_index = dropdown_index_from_point(x, y, w); if (dropdown_index == -1) { return; @@ -1442,7 +1442,7 @@ void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetinde } } -static void input_update_tooltip(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void input_update_tooltip(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (gTooltipWidget.window_classification == 255) { @@ -1482,10 +1482,10 @@ static void input_update_tooltip(rct_window * w, rct_widgetindex widgetIndex, si * * rct2: 0x00406CD2 */ -sint32 get_next_key() +int32_t get_next_key() { - uint8 * keysPressed = (uint8 *)context_get_keys_pressed(); - for (sint32 i = 0; i < 221; i++) + uint8_t * keysPressed = (uint8_t *)context_get_keys_pressed(); + for (int32_t i = 0; i < 221; i++) { if (keysPressed[i]) { @@ -1503,7 +1503,7 @@ sint32 get_next_key() * * rct2: 0x006ED990 */ -void set_cursor(uint8 cursor_id) +void set_cursor(uint8_t cursor_id) { if (_inputState == INPUT_STATE_RESIZING) { @@ -1530,10 +1530,10 @@ void invalidate_scroll() /** * rct2: 0x00406C96 */ -void store_mouse_input(sint32 state, sint32 x, sint32 y) +void store_mouse_input(int32_t state, int32_t x, int32_t y) { - uint32 writeIndex = _mouseInputQueueWriteIndex; - uint32 nextWriteIndex = (writeIndex + 1) % Util::CountOf(_mouseInputQueue); + uint32_t writeIndex = _mouseInputQueueWriteIndex; + uint32_t nextWriteIndex = (writeIndex + 1) % Util::CountOf(_mouseInputQueue); // Check if the queue is full if (nextWriteIndex != _mouseInputQueueReadIndex) @@ -1550,7 +1550,7 @@ void store_mouse_input(sint32 state, sint32 x, sint32 y) void game_handle_edge_scroll() { rct_window * mainWindow; - sint32 scrollX, scrollY; + int32_t scrollX, scrollY; mainWindow = window_get_main(); if (mainWindow == nullptr) @@ -1586,23 +1586,23 @@ bool input_test_place_object_modifier(PLACE_OBJECT_MODIFIER modifier) return gInputPlaceObjectModifier & modifier; } -void input_scroll_viewport(sint32 scrollX, sint32 scrollY) +void input_scroll_viewport(int32_t scrollX, int32_t scrollY) { rct_window * mainWindow = window_get_main(); rct_viewport * viewport = mainWindow->viewport; - const sint32 speed = gConfigGeneral.edge_scrolling_speed; + const int32_t speed = gConfigGeneral.edge_scrolling_speed; - sint32 dx = scrollX * (speed << viewport->zoom); - sint32 dy = scrollY * (speed << viewport->zoom); + int32_t dx = scrollX * (speed << viewport->zoom); + int32_t dy = scrollY * (speed << viewport->zoom); if (scrollX != 0) { // Speed up scrolling horizontally when at the edge of the map // so that the speed is consistent with vertical edge scrolling. - sint32 x = mainWindow->saved_view_x + viewport->view_width / 2 + dx; - sint32 y = mainWindow->saved_view_y + viewport->view_height / 2; - sint32 y_dy = mainWindow->saved_view_y + viewport->view_height / 2 + dy; + int32_t x = mainWindow->saved_view_x + viewport->view_width / 2 + dx; + int32_t y = mainWindow->saved_view_y + viewport->view_height / 2; + int32_t y_dy = mainWindow->saved_view_y + viewport->view_height / 2 + dy; LocationXY16 mapCoord, mapCoord_dy; mapCoord = viewport_coord_to_map_coord(x, y, 0); @@ -1610,8 +1610,8 @@ void input_scroll_viewport(sint32 scrollX, sint32 scrollY) // Check if we're crossing the boundary // Clamp to the map minimum value - sint32 at_map_edge = 0; - sint32 at_map_edge_dy = 0; + int32_t at_map_edge = 0; + int32_t at_map_edge_dy = 0; if (mapCoord.x < MAP_MINIMUM_X_Y || mapCoord.y < MAP_MINIMUM_X_Y) { at_map_edge = 1; diff --git a/src/openrct2-ui/interface/Dropdown.h b/src/openrct2-ui/interface/Dropdown.h index 084ea0b56d..048e40b558 100644 --- a/src/openrct2-ui/interface/Dropdown.h +++ b/src/openrct2-ui/interface/Dropdown.h @@ -23,25 +23,25 @@ enum DROPDOWN_FLAG_STAY_OPEN = (1 << 7) }; -extern sint32 gAppropriateImageDropdownItemsPerRow[]; +extern int32_t gAppropriateImageDropdownItemsPerRow[]; -extern sint32 gDropdownNumItems; +extern int32_t gDropdownNumItems; extern rct_string_id gDropdownItemsFormat[DROPDOWN_ITEMS_MAX_SIZE]; -extern sint64 gDropdownItemsArgs[DROPDOWN_ITEMS_MAX_SIZE]; +extern int64_t gDropdownItemsArgs[DROPDOWN_ITEMS_MAX_SIZE]; extern bool gDropdownIsColour; -extern sint32 gDropdownLastColourHover; -extern sint32 gDropdownHighlightedIndex; -extern sint32 gDropdownDefaultIndex; +extern int32_t gDropdownLastColourHover; +extern int32_t gDropdownHighlightedIndex; +extern int32_t gDropdownDefaultIndex; -bool dropdown_is_checked(sint32 index); -bool dropdown_is_disabled(sint32 index); -void dropdown_set_checked(sint32 index, bool value); -void dropdown_set_disabled(sint32 index, bool value); +bool dropdown_is_checked(int32_t index); +bool dropdown_is_disabled(int32_t index); +void dropdown_set_checked(int32_t index, bool value); +void dropdown_set_disabled(int32_t index, bool value); -void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items); -void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 custom_height, uint8 flags, size_t num_items, sint32 width); -void window_dropdown_show_image(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 numItems, sint32 itemWidth, sint32 itemHeight, sint32 numColumns); +void window_dropdown_show_text(int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, size_t num_items); +void window_dropdown_show_text_custom_width(int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t custom_height, uint8_t flags, size_t num_items, int32_t width); +void window_dropdown_show_image(int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, int32_t numItems, int32_t itemWidth, int32_t itemHeight, int32_t numColumns); void window_dropdown_close(); -sint32 dropdown_index_from_point(sint32 x, sint32 y, rct_window* w); -void window_dropdown_show_colour(rct_window *w, rct_widget *widget, uint8 dropdownColour, uint8 selectedColour); -void window_dropdown_show_colour_available(rct_window *w, rct_widget *widget, uint8 dropdownColour, uint8 selectedColour, uint32 availableColours); +int32_t dropdown_index_from_point(int32_t x, int32_t y, rct_window* w); +void window_dropdown_show_colour(rct_window *w, rct_widget *widget, uint8_t dropdownColour, uint8_t selectedColour); +void window_dropdown_show_colour_available(rct_window *w, rct_widget *widget, uint8_t dropdownColour, uint8_t selectedColour, uint32_t availableColours); diff --git a/src/openrct2-ui/interface/Graph.cpp b/src/openrct2-ui/interface/Graph.cpp index 3f0a119a03..bb7eb4b3f5 100644 --- a/src/openrct2-ui/interface/Graph.cpp +++ b/src/openrct2-ui/interface/Graph.cpp @@ -11,9 +11,9 @@ #include #include -static void graph_draw_months_uint8(rct_drawpixelinfo * dpi, const uint8 * history, sint32 count, sint32 baseX, sint32 baseY) +static void graph_draw_months_uint8_t(rct_drawpixelinfo * dpi, const uint8_t * history, int32_t count, int32_t baseX, int32_t baseY) { - sint32 i, x, y, yearOver32, currentMonth, currentDay; + int32_t i, x, y, yearOver32, currentMonth, currentDay; currentMonth = date_get_month(gDateMonthsElapsed); currentDay = gDateMonthTicks; @@ -25,7 +25,7 @@ static void graph_draw_months_uint8(rct_drawpixelinfo * dpi, const uint8 * histo if (history[i] != 255 && yearOver32 % 4 == 0) { // Draw month text - set_format_arg(0, uint32, DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]); + set_format_arg(0, uint32_t, DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]); gfx_draw_string_centred(dpi, STR_GRAPH_LABEL, x, y - 10, COLOUR_BLACK, gCommonFormatArgs); // Draw month mark @@ -37,9 +37,9 @@ static void graph_draw_months_uint8(rct_drawpixelinfo * dpi, const uint8 * histo } } -static void graph_draw_line_a_uint8(rct_drawpixelinfo * dpi, const uint8 * history, sint32 count, sint32 baseX, sint32 baseY) +static void graph_draw_line_a_uint8_t(rct_drawpixelinfo * dpi, const uint8_t * history, int32_t count, int32_t baseX, int32_t baseY) { - sint32 i, x, y, lastX, lastY; + int32_t i, x, y, lastX, lastY; lastX = -1; lastY = -1; x = baseX; @@ -64,9 +64,9 @@ static void graph_draw_line_a_uint8(rct_drawpixelinfo * dpi, const uint8 * histo } } -static void graph_draw_line_b_uint8(rct_drawpixelinfo * dpi, const uint8 * history, sint32 count, sint32 baseX, sint32 baseY) +static void graph_draw_line_b_uint8_t(rct_drawpixelinfo * dpi, const uint8_t * history, int32_t count, int32_t baseX, int32_t baseY) { - sint32 i, x, y, lastX, lastY; + int32_t i, x, y, lastX, lastY; lastX = -1; lastY = -1; @@ -89,16 +89,16 @@ static void graph_draw_line_b_uint8(rct_drawpixelinfo * dpi, const uint8 * histo } } -void graph_draw_uint8(rct_drawpixelinfo * dpi, uint8 * history, sint32 count, sint32 baseX, sint32 baseY) +void graph_draw_uint8_t(rct_drawpixelinfo * dpi, uint8_t * history, int32_t count, int32_t baseX, int32_t baseY) { - graph_draw_months_uint8(dpi, history, count, baseX, baseY); - graph_draw_line_a_uint8(dpi, history, count, baseX, baseY); - graph_draw_line_b_uint8(dpi, history, count, baseX, baseY); + graph_draw_months_uint8_t(dpi, history, count, baseX, baseY); + graph_draw_line_a_uint8_t(dpi, history, count, baseX, baseY); + graph_draw_line_b_uint8_t(dpi, history, count, baseX, baseY); } -static void graph_draw_months_money32(rct_drawpixelinfo *dpi, const money32 *history, sint32 count, sint32 baseX, sint32 baseY) +static void graph_draw_months_money32(rct_drawpixelinfo *dpi, const money32 *history, int32_t count, int32_t baseX, int32_t baseY) { - sint32 i, x, y, yearOver32, currentMonth, currentDay; + int32_t i, x, y, yearOver32, currentMonth, currentDay; currentMonth = date_get_month(gDateMonthsElapsed); currentDay = gDateMonthTicks; @@ -108,7 +108,7 @@ static void graph_draw_months_money32(rct_drawpixelinfo *dpi, const money32 *his for (i = count - 1; i >= 0; i--) { if (history[i] != MONEY32_UNDEFINED && yearOver32 % 4 == 0) { // Draw month text - sint32 monthFormat = DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]; + int32_t monthFormat = DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]; gfx_draw_string_centred(dpi, STR_GRAPH_LABEL, x, y - 10, COLOUR_BLACK, &monthFormat); // Draw month mark @@ -120,9 +120,9 @@ static void graph_draw_months_money32(rct_drawpixelinfo *dpi, const money32 *his } } -static void graph_draw_line_a_money32(rct_drawpixelinfo *dpi, const money32 *history, sint32 count, sint32 baseX, sint32 baseY, sint32 modifier, sint32 offset) +static void graph_draw_line_a_money32(rct_drawpixelinfo *dpi, const money32 *history, int32_t count, int32_t baseX, int32_t baseY, int32_t modifier, int32_t offset) { - sint32 i, x, y, lastX, lastY; + int32_t i, x, y, lastX, lastY; lastX = -1; lastY = -1; x = baseX; @@ -144,9 +144,9 @@ static void graph_draw_line_a_money32(rct_drawpixelinfo *dpi, const money32 *his } } -static void graph_draw_line_b_money32(rct_drawpixelinfo *dpi, const money32 *history, sint32 count, sint32 baseX, sint32 baseY, sint32 modifier, sint32 offset) +static void graph_draw_line_b_money32(rct_drawpixelinfo *dpi, const money32 *history, int32_t count, int32_t baseX, int32_t baseY, int32_t modifier, int32_t offset) { - sint32 i, x, y, lastX, lastY; + int32_t i, x, y, lastX, lastY; lastX = -1; lastY = -1; @@ -167,7 +167,7 @@ static void graph_draw_line_b_money32(rct_drawpixelinfo *dpi, const money32 *his } } -void graph_draw_money32(rct_drawpixelinfo *dpi, money32 *history, sint32 count, sint32 baseX, sint32 baseY, sint32 modifier, sint32 offset) +void graph_draw_money32(rct_drawpixelinfo *dpi, money32 *history, int32_t count, int32_t baseX, int32_t baseY, int32_t modifier, int32_t offset) { graph_draw_months_money32(dpi, history, count, baseX, baseY); graph_draw_line_a_money32(dpi, history, count, baseX, baseY, modifier, offset); diff --git a/src/openrct2-ui/interface/Graph.h b/src/openrct2-ui/interface/Graph.h index 84ac8532d2..19ec6b8c35 100644 --- a/src/openrct2-ui/interface/Graph.h +++ b/src/openrct2-ui/interface/Graph.h @@ -13,7 +13,7 @@ #include #include -void graph_draw_uint8(rct_drawpixelinfo *dpi, uint8 *history, sint32 count, sint32 baseX, sint32 baseY); -void graph_draw_money32(rct_drawpixelinfo *dpi, money32 *history, sint32 count, sint32 baseX, sint32 baseY, sint32 modifier, sint32 offset); +void graph_draw_uint8_t(rct_drawpixelinfo *dpi, uint8_t *history, int32_t count, int32_t baseX, int32_t baseY); +void graph_draw_money32(rct_drawpixelinfo *dpi, money32 *history, int32_t count, int32_t baseX, int32_t baseY, int32_t modifier, int32_t offset); #endif diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index 3537418417..98ae3a3cb2 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -82,13 +82,13 @@ void InGameConsole::Input(CONSOLE_INPUT input) break; case CONSOLE_INPUT_SCROLL_PREVIOUS: { - sint32 scrollAmt = GetNumVisibleLines() - 1; + int32_t scrollAmt = GetNumVisibleLines() - 1; Scroll(scrollAmt); break; } case CONSOLE_INPUT_SCROLL_NEXT: { - sint32 scrollAmt = GetNumVisibleLines() - 1; + int32_t scrollAmt = GetNumVisibleLines() - 1; Scroll(-scrollAmt); break; } @@ -108,7 +108,7 @@ void InGameConsole::ClearInput() void InGameConsole::HistoryAdd(const utf8 * src) { if (_consoleHistoryCount >= CONSOLE_HISTORY_SIZE) { - for (sint32 i = 0; i < _consoleHistoryCount - 1; i++) + for (int32_t i = 0; i < _consoleHistoryCount - 1; i++) memcpy(_consoleHistory[i], _consoleHistory[i + 1], CONSOLE_INPUT_SIZE); _consoleHistoryCount--; } @@ -118,7 +118,7 @@ void InGameConsole::HistoryAdd(const utf8 * src) void InGameConsole::ScrollToEnd() { - _consoleScrollPos = std::max(0, (sint32)_consoleLines.size() - GetNumVisibleLines()); + _consoleScrollPos = std::max(0, (int32_t)_consoleLines.size() - GetNumVisibleLines()); } void InGameConsole::RefreshCaret() @@ -126,14 +126,14 @@ void InGameConsole::RefreshCaret() _consoleCaretTicks = 0; } -void InGameConsole::Scroll(sint32 linesToScroll) +void InGameConsole::Scroll(int32_t linesToScroll) { - const sint32 maxVisibleLines = GetNumVisibleLines(); - const sint32 numLines = (sint32)_consoleLines.size(); + const int32_t maxVisibleLines = GetNumVisibleLines(); + const int32_t numLines = (int32_t)_consoleLines.size(); if (numLines > maxVisibleLines) { - sint32 maxScrollValue = numLines - maxVisibleLines; - _consoleScrollPos = Math::Clamp(0, _consoleScrollPos - linesToScroll, maxScrollValue); + int32_t maxScrollValue = numLines - maxVisibleLines; + _consoleScrollPos = Math::Clamp(0, _consoleScrollPos - linesToScroll, maxScrollValue); } } @@ -182,7 +182,7 @@ void InGameConsole::Toggle() } } -void InGameConsole::WriteLine(const std::string &input, uint32 colourFormat) +void InGameConsole::WriteLine(const std::string &input, uint32_t colourFormat) { // Include text colour format only for special cases // The draw function handles the default text colour differently @@ -251,9 +251,9 @@ void InGameConsole::Draw(rct_drawpixelinfo * dpi) const // Set font gCurrentFontSpriteBase = (gConfigInterface.console_small_font ? FONT_SPRITE_BASE_SMALL : FONT_SPRITE_BASE_MEDIUM); gCurrentFontFlags = 0; - uint8 textColour = NOT_TRANSLUCENT(theme_get_colour(WC_CONSOLE, 1)); - const sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); - const sint32 maxLines = GetNumVisibleLines(); + uint8_t textColour = NOT_TRANSLUCENT(theme_get_colour(WC_CONSOLE, 1)); + const int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); + const int32_t maxLines = GetNumVisibleLines(); // This is something of a hack to ensure the text is actually black // as opposed to a desaturated grey @@ -280,13 +280,13 @@ void InGameConsole::Draw(rct_drawpixelinfo * dpi) const gfx_filter_rect(dpi, _consoleLeft, _consoleBottom - lineHeight - 10, _consoleRight, _consoleBottom - 1, PALETTE_51); // Paint background colour. - uint8 backgroundColour = theme_get_colour(WC_CONSOLE, 0); + uint8_t backgroundColour = theme_get_colour(WC_CONSOLE, 0); gfx_fill_rect_inset(dpi, _consoleLeft, _consoleTop, _consoleRight, _consoleBottom, backgroundColour, INSET_RECT_FLAG_FILL_NONE); gfx_fill_rect_inset(dpi, _consoleLeft + 1, _consoleTop + 1, _consoleRight - 1, _consoleBottom - 1, backgroundColour, INSET_RECT_FLAG_BORDER_INSET); std::string lineBuffer; - sint32 x = _consoleLeft + CONSOLE_EDGE_PADDING; - sint32 y = _consoleTop + CONSOLE_EDGE_PADDING; + int32_t x = _consoleLeft + CONSOLE_EDGE_PADDING; + int32_t y = _consoleTop + CONSOLE_EDGE_PADDING; // Draw text inside console for (std::size_t i = 0; i < _consoleLines.size() && i < (size_t)maxLines; i++) { @@ -304,16 +304,16 @@ void InGameConsole::Draw(rct_drawpixelinfo * dpi) const // Draw caret if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD) { - sint32 caretX = x + gfx_get_string_width(_consoleCurrentLine); - sint32 caretY = y + lineHeight; + int32_t caretX = x + gfx_get_string_width(_consoleCurrentLine); + int32_t caretY = y + lineHeight; - uint8 caretColour = ColourMapA[BASE_COLOUR(textColour)].lightest; + uint8_t caretColour = ColourMapA[BASE_COLOUR(textColour)].lightest; gfx_fill_rect(dpi, caretX, caretY, caretX + CONSOLE_CARET_WIDTH, caretY, caretColour); } // What about border colours? - uint8 borderColour1 = ColourMapA[BASE_COLOUR(backgroundColour)].light; - uint8 borderColour2 = ColourMapA[BASE_COLOUR(backgroundColour)].mid_dark; + uint8_t borderColour1 = ColourMapA[BASE_COLOUR(backgroundColour)].light; + uint8_t borderColour2 = ColourMapA[BASE_COLOUR(backgroundColour)].mid_dark; // Input area top border gfx_fill_rect(dpi, _consoleLeft, _consoleBottom - lineHeight - 11, _consoleRight, _consoleBottom - lineHeight - 11, borderColour1); @@ -325,10 +325,10 @@ void InGameConsole::Draw(rct_drawpixelinfo * dpi) const } // Calculates the amount of visible lines, based on the console size, excluding the input line. -sint32 InGameConsole::GetNumVisibleLines() const +int32_t InGameConsole::GetNumVisibleLines() const { - const sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); - const sint32 consoleHeight = _consoleBottom - _consoleTop; - const sint32 drawableHeight = consoleHeight - 2 * lineHeight - 4; // input line, separator - padding + const int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); + const int32_t consoleHeight = _consoleBottom - _consoleTop; + const int32_t drawableHeight = consoleHeight - 2 * lineHeight - 4; // input line, separator - padding return drawableHeight / lineHeight; } diff --git a/src/openrct2-ui/interface/InGameConsole.h b/src/openrct2-ui/interface/InGameConsole.h index 019c5f3260..a81563341c 100644 --- a/src/openrct2-ui/interface/InGameConsole.h +++ b/src/openrct2-ui/interface/InGameConsole.h @@ -16,24 +16,24 @@ namespace OpenRCT2::Ui class InGameConsole final : public InteractiveConsole { private: - static constexpr sint32 CONSOLE_MAX_LINES = 300; - static constexpr sint32 CONSOLE_HISTORY_SIZE = 64; - static constexpr sint32 CONSOLE_INPUT_SIZE = 256; - static constexpr sint32 CONSOLE_CARET_FLASH_THRESHOLD = 15; - static constexpr sint32 CONSOLE_EDGE_PADDING = 4; - static constexpr sint32 CONSOLE_CARET_WIDTH = 6; + static constexpr int32_t CONSOLE_MAX_LINES = 300; + static constexpr int32_t CONSOLE_HISTORY_SIZE = 64; + static constexpr int32_t CONSOLE_INPUT_SIZE = 256; + static constexpr int32_t CONSOLE_CARET_FLASH_THRESHOLD = 15; + static constexpr int32_t CONSOLE_EDGE_PADDING = 4; + static constexpr int32_t CONSOLE_CARET_WIDTH = 6; bool _isOpen = false; - sint32 _consoleLeft, _consoleTop, _consoleRight, _consoleBottom; - sint32 _lastMainViewportX, _lastMainViewportY; + int32_t _consoleLeft, _consoleTop, _consoleRight, _consoleBottom; + int32_t _lastMainViewportX, _lastMainViewportY; std::deque _consoleLines; utf8 _consoleCurrentLine[CONSOLE_INPUT_SIZE] = {}; - sint32 _consoleCaretTicks; - sint32 _consoleScrollPos = 0; + int32_t _consoleCaretTicks; + int32_t _consoleScrollPos = 0; TextInputSession * _consoleTextInputSession; utf8 _consoleHistory[CONSOLE_HISTORY_SIZE][CONSOLE_INPUT_SIZE]; - sint32 _consoleHistoryIndex = 0; - sint32 _consoleHistoryCount = 0; + int32_t _consoleHistoryIndex = 0; + int32_t _consoleHistoryCount = 0; public: InGameConsole(); @@ -46,11 +46,11 @@ namespace OpenRCT2::Ui void Close() override; void Hide() override; void Toggle(); - void WriteLine(const std::string &s, uint32 colourFormat) override; + void WriteLine(const std::string &s, uint32_t colourFormat) override; void Input(CONSOLE_INPUT input); void RefreshCaret(); - void Scroll(sint32 linesToScroll); + void Scroll(int32_t linesToScroll); void Update(); void Draw(rct_drawpixelinfo * dpi) const; @@ -62,6 +62,6 @@ namespace OpenRCT2::Ui void WritePrompt(); void ScrollToEnd(); void Invalidate() const; - sint32 GetNumVisibleLines() const; + int32_t GetNumVisibleLines() const; }; } // namespace OpenRCT2::Ui diff --git a/src/openrct2-ui/interface/LandTool.cpp b/src/openrct2-ui/interface/LandTool.cpp index a85ab6f24a..da9b7574c7 100644 --- a/src/openrct2-ui/interface/LandTool.cpp +++ b/src/openrct2-ui/interface/LandTool.cpp @@ -17,7 +17,7 @@ #include // clang-format off -static uint16 toolSizeSpriteIndices[] = +static uint16_t toolSizeSpriteIndices[] = { SPR_LAND_TOOL_SIZE_0, SPR_LAND_TOOL_SIZE_1, @@ -29,14 +29,14 @@ static uint16 toolSizeSpriteIndices[] = SPR_LAND_TOOL_SIZE_7, }; -static uint32 FloorTextureOrder[] = +static uint32_t FloorTextureOrder[] = { TERRAIN_SAND_DARK, TERRAIN_SAND_LIGHT, TERRAIN_DIRT, TERRAIN_GRASS_CLUMPS, TERRAIN_GRASS, TERRAIN_ROCK, TERRAIN_SAND, TERRAIN_MARTIAN, TERRAIN_CHECKERBOARD, TERRAIN_ICE, TERRAIN_GRID_RED, TERRAIN_GRID_YELLOW, TERRAIN_GRID_BLUE, TERRAIN_GRID_GREEN }; -uint32 WallTextureOrder[] = +uint32_t WallTextureOrder[] = { TERRAIN_EDGE_ROCK, TERRAIN_EDGE_WOOD_RED, TERRAIN_EDGE_WOOD_BLACK, TERRAIN_EDGE_ICE, TERRAIN_EDGE_BRICK, TERRAIN_EDGE_GREY, TERRAIN_EDGE_YELLOW, TERRAIN_EDGE_RED, TERRAIN_EDGE_PURPLE, TERRAIN_EDGE_GREEN, @@ -44,7 +44,7 @@ uint32 WallTextureOrder[] = 0, 0 }; -uint32 WallTexturePreviews[] = +uint32_t WallTexturePreviews[] = { SPR_WALL_TEXTURE_ROCK, SPR_WALL_TEXTURE_WOOD_RED, @@ -64,15 +64,15 @@ uint32 WallTexturePreviews[] = }; // clang-format on -uint16 gLandToolSize; +uint16_t gLandToolSize; money32 gLandToolRaiseCost; money32 gLandToolLowerCost; -uint8 gLandToolTerrainSurface; -uint8 gLandToolTerrainEdge; +uint8_t gLandToolTerrainSurface; +uint8_t gLandToolTerrainEdge; money32 gWaterToolRaiseCost; money32 gWaterToolLowerCost; -uint32 land_tool_size_to_sprite_index(uint16 size) +uint32_t land_tool_size_to_sprite_index(uint16_t size) { if (size <= MAX_TOOL_SIZE_WITH_SPRITE) { @@ -84,11 +84,11 @@ uint32 land_tool_size_to_sprite_index(uint16 size) } } -void land_tool_show_surface_style_dropdown(rct_window * w, rct_widget * widget, uint8 currentSurfaceType) +void land_tool_show_surface_style_dropdown(rct_window * w, rct_widget * widget, uint8_t currentSurfaceType) { - uint8 defaultIndex = 0; + uint8_t defaultIndex = 0; - for (uint8 i = 0; i < TERRAIN_COUNT_REGULAR; i++) + for (uint8_t i = 0; i < TERRAIN_COUNT_REGULAR; i++) { gDropdownItemsFormat[i] = DROPDOWN_FORMAT_LAND_PICKER; gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i]; @@ -111,13 +111,13 @@ void land_tool_show_surface_style_dropdown(rct_window * w, rct_widget * widget, gDropdownDefaultIndex = defaultIndex; } -void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uint8 currentEdgeType) +void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uint8_t currentEdgeType) { - uint8 defaultIndex = 0; + uint8_t defaultIndex = 0; // Do not show RCT1 edge styles if the player does not have RCT1. - const uint8 edgeCount = is_csg_loaded() ? TERRAIN_EDGE_COUNT : TERRAIN_EDGE_RCT2_COUNT; + const uint8_t edgeCount = is_csg_loaded() ? TERRAIN_EDGE_COUNT : TERRAIN_EDGE_RCT2_COUNT; - for (uint8 i = 0; i < edgeCount; i++) { + for (uint8_t i = 0; i < edgeCount; i++) { gDropdownItemsFormat[i] = DROPDOWN_FORMAT_LAND_PICKER; gDropdownItemsArgs[i] = WallTexturePreviews[WallTextureOrder[i]]; if (WallTextureOrder[i] == currentEdgeType) diff --git a/src/openrct2-ui/interface/LandTool.h b/src/openrct2-ui/interface/LandTool.h index b06b98b8b4..1d4b0cd616 100644 --- a/src/openrct2-ui/interface/LandTool.h +++ b/src/openrct2-ui/interface/LandTool.h @@ -18,17 +18,17 @@ // The highest tool size to have a sprite. Bigger tool sizes simply display a number. #define MAX_TOOL_SIZE_WITH_SPRITE 7 -extern uint16 gLandToolSize; +extern uint16_t gLandToolSize; extern money32 gLandToolRaiseCost; extern money32 gLandToolLowerCost; -extern uint8 gLandToolTerrainSurface; -extern uint8 gLandToolTerrainEdge; +extern uint8_t gLandToolTerrainSurface; +extern uint8_t gLandToolTerrainEdge; extern money32 gWaterToolRaiseCost; extern money32 gWaterToolLowerCost; -extern uint32 WallTextureOrder[]; -extern uint32 WallTexturePreviews[]; +extern uint32_t WallTextureOrder[]; +extern uint32_t WallTexturePreviews[]; -uint32 land_tool_size_to_sprite_index(uint16 size); -void land_tool_show_surface_style_dropdown(rct_window * w, rct_widget * widget, uint8 currentSurfaceType); -void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uint8 currentEdgeType); +uint32_t land_tool_size_to_sprite_index(uint16_t size); +void land_tool_show_surface_style_dropdown(rct_window * w, rct_widget * widget, uint8_t currentSurfaceType); +void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uint8_t currentEdgeType); diff --git a/src/openrct2-ui/interface/Theme.cpp b/src/openrct2-ui/interface/Theme.cpp index bfa9878bfe..0412cca9d6 100644 --- a/src/openrct2-ui/interface/Theme.cpp +++ b/src/openrct2-ui/interface/Theme.cpp @@ -65,7 +65,7 @@ class UITheme public: std::string Name; std::vector Entries; - uint8 Flags = 0; + uint8_t Flags = 0; explicit UITheme(const std::string &name) : Name(name) @@ -81,7 +81,7 @@ public: static UITheme * FromJson(const json_t * json); static UITheme * FromFile(const std::string &path); - static UITheme CreatePredefined(const std::string &name, const UIThemeWindowEntry * entries, uint8 flags); + static UITheme CreatePredefined(const std::string &name, const UIThemeWindowEntry * entries, uint8_t flags); }; /** @@ -92,7 +92,7 @@ struct WindowThemeDesc rct_windowclass WindowClass; const utf8 * WindowClassSZ; rct_string_id WindowName; - uint8 NumColours; + uint8_t NumColours; WindowTheme DefaultTheme; }; @@ -274,7 +274,7 @@ json_t * UIThemeWindowEntry::ToJson() const } json_t * jsonColours = json_array(); - for (uint8 i = 0; i < wtDesc->NumColours; i++) { + for (uint8_t i = 0; i < wtDesc->NumColours; i++) { colour_t colour = Theme.Colours[i]; json_array_append_new(jsonColours, json_integer(colour)); } @@ -293,14 +293,14 @@ UIThemeWindowEntry UIThemeWindowEntry::FromJson(const WindowThemeDesc * wtDesc, ThrowThemeLoadException(); } - uint8 numColours = (uint8)json_array_size(jsonColours); + uint8_t numColours = (uint8_t)json_array_size(jsonColours); numColours = std::min(numColours, wtDesc->NumColours); UIThemeWindowEntry result { }; result.WindowClass = wtDesc->WindowClass; result.Theme = wtDesc->DefaultTheme; - for (uint8 i = 0; i < numColours; i++) + for (uint8_t i = 0; i < numColours; i++) { result.Theme.Colours[i] = (colour_t)json_integer_value(json_array_get(jsonColours, i)); } @@ -472,7 +472,7 @@ UITheme * UITheme::FromFile(const std::string &path) return result; } -UITheme UITheme::CreatePredefined(const std::string &name, const UIThemeWindowEntry * entries, uint8 flags) +UITheme UITheme::CreatePredefined(const std::string &name, const UIThemeWindowEntry * entries, uint8_t flags) { auto theme = UITheme(name); theme.Flags = flags | UITHEME_FLAG_PREDEFINED; @@ -719,7 +719,7 @@ size_t theme_get_index_for_name(const utf8 * name) return SIZE_MAX; } -uint8 theme_get_colour(rct_windowclass wc, uint8 index) +uint8_t theme_get_colour(rct_windowclass wc, uint8_t index) { const UIThemeWindowEntry * entry = ThemeManager::CurrentTheme->GetEntry(wc); if (entry == nullptr) @@ -737,7 +737,7 @@ uint8 theme_get_colour(rct_windowclass wc, uint8 index) } } -void theme_set_colour(rct_windowclass wc, uint8 index, colour_t colour) +void theme_set_colour(rct_windowclass wc, uint8_t index, colour_t colour) { UIThemeWindowEntry entry { }; entry.WindowClass = wc; @@ -763,12 +763,12 @@ void theme_set_colour(rct_windowclass wc, uint8 index, colour_t colour) theme_save(); } -uint8 theme_get_flags() +uint8_t theme_get_flags() { return ThemeManager::CurrentTheme->Flags; } -void theme_set_flags(uint8 flags) +void theme_set_flags(uint8_t flags) { ThemeManager::CurrentTheme->Flags = flags; theme_save(); @@ -843,7 +843,7 @@ void theme_manager_initialise() ThemeManager::Initialise(); } -uint8 theme_desc_get_num_colours(rct_windowclass wc) +uint8_t theme_desc_get_num_colours(rct_windowclass wc) { const WindowThemeDesc * desc = GetWindowThemeDescriptor(wc); if (desc == nullptr) @@ -897,7 +897,7 @@ void colour_scheme_update_by_class(rct_window * window, rct_windowclass classifi windowTheme = &desc->DefaultTheme; } - for (sint32 i = 0; i < 6; i++) { + for (int32_t i = 0; i < 6; i++) { window->colours[i] = windowTheme->Colours[i]; } // Some windows need to be transparent even if the colours aren't. diff --git a/src/openrct2-ui/interface/Theme.h b/src/openrct2-ui/interface/Theme.h index d8ffb92c85..d3d587baab 100644 --- a/src/openrct2-ui/interface/Theme.h +++ b/src/openrct2-ui/interface/Theme.h @@ -34,14 +34,14 @@ size_t theme_manager_get_active_available_theme_index(); void theme_manager_set_active_available_theme(size_t index); size_t theme_get_index_for_name(const utf8 * name); -colour_t theme_get_colour(rct_windowclass wc, uint8 index); -void theme_set_colour(rct_windowclass wc, uint8 index, colour_t colour); -uint8 theme_get_flags(); -void theme_set_flags(uint8 flags); +colour_t theme_get_colour(rct_windowclass wc, uint8_t index); +void theme_set_colour(rct_windowclass wc, uint8_t index, colour_t colour); +uint8_t theme_get_flags(); +void theme_set_flags(uint8_t flags); void theme_save(); void theme_rename(const utf8 * name); void theme_duplicate(const utf8 * name); void theme_delete(); -uint8 theme_desc_get_num_colours(rct_windowclass wc); +uint8_t theme_desc_get_num_colours(rct_windowclass wc); rct_string_id theme_desc_get_name(rct_windowclass wc); diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 32f48dbdd2..8d5cd2c18d 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -32,19 +32,19 @@ #include "Viewport.h" #include "Window.h" -static void viewport_interaction_remove_scenery(rct_tile_element *tileElement, sint32 x, sint32 y); -static void viewport_interaction_remove_footpath(rct_tile_element *tileElement, sint32 x, sint32 y); -static void viewport_interaction_remove_footpath_item(rct_tile_element *tileElement, sint32 x, sint32 y); -static void viewport_interaction_remove_park_wall(rct_tile_element *tileElement, sint32 x, sint32 y); -static void viewport_interaction_remove_large_scenery(rct_tile_element *tileElement, sint32 x, sint32 y); -static void viewport_interaction_remove_park_entrance(rct_tile_element *tileElement, sint32 x, sint32 y); -static rct_peep *viewport_interaction_get_closest_peep(sint32 x, sint32 y, sint32 maxDistance); +static void viewport_interaction_remove_scenery(rct_tile_element *tileElement, int32_t x, int32_t y); +static void viewport_interaction_remove_footpath(rct_tile_element *tileElement, int32_t x, int32_t y); +static void viewport_interaction_remove_footpath_item(rct_tile_element *tileElement, int32_t x, int32_t y); +static void viewport_interaction_remove_park_wall(rct_tile_element *tileElement, int32_t x, int32_t y); +static void viewport_interaction_remove_large_scenery(rct_tile_element *tileElement, int32_t x, int32_t y); +static void viewport_interaction_remove_park_entrance(rct_tile_element *tileElement, int32_t x, int32_t y); +static rct_peep *viewport_interaction_get_closest_peep(int32_t x, int32_t y, int32_t maxDistance); /** * * rct2: 0x006ED9D0 */ -sint32 viewport_interaction_get_item_left(sint32 x, sint32 y, viewport_interaction_info *info) +int32_t viewport_interaction_get_item_left(int32_t x, int32_t y, viewport_interaction_info *info) { rct_tile_element *tileElement; rct_sprite *sprite; @@ -85,7 +85,7 @@ sint32 viewport_interaction_get_item_left(sint32 x, sint32 y, viewport_interacti break; case VIEWPORT_INTERACTION_ITEM_PARK: set_map_tooltip_format_arg(0, rct_string_id, gParkName); - set_map_tooltip_format_arg(2, uint32, gParkNameArgs); + set_map_tooltip_format_arg(2, uint32_t, gParkNameArgs); break; default: info->type = VIEWPORT_INTERACTION_ITEM_NONE; @@ -107,7 +107,7 @@ sint32 viewport_interaction_get_item_left(sint32 x, sint32 y, viewport_interacti return info->type; } -sint32 viewport_interaction_left_over(sint32 x, sint32 y) +int32_t viewport_interaction_left_over(int32_t x, int32_t y) { viewport_interaction_info info; @@ -121,7 +121,7 @@ sint32 viewport_interaction_left_over(sint32 x, sint32 y) } } -sint32 viewport_interaction_left_click(sint32 x, sint32 y) +int32_t viewport_interaction_left_click(int32_t x, int32_t y) { viewport_interaction_info info; @@ -175,13 +175,13 @@ sint32 viewport_interaction_left_click(sint32 x, sint32 y) * * rct2: 0x006EDE88 */ -sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interaction_info *info) +int32_t viewport_interaction_get_item_right(int32_t x, int32_t y, viewport_interaction_info *info) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; rct_banner *banner; Ride *ride; - sint32 i, stationIndex; + int32_t i, stationIndex; // No click input for title screen or track manager if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_MANAGER)) @@ -207,7 +207,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact if (ride->status == RIDE_STATUS_CLOSED) { set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); set_map_tooltip_format_arg(2, rct_string_id, ride->name); - set_map_tooltip_format_arg(4, uint32, ride->name_arguments); + set_map_tooltip_format_arg(4, uint32_t, ride->name_arguments); } return info->type; @@ -253,12 +253,12 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact } set_map_tooltip_format_arg(2, rct_string_id, ride->name); - set_map_tooltip_format_arg(4, uint32, ride->name_arguments); + set_map_tooltip_format_arg(4, uint32_t, ride->name_arguments); return info->type; } set_map_tooltip_format_arg(4, rct_string_id, ride->name); - set_map_tooltip_format_arg(6, uint32, ride->name_arguments); + set_map_tooltip_format_arg(6, uint32_t, ride->name_arguments); set_map_tooltip_format_arg(10, rct_string_id, RideComponentNames[RideNameConvention[ride->type].station].capitalised); stationIndex = tile_element_get_station(tileElement); @@ -266,7 +266,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED) stationIndex--; stationIndex++; - set_map_tooltip_format_arg(12, uint16, stationIndex); + set_map_tooltip_format_arg(12, uint16_t, stationIndex); return info->type; case VIEWPORT_INTERACTION_ITEM_WALL: @@ -354,7 +354,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact return info->type = VIEWPORT_INTERACTION_ITEM_NONE; } -sint32 viewport_interaction_right_over(sint32 x, sint32 y) +int32_t viewport_interaction_right_over(int32_t x, int32_t y) { viewport_interaction_info info; @@ -365,7 +365,7 @@ sint32 viewport_interaction_right_over(sint32 x, sint32 y) * * rct2: 0x006E8A62 */ -sint32 viewport_interaction_right_click(sint32 x, sint32 y) +int32_t viewport_interaction_right_click(int32_t x, int32_t y) { CoordsXYE tileElement; viewport_interaction_info info; @@ -414,7 +414,7 @@ sint32 viewport_interaction_right_click(sint32 x, sint32 y) * * rct2: 0x006E08D2 */ -static void viewport_interaction_remove_scenery(rct_tile_element *tileElement, sint32 x, sint32 y) +static void viewport_interaction_remove_scenery(rct_tile_element *tileElement, int32_t x, int32_t y) { gGameCommandErrorTitle = STR_CANT_REMOVE_THIS; game_do_command( @@ -432,9 +432,9 @@ static void viewport_interaction_remove_scenery(rct_tile_element *tileElement, s * * rct2: 0x006A614A */ -static void viewport_interaction_remove_footpath(rct_tile_element *tileElement, sint32 x, sint32 y) +static void viewport_interaction_remove_footpath(rct_tile_element *tileElement, int32_t x, int32_t y) { - sint32 z; + int32_t z; rct_window *w; rct_tile_element *tileElement2; @@ -458,9 +458,9 @@ static void viewport_interaction_remove_footpath(rct_tile_element *tileElement, * * rct2: 0x006A61AB */ -static void viewport_interaction_remove_footpath_item(rct_tile_element *tileElement, sint32 x, sint32 y) +static void viewport_interaction_remove_footpath_item(rct_tile_element *tileElement, int32_t x, int32_t y) { - sint32 type; + int32_t type; type = footpath_element_get_type(tileElement); if (footpath_element_is_queue(tileElement)) @@ -482,9 +482,9 @@ static void viewport_interaction_remove_footpath_item(rct_tile_element *tileElem * * rct2: 0x00666C0E */ -void viewport_interaction_remove_park_entrance(rct_tile_element *tileElement, sint32 x, sint32 y) +void viewport_interaction_remove_park_entrance(rct_tile_element *tileElement, int32_t x, int32_t y) { - sint32 rotation = tile_element_get_direction_with_offset(tileElement, 1); + int32_t rotation = tile_element_get_direction_with_offset(tileElement, 1); switch (tileElement->properties.entrance.index & 0x0F) { case 1: x += CoordsDirectionDelta[rotation].x; @@ -503,7 +503,7 @@ void viewport_interaction_remove_park_entrance(rct_tile_element *tileElement, si * * rct2: 0x006E57A9 */ -static void viewport_interaction_remove_park_wall(rct_tile_element *tileElement, sint32 x, sint32 y) +static void viewport_interaction_remove_park_wall(rct_tile_element *tileElement, int32_t x, int32_t y) { rct_scenery_entry *sceneryEntry = get_wall_entry(tileElement->properties.wall.type); if (sceneryEntry->wall.scrolling_mode != 0xFF) @@ -522,7 +522,7 @@ static void viewport_interaction_remove_park_wall(rct_tile_element *tileElement, * * rct2: 0x006B88DC */ -static void viewport_interaction_remove_large_scenery(rct_tile_element *tileElement, sint32 x, sint32 y) +static void viewport_interaction_remove_large_scenery(rct_tile_element *tileElement, int32_t x, int32_t y) { rct_scenery_entry *sceneryEntry = get_large_scenery_entry(scenery_large_get_type(tileElement)); @@ -544,10 +544,10 @@ static void viewport_interaction_remove_large_scenery(rct_tile_element *tileElem } } -static rct_peep *viewport_interaction_get_closest_peep(sint32 x, sint32 y, sint32 maxDistance) +static rct_peep *viewport_interaction_get_closest_peep(int32_t x, int32_t y, int32_t maxDistance) { - sint32 distance, closestDistance; - uint16 spriteIndex; + int32_t distance, closestDistance; + uint16_t spriteIndex; rct_window *w; rct_viewport *viewport; rct_peep *peep, *closestPeep; @@ -588,10 +588,10 @@ static rct_peep *viewport_interaction_get_closest_peep(sint32 x, sint32 y, sint3 * * rct2: 0x0068A15E */ -void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *direction, rct_tile_element **tileElement) +void sub_68A15E(int32_t screenX, int32_t screenY, int16_t *x, int16_t *y, int32_t *direction, rct_tile_element **tileElement) { - sint16 my_x, my_y; - sint32 interactionType; + int16_t my_x, my_y; + int32_t interactionType; rct_tile_element *myTileElement; rct_viewport *viewport; get_map_coordinates_from_pos(screenX, screenY, VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_WATER, &my_x, &my_y, &interactionType, &myTileElement, &viewport); @@ -601,28 +601,28 @@ void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *di return; } - sint16 originalZ = 0; + int16_t originalZ = 0; if (interactionType == VIEWPORT_INTERACTION_ITEM_WATER) { originalZ = surface_get_water_height(myTileElement) << 4; } LocationXY16 start_vp_pos = screen_coord_to_viewport_coord(viewport, screenX, screenY); - LocationXY16 map_pos = { (sint16)(my_x + 16), (sint16)(my_y + 16) }; + LocationXY16 map_pos = { (int16_t)(my_x + 16), (int16_t)(my_y + 16) }; - for (sint32 i = 0; i < 5; i++) { - sint16 z = originalZ; + for (int32_t i = 0; i < 5; i++) { + int16_t z = originalZ; if (interactionType != VIEWPORT_INTERACTION_ITEM_WATER) { z = tile_element_height(map_pos.x, map_pos.y); } map_pos = viewport_coord_to_map_coord(start_vp_pos.x, start_vp_pos.y, z); - map_pos.x = Math::Clamp(map_pos.x, my_x, my_x + 31); - map_pos.y = Math::Clamp(map_pos.y, my_y, my_y + 31); + map_pos.x = Math::Clamp(map_pos.x, my_x, my_x + 31); + map_pos.y = Math::Clamp(map_pos.y, my_y, my_y + 31); } // Determine to which edge the cursor is closest - sint32 myDirection; - sint32 mod_x = map_pos.x & 0x1F; - sint32 mod_y = map_pos.y & 0x1F; + int32_t myDirection; + int32_t mod_x = map_pos.x & 0x1F; + int32_t mod_y = map_pos.y & 0x1F; if (mod_x < mod_y) { if (mod_x + mod_y < 32) { myDirection = 0; diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 643fe24602..336a6d4537 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -33,8 +33,8 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widge static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex); static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex); static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex); -static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, sint32 l, sint32 t, sint32 r, sint32 b, sint32 colour); -static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, sint32 l, sint32 t, sint32 r, sint32 b, sint32 colour); +static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour); +static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour); static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex); /** @@ -111,16 +111,16 @@ static void widget_frame_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgeti rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // - uint8 press = ((w->flags & WF_10) ? INSET_RECT_FLAG_FILL_MID_LIGHT : 0); + uint8_t press = ((w->flags & WF_10) ? INSET_RECT_FLAG_FILL_MID_LIGHT : 0); // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // Draw the frame gfx_fill_rect_inset(dpi, l, t, r, b, colour, press); @@ -147,13 +147,13 @@ static void widget_resize_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widget rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // Draw the panel gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0); @@ -180,18 +180,18 @@ static void widget_button_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widget rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Check if the button is pressed down - uint8 press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; + uint8_t press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; - if ((sint32)widget->image == -2) { + if ((int32_t)widget->image == -2) { // Draw border with no fill gfx_fill_rect_inset(dpi, l, t, r, b, colour, press | INSET_RECT_FLAG_FILL_NONE); return; @@ -212,7 +212,7 @@ static void widget_tab_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetind // Get the widget rct_widget *widget = &w->widgets[widgetIndex]; - if ((sint32)widget->image == -1) + if ((int32_t)widget->image == -1) return; // Draw widgets that aren't explicitly disabled. @@ -231,12 +231,12 @@ static void widget_tab_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetind } // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; // Get the colour and disabled image - uint8 colour = w->colours[widget->colour] & 0x7F; - uint32 image = widget->image + 2; + uint8_t colour = w->colours[widget->colour] & 0x7F; + uint32_t image = widget->image + 2; // Draw disabled image gfx_draw_sprite(dpi, image | (colour << 19), l, t, 0); @@ -257,17 +257,17 @@ static void widget_flat_button_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_w rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // Check if the button is pressed down if (widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex)) { - if ((sint32)widget->image == -2) { + if ((int32_t)widget->image == -2) { // Draw border with no fill gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE); return; @@ -291,16 +291,16 @@ static void widget_text_button(rct_drawpixelinfo *dpi, rct_window *w, rct_widget rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // Border - uint8 press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; + uint8_t press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; gfx_fill_rect_inset(dpi, l, t, r, b, colour, press); // Button caption @@ -327,21 +327,21 @@ static void widget_text_centred(rct_drawpixelinfo *dpi, rct_window *w, rct_widge return; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; colour &= ~(COLOUR_FLAG_TRANSLUCENT); if (widget_is_disabled(w, widgetIndex)) colour |= COLOUR_FLAG_INSET; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 r = w->x + widget->right; - sint32 t; + int32_t l = w->x + widget->left; + int32_t r = w->x + widget->right; + int32_t t; if (widget->type == WWT_BUTTON || widget->type == WWT_TABLE_HEADER) { - sint32 height = (widget->bottom - widget->top); + int32_t height = (widget->bottom - widget->top); if (height >= 10) - t = w->y + std::max(widget->top, widget->top + (height / 2) - 5); + t = w->y + std::max(widget->top, widget->top + (height / 2) - 5); else t = w->y + widget->top - 1; } @@ -372,20 +372,20 @@ static void widget_text(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex w return; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; if (widget_is_disabled(w, widgetIndex)) colour |= COLOUR_FLAG_INSET; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 r = w->x + widget->right; - sint32 t; + int32_t l = w->x + widget->left; + int32_t r = w->x + widget->right; + int32_t t; if (widget->type == WWT_BUTTON || widget->type == WWT_TABLE_HEADER) { - sint32 height = (widget->bottom - widget->top); + int32_t height = (widget->bottom - widget->top); if (height >= 10) - t = w->y + std::max(widget->top, widget->top + (height / 2) - 5); + t = w->y + std::max(widget->top, widget->top + (height / 2) - 5); else t = w->y + widget->top - 1; } @@ -405,13 +405,13 @@ static void widget_text_inset(rct_drawpixelinfo *dpi, rct_window *w, rct_widgeti rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_F_60); widget_text(dpi, w, widgetIndex); @@ -427,20 +427,20 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left + 5; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; - sint32 textRight = l; + int32_t l = w->x + widget->left + 5; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; + int32_t textRight = l; // Text if (widget->text != STR_NONE) { - uint8 colour = w->colours[widget->colour] & 0x7F; + uint8_t colour = w->colours[widget->colour] & 0x7F; if (widget_is_disabled(w, widgetIndex)) colour |= COLOUR_FLAG_INSET; utf8 buffer[512] = { 0 }; - uint8 args[sizeof(uintptr_t)] = { 0 }; + uint8_t args[sizeof(uintptr_t)] = { 0 }; format_string(buffer, sizeof(buffer), widget->text, gCommonFormatArgs); set_format_arg_on(args, 0, uintptr_t, buffer); gfx_draw_string_left(dpi, STR_STRING, args, colour, l, t); @@ -455,7 +455,7 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour] & 0x7F; + uint8_t colour = w->colours[widget->colour] & 0x7F; // Border left of text gfx_fill_rect(dpi, l, t, l + 4, t, ColourMapA[colour].mid_dark); @@ -488,15 +488,15 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widge rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; - uint8 press = INSET_RECT_F_60; + uint8_t press = INSET_RECT_F_60; if (w->flags & WF_10) press |= INSET_RECT_FLAG_FILL_MID_LIGHT; @@ -514,7 +514,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widge l = widget->left + w->x + 2; t = widget->top + w->y + 1; - sint32 width = widget->right - widget->left - 4; + int32_t width = widget->right - widget->left - 4; if ((widget + 1)->type == WWT_CLOSEBOX) { width -= 10; if ((widget + 2)->type == WWT_CLOSEBOX) @@ -534,20 +534,20 @@ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Check if the button is pressed down - uint8 press = 0; + uint8_t press = 0; if (w->flags & WF_10) press |= INSET_RECT_FLAG_FILL_MID_LIGHT; if (widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex)) press |= INSET_RECT_FLAG_BORDER_INSET; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // Draw the button gfx_fill_rect_inset(dpi, l, t, r, b, colour, press); @@ -556,7 +556,7 @@ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg return; l = w->x + (widget->left + widget->right) / 2 - 1; - t = w->y + std::max(widget->top, (widget->top + widget->bottom) / 2 - 5); + t = w->y + std::max(widget->top, (widget->top + widget->bottom) / 2 - 5); if (widget_is_disabled(w, widgetIndex)) colour |= COLOUR_FLAG_INSET; @@ -574,13 +574,13 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 b = w->y + widget->bottom; - sint32 yMid = (b + t) / 2; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t b = w->y + widget->bottom; + int32_t yMid = (b + t) / 2; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // checkbox gfx_fill_rect_inset(dpi, l, yMid - 5, l + 9, yMid + 4, colour, INSET_RECT_F_60); @@ -609,18 +609,18 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex) { // Get the widget - sint32 scrollIndex = window_get_scroll_data_index(w, widgetIndex); + int32_t scrollIndex = window_get_scroll_data_index(w, widgetIndex); rct_widget *widget = &w->widgets[widgetIndex]; rct_scroll* scroll = &w->scrolls[scrollIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; // Draw the border gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_F_60); @@ -654,10 +654,10 @@ static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widget rct_drawpixelinfo scroll_dpi = *dpi; // Clip the scroll dpi against the outer dpi - sint32 cl = std::max(dpi->x, l); - sint32 ct = std::max(dpi->y, t); - sint32 cr = std::min(dpi->x + dpi->width, r); - sint32 cb = std::min(dpi->y + dpi->height, b); + int32_t cl = std::max(dpi->x, l); + int32_t ct = std::max(dpi->y, t); + int32_t cr = std::min(dpi->x + dpi->width, r); + int32_t cb = std::min(dpi->y + dpi->height, b); // Set the respective dpi attributes scroll_dpi.x = cl - l + scroll->h_left; @@ -673,7 +673,7 @@ static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widget window_event_scroll_paint_call(w, &scroll_dpi, scrollIndex); } -static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, sint32 l, sint32 t, sint32 r, sint32 b, sint32 colour) +static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour) { colour &= 0x7F; // Trough @@ -699,7 +699,7 @@ static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, s gfx_draw_string(dpi, (char*)BlackRightArrowString, COLOUR_BLACK, r - 6, t); } -static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, sint32 l, sint32 t, sint32 r, sint32 b, sint32 colour) +static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour) { colour &= 0x7F; // Trough @@ -735,16 +735,16 @@ static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, rct_widgeti rct_widget *widget = &w->widgets[widgetIndex]; // Get the image - sint32 image = widget->image; + int32_t image = widget->image; if (image == SPR_NONE) return; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; // Get the colour - uint8 colour = NOT_TRANSLUCENT(w->colours[widget->colour]); + uint8_t colour = NOT_TRANSLUCENT(w->colours[widget->colour]); if (widget->type == WWT_COLOURBTN || widget->type == WWT_TRNBTN || widget->type == WWT_TAB) if (widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex)) @@ -831,7 +831,7 @@ bool widget_is_active_tool(rct_window *w, rct_widgetindex widgetIndex) * esi: w * edi: widget */ -void widget_scroll_get_part(rct_window *w, rct_widget *widget, sint32 x, sint32 y, sint32 *output_x, sint32 *output_y, sint32 *output_scroll_area, sint32 *scroll_id) +void widget_scroll_get_part(rct_window *w, rct_widget *widget, int32_t x, int32_t y, int32_t *output_x, int32_t *output_y, int32_t *output_scroll_area, int32_t *scroll_id) { rct_widget* iterator = w->widgets; *scroll_id = 0; @@ -847,9 +847,9 @@ void widget_scroll_get_part(rct_window *w, rct_widget *widget, sint32 x, sint32 if ((w->scrolls[*scroll_id].flags & HSCROLLBAR_VISIBLE) && y >= (w->y + widget->bottom - 11)) { // horizontal scrollbar - sint32 rightOffset = 0; - sint32 iteratorLeft = widget->left + w->x + 10; - sint32 iteratorRight = widget->right + w->x - 10; + int32_t rightOffset = 0; + int32_t iteratorLeft = widget->left + w->x + 10; + int32_t iteratorRight = widget->right + w->x - 10; if (!(w->scrolls[*scroll_id].flags & VSCROLLBAR_VISIBLE)) { rightOffset = 11; @@ -883,9 +883,9 @@ void widget_scroll_get_part(rct_window *w, rct_widget *widget, sint32 x, sint32 else if ((w->scrolls[*scroll_id].flags & VSCROLLBAR_VISIBLE) && (x >= w->x + widget->right - 11)) { // vertical scrollbar - sint32 bottomOffset = 0; - sint32 iteratorTop = widget->top + w->y + 10; - sint32 iteratorBottom = widget->bottom + w->y; + int32_t bottomOffset = 0; + int32_t iteratorTop = widget->top + w->y + 10; + int32_t iteratorBottom = widget->bottom + w->y; if (w->scrolls[*scroll_id].flags & HSCROLLBAR_VISIBLE) { bottomOffset = 11; @@ -948,7 +948,7 @@ void widget_set_enabled(rct_window *w, rct_widgetindex widgetIndex, bool enabled } } -void widget_set_checkbox_value(rct_window *w, rct_widgetindex widgetIndex, sint32 value) +void widget_set_checkbox_value(rct_window *w, rct_widgetindex widgetIndex, int32_t value) { if (value) w->pressed_widgets |= (1ULL << widgetIndex); @@ -958,21 +958,21 @@ void widget_set_checkbox_value(rct_window *w, rct_widgetindex widgetIndex, sint3 static void widget_text_box_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex) { - sint32 no_lines = 0; - sint32 font_height = 0; + int32_t no_lines = 0; + int32_t font_height = 0; char wrapped_string[TEXT_INPUT_SIZE]; // Get the widget rct_widget *widget = &w->widgets[widgetIndex]; // Resolve the absolute ltrb - sint32 l = w->x + widget->left; - sint32 t = w->y + widget->top; - sint32 r = w->x + widget->right; - sint32 b = w->y + widget->bottom; + int32_t l = w->x + widget->left; + int32_t t = w->y + widget->top; + int32_t r = w->x + widget->right; + int32_t b = w->y + widget->bottom; // Get the colour - uint8 colour = w->colours[widget->colour]; + uint8_t colour = w->colours[widget->colour]; bool active = w->classification == gCurrentTextBox.window.classification && w->number == gCurrentTextBox.window.number && @@ -1010,10 +1010,10 @@ static void widget_text_box_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg // Make a copy of the string for measuring the width. char temp_string[TEXT_INPUT_SIZE] = { 0 }; memcpy(temp_string, wrapped_string, std::min(string_length, gTextInput->SelectionStart)); - sint32 cur_x = l + gfx_get_string_width(temp_string) + 3; + int32_t cur_x = l + gfx_get_string_width(temp_string) + 3; - sint32 width = 6; - if ((uint32)gTextInput->SelectionStart < strlen(gTextBoxInput)){ + int32_t width = 6; + if ((uint32_t)gTextInput->SelectionStart < strlen(gTextBoxInput)){ // Make a new 1 character wide string for measuring the width // of the character that the cursor is under. temp_string[1] = '\0'; diff --git a/src/openrct2-ui/interface/Window.cpp b/src/openrct2-ui/interface/Window.cpp index 503420ccc3..a812288757 100644 --- a/src/openrct2-ui/interface/Window.cpp +++ b/src/openrct2-ui/interface/Window.cpp @@ -24,11 +24,11 @@ using namespace OpenRCT2; // The amount of pixels to scroll per wheel click -constexpr sint32 WINDOW_SCROLL_PIXELS = 17; +constexpr int32_t WINDOW_SCROLL_PIXELS = 17; -static sint32 _previousAbsoluteWheel = 0; +static int32_t _previousAbsoluteWheel = 0; -static bool window_fits_between_others(sint32 x, sint32 y, sint32 width, sint32 height) +static bool window_fits_between_others(int32_t x, int32_t y, int32_t width, int32_t height) { for (auto& w : g_window_list) { @@ -45,7 +45,7 @@ static bool window_fits_between_others(sint32 x, sint32 y, sint32 width, sint32 return true; } -static bool window_fits_within_space(sint32 x, sint32 y, sint32 width, sint32 height) +static bool window_fits_within_space(int32_t x, int32_t y, int32_t width, int32_t height) { if (x < 0) return false; if (y <= TOP_TOOLBAR_HEIGHT && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) return false; @@ -54,11 +54,11 @@ static bool window_fits_within_space(sint32 x, sint32 y, sint32 width, sint32 he return window_fits_between_others(x, y, width, height); } -static bool window_fits_on_screen(sint32 x, sint32 y, sint32 width, sint32 height) +static bool window_fits_on_screen(int32_t x, int32_t y, int32_t width, int32_t height) { - uint16 screenWidth = context_get_width(); - uint16 screenHeight = context_get_height(); - sint32 unk; + uint16_t screenWidth = context_get_width(); + uint16_t screenHeight = context_get_height(); + int32_t unk; unk = -(width / 4); if (x < unk) return false; @@ -70,7 +70,7 @@ static bool window_fits_on_screen(sint32 x, sint32 y, sint32 width, sint32 heigh return window_fits_between_others(x, y, width, height); } -rct_window *window_create(sint32 x, sint32 y, sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags) +rct_window *window_create(int32_t x, int32_t y, int32_t width, int32_t height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16_t flags) { // Check if there are any window slots left // include WINDOW_LIMIT_RESERVED for items such as the main viewport and toolbars to not appear to be counted. @@ -156,7 +156,7 @@ rct_window *window_create(sint32 x, sint32 y, sint32 width, sint32 height, rct_w return w; } -rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags) +rct_window *window_create_auto_pos(int32_t width, int32_t height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16_t flags) { auto uiContext = GetContext()->GetUiContext(); auto screenWidth = uiContext->GetWidth(); @@ -171,10 +171,10 @@ rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event // if (w != nullptr) { // if (w->x > -60 && w->x < screenWidth - 20) { // if (w->y < screenHeight - 20) { - // sint32 x = w->x; + // int32_t x = w->x; // if (w->x + width > screenWidth) // x = screenWidth - 20 - width; - // sint32 y = w->y; + // int32_t y = w->y; // return window_create(x + 10, y + 10, width, height, event_handlers, cls, flags); // } // } @@ -182,8 +182,8 @@ rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event // } // Place window in an empty corner of the screen - sint32 x = 0; - sint32 y = 30; + int32_t x = 0; + int32_t y = 30; if (window_fits_within_space(x, y, width, height)) goto foundSpace; x = screenWidth - width; @@ -282,32 +282,32 @@ foundSpace: return window_create(x, y, width, height, event_handlers, cls, flags); } -rct_window * window_create_centred(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags) +rct_window * window_create_centred(int32_t width, int32_t height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16_t flags) { auto uiContext = GetContext()->GetUiContext(); auto screenWidth = uiContext->GetWidth(); auto screenHeight = uiContext->GetHeight(); - sint32 x = (screenWidth - width) / 2; - sint32 y = std::max(TOP_TOOLBAR_HEIGHT + 1, (screenHeight - height) / 2); + int32_t x = (screenWidth - width) / 2; + int32_t y = std::max(TOP_TOOLBAR_HEIGHT + 1, (screenHeight - height) / 2); return window_create(x, y, width, height, event_handlers, cls, flags); } -static sint32 window_get_widget_index(rct_window *w, rct_widget *widget) +static int32_t window_get_widget_index(rct_window *w, rct_widget *widget) { - sint32 i = 0; + int32_t i = 0; for (rct_widget *widget2 = w->widgets; widget2->type != WWT_LAST; widget2++, i++) if (widget == widget2) return i; return -1; } -static sint32 window_get_scroll_index(rct_window *w, sint32 targetWidgetIndex) +static int32_t window_get_scroll_index(rct_window *w, int32_t targetWidgetIndex) { if (w->widgets[targetWidgetIndex].type != WWT_SCROLL) return -1; - sint32 scrollIndex = 0; + int32_t scrollIndex = 0; rct_widgetindex widgetIndex = 0; for (rct_widget *widget = w->widgets; widget->type != WWT_LAST; widget++, widgetIndex++) { if (widgetIndex == targetWidgetIndex) @@ -319,7 +319,7 @@ static sint32 window_get_scroll_index(rct_window *w, sint32 targetWidgetIndex) return scrollIndex; } -static rct_widget *window_get_scroll_widget(rct_window *w, sint32 scrollIndex) +static rct_widget *window_get_scroll_widget(rct_window *w, int32_t scrollIndex) { for (rct_widget *widget = w->widgets; widget->type != WWT_LAST; widget++) { if (widget->type != WWT_SCROLL) @@ -337,20 +337,20 @@ static rct_widget *window_get_scroll_widget(rct_window *w, sint32 scrollIndex) * * rct2: 0x006E78E3 */ -static void window_scroll_wheel_input(rct_window *w, sint32 scrollIndex, sint32 wheel) +static void window_scroll_wheel_input(rct_window *w, int32_t scrollIndex, int32_t wheel) { rct_scroll *scroll = &w->scrolls[scrollIndex]; rct_widget *widget = window_get_scroll_widget(w, scrollIndex); rct_widgetindex widgetIndex = window_get_widget_index(w, widget); if (scroll->flags & VSCROLLBAR_VISIBLE) { - sint32 size = widget->bottom - widget->top - 1; + int32_t size = widget->bottom - widget->top - 1; if (scroll->flags & HSCROLLBAR_VISIBLE) size -= 11; size = std::max(0, scroll->v_bottom - size); scroll->v_top = std::min(std::max(0, scroll->v_top + wheel), size); } else { - sint32 size = widget->right - widget->left - 1; + int32_t size = widget->right - widget->left - 1; if (scroll->flags & VSCROLLBAR_VISIBLE) size -= 11; size = std::max(0, scroll->h_right - size); @@ -365,9 +365,9 @@ static void window_scroll_wheel_input(rct_window *w, sint32 scrollIndex, sint32 * * rct2: 0x006E793B */ -static sint32 window_wheel_input(rct_window *w, sint32 wheel) +static int32_t window_wheel_input(rct_window *w, int32_t wheel) { - sint32 i = 0; + int32_t i = 0; for (rct_widget *widget = w->widgets; widget->type != WWT_LAST; widget++) { if (widget->type != WWT_SCROLL) continue; @@ -388,7 +388,7 @@ static sint32 window_wheel_input(rct_window *w, sint32 wheel) * * rct2: 0x006E79FB */ -static void window_viewport_wheel_input(rct_window *w, sint32 wheel) +static void window_viewport_wheel_input(rct_window *w, int32_t wheel) { if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO)) return; @@ -399,7 +399,7 @@ static void window_viewport_wheel_input(rct_window *w, sint32 wheel) window_zoom_out(w, true); } -static bool window_other_wheel_input(rct_window* w, rct_widgetindex widgetIndex, sint32 wheel) +static bool window_other_wheel_input(rct_window* w, rct_widgetindex widgetIndex, int32_t wheel) { // HACK: Until we have a new window system that allows us to add new events like mouse wheel easily, // this selective approach will have to do. @@ -408,7 +408,7 @@ static bool window_other_wheel_input(rct_window* w, rct_widgetindex widgetIndex, auto widgetType = w->widgets[widgetIndex].type; // Lower widgetIndex once or twice we got a type that matches, to allow scrolling on the increase/decrease buttons too - sint32 attempts = 0; + int32_t attempts = 0; while (widgetType != WWT_IMGBTN && widgetType != WWT_SPINNER && widgetIndex > 0) { switch (widgetType) @@ -444,8 +444,8 @@ static bool window_other_wheel_input(rct_window* w, rct_widgetindex widgetIndex, } rct_widgetindex buttonWidgetIndex; - uint16 expectedType; - uint32 expectedContent[2]; + uint16_t expectedType; + uint32_t expectedContent[2]; switch (widgetType) { case WWT_IMGBTN: @@ -490,9 +490,9 @@ void window_all_wheel_input() { // Get wheel value CursorState * cursorState = (CursorState *)context_get_cursor_state(); - sint32 absolute_wheel = cursorState->wheel; - sint32 relative_wheel = absolute_wheel - _previousAbsoluteWheel; - sint32 pixel_scroll = relative_wheel * WINDOW_SCROLL_PIXELS; + int32_t absolute_wheel = cursorState->wheel; + int32_t relative_wheel = absolute_wheel - _previousAbsoluteWheel; + int32_t pixel_scroll = relative_wheel * WINDOW_SCROLL_PIXELS; _previousAbsoluteWheel = absolute_wheel; if (relative_wheel == 0) @@ -513,7 +513,7 @@ void window_all_wheel_input() if (widgetIndex != -1) { rct_widget *widget = &w->widgets[widgetIndex]; if (widget->type == WWT_SCROLL) { - sint32 scrollIndex = window_get_scroll_index(w, widgetIndex); + int32_t scrollIndex = window_get_scroll_index(w, widgetIndex); rct_scroll *scroll = &w->scrolls[scrollIndex]; if (scroll->flags & (HSCROLLBAR_VISIBLE | VSCROLLBAR_VISIBLE)) { window_scroll_wheel_input(w, window_get_scroll_index(w, widgetIndex), pixel_scroll); @@ -541,8 +541,8 @@ void window_init_scroll_widgets(rct_window *w) { rct_widget* widget; rct_scroll* scroll; - sint32 widget_index, scroll_index; - sint32 width, height; + int32_t widget_index, scroll_index; + int32_t width, height; widget_index = 0; scroll_index = 0; diff --git a/src/openrct2-ui/title/TitleSequencePlayer.cpp b/src/openrct2-ui/title/TitleSequencePlayer.cpp index 1566b49393..0faa59e436 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.cpp +++ b/src/openrct2-ui/title/TitleSequencePlayer.cpp @@ -50,11 +50,11 @@ private: size_t _sequenceId = 0; TitleSequence * _sequence = nullptr; - sint32 _position = 0; - sint32 _waitCounter = 0; + int32_t _position = 0; + int32_t _waitCounter = 0; - sint32 _lastScreenWidth = 0; - sint32 _lastScreenHeight = 0; + int32_t _lastScreenWidth = 0; + int32_t _lastScreenHeight = 0; CoordsXY _viewCentreLocation = {}; public: @@ -69,7 +69,7 @@ public: Eject(); } - sint32 GetCurrentPosition() const override + int32_t GetCurrentPosition() const override { return _position; } @@ -105,7 +105,7 @@ public: bool Update() override { - sint32 entryPosition = _position; + int32_t entryPosition = _position; FixViewLocation(); if (_sequence == nullptr) @@ -115,7 +115,7 @@ public: } // Check that position is valid - if (_position >= (sint32)_sequence->NumCommands) + if (_position >= (int32_t)_sequence->NumCommands) { _position = 0; return false; @@ -175,9 +175,9 @@ public: _waitCounter = 0; } - void Seek(sint32 targetPosition) override + void Seek(int32_t targetPosition) override { - if (targetPosition < 0 || targetPosition >= (sint32)_sequence->NumCommands) + if (targetPosition < 0 || targetPosition >= (int32_t)_sequence->NumCommands) { throw std::runtime_error("Invalid position."); } @@ -191,7 +191,7 @@ public: targetPosition = 0; } // Set position to the last LOAD command before target position - for (sint32 i = targetPosition; i >= 0; i--) + for (int32_t i = targetPosition; i >= 0; i--) { const TitleCommand * command = &_sequence->Commands[i]; if ((_position == i && _position != targetPosition) || TitleSequenceIsLoadCommand(command)) @@ -226,7 +226,7 @@ private: void IncrementPosition() { _position++; - if (_position >= (sint32)_sequence->NumCommands) + if (_position >= (int32_t)_sequence->NumCommands) { _position = 0; } @@ -234,7 +234,7 @@ private: bool SkipToNextLoadCommand() { - sint32 entryPosition = _position; + int32_t entryPosition = _position; const TitleCommand * command; do { @@ -253,7 +253,7 @@ private: break; case TITLE_SCRIPT_WAIT: // The waitCounter is measured in 25-ms game ticks. Previously it was seconds * 40 ticks/second, now it is ms / 25 ms/tick - _waitCounter = std::max(1, command->Milliseconds / (uint32)GAME_UPDATE_TIME_MS); + _waitCounter = std::max(1, command->Milliseconds / (uint32_t)GAME_UPDATE_TIME_MS); break; case TITLE_SCRIPT_LOADMM: { @@ -274,8 +274,8 @@ private: } case TITLE_SCRIPT_LOCATION: { - sint32 x = command->X * 32 + 16; - sint32 y = command->Y * 32 + 16; + int32_t x = command->X * 32 + 16; + int32_t y = command->Y * 32 + 16; SetViewLocation(x, y); break; } @@ -286,7 +286,7 @@ private: SetViewZoom(command->Zoom); break; case TITLE_SCRIPT_SPEED: - gGameSpeed = Math::Clamp(1, command->Speed, 4); + gGameSpeed = Math::Clamp(1, command->Speed, 4); break; case TITLE_SCRIPT_FOLLOW: FollowSprite(command->SpriteIndex); @@ -297,7 +297,7 @@ private: case TITLE_SCRIPT_LOAD: { bool loadSuccess = false; - uint8 saveIndex = command->SaveIndex; + uint8_t saveIndex = command->SaveIndex; TitleSequenceParkHandle * parkHandle = TitleSequenceGetParkHandle(_sequence, saveIndex); if (parkHandle != nullptr) { @@ -360,7 +360,7 @@ private: return true; } - void SetViewZoom(const uint32 &zoom) + void SetViewZoom(const uint32_t &zoom) { rct_window * w = window_get_main(); if (w != nullptr && w->viewport != nullptr) @@ -369,19 +369,19 @@ private: } } - void RotateView(uint32 count) + void RotateView(uint32_t count) { rct_window * w = window_get_main(); if (w != nullptr) { - for (uint32 i = 0; i < count; i++) + for (uint32_t i = 0; i < count; i++) { window_rotate_camera(w, 1); } } } - void FollowSprite(uint16 spriteIndex) + void FollowSprite(uint16_t spriteIndex) { rct_window * w = window_get_main(); if (w != nullptr) @@ -515,13 +515,13 @@ private: * @param x X position in map tiles. * @param y Y position in map tiles. */ - void SetViewLocation(sint32 x, sint32 y) + void SetViewLocation(int32_t x, int32_t y) { // Update viewport rct_window * w = window_get_main(); if (w != nullptr) { - sint32 z = tile_element_height(x, y); + int32_t z = tile_element_height(x, y); // Prevent scroll adjustment due to window placement when in-game auto oldScreenFlags = gScreenFlags; diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index 350a680a01..34ffbfb4f4 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -73,7 +73,7 @@ static rct_widget *window_about_page_widgets[] = { #define DEFAULT_ENABLED_WIDGETS \ (1ULL << WIDX_CLOSE) | (1ULL << WIDX_TAB_ABOUT_OPENRCT2) | (1ULL << WIDX_TAB_ABOUT_RCT2) -static uint64 window_about_page_enabled_widgets[] = { +static uint64_t window_about_page_enabled_widgets[] = { DEFAULT_ENABLED_WIDGETS | (1ULL << WIDX_CHANGELOG), DEFAULT_ENABLED_WIDGETS | (1ULL << WIDX_MUSIC_CREDITS), }; @@ -153,7 +153,7 @@ static rct_window_event_list *window_about_page_events[] = { }; // clang-format on -static void window_about_set_page(rct_window *w, sint32 page); +static void window_about_set_page(rct_window *w, int32_t page); /** * @@ -208,7 +208,7 @@ static void window_about_openrct2_common_paint(rct_window * w, rct_drawpixelinfo { window_draw_widgets(w, dpi); - sint32 x1, x2, y; + int32_t x1, x2, y; x1 = w->x + (&w->widgets[WIDX_TAB_ABOUT_OPENRCT2])->left + 45; x2 = w->x + (&w->widgets[WIDX_TAB_ABOUT_RCT2])->left + 45; @@ -225,10 +225,10 @@ static void window_about_openrct2_paint(rct_window *w, rct_drawpixelinfo *dpi) { window_about_openrct2_common_paint(w, dpi); - sint32 x, y, width; + int32_t x, y, width; rct_size16 logoSize; - sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); + int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); x = w->x + (w->width / 2); y = w->y + w->widgets[WIDX_PAGE_BACKGROUND].top + lineHeight; @@ -287,7 +287,7 @@ static void window_about_rct2_mouseup(rct_window *w, rct_widgetindex widgetIndex */ static void window_about_rct2_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, yPage; + int32_t x, y, yPage; window_about_openrct2_common_paint(w, dpi); @@ -296,7 +296,7 @@ static void window_about_rct2_paint(rct_window *w, rct_drawpixelinfo *dpi) x = w->x + 200; y = yPage + 5; - sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); + int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); // Credits gfx_draw_string_centred(dpi, STR_COPYRIGHT_CS, x, y, COLOUR_BLACK, nullptr); @@ -325,7 +325,7 @@ static void window_about_rct2_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma endregion RCT2 -static void window_about_set_page(rct_window *w, sint32 page) +static void window_about_set_page(rct_window *w, int32_t page) { w->page = page; w->frame_no = 0; diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index 48094ad571..9a578ebe2b 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -70,7 +70,7 @@ static rct_widget window_banner_widgets[] = { static void window_banner_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_banner_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_banner_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_banner_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_banner_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_banner_viewport_rotate(rct_window *w); static void window_banner_invalidate(rct_window *w); @@ -137,8 +137,8 @@ rct_window * window_banner_open(rct_windownumber number) w->number = number; window_init_scroll_widgets(w); - sint32 view_x = gBanners[w->number].x << 5; - sint32 view_y = gBanners[w->number].y << 5; + int32_t view_x = gBanners[w->number].x << 5; + int32_t view_y = gBanners[w->number].y << 5; rct_tile_element* tile_element = map_get_first_element_at(view_x / 32, view_y / 32); while(1) { @@ -152,7 +152,7 @@ rct_window * window_banner_open(rct_windownumber number) tile_element++; } - sint32 view_z = tile_element->base_height<<3; + int32_t view_z = tile_element->base_height<<3; w->frame_no = view_z; view_x += 16; @@ -187,8 +187,8 @@ rct_window * window_banner_open(rct_windownumber number) static void window_banner_mouseup(rct_window *w, rct_widgetindex widgetIndex) { rct_banner* banner = &gBanners[w->number]; - sint32 x = banner->x << 5; - sint32 y = banner->y << 5; + int32_t x = banner->x << 5; + int32_t y = banner->y << 5; rct_tile_element* tile_element = map_get_first_element_at(x / 32, y / 32); @@ -229,7 +229,7 @@ static void window_banner_mousedown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_TEXT_COLOUR_DROPDOWN_BUTTON: - for( sint32 i = 0; i < 13; ++i){ + for( int32_t i = 0; i < 13; ++i){ gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[i] = BannerColouredTextFormats[i + 1]; } @@ -256,7 +256,7 @@ static void window_banner_mousedown(rct_window *w, rct_widgetindex widgetIndex, * * rct2: 0x6ba517 */ -static void window_banner_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_banner_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { rct_banner* banner = &gBanners[w->number]; @@ -350,9 +350,9 @@ static void window_banner_viewport_rotate(rct_window *w) rct_banner* banner = &gBanners[w->number]; - sint32 view_x = (banner->x << 5) + 16; - sint32 view_y = (banner->y << 5) + 16; - sint32 view_z = w->frame_no; + int32_t view_x = (banner->x << 5) + 16; + int32_t view_y = (banner->y << 5) + 16; + int32_t view_z = w->frame_no; // Create viewport rct_widget* viewportWidget = &window_banner_widgets[WIDX_VIEWPORT]; diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index bba9931429..ec61b38109 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -49,10 +49,10 @@ static rct_widget window_changelog_widgets[] = { static void window_changelog_close(rct_window *w); static void window_changelog_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_changelog_resize(rct_window *w); -static void window_changelog_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); +static void window_changelog_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); static void window_changelog_invalidate(rct_window *w); static void window_changelog_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_changelog_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_changelog_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_changelog_events = { window_changelog_close, @@ -91,7 +91,7 @@ static void window_changelog_dispose_file(); static std::string _changelogText; static std::vector _changelogLines; -static sint32 _changelogLongestLineWidth = 0; +static int32_t _changelogLongestLineWidth = 0; rct_window * window_changelog_open() { @@ -104,8 +104,8 @@ rct_window * window_changelog_open() if (!window_changelog_read_file()) return nullptr; - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); window = window_create_centred( screenWidth * 4 / 5, @@ -141,8 +141,8 @@ static void window_changelog_mouseup(rct_window *w, rct_widgetindex widgetIndex) static void window_changelog_resize(rct_window *w) { - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); w->max_width = (screenWidth * 4) / 5; w->max_height = (screenHeight * 4) / 5; @@ -160,12 +160,12 @@ static void window_changelog_resize(rct_window *w) } static void window_changelog_scrollgetsize( - [[maybe_unused]] rct_window * w, [[maybe_unused]] sint32 scrollIndex, sint32 * width, sint32 * height) + [[maybe_unused]] rct_window * w, [[maybe_unused]] int32_t scrollIndex, int32_t * width, int32_t * height) { *width = _changelogLongestLineWidth + 4; - const sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); - *height = (sint32)(_changelogLines.size() * lineHeight); + const int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); + *height = (int32_t)(_changelogLines.size() * lineHeight); } static void window_changelog_invalidate(rct_window *w) @@ -186,15 +186,15 @@ static void window_changelog_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); } -static void window_changelog_scrollpaint(rct_window * w, rct_drawpixelinfo * dpi, [[maybe_unused]] sint32 scrollIndex) +static void window_changelog_scrollpaint(rct_window * w, rct_drawpixelinfo * dpi, [[maybe_unused]] int32_t scrollIndex) { gCurrentFontFlags = 0; gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; - const sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); + const int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); - sint32 x = 3; - sint32 y = 3 - lineHeight; + int32_t x = 3; + int32_t y = 3 - lineHeight; for (auto line : _changelogLines) { y += lineHeight; @@ -256,7 +256,7 @@ static bool window_changelog_read_file() auto ch = start; while (*ch != '\0') { - uint8 c = *ch; + uint8_t c = *ch; if (c == '\n') { *ch++ = 0; diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 7717507566..b37963df96 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -27,7 +27,7 @@ #define CHEATS_MONEY_INCREMENT_DIV MONEY(5000,00) static utf8 _moneySpinnerText[MONEY_STRING_MAXLENGTH]; static money32 _moneySpinnerValue = CHEATS_MONEY_DEFAULT; -static sint32 _selectedStaffSpeed = 1; +static int32_t _selectedStaffSpeed = 1; // clang-format off enum @@ -181,17 +181,17 @@ enum WINDOW_CHEATS_WIDGET_IDX #define OPTH 10 // Option (checkbox) height (two columns) #define GROUP_SPACE 6 -#define YPL(ROW) ((sint16)(YOS + ((BTNH + YSPA) * ROW))) -#define HPL(ROW) ((sint16)(YPL(ROW) + BTNH)) -#define OHPL(ROW) ((sint16)(YPL(ROW) + OPTH)) -#define XPL(COL) ((sint16)(XOS + ((BTNW + XSPA) * COL))) -#define WPL(COL) ((sint16)(XPL(COL) + BTNW)) -#define OWPL ((sint16)(XPL(0) + OPTW)) +#define YPL(ROW) ((int16_t)(YOS + ((BTNH + YSPA) * ROW))) +#define HPL(ROW) ((int16_t)(YPL(ROW) + BTNH)) +#define OHPL(ROW) ((int16_t)(YPL(ROW) + OPTH)) +#define XPL(COL) ((int16_t)(XOS + ((BTNW + XSPA) * COL))) +#define WPL(COL) ((int16_t)(XPL(COL) + BTNW)) +#define OWPL ((int16_t)(XPL(0) + OPTW)) -#define MIN_BTN_LEFT ((sint16)(XPL(1))) -#define MIN_BTN_RIGHT ((sint16)(WPL(1) - (BTNW / 2))) -#define MAX_BTN_LEFT ((sint16)(XPL(1.5))) -#define MAX_BTN_RIGHT ((sint16)(WPL(1))) +#define MIN_BTN_LEFT ((int16_t)(XPL(1))) +#define MIN_BTN_RIGHT ((int16_t)(WPL(1) - (BTNW / 2))) +#define MAX_BTN_LEFT ((int16_t)(XPL(1.5))) +#define MAX_BTN_RIGHT ((int16_t)(WPL(1))) #define TXTO 3 // Text horizontal offset from button left (for button text) #pragma endregion @@ -326,14 +326,14 @@ static rct_widget *window_cheats_page_widgets[] = static void window_cheats_money_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_cheats_money_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); static void window_cheats_misc_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_cheats_misc_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_cheats_misc_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_cheats_guests_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_cheats_misc_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_cheats_rides_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_cheats_update(rct_window *w); static void window_cheats_invalidate(rct_window *w); static void window_cheats_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_cheats_set_page(rct_window *w, sint32 page); +static void window_cheats_set_page(rct_window *w, int32_t page); static void window_cheats_text_input(rct_window *w, rct_widgetindex widgetIndex, char *text); static rct_window_event_list window_cheats_money_events = @@ -475,7 +475,7 @@ static rct_window_event_list *window_cheats_page_events[] = #define MAIN_CHEAT_ENABLED_WIDGETS (1ULL << WIDX_CLOSE) | (1ULL << WIDX_TAB_1) | (1ULL << WIDX_TAB_2) | (1ULL << WIDX_TAB_3) | (1ULL << WIDX_TAB_4) -static uint64 window_cheats_page_enabled_widgets[] = { +static uint64_t window_cheats_page_enabled_widgets[] = { MAIN_CHEAT_ENABLED_WIDGETS | (1ULL << WIDX_NO_MONEY) | (1ULL << WIDX_ADD_SET_MONEY_GROUP) | @@ -573,7 +573,7 @@ static uint64 window_cheats_page_enabled_widgets[] = { (1ULL << WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES) }; -static uint64 window_cheats_page_hold_down_widgets[] = { +static uint64_t window_cheats_page_hold_down_widgets[] = { (1ULL << WIDX_MONEY_SPINNER_INCREMENT) | (1ULL << WIDX_MONEY_SPINNER_DECREMENT) | (1ULL << WIDX_ADD_MONEY) | @@ -754,7 +754,7 @@ static void window_cheats_misc_mousedown(rct_window *w, rct_widgetindex widgetIn } } -static void window_cheats_misc_dropdown([[maybe_unused]] rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_cheats_misc_dropdown([[maybe_unused]] rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) { @@ -767,7 +767,7 @@ static void window_cheats_misc_dropdown([[maybe_unused]] rct_window * w, rct_wid } else if (widgetIndex == WIDX_STAFF_SPEED_DROPDOWN_BUTTON) { - sint32 speed = CHEATS_STAFF_FAST_SPEED; + int32_t speed = CHEATS_STAFF_FAST_SPEED; switch (dropdownIndex) { case 0: @@ -1083,7 +1083,7 @@ static void window_cheats_update(rct_window *w) static void window_cheats_invalidate(rct_window *w) { - sint32 i; + int32_t i; rct_widget *widgets = window_cheats_page_widgets[w->page]; if (w->widgets != widgets) @@ -1108,7 +1108,7 @@ static void window_cheats_invalidate(rct_window *w) case WINDOW_CHEATS_PAGE_MONEY:{ widget_set_checkbox_value(w, WIDX_NO_MONEY, gParkFlags & PARK_FLAGS_NO_MONEY); - uint64 money_widgets = (1 << WIDX_ADD_SET_MONEY_GROUP) | (1 << WIDX_MONEY_SPINNER) | (1 << WIDX_MONEY_SPINNER_INCREMENT) | + uint64_t money_widgets = (1 << WIDX_ADD_SET_MONEY_GROUP) | (1 << WIDX_MONEY_SPINNER) | (1 << WIDX_MONEY_SPINNER_INCREMENT) | (1 << WIDX_MONEY_SPINNER_DECREMENT) | (1 << WIDX_ADD_MONEY) | (1 << WIDX_SET_MONEY) | (1 << WIDX_CLEAR_LOAN); if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -1120,7 +1120,7 @@ static void window_cheats_invalidate(rct_window *w) } }break; case WINDOW_CHEATS_PAGE_GUESTS: - set_format_arg(0, sint32, 10000); + set_format_arg(0, int32_t, 10000); widget_set_checkbox_value(w, WIDX_GUEST_IGNORE_RIDE_INTENSITY, gCheatsIgnoreRideIntensity); widget_set_checkbox_value(w, WIDX_DISABLE_VANDALISM, gCheatsDisableVandalism); widget_set_checkbox_value(w, WIDX_DISABLE_LITTERING, gCheatsDisableLittering); @@ -1134,7 +1134,7 @@ static void window_cheats_invalidate(rct_window *w) widget_set_checkbox_value(w, WIDX_DISABLE_PLANT_AGING, gCheatsDisablePlantAging); break; case WINDOW_CHEATS_PAGE_RIDES: - set_format_arg(0, uint16, 255); + set_format_arg(0, uint16_t, 255); widget_set_checkbox_value(w, WIDX_FAST_LIFT_HILL, gCheatsFastLiftHill); widget_set_checkbox_value(w, WIDX_DISABLE_BRAKES_FAILURE, gCheatsDisableBrakesFailure); widget_set_checkbox_value(w, WIDX_DISABLE_ALL_BREAKDOWNS, gCheatsDisableAllBreakdowns); @@ -1163,13 +1163,13 @@ static void window_cheats_paint(rct_window *w, rct_drawpixelinfo *dpi) if (w->page == WINDOW_CHEATS_PAGE_MONEY) { - uint8 colour = w->colours[1]; + uint8_t colour = w->colours[1]; set_format_arg(0, money32, _moneySpinnerValue); if (widget_is_disabled(w, WIDX_MONEY_SPINNER)) { colour |= COLOUR_FLAG_INSET; } - sint32 actual_month = month_spinner_value - 1; + int32_t actual_month = month_spinner_value - 1; gfx_draw_string_left(dpi, STR_BOTTOM_TOOLBAR_CASH, gCommonFormatArgs, colour, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO); gfx_draw_string_left(dpi, STR_YEAR, nullptr, COLOUR_BLACK, w->x + XPL(0) + TXTO, w->y + YPL(7) + TXTO); gfx_draw_string_left(dpi, STR_MONTH, nullptr, COLOUR_BLACK, w->x + XPL(0) + TXTO, w->y + YPL(8) + TXTO); @@ -1199,7 +1199,7 @@ static void window_cheats_paint(rct_window *w, rct_drawpixelinfo *dpi) static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) { - sint32 sprite_idx; + int32_t sprite_idx; // Money tab if (!(w->disabled_widgets & (1 << WIDX_TAB_1))) @@ -1236,7 +1236,7 @@ static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) } } -static void window_cheats_set_page(rct_window *w, sint32 page) +static void window_cheats_set_page(rct_window *w, int32_t page) { w->page = page; w->frame_no = 0; @@ -1248,11 +1248,11 @@ static void window_cheats_set_page(rct_window *w, sint32 page) w->event_handlers = window_cheats_page_events[page]; w->widgets = window_cheats_page_widgets[page]; - sint32 maxY = 0; + int32_t maxY = 0; rct_widget *widget = &w->widgets[WIDX_TAB_CONTENT]; while (widget->type != WWT_LAST) { - maxY = std::max(maxY, (sint32) widget->bottom); + maxY = std::max(maxY, (int32_t) widget->bottom); widget++; } maxY += 6; diff --git a/src/openrct2-ui/windows/ClearScenery.cpp b/src/openrct2-ui/windows/ClearScenery.cpp index 71770612d9..ad8a5e0733 100644 --- a/src/openrct2-ui/windows/ClearScenery.cpp +++ b/src/openrct2-ui/windows/ClearScenery.cpp @@ -175,7 +175,7 @@ static void window_clear_scenery_mousedown(rct_window * w, rct_widgetindex widge static void window_clear_scenery_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text) { - sint32 size; + int32_t size; char* end; if (widgetIndex != WIDX_PREVIEW || text == nullptr) @@ -231,7 +231,7 @@ static void window_clear_scenery_invalidate(rct_window *w) */ static void window_clear_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; window_draw_widgets(w, dpi); diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 5c078b5ece..fb66b3c30e 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -44,7 +44,7 @@ static rct_widget window_custom_currency_widgets[] = { static void custom_currency_window_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); static void custom_currency_window_mouseup(rct_window *w, rct_widgetindex widgetIndex); -static void custom_currency_window_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void custom_currency_window_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void custom_currency_window_text_input(struct rct_window *w, rct_widgetindex widgetIndex, char *text); static void custom_currency_window_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -195,14 +195,14 @@ static void custom_currency_window_mouseup(rct_window *w, rct_widgetindex widget STR_RATE_INPUT_TITLE, STR_RATE_INPUT_DESC, STR_FORMAT_INTEGER, - (uint32)CurrencyDescriptors[CURRENCY_CUSTOM].rate, + (uint32_t)CurrencyDescriptors[CURRENCY_CUSTOM].rate, CURRENCY_RATE_MAX_NUM_DIGITS ); break; } } -static void custom_currency_window_dropdown([[maybe_unused]] rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void custom_currency_window_dropdown([[maybe_unused]] rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if(dropdownIndex == -1) return; @@ -230,7 +230,7 @@ static void custom_currency_window_text_input([[maybe_unused]] struct rct_window { if (text == nullptr) return; - sint32 rate; + int32_t rate; char* end; switch(widgetIndex){ case WIDX_SYMBOL_TEXT: @@ -265,9 +265,9 @@ static void custom_currency_window_text_input([[maybe_unused]] struct rct_window static void custom_currency_window_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; - set_format_arg(0, sint32, 100); + set_format_arg(0, int32_t, 100); window_draw_widgets(w, dpi); @@ -276,8 +276,8 @@ static void custom_currency_window_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_RATE, nullptr, w->colours[1], x, y); - sint32 baseExchange = CurrencyDescriptors[CURRENCY_POUNDS].rate; - set_format_arg(0, sint32, baseExchange); + int32_t baseExchange = CurrencyDescriptors[CURRENCY_POUNDS].rate; + set_format_arg(0, int32_t, baseExchange); gfx_draw_string_left(dpi, STR_CUSTOM_CURRENCY_EQUIVALENCY, gCommonFormatArgs, w->colours[1], x + 200, y); y += 20; diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index 3a4eeb4d8b..c5256cd750 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -18,7 +18,7 @@ #include #include -static sint32 ResizeLanguage = LANGUAGE_UNDEFINED; +static int32_t ResizeLanguage = LANGUAGE_UNDEFINED; // clang-format off enum WINDOW_DEBUG_PAINT_WIDGET_IDX @@ -156,14 +156,14 @@ static void window_debug_paint_invalidate(rct_window * w) window_invalidate(w); // Find the width of the longest string - sint16 newWidth = 0; + int16_t newWidth = 0; for (size_t widgetIndex = WIDX_TOGGLE_SHOW_WIDE_PATHS; widgetIndex <= WIDX_TOGGLE_SHOW_DIRTY_VISUALS; widgetIndex++) { auto stringIdx = w->widgets[widgetIndex].text; auto string = ls.GetString(stringIdx); Guard::ArgumentNotNull(string); auto width = gfx_get_string_width(string); - newWidth = std::max(width, newWidth); + newWidth = std::max(width, newWidth); } // Add padding for both sides (8) and the offset for the text after the checkbox (15) diff --git a/src/openrct2-ui/windows/DemolishRidePrompt.cpp b/src/openrct2-ui/windows/DemolishRidePrompt.cpp index 945dac2d60..214bef4dae 100644 --- a/src/openrct2-ui/windows/DemolishRidePrompt.cpp +++ b/src/openrct2-ui/windows/DemolishRidePrompt.cpp @@ -120,7 +120,7 @@ static rct_window_event_list window_ride_refurbish_events = { }; /** Based off of rct2: 0x006B486A */ -rct_window * window_ride_demolish_prompt_open(sint32 rideIndex) +rct_window * window_ride_demolish_prompt_open(int32_t rideIndex) { rct_window *w; @@ -146,7 +146,7 @@ rct_window * window_ride_demolish_prompt_open(sint32 rideIndex) return w; } -rct_window * window_ride_refurbish_prompt_open(sint32 rideIndex) +rct_window * window_ride_refurbish_prompt_open(int32_t rideIndex) { rct_window *w; @@ -217,11 +217,11 @@ static void window_ride_demolish_paint(rct_window *w, rct_drawpixelinfo *dpi) Ride* ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); set_format_arg(6, money32, _demolishRideCost); - sint32 x = w->x + WW / 2; - sint32 y = w->y + (WH / 2) - 3; + int32_t x = w->x + WW / 2; + int32_t y = w->y + (WH / 2) - 3; if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -240,11 +240,11 @@ static void window_ride_refurbish_paint(rct_window *w, rct_drawpixelinfo *dpi) Ride* ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); set_format_arg(6, money32, _demolishRideCost / 2); - sint32 x = w->x + WW / 2; - sint32 y = w->y + (WH / 2) - 3; + int32_t x = w->x + WW / 2; + int32_t y = w->y + (WH / 2) - 3; if (gParkFlags & PARK_FLAGS_NO_MONEY) { diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 8aae7077da..5a9a3af9c4 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -22,7 +22,7 @@ #define DROPDOWN_ITEM_HEIGHT 12 -sint32 gAppropriateImageDropdownItemsPerRow[] = { +int32_t gAppropriateImageDropdownItemsPerRow[] = { 1, 1, 1, 1, 2, 2, 3, 3, 4, 3, 5, 4, 4, 5, 5, 5, 4, 5, 6, 5, 5, 7, 4, 5, 6, 5, 6, @@ -34,56 +34,56 @@ enum { }; static rct_widget window_dropdown_widgets[] = { - { WWT_IMGBTN, 0, 0, 0, 0, 0, (uint32) SPR_NONE, STR_NONE }, + { WWT_IMGBTN, 0, 0, 0, 0, 0, (uint32_t) SPR_NONE, STR_NONE }, { WIDGETS_END }, }; -static sint32 _dropdown_num_columns; -static sint32 _dropdown_num_rows; -static sint32 _dropdown_item_width; -static sint32 _dropdown_item_height; +static int32_t _dropdown_num_columns; +static int32_t _dropdown_num_rows; +static int32_t _dropdown_item_width; +static int32_t _dropdown_item_height; static bool _dropdown_list_vertically; -sint32 gDropdownNumItems; +int32_t gDropdownNumItems; rct_string_id gDropdownItemsFormat[DROPDOWN_ITEMS_MAX_SIZE]; -sint64 gDropdownItemsArgs[DROPDOWN_ITEMS_MAX_SIZE]; +int64_t gDropdownItemsArgs[DROPDOWN_ITEMS_MAX_SIZE]; static bool _dropdownItemsChecked[DROPDOWN_ITEMS_MAX_SIZE]; static bool _dropdownItemsDisabled[DROPDOWN_ITEMS_MAX_SIZE]; bool gDropdownIsColour; -sint32 gDropdownLastColourHover; -sint32 gDropdownHighlightedIndex; -sint32 gDropdownDefaultIndex; +int32_t gDropdownLastColourHover; +int32_t gDropdownHighlightedIndex; +int32_t gDropdownDefaultIndex; -bool dropdown_is_checked(sint32 index) +bool dropdown_is_checked(int32_t index) { - if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled)) + if (index < 0 || index >= (int32_t)Util::CountOf(_dropdownItemsDisabled)) { return false; } return _dropdownItemsChecked[index]; } -bool dropdown_is_disabled(sint32 index) +bool dropdown_is_disabled(int32_t index) { - if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled)) + if (index < 0 || index >= (int32_t)Util::CountOf(_dropdownItemsDisabled)) { return true; } return _dropdownItemsDisabled[index]; } -void dropdown_set_checked(sint32 index, bool value) +void dropdown_set_checked(int32_t index, bool value) { - if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled)) + if (index < 0 || index >= (int32_t)Util::CountOf(_dropdownItemsDisabled)) { return; } _dropdownItemsChecked[index] = value; } -void dropdown_set_disabled(sint32 index, bool value) +void dropdown_set_disabled(int32_t index, bool value) { - if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled)) + if (index < 0 || index >= (int32_t)Util::CountOf(_dropdownItemsDisabled)) { return; } @@ -136,9 +136,9 @@ static rct_window_event_list window_dropdown_events = { * @param num_items (bx) * @param colour (al) */ -void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items) +void window_dropdown_show_text(int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, size_t num_items) { - sint32 string_width, max_string_width; + int32_t string_width, max_string_width; char buffer[256]; // Calculate the longest string width @@ -165,7 +165,7 @@ void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, * @param colour (al) * @param custom_height (ah) requires flag set as well */ -void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 custom_height, uint8 flags, size_t num_items, sint32 width) +void window_dropdown_show_text_custom_width(int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t custom_height, uint8_t flags, size_t num_items, int32_t width) { rct_window* w; @@ -178,7 +178,7 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u // Set and calculate num items, rows and columns _dropdown_item_width = width; _dropdown_item_height = (flags & DROPDOWN_FLAG_CUSTOM_HEIGHT) ? custom_height : DROPDOWN_ITEM_HEIGHT; - gDropdownNumItems = (sint32)num_items; + gDropdownNumItems = (int32_t)num_items; // There must always be at least one column to prevent dividing by zero if (gDropdownNumItems == 0) { @@ -195,9 +195,9 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u _dropdown_list_vertically = true; width = _dropdown_item_width * _dropdown_num_columns + 3; - sint32 height = _dropdown_item_height * _dropdown_num_rows + 3; - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t height = _dropdown_item_height * _dropdown_num_rows + 3; + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); if (x + width > screenWidth) x = std::max(0, screenWidth - width); if (y + height > screenHeight) @@ -243,9 +243,9 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u * @param itemHeight (ah) * @param numColumns (bl) */ -void window_dropdown_show_image(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 numItems, sint32 itemWidth, sint32 itemHeight, sint32 numColumns) +void window_dropdown_show_image(int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, int32_t numItems, int32_t itemWidth, int32_t itemHeight, int32_t numColumns) { - sint32 width, height; + int32_t width, height; rct_window* w; input_set_flag((INPUT_FLAGS) (INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); @@ -280,8 +280,8 @@ void window_dropdown_show_image(sint32 x, sint32 y, sint32 extray, uint8 colour, width = _dropdown_item_width * _dropdown_num_columns + 3; height = _dropdown_item_height * _dropdown_num_rows + 3; - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); if (x + width > screenWidth) x = std::max(0, screenWidth - width); if (y + height > screenHeight) @@ -319,12 +319,12 @@ void window_dropdown_close() static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 cell_x, cell_y, l, t, r, b, item, image, colour; + int32_t cell_x, cell_y, l, t, r, b, item, image, colour; window_draw_widgets(w, dpi); - sint32 highlightedIndex = gDropdownHighlightedIndex; - for (sint32 i = 0; i < gDropdownNumItems; i++) { + int32_t highlightedIndex = gDropdownHighlightedIndex; + for (int32_t i = 0; i < gDropdownNumItems; i++) { if (_dropdown_list_vertically) { cell_x = i / _dropdown_num_rows; cell_y = i % _dropdown_num_rows; @@ -362,7 +362,7 @@ static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi) item = gDropdownItemsFormat[i]; if (item == DROPDOWN_FORMAT_LAND_PICKER || item == DROPDOWN_FORMAT_COLOUR_PICKER) { // Image item - image = (uint32)gDropdownItemsArgs[i]; + image = (uint32_t)gDropdownItemsArgs[i]; if (item == DROPDOWN_FORMAT_COLOUR_PICKER && highlightedIndex == i) image++; @@ -406,23 +406,23 @@ static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi) * New function based on 6e914e * returns -1 if index is invalid */ -sint32 dropdown_index_from_point(sint32 x, sint32 y, rct_window *w) +int32_t dropdown_index_from_point(int32_t x, int32_t y, rct_window *w) { - sint32 top = y - w->y - 2; + int32_t top = y - w->y - 2; if (top < 0) return -1; - sint32 left = x - w->x; + int32_t left = x - w->x; if (left >= w->width) return -1; left -= 2; if (left < 0) return -1; - sint32 column_no = left / _dropdown_item_width; + int32_t column_no = left / _dropdown_item_width; if (column_no >= _dropdown_num_columns) return -1; - sint32 row_no = top / _dropdown_item_height; + int32_t row_no = top / _dropdown_item_height; if (row_no >= _dropdown_num_rows) return -1; - sint32 dropdown_index; + int32_t dropdown_index; if (_dropdown_list_vertically) dropdown_index = column_no * _dropdown_num_rows + row_no; else @@ -436,11 +436,11 @@ sint32 dropdown_index_from_point(sint32 x, sint32 y, rct_window *w) /** * rct2: 0x006ED43D */ -void window_dropdown_show_colour(rct_window *w, rct_widget *widget, uint8 dropdownColour, uint8 selectedColour) +void window_dropdown_show_colour(rct_window *w, rct_widget *widget, uint8_t dropdownColour, uint8_t selectedColour) { - sint32 defaultIndex = -1; + int32_t defaultIndex = -1; // Set items - for (uint64 i = 0; i < COLOUR_COUNT; i++) + for (uint64_t i = 0; i < COLOUR_COUNT; i++) { if (selectedColour == i) defaultIndex = i; diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index ef7a65c5e0..656927f28c 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -200,7 +200,7 @@ static bool window_editor_bottom_toolbar_check_object_selection() { rct_window *w; - sint32 missingObjectType = Editor::CheckObjectSelection(); + int32_t missingObjectType = Editor::CheckObjectSelection(); if (missingObjectType < 0) { window_close_by_class(WC_EDITOR_OBJECT_SELECTION); return true; @@ -336,7 +336,7 @@ void window_editor_bottom_toolbar_invalidate(rct_window *w) { colour_scheme_update_by_class(w, (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR : WC_EDITOR_TRACK_BOTTOM_TOOLBAR); - uint16 screenWidth = context_get_width(); + uint16_t screenWidth = context_get_width(); window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left = screenWidth - 200; window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right = screenWidth - 1; window_editor_bottom_toolbar_widgets[WIDX_NEXT_STEP_BUTTON].left = screenWidth - 198; @@ -429,10 +429,10 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) w->colours[1], INSET_RECT_F_30); } - sint16 stateX = + int16_t stateX = (window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].right + window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left) / 2 + w->x; - sint16 stateY = w->height - 0x0C + w->y; + int16_t stateY = w->height - 0x0C + w->y; gfx_draw_string_centred(dpi, EditorStepNames[gS6Info.editor_step], stateX, stateY, NOT_TRANSLUCENT(w->colours[2]) | COLOUR_FLAG_OUTLINE, nullptr); @@ -441,16 +441,16 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].left + 6 + w->x, window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + 6 + w->y, 0); - sint32 textColour = NOT_TRANSLUCENT(w->colours[1]); + int32_t textColour = NOT_TRANSLUCENT(w->colours[1]); if (gHoverWidget.window_classification == WC_BOTTOM_TOOLBAR && gHoverWidget.widget_index == WIDX_PREVIOUS_STEP_BUTTON ) { textColour = COLOUR_WHITE; } - sint16 textX = (window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].left + 30 + + int16_t textX = (window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].left + 30 + window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].right) / 2 + w->x; - sint16 textY = window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + 6 + w->y; + int16_t textY = window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + 6 + w->y; rct_string_id stringId = EditorStepNames[gS6Info.editor_step - 1]; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) @@ -465,7 +465,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right - 29 + w->x, window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + 6 + w->y, 0); - sint32 textColour = NOT_TRANSLUCENT(w->colours[1]); + int32_t textColour = NOT_TRANSLUCENT(w->colours[1]); if (gHoverWidget.window_classification == WC_BOTTOM_TOOLBAR && gHoverWidget.widget_index == WIDX_NEXT_STEP_BUTTON @@ -473,9 +473,9 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) textColour = COLOUR_WHITE; } - sint16 textX = (window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left + + int16_t textX = (window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left + window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right - 30) / 2 + w->x; - sint16 textY = window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + 6 + w->y; + int16_t textY = window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + 6 + w->y; rct_string_id stringId = EditorStepNames[gS6Info.editor_step + 1]; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index de3de856f8..4ad63069ad 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -73,17 +73,17 @@ static void window_editor_inventions_list_close(rct_window *w); static void window_editor_inventions_list_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_editor_inventions_list_resize(rct_window *w); static void window_editor_inventions_list_update(rct_window *w); -static void window_editor_inventions_list_scrollgetheight(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_editor_inventions_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_editor_inventions_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_editor_inventions_list_scrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_editor_inventions_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_editor_inventions_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_editor_inventions_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); -static void window_editor_inventions_list_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId); +static void window_editor_inventions_list_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId); static void window_editor_inventions_list_invalidate(rct_window *w); static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); -static void window_editor_inventions_list_drag_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId); -static void window_editor_inventions_list_drag_moved(rct_window* w, sint32 x, sint32 y); +static void window_editor_inventions_list_drag_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId); +static void window_editor_inventions_list_drag_moved(rct_window* w, int32_t x, int32_t y); static void window_editor_inventions_list_drag_paint(rct_window *w, rct_drawpixelinfo *dpi); static rct_string_id window_editor_inventions_list_prepare_name(const rct_research_item * researchItem, bool withGap); @@ -178,17 +178,17 @@ static void move_research_item(rct_research_item *beforeItem); static void research_rides_setup() { // Reset all objects to not required - for (uint8 objectType = OBJECT_TYPE_RIDE; objectType < OBJECT_TYPE_COUNT; objectType++) + for (uint8_t objectType = OBJECT_TYPE_RIDE; objectType < OBJECT_TYPE_COUNT; objectType++) { auto maxObjects = object_entry_group_counts[objectType]; - for (sint32 i = 0; i < maxObjects; i++) + for (int32_t i = 0; i < maxObjects; i++) { Editor::ClearSelectedObject(objectType, i, OBJECT_SELECTION_FLAG_ALL); } } // Set research required for rides in use - for (uint16 rideIndex = 0; rideIndex < MAX_RIDES; rideIndex++) + for (uint16_t rideIndex = 0; rideIndex < MAX_RIDES; rideIndex++) { auto ride = get_ride(rideIndex); if (ride->type != RIDE_TYPE_NULL) @@ -208,7 +208,7 @@ static void research_scenery_groups_setup() for (size_t i = 0; i < Util::CountOf(RequiredSelectedObjects); i++) { const rct_object_entry * object = &RequiredSelectedObjects[i]; - uint8 entry_type, entryIndex; + uint8_t entry_type, entryIndex; if (!find_object_in_entry_group(object, &entry_type, &entryIndex)) continue; @@ -286,7 +286,7 @@ static void move_research_item(rct_research_item *beforeItem) * * rct2: 0x0068558E */ -static rct_research_item *window_editor_inventions_list_get_item_from_scroll_y(sint32 scrollIndex, sint32 y) +static rct_research_item *window_editor_inventions_list_get_item_from_scroll_y(int32_t scrollIndex, int32_t y) { rct_research_item *researchItem; @@ -314,7 +314,7 @@ static rct_research_item *window_editor_inventions_list_get_item_from_scroll_y(s * * rct2: 0x006855BB */ -static rct_research_item *window_editor_inventions_list_get_item_from_scroll_y_include_seps(sint32 scrollIndex, sint32 y) +static rct_research_item *window_editor_inventions_list_get_item_from_scroll_y_include_seps(int32_t scrollIndex, int32_t y) { rct_research_item *researchItem; @@ -338,7 +338,7 @@ static rct_research_item *window_editor_inventions_list_get_item_from_scroll_y_i return researchItem; } -static rct_research_item *get_research_item_at(sint32 x, sint32 y) +static rct_research_item *get_research_item_at(int32_t x, int32_t y) { rct_window *w = window_find_by_class(WC_EDITOR_INVENTION_LIST); if (w != nullptr && w->x <= x && w->y < y && w->x + w->width > x && w->y + w->height > y) { @@ -346,12 +346,12 @@ static rct_research_item *get_research_item_at(sint32 x, sint32 y) rct_widget *widget = &w->widgets[widgetIndex]; if (widgetIndex == WIDX_PRE_RESEARCHED_SCROLL || widgetIndex == WIDX_RESEARCH_ORDER_SCROLL) { gPressedWidget.widget_index = widgetIndex; - sint32 outX, outY, outScrollArea, outScrollId; + int32_t outX, outY, outScrollArea, outScrollId; widget_scroll_get_part(w, widget, x, y, &outX, &outY, &outScrollArea, &outScrollId); if (outScrollArea == SCROLL_PART_VIEW) { outScrollId = outScrollId == 0 ? 0 : 1; - sint32 scrollY = y - (w->y + widget->top) + w->scrolls[outScrollId].v_top + 5; + int32_t scrollY = y - (w->y + widget->top) + w->scrolls[outScrollId].v_top + 5; return window_editor_inventions_list_get_item_from_scroll_y_include_seps(outScrollId, scrollY); } } @@ -484,7 +484,7 @@ static void window_editor_inventions_list_update(rct_window *w) * * rct2: 0x00685239 */ -static void window_editor_inventions_list_scrollgetheight(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_editor_inventions_list_scrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { rct_research_item *researchItem; @@ -508,7 +508,7 @@ static void window_editor_inventions_list_scrollgetheight(rct_window *w, sint32 * * rct2: 0x006852D4 */ -static void window_editor_inventions_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_editor_inventions_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { rct_research_item *researchItem; @@ -528,7 +528,7 @@ static void window_editor_inventions_list_scrollmousedown(rct_window *w, sint32 * * rct2: 0x00685275 */ -static void window_editor_inventions_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_editor_inventions_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { rct_research_item *researchItem; @@ -559,10 +559,10 @@ static void window_editor_inventions_list_tooltip(rct_window* w, rct_widgetindex * * rct2: 0x00685291 */ -static void window_editor_inventions_list_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId) +static void window_editor_inventions_list_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId) { rct_research_item *researchItem; - sint32 scrollIndex; + int32_t scrollIndex; switch (widgetIndex) { case WIDX_PRE_RESEARCHED_SCROLL: @@ -604,7 +604,7 @@ static void window_editor_inventions_list_invalidate(rct_window *w) w->widgets[WIDX_RESIZE].right = w->width - 1; w->widgets[WIDX_RESIZE].bottom = w->height - 1; - sint16 scroll_list_height = (w->height - 88) / 2; + int16_t scroll_list_height = (w->height - 88) / 2; w->widgets[WIDX_PRE_RESEARCHED_SCROLL].bottom = 60 + scroll_list_height; w->widgets[WIDX_PRE_RESEARCHED_SCROLL].right = w->width - 229; @@ -641,7 +641,7 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo rct_widget *widget; rct_research_item *researchItem; rct_string_id stringId; - sint32 x, y, width; + int32_t x, y, width; window_draw_widgets(w, dpi); @@ -679,7 +679,7 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo return; // Preview image - sint32 objectEntryType = OBJECT_TYPE_SCENERY_GROUP; + int32_t objectEntryType = OBJECT_TYPE_SCENERY_GROUP; if (researchItem->type == RESEARCH_ENTRY_TYPE_RIDE) objectEntryType = OBJECT_TYPE_RIDE; @@ -698,7 +698,7 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo x = w->x + widget->left + 1; y = w->y + widget->top + 1; width = widget->right - widget->left - 1; - sint32 height = widget->bottom - widget->top - 1; + int32_t height = widget->bottom - widget->top - 1; if (clip_drawpixelinfo(&clipDPI, dpi, x, y, width, height)) { object_draw_preview(object, &clipDPI, width, height); } @@ -723,14 +723,14 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo * * rct2: 0x006850BD */ -static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { // Draw background - uint8 paletteIndex = ColourMapA[w->colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light; gfx_clear(dpi, paletteIndex); rct_research_item* researchItem = gResearchItems; - sint32 researchItemEndMarker; + int32_t researchItemEndMarker; if (scrollIndex == 1) { @@ -744,9 +744,9 @@ static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpix researchItemEndMarker = RESEARCHED_ITEMS_SEPARATOR; } - sint16 boxWidth = (w->widgets[WIDX_RESEARCH_ORDER_SCROLL].right - w->widgets[WIDX_RESEARCH_ORDER_SCROLL].left); - sint16 columnSplitOffset = boxWidth / 2; - sint32 itemY = -SCROLLABLE_ROW_HEIGHT; + int16_t boxWidth = (w->widgets[WIDX_RESEARCH_ORDER_SCROLL].right - w->widgets[WIDX_RESEARCH_ORDER_SCROLL].left); + int16_t columnSplitOffset = boxWidth / 2; + int32_t itemY = -SCROLLABLE_ROW_HEIGHT; do { itemY += SCROLLABLE_ROW_HEIGHT; @@ -755,7 +755,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpix if (w->research_item == researchItem) { - sint32 top, bottom; + int32_t top, bottom; if (_editorInventionsListDraggedItem == nullptr) { // Highlight @@ -782,7 +782,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpix utf8* groupNamePtr = groupNameBuffer; utf8* vehicleNamePtr = vehicleNameBuffer; - uint8 colour; + uint8_t colour; if (research_item_is_always_researched(researchItem)) { if (w->research_item == researchItem && _editorInventionsListDraggedItem == nullptr) @@ -838,7 +838,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpix static void window_editor_inventions_list_drag_open(rct_research_item *researchItem) { char buffer[256], *ptr; - sint32 stringWidth; + int32_t stringWidth; rct_window *w; window_close_by_class(WC_EDITOR_INVENTION_LIST_DRAG); @@ -881,7 +881,7 @@ static void window_editor_inventions_list_drag_open(rct_research_item *researchI * * rct2: 0x0068549C */ -static void window_editor_inventions_list_drag_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId) +static void window_editor_inventions_list_drag_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId) { rct_window *inventionListWindow = window_find_by_class(WC_EDITOR_INVENTION_LIST); if (inventionListWindow != nullptr) { @@ -898,7 +898,7 @@ static void window_editor_inventions_list_drag_cursor(rct_window *w, rct_widgeti * * rct2: 0x00685412 */ -static void window_editor_inventions_list_drag_moved(rct_window* w, sint32 x, sint32 y) +static void window_editor_inventions_list_drag_moved(rct_window* w, int32_t x, int32_t y) { rct_research_item *researchItem; @@ -924,7 +924,7 @@ static void window_editor_inventions_list_drag_moved(rct_window* w, sint32 x, si static void window_editor_inventions_list_drag_paint(rct_window *w, rct_drawpixelinfo *dpi) { rct_string_id drawString; - sint32 x, y; + int32_t x, y; x = w->x; y = w->y + 2; diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index c02a5f0804..c3e9e69d10 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -60,10 +60,10 @@ enum FILTER_ALL = FILTER_RIDES | FILTER_RCT1 | FILTER_AA | FILTER_LL | FILTER_RCT2 | FILTER_WW | FILTER_TT | FILTER_OO | FILTER_CUSTOM | FILTER_SELECTED | FILTER_NONSELECTED, }; -static constexpr uint8 _numSourceGameItems = 8; +static constexpr uint8_t _numSourceGameItems = 8; -static uint32 _filter_flags; -static uint16 _filter_object_counts[OBJECT_TYPE_COUNT]; +static uint32_t _filter_flags; +static uint16_t _filter_object_counts[OBJECT_TYPE_COUNT]; static char _filter_string[MAX_PATH]; @@ -82,7 +82,7 @@ static char _filter_string[MAX_PATH]; struct ObjectPageDesc { rct_string_id Caption; - uint32 Image; + uint32_t Image; bool IsAdvanced; }; @@ -167,15 +167,15 @@ static void window_editor_object_selection_close(rct_window *w); static void window_editor_object_selection_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_editor_object_selection_resize(rct_window *w); static void window_editor_object_selection_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_editor_object_selection_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_editor_object_selection_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_editor_object_selection_update(rct_window *w); -static void window_editor_object_selection_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_editor_object_selection_scroll_mouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_editor_object_selection_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_editor_object_selection_scroll_mousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_editor_object_selection_scroll_mouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_editor_object_selection_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_editor_object_selection_invalidate(rct_window *w); static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_editor_object_selection_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static rct_window_event_list window_editor_object_selection_events = { @@ -212,22 +212,22 @@ static rct_window_event_list window_editor_object_selection_events = { #pragma endregion -static constexpr const sint32 window_editor_object_selection_animation_loops[] = { 20, 32, 10, 72, 24, 28, 16 }; -static constexpr const sint32 window_editor_object_selection_animation_divisor[] = { 4, 8, 2, 4, 4, 4, 2 }; +static constexpr const int32_t window_editor_object_selection_animation_loops[] = { 20, 32, 10, 72, 24, 28, 16 }; +static constexpr const int32_t window_editor_object_selection_animation_divisor[] = { 4, 8, 2, 4, 4, 4, 2 }; -static void window_editor_object_set_page(rct_window *w, sint32 page); +static void window_editor_object_set_page(rct_window *w, int32_t page); static void window_editor_object_selection_set_pressed_tab(rct_window *w); -static sint32 get_object_from_object_selection(uint8 object_type, sint32 y); +static int32_t get_object_from_object_selection(uint8_t object_type, int32_t y); static void window_editor_object_selection_manage_tracks(); static void editor_load_selected_objects(); -static bool filter_selected(uint8 objectFlags); +static bool filter_selected(uint8_t objectFlags); static bool filter_string(const ObjectRepositoryItem * item); static bool filter_source(const ObjectRepositoryItem * item); static bool filter_chunks(const ObjectRepositoryItem * item); static void filter_update_counts(); static std::string object_get_description(const void * object); -static sint32 get_selected_object_type(rct_window * w); +static int32_t get_selected_object_type(rct_window * w); enum { RIDE_SORT_TYPE, @@ -252,7 +252,7 @@ struct list_item { const ObjectRepositoryItem * repositoryItem; rct_object_entry *entry; rct_object_filters *filter; - uint8 *flags; + uint8_t *flags; }; static rct_string_id get_ride_type_string_id(const ObjectRepositoryItem * item); @@ -260,7 +260,7 @@ static rct_string_id get_ride_type_string_id(const ObjectRepositoryItem * item); using sortFunc_t = bool (*)(const list_item &, const list_item &); static std::vector _listItems; -static sint32 _listSortType = RIDE_SORT_TYPE; +static int32_t _listSortType = RIDE_SORT_TYPE; static bool _listSortDescending = false; static void * _loadedObject = nullptr; @@ -281,7 +281,7 @@ static bool visible_list_sort_ride_type(const list_item &a, const list_item &b) { auto rideTypeA = language_get_string(get_ride_type_string_id(a.repositoryItem)); auto rideTypeB = language_get_string(get_ride_type_string_id(b.repositoryItem)); - sint32 result = String::Compare(rideTypeA, rideTypeB); + int32_t result = String::Compare(rideTypeA, rideTypeB); return result != 0 ? result < 0 : visible_list_sort_ride_name(a, b); @@ -289,16 +289,16 @@ static bool visible_list_sort_ride_type(const list_item &a, const list_item &b) static void visible_list_refresh(rct_window *w) { - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); visible_list_dispose(); w->selected_list_item = -1; const ObjectRepositoryItem *items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) { - uint8 selectionFlags = _objectSelectionFlags[i]; + for (int32_t i = 0; i < numObjects; i++) { + uint8_t selectionFlags = _objectSelectionFlags[i]; const ObjectRepositoryItem * item = &items[i]; - uint8 objectType = item->ObjectEntry.flags & 0x0F; + uint8_t objectType = item->ObjectEntry.flags & 0x0F; if (objectType == get_selected_object_type(w) && !(selectionFlags & OBJECT_SELECTION_FLAG_6) && filter_source(item) && filter_string(item) && @@ -357,7 +357,7 @@ static void window_editor_object_selection_init_widgets() { _window_editor_object_selection_widgets_initialised = true; auto tabWidget = widgets[widgets.size() - 2]; - for (sint32 i = 1; i < OBJECT_TYPE_COUNT; i++) + for (int32_t i = 1; i < OBJECT_TYPE_COUNT; i++) { widgets.insert(widgets.end() - 1, tabWidget); } @@ -397,12 +397,12 @@ rct_window * window_editor_object_selection_open() (1 << WIDX_FILTER_CLEAR_BUTTON) | (1 << WIDX_CLOSE) | (1 << WIDX_LIST_SORT_TYPE) | - (((uint32)1) << WIDX_LIST_SORT_RIDE); + (((uint32_t)1) << WIDX_LIST_SORT_RIDE); _filter_flags = gConfigInterface.object_selection_filter_flags; memset(_filter_string, 0, sizeof(_filter_string)); - for (sint32 i = WIDX_TAB_1; i < WIDX_TAB_1 + OBJECT_TYPE_COUNT; i++) + for (int32_t i = WIDX_TAB_1; i < WIDX_TAB_1 + OBJECT_TYPE_COUNT; i++) { window->enabled_widgets |= (1LL << i); } @@ -570,7 +570,7 @@ static void window_editor_object_selection_resize(rct_window *w) void window_editor_object_selection_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - sint32 numSelectionItems = 0; + int32_t numSelectionItems = 0; switch (widgetIndex) { case WIDX_FILTER_DROPDOWN: @@ -614,7 +614,7 @@ void window_editor_object_selection_mousedown(rct_window *w, rct_widgetindex wid _numSourceGameItems + numSelectionItems ); - for (sint32 i = 0; i < _numSourceGameItems; i++) + for (int32_t i = 0; i < _numSourceGameItems; i++) { if (_filter_flags & (1 << i)) { @@ -631,7 +631,7 @@ void window_editor_object_selection_mousedown(rct_window *w, rct_widgetindex wid } } -static void window_editor_object_selection_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_editor_object_selection_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -665,27 +665,27 @@ static void window_editor_object_selection_dropdown(rct_window *w, rct_widgetind * * rct2: 0x006AB031 */ -static void window_editor_object_selection_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_editor_object_selection_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - *height = (sint32)(_listItems.size() * 12); + *height = (int32_t)(_listItems.size() * 12); } /** * * rct2: 0x006AB0B6 */ -static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_editor_object_selection_scroll_mousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { // Used for in-game object selection cheat to prevent crashing the game // when windows attempt to draw objects that don't exist any more window_close_all_except_class(WC_EDITOR_OBJECT_SELECTION); - sint32 selected_object = get_object_from_object_selection(get_selected_object_type(w), y); + int32_t selected_object = get_object_from_object_selection(get_selected_object_type(w), y); if (selected_object == -1) return; list_item * listItem = &_listItems[selected_object]; - uint8 object_selection_flags = *listItem->flags; + uint8_t object_selection_flags = *listItem->flags; if (object_selection_flags & OBJECT_SELECTION_FLAG_6) return; @@ -708,7 +708,7 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint3 return; } - sint32 ebx = 6; + int32_t ebx = 6; // If already selected if (!(object_selection_flags & OBJECT_SELECTION_FLAG_SELECTED)) ebx = 7; @@ -738,12 +738,12 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint3 * * rct2: 0x006AB079 */ -static void window_editor_object_selection_scroll_mouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_editor_object_selection_scroll_mouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 selectedObject = get_object_from_object_selection(get_selected_object_type(w), y); + int32_t selectedObject = get_object_from_object_selection(get_selected_object_type(w), y); if (selectedObject != -1) { list_item * listItem = &_listItems[selectedObject]; - uint8 objectSelectionFlags = *listItem->flags; + uint8_t objectSelectionFlags = *listItem->flags; if (objectSelectionFlags & OBJECT_SELECTION_FLAG_6) { selectedObject = -1; } @@ -830,8 +830,8 @@ static void window_editor_object_selection_invalidate(rct_window *w) // Align tabs, hide advanced ones bool advancedMode = (w->list_information_type & 1) != 0; - sint32 x = 3; - for (sint32 i = 0; i < OBJECT_TYPE_COUNT; i++) + int32_t x = 3; + for (int32_t i = 0; i < OBJECT_TYPE_COUNT; i++) { auto widget = &w->widgets[WIDX_TAB_1 + i]; if ((!advancedMode && ObjectSelectionPages[i].IsAdvanced) || @@ -850,7 +850,7 @@ static void window_editor_object_selection_invalidate(rct_window *w) if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TRACK_DESIGNER)) { w->widgets[WIDX_ADVANCED].type = WWT_EMPTY; - for (sint32 i = 1; i < OBJECT_TYPE_COUNT; i++) + for (int32_t i = 1; i < OBJECT_TYPE_COUNT; i++) { w->widgets[WIDX_TAB_1 + i].type = WWT_EMPTY; } @@ -882,25 +882,25 @@ static void window_editor_object_selection_invalidate(rct_window *w) (1 << WIDX_FILTER_RIDE_TAB_GENTLE) | (1 << WIDX_FILTER_RIDE_TAB_COASTER) | (1 << WIDX_FILTER_RIDE_TAB_THRILL) | (1 << WIDX_FILTER_RIDE_TAB_WATER) | (1 << WIDX_FILTER_RIDE_TAB_STALL); - for (sint32 i = 0; i < 7; i++) + for (int32_t i = 0; i < 7; i++) w->pressed_widgets &= ~(1 << (WIDX_FILTER_RIDE_TAB_ALL + i)); if ((_filter_flags & FILTER_RIDES) == FILTER_RIDES) w->pressed_widgets |= (1 << WIDX_FILTER_RIDE_TAB_ALL); else { - for (sint32 i = 0; i < 6; i++) + for (int32_t i = 0; i < 6; i++) { if (_filter_flags & (1 << (_numSourceGameItems + i))) - w->pressed_widgets |= (uint64)(1ULL << (WIDX_FILTER_RIDE_TAB_TRANSPORT + i)); + w->pressed_widgets |= (uint64_t)(1ULL << (WIDX_FILTER_RIDE_TAB_TRANSPORT + i)); } } w->widgets[WIDX_FILTER_RIDE_TAB_FRAME].type = WWT_IMGBTN; - for (sint32 i = WIDX_FILTER_RIDE_TAB_ALL; i <= WIDX_FILTER_RIDE_TAB_STALL; i++) + for (int32_t i = WIDX_FILTER_RIDE_TAB_ALL; i <= WIDX_FILTER_RIDE_TAB_STALL; i++) w->widgets[i].type = WWT_TAB; - sint32 width_limit = (w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left - 15) / 2; + int32_t width_limit = (w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left - 15) / 2; w->widgets[WIDX_LIST_SORT_TYPE].type = WWT_TABLE_HEADER; w->widgets[WIDX_LIST_SORT_TYPE].top = w->widgets[WIDX_FILTER_STRING_BUTTON].bottom + 3; @@ -921,7 +921,7 @@ static void window_editor_object_selection_invalidate(rct_window *w) w->enabled_widgets &= ~((1 << WIDX_FILTER_RIDE_TAB_ALL) | (1 << WIDX_FILTER_RIDE_TAB_TRANSPORT) | (1 << WIDX_FILTER_RIDE_TAB_GENTLE) | (1 << WIDX_FILTER_RIDE_TAB_COASTER) | (1 << WIDX_FILTER_RIDE_TAB_THRILL) | (1 << WIDX_FILTER_RIDE_TAB_WATER) | (1 << WIDX_FILTER_RIDE_TAB_STALL)); - for (sint32 i = WIDX_FILTER_RIDE_TAB_FRAME; i <= WIDX_FILTER_RIDE_TAB_STALL; i++) + for (int32_t i = WIDX_FILTER_RIDE_TAB_FRAME; i <= WIDX_FILTER_RIDE_TAB_STALL; i++) w->widgets[i].type = WWT_EMPTY; w->widgets[WIDX_LIST_SORT_TYPE].type = WWT_EMPTY; @@ -935,7 +935,7 @@ static void window_editor_object_selection_invalidate(rct_window *w) */ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i, x, y, width; + int32_t i, x, y, width; rct_widget *widget; rct_object_entry *highlightedEntry; rct_string_id stringId; @@ -955,8 +955,8 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf } } - const sint32 ride_tabs[] = { SPR_TAB_RIDE_16, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_TRANSPORT_0, SPR_TAB_RIDES_GENTLE_0, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_ROLLER_COASTERS_0, SPR_TAB_RIDES_THRILL_0, SPR_TAB_RIDES_WATER_0, SPR_TAB_RIDES_SHOP_0, SPR_TAB_FINANCES_RESEARCH_0 }; - const sint32 ThrillRidesTabAnimationSequence[] = { + const int32_t ride_tabs[] = { SPR_TAB_RIDE_16, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_TRANSPORT_0, SPR_TAB_RIDES_GENTLE_0, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_ROLLER_COASTERS_0, SPR_TAB_RIDES_THRILL_0, SPR_TAB_RIDES_WATER_0, SPR_TAB_RIDES_SHOP_0, SPR_TAB_FINANCES_RESEARCH_0 }; + const int32_t ThrillRidesTabAnimationSequence[] = { 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0 }; @@ -968,8 +968,8 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf if (widget->type == WWT_EMPTY) continue; - sint32 spriteIndex = ride_tabs[i]; - sint32 frame = 0; + int32_t spriteIndex = ride_tabs[i]; + int32_t frame = 0; if (i != 0 && w->pressed_widgets & (1ULL << (WIDX_FILTER_RIDE_TAB_ALL + i))) { frame = w->frame_no / window_editor_object_selection_animation_divisor[i - 1]; } @@ -998,13 +998,13 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf x = w->x + 3; y = w->y + w->height - 13; - sint32 numSelected = _numSelectedObjectsForType[get_selected_object_type(w)]; - sint32 totalSelectable = object_entry_group_counts[get_selected_object_type(w)]; + int32_t numSelected = _numSelectedObjectsForType[get_selected_object_type(w)]; + int32_t totalSelectable = object_entry_group_counts[get_selected_object_type(w)]; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) totalSelectable = 4; - set_format_arg(0, uint16, numSelected); - set_format_arg(2, uint16, totalSelectable); + set_format_arg(0, uint16_t, numSelected); + set_format_arg(2, uint16_t, totalSelectable); gfx_draw_string_left(dpi, STR_OBJECT_SELECTION_SELECTION_SIZE, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1034,7 +1034,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf x = w->x + widget->left + 1; y = w->y + widget->top + 1; width = widget->right - widget->left - 1; - sint32 height = widget->bottom - widget->top - 1; + int32_t height = widget->bottom - widget->top - 1; if (clip_drawpixelinfo(&clipDPI, dpi, x, y, width, height)) { object_draw_preview(_loadedObject, &clipDPI, width, height); } @@ -1088,13 +1088,13 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf * * rct2: 0x006AADA3 */ -static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 x, y, colour, colour2; + int32_t x, y, colour, colour2; bool ridePage = (get_selected_object_type(w) == OBJECT_TYPE_RIDE); - uint8 paletteIndex = ColourMapA[w->colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light; gfx_clear(dpi, paletteIndex); y = 0; @@ -1136,7 +1136,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; } - sint32 width_limit = (w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left - x) / 2; + int32_t width_limit = (w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left - x) / 2; if (ridePage) { // Draw ride type @@ -1160,7 +1160,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi } } -static void window_editor_object_set_page(rct_window *w, sint32 page) +static void window_editor_object_set_page(rct_window *w, int32_t page) { if (w->selected_tab == page) return; @@ -1185,7 +1185,7 @@ static void window_editor_object_set_page(rct_window *w, sint32 page) static void window_editor_object_selection_set_pressed_tab(rct_window *w) { - for (sint32 i = 0; i < OBJECT_TYPE_COUNT; i++) + for (int32_t i = 0; i < OBJECT_TYPE_COUNT; i++) { w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); } @@ -1200,9 +1200,9 @@ static void window_editor_object_selection_set_pressed_tab(rct_window *w) * * rct2: 0x006AA703 */ -static sint32 get_object_from_object_selection(uint8 object_type, sint32 y) +static int32_t get_object_from_object_selection(uint8_t object_type, int32_t y) { - sint32 listItemIndex = y / 12; + int32_t listItemIndex = y / 12; if (listItemIndex < 0 || (size_t)listItemIndex >= _listItems.size()) return -1; @@ -1220,11 +1220,11 @@ static void window_editor_object_selection_manage_tracks() gS6Info.editor_step = EDITOR_STEP_TRACK_DESIGNS_MANAGER; - sint32 entry_index = 0; + int32_t entry_index = 0; for (; object_entry_get_chunk(OBJECT_TYPE_RIDE, entry_index) == nullptr; entry_index++); rct_ride_entry* ride_entry = get_ride_entry(entry_index); - uint8 ride_type = ride_entry_get_first_non_null_ride_type(ride_entry); + uint8_t ride_type = ride_entry_get_first_non_null_ride_type(ride_entry); auto intent = Intent(WC_TRACK_DESIGN_LIST); intent.putExtra(INTENT_EXTRA_RIDE_TYPE, ride_type); @@ -1238,9 +1238,9 @@ static void window_editor_object_selection_manage_tracks() */ static void editor_load_selected_objects() { - sint32 numItems = (sint32)object_repository_get_items_count(); + int32_t numItems = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numItems; i++) { + for (int32_t i = 0; i < numItems; i++) { if (_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_SELECTED) { const ObjectRepositoryItem * item = &items[i]; const rct_object_entry * entry = &item->ObjectEntry; @@ -1252,11 +1252,11 @@ static void editor_load_selected_objects() } else if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) { // Defaults selected items to researched (if in-game) - uint8 objectType = object_entry_get_type(entry); - uint8 entryIndex = object_manager_get_loaded_object_entry_index(loadedObject); + uint8_t objectType = object_entry_get_type(entry); + uint8_t entryIndex = object_manager_get_loaded_object_entry_index(loadedObject); if (objectType == OBJECT_TYPE_RIDE) { rct_ride_entry *rideEntry = get_ride_entry(entryIndex); - uint8 rideType = ride_entry_get_first_non_null_ride_type(rideEntry); + uint8_t rideType = ride_entry_get_first_non_null_ride_type(rideEntry); research_insert(1, RESEARCH_ENTRY_RIDE_MASK | (rideType << 8) | entryIndex, rideEntry->category[0]); } else if (objectType == OBJECT_TYPE_SCENERY_GROUP) { @@ -1307,7 +1307,7 @@ static void window_editor_object_selection_textinput(rct_window *w, rct_widgetin window_invalidate(w); } -static bool filter_selected(uint8 objectFlag) +static bool filter_selected(uint8_t objectFlag) { if (_FILTER_SELECTED == _FILTER_NONSELECTED) { return true; @@ -1347,13 +1347,13 @@ static bool filter_string(const ObjectRepositoryItem * item) safe_strcpy(filter_lower, _filter_string, sizeof(_filter_string)); // Make use of lowercase characters only - for (sint32 i = 0; name_lower[i] != '\0'; i++) + for (int32_t i = 0; name_lower[i] != '\0'; i++) name_lower[i] = (char)tolower(name_lower[i]); - for (sint32 i = 0; type_lower[i] != '\0'; i++) + for (int32_t i = 0; type_lower[i] != '\0'; i++) type_lower[i] = (char)tolower(type_lower[i]); - for (sint32 i = 0; object_path[i] != '\0'; i++) + for (int32_t i = 0; object_path[i] != '\0'; i++) object_path[i] = (char)tolower(object_path[i]); - for (sint32 i = 0; filter_lower[i] != '\0'; i++) + for (int32_t i = 0; filter_lower[i] != '\0'; i++) filter_lower[i] = (char)tolower(filter_lower[i]); // Check if the searched string exists in the name, ride type, or filename @@ -1369,7 +1369,7 @@ static bool filter_source(const ObjectRepositoryItem * item) if (_FILTER_ALL) return true; - uint8 source = object_entry_get_source_game(&item->ObjectEntry); + uint8_t source = object_entry_get_source_game(&item->ObjectEntry); return (_FILTER_RCT1 && source == OBJECT_SOURCE_RCT1) || (_FILTER_AA && source == OBJECT_SOURCE_ADDED_ATTRACTIONS) || (_FILTER_LL && source == OBJECT_SOURCE_LOOPY_LANDSCAPES) || @@ -1392,8 +1392,8 @@ static bool filter_chunks(const ObjectRepositoryItem * item) switch (item->ObjectEntry.flags & 0x0F) { case OBJECT_TYPE_RIDE: - uint8 rideType = 0; - for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) + uint8_t rideType = 0; + for (int32_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { if (item->RideInfo.RideType[i] != RIDE_TYPE_NULL) { @@ -1413,7 +1413,7 @@ static void filter_update_counts() { if (!_FILTER_ALL || strlen(_filter_string) > 0) { const auto &selectionFlags = _objectSelectionFlags; - for (sint32 i = 0; i < 11; i++) { + for (int32_t i = 0; i < 11; i++) { _filter_object_counts[i] = 0; } @@ -1426,7 +1426,7 @@ static void filter_update_counts() filter_chunks(item) && filter_selected(selectionFlags[i]) ) { - uint8 objectType = item->ObjectEntry.flags & 0xF; + uint8_t objectType = item->ObjectEntry.flags & 0xF; _filter_object_counts[objectType]++; } } @@ -1436,9 +1436,9 @@ static void filter_update_counts() static rct_string_id get_ride_type_string_id(const ObjectRepositoryItem * item) { rct_string_id result = STR_NONE; - for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) + for (int32_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { - uint8 rideType = item->RideInfo.RideType[i]; + uint8_t rideType = item->RideInfo.RideType[i]; if (rideType != RIDE_TYPE_NULL) { if (RideGroupManager::RideTypeHasRideGroups(rideType)) @@ -1471,7 +1471,7 @@ static std::string object_get_description(const void * object) } } -static sint32 get_selected_object_type(rct_window * w) +static int32_t get_selected_object_type(rct_window * w) { return w->selected_tab; } diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index 3e809d6f64..37b951dbb2 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -124,7 +124,7 @@ static rct_widget *window_editor_objective_options_widgets[] = { static void window_editor_objective_options_main_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_editor_objective_options_main_resize(rct_window *w); static void window_editor_objective_options_main_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_editor_objective_options_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_editor_objective_options_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_editor_objective_options_main_update(rct_window *w); static void window_editor_objective_options_main_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_editor_objective_options_main_invalidate(rct_window *w); @@ -133,12 +133,12 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi static void window_editor_objective_options_rides_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_editor_objective_options_rides_resize(rct_window *w); static void window_editor_objective_options_rides_update(rct_window *w); -static void window_editor_objective_options_rides_scrollgetheight(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_editor_objective_options_rides_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_editor_objective_options_rides_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_editor_objective_options_rides_scrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_editor_objective_options_rides_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_editor_objective_options_rides_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_editor_objective_options_rides_invalidate(rct_window *w); static void window_editor_objective_options_rides_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); // 0x009A9DF4 static rct_window_event_list window_objective_options_main_events = { @@ -213,7 +213,7 @@ static rct_window_event_list *window_editor_objective_options_page_events[] = { #pragma region Enabled widgets -static uint64 window_editor_objective_options_page_enabled_widgets[] = { +static uint64_t window_editor_objective_options_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | @@ -236,7 +236,7 @@ static uint64 window_editor_objective_options_page_enabled_widgets[] = { (1 << WIDX_TAB_2) }; -static uint64 window_editor_objective_options_page_hold_down_widgets[] = { +static uint64_t window_editor_objective_options_page_hold_down_widgets[] = { (1 << WIDX_OBJECTIVE_ARG_1_INCREASE) | (1 << WIDX_OBJECTIVE_ARG_1_DECREASE) | (1 << WIDX_OBJECTIVE_ARG_2_INCREASE) | @@ -285,7 +285,7 @@ rct_window * window_editor_objective_options_open() static void window_editor_objective_options_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < 2; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); @@ -305,7 +305,7 @@ static void window_editor_objective_options_anchor_border_widgets(rct_window *w) static void window_editor_objective_options_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi) { rct_widget *widget; - sint32 spriteIndex; + int32_t spriteIndex; // Tab 1 widget = &w->widgets[WIDX_TAB_1]; @@ -331,7 +331,7 @@ static void window_editor_objective_options_draw_tab_images(rct_window *w, rct_d * * rct2: 0x00668496 */ -static void window_editor_objective_options_set_page(rct_window *w, sint32 page) +static void window_editor_objective_options_set_page(rct_window *w, int32_t page) { if (w->page == page) return; @@ -357,7 +357,7 @@ static void window_editor_objective_options_set_page(rct_window *w, sint32 page) * * rct2: 0x0067201D */ -static void window_editor_objective_options_set_objective(rct_window *w, sint32 objective) +static void window_editor_objective_options_set_objective(rct_window *w, int32_t objective) { gScenarioObjectiveType = objective; window_invalidate(w); @@ -413,7 +413,7 @@ static void window_editor_objective_options_main_mouseup(rct_window *w, rct_widg window_editor_objective_options_set_page(w, widgetIndex - WIDX_TAB_1); break; case WIDX_PARK_NAME: - set_format_arg(16, uint32, gParkNameArgs); + set_format_arg(16, uint32_t, gParkNameArgs); window_text_input_open(w, WIDX_PARK_NAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, gParkName, 0, 32); break; case WIDX_SCENARIO_NAME: @@ -436,9 +436,9 @@ static void window_editor_objective_options_main_resize(rct_window *w) static void window_editor_objective_options_show_objective_dropdown(rct_window *w) { - sint32 numItems = 0, objectiveType; + int32_t numItems = 0, objectiveType; rct_widget *dropdownWidget; - uint32 parkFlags; + uint32_t parkFlags; dropdownWidget = &w->widgets[WIDX_OBJECTIVE]; parkFlags = gParkFlags; @@ -501,7 +501,7 @@ static void window_editor_objective_options_show_objective_dropdown(rct_window * ); objectiveType = gScenarioObjectiveType; - for (sint32 j = 0; j < numItems; j++) + for (int32_t j = 0; j < numItems; j++) { if (gDropdownItemsArgs[j] - STR_OBJECTIVE_DROPDOWN_NONE == objectiveType) { @@ -513,7 +513,7 @@ static void window_editor_objective_options_show_objective_dropdown(rct_window * static void window_editor_objective_options_show_climate_dropdown(rct_window *w) { - sint32 i; + int32_t i; rct_widget *dropdownWidget; dropdownWidget = &w->widgets[WIDX_CLIMATE]; @@ -537,7 +537,7 @@ static void window_editor_objective_options_show_climate_dropdown(rct_window *w) static void window_editor_objective_options_show_category_dropdown(rct_window *w) { - sint32 i; + int32_t i; rct_widget *dropdownWidget; dropdownWidget = &w->widgets[WIDX_CATEGORY]; @@ -710,9 +710,9 @@ static void window_editor_objective_options_main_mousedown(rct_window *w, rct_wi * * rct2: 0x00671A54 */ -static void window_editor_objective_options_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_editor_objective_options_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { - uint8 newObjectiveType; + uint8_t newObjectiveType; if (dropdownIndex == -1) return; @@ -720,19 +720,19 @@ static void window_editor_objective_options_main_dropdown(rct_window *w, rct_wid switch (widgetIndex) { case WIDX_OBJECTIVE_DROPDOWN: // TODO: Don't rely on string ID order - newObjectiveType = (uint8)(gDropdownItemsArgs[dropdownIndex] - STR_OBJECTIVE_DROPDOWN_NONE); + newObjectiveType = (uint8_t)(gDropdownItemsArgs[dropdownIndex] - STR_OBJECTIVE_DROPDOWN_NONE); if (gScenarioObjectiveType != newObjectiveType) window_editor_objective_options_set_objective(w, newObjectiveType); break; case WIDX_CLIMATE_DROPDOWN: - if (gClimate != (uint8)dropdownIndex) { - gClimate = (uint8)dropdownIndex; + if (gClimate != (uint8_t)dropdownIndex) { + gClimate = (uint8_t)dropdownIndex; window_invalidate(w); } break; case WIDX_CATEGORY_DROPDOWN: - if (gS6Info.category != (uint8)dropdownIndex) { - gS6Info.category = (uint8)dropdownIndex; + if (gS6Info.category != (uint8_t)dropdownIndex) { + gS6Info.category = (uint8_t)dropdownIndex; window_invalidate(w); } break; @@ -745,8 +745,8 @@ static void window_editor_objective_options_main_dropdown(rct_window *w, rct_wid */ static void window_editor_objective_options_main_update(rct_window *w) { - uint32 parkFlags; - uint8 objectiveType; + uint32_t parkFlags; + uint8_t objectiveType; w->frame_no++; window_event_invalidate_call(w); @@ -870,9 +870,9 @@ static void window_editor_objective_options_main_invalidate(rct_window *w) */ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, width; + int32_t x, y, width; rct_string_id stringId; - uint32 arg; + uint32_t arg; window_draw_widgets(w, dpi); window_editor_objective_options_draw_tab_images(w, dpi); @@ -979,7 +979,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi } else { set_format_arg(0, rct_string_id, gParkName); } - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); gfx_draw_string_left_clipped(dpi, STR_WINDOW_PARK_NAME, gCommonFormatArgs, COLOUR_BLACK, x, y, width); // Scenario name @@ -989,7 +989,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi if (stex != nullptr) { set_format_arg(0, rct_string_id, stex->scenario_name); - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); } else { set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, const char *, gS6Info.name); @@ -1009,7 +1009,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi if (stex != nullptr) { set_format_arg(0, rct_string_id, stex->details); - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); } else { set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, const char *, gS6Info.details); @@ -1060,7 +1060,7 @@ static void window_editor_objective_options_rides_resize(rct_window *w) */ static void window_editor_objective_options_rides_update(rct_window *w) { - sint32 i, numItems; + int32_t i, numItems; Ride *ride; w->frame_no++; @@ -1086,7 +1086,7 @@ static void window_editor_objective_options_rides_update(rct_window *w) * * rct2: 0x006724BF */ -static void window_editor_objective_options_rides_scrollgetheight(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_editor_objective_options_rides_scrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *height = w->no_list_items * 12; } @@ -1095,10 +1095,10 @@ static void window_editor_objective_options_rides_scrollgetheight(rct_window *w, * * rct2: 0x006724FC */ -static void window_editor_objective_options_rides_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_editor_objective_options_rides_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { Ride *ride; - sint32 i; + int32_t i; i = y / 12; if (i < 0 || i >= w->no_list_items) @@ -1113,9 +1113,9 @@ static void window_editor_objective_options_rides_scrollmousedown(rct_window *w, * * rct2: 0x006724CC */ -static void window_editor_objective_options_rides_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_editor_objective_options_rides_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 i; + int32_t i; i = y / 12; if (i < 0 || i >= w->no_list_items) @@ -1164,16 +1164,16 @@ static void window_editor_objective_options_rides_paint(rct_window *w, rct_drawp * * rct2: 0x0067236F */ -static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { rct_string_id stringId; Ride *ride; - sint32 colour = ColourMapA[w->colours[1]].mid_light; + int32_t colour = ColourMapA[w->colours[1]].mid_light; gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, colour); - for (sint32 i = 0; i < w->no_list_items; i++) { - sint32 y = i * 12; + for (int32_t i = 0; i < w->no_list_items; i++) { + int32_t y = i * 12; if (y + 12 < dpi->y || y >= dpi->y + dpi->height) continue; @@ -1208,7 +1208,7 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct static void window_editor_objective_options_update_disabled_widgets(rct_window *w) { Ride *ride; - sint32 i, numRides; + int32_t i, numRides; // Check if there are any rides (not shops or facilities) numRides = 0; diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index 7166e2b5ec..c843d6c50b 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -175,7 +175,7 @@ static void window_editor_scenario_options_guests_paint(rct_window *w, rct_drawp static void window_editor_scenario_options_park_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_editor_scenario_options_park_resize(rct_window *w); static void window_editor_scenario_options_park_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_editor_scenario_options_park_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_editor_scenario_options_park_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_editor_scenario_options_park_update(rct_window *w); static void window_editor_scenario_options_park_invalidate(rct_window *w); static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -292,7 +292,7 @@ static rct_window_event_list *window_editor_scenario_options_page_events[] = { (1ULL << WIDX_TAB_2) |\ (1ULL << WIDX_TAB_3) -static uint64 window_editor_scenario_options_page_enabled_widgets[] = { +static uint64_t window_editor_scenario_options_page_enabled_widgets[] = { ALWAYS_ENABLED_WIDGETS | (1ULL << WIDX_NO_MONEY) | (1ULL << WIDX_INITIAL_CASH_INCREASE) | @@ -331,7 +331,7 @@ static uint64 window_editor_scenario_options_page_enabled_widgets[] = { (1ULL << WIDX_HARD_GUEST_GENERATION) }; -static uint32 window_editor_scenario_options_page_hold_down_widgets[] = { +static uint32_t window_editor_scenario_options_page_hold_down_widgets[] = { (1ULL << WIDX_INITIAL_CASH_INCREASE) | (1ULL << WIDX_INITIAL_CASH_DECREASE) | (1ULL << WIDX_INITIAL_LOAN_INCREASE) | @@ -390,7 +390,7 @@ rct_window * window_editor_scenario_options_open() static void window_editor_scenario_options_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_COUNT; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); @@ -414,7 +414,7 @@ static void window_editor_scenario_options_anchor_border_widgets(rct_window *w) static void window_editor_scenario_options_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi) { rct_widget *widget; - sint32 spriteIndex; + int32_t spriteIndex; // Tab 1 widget = &w->widgets[WIDX_TAB_1]; @@ -442,7 +442,7 @@ static void window_editor_scenario_options_draw_tab_images(rct_window *w, rct_dr * * rct2: 0x00668496 */ -static void window_editor_scenario_options_set_page(rct_window *w, sint32 page) +static void window_editor_scenario_options_set_page(rct_window *w, int32_t page) { if (w->page == page) return; @@ -480,7 +480,7 @@ static void window_editor_scenario_options_financial_mouseup(rct_window *w, rct_ break; case WIDX_NO_MONEY: { - sint32 newMoneySetting; + int32_t newMoneySetting; if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { @@ -710,7 +710,7 @@ static void window_editor_scenario_options_financial_invalidate(rct_window *w) if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) || (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) { w->pressed_widgets |= (1 << WIDX_NO_MONEY); - for (sint32 i = WIDX_INITIAL_CASH; i <= WIDX_FORBID_MARKETING; i++) + for (int32_t i = WIDX_INITIAL_CASH; i <= WIDX_FORBID_MARKETING; i++) w->widgets[i].type = WWT_EMPTY; } else { w->pressed_widgets &= ~(1 << WIDX_NO_MONEY); @@ -745,7 +745,7 @@ static void window_editor_scenario_options_financial_invalidate(rct_window *w) */ static void window_editor_scenario_options_financial_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; window_draw_widgets(w, dpi); window_editor_scenario_options_draw_tab_images(w, dpi); @@ -788,7 +788,7 @@ static void window_editor_scenario_options_financial_paint(rct_window *w, rct_dr x = w->x + w->widgets[WIDX_INTEREST_RATE].left + 1; y = w->y + w->widgets[WIDX_INTEREST_RATE].top; - sint16 interestRate = Math::Clamp(INT16_MIN, (sint16)gBankLoanInterestRate, INT16_MAX); + int16_t interestRate = Math::Clamp(INT16_MIN, (int16_t)gBankLoanInterestRate, INT16_MAX); gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &interestRate, COLOUR_BLACK, x, y); } } @@ -1047,7 +1047,7 @@ static void window_editor_scenario_options_guests_invalidate(rct_window *w) */ static void window_editor_scenario_options_guests_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, arg; + int32_t x, y, arg; window_draw_widgets(w, dpi); window_editor_scenario_options_draw_tab_images(w, dpi); @@ -1331,7 +1331,7 @@ static void window_editor_scenario_options_park_mousedown(rct_window *w, rct_wid * * rct2: 0x00671060 */ -static void window_editor_scenario_options_park_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_editor_scenario_options_park_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_PAY_FOR_PARK_OR_RIDES_DROPDOWN && dropdownIndex != -1) { game_do_command( @@ -1364,7 +1364,7 @@ static void window_editor_scenario_options_park_update(rct_window *w) */ static void window_editor_scenario_options_park_invalidate(rct_window *w) { - uint64 pressedWidgets; + uint64_t pressedWidgets; rct_widget *widgets = window_editor_scenario_options_widgets[w->page]; if (w->widgets != widgets) { @@ -1376,7 +1376,7 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w) if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) || (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) { - for (sint32 i = WIDX_LAND_COST; i <= WIDX_ENTRY_PRICE_DECREASE; i++) + for (int32_t i = WIDX_LAND_COST; i <= WIDX_ENTRY_PRICE_DECREASE; i++) w->widgets[i].type = WWT_EMPTY; } else @@ -1436,7 +1436,7 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w) */ static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, arg; + int32_t x, y, arg; rct_string_id stringId; window_draw_widgets(w, dpi); diff --git a/src/openrct2-ui/windows/Error.cpp b/src/openrct2-ui/windows/Error.cpp index 41d7c78b75..212eb628e6 100644 --- a/src/openrct2-ui/windows/Error.cpp +++ b/src/openrct2-ui/windows/Error.cpp @@ -64,7 +64,7 @@ static rct_window_event_list window_error_events = { // clang-format on static char _window_error_text[512]; -static uint16 _window_error_num_lines; +static uint16_t _window_error_num_lines; /** * @@ -76,7 +76,7 @@ static uint16 _window_error_num_lines; rct_window * window_error_open(rct_string_id title, rct_string_id message) { utf8 *dst; - sint32 numLines, fontHeight, x, y, width, height, maxY; + int32_t numLines, fontHeight, x, y, width, height, maxY; rct_window *w; window_close_by_class(WC_ERROR); @@ -121,8 +121,8 @@ rct_window * window_error_open(rct_string_id title, rct_string_id message) window_error_widgets[WIDX_BACKGROUND].right = width; window_error_widgets[WIDX_BACKGROUND].bottom = height; - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); const CursorState * state = context_get_cursor_state(); x = state->x - (width / 2); x = Math::Clamp(0, x, screenWidth); @@ -162,7 +162,7 @@ static void window_error_unknown5(rct_window *w) */ static void window_error_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 t, l, r, b; + int32_t t, l, r, b; l = w->x; t = w->y; diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index 9b74b3a506..833889bbe7 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -183,12 +183,12 @@ static rct_widget *_windowFinancesPageWidgets[] = static void window_finances_summary_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_finances_summary_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_finances_summary_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); +static void window_finances_summary_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); static void window_finances_summary_invertscroll(rct_window *w); static void window_finances_summary_update(rct_window *w); static void window_finances_summary_invalidate(rct_window *w); static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_finances_summary_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_finances_summary_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_finances_financial_graph_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_finances_financial_graph_update(rct_window *w); @@ -212,7 +212,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp static void window_finances_research_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_finances_research_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_finances_research_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_finances_research_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_finances_research_update(rct_window *w); static void window_finances_research_invalidate(rct_window *w); static void window_finances_research_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -438,7 +438,7 @@ static rct_window_event_list *const _windowFinancesPageEvents[] = (1ULL << WIDX_TAB_5) | \ (1ULL << WIDX_TAB_6)) -static constexpr const uint32 WindowFinancesPageEnabledWidgets[] = +static constexpr const uint32_t WindowFinancesPageEnabledWidgets[] = { ALWAYS_ENABLED_WIDGETS | (1ULL << WIDX_SUMMARY_SCROLL) | @@ -471,7 +471,7 @@ static constexpr const uint32 WindowFinancesPageEnabledWidgets[] = (1ULL << WIDX_SCENERY_AND_THEMING) }; -static constexpr const uint32 WindowFinancesPageHoldDownWidgets[] = +static constexpr const uint32_t WindowFinancesPageHoldDownWidgets[] = { (1ULL << WIDX_LOAN_INCREASE) | (1ULL << WIDX_LOAN_DECREASE), @@ -485,14 +485,14 @@ static constexpr const uint32 WindowFinancesPageHoldDownWidgets[] = #pragma endregion -static constexpr const sint32 WindowFinancesTabAnimationLoops[] = +static constexpr const int32_t WindowFinancesTabAnimationLoops[] = { 16, 32, 32, 32, 38, 16 }; -static constexpr const sint32 EXPENDITURE_COLUMN_WIDTH = 80; +static constexpr const int32_t EXPENDITURE_COLUMN_WIDTH = 80; -static sint32 _lastPaintedMonth; +static int32_t _lastPaintedMonth; static constexpr const rct_string_id window_finances_summary_row_labels[RCT_EXPENDITURE_TYPE_COUNT] = { STR_FINANCES_SUMMARY_RIDE_CONSTRUCTION, @@ -512,7 +512,7 @@ static constexpr const rct_string_id window_finances_summary_row_labels[RCT_EXPE }; // clang-format on -static void window_finances_set_page(rct_window *w, sint32 page); +static void window_finances_set_page(rct_window *w, int32_t page); static void window_finances_set_pressed_tab(rct_window *w); static void window_finances_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); @@ -610,12 +610,12 @@ static void window_finances_summary_mousedown(rct_window *w, rct_widgetindex wid } } -static uint16 summary_num_months_available() +static uint16_t summary_num_months_available() { - return std::min(gDateMonthsElapsed, EXPENDITURE_TABLE_MONTH_COUNT); + return std::min(gDateMonthsElapsed, EXPENDITURE_TABLE_MONTH_COUNT); } -static void window_finances_summary_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_finances_summary_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *width = EXPENDITURE_COLUMN_WIDTH * (summary_num_months_available() + 1); } @@ -667,15 +667,15 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); window_finances_draw_tab_images(dpi, w); - sint32 x = w->x + 8; - sint32 y = w->y + 51; + int32_t x = w->x + 8; + int32_t y = w->y + 51; // Expenditure / Income heading draw_string_left_underline(dpi, STR_FINANCES_SUMMARY_EXPENDITURE_INCOME, nullptr, COLOUR_BLACK, x, y); y += 14; // Expenditure / Income row labels - for (sint32 i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) + for (int32_t i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) { // Darken every even row if (i % 2 == 0) @@ -690,7 +690,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) // Loan and interest rate gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_LOAN, nullptr, COLOUR_BLACK, w->x + 8, w->y + 279); - set_format_arg(0, uint16, gBankLoanInterestRate); + set_format_arg(0, uint16_t, gBankLoanInterestRate); gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, gCommonFormatArgs, COLOUR_BLACK, w->x + 167, w->y + 279); // Current cash @@ -709,16 +709,16 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) } } -static void window_finances_summary_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_finances_summary_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 x = 0; - sint32 y = TABLE_CELL_HEIGHT + 2; + int32_t x = 0; + int32_t y = TABLE_CELL_HEIGHT + 2; rct_widget self = w->widgets[WIDX_SUMMARY_SCROLL]; - sint32 row_width = std::max(w->scrolls[0].h_right, self.right - self.left); + int32_t row_width = std::max(w->scrolls[0].h_right, self.right - self.left); // Expenditure / Income row labels - for (sint32 i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) + for (int32_t i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) { // Darken every even row if (i % 2 == 0) @@ -728,18 +728,18 @@ static void window_finances_summary_scrollpaint(rct_window *w, rct_drawpixelinfo } // Expenditure / Income values for each month - sint16 currentMonthYear = gDateMonthsElapsed; - for (sint32 i = summary_num_months_available(); i >= 0; i--) + int16_t currentMonthYear = gDateMonthsElapsed; + for (int32_t i = summary_num_months_available(); i >= 0; i--) { y = 0; - sint16 monthyear = currentMonthYear - i; + int16_t monthyear = currentMonthYear - i; if (monthyear < 0) continue; // Month heading set_format_arg(0, rct_string_id, STR_FINANCES_SUMMARY_MONTH_HEADING); - set_format_arg(2, uint16, monthyear); + set_format_arg(2, uint16_t, monthyear); draw_string_right_underline( dpi, monthyear == currentMonthYear ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING, @@ -752,7 +752,7 @@ static void window_finances_summary_scrollpaint(rct_window *w, rct_drawpixelinfo // Month expenditures money32 profit = 0; - for (sint32 j = 0; j < RCT_EXPENDITURE_TYPE_COUNT; j++) + for (int32_t j = 0; j < RCT_EXPENDITURE_TYPE_COUNT; j++) { money32 expenditure = gExpenditureTable[i][j]; if (expenditure != 0) @@ -836,7 +836,7 @@ static void window_finances_financial_graph_invalidate(rct_window *w) */ static void window_finances_financial_graph_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i, x, y, graphLeft, graphTop, graphRight, graphBottom; + int32_t i, x, y, graphLeft, graphTop, graphRight, graphBottom; window_draw_widgets(w, dpi); window_finances_draw_tab_images(dpi, w); @@ -864,7 +864,7 @@ static void window_finances_financial_graph_paint(rct_window *w, rct_drawpixelin gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], INSET_RECT_F_30); // Calculate the Y axis scale (log2 of highest [+/-]balance) - sint32 yAxisScale = 0; + int32_t yAxisScale = 0; for (i = 0; i < 64; i++) { money32 balance = gCashHistory[i]; if (balance == MONEY32_UNDEFINED) @@ -942,7 +942,7 @@ static void window_finances_park_value_graph_invalidate(rct_window *w) */ static void window_finances_park_value_graph_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i, x, y, graphLeft, graphTop, graphRight, graphBottom; + int32_t i, x, y, graphLeft, graphTop, graphRight, graphBottom; window_draw_widgets(w, dpi); window_finances_draw_tab_images(dpi, w); @@ -968,7 +968,7 @@ static void window_finances_park_value_graph_paint(rct_window *w, rct_drawpixeli gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], INSET_RECT_F_30); // Calculate the Y axis scale (log2 of highest [+/-]balance) - sint32 yAxisScale = 0; + int32_t yAxisScale = 0; for (i = 0; i < 64; i++) { money32 balance = gParkValueHistory[i]; if (balance == MONEY32_UNDEFINED) @@ -1046,7 +1046,7 @@ static void window_finances_profit_graph_invalidate(rct_window *w) */ static void window_finances_profit_graph_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i, x, y, graphLeft, graphTop, graphRight, graphBottom; + int32_t i, x, y, graphLeft, graphTop, graphRight, graphBottom; window_draw_widgets(w, dpi); window_finances_draw_tab_images(dpi, w); @@ -1072,7 +1072,7 @@ static void window_finances_profit_graph_paint(rct_window *w, rct_drawpixelinfo gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], INSET_RECT_F_30); // Calculate the Y axis scale (log2 of highest [+/-]balance) - sint32 yAxisScale = 0; + int32_t yAxisScale = 0; for (i = 0; i < 64; i++) { money32 balance = gWeeklyProfitHistory[i]; if (balance == MONEY32_UNDEFINED) @@ -1139,7 +1139,7 @@ static void window_finances_marketing_update(rct_window *w) */ static void window_finances_marketing_invalidate(rct_window *w) { - sint32 i; + int32_t i; if (w->widgets != _windowFinancesPageWidgets[WINDOW_FINANCES_PAGE_MARKETING]) { w->widgets = _windowFinancesPageWidgets[WINDOW_FINANCES_PAGE_MARKETING]; @@ -1149,12 +1149,12 @@ static void window_finances_marketing_invalidate(rct_window *w) window_finances_set_pressed_tab(w); // Count number of active campaigns - sint32 numActiveCampaigns = 0; + int32_t numActiveCampaigns = 0; for (i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) if (gMarketingCampaignDaysLeft[i] != 0) numActiveCampaigns++; - sint32 y = std::max(1, numActiveCampaigns) * LIST_ROW_HEIGHT + 92; + int32_t y = std::max(1, numActiveCampaigns) * LIST_ROW_HEIGHT + 92; // Update group box positions _windowFinancesMarketingWidgets[WIDX_ACTIVE_CAMPAIGNS_GROUP].bottom = y - 22; @@ -1186,7 +1186,7 @@ static void window_finances_marketing_invalidate(rct_window *w) */ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i, x, y, weeksRemaining; + int32_t i, x, y, weeksRemaining; Ride *ride; window_draw_widgets(w, dpi); @@ -1195,14 +1195,14 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp x = w->x + 8; y = w->y + 62; - sint32 noCampaignsActive = 1; + int32_t noCampaignsActive = 1; for (i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) { if (gMarketingCampaignDaysLeft[i] == 0) continue; noCampaignsActive = 0; set_format_arg(0, rct_string_id, gParkName); - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); // Set special parameters switch (i) { @@ -1210,7 +1210,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp case ADVERTISING_CAMPAIGN_RIDE: ride = get_ride(gMarketingCampaignRideIndex[i]); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); break; case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: set_format_arg(0, rct_string_id, ShopItemStringIds[gMarketingCampaignRideIndex[i]].plural); @@ -1297,7 +1297,7 @@ static void window_finances_research_mouseup(rct_window *w, rct_widgetindex widg static void window_finances_research_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { rct_widget *dropdownWidget; - sint32 i; + int32_t i; if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON) return; @@ -1319,7 +1319,7 @@ static void window_finances_research_mousedown(rct_window *w, rct_widgetindex wi dropdownWidget->right - dropdownWidget->left - 3 ); - sint32 currentResearchLevel = gResearchFundingLevel; + int32_t currentResearchLevel = gResearchFundingLevel; dropdown_set_checked(currentResearchLevel, true); } @@ -1327,7 +1327,7 @@ static void window_finances_research_mousedown(rct_window *w, rct_widgetindex wi * * rct2: 0x0069DB6D */ -static void window_finances_research_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_finances_research_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON || dropdownIndex == -1) return; @@ -1364,17 +1364,17 @@ static void window_finances_research_invalidate(rct_window *w) _windowFinancesResearchWidgets[WIDX_RESEARCH_FUNDING].type = WWT_EMPTY; _windowFinancesResearchWidgets[WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON].type = WWT_EMPTY; } - sint32 currentResearchLevel = gResearchFundingLevel; + int32_t currentResearchLevel = gResearchFundingLevel; // Current funding _windowFinancesResearchWidgets[WIDX_RESEARCH_FUNDING].text = ResearchFundingLevelNames[currentResearchLevel]; // Checkboxes - uint8 activeResearchTypes = gResearchPriorities; - sint32 uncompletedResearchTypes = gResearchUncompletedCategories; - for (sint32 i = 0; i < 7; i++) { - sint32 mask = 1 << i; - sint32 widgetMask = 1ULL << (i + WIDX_TRANSPORT_RIDES); + uint8_t activeResearchTypes = gResearchPriorities; + int32_t uncompletedResearchTypes = gResearchUncompletedCategories; + for (int32_t i = 0; i < 7; i++) { + int32_t mask = 1 << i; + int32_t widgetMask = 1ULL << (i + WIDX_TRANSPORT_RIDES); // Set checkbox disabled if research type is complete if (uncompletedResearchTypes & mask) { @@ -1412,7 +1412,7 @@ static void window_finances_research_paint(rct_window *w, rct_drawpixelinfo *dpi * * rct2: 0x0069CAC5 */ -static void window_finances_set_page(rct_window *w, sint32 page) +static void window_finances_set_page(rct_window *w, int32_t page) { w->page = page; w->frame_no = 0; @@ -1452,19 +1452,19 @@ static void window_finances_set_page(rct_window *w, sint32 page) static void window_finances_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_FINANCES_PAGE_COUNT; i++) w->pressed_widgets &= ~(1ULL << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void window_finances_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex) +static void window_finances_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_1 + page; if (!(w->disabled_widgets & (1LL << widgetIndex))) { if (w->page == page) { - sint32 frame = w->frame_no / 2; + int32_t frame = w->frame_no / 2; if (page == WINDOW_FINANCES_PAGE_SUMMARY) frame %= 8; spriteIndex += frame; diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index f5084a158b..5f06946287 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -100,12 +100,12 @@ static rct_widget window_footpath_widgets[] = { static void window_footpath_close(rct_window * w); static void window_footpath_mouseup(rct_window * w, rct_widgetindex widgetIndex); static void window_footpath_mousedown(rct_window * w, rct_widgetindex widgetIndex, rct_widget * widget); -static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_footpath_update(rct_window * w); -static void window_footpath_toolupdate(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_footpath_tooldown(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_footpath_tooldrag(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_footpath_toolup(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_footpath_toolupdate(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_footpath_tooldown(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_footpath_tooldrag(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_footpath_toolup(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_footpath_invalidate(rct_window * w); static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi); @@ -142,12 +142,12 @@ static rct_window_event_list window_footpath_events = { // clang-format on static money32 _window_footpath_cost; -static sint8 _window_footpath_provisional_path_arrow_timer; -static uint8 _lastUpdatedCameraRotation = UINT8_MAX; +static int8_t _window_footpath_provisional_path_arrow_timer; +static uint8_t _lastUpdatedCameraRotation = UINT8_MAX; static bool _footpathErrorOccured; /** rct2: 0x0098D8B4 */ -static constexpr const uint8 DefaultPathSlope[] = { +static constexpr const uint8_t DefaultPathSlope[] = { 0, SLOPE_IS_IRREGULAR_FLAG, SLOPE_IS_IRREGULAR_FLAG, @@ -167,23 +167,23 @@ static constexpr const uint8 DefaultPathSlope[] = { }; /** rct2: 0x0098D7E0 */ -static constexpr const uint8 ConstructionPreviewImages[][4] = { +static constexpr const uint8_t ConstructionPreviewImages[][4] = { {5, 10, 5, 10}, // Flat {16, 17, 18, 19}, // Upwards {18, 19, 16, 17}, // Downwards }; -static void window_footpath_mousedown_direction(sint32 direction); -static void window_footpath_mousedown_slope(sint32 slope); +static void window_footpath_mousedown_direction(int32_t direction); +static void window_footpath_mousedown_slope(int32_t slope); static void window_footpath_show_footpath_types_dialog(rct_window * w, rct_widget * widget, bool showQueues); -static void window_footpath_set_provisional_path_at_point(sint32 x, sint32 y); -static void window_footpath_set_selection_start_bridge_at_point(sint32 screenX, sint32 screenY); -static void window_footpath_place_path_at_point(sint32 x, sint32 y); -static void window_footpath_start_bridge_at_point(sint32 screenX, sint32 screenY); +static void window_footpath_set_provisional_path_at_point(int32_t x, int32_t y); +static void window_footpath_set_selection_start_bridge_at_point(int32_t screenX, int32_t screenY); +static void window_footpath_place_path_at_point(int32_t x, int32_t y); +static void window_footpath_start_bridge_at_point(int32_t screenX, int32_t screenY); static void window_footpath_construct(); static void window_footpath_remove(); static void window_footpath_set_enabled_and_pressed_widgets(); -static void footpath_get_next_path_info(sint32 * type, sint32 * x, sint32 * y, sint32 * z, sint32 * slope); +static void footpath_get_next_path_info(int32_t * type, int32_t * x, int32_t * y, int32_t * z, int32_t * slope); static bool footpath_select_default(); /** @@ -367,7 +367,7 @@ static void window_footpath_mousedown(rct_window * w, rct_widgetindex widgetInde * * rct2: 0x006A7F18 */ -static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_FOOTPATH_TYPE) { @@ -383,7 +383,7 @@ static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex } // Get path id - sint32 pathId = dropdownIndex; + int32_t pathId = dropdownIndex; if (pathId == -1) { pathId = gFootpathSelectedId; @@ -392,7 +392,7 @@ static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex { bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode); - sint32 i = 0, j = 0; + int32_t i = 0, j = 0; for (; i < MAX_PATH_OBJECTS; i++) { rct_footpath_entry * pathType = get_footpath_entry(i); @@ -425,7 +425,7 @@ static void window_footpath_dropdown(rct_window * w, rct_widgetindex widgetIndex * * rct2: 0x006A8032 */ -static void window_footpath_toolupdate(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_footpath_toolupdate(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_CONSTRUCT_ON_LAND) { @@ -441,7 +441,7 @@ static void window_footpath_toolupdate(rct_window * w, rct_widgetindex widgetInd * * rct2: 0x006A8047 */ -static void window_footpath_tooldown(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_footpath_tooldown(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_CONSTRUCT_ON_LAND) { @@ -457,7 +457,7 @@ static void window_footpath_tooldown(rct_window * w, rct_widgetindex widgetIndex * * rct2: 0x006A8067 */ -static void window_footpath_tooldrag(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_footpath_tooldrag(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_CONSTRUCT_ON_LAND) { @@ -469,7 +469,7 @@ static void window_footpath_tooldrag(rct_window * w, rct_widgetindex widgetIndex * * rct2: 0x006A8066 */ -static void window_footpath_toolup(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_footpath_toolup(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_CONSTRUCT_ON_LAND) { @@ -483,7 +483,7 @@ static void window_footpath_toolup(rct_window * w, rct_widgetindex widgetIndex, */ static void window_footpath_update_provisional_path_for_bridge_mode(rct_window * w) { - sint32 type, x, y, z, slope; + int32_t type, x, y, z, slope; if (gFootpathConstructionMode != PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL) { @@ -537,7 +537,7 @@ static void window_footpath_update(rct_window * w) window_footpath_update_provisional_path_for_bridge_mode(w); // #2502: The camera might have changed rotation, so we need to update which directional buttons are pressed - uint8 currentRotation = get_current_rotation(); + uint8_t currentRotation = get_current_rotation(); if (_lastUpdatedCameraRotation != currentRotation) { _lastUpdatedCameraRotation = currentRotation; @@ -583,7 +583,7 @@ static void window_footpath_update(rct_window * w) */ static void window_footpath_invalidate(rct_window * w) { - sint32 selectedPath; + int32_t selectedPath; rct_footpath_entry * pathType; // Press / unpress footpath and queue type buttons @@ -603,9 +603,9 @@ static void window_footpath_invalidate(rct_window * w) pathType = get_footpath_entry(selectedPath); // TODO: Should probably add constants for object sprites - sint32 pathImage = 71 + pathType->image; + int32_t pathImage = 71 + pathType->image; // Editor-only paths might lack a queue image - sint32 queueImage = (pathType->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) ? pathImage : pathImage + 1; + int32_t queueImage = (pathType->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) ? pathImage : pathImage + 1; window_footpath_widgets[WIDX_FOOTPATH_TYPE].image = pathImage; window_footpath_widgets[WIDX_QUEUELINE_TYPE].image = queueImage; } @@ -621,8 +621,8 @@ static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi) if (!(w->disabled_widgets & (1 << WIDX_CONSTRUCT))) { // Get construction image - uint8 direction = (gFootpathConstructDirection + get_current_rotation()) % 4; - uint8 slope = 0; + uint8_t direction = (gFootpathConstructDirection + get_current_rotation()) % 4; + uint8_t slope = 0; if (gFootpathConstructSlope == 2) { slope = TILE_ELEMENT_SLOPE_N_CORNER_UP; @@ -631,9 +631,9 @@ static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi) { slope = TILE_ELEMENT_SLOPE_E_CORNER_UP; } - sint32 image = ConstructionPreviewImages[slope][direction]; + int32_t image = ConstructionPreviewImages[slope][direction]; - sint32 selectedPath = gFootpathSelectedId; + int32_t selectedPath = gFootpathSelectedId; rct_footpath_entry * pathType = get_footpath_entry(selectedPath); image += pathType->image; if (gFootpathSelectedType != SELECTED_PATH_TYPE_NORMAL) @@ -642,9 +642,9 @@ static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi) } // Draw construction image - sint32 x = w->x + + int32_t x = w->x + (window_footpath_widgets[WIDX_CONSTRUCT].left + window_footpath_widgets[WIDX_CONSTRUCT].right) / 2; - sint32 y = w->y + window_footpath_widgets[WIDX_CONSTRUCT].bottom - 60; + int32_t y = w->y + window_footpath_widgets[WIDX_CONSTRUCT].bottom - 60; gfx_draw_sprite(dpi, image, x, y, 0); // Draw build this... label @@ -654,9 +654,9 @@ static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi) } // Draw cost - sint32 x = w->x + + int32_t x = w->x + (window_footpath_widgets[WIDX_CONSTRUCT].left + window_footpath_widgets[WIDX_CONSTRUCT].right) / 2; - sint32 y = w->y + window_footpath_widgets[WIDX_CONSTRUCT].bottom - 12; + int32_t y = w->y + window_footpath_widgets[WIDX_CONSTRUCT].bottom - 12; if (_window_footpath_cost != MONEY32_UNDEFINED) { if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) @@ -672,7 +672,7 @@ static void window_footpath_paint(rct_window * w, rct_drawpixelinfo * dpi) */ static void window_footpath_show_footpath_types_dialog(rct_window * w, rct_widget * widget, bool showQueues) { - sint32 i, numPathTypes, image; + int32_t i, numPathTypes, image; rct_footpath_entry * pathType; numPathTypes = 0; @@ -718,7 +718,7 @@ static void window_footpath_show_footpath_types_dialog(rct_window * w, rct_widge * * rct2: 0x006A8111 0x006A8135 0x006A815C 0x006A8183 */ -static void window_footpath_mousedown_direction(sint32 direction) +static void window_footpath_mousedown_direction(int32_t direction) { footpath_provisional_update(); gFootpathConstructDirection = (direction - get_current_rotation()) & 3; @@ -730,7 +730,7 @@ static void window_footpath_mousedown_direction(sint32 direction) * * rct2: 0x006A81AA 0x006A81C5 0x006A81E0 */ -static void window_footpath_mousedown_slope(sint32 slope) +static void window_footpath_mousedown_slope(int32_t slope) { footpath_provisional_update(); gFootpathConstructSlope = slope; @@ -742,12 +742,12 @@ static void window_footpath_mousedown_slope(sint32 slope) * * rct2: 0x006A81FB */ -static void window_footpath_set_provisional_path_at_point(sint32 x, sint32 y) +static void window_footpath_set_provisional_path_at_point(int32_t x, int32_t y) { map_invalidate_selection_rect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - sint32 interactionType; + int32_t interactionType; rct_tile_element * tileElement; LocationXY16 mapCoord = {}; get_map_coordinates_from_pos(x, y, VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_TERRAIN, @@ -784,7 +784,7 @@ static void window_footpath_set_provisional_path_at_point(sint32 x, sint32 y) footpath_provisional_update(); // Set provisional path - sint32 slope = 0; + int32_t slope = 0; switch (interactionType) { case VIEWPORT_INTERACTION_ITEM_TERRAIN: @@ -794,7 +794,7 @@ static void window_footpath_set_provisional_path_at_point(sint32 x, sint32 y) slope = tileElement->properties.path.type & (FOOTPATH_PROPERTIES_FLAG_IS_SLOPED | FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK); break; } - sint32 pathType = (gFootpathSelectedType << 7) + (gFootpathSelectedId & 0xFF); + int32_t pathType = (gFootpathSelectedType << 7) + (gFootpathSelectedId & 0xFF); _window_footpath_cost = footpath_provisional_set(pathType, x, y, tileElement->base_height, slope); window_invalidate_by_class(WC_FOOTPATH); @@ -805,9 +805,9 @@ static void window_footpath_set_provisional_path_at_point(sint32 x, sint32 y) * * rct2: 0x006A8388 */ -static void window_footpath_set_selection_start_bridge_at_point(sint32 screenX, sint32 screenY) +static void window_footpath_set_selection_start_bridge_at_point(int32_t screenX, int32_t screenY) { - sint32 x, y, direction; + int32_t x, y, direction; rct_tile_element * tileElement; map_invalidate_selection_rect(); @@ -832,11 +832,11 @@ static void window_footpath_set_selection_start_bridge_at_point(sint32 screenX, gMapSelectArrowPosition.x = x; gMapSelectArrowPosition.y = y; - sint32 z = tileElement->base_height; + int32_t z = tileElement->base_height; if (tileElement->GetType() == TILE_ELEMENT_TYPE_SURFACE) { - uint8 slope = tileElement->properties.surface.slope; + uint8_t slope = tileElement->properties.surface.slope; if (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) { z += 2; @@ -854,9 +854,9 @@ static void window_footpath_set_selection_start_bridge_at_point(sint32 screenX, * * rct2: 0x006A82C5 */ -static void window_footpath_place_path_at_point(sint32 x, sint32 y) +static void window_footpath_place_path_at_point(int32_t x, int32_t y) { - sint32 interactionType, presentType, selectedType, z, cost; + int32_t interactionType, presentType, selectedType, z, cost; rct_tile_element * tileElement; if (_footpathErrorOccured) @@ -912,9 +912,9 @@ static void window_footpath_place_path_at_point(sint32 x, sint32 y) * * rct2: 0x006A840F */ -static void window_footpath_start_bridge_at_point(sint32 screenX, sint32 screenY) +static void window_footpath_start_bridge_at_point(int32_t screenX, int32_t screenY) { - sint32 x, y, z, direction; + int32_t x, y, z, direction; rct_tile_element * tileElement; footpath_bridge_get_info_from_pos(screenX, screenY, &x, &y, &direction, &tileElement); @@ -927,7 +927,7 @@ static void window_footpath_start_bridge_at_point(sint32 screenX, sint32 screenY { // If we start the path on a slope, the arrow is slightly raised, so we // expect the path to be slightly raised as well. - uint8 slope = tileElement->properties.surface.slope; + uint8_t slope = tileElement->properties.surface.slope; z = tileElement->base_height; if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) { @@ -977,7 +977,7 @@ static void window_footpath_construct() _window_footpath_cost = MONEY32_UNDEFINED; footpath_provisional_update(); - sint32 type, x, y, z, slope; + int32_t type, x, y, z, slope; footpath_get_next_path_info(&type, &x, &y, &z, &slope); gGameCommandErrorTitle = STR_CANT_BUILD_FOOTPATH_HERE; @@ -1029,10 +1029,10 @@ static void window_footpath_construct() */ static void footpath_remove_tile_element(rct_tile_element * tileElement) { - sint32 x, y, z; + int32_t x, y, z; z = tileElement->base_height; - sint32 pathType = tileElement->properties.path.type; + int32_t pathType = tileElement->properties.path.type; if (pathType & 4) { pathType &= 3; @@ -1044,7 +1044,7 @@ static void footpath_remove_tile_element(rct_tile_element * tileElement) } // Find a connected edge - sint32 edge = gFootpathConstructDirection ^2; + int32_t edge = gFootpathConstructDirection ^2; if (!(tileElement->properties.path.edges & (1 << edge))) { edge = (edge + 1) & 3; @@ -1089,7 +1089,7 @@ static void footpath_remove_tile_element(rct_tile_element * tileElement) static rct_tile_element * footpath_get_tile_element_to_remove() { rct_tile_element * tileElement; - sint32 x, y, z, zLow; + int32_t x, y, z, zLow; x = gFootpathConstructFromPosition.x / 32; y = gFootpathConstructFromPosition.y / 32; @@ -1175,14 +1175,14 @@ static void window_footpath_set_enabled_and_pressed_widgets() gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags |= MAP_SELECT_FLAG_GREEN; - sint32 direction = gFootpathConstructDirection; + int32_t direction = gFootpathConstructDirection; gMapSelectionTiles[0].x = gFootpathConstructFromPosition.x + CoordsDirectionDelta[direction].x; gMapSelectionTiles[0].y = gFootpathConstructFromPosition.y + CoordsDirectionDelta[direction].y; gMapSelectionTiles[1].x = -1; map_invalidate_map_selection_tiles(); } - uint64 pressedWidgets = w->pressed_widgets & ~( + uint64_t pressedWidgets = w->pressed_widgets & ~( (1LL << WIDX_DIRECTION_NW) | (1LL << WIDX_DIRECTION_NE) | (1LL << WIDX_DIRECTION_SW) | @@ -1191,16 +1191,16 @@ static void window_footpath_set_enabled_and_pressed_widgets() (1LL << WIDX_LEVEL) | (1LL << WIDX_SLOPEUP) ); - uint64 disabledWidgets = 0; - sint32 currentRotation = get_current_rotation(); + uint64_t disabledWidgets = 0; + int32_t currentRotation = get_current_rotation(); if (gFootpathConstructionMode >= PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL) { // Set pressed directional widget - sint32 direction = (gFootpathConstructDirection + currentRotation) & 3; + int32_t direction = (gFootpathConstructDirection + currentRotation) & 3; pressedWidgets |= (1LL << (WIDX_DIRECTION_NW + direction)); // Set pressed slope widget - sint32 slope = gFootpathConstructSlope; + int32_t slope = gFootpathConstructSlope; if (slope == TILE_ELEMENT_SLOPE_SE_SIDE_UP) { pressedWidgets |= (1 << WIDX_SLOPEDOWN); @@ -1254,9 +1254,9 @@ static void window_footpath_set_enabled_and_pressed_widgets() * * rct2: 0x006A7B20 */ -static void footpath_get_next_path_info(sint32 * type, sint32 * x, sint32 * y, sint32 * z, sint32 * slope) +static void footpath_get_next_path_info(int32_t * type, int32_t * x, int32_t * y, int32_t * z, int32_t * slope) { - sint32 direction; + int32_t direction; direction = gFootpathConstructDirection; *x = gFootpathConstructFromPosition.x + CoordsDirectionDelta[direction].x; @@ -1278,8 +1278,8 @@ static void footpath_get_next_path_info(sint32 * type, sint32 * x, sint32 * y, s static bool footpath_select_default() { // Select first available footpath - sint32 footpathId = -1; - for (sint32 i = 0; i < object_entry_group_counts[OBJECT_TYPE_PATHS]; i++) + int32_t footpathId = -1; + for (int32_t i = 0; i < object_entry_group_counts[OBJECT_TYPE_PATHS]; i++) { rct_footpath_entry * pathEntry = get_footpath_entry(i); if (pathEntry != nullptr) diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index ecc8f4e19f..d0038987e9 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -65,18 +65,18 @@ static rct_widget window_game_bottom_toolbar_widgets[] = { WIDGETS_END }, }; -uint8 gToolbarDirtyFlags; +uint8_t gToolbarDirtyFlags; static void window_game_bottom_toolbar_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_game_bottom_toolbar_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_game_bottom_toolbar_invalidate(rct_window *w); static void window_game_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_game_bottom_toolbar_update(rct_window* w); -static void window_game_bottom_toolbar_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId); +static void window_game_bottom_toolbar_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId); static void window_game_bottom_toolbar_unknown05(rct_window *w); static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, rct_window *w); -static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi, rct_window *w, sint32 colour, sint32 x, sint32 y, uint8 factor); +static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi, rct_window *w, int32_t colour, int32_t x, int32_t y, uint8_t factor); static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, rct_window *w); static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo *dpi, rct_window *w); static void window_game_bottom_toolbar_draw_middle_panel(rct_drawpixelinfo *dpi, rct_window *w); @@ -126,12 +126,12 @@ static void window_game_bottom_toolbar_invalidate_dirty_widgets(rct_window *w); */ rct_window * window_game_bottom_toolbar_open() { - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); // Figure out how much line height we have to work with. - uint32 line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); - uint32 toolbar_height = line_height * 2 + 12; + uint32_t line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + uint32_t toolbar_height = line_height * 2 + 12; rct_window * window = window_create( 0, @@ -206,8 +206,8 @@ static void window_game_bottom_toolbar_mouseup(rct_window *w, rct_widgetindex wi { newsItem = news_item_get(0); - sint32 x, y, z; - sint32 subject = newsItem->Assoc; + int32_t x, y, z; + int32_t subject = newsItem->Assoc; news_item_get_subject_location(newsItem->Type, subject, &x, &y, &z); @@ -228,16 +228,16 @@ static void window_game_bottom_toolbar_mouseup(rct_window *w, rct_widgetindex wi static void window_game_bottom_toolbar_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId) { - sint32 month, day; + int32_t month, day; switch (widgetIndex) { case WIDX_MONEY: - set_format_arg(0, sint32, gCurrentProfit); - set_format_arg(4, sint32, gParkValue); + set_format_arg(0, int32_t, gCurrentProfit); + set_format_arg(4, int32_t, gParkValue); break; case WIDX_PARK_RATING: - set_format_arg(0, sint16, gParkRating); + set_format_arg(0, int16_t, gParkRating); break; case WIDX_DATE: month = date_get_month(gDateMonthsElapsed); @@ -256,7 +256,7 @@ static void window_game_bottom_toolbar_tooltip(rct_window* w, rct_widgetindex wi static void window_game_bottom_toolbar_invalidate(rct_window *w) { // Figure out how much line height we have to work with. - uint32 line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + uint32_t line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); // Reset dimensions as appropriate -- in case we're switching languages. w->height = line_height * 2 + 12; @@ -289,7 +289,7 @@ static void window_game_bottom_toolbar_invalidate(rct_window *w) w->widgets[WIDX_DATE].bottom = line_height + 1; // Anchor the middle and right panel to the right - sint32 x = context_get_width(); + int32_t x = context_get_width(); w->width = x; x--; window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right = x; @@ -345,8 +345,8 @@ static void window_game_bottom_toolbar_invalidate(rct_window *w) w->disabled_widgets &= ~(1 << WIDX_NEWS_LOCATE); // Find out if the news item is no longer valid - sint32 y, z; - sint32 subject = newsItem->Assoc; + int32_t y, z; + int32_t subject = newsItem->Assoc; news_item_get_subject_location(newsItem->Type, subject, &x, &y, &z); if (x == LOCATION_NULL) @@ -444,14 +444,14 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r ); // Figure out how much line height we have to work with. - uint32 line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + uint32_t line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); // Draw money if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { rct_widget widget = window_game_bottom_toolbar_widgets[WIDX_MONEY]; - sint32 x = w->x + (widget.left + widget.right) / 2; - sint32 y = w->y + (widget.top + widget.bottom) / 2 - (line_height == 10 ? 5 : 6); + int32_t x = w->x + (widget.left + widget.right) / 2; + int32_t y = w->y + (widget.top + widget.bottom) / 2 - (line_height == 10 ? 5 : 6); set_format_arg(0, money32, gCash); gfx_draw_string_centred( @@ -481,8 +481,8 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r // Draw guests { rct_widget widget = window_game_bottom_toolbar_widgets[WIDX_GUESTS]; - sint32 x = w->x + (widget.left + widget.right) / 2; - sint32 y = w->y + (widget.top + widget.bottom) / 2 - 6; + int32_t x = w->x + (widget.left + widget.right) / 2; + int32_t y = w->y + (widget.top + widget.bottom) / 2 - 6; gfx_draw_string_centred( dpi, @@ -497,8 +497,8 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r // Draw park rating { rct_widget widget = window_game_bottom_toolbar_widgets[WIDX_PARK_RATING]; - sint32 x = w->x + widget.left + 11; - sint32 y = w->y + (widget.top + widget.bottom) / 2 - 5; + int32_t x = w->x + widget.left + 11; + int32_t y = w->y + (widget.top + widget.bottom) / 2 - 5; window_game_bottom_toolbar_draw_park_rating( dpi, @@ -515,9 +515,9 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r * * rct2: 0x0066C76C */ -static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi, rct_window *w, sint32 colour, sint32 x, sint32 y, uint8 factor) +static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi, rct_window *w, int32_t colour, int32_t x, int32_t y, uint8_t factor) { - sint16 bar_width; + int16_t bar_width; bar_width = (factor * 114) / 255; gfx_fill_rect_inset(dpi, x + 1, y + 1, x + 114, y + 9, w->colours[1], INSET_RECT_F_30); @@ -545,18 +545,18 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, INSET_RECT_F_30 ); - sint32 x = (window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right) / 2 + w->x; - sint32 y = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].top + w->y + 2; + int32_t x = (window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right) / 2 + w->x; + int32_t y = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].top + w->y + 2; // Date - sint32 year = date_get_year(gDateMonthsElapsed) + 1; - sint32 month = date_get_month(gDateMonthsElapsed); - sint32 day = ((gDateMonthTicks * days_in_month[month]) >> 16) & 0xFF; + int32_t year = date_get_year(gDateMonthsElapsed) + 1; + int32_t month = date_get_month(gDateMonthsElapsed); + int32_t day = ((gDateMonthTicks * days_in_month[month]) >> 16) & 0xFF; rct_string_id stringId = DateFormatStringFormatIds[gConfigGeneral.date_format]; set_format_arg(0, rct_string_id, DateDayNames[day]); - set_format_arg(2, sint16, month); - set_format_arg(4, sint16, year); + set_format_arg(2, int16_t, month); + set_format_arg(4, int16_t, year); gfx_draw_string_centred( dpi, stringId, @@ -567,20 +567,20 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, ); // Figure out how much line height we have to work with. - uint32 line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + uint32_t line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); // Temperature x = w->x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + 15; y += line_height + 1; - sint32 temperature = gClimateCurrent.Temperature; + int32_t temperature = gClimateCurrent.Temperature; rct_string_id format = STR_CELSIUS_VALUE; if (gConfigGeneral.temperature_format == TEMPERATURE_FORMAT_F) { temperature = climate_celsius_to_fahrenheit(temperature); format = STR_FAHRENHEIT_VALUE; } - set_format_arg(0, sint16, temperature); + set_format_arg(0, int16_t, temperature); gfx_draw_string_left(dpi, format, gCommonFormatArgs, COLOUR_BLACK, x, y + 6); x += 30; @@ -606,7 +606,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, */ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo *dpi, rct_window *w) { - sint32 x, y, width; + int32_t x, y, width; NewsItem *newsItem; rct_widget *middleOutsetWidget; @@ -650,18 +650,18 @@ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo *dpi, rc } rct_peep* peep = GET_PEEP(newsItem->Assoc); - sint32 clip_x = 10, clip_y = 19; + int32_t clip_x = 10, clip_y = 19; if (peep->type == PEEP_TYPE_STAFF && peep->staff_type == STAFF_TYPE_ENTERTAINER) { clip_y += 3; } - uint32 image_id_base = g_peep_animation_entries[peep->sprite_type].sprite_animation->base_image; + uint32_t image_id_base = g_peep_animation_entries[peep->sprite_type].sprite_animation->base_image; image_id_base += w->frame_no & 0xFFFFFFFC; image_id_base++; - uint32 image_id = image_id_base; + uint32_t image_id = image_id_base; image_id |= SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour, peep->trousers_colour); gfx_draw_sprite(&cliped_dpi, image_id, clip_x, clip_y, 0); @@ -722,11 +722,11 @@ static void window_game_bottom_toolbar_draw_middle_panel(rct_drawpixelinfo *dpi, ); // Figure out how much line height we have to work with. - uint32 line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + uint32_t line_height = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); - sint32 x = w->x + (middleOutsetWidget->left + middleOutsetWidget->right) / 2; - sint32 y = w->y + middleOutsetWidget->top + line_height + 1; - sint32 width = middleOutsetWidget->right - middleOutsetWidget->left - 62; + int32_t x = w->x + (middleOutsetWidget->left + middleOutsetWidget->right) / 2; + int32_t y = w->y + middleOutsetWidget->top + line_height + 1; + int32_t width = middleOutsetWidget->right - middleOutsetWidget->left - 62; // Check if there is a map tooltip to draw rct_string_id stringId; @@ -759,7 +759,7 @@ static void window_game_bottom_toolbar_update(rct_window* w){ * * rct2: 0x0066C644 */ -static void window_game_bottom_toolbar_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId) +static void window_game_bottom_toolbar_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId) { switch (widgetIndex) { diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index b98ee5c65c..6440307acd 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -167,7 +167,7 @@ static rct_widget *window_guest_page_widgets[] = { window_guest_inventory_widgets }; -static void window_guest_set_page(rct_window* w, sint32 page); +static void window_guest_set_page(rct_window* w, int32_t page); static void window_guest_disable_widgets(rct_window* w); static void window_guest_viewport_init(rct_window* w); @@ -179,8 +179,8 @@ static void window_guest_overview_invalidate(rct_window *w); static void window_guest_overview_viewport_rotate(rct_window *w); static void window_guest_overview_update(rct_window* w); static void window_guest_overview_text_input(rct_window *w, rct_widgetindex widgetIndex, char *text); -static void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_guest_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_guest_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_guest_overview_tool_abort(rct_window *w, rct_widgetindex widgetIndex); static void window_guest_mouse_up(rct_window *w, rct_widgetindex widgetIndex); @@ -194,12 +194,12 @@ static void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_guest_rides_resize(rct_window *w); static void window_guest_rides_update(rct_window *w); static void window_guest_rides_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); -static void window_guest_rides_scroll_get_size(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_guest_rides_scroll_mouse_down(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_guest_rides_scroll_mouse_over(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_guest_rides_scroll_get_size(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_guest_rides_scroll_mouse_down(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_guest_rides_scroll_mouse_over(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_guest_rides_invalidate(rct_window *w); static void window_guest_rides_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_guest_finance_resize(rct_window *w); static void window_guest_finance_update(rct_window *w); @@ -415,7 +415,7 @@ static rct_window_event_list *window_guest_page_events[] = { void window_guest_set_colours(); // 0x981D3C -static constexpr const uint32 window_guest_page_enabled_widgets[] = { +static constexpr const uint32_t window_guest_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | @@ -530,7 +530,7 @@ rct_window * window_guest_open(rct_peep* peep){ */ void window_guest_disable_widgets(rct_window* w){ rct_peep* peep = &get_sprite(w->number)->peep; - uint64 disabled_widgets = 0; + uint64_t disabled_widgets = 0; if (peep_can_be_picked_up(peep)){ if (w->disabled_widgets & (1 << WIDX_PICKUP)) @@ -581,7 +581,7 @@ void window_guest_overview_resize(rct_window *w){ return; } } - uint8 zoom_amount = 1 << view->zoom; + uint8_t zoom_amount = 1 << view->zoom; view->width = w->width - 30; view->height = w->height - 72; view->view_width = view->width / zoom_amount; @@ -634,7 +634,7 @@ void window_guest_overview_mouse_up(rct_window *w, rct_widgetindex widgetIndex) * * rct2: 0x696AA0 */ -void window_guest_set_page(rct_window* w, sint32 page){ +void window_guest_set_page(rct_window* w, int32_t page){ if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) { if(w->number == gCurrentToolWidget.window_number && @@ -642,7 +642,7 @@ void window_guest_set_page(rct_window* w, sint32 page){ tool_cancel(); } - sint32 listen = 0; + int32_t listen = 0; if ( page == WINDOW_GUEST_OVERVIEW && w->page==WINDOW_GUEST_OVERVIEW && w->viewport){ if(!(w->viewport->flags & VIEWPORT_FLAG_SOUND_ON)) listen = 1; @@ -700,7 +700,7 @@ void window_guest_viewport_init(rct_window* w){ focus.sprite.sprite_id = SPRITE_INDEX_NULL; } else{ - uint8 final_check = 1; + uint8_t final_check = 1; if (peep->state == PEEP_STATE_ON_RIDE || peep->state == PEEP_STATE_ENTERING_RIDE || (peep->state == PEEP_STATE_LEAVING_RIDE && peep->x == LOCATION_NULL)){ @@ -708,7 +708,7 @@ void window_guest_viewport_init(rct_window* w){ Ride *ride = get_ride(peep->current_ride); if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK){ rct_vehicle* train = GET_VEHICLE(ride->vehicles[peep->current_train]); - sint32 car = peep->current_car; + int32_t car = peep->current_car; for (; car != 0; car--){ train = GET_VEHICLE(train->next_vehicle_on_train); @@ -720,9 +720,9 @@ void window_guest_viewport_init(rct_window* w){ } if (peep->x == LOCATION_NULL && final_check){ Ride *ride = get_ride(peep->current_ride); - sint32 x = ride->overall_view.x * 32 + 16; - sint32 y = ride->overall_view.y * 32 + 16; - sint32 height = tile_element_height(x, y); + int32_t x = ride->overall_view.x * 32 + 16; + int32_t y = ride->overall_view.y * 32 + 16; + int32_t height = tile_element_height(x, y); height += 32; focus.coordinate.x = x; focus.coordinate.y = y; @@ -736,7 +736,7 @@ void window_guest_viewport_init(rct_window* w){ focus.coordinate.rotation = get_current_rotation(); } - uint16 viewport_flags; + uint16_t viewport_flags; if (w->viewport){ // Check all combos, for now skipping y and rot @@ -768,10 +768,10 @@ void window_guest_viewport_init(rct_window* w){ if (!(w->viewport)){ rct_widget* view_widget = &w->widgets[WIDX_VIEWPORT]; - sint32 x = view_widget->left + 1 + w->x; - sint32 y = view_widget->top + 1 + w->y; - sint32 width = view_widget->right - view_widget->left - 1; - sint32 height = view_widget->bottom - view_widget->top - 1; + int32_t x = view_widget->left + 1 + w->x; + int32_t y = view_widget->top + 1 + w->y; + int32_t width = view_widget->right - view_widget->left - 1; + int32_t height = view_widget->bottom - view_widget->top - 1; viewport_create(w, x, y, width, height, 0, focus.coordinate.x, focus.coordinate.y, focus.coordinate.z, focus.sprite.type & VIEWPORT_FOCUS_TYPE_MASK, focus.sprite.sprite_id); w->flags |= WF_NO_SCROLLING; @@ -794,10 +794,10 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp return; rct_widget* widget = &w->widgets[WIDX_TAB_1]; - sint32 width = widget->right - widget->left - 1; - sint32 height = widget->bottom - widget->top - 1; - sint32 x = widget->left + 1 + w->x; - sint32 y = widget->top + 1 + w->y; + int32_t width = widget->right - widget->left - 1; + int32_t height = widget->bottom - widget->top - 1; + int32_t x = widget->left + 1 + w->x; + int32_t y = widget->top + 1 + w->y; if (w->page == WINDOW_GUEST_OVERVIEW) height++; rct_drawpixelinfo clip_dpi; @@ -813,9 +813,9 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp if (peep->type == PEEP_TYPE_STAFF && peep->staff_type == STAFF_TYPE_ENTERTAINER) y++; - sint32 ebx = g_peep_animation_entries[peep->sprite_type].sprite_animation->base_image + 1; + int32_t ebx = g_peep_animation_entries[peep->sprite_type].sprite_animation->base_image + 1; - sint32 eax = 0; + int32_t eax = 0; if (w->page == WINDOW_GUEST_OVERVIEW){ eax = w->var_496; @@ -823,7 +823,7 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp } ebx += eax; - sint32 sprite_id = ebx | SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour, peep->trousers_colour); + int32_t sprite_id = ebx | SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour, peep->trousers_colour); gfx_draw_sprite(&clip_dpi, sprite_id, x, y, 0); // If holding a balloon @@ -857,11 +857,11 @@ static void window_guest_stats_tab_paint(rct_window* w, rct_drawpixelinfo* dpi){ return; rct_widget* widget = &w->widgets[WIDX_TAB_2]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; rct_peep* peep = GET_PEEP(w->number); - sint32 image_id = get_peep_face_sprite_large(peep); + int32_t image_id = get_peep_face_sprite_large(peep); if (w->page == WINDOW_GUEST_STATS){ // If currently viewing this tab animate tab // if it is very sick or angry. @@ -888,10 +888,10 @@ static void window_guest_rides_tab_paint(rct_window* w, rct_drawpixelinfo* dpi){ if (w->disabled_widgets & (1 << WIDX_TAB_3)) return; rct_widget* widget = &w->widgets[WIDX_TAB_3]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; - sint32 image_id = SPR_TAB_RIDE_0; + int32_t image_id = SPR_TAB_RIDE_0; if ( w->page == WINDOW_GUEST_RIDES ){ image_id += (w->frame_no / 4) & 0xF; @@ -908,10 +908,10 @@ static void window_guest_finance_tab_paint(rct_window* w, rct_drawpixelinfo* dpi if (w->disabled_widgets & (1 << WIDX_TAB_4)) return; rct_widget* widget = &w->widgets[WIDX_TAB_4]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; - sint32 image_id = SPR_TAB_FINANCES_SUMMARY_0; + int32_t image_id = SPR_TAB_FINANCES_SUMMARY_0; if ( w->page == WINDOW_GUEST_FINANCE ){ image_id += (w->frame_no / 2) & 0x7; @@ -928,10 +928,10 @@ static void window_guest_thoughts_tab_paint(rct_window* w, rct_drawpixelinfo* dp if (w->disabled_widgets & (1 << WIDX_TAB_5)) return; rct_widget* widget = &w->widgets[WIDX_TAB_5]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; - sint32 image_id = SPR_TAB_THOUGHTS_0; + int32_t image_id = SPR_TAB_THOUGHTS_0; if ( w->page == WINDOW_GUEST_THOUGHTS ){ image_id += (w->frame_no / 2) & 0x7; @@ -948,10 +948,10 @@ static void window_guest_inventory_tab_paint(rct_window* w, rct_drawpixelinfo* d if (w->disabled_widgets & (1 << WIDX_TAB_6)) return; rct_widget* widget = &w->widgets[WIDX_TAB_6]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; - sint32 image_id = SPR_TAB_GUEST_INVENTORY; + int32_t image_id = SPR_TAB_GUEST_INVENTORY; gfx_draw_sprite(dpi, image_id, x, y, 0); } @@ -980,29 +980,29 @@ void window_guest_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Draw the centred label - uint32 argument1, argument2; + uint32_t argument1, argument2; rct_peep* peep = GET_PEEP(w->number); get_arguments_from_action(peep, &argument1, &argument2); - set_format_arg(0, uint32, argument1); - set_format_arg(4, uint32, argument2); + set_format_arg(0, uint32_t, argument1); + set_format_arg(4, uint32_t, argument2); rct_widget* widget = &w->widgets[WIDX_ACTION_LBL]; - sint32 x = (widget->left + widget->right) / 2 + w->x; - sint32 y = w->y + widget->top - 1; - sint32 width = widget->right - widget->left; + int32_t x = (widget->left + widget->right) / 2 + w->x; + int32_t y = w->y + widget->top - 1; + int32_t width = widget->right - widget->left; gfx_draw_string_centred_clipped(dpi, STR_BLACK_STRING, gCommonFormatArgs, COLOUR_BLACK, x, y, width); // Draw the marquee thought widget = &w->widgets[WIDX_MARQUEE]; width = widget->right - widget->left - 3; - sint32 left = widget->left + 2 + w->x; - sint32 top = widget->top + w->y; - sint32 height = widget->bottom - widget->top; + int32_t left = widget->left + 2 + w->x; + int32_t top = widget->top + w->y; + int32_t height = widget->bottom - widget->top; rct_drawpixelinfo dpi_marquee; if (!clip_drawpixelinfo(&dpi_marquee, dpi, left, top, width, height)) { return; } - sint32 i = 0; + int32_t i = 0; for (; i < PEEP_MAX_THOUGHTS; ++i){ if (peep->thoughts[i].type == PEEP_THOUGHT_TYPE_NONE){ w->list_information_type = 0; @@ -1045,7 +1045,7 @@ void window_guest_overview_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); w->pressed_widgets &= ~(1<peep_flags & PEEP_FLAGS_TRACKING){ @@ -1090,7 +1090,7 @@ void window_guest_overview_invalidate(rct_window *w) * rct2: 0x696F45 */ void window_guest_overview_update(rct_window* w){ - sint32 var_496 = w->var_496; + int32_t var_496 = w->var_496; var_496++; var_496 %= 24; w->var_496 = var_496; @@ -1110,7 +1110,7 @@ void window_guest_overview_update(rct_window* w){ // Create the "I have the strangest feeling I am being watched thought" if ((w->highlighted_item & 0xFFFF) >= 3840) { if (!(w->highlighted_item & 0x3FF)) { - sint32 random = util_rand() & 0xFFFF; + int32_t random = util_rand() & 0xFFFF; if (random <= 0x2AAA) { rct_peep* peep = GET_PEEP(w->number); peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_WATCHED, PEEP_THOUGHT_ITEM_NONE); @@ -1135,7 +1135,7 @@ void window_guest_overview_text_input(rct_window *w, rct_widgetindex widgetIndex * * rct2: 0x696A5F */ -void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex != WIDX_PICKUP) return; @@ -1144,7 +1144,7 @@ void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetInde gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - sint32 map_x, map_y; + int32_t map_x, map_y; footpath_get_coordinates_from_pos(x, y + 16, &map_x, &map_y, nullptr, nullptr); if (map_x != LOCATION_NULL) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -1158,7 +1158,7 @@ void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetInde gPickupPeepImage = UINT32_MAX; - sint32 interactionType; + int32_t interactionType; get_map_coordinates_from_pos(x, y, VIEWPORT_INTERACTION_MASK_NONE, nullptr, nullptr, &interactionType, nullptr, nullptr); if (interactionType == VIEWPORT_INTERACTION_ITEM_NONE) return; @@ -1175,7 +1175,7 @@ void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetInde rct_peep* peep; peep = GET_PEEP(w->number); - uint32 imageId = g_peep_animation_entries[peep->sprite_type].sprite_animation[PEEP_ACTION_SPRITE_TYPE_UI].base_image; + uint32_t imageId = g_peep_animation_entries[peep->sprite_type].sprite_animation[PEEP_ACTION_SPRITE_TYPE_UI].base_image; imageId += w->picked_peep_frame >> 2; imageId |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; @@ -1186,12 +1186,12 @@ void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetInde * * rct2: 0x696A54 */ -void window_guest_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_guest_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex != WIDX_PICKUP) return; - sint32 dest_x, dest_y; + int32_t dest_x, dest_y; rct_tile_element* tileElement; footpath_get_coordinates_from_pos(x, y + 16, &dest_x, &dest_y, nullptr, &tileElement); @@ -1281,7 +1281,7 @@ void window_guest_stats_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); window_guest_stats_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_stats_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1303,7 +1303,7 @@ void window_guest_stats_invalidate(rct_window *w) * * ebp: colour, contains flag BAR_BLINK for blinking */ -static void window_guest_stats_bars_paint(sint32 value, sint32 x, sint32 y, rct_window *w, rct_drawpixelinfo *dpi, sint32 colour) +static void window_guest_stats_bars_paint(int32_t value, int32_t x, int32_t y, rct_window *w, rct_drawpixelinfo *dpi, int32_t colour) { if (font_get_line_height(gCurrentFontSpriteBase) > 10) { @@ -1312,7 +1312,7 @@ static void window_guest_stats_bars_paint(sint32 value, sint32 x, sint32 y, rct_ gfx_fill_rect_inset(dpi, x + 61, y + 1, x + 61 + 121, y + 9, w->colours[1], INSET_RECT_F_30); - sint32 blink_flag = colour & BAR_BLINK; + int32_t blink_flag = colour & BAR_BLINK; colour &= ~BAR_BLINK; if (!blink_flag || game_is_paused() || (gCurrentTicks & 8) == 0) @@ -1346,16 +1346,16 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) // Not sure why this is not stats widgets // cx - sint32 x = w->x + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].left + 4; + int32_t x = w->x + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].left + 4; // dx - sint32 y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 4; + int32_t y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 4; // Happiness gfx_draw_string_left(dpi, STR_GUEST_STAT_HAPPINESS_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); - sint32 happiness = peep->happiness; + int32_t happiness = peep->happiness; if (happiness < 10)happiness = 10; - sint32 ebp = COLOUR_BRIGHT_GREEN; + int32_t ebp = COLOUR_BRIGHT_GREEN; if (happiness < 50){ ebp |= BAR_BLINK; } @@ -1365,7 +1365,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_GUEST_STAT_ENERGY_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); - sint32 energy = ((peep->energy - PEEP_MIN_ENERGY) * 255) / (PEEP_MAX_ENERGY - PEEP_MIN_ENERGY); + int32_t energy = ((peep->energy - PEEP_MIN_ENERGY) * 255) / (PEEP_MAX_ENERGY - PEEP_MIN_ENERGY); ebp = COLOUR_BRIGHT_GREEN; if (energy < 50){ ebp |= BAR_BLINK; @@ -1377,7 +1377,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_GUEST_STAT_HUNGER_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); - sint32 hunger = peep->hunger; + int32_t hunger = peep->hunger; if (hunger > 190) hunger = 190; hunger -= 32; @@ -1396,7 +1396,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_GUEST_STAT_THIRST_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); - sint32 thirst = peep->thirst; + int32_t thirst = peep->thirst; if (thirst > 190) thirst = 190; thirst -= 32; @@ -1415,7 +1415,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); - sint32 nausea = peep->nausea - 32; + int32_t nausea = peep->nausea - 32; if (nausea < 0) nausea = 0; nausea *= 36; @@ -1431,7 +1431,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_GUEST_STAT_TOILET_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); - sint32 toilet = peep->toilet - 32; + int32_t toilet = peep->toilet - 32; if (toilet > 210) toilet = 210; toilet -= 32; @@ -1448,10 +1448,10 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) // Time in park y += LIST_ROW_HEIGHT + 1; if (peep->time_in_park != -1){ - sint32 eax = gScenarioTicks; + int32_t eax = gScenarioTicks; eax -= peep->time_in_park; eax >>= 11; - set_format_arg(0, uint16, eax & 0xFFFF); + set_format_arg(0, uint16_t, eax & 0xFFFF); gfx_draw_string_left(dpi, STR_GUEST_STAT_TIME_IN_PARK, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1463,12 +1463,12 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; // Intensity - sint32 intensity = peep->intensity / 16; - set_format_arg(0, uint16, intensity); - sint32 string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BELOW; + int32_t intensity = peep->intensity / 16; + set_format_arg(0, uint16_t, intensity); + int32_t string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BELOW; if (peep->intensity & 0xF){ - set_format_arg(0, uint16, peep->intensity & 0xF); - set_format_arg(2, uint16, intensity); + set_format_arg(0, uint16_t, peep->intensity & 0xF); + set_format_arg(2, uint16_t, intensity); string_id = STR_GUEST_STAT_PREFERRED_INTESITY_BETWEEN; if (intensity == 15) string_id = STR_GUEST_STAT_PREFERRED_INTESITY_ABOVE; } @@ -1483,7 +1483,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) STR_PEEP_STAT_NAUSEA_TOLERANCE_HIGH, }; y += LIST_ROW_HEIGHT; - sint32 nausea_tolerance = peep->nausea_tolerance & 0x3; + int32_t nausea_tolerance = peep->nausea_tolerance & 0x3; set_format_arg(0, rct_string_id, nauseaTolerances[nausea_tolerance]); gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_TOLERANCE, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1511,14 +1511,14 @@ void window_guest_rides_update(rct_window *w) rct_peep* peep = GET_PEEP(w->number); // Every 2048 ticks do a full window_invalidate - sint32 number_of_ticks = gScenarioTicks - peep->time_in_park; + int32_t number_of_ticks = gScenarioTicks - peep->time_in_park; if (!(number_of_ticks & 0x7FF)) window_invalidate(w); - uint8 curr_list_position = 0; - for (uint8 ride_id = 0; ride_id < 255; ++ride_id){ + uint8_t curr_list_position = 0; + for (uint8_t ride_id = 0; ride_id < 255; ++ride_id){ // Offset to the ride_id bit in peep_rides_been_on - uint8 ride_id_bit = ride_id % 8; - uint8 ride_id_offset = ride_id / 8; + uint8_t ride_id_bit = ride_id % 8; + uint8_t ride_id_offset = ride_id / 8; if (peep->rides_been_on[ride_id_offset] & (1 << ride_id_bit)){ Ride* ride = get_ride(ride_id); if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE){ @@ -1547,7 +1547,7 @@ void window_guest_rides_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_ * * rct2: 0x69784E */ -void window_guest_rides_scroll_get_size(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +void window_guest_rides_scroll_get_size(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *height = w->no_list_items * 10; @@ -1556,7 +1556,7 @@ void window_guest_rides_scroll_get_size(rct_window *w, sint32 scrollIndex, sint3 window_invalidate(w); } - sint32 visable_height = *height + int32_t visable_height = *height - window_guest_rides_widgets[WIDX_RIDE_SCROLL].bottom + window_guest_rides_widgets[WIDX_RIDE_SCROLL].top + 21; @@ -1573,9 +1573,9 @@ void window_guest_rides_scroll_get_size(rct_window *w, sint32 scrollIndex, sint3 * * rct2: 0x006978CC */ -void window_guest_rides_scroll_mouse_down(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_guest_rides_scroll_mouse_down(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / 10; if (index >= w->no_list_items) return; @@ -1589,9 +1589,9 @@ void window_guest_rides_scroll_mouse_down(rct_window *w, sint32 scrollIndex, sin * * rct2: 0x0069789C */ -void window_guest_rides_scroll_mouse_over(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_guest_rides_scroll_mouse_over(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / 10; if (index >= w->no_list_items)return; @@ -1616,8 +1616,8 @@ void window_guest_rides_invalidate(rct_window *w) w->pressed_widgets |= 1ULL << (w->page + WIDX_TAB_1); rct_peep* peep = GET_PEEP(w->number); - set_format_arg(0, uint16, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(0, uint16_t, peep->name_string_idx); + set_format_arg(2, uint32_t, peep->id); window_guest_rides_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_rides_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1653,16 +1653,16 @@ void window_guest_rides_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep* peep = GET_PEEP(w->number); // cx - sint32 x = w->x + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].left + 2; + int32_t x = w->x + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].left + 2; // dx - sint32 y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 2; + int32_t y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 2; gfx_draw_string_left(dpi, STR_GUEST_LABEL_RIDES_BEEN_ON, nullptr, COLOUR_BLACK, x, y); y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].bottom - 12; rct_string_id ride_string_id = STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE; - uint32 ride_string_arguments = 0; + uint32_t ride_string_arguments = 0; if (peep->favourite_ride != 0xFF) { auto ride = get_ride(peep->favourite_ride); @@ -1673,7 +1673,7 @@ void window_guest_rides_paint(rct_window *w, rct_drawpixelinfo *dpi) } } set_format_arg(0, rct_string_id, ride_string_id); - set_format_arg(2, uint32, ride_string_arguments); + set_format_arg(2, uint32_t, ride_string_arguments); gfx_draw_string_left_clipped(dpi, STR_FAVOURITE_RIDE, gCommonFormatArgs, COLOUR_BLACK, x, y, w->width - 14); } @@ -1682,17 +1682,17 @@ void window_guest_rides_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006976FC */ -void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 left = dpi->x; - sint32 right = dpi->x + dpi->width - 1; - sint32 top = dpi->y; - sint32 bottom = dpi->y + dpi->height - 1; + int32_t left = dpi->x; + int32_t right = dpi->x + dpi->width - 1; + int32_t top = dpi->y; + int32_t bottom = dpi->y + dpi->height - 1; auto colour = ColourMapA[w->colours[1]].mid_light; gfx_fill_rect(dpi, left, top, right, bottom, colour); - for (sint32 list_index = 0; list_index < w->no_list_items; list_index++) + for (int32_t list_index = 0; list_index < w->no_list_items; list_index++) { auto y = list_index * 10; rct_string_id stringId = STR_BLACK_STRING; @@ -1706,7 +1706,7 @@ void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, sint if (ride != nullptr) { set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, 0, y - 1); } } @@ -1749,7 +1749,7 @@ void window_guest_finance_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); window_guest_finance_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_finance_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1782,9 +1782,9 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep* peep = GET_PEEP(w->number); // cx - sint32 x = w->x + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].left + 4; + int32_t x = w->x + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].left + 4; // dx - sint32 y = w->y + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].top + 4; + int32_t y = w->y + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].top + 4; // Cash in pocket set_format_arg(0, money32, peep->cash_in_pocket); @@ -1805,7 +1805,7 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi) // Paid on rides y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_rides); - set_format_arg(4, uint16, peep->no_of_rides); + set_format_arg(4, uint16_t, peep->no_of_rides); if (peep->no_of_rides != 1){ gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1816,7 +1816,7 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi) // Paid on food y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_food); - set_format_arg(4, uint16, peep->no_of_food); + set_format_arg(4, uint16_t, peep->no_of_food); if (peep->no_of_food != 1){ gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1827,7 +1827,7 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi) // Paid on drinks y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_drink); - set_format_arg(4, uint16, peep->no_of_drinks); + set_format_arg(4, uint16_t, peep->no_of_drinks); if (peep->no_of_drinks != 1){ gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1838,7 +1838,7 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi) // Paid on souvenirs y += LIST_ROW_HEIGHT; set_format_arg(0, money32, peep->paid_on_souvenirs); - set_format_arg(4, uint16, peep->no_of_souvenirs); + set_format_arg(4, uint16_t, peep->no_of_souvenirs); if (peep->no_of_souvenirs != 1){ gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y); } @@ -1890,7 +1890,7 @@ void window_guest_thoughts_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); window_guest_thoughts_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_thoughts_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1923,9 +1923,9 @@ void window_guest_thoughts_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep* peep = GET_PEEP(w->number); // cx - sint32 x = w->x + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].left + 4; + int32_t x = w->x + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].left + 4; // dx - sint32 y = w->y + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].top + 4; + int32_t y = w->y + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].top + 4; gfx_draw_string_left(dpi, STR_GUEST_RECENT_THOUGHTS_LABEL, nullptr, COLOUR_BLACK, x, y); @@ -1934,7 +1934,7 @@ void window_guest_thoughts_paint(rct_window *w, rct_drawpixelinfo *dpi) if (thought->type == PEEP_THOUGHT_TYPE_NONE) return; if (thought->freshness == 0) continue; - sint32 width = window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].right + int32_t width = window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].right - window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].left - 8; @@ -1990,7 +1990,7 @@ void window_guest_inventory_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); window_guest_inventory_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_inventory_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -2006,46 +2006,46 @@ void window_guest_inventory_invalidate(rct_window *w) window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_6); } -static rct_string_id window_guest_inventory_format_item(rct_peep *peep, sint32 item) +static rct_string_id window_guest_inventory_format_item(rct_peep *peep, int32_t item) { Ride *ride; // Default arguments - set_format_arg(0, uint32, ShopItemImage[item]); + set_format_arg(0, uint32_t, ShopItemImage[item]); set_format_arg(4, rct_string_id, ShopItemStringIds[item].display); set_format_arg(6, rct_string_id, gParkName); - set_format_arg(8, uint32, gParkNameArgs); + set_format_arg(8, uint32_t, gParkNameArgs); // Special overrides switch (item) { case SHOP_ITEM_BALLOON: - set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour) | ShopItemImage[item]); + set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour) | ShopItemImage[item]); break; case SHOP_ITEM_PHOTO: ride = get_ride(peep->photo1_ride_ref); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); break; case SHOP_ITEM_UMBRELLA: - set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour) | ShopItemImage[item]); + set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour) | ShopItemImage[item]); break; case SHOP_ITEM_VOUCHER: switch (peep->voucher_type) { case VOUCHER_TYPE_PARK_ENTRY_FREE: set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_FREE); set_format_arg(8, rct_string_id, gParkName); - set_format_arg(10, uint32, gParkNameArgs); + set_format_arg(10, uint32_t, gParkNameArgs); break; case VOUCHER_TYPE_RIDE_FREE: ride = get_ride(peep->voucher_arguments); set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_RIDE_FREE); set_format_arg(8, rct_string_id, ride->name); - set_format_arg(10, uint32, ride->name_arguments); + set_format_arg(10, uint32_t, ride->name_arguments); break; case VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE: set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_PARK_ENTRY_HALF_PRICE); set_format_arg(8, rct_string_id, gParkName); - set_format_arg(10, uint32, gParkNameArgs); + set_format_arg(10, uint32_t, gParkNameArgs); break; case VOUCHER_TYPE_FOOD_OR_DRINK_FREE: set_format_arg(6, rct_string_id, STR_PEEP_INVENTORY_VOUCHER_FOOD_OR_DRINK_FREE); @@ -2054,25 +2054,25 @@ static rct_string_id window_guest_inventory_format_item(rct_peep *peep, sint32 i } break; case SHOP_ITEM_HAT: - set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour) | ShopItemImage[item]); + set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour) | ShopItemImage[item]); break; case SHOP_ITEM_TSHIRT: - set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->tshirt_colour) | ShopItemImage[item]); + set_format_arg(0, uint32_t, SPRITE_ID_PALETTE_COLOUR_1(peep->tshirt_colour) | ShopItemImage[item]); break; case SHOP_ITEM_PHOTO2: ride = get_ride(peep->photo2_ride_ref); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); break; case SHOP_ITEM_PHOTO3: ride = get_ride(peep->photo3_ride_ref); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); break; case SHOP_ITEM_PHOTO4: ride = get_ride(peep->photo4_ride_ref); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); break; } @@ -2096,17 +2096,17 @@ void window_guest_inventory_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep *peep = GET_PEEP(w->number); rct_widget *pageBackgroundWidget = &window_guest_inventory_widgets[WIDX_PAGE_BACKGROUND]; - sint32 x = w->x + pageBackgroundWidget->left + 4; - sint32 y = w->y + pageBackgroundWidget->top + 2; - sint32 itemNameWidth = pageBackgroundWidget->right - pageBackgroundWidget->left - 8; + int32_t x = w->x + pageBackgroundWidget->left + 4; + int32_t y = w->y + pageBackgroundWidget->top + 2; + int32_t itemNameWidth = pageBackgroundWidget->right - pageBackgroundWidget->left - 8; - sint32 maxY = w->y + w->height - 22; - sint32 numItems = 0; + int32_t maxY = w->y + w->height - 22; + int32_t numItems = 0; gfx_draw_string_left(dpi, STR_CARRYING, nullptr, COLOUR_BLACK, x, y); y += 10; - for (sint32 item = 0; item < SHOP_ITEM_COUNT; item++) { + for (int32_t item = 0; item < SHOP_ITEM_COUNT; item++) { if (y >= maxY) break; if (!peep->HasItem(item)) continue; diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 83cfc6475a..37ff4042f1 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -89,20 +89,20 @@ static rct_widget window_guest_list_widgets[] = { { WIDGETS_END }, }; -static constexpr const uint8 SUMMARISED_GUEST_ROW_HEIGHT = SCROLLABLE_ROW_HEIGHT + 11; +static constexpr const uint8_t SUMMARISED_GUEST_ROW_HEIGHT = SCROLLABLE_ROW_HEIGHT + 11; static void window_guest_list_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_guest_list_resize(rct_window *w); static void window_guest_list_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_guest_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_guest_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_guest_list_update(rct_window *w); -static void window_guest_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_guest_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_guest_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_guest_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_guest_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_guest_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_guest_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_guest_list_invalidate(rct_window *w); static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_guest_list_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static rct_window_event_list window_guest_list_events = { @@ -137,32 +137,32 @@ static rct_window_event_list window_guest_list_events = { }; // clang-format on -static uint32 _window_guest_list_last_find_groups_tick; -static uint32 _window_guest_list_last_find_groups_selected_view; -static uint32 _window_guest_list_last_find_groups_wait; +static uint32_t _window_guest_list_last_find_groups_tick; +static uint32_t _window_guest_list_last_find_groups_selected_view; +static uint32_t _window_guest_list_last_find_groups_wait; -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 sint32 _window_guest_list_num_pages; // 0x00F1EE08 -static sint32 _window_guest_list_num_groups; // 0x00F1AF22 +static int32_t _window_guest_list_highlighted_index; // 0x00F1EE10 +static int32_t _window_guest_list_selected_tab; // 0x00F1EE12 +static int32_t _window_guest_list_selected_filter; // 0x00F1EE06 +static int32_t _window_guest_list_selected_page; // 0x00F1EE07 +static uint32_t _window_guest_list_selected_view; // 0x00F1EE13 +static int32_t _window_guest_list_num_pages; // 0x00F1EE08 +static int32_t _window_guest_list_num_groups; // 0x00F1AF22 static bool _window_guest_list_tracking_only; -static uint16 _window_guest_list_filter_arguments[4]; +static uint16_t _window_guest_list_filter_arguments[4]; -static uint16 _window_guest_list_groups_num_guests[240]; -static uint32 _window_guest_list_groups_argument_1[240]; -static uint32 _window_guest_list_groups_argument_2[240]; -static uint8 _window_guest_list_groups_guest_faces[240 * 58]; -static uint8 _window_guest_list_group_index[240]; +static uint16_t _window_guest_list_groups_num_guests[240]; +static uint32_t _window_guest_list_groups_argument_1[240]; +static uint32_t _window_guest_list_groups_argument_2[240]; +static uint8_t _window_guest_list_groups_guest_faces[240 * 58]; +static uint8_t _window_guest_list_group_index[240]; static char _window_guest_list_filter_name[32]; -static sint32 window_guest_list_is_peep_in_filter(rct_peep* peep); +static int32_t window_guest_list_is_peep_in_filter(rct_peep* peep); static void window_guest_list_find_groups(); -static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* argument_2); +static void get_arguments_from_peep(rct_peep *peep, uint32_t *argument_1, uint32_t* argument_2); static bool guest_should_be_visible(rct_peep *peep); @@ -237,7 +237,7 @@ void window_guest_list_refresh_list() * * @param index The number of the ride or index of the thought */ -rct_window * window_guest_list_open_with_filter(sint32 type, sint32 index) +rct_window * window_guest_list_open_with_filter(int32_t type, int32_t index) { rct_window * w = window_guest_list_open(); @@ -377,7 +377,7 @@ static void window_guest_list_resize(rct_window *w) */ static void window_guest_list_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - sint32 i; + int32_t i; switch (widgetIndex) { case WIDX_TAB_1: case WIDX_TAB_2: @@ -449,7 +449,7 @@ static void window_guest_list_mousedown(rct_window *w, rct_widgetindex widgetInd * * rct2: 0x00699AE1 */ -static void window_guest_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_guest_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { switch (widgetIndex) { case WIDX_PAGE_DROPDOWN_BUTTON: @@ -486,9 +486,9 @@ static void window_guest_list_update(rct_window *w) * * rct2: 0x00699C55 */ -static void window_guest_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_guest_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 i, y, numGuests, spriteIndex; + int32_t i, y, numGuests, spriteIndex; rct_peep *peep; switch (_window_guest_list_selected_tab) { @@ -508,7 +508,7 @@ static void window_guest_list_scrollgetsize(rct_window *w, sint32 scrollIndex, s } w->var_492 = numGuests; y = numGuests * SCROLLABLE_ROW_HEIGHT; - _window_guest_list_num_pages = (sint32) std::ceil((float)numGuests / 3173); + _window_guest_list_num_pages = (int32_t) std::ceil((float)numGuests / 3173); if (_window_guest_list_num_pages == 0) _window_guest_list_selected_page = 0; else if (_window_guest_list_selected_page >= _window_guest_list_num_pages) @@ -553,9 +553,9 @@ static void window_guest_list_scrollgetsize(rct_window *w, sint32 scrollIndex, s * * rct2: 0x00699D7D */ -static void window_guest_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_guest_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 i, spriteIndex; + int32_t i, spriteIndex; rct_peep *peep; switch (_window_guest_list_selected_tab) { @@ -600,9 +600,9 @@ static void window_guest_list_scrollmousedown(rct_window *w, sint32 scrollIndex, * * rct2: 0x00699D3B */ -static void window_guest_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_guest_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 i; + int32_t i; i = y / (_window_guest_list_selected_tab == PAGE_INDIVIDUAL ? SCROLLABLE_ROW_HEIGHT : SUMMARISED_GUEST_ROW_HEIGHT); i += _window_guest_list_selected_page * 3173; @@ -668,7 +668,7 @@ static void window_guest_list_invalidate(rct_window *w) */ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i, x, y; + int32_t i, x, y; rct_string_id format; // Widgets @@ -715,7 +715,7 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (_window_guest_list_selected_tab == PAGE_INDIVIDUAL) { x = w->x + 4; y = w->y + window_guest_list_widgets[WIDX_GUEST_LIST].bottom + 2; - set_format_arg(0, sint16, w->var_492); + set_format_arg(0, int16_t, w->var_492); gfx_draw_string_left(dpi, (w->var_492 == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), gCommonFormatArgs, COLOUR_BLACK, x, y); } } @@ -724,13 +724,13 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x00699701 */ -static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 spriteIndex, numGuests, i, j, y; + int32_t spriteIndex, numGuests, i, j, y; rct_string_id format; rct_peep *peep; rct_peep_thought *thought; - uint32 argument_1, argument_2; + uint32_t argument_1, argument_2; // Background fill gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); @@ -769,7 +769,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, // Guest name set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, 0, y, 113); switch (_window_guest_list_selected_view) { @@ -785,8 +785,8 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, get_arguments_from_action(peep, &argument_1, &argument_2); - set_format_arg(0, uint32, argument_1); - set_format_arg(4, uint32, argument_2); + set_format_arg(0, uint32_t, argument_1); + set_format_arg(4, uint32_t, argument_2); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, 133, y, 314); break; case VIEW_THOUGHTS: @@ -837,9 +837,9 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, gfx_draw_sprite(dpi, _window_guest_list_groups_guest_faces[i * 56 + j] + SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY, j * 8, y + 12, 0); // Draw action - set_format_arg(0, uint32, _window_guest_list_groups_argument_1[i]); - set_format_arg(4, uint32, _window_guest_list_groups_argument_2[i]); - set_format_arg(10, uint32, numGuests); + set_format_arg(0, uint32_t, _window_guest_list_groups_argument_1[i]); + set_format_arg(4, uint32_t, _window_guest_list_groups_argument_2[i]); + set_format_arg(10, uint32_t, numGuests); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, 0, y, 414); // Draw guest count @@ -865,13 +865,13 @@ static void window_guest_list_textinput(rct_window *w, rct_widgetindex widgetInd * returns 0 for in filter and 1 for not in filter * rct2: 0x0069B865 */ -static sint32 window_guest_list_is_peep_in_filter(rct_peep* peep) +static int32_t window_guest_list_is_peep_in_filter(rct_peep* peep) { char temp; temp = _window_guest_list_selected_view; _window_guest_list_selected_view = _window_guest_list_selected_filter; - uint32 argument1, argument2; + uint32_t argument1, argument2; get_arguments_from_peep(peep, &argument1, &argument2); _window_guest_list_selected_view = temp; @@ -879,8 +879,8 @@ static sint32 window_guest_list_is_peep_in_filter(rct_peep* peep) if (_window_guest_list_filter_arguments[0] == 0xFFFF && _window_guest_list_selected_filter == 1) argument1 |= 0xFFFF; - uint32 check1 = _window_guest_list_filter_arguments[0] | (_window_guest_list_filter_arguments[1] << 16); - uint32 check2 = _window_guest_list_filter_arguments[2] | (_window_guest_list_filter_arguments[3] << 16); + uint32_t check1 = _window_guest_list_filter_arguments[0] | (_window_guest_list_filter_arguments[1] << 16); + uint32_t check2 = _window_guest_list_filter_arguments[2] | (_window_guest_list_filter_arguments[3] << 16); if (argument1 == check1 && argument2 == check2) { return 0; } @@ -894,7 +894,7 @@ static sint32 window_guest_list_is_peep_in_filter(rct_peep* peep) * argument_1 (0x013CE952) gCommonFormatArgs * argument_2 (0x013CE954) gCommonFormatArgs + 2 */ -static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* argument_2) +static void get_arguments_from_peep(rct_peep *peep, uint32_t *argument_1, uint32_t* argument_2) { switch (_window_guest_list_selected_view) { case VIEW_ACTIONS: @@ -905,7 +905,7 @@ static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* rct_peep_thought *thought = &peep->thoughts[0]; if (thought->freshness <= 5 && thought->type != PEEP_THOUGHT_TYPE_NONE) { // HACK The out arguments here are used to draw the group text so we just return - // gCommonFormatArgs as two uint32s. + // gCommonFormatArgs as two uint32_ts. memset(gCommonFormatArgs, 0, sizeof(*argument_1) + sizeof(*argument_2)); peep_thought_set_format_args(thought); memcpy(argument_1, gCommonFormatArgs, sizeof(*argument_1)); @@ -929,10 +929,10 @@ static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* */ static void window_guest_list_find_groups() { - sint32 spriteIndex, spriteIndex2, groupIndex, faceIndex; + int32_t spriteIndex, spriteIndex2, groupIndex, faceIndex; rct_peep *peep, *peep2; - uint32 tick256 = floor2(gScenarioTicks, 256); + uint32_t tick256 = floor2(gScenarioTicks, 256); if (_window_guest_list_selected_view == _window_guest_list_last_find_groups_selected_view) { if (_window_guest_list_last_find_groups_wait != 0 || _window_guest_list_last_find_groups_tick == tick256 @@ -978,7 +978,7 @@ static void window_guest_list_find_groups() if (peep2->outside_of_park != 0 || !(peep2->flags & SPRITE_FLAGS_PEEP_VISIBLE)) continue; - uint32 argument1, argument2; + uint32_t argument1, argument2; // Get and check if in same group get_arguments_from_peep(peep2, &argument1, &argument2); if (argument1 != _window_guest_list_groups_argument_1[groupIndex] || argument2 != _window_guest_list_groups_argument_2[groupIndex] ) @@ -999,8 +999,8 @@ static void window_guest_list_find_groups() continue; } - sint32 curr_num_guests = _window_guest_list_groups_num_guests[groupIndex]; - sint32 swap_position = 0; + int32_t curr_num_guests = _window_guest_list_groups_num_guests[groupIndex]; + int32_t swap_position = 0; //This section places the groups in size order. bool gotoNextPeep = false; while (1) { @@ -1016,12 +1016,12 @@ static void window_guest_list_find_groups() continue; } - sint32 argument_1 = _window_guest_list_groups_argument_1[groupIndex]; - sint32 argument_2 = _window_guest_list_groups_argument_2[groupIndex]; - sint32 bl = _window_guest_list_group_index[groupIndex]; + int32_t argument_1 = _window_guest_list_groups_argument_1[groupIndex]; + int32_t argument_2 = _window_guest_list_groups_argument_2[groupIndex]; + int32_t bl = _window_guest_list_group_index[groupIndex]; do { - sint32 temp = curr_num_guests; + int32_t temp = curr_num_guests; curr_num_guests = _window_guest_list_groups_num_guests[swap_position]; _window_guest_list_groups_num_guests[swap_position] = temp; @@ -1033,7 +1033,7 @@ static void window_guest_list_find_groups() argument_2 = _window_guest_list_groups_argument_2[swap_position]; _window_guest_list_groups_argument_2[swap_position] = temp; - uint8 temp_faces[56]; + uint8_t temp_faces[56]; memcpy(temp_faces, &(_window_guest_list_groups_guest_faces[groupIndex*56]), 56); memcpy(&(_window_guest_list_groups_guest_faces[groupIndex * 56]), &(_window_guest_list_groups_guest_faces[swap_position * 56]), 56); memcpy(&(_window_guest_list_groups_guest_faces[swap_position * 56]), temp_faces, 56); @@ -1055,7 +1055,7 @@ static bool guest_should_be_visible(rct_peep *peep) char formatted[256]; set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); format_string(formatted, sizeof(formatted), peep->name_string_idx, gCommonFormatArgs); if (strcasestr(formatted, _window_guest_list_filter_name) == nullptr) diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index 93e5b91d27..762990ea14 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -95,7 +95,7 @@ static rct_window_event_list window_install_track_events = { static rct_track_td6 * _trackDesign; static std::string _trackPath; static std::string _trackName; -static std::vector _trackDesignPreviewPixels; +static std::vector _trackDesignPreviewPixels; static void window_install_track_update_preview(); static void window_install_track_design(rct_window *w); @@ -128,10 +128,10 @@ rct_window * window_install_track_open(const utf8 *path) gTrackDesignSceneryToggle = false; _currentTrackPieceDirection = 2; - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); - sint32 x = screenWidth / 2 - 201; - sint32 y = std::max(TOP_TOOLBAR_HEIGHT + 1, screenHeight / 2 - 200); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); + int32_t x = screenWidth / 2 - 201; + int32_t y = std::max(TOP_TOOLBAR_HEIGHT + 1, screenHeight / 2 - 200); rct_window *w = window_create(x, y, WW, WH, &window_install_track_events, WC_INSTALL_TRACK, 0); w->widgets = window_install_track_widgets; @@ -222,9 +222,9 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) // Track preview rct_widget *widget = &window_install_track_widgets[WIDX_TRACK_PREVIEW]; - sint32 x = w->x + widget->left + 1; - sint32 y = w->y + widget->top + 1; - sint32 colour = ColourMapA[w->colours[0]].darkest; + int32_t x = w->x + widget->left + 1; + int32_t y = w->y + widget->top + 1; + int32_t colour = ColourMapA[w->colours[0]].darkest; gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour); rct_g1_element g1temp = {}; @@ -265,7 +265,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) void * objectEntry = object_manager_load_object(&td6->vehicle_object); if (objectEntry != nullptr) { - sint32 groupIndex = object_manager_get_loaded_object_entry_index(objectEntry); + int32_t groupIndex = object_manager_get_loaded_object_entry_index(objectEntry); rideName = get_ride_naming(td6->type, get_ride_entry(groupIndex)); friendlyTrackName = rideName.name; } @@ -296,14 +296,14 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->type == RIDE_TYPE_MINI_GOLF) { // Holes - uint16 holes = td6->holes & 0x1F; + uint16_t holes = td6->holes & 0x1F; gfx_draw_string_left(dpi, STR_HOLES, &holes, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } else { // Maximum speed - uint16 speed = ((td6->max_speed << 16) * 9) >> 18; + uint16_t speed = ((td6->max_speed << 16) * 9) >> 18; gfx_draw_string_left(dpi, STR_MAX_SPEED, &speed, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; @@ -315,7 +315,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) // Ride length set_format_arg(0, rct_string_id, STR_RIDE_LENGTH_ENTRY); - set_format_arg(2, uint16, td6->ride_length); + set_format_arg(2, uint16_t, td6->ride_length); gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, gCommonFormatArgs, COLOUR_BLACK, x, y, 214); y += LIST_ROW_HEIGHT; } @@ -323,7 +323,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) if (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_G_FORCES)) { // Maximum positive vertical Gs - sint32 gForces = td6->max_positive_vertical_g * 32; + int32_t gForces = td6->max_positive_vertical_g * 32; gfx_draw_string_left(dpi, STR_MAX_POSITIVE_VERTICAL_G, &gForces, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; @@ -343,7 +343,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->total_air_time != 0) { // Total air time - sint32 airTime = td6->total_air_time * 25; + int32_t airTime = td6->total_air_time * 25; gfx_draw_string_left(dpi, STR_TOTAL_AIR_TIME, &airTime, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } @@ -353,7 +353,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) if (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_DROPS)) { // Drops - uint16 drops = td6->drops & 0x3F; + uint16_t drops = td6->drops & 0x3F; gfx_draw_string_left(dpi, STR_DROPS, &drops, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; @@ -364,7 +364,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->type != RIDE_TYPE_MINI_GOLF) { - uint16 inversions = td6->inversions & 0x1F; + uint16_t inversions = td6->inversions & 0x1F; if (inversions != 0) { // Inversions @@ -377,8 +377,8 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->space_required_x != 0xFF) { // Space required - set_format_arg(0, uint16, td6->space_required_x); - set_format_arg(2, uint16, td6->space_required_y); + set_format_arg(0, uint16_t, td6->space_required_x); + set_format_arg(2, uint16_t, td6->space_required_y); gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index af06e29ce3..40aa597fa9 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -53,7 +53,7 @@ static rct_widget window_land_widgets[] = { static void window_land_close(rct_window *w); static void window_land_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_land_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_land_update(rct_window *w); static void window_land_invalidate(rct_window *w); static void window_land_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -92,8 +92,8 @@ static rct_window_event_list window_land_events = { }; // clang-format on -static sint32 _selectedFloorTexture; -static sint32 _selectedWallTexture; +static int32_t _selectedFloorTexture; +static int32_t _selectedWallTexture; /** * @@ -210,9 +210,9 @@ static void window_land_mousedown(rct_window *w, rct_widgetindex widgetIndex, rc * * rct2: 0x00664090 */ -static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { - sint32 type; + int32_t type; switch (widgetIndex) { case WIDX_FLOOR: @@ -221,7 +221,7 @@ static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, sin type = (dropdownIndex == -1) ? _selectedFloorTexture : - (uint32)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; + (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; if (gLandToolTerrainSurface == type) { gLandToolTerrainSurface = 255; @@ -250,7 +250,7 @@ static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, sin static void window_land_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text) { - sint32 size; + int32_t size; char* end; if (widgetIndex != WIDX_PREVIEW || text == nullptr) @@ -311,7 +311,7 @@ static void window_land_invalidate(rct_window *w) */ static void window_land_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, numTiles; + int32_t x, y, numTiles; money32 price; rct_widget *previewWidget = &window_land_widgets[WIDX_PREVIEW]; diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index b16c8bc436..36f367bf90 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -52,9 +52,9 @@ static void window_land_rights_invalidate(rct_window *w); static void window_land_rights_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_land_rights_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_land_rights_inputsize(rct_window *w); -static void window_land_rights_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_land_rights_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_land_rights_tooldrag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_land_rights_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_land_rights_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_land_rights_tooldrag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_land_rights_toolabort(rct_window *w, rct_widgetindex widgetIndex); static bool land_rights_tool_is_active(); @@ -94,7 +94,7 @@ static rct_window_event_list window_land_rights_events = { #define LAND_RIGHTS_MODE_BUY_CONSTRUCTION_RIGHTS 0 #define LAND_RIGHTS_MODE_BUY_LAND 1 -static uint8 _landRightsMode; +static uint8_t _landRightsMode; static money32 _landRightsCost; rct_window * window_land_rights_open() @@ -195,7 +195,7 @@ static void window_land_rights_mousedown(rct_window *w, rct_widgetindex widgetIn static void window_land_rights_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text) { - sint32 size; + int32_t size; char* end; if (widgetIndex != WIDX_PREVIEW || text == nullptr) @@ -254,7 +254,7 @@ static void window_land_rights_invalidate(rct_window *w) static void window_land_rights_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; x = w->x + (window_land_rights_widgets[WIDX_PREVIEW].left + window_land_rights_widgets[WIDX_PREVIEW].right) / 2; y = w->y + (window_land_rights_widgets[WIDX_PREVIEW].top + window_land_rights_widgets[WIDX_PREVIEW].bottom) / 2; @@ -275,7 +275,7 @@ static void window_land_rights_paint(rct_window *w, rct_drawpixelinfo *dpi) } } -static void window_land_rights_tool_update_land_rights(sint16 x, sint16 y) +static void window_land_rights_tool_update_land_rights(int16_t x, int16_t y) { map_invalidate_selection_rect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; @@ -291,7 +291,7 @@ static void window_land_rights_tool_update_land_rights(sint16 x, sint16 y) return; } - uint8 state_changed = 0; + uint8_t state_changed = 0; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -303,11 +303,11 @@ static void window_land_rights_tool_update_land_rights(sint16 x, sint16 y) state_changed++; } - sint16 tool_size = gLandToolSize; + int16_t tool_size = gLandToolSize; if (tool_size == 0) tool_size = 1; - sint16 tool_length = (tool_size - 1) * 32; + int16_t tool_length = (tool_size - 1) * 32; // Move to tool bottom left mapTile.x -= (tool_size - 1) * 16; @@ -373,7 +373,7 @@ static void window_land_rights_toolabort(rct_window *w, rct_widgetindex widgetIn * * rct2: 0x006681D1 */ -static void window_land_rights_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_land_rights_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { window_land_rights_tool_update_land_rights(x, y); } @@ -382,7 +382,7 @@ static void window_land_rights_toolupdate(rct_window* w, rct_widgetindex widgetI * * rct2: 0x006681E6 */ -static void window_land_rights_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_land_rights_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (_landRightsMode == LAND_RIGHTS_MODE_BUY_LAND) { @@ -420,7 +420,7 @@ static void window_land_rights_tooldown(rct_window* w, rct_widgetindex widgetInd * * rct2: 0x006681FB */ -static void window_land_rights_tooldrag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_land_rights_tooldrag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (_landRightsMode == LAND_RIGHTS_MODE_BUY_LAND) { if (x != LOCATION_NULL) diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index a33cc9b7e2..78ac05c052 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -81,15 +81,15 @@ static rct_widget window_loadsave_widgets[] = static void window_loadsave_close(rct_window *w); static void window_loadsave_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_loadsave_resize(rct_window *w); -static void window_loadsave_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_loadsave_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_loadsave_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_loadsave_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_loadsave_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_loadsave_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_loadsave_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_loadsave_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_loadsave_compute_max_date_width(); static void window_loadsave_invalidate(rct_window *w); static void window_loadsave_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_loadsave_events = { @@ -139,7 +139,7 @@ struct LoadSaveListItem time_t date_modified; std::string date_formatted; std::string time_formatted; - uint8 type; + uint8_t type; bool loaded; }; @@ -151,12 +151,12 @@ static char _shortenedDirectory[MAX_PATH]; static char _parentDirectory[MAX_PATH]; static char _extension[32]; static char _defaultName[MAX_PATH]; -static sint32 _type; +static int32_t _type; -static sint32 maxDateWidth = 0; -static sint32 maxTimeWidth = 0; +static int32_t maxDateWidth = 0; +static int32_t maxTimeWidth = 0; -static void window_loadsave_populate_list(rct_window *w, sint32 includeNewItem, const char *directory, const char *extension); +static void window_loadsave_populate_list(rct_window *w, int32_t includeNewItem, const char *directory, const char *extension); static void window_loadsave_select(rct_window *w, const char *path); static void window_loadsave_sort_list(); @@ -167,7 +167,7 @@ void window_loadsave_set_loadsave_callback(loadsave_callback cb) _loadSaveCallback = cb; } -static sint32 window_loadsave_get_dir(utf8 *last_save, char *path, const char *subdir, size_t pathSize) +static int32_t window_loadsave_get_dir(utf8 *last_save, char *path, const char *subdir, size_t pathSize) { if (last_save && platform_ensure_directory_exists(last_save)) safe_strcpy(path, last_save, pathSize); @@ -183,7 +183,7 @@ static sint32 window_loadsave_get_dir(utf8 *last_save, char *path, const char *s return 1; } -rct_window *window_loadsave_open(sint32 type, const char *defaultName) +rct_window *window_loadsave_open(int32_t type, const char *defaultName) { _loadSaveCallback = nullptr; _type = type; @@ -280,7 +280,7 @@ rct_window *window_loadsave_open(sint32 type, const char *defaultName) return nullptr; } - w->no_list_items = static_cast(_listItems.size()); + w->no_list_items = static_cast(_listItems.size()); window_init_scroll_widgets(w); window_loadsave_compute_max_date_width(); @@ -311,7 +311,7 @@ static bool browse(bool isSave, char *path, size_t pathSize) { file_dialog_desc desc = {}; const utf8 * extension = ""; - uint32 fileType = FILE_EXTENSION_UNKNOWN; + uint32_t fileType = FILE_EXTENSION_UNKNOWN; rct_string_id title = STR_NONE; switch (_type & 0x0E) { @@ -413,7 +413,7 @@ static void window_loadsave_mouseup(rct_window *w, rct_widgetindex widgetIndex) safe_strcpy(path, _parentDirectory, sizeof(path)); window_loadsave_populate_list(w, isSave, path, _extension); window_init_scroll_widgets(w); - w->no_list_items = static_cast(_listItems.size()); + w->no_list_items = static_cast(_listItems.size()); break; case WIDX_NEW_FILE: @@ -435,7 +435,7 @@ static void window_loadsave_mouseup(rct_window *w, rct_widgetindex widgetIndex) safe_strcpy(path, _directory, sizeof(path)); window_loadsave_populate_list(w, isSave, path, _extension); window_init_scroll_widgets(w); - w->no_list_items = static_cast(_listItems.size()); + w->no_list_items = static_cast(_listItems.size()); } break; @@ -486,19 +486,19 @@ static void window_loadsave_mouseup(rct_window *w, rct_widgetindex widgetIndex) window_loadsave_populate_list(w, isSave, path, _extension); window_init_scroll_widgets(w); - w->no_list_items = static_cast(_listItems.size()); + w->no_list_items = static_cast(_listItems.size()); break; } } -static void window_loadsave_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_loadsave_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *height = w->no_list_items * SCROLLABLE_ROW_HEIGHT; } -static void window_loadsave_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_loadsave_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 selectedItem; + int32_t selectedItem; selectedItem = y / SCROLLABLE_ROW_HEIGHT; if (selectedItem >= w->no_list_items) @@ -507,7 +507,7 @@ static void window_loadsave_scrollmousedown(rct_window *w, sint32 scrollIndex, s if (_listItems[selectedItem].type == TYPE_DIRECTORY) { // The selected item is a folder - sint32 includeNewItem; + int32_t includeNewItem; w->no_list_items = 0; w->selected_list_item = -1; @@ -519,7 +519,7 @@ static void window_loadsave_scrollmousedown(rct_window *w, sint32 scrollIndex, s window_loadsave_populate_list(w, includeNewItem, directory, _extension); window_init_scroll_widgets(w); - w->no_list_items = static_cast(_listItems.size()); + w->no_list_items = static_cast(_listItems.size()); } else { @@ -532,9 +532,9 @@ static void window_loadsave_scrollmousedown(rct_window *w, sint32 scrollIndex, s } } -static void window_loadsave_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_loadsave_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 selectedItem; + int32_t selectedItem; selectedItem = y / SCROLLABLE_ROW_HEIGHT; if (selectedItem >= w->no_list_items) @@ -577,7 +577,7 @@ static void window_loadsave_textinput(rct_window *w, rct_widgetindex widgetIndex window_loadsave_populate_list(w, (_type & 1) == LOADSAVETYPE_SAVE, path, _extension); window_init_scroll_widgets(w); - w->no_list_items = static_cast(_listItems.size()); + w->no_list_items = static_cast(_listItems.size()); window_invalidate(w); break; @@ -707,14 +707,14 @@ static void window_loadsave_paint(rct_window *w, rct_drawpixelinfo *dpi) w->y + sort_date_widget.top + 1); } -static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); - const sint32 listWidth = w->widgets[WIDX_SCROLL].right - w->widgets[WIDX_SCROLL].left; + const int32_t listWidth = w->widgets[WIDX_SCROLL].right - w->widgets[WIDX_SCROLL].left; - for (sint32 i = 0; i < w->no_list_items; i++) + for (int32_t i = 0; i < w->no_list_items; i++) { - sint32 y = i * SCROLLABLE_ROW_HEIGHT; + int32_t y = i * SCROLLABLE_ROW_HEIGHT; if (y > dpi->y + dpi->height) break; @@ -739,13 +739,13 @@ static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, s // Print filename set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, char*, _listItems[i].name.c_str()); - sint32 max_file_width = w->widgets[WIDX_SORT_NAME].right - w->widgets[WIDX_SORT_NAME].left - 10; + int32_t max_file_width = w->widgets[WIDX_SORT_NAME].right - w->widgets[WIDX_SORT_NAME].left - 10; gfx_draw_string_left_clipped(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, 10, y, max_file_width); // Print formatted modified date, if this is a file if (_listItems[i].type == TYPE_FILE) { - sint32 offset = w->widgets[WIDX_SORT_DATE].left + maxDateWidth; + int32_t offset = w->widgets[WIDX_SORT_DATE].left + maxDateWidth; set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, char*, _listItems[i].date_formatted.c_str()); @@ -782,7 +782,7 @@ static void window_loadsave_sort_list() std::sort(_listItems.begin(), _listItems.end(), list_item_sort); } -static void window_loadsave_populate_list(rct_window *w, sint32 includeNewItem, const char *directory, const char *extension) +static void window_loadsave_populate_list(rct_window *w, int32_t includeNewItem, const char *directory, const char *extension) { utf8 absoluteDirectory[MAX_PATH]; Path::GetAbsolute(absoluteDirectory, Util::CountOf(absoluteDirectory), directory); @@ -800,12 +800,12 @@ static void window_loadsave_populate_list(rct_window *w, sint32 includeNewItem, window_loadsave_widgets[WIDX_NEW_FILE].type = includeNewItem ? WWT_BUTTON : WWT_EMPTY; window_loadsave_widgets[WIDX_NEW_FOLDER].type = includeNewItem ? WWT_BUTTON : WWT_EMPTY; - sint32 drives = platform_get_drives(); + int32_t drives = platform_get_drives(); if (str_is_null_or_empty(directory) && drives) { // List Windows drives w->disabled_widgets |= (1 << WIDX_NEW_FILE) | (1 << WIDX_NEW_FOLDER) | (1 << WIDX_UP); - for (sint32 x = 0; x < 26; x++) + for (int32_t x = 0; x < 26; x++) { if (drives & (1 << x)) { @@ -922,7 +922,7 @@ static void window_loadsave_populate_list(rct_window *w, sint32 includeNewItem, window_invalidate(w); } -static void window_loadsave_invoke_callback(sint32 result, const utf8 * path) +static void window_loadsave_invoke_callback(int32_t result, const utf8 * path) { if (_loadSaveCallback != nullptr) { @@ -1025,11 +1025,11 @@ static void window_loadsave_select(rct_window *w, const char *path) case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO): { save_path(&gConfigGeneral.last_save_scenario_directory, pathBuffer); - sint32 parkFlagsBackup = gParkFlags; + int32_t parkFlagsBackup = gParkFlags; gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; gS6Info.editor_step = 255; safe_strcpy(gScenarioFileName, pathBuffer, sizeof(gScenarioFileName)); - sint32 success = scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 3 : 2); + int32_t success = scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 3 : 2); gParkFlags = parkFlagsBackup; if (success) @@ -1061,7 +1061,7 @@ static void window_loadsave_select(rct_window *w, const char *path) case (LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK): { path_set_extension(pathBuffer, "td6", sizeof(pathBuffer)); - sint32 success = track_design_save_to_file(pathBuffer); + int32_t success = track_design_save_to_file(pathBuffer); if (success) { @@ -1198,8 +1198,8 @@ static void window_overwrite_prompt_paint(rct_window *w, rct_drawpixelinfo *dpi) set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, char *, _window_overwrite_prompt_name); - sint32 x = w->x + w->width / 2; - sint32 y = w->y + (w->height / 2) - 3; + int32_t x = w->x + w->width / 2; + int32_t y = w->y + (w->height / 2) - 3; gfx_draw_string_centred_wrapped(dpi, gCommonFormatArgs, x, y, w->width - 4, STR_FILEBROWSER_OVERWRITE_PROMPT, COLOUR_BLACK); } diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index d055244721..b26e454f04 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -83,7 +83,7 @@ static rct_widget window_map_widgets[] = { SPINNER_WIDGETS (1, 104, 198, 229, 240, STR_MAP_SIZE_VALUE, STR_NONE), // NB: 3 widgets { WWT_FLATBTN, 1, 4, 27, 1, 24, SPR_BUY_LAND_RIGHTS, STR_SELECT_PARK_OWNED_LAND_TIP }, { WWT_FLATBTN, 1, 4, 27, 1, 24, SPR_PARK_ENTRANCE, STR_BUILD_PARK_ENTRANCE_TIP }, - { WWT_FLATBTN, 1, 28, 51, 1, 24, (uint32) SPR_NONE, STR_SET_STARTING_POSITIONS_TIP }, + { WWT_FLATBTN, 1, 28, 51, 1, 24, (uint32_t) SPR_NONE, STR_SET_STARTING_POSITIONS_TIP }, { WWT_IMGBTN, 1, 4, 47, 17, 48, SPR_LAND_TOOL_SIZE_0, STR_NONE }, { WWT_TRNBTN, 1, 5, 20, 18, 33, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, { WWT_TRNBTN, 1, 31, 46, 32, 47, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, @@ -106,7 +106,7 @@ static constexpr const LocationXY16 MiniMapOffsets[] = { }; /** rct2: 0x00981BCC */ -static constexpr const uint16 RideKeyColours[] = { +static constexpr const uint16_t RideKeyColours[] = { MAP_COLOUR(PALETTE_INDEX_61), // COLOUR_KEY_RIDE MAP_COLOUR(PALETTE_INDEX_42), // COLOUR_KEY_FOOD MAP_COLOUR(PALETTE_INDEX_20), // COLOUR_KEY_DRINK @@ -122,17 +122,17 @@ static void window_map_resize(rct_window *w); static void window_map_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_map_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); static void window_map_update(rct_window *w); -static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_map_toolabort(rct_window *w, rct_widgetindex widgetIndex); -static void window_map_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_map_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_map_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_map_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_map_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_map_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_map_invalidate(rct_window *w); static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_map_events = { window_map_close, @@ -167,15 +167,15 @@ static rct_window_event_list window_map_events = { // clang-format on /** rct2: 0x00F1AD61 */ -static uint8 _activeTool; +static uint8_t _activeTool; /** rct2: 0x00F1AD6C */ -static uint32 _currentLine; +static uint32_t _currentLine; /** rct2: 0x00F1AD68 */ -static std::vector _mapImageData; +static std::vector _mapImageData; -static uint16 _landRightsToolSize; +static uint16_t _landRightsToolSize; static void window_map_init_map(); static void window_map_centre_on_view_point(); @@ -187,16 +187,16 @@ static void window_map_paint_hud_rectangle(rct_drawpixelinfo *dpi); static void window_map_inputsize_land(rct_window *w); static void window_map_inputsize_map(rct_window *w); -static void window_map_set_land_rights_tool_update(sint32 x, sint32 y); -static void window_map_place_park_entrance_tool_update(sint32 x, sint32 y); -static void window_map_set_peep_spawn_tool_update(sint32 x, sint32 y); -static void window_map_place_park_entrance_tool_down(sint32 x, sint32 y); -static void window_map_set_peep_spawn_tool_down(sint32 x, sint32 y); +static void window_map_set_land_rights_tool_update(int32_t x, int32_t y); +static void window_map_place_park_entrance_tool_update(int32_t x, int32_t y); +static void window_map_set_peep_spawn_tool_update(int32_t x, int32_t y); +static void window_map_place_park_entrance_tool_down(int32_t x, int32_t y); +static void window_map_set_peep_spawn_tool_down(int32_t x, int32_t y); static void map_window_increase_map_size(); static void map_window_decrease_map_size(); static void map_window_set_pixels(rct_window *w); -static CoordsXY map_window_screen_to_map(sint32 screenX, sint32 screenY); +static CoordsXY map_window_screen_to_map(int32_t screenX, int32_t screenY); /** * @@ -310,7 +310,7 @@ static void window_map_mouseup(rct_window *w, rct_widgetindex widgetIndex) break; _activeTool = 2; // Prevent mountain tool size. - _landRightsToolSize = std::max(MINIMUM_TOOL_SIZE, _landRightsToolSize); + _landRightsToolSize = std::max(MINIMUM_TOOL_SIZE, _landRightsToolSize); show_gridlines(); show_land_rights(); show_construction_rights(); @@ -444,7 +444,7 @@ static void window_map_update(rct_window *w) window_map_centre_on_view_point(); } - for (sint32 i = 0; i < 16; i++) + for (int32_t i = 0; i < 16; i++) map_window_set_pixels(w); window_invalidate(w); @@ -469,7 +469,7 @@ static void window_map_update(rct_window *w) * * rct2: 0x0068D093 */ -static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_SET_LAND_RIGHTS: @@ -488,7 +488,7 @@ static void window_map_toolupdate(rct_window* w, rct_widgetindex widgetIndex, si * * rct2: 0x0068D074 */ -static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_BUILD_PARK_ENTRANCE: @@ -504,7 +504,7 @@ static void window_map_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint * * rct2: 0x0068D088 */ -static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_map_tooldrag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_SET_LAND_RIGHTS: @@ -557,7 +557,7 @@ static void window_map_toolabort(rct_window *w, rct_widgetindex widgetIndex) * * rct2: 0x0068D7CC */ -static void window_map_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_map_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { window_map_invalidate(w); @@ -569,12 +569,12 @@ static void window_map_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 * * * rct2: 0x0068D726 */ -static void window_map_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_map_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { CoordsXY c = map_window_screen_to_map(x, y); - sint32 mapX = Math::Clamp(0, c.x, MAXIMUM_MAP_SIZE_TECHNICAL * 32 - 1); - sint32 mapY = Math::Clamp(0, c.y, MAXIMUM_MAP_SIZE_TECHNICAL * 32 - 1); - sint32 mapZ = tile_element_height(x, y); + int32_t mapX = Math::Clamp(0, c.x, MAXIMUM_MAP_SIZE_TECHNICAL * 32 - 1); + int32_t mapY = Math::Clamp(0, c.y, MAXIMUM_MAP_SIZE_TECHNICAL * 32 - 1); + int32_t mapZ = tile_element_height(x, y); rct_window * mainWindow = window_get_main(); if (mainWindow != nullptr) { @@ -583,9 +583,9 @@ static void window_map_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 if (land_tool_is_active()) { // Set land terrain - sint32 landToolSize = std::max(1, gLandToolSize); - sint32 size = (landToolSize * 32) - 32; - sint32 radius = (landToolSize * 16) - 16; + int32_t landToolSize = std::max(1, gLandToolSize); + int32_t size = (landToolSize * 32) - 32; + int32_t radius = (landToolSize * 16) - 16; mapX = (mapX - radius) & 0xFFE0; mapY = (mapY - radius) & 0xFFE0; @@ -610,9 +610,9 @@ static void window_map_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 ); } else if (widget_is_active_tool(w, WIDX_SET_LAND_RIGHTS)) { // Set land rights - sint32 landRightsToolSize = std::max(1, _landRightsToolSize); - sint32 size = (landRightsToolSize * 32) - 32; - sint32 radius = (landRightsToolSize * 16) - 16; + int32_t landRightsToolSize = std::max(1, _landRightsToolSize); + int32_t size = (landRightsToolSize * 32) - 32; + int32_t radius = (landRightsToolSize * 16) - 16; mapX = (mapX - radius) & 0xFFE0; mapY = (mapY - radius) & 0xFFE0; @@ -640,7 +640,7 @@ static void window_map_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 static void window_map_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text) { - sint32 size; + int32_t size; char* end; if (text == nullptr) @@ -662,7 +662,7 @@ static void window_map_textinput(rct_window *w, rct_widgetindex widgetIndex, cha size += 2; size = Math::Clamp(MINIMUM_MAP_SIZE_TECHNICAL, size, MAXIMUM_MAP_SIZE_TECHNICAL); - sint32 currentSize = gMapSize; + int32_t currentSize = gMapSize; while (size < currentSize) { map_window_decrease_map_size(); currentSize--; @@ -692,8 +692,8 @@ static void window_map_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_s */ static void window_map_invalidate(rct_window *w) { - uint64 pressedWidgets; - sint32 i, height; + uint64_t pressedWidgets; + int32_t i, height; // Set the pressed widgets pressedWidgets = w->pressed_widgets; @@ -826,8 +826,8 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); window_map_draw_tab_images(w, dpi); - sint32 x = w->x + (window_map_widgets[WIDX_LAND_TOOL].left + window_map_widgets[WIDX_LAND_TOOL].right) / 2; - sint32 y = w->y + (window_map_widgets[WIDX_LAND_TOOL].top + window_map_widgets[WIDX_LAND_TOOL].bottom) / 2; + int32_t x = w->x + (window_map_widgets[WIDX_LAND_TOOL].left + window_map_widgets[WIDX_LAND_TOOL].right) / 2; + int32_t y = w->y + (window_map_widgets[WIDX_LAND_TOOL].top + window_map_widgets[WIDX_LAND_TOOL].bottom) / 2; // Draw land tool size if (widget_is_active_tool(w, WIDX_SET_LAND_RIGHTS) && _landRightsToolSize > MAX_TOOL_SIZE_WITH_SPRITE) { @@ -862,7 +862,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi) STR_MAP_TOILET, }; - for (uint32 i = 0; i < Util::CountOf(RideKeyColours); i++) + for (uint32_t i = 0; i < Util::CountOf(RideKeyColours); i++) { gfx_fill_rect(dpi, x, y + 2, x + 6, y + 8, RideKeyColours[i]); gfx_draw_string_left(dpi, mapLabels[i], w, COLOUR_BLACK, x + LIST_ROW_HEIGHT, y); @@ -883,7 +883,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x0068CF23 */ -static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { gfx_clear(dpi, PALETTE_INDEX_10); @@ -925,8 +925,8 @@ static void window_map_centre_on_view_point() { rct_window *w = window_get_main(); rct_window *w_map; - sint16 ax, bx, cx, dx; - sint16 bp, di; + int16_t ax, bx, cx, dx; + int16_t bp, di; if (w == nullptr || w->viewport == nullptr) return; @@ -985,7 +985,7 @@ static void window_map_show_default_scenario_editor_buttons(rct_window *w) { if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) w->widgets[WIDX_MAP_GENERATOR].type = WWT_BUTTON; - set_format_arg(2, uint16, gMapSize - 2); + set_format_arg(2, uint16_t, gMapSize - 2); } static void window_map_inputsize_land(rct_window *w) @@ -1004,7 +1004,7 @@ static void window_map_inputsize_map(rct_window *w) static void window_map_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi) { - uint32 image; + uint32_t image; // Guest tab image (animated) image = SPR_TAB_GUESTS_0; @@ -1027,7 +1027,7 @@ static void window_map_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi) */ static MapCoordsXY window_map_transform_to_map_coords(CoordsXY c) { - sint32 x = c.x, y = c.y; + int32_t x = c.x, y = c.y; switch (get_current_rotation()) { case 3: @@ -1058,20 +1058,20 @@ static MapCoordsXY window_map_transform_to_map_coords(CoordsXY c) static void window_map_paint_peep_overlay(rct_drawpixelinfo *dpi) { rct_peep *peep; - uint16 spriteIndex; + uint16_t spriteIndex; FOR_ALL_PEEPS(spriteIndex, peep) { if (peep->x == LOCATION_NULL) continue; MapCoordsXY c = window_map_transform_to_map_coords({peep->x, peep->y}); - sint16 left = c.x; - sint16 top = c.y; + int16_t left = c.x; + int16_t top = c.y; - sint16 right = left; - sint16 bottom = top; + int16_t right = left; + int16_t bottom = top; - sint16 colour = PALETTE_INDEX_20; + int16_t colour = PALETTE_INDEX_20; if (sprite_get_flashing((rct_sprite*)peep)) { if (peep->type == PEEP_TYPE_STAFF) { @@ -1101,7 +1101,7 @@ static void window_map_paint_peep_overlay(rct_drawpixelinfo *dpi) static void window_map_paint_train_overlay(rct_drawpixelinfo *dpi) { rct_vehicle *train, *vehicle; - uint16 train_index, vehicle_index; + uint16_t train_index, vehicle_index; for (train_index = gSpriteListHead[SPRITE_LIST_TRAIN]; train_index != SPRITE_INDEX_NULL; train_index = train->next) { train = GET_VEHICLE(train_index); @@ -1134,10 +1134,10 @@ static void window_map_paint_hud_rectangle(rct_drawpixelinfo *dpi) return; LocationXY16 offset = MiniMapOffsets[get_current_rotation()]; - sint16 left = (viewport->view_x >> 5) + offset.x; - sint16 right = ((viewport->view_x + viewport->view_width) >> 5) + offset.x; - sint16 top = (viewport->view_y >> 4) + offset.y; - sint16 bottom = ((viewport->view_y + viewport->view_height) >> 4) + offset.y; + int16_t left = (viewport->view_x >> 5) + offset.x; + int16_t right = ((viewport->view_x + viewport->view_width) >> 5) + offset.x; + int16_t top = (viewport->view_y >> 4) + offset.y; + int16_t bottom = ((viewport->view_y + viewport->view_height) >> 4) + offset.y; // top horizontal lines gfx_fill_rect(dpi, left, top, left + 3, top, PALETTE_INDEX_56); @@ -1160,9 +1160,9 @@ static void window_map_paint_hud_rectangle(rct_drawpixelinfo *dpi) * * rct2: 0x0068D24E */ -static void window_map_set_land_rights_tool_update(sint32 x, sint32 y) +static void window_map_set_land_rights_tool_update(int32_t x, int32_t y) { - sint16 mapX, mapY; + int16_t mapX, mapY; rct_viewport *viewport; map_invalidate_selection_rect(); @@ -1174,12 +1174,12 @@ static void window_map_set_land_rights_tool_update(sint32 x, sint32 y) gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; gMapSelectType = MAP_SELECT_TYPE_FULL; - sint32 landRightsToolSize = _landRightsToolSize; + int32_t landRightsToolSize = _landRightsToolSize; if (landRightsToolSize == 0) landRightsToolSize = 1; - sint32 size = (landRightsToolSize * 32) - 32; - sint32 radius = (landRightsToolSize * 16) - 16; + int32_t size = (landRightsToolSize * 32) - 32; + int32_t radius = (landRightsToolSize * 16) - 16; mapX = (mapX - radius) & 0xFFE0; mapY = (mapY - radius) & 0xFFE0; gMapSelectPositionA.x = mapX; @@ -1193,7 +1193,7 @@ static void window_map_set_land_rights_tool_update(sint32 x, sint32 y) * * rct2: 0x00666EEF */ -static void place_park_entrance_get_map_position(sint32 x, sint32 y, sint16 *mapX, sint16 *mapY, sint16 *mapZ, sint32 *direction) +static void place_park_entrance_get_map_position(int32_t x, int32_t y, int16_t *mapX, int16_t *mapY, int16_t *mapZ, int32_t *direction) { rct_tile_element *tileElement; @@ -1219,10 +1219,10 @@ static void place_park_entrance_get_map_position(sint32 x, sint32 y, sint16 *map * * rct2: 0x00666FD0 */ -static void window_map_place_park_entrance_tool_update(sint32 x, sint32 y) +static void window_map_place_park_entrance_tool_update(int32_t x, int32_t y) { - sint16 mapX, mapY, mapZ = 0; - sint32 direction = 0, sideDirection; + int16_t mapX, mapY, mapZ = 0; + int32_t direction = 0, sideDirection; map_invalidate_selection_rect(); map_invalidate_map_selection_tiles(); @@ -1230,7 +1230,7 @@ static void window_map_place_park_entrance_tool_update(sint32 x, sint32 y) gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; place_park_entrance_get_map_position(x, y, &mapX, &mapY, &mapZ, &direction); - if (mapX == (sint16)-1) { + if (mapX == (int16_t)-1) { park_entrance_remove_ghost(); return; } @@ -1269,9 +1269,9 @@ static void window_map_place_park_entrance_tool_update(sint32 x, sint32 y) * * rct2: 0x0068D4E9 */ -static void window_map_set_peep_spawn_tool_update(sint32 x, sint32 y) +static void window_map_set_peep_spawn_tool_update(int32_t x, int32_t y) { - sint32 mapX, mapY, mapZ, direction; + int32_t mapX, mapY, mapZ, direction; rct_tile_element *tileElement; map_invalidate_selection_rect(); @@ -1307,12 +1307,12 @@ static void window_map_set_peep_spawn_tool_update(sint32 x, sint32 y) * * rct2: 0x006670A4 */ -static void window_map_place_park_entrance_tool_down(sint32 x, sint32 y) +static void window_map_place_park_entrance_tool_down(int32_t x, int32_t y) { park_entrance_remove_ghost(); - sint16 mapX, mapY, mapZ; - sint32 direction; + int16_t mapX, mapY, mapZ; + int32_t direction; place_park_entrance_get_map_position(x, y, &mapX, &mapY, &mapZ, &direction); if (mapX != LOCATION_NULL) { @@ -1333,10 +1333,10 @@ static void window_map_place_park_entrance_tool_down(sint32 x, sint32 y) * * rct2: 0x0068D573 */ -static void window_map_set_peep_spawn_tool_down(sint32 x, sint32 y) +static void window_map_set_peep_spawn_tool_down(int32_t x, int32_t y) { rct_tile_element *tileElement; - sint32 mapX, mapY, mapZ, direction; + int32_t mapX, mapY, mapZ, direction; // Verify footpath exists at location, and retrieve coordinates footpath_get_coordinates_from_pos(x, y, &mapX, &mapY, &direction, &tileElement); @@ -1345,7 +1345,7 @@ static void window_map_set_peep_spawn_tool_down(sint32 x, sint32 y) mapZ = tileElement->base_height * 8; - bool result = place_peep_spawn({mapX, mapY, mapZ, (uint8)direction}); + bool result = place_peep_spawn({mapX, mapY, mapZ, (uint8_t)direction}); if (result) { audio_play_sound_at_location( SOUND_PLACE_ITEM, @@ -1398,8 +1398,8 @@ static void map_window_decrease_map_size() gfx_invalidate_screen(); } -static constexpr const uint16 WaterColour = MAP_COLOUR(PALETTE_INDEX_195); -static constexpr const uint16 TerrainColour[] = { +static constexpr const uint16_t WaterColour = MAP_COLOUR(PALETTE_INDEX_195); +static constexpr const uint16_t TerrainColour[] = { MAP_COLOUR(PALETTE_INDEX_73), // TERRAIN_GRASS MAP_COLOUR(PALETTE_INDEX_40), // TERRAIN_SAND MAP_COLOUR(PALETTE_INDEX_108), // TERRAIN_DIRT @@ -1416,7 +1416,7 @@ static constexpr const uint16 TerrainColour[] = { MAP_COLOUR(PALETTE_INDEX_222), // TERRAIN_SAND_LIGHT }; -static constexpr const uint16 ElementTypeMaskColour[] = { +static constexpr const uint16_t ElementTypeMaskColour[] = { 0xFFFF, // TILE_ELEMENT_TYPE_SURFACE 0x0000, // TILE_ELEMENT_TYPE_PATH 0x00FF, // TILE_ELEMENT_TYPE_TRACK @@ -1428,7 +1428,7 @@ static constexpr const uint16 ElementTypeMaskColour[] = { 0x0000, // TILE_ELEMENT_TYPE_CORRUPT }; -static constexpr const uint16 ElementTypeAddColour[] = { +static constexpr const uint16_t ElementTypeAddColour[] = { MAP_COLOUR(PALETTE_INDEX_0), // TILE_ELEMENT_TYPE_SURFACE MAP_COLOUR(PALETTE_INDEX_17), // TILE_ELEMENT_TYPE_PATH MAP_COLOUR_2(PALETTE_INDEX_183, PALETTE_INDEX_0), // TILE_ELEMENT_TYPE_TRACK @@ -1451,7 +1451,7 @@ enum { COLOUR_KEY_TOILETS }; -static constexpr const uint8 RideColourKey[] = { +static constexpr const uint8_t RideColourKey[] = { COLOUR_KEY_RIDE, // RIDE_TYPE_SPIRAL_ROLLER_COASTER COLOUR_KEY_RIDE, // RIDE_TYPE_STAND_UP_ROLLER_COASTER COLOUR_KEY_RIDE, // RIDE_TYPE_SUSPENDED_SWINGING_COASTER @@ -1548,20 +1548,20 @@ static constexpr const uint8 RideColourKey[] = { COLOUR_KEY_RIDE, // }; -static uint16 map_window_get_pixel_colour_peep(CoordsXY c) +static uint16_t map_window_get_pixel_colour_peep(CoordsXY c) { rct_tile_element * tileElement = map_get_surface_element_at(c); - uint16 colour = TerrainColour[surface_get_terrain(tileElement)]; + uint16_t colour = TerrainColour[surface_get_terrain(tileElement)]; if (surface_get_water_height(tileElement) > 0) colour = WaterColour; if (!(tileElement->properties.surface.ownership & OWNERSHIP_OWNED)) colour = MAP_COLOUR_UNOWNED(colour); - const sint32 maxSupportedTileElementType = (sint32)Util::CountOf(ElementTypeAddColour); + const int32_t maxSupportedTileElementType = (int32_t)Util::CountOf(ElementTypeAddColour); while (!(tileElement++)->IsLastForTile()) { - sint32 tileElementType = tileElement->GetType() >> 2; + int32_t tileElementType = tileElement->GetType() >> 2; if (tileElementType >= maxSupportedTileElementType) { tileElementType = TILE_ELEMENT_TYPE_CORRUPT >> 2; } @@ -1572,11 +1572,11 @@ static uint16 map_window_get_pixel_colour_peep(CoordsXY c) return colour; } -static uint16 map_window_get_pixel_colour_ride(CoordsXY c) +static uint16_t map_window_get_pixel_colour_ride(CoordsXY c) { Ride *ride; - uint16 colourA = 0; // highlight colour - uint16 colourB = MAP_COLOUR(PALETTE_INDEX_13); // surface colour (dark grey) + uint16_t colourA = 0; // highlight colour + uint16_t colourB = MAP_COLOUR(PALETTE_INDEX_13); // surface colour (dark grey) // as an improvement we could use first_element to show underground stuff? rct_tile_element * tileElement = map_get_surface_element_at(c); @@ -1611,10 +1611,10 @@ static uint16 map_window_get_pixel_colour_ride(CoordsXY c) static void map_window_set_pixels(rct_window *w) { - uint16 colour = 0; - sint32 x = 0, y = 0, dx = 0, dy = 0; + uint16_t colour = 0; + int32_t x = 0, y = 0, dx = 0, dy = 0; - sint32 pos = (_currentLine * (MAP_WINDOW_MAP_SIZE - 1)) + MAXIMUM_MAP_SIZE_TECHNICAL - 1; + int32_t pos = (_currentLine * (MAP_WINDOW_MAP_SIZE - 1)) + MAXIMUM_MAP_SIZE_TECHNICAL - 1; LocationXY16 destinationPosition = MakeXY16(pos % MAP_WINDOW_MAP_SIZE, pos / MAP_WINDOW_MAP_SIZE); auto destination = _mapImageData.data() + (destinationPosition.y * MAP_WINDOW_MAP_SIZE) + destinationPosition.x; switch (get_current_rotation()) { @@ -1644,7 +1644,7 @@ static void map_window_set_pixels(rct_window *w) break; } - for (sint32 i = 0; i < MAXIMUM_MAP_SIZE_TECHNICAL; i++) { + for (int32_t i = 0; i < MAXIMUM_MAP_SIZE_TECHNICAL; i++) { if ( x > 0 && y > 0 && @@ -1674,12 +1674,12 @@ static void map_window_set_pixels(rct_window *w) _currentLine = 0; } -static CoordsXY map_window_screen_to_map(sint32 screenX, sint32 screenY) +static CoordsXY map_window_screen_to_map(int32_t screenX, int32_t screenY) { screenX = ((screenX + 8) - MAXIMUM_MAP_SIZE_TECHNICAL) / 2; screenY = ((screenY + 8)) / 2; - sint32 x = (screenY - screenX) * 32; - sint32 y = (screenX + screenY) * 32; + int32_t x = (screenY - screenX) * 32; + int32_t y = (screenX + screenY) * 32; switch (get_current_rotation()) { case 0: return {x, y}; diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index b04a5a649a..38953db012 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -184,7 +184,7 @@ static void window_mapgen_shared_mouseup(rct_window *w, rct_widgetindex widgetIn static void window_mapgen_base_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_mapgen_base_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_mapgen_base_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_mapgen_base_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_mapgen_base_update(rct_window *w); static void window_mapgen_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_mapgen_base_invalidate(rct_window *w); @@ -198,7 +198,7 @@ static void window_mapgen_random_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_mapgen_simplex_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_mapgen_simplex_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_mapgen_simplex_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_mapgen_simplex_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_mapgen_simplex_update(rct_window *w); static void window_mapgen_simplex_invalidate(rct_window *w); static void window_mapgen_simplex_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -343,7 +343,7 @@ static rct_window_event_list *PageEvents[] = { #pragma region Enabled widgets -static uint64 PageEnabledWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { +static uint64_t PageEnabledWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { (1ULL << WIDX_CLOSE) | (1ULL << WIDX_TAB_1) | (1ULL << WIDX_TAB_2) | @@ -409,7 +409,7 @@ static uint64 PageEnabledWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { (1ULL << WIDX_HEIGHTMAP_SELECT) }; -static uint64 PageDisabledWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { +static uint64_t PageDisabledWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { 0, 0, @@ -433,7 +433,7 @@ static uint64 PageDisabledWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { (1ULL << WIDX_HEIGHTMAP_WATER_LEVEL_DOWN) }; -static uint64 HoldDownWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { +static uint64_t HoldDownWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { (1ULL << WIDX_MAP_SIZE_UP) | (1ULL << WIDX_MAP_SIZE_DOWN) | (1ULL << WIDX_BASE_HEIGHT_UP) | @@ -466,7 +466,7 @@ static uint64 HoldDownWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { (1ULL << WIDX_HEIGHTMAP_WATER_LEVEL_DOWN) }; -static uint64 PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { +static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { 0, 0, 0, @@ -475,13 +475,13 @@ static uint64 PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { #pragma endregion -static constexpr const sint32 TabAnimationDivisor[WINDOW_MAPGEN_PAGE_COUNT] = { +static constexpr const int32_t TabAnimationDivisor[WINDOW_MAPGEN_PAGE_COUNT] = { 1, 1, 1, 1 }; -static constexpr const sint32 TabAnimationFrames[WINDOW_MAPGEN_PAGE_COUNT] = { +static constexpr const int32_t TabAnimationFrames[WINDOW_MAPGEN_PAGE_COUNT] = { 1, 1, 1, 1 }; -static constexpr const sint32 TabAnimationLoops[WINDOW_MAPGEN_PAGE_COUNT] = { +static constexpr const int32_t TabAnimationLoops[WINDOW_MAPGEN_PAGE_COUNT] = { 16, 16, 16, 0 }; // clang-format on @@ -492,30 +492,30 @@ static constexpr const sint32 TabAnimationLoops[WINDOW_MAPGEN_PAGE_COUNT] = { #define WATERLEVEL_MAX 54 #define MAX_SMOOTH_ITERATIONS 20 -static void window_mapgen_set_page(rct_window *w, sint32 page); +static void window_mapgen_set_page(rct_window *w, int32_t page); static void window_mapgen_set_pressed_tab(rct_window *w); static void window_mapgen_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); -static sint32 _mapSize = 150; -static sint32 _baseHeight = 12; -static sint32 _waterLevel = 6; -static sint32 _floorTexture = TERRAIN_GRASS; -static sint32 _wallTexture = TERRAIN_EDGE_ROCK; +static int32_t _mapSize = 150; +static int32_t _baseHeight = 12; +static int32_t _waterLevel = 6; +static int32_t _floorTexture = TERRAIN_GRASS; +static int32_t _wallTexture = TERRAIN_EDGE_ROCK; static bool _randomTerrain = true; -static sint32 _placeTrees = 1; +static int32_t _placeTrees = 1; -static sint32 _simplex_low = 6; -static sint32 _simplex_high = 10; -static sint32 _simplex_base_freq = 60; -static sint32 _simplex_octaves = 4; +static int32_t _simplex_low = 6; +static int32_t _simplex_high = 10; +static int32_t _simplex_base_freq = 60; +static int32_t _simplex_octaves = 4; static bool _heightmapLoaded = false; static bool _heightmapSmoothMap = false; -static sint32 _heightmapSmoothStrength = 1; +static int32_t _heightmapSmoothStrength = 1; static bool _heightmapNormalize = false; static bool _heightmapSmoothTiles = true; -static sint32 _heightmapLow = 2; -static sint32 _heightmapHigh = 70; +static int32_t _heightmapLow = 2; +static int32_t _heightmapHigh = 70; rct_window *window_mapgen_open() { @@ -596,13 +596,13 @@ static void window_mapgen_base_mouseup(rct_window *w, rct_widgetindex widgetInde window_text_input_open(w, WIDX_MAP_SIZE, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, STR_FORMAT_INTEGER, _mapSize - 2, 4); break; case WIDX_BASE_HEIGHT: - TextInputDescriptionArgs[0] = (uint16)((BASESIZE_MIN - 12) / 2); - TextInputDescriptionArgs[1] = (uint16)((BASESIZE_MAX - 12) / 2); + TextInputDescriptionArgs[0] = (uint16_t)((BASESIZE_MIN - 12) / 2); + TextInputDescriptionArgs[1] = (uint16_t)((BASESIZE_MAX - 12) / 2); window_text_input_open(w, WIDX_BASE_HEIGHT, STR_BASE_HEIGHT, STR_ENTER_BASE_HEIGHT, STR_FORMAT_INTEGER, (_baseHeight - 12) / 2, 3); break; case WIDX_WATER_LEVEL: - TextInputDescriptionArgs[0] = (uint16)((WATERLEVEL_MIN - 12) / 2); - TextInputDescriptionArgs[1] = (uint16)((WATERLEVEL_MAX - 12) / 2); + TextInputDescriptionArgs[0] = (uint16_t)((WATERLEVEL_MIN - 12) / 2); + TextInputDescriptionArgs[1] = (uint16_t)((WATERLEVEL_MAX - 12) / 2); window_text_input_open(w, WIDX_WATER_LEVEL, STR_WATER_LEVEL, STR_ENTER_WATER_LEVEL, STR_FORMAT_INTEGER, (_waterLevel - 12) / 2, 3); break; } @@ -644,9 +644,9 @@ static void window_mapgen_base_mousedown(rct_window *w, rct_widgetindex widgetIn } } -static void window_mapgen_base_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_mapgen_base_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { - sint32 type; + int32_t type; switch (widgetIndex) { case WIDX_FLOOR_TEXTURE: @@ -655,7 +655,7 @@ static void window_mapgen_base_dropdown(rct_window *w, rct_widgetindex widgetInd type = (dropdownIndex == -1) ? _floorTexture : - (uint32)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; + (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; if (gLandToolTerrainSurface == type) { gLandToolTerrainSurface = 255; @@ -692,7 +692,7 @@ static void window_mapgen_base_update(rct_window *w) static void window_mapgen_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text) { - sint32 value; + int32_t value; char* end; if (text == nullptr) @@ -738,12 +738,12 @@ static void window_mapgen_base_invalidate(rct_window *w) static void window_mapgen_base_paint(rct_window *w, rct_drawpixelinfo *dpi) { - uint16 arg; + uint16_t arg; window_draw_widgets(w, dpi); window_mapgen_draw_tab_images(dpi, w); - const uint8 textColour = w->colours[1]; + const uint8_t textColour = w->colours[1]; gfx_draw_string_left(dpi, STR_MAP_SIZE, nullptr, textColour, w->x + 4, w->y + w->widgets[WIDX_MAP_SIZE].top + 1); gfx_draw_string_left(dpi, STR_BASE_HEIGHT_LABEL, nullptr, textColour, w->x + 4, w->y + w->widgets[WIDX_BASE_HEIGHT].top + 1); @@ -937,9 +937,9 @@ static void window_mapgen_simplex_mousedown(rct_window *w, rct_widgetindex widge } } -static void window_mapgen_simplex_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_mapgen_simplex_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { - sint32 type; + int32_t type; switch (widgetIndex) { case WIDX_SIMPLEX_FLOOR_TEXTURE: @@ -948,7 +948,7 @@ static void window_mapgen_simplex_dropdown(rct_window *w, rct_widgetindex widget type = (dropdownIndex == -1) ? _floorTexture : - (uint32)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; + (uint32_t)gDropdownItemsArgs[dropdownIndex] - SPR_FLOOR_TEXTURE_GRASS; if (gLandToolTerrainSurface == type) { gLandToolTerrainSurface = 255; @@ -1013,12 +1013,12 @@ static void window_mapgen_simplex_invalidate(rct_window *w) static void window_mapgen_simplex_paint(rct_window *w, rct_drawpixelinfo *dpi) { - uint16 arg; + uint16_t arg; window_draw_widgets(w, dpi); window_mapgen_draw_tab_images(dpi, w); - const uint8 textColour = w->colours[1]; + const uint8_t textColour = w->colours[1]; gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_LOW_, nullptr, textColour, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_LOW].top + 1); gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_HIGH, nullptr, textColour, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_HIGH].top + 1); @@ -1101,7 +1101,7 @@ static void window_mapgen_heightmap_generate_map() gfx_invalidate_screen(); } -static void window_mapgen_heightmap_loadsave_callback(sint32 result, const utf8 *path) +static void window_mapgen_heightmap_loadsave_callback(int32_t result, const utf8 *path) { if (result == MODAL_RESULT_OK) { if (!mapgen_load_heightmap(path)) { @@ -1185,28 +1185,28 @@ static void window_mapgen_heightmap_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); window_mapgen_draw_tab_images(dpi, w); - const uint8 enabledColour = w->colours[1]; - const uint8 disabledColour = enabledColour | COLOUR_FLAG_INSET; + const uint8_t enabledColour = w->colours[1]; + const uint8_t disabledColour = enabledColour | COLOUR_FLAG_INSET; // Smooth strength label and value - const uint8 strengthColour = _heightmapSmoothMap ? enabledColour : disabledColour; - sint16 strength = _heightmapSmoothStrength; + const uint8_t strengthColour = _heightmapSmoothMap ? enabledColour : disabledColour; + int16_t strength = _heightmapSmoothStrength; gfx_draw_string_left(dpi, STR_MAPGEN_SMOOTH_STRENGTH, nullptr, strengthColour, w->x + 5, w->y + w->widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1); gfx_draw_string_left(dpi, STR_COMMA16, &strength, strengthColour, w->x + w->widgets[WIDX_HEIGHTMAP_STRENGTH].left + 1, w->y + w->widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1); // Low label and value - const uint8 labelColour = _heightmapLoaded ? enabledColour : disabledColour; - sint16 low = _heightmapLow; + const uint8_t labelColour = _heightmapLoaded ? enabledColour : disabledColour; + int16_t low = _heightmapLow; gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_LOW_, nullptr, labelColour, w->x + 5, w->y + w->widgets[WIDX_HEIGHTMAP_LOW].top + 1); gfx_draw_string_left(dpi, STR_COMMA16, &low, labelColour, w->x + w->widgets[WIDX_HEIGHTMAP_LOW].left + 1, w->y + w->widgets[WIDX_HEIGHTMAP_LOW].top + 1); // High label and value - sint16 high = _heightmapHigh; + int16_t high = _heightmapHigh; gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_HIGH, nullptr, labelColour, w->x + 5, w->y + w->widgets[WIDX_HEIGHTMAP_HIGH].top + 1); gfx_draw_string_left(dpi, STR_COMMA16, &high, labelColour, w->x + w->widgets[WIDX_HEIGHTMAP_HIGH].left + 1, w->y + w->widgets[WIDX_HEIGHTMAP_HIGH].top + 1); // Water level label and value - sint16 waterLevel = _waterLevel; + int16_t waterLevel = _waterLevel; gfx_draw_string_left(dpi, STR_WATER_LEVEL_LABEL, nullptr, labelColour, w->x + 5, w->y + w->widgets[WIDX_HEIGHTMAP_WATER_LEVEL].top + 1); gfx_draw_string_left(dpi, STR_COMMA16, &waterLevel, labelColour, w->x + w->widgets[WIDX_HEIGHTMAP_WATER_LEVEL].left + 1, w->y + w->widgets[WIDX_HEIGHTMAP_WATER_LEVEL].top + 1); } @@ -1215,7 +1215,7 @@ static void window_mapgen_heightmap_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Common -static void window_mapgen_set_page(rct_window *w, sint32 page) +static void window_mapgen_set_page(rct_window *w, int32_t page) { w->page = page; w->frame_no = 0; @@ -1257,19 +1257,19 @@ static void window_mapgen_set_page(rct_window *w, sint32 page) static void window_mapgen_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_MAPGEN_PAGE_COUNT; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void window_mapgen_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex) +static void window_mapgen_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_1 + page; if (!(w->disabled_widgets & (1LL << widgetIndex))) { if (w->page == page) { - sint32 frame = w->frame_no / TabAnimationDivisor[w->page]; + int32_t frame = w->frame_no / TabAnimationDivisor[w->page]; spriteIndex += (frame % TabAnimationFrames[w->page]); } diff --git a/src/openrct2-ui/windows/MapTooltip.cpp b/src/openrct2-ui/windows/MapTooltip.cpp index 86caa8ac8c..cf6f5a8f02 100644 --- a/src/openrct2-ui/windows/MapTooltip.cpp +++ b/src/openrct2-ui/windows/MapTooltip.cpp @@ -59,9 +59,9 @@ static rct_window_event_list window_map_tooltip_events = { #define MAP_TOOLTIP_ARGS -static sint32 _lastCursorX; -static sint32 _lastCursorY; -static sint32 _cursorHoldDuration; +static int32_t _lastCursorX; +static int32_t _lastCursorY; +static int32_t _cursorHoldDuration; static void window_map_tooltip_open(); @@ -78,7 +78,7 @@ void window_map_tooltip_update_visibility() return; } - sint32 cursorX, cursorY; + int32_t cursorX, cursorY; const CursorState * state = context_get_cursor_state(); cursorX = state->x; @@ -114,7 +114,7 @@ void window_map_tooltip_update_visibility() static void window_map_tooltip_open() { rct_window* w; - sint32 x, y, width, height; + int32_t x, y, width, height; width = 200; height = 44; diff --git a/src/openrct2-ui/windows/MazeConstruction.cpp b/src/openrct2-ui/windows/MazeConstruction.cpp index 33c2937b01..d0c4844cf7 100644 --- a/src/openrct2-ui/windows/MazeConstruction.cpp +++ b/src/openrct2-ui/windows/MazeConstruction.cpp @@ -87,8 +87,8 @@ static void window_maze_construction_mouseup(rct_window *w, rct_widgetindex widg static void window_maze_construction_resize(rct_window *w); static void window_maze_construction_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); static void window_maze_construction_update(rct_window *w); -static void window_maze_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_maze_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_maze_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_maze_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_maze_construction_invalidate(rct_window *w); static void window_maze_construction_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -127,7 +127,7 @@ static rct_window_event_list window_maze_construction_events = { #pragma endregion -static void window_maze_construction_construct(sint32 direction); +static void window_maze_construction_construct(int32_t direction); /** * @@ -175,10 +175,10 @@ static void window_maze_construction_close(rct_window *w) hide_gridlines(); - uint8 rideIndex = _currentRideIndex; + uint8_t rideIndex = _currentRideIndex; Ride* ride = get_ride(rideIndex); if (ride->overall_view.xy == RCT_XY8_UNDEFINED) { - sint32 savedPausedState = gGamePaused; + int32_t savedPausedState = gGamePaused; gGamePaused = 0; ride_action_modify(rideIndex, RIDE_MODIFY_DEMOLISH, GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); gGamePaused = savedPausedState; @@ -194,14 +194,14 @@ static void window_maze_construction_entrance_mouseup(rct_window *w, rct_widgeti return; gRideEntranceExitPlaceType = widgetIndex == WIDX_MAZE_ENTRANCE ? ENTRANCE_TYPE_RIDE_ENTRANCE : ENTRANCE_TYPE_RIDE_EXIT; - gRideEntranceExitPlaceRideIndex = (uint8)w->number; + gRideEntranceExitPlaceRideIndex = (uint8_t)w->number; gRideEntranceExitPlaceStationIndex = 0; input_set_flag(INPUT_FLAG_6, true); ride_construction_invalidate_current_track(); // ??? - uint8 old_state = _rideConstructionState; + uint8_t old_state = _rideConstructionState; _rideConstructionState = RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT; if (old_state != RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT) _rideConstructionState = old_state; @@ -239,7 +239,7 @@ static void window_maze_construction_mouseup(rct_window *w, rct_widgetindex widg */ static void window_maze_construction_resize(rct_window *w) { - uint64 disabledWidgets = 0; + uint64_t disabledWidgets = 0; if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_PLACE) { disabledWidgets |= ( (1ULL << WIDX_MAZE_BUILD_MODE) | @@ -253,7 +253,7 @@ static void window_maze_construction_resize(rct_window *w) } // Set and invalidate the changed widgets - uint64 currentDisabledWidgets = w->disabled_widgets; + uint64_t currentDisabledWidgets = w->disabled_widgets; if (currentDisabledWidgets == disabledWidgets) return; @@ -333,7 +333,7 @@ static void window_maze_construction_update(rct_window *w) * * rct2: 0x006CD63E */ -static void window_maze_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_maze_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex){ case WIDX_MAZE_DIRECTION_GROUPBOX: @@ -350,7 +350,7 @@ static void window_maze_construction_toolupdate(rct_window* w, rct_widgetindex w * * rct2: 0x006C825F */ -static void window_maze_construction_entrance_tooldown(sint32 x, sint32 y, rct_window* w){ +static void window_maze_construction_entrance_tooldown(int32_t x, int32_t y, rct_window* w){ ride_construction_invalidate_current_track(); map_invalidate_selection_rect(); @@ -358,14 +358,14 @@ static void window_maze_construction_entrance_tooldown(sint32 x, sint32 y, rct_w gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - sint32 direction = 0; + int32_t direction = 0; ride_get_entrance_or_exit_position_from_screen_position(x, y, &x, &y, &direction); if (gRideEntranceExitPlaceDirection == 0xFF) return; - uint8 rideIndex = gRideEntranceExitPlaceRideIndex; - uint8 entranceExitType = gRideEntranceExitPlaceType; + uint8_t rideIndex = gRideEntranceExitPlaceRideIndex; + uint8_t entranceExitType = gRideEntranceExitPlaceType; if (entranceExitType == ENTRANCE_TYPE_RIDE_ENTRANCE) { gGameCommandErrorTitle = STR_CANT_BUILD_MOVE_ENTRANCE_FOR_THIS_RIDE_ATTRACTION; } else { @@ -407,7 +407,7 @@ static void window_maze_construction_entrance_tooldown(sint32 x, sint32 y, rct_w * * rct2: 0x006CD65D */ -static void window_maze_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_maze_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex){ case WIDX_MAZE_DIRECTION_GROUPBOX: @@ -430,7 +430,7 @@ static void window_maze_construction_invalidate(rct_window *w) // Set window title arguments set_format_arg(4, rct_string_id, ride->name); - set_format_arg(6, uint32, ride->name_arguments); + set_format_arg(6, uint32_t, ride->name_arguments); } /** @@ -454,7 +454,7 @@ void window_maze_construction_update_pressed_widgets() if (w == nullptr) return; - uint64 pressedWidgets = w->pressed_widgets; + uint64_t pressedWidgets = w->pressed_widgets; pressedWidgets &= ~(1ULL << WIDX_MAZE_BUILD_MODE); pressedWidgets &= ~(1ULL << WIDX_MAZE_MOVE_MODE); pressedWidgets &= ~(1ULL << WIDX_MAZE_FILL_MODE); @@ -479,9 +479,9 @@ void window_maze_construction_update_pressed_widgets() * * rct2: 0x006CD4AB */ -static void window_maze_construction_construct(sint32 direction) +static void window_maze_construction_construct(int32_t direction) { - sint32 x, y, z, flags, mode; + int32_t x, y, z, flags, mode; ride_construction_invalidate_current_track(); diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index 243d66bb82..d3a5460b50 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -109,7 +109,7 @@ static rct_widget *window_multiplayer_page_widgets[] = { window_multiplayer_options_widgets }; -static constexpr const uint64 window_multiplayer_page_enabled_widgets[] = { +static constexpr const uint64_t window_multiplayer_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB1) | (1 << WIDX_TAB2) | (1 << WIDX_TAB3) | (1 << WIDX_TAB4), (1 << WIDX_CLOSE) | (1 << WIDX_TAB1) | (1 << WIDX_TAB2) | (1 << WIDX_TAB3) | (1 << WIDX_TAB4), (1 << WIDX_CLOSE) | (1 << WIDX_TAB1) | (1 << WIDX_TAB2) | (1 << WIDX_TAB3) | (1 << WIDX_TAB4) | (1 << WIDX_DEFAULT_GROUP) | (1 << WIDX_DEFAULT_GROUP_DROPDOWN) | (1 << WIDX_ADD_GROUP) | (1 << WIDX_REMOVE_GROUP) | (1 << WIDX_RENAME_GROUP) | (1 << WIDX_SELECTED_GROUP) | (1 << WIDX_SELECTED_GROUP_DROPDOWN), @@ -123,7 +123,7 @@ static constexpr rct_string_id WindowMultiplayerPageTitles[] = { STR_MULTIPLAYER_OPTIONS_TITLE, }; -static uint8 _selectedGroup = 0; +static uint8_t _selectedGroup = 0; static void window_multiplayer_information_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_multiplayer_information_resize(rct_window *w); @@ -134,25 +134,25 @@ static void window_multiplayer_information_paint(rct_window *w, rct_drawpixelinf static void window_multiplayer_players_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_multiplayer_players_resize(rct_window *w); static void window_multiplayer_players_update(rct_window *w); -static void window_multiplayer_players_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_multiplayer_players_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_multiplayer_players_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_multiplayer_players_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_multiplayer_players_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_multiplayer_players_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_multiplayer_players_invalidate(rct_window *w); static void window_multiplayer_players_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_multiplayer_groups_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_multiplayer_groups_resize(rct_window *w); static void window_multiplayer_groups_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_multiplayer_groups_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_multiplayer_groups_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_multiplayer_groups_update(rct_window *w); -static void window_multiplayer_groups_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_multiplayer_groups_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_multiplayer_groups_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_multiplayer_groups_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_multiplayer_groups_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_multiplayer_groups_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_multiplayer_groups_text_input(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_multiplayer_groups_invalidate(rct_window *w); static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_multiplayer_options_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_multiplayer_options_resize(rct_window *w); @@ -292,11 +292,11 @@ static rct_window_event_list *window_multiplayer_page_events[] = { }; // clang-format on -static constexpr const sint32 window_multiplayer_animation_divisor[] = { 4, 4, 2, 2 }; -static constexpr const sint32 window_multiplayer_animation_frames[] = { 8, 8, 7, 4 }; +static constexpr const int32_t window_multiplayer_animation_divisor[] = { 4, 4, 2, 2 }; +static constexpr const int32_t window_multiplayer_animation_frames[] = { 8, 8, 7, 4 }; static void window_multiplayer_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi); -static void window_multiplayer_set_page(rct_window* w, sint32 page); +static void window_multiplayer_set_page(rct_window* w, int32_t page); static bool _windowInformationSizeDirty; static LocationXY16 _windowInformationSize; @@ -313,7 +313,7 @@ rct_window * window_multiplayer_open() return window; } -static void window_multiplayer_set_page(rct_window* w, sint32 page) +static void window_multiplayer_set_page(rct_window* w, int32_t page) { _windowInformationSizeDirty = true; @@ -348,7 +348,7 @@ static void window_multiplayer_anchor_border_widgets(rct_window *w) static void window_multiplayer_set_pressed_tab(rct_window *w) { - for (sint32 i = 0; i < 2; i++) { + for (int32_t i = 0; i < 2; i++) { w->pressed_widgets &= ~(1 << (WIDX_TAB1 + i)); } w->pressed_widgets |= 1LL << (WIDX_TAB1 + w->page); @@ -357,7 +357,7 @@ static void window_multiplayer_set_pressed_tab(rct_window *w) static void window_multiplayer_groups_show_group_dropdown(rct_window *w, rct_widget *widget) { rct_widget *dropdownWidget; - sint32 numItems, i; + int32_t numItems, i; dropdownWidget = widget - 1; @@ -411,21 +411,21 @@ static LocationXY16 window_multiplayer_information_get_size() return _windowInformationSize; } - sint32 width = 450; - sint32 height = 60; - sint32 minNumLines = 5; - sint32 descNumLines, fontSpriteBase; + int32_t width = 450; + int32_t height = 60; + int32_t minNumLines = 5; + int32_t descNumLines, fontSpriteBase; gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; utf8 * buffer = _strdup(network_get_server_description()); gfx_wrap_string(buffer, width, &descNumLines, &fontSpriteBase); free(buffer); - sint32 lineHeight = font_get_line_height(fontSpriteBase); + int32_t lineHeight = font_get_line_height(fontSpriteBase); height += (minNumLines + descNumLines) * lineHeight; _windowInformationSizeDirty = false; - _windowInformationSize = { (sint16)width, (sint16)height }; + _windowInformationSize = { (int16_t)width, (int16_t)height }; return _windowInformationSize; } @@ -457,9 +457,9 @@ static void window_multiplayer_information_paint(rct_window *w, rct_drawpixelinf if (clip_drawpixelinfo(&clippedDPI, dpi, w->x, w->y, w->width, w->height)) { dpi = &clippedDPI; - sint32 x = 3; - sint32 y = 50; - sint32 width = w->width - 6; + int32_t x = 3; + int32_t y = 50; + int32_t width = w->width - 6; const utf8 * name = network_get_server_name(); { @@ -533,9 +533,9 @@ static void window_multiplayer_players_update(rct_window *w) widget_invalidate(w, WIDX_TAB1 + w->page); } -static void window_multiplayer_players_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_multiplayer_players_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 i; + int32_t i; if (w->selected_list_item != -1) { w->selected_list_item = -1; @@ -552,9 +552,9 @@ static void window_multiplayer_players_scrollgetsize(rct_window *w, sint32 scrol } } -static void window_multiplayer_players_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_multiplayer_players_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) @@ -566,9 +566,9 @@ static void window_multiplayer_players_scrollmousedown(rct_window *w, sint32 scr window_player_open(network_get_player_id(index)); } -static void window_multiplayer_players_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_multiplayer_players_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) @@ -590,7 +590,7 @@ static void window_multiplayer_players_invalidate(rct_window *w) static void window_multiplayer_players_paint(rct_window *w, rct_drawpixelinfo *dpi) { rct_string_id stringId; - sint32 x, y; + int32_t x, y; window_draw_widgets(w, dpi); window_multiplayer_draw_tab_images(w, dpi); @@ -602,10 +602,10 @@ static void window_multiplayer_players_paint(rct_window *w, rct_drawpixelinfo *d gfx_draw_string_left(dpi, stringId, &w->no_list_items, w->colours[2], x, y); } -static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 y = 0; - for (sint32 i = 0; i < network_get_num_players(); i++) { + int32_t y = 0; + for (int32_t i = 0; i < network_get_num_players(); i++) { if (y > dpi->y + dpi->height) { break; } @@ -616,7 +616,7 @@ static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixeli // Draw player name char* lineCh = buffer; - sint32 colour = COLOUR_BLACK; + int32_t colour = COLOUR_BLACK; if (i == w->selected_list_item) { gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1); @@ -637,7 +637,7 @@ static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixeli // Draw group name lineCh = buffer; - sint32 group = network_get_group_index(network_get_player_group(i)); + int32_t group = network_get_group_index(network_get_player_group(i)); if (group != -1) { lineCh = utf8_write_codepoint(lineCh, FORMAT_BLACK); safe_strcpy(lineCh, network_get_group_name(group), sizeof(buffer) - (lineCh - buffer)); @@ -646,7 +646,7 @@ static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixeli } // Draw last action - sint32 action = network_get_player_last_action(i, 2000); + int32_t action = network_get_player_last_action(i, 2000); set_format_arg(0, rct_string_id, STR_ACTION_NA); if (action != -999) { set_format_arg(0, rct_string_id, network_get_action_name_string_id(action)); @@ -655,7 +655,7 @@ static void window_multiplayer_players_scrollpaint(rct_window *w, rct_drawpixeli // Draw ping lineCh = buffer; - sint32 ping = network_get_player_ping(i); + int32_t ping = network_get_player_ping(i); if (ping <= 100) { lineCh = utf8_write_codepoint(lineCh, FORMAT_GREEN); } else @@ -696,7 +696,7 @@ static void window_multiplayer_groups_mouseup(rct_window *w, rct_widgetindex wid game_do_command(1 | (_selectedGroup << 8), GAME_COMMAND_FLAG_APPLY, 0, 0, GAME_COMMAND_MODIFY_GROUPS, 0, 0); break; case WIDX_RENAME_GROUP:; - sint32 groupIndex = network_get_group_index(_selectedGroup); + int32_t groupIndex = network_get_group_index(_selectedGroup); const utf8 *groupName = network_get_group_name(groupIndex); window_text_input_raw_open(w, widgetIndex, STR_GROUP_NAME, STR_ENTER_NEW_NAME_FOR_THIS_GROUP, (utf8*)groupName, 32); break; @@ -726,7 +726,7 @@ static void window_multiplayer_groups_mousedown(rct_window *w, rct_widgetindex w } } -static void window_multiplayer_groups_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_multiplayer_groups_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) { return; @@ -750,9 +750,9 @@ static void window_multiplayer_groups_update(rct_window *w) widget_invalidate(w, WIDX_TAB1 + w->page); } -static void window_multiplayer_groups_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_multiplayer_groups_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 i; + int32_t i; if (w->selected_list_item != -1) { w->selected_list_item = -1; @@ -769,9 +769,9 @@ static void window_multiplayer_groups_scrollgetsize(rct_window *w, sint32 scroll } } -static void window_multiplayer_groups_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_multiplayer_groups_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) @@ -783,9 +783,9 @@ static void window_multiplayer_groups_scrollmousedown(rct_window *w, sint32 scro game_do_command(2 | (_selectedGroup << 8), GAME_COMMAND_FLAG_APPLY, index, 0, GAME_COMMAND_MODIFY_GROUPS, 0, 0); } -static void window_multiplayer_groups_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_multiplayer_groups_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) @@ -803,9 +803,9 @@ static void window_multiplayer_groups_text_input(rct_window *w, rct_widgetindex if (text == nullptr) return; - game_do_command(3 | (_selectedGroup << 8) | (1 << 16), GAME_COMMAND_FLAG_APPLY, w->number, *((sint32*)(text + 0)), GAME_COMMAND_MODIFY_GROUPS, *((sint32*)(text + 8)), *((sint32*)(text + 4))); - game_do_command(3 | (_selectedGroup << 8) | (2 << 16), GAME_COMMAND_FLAG_APPLY, w->number, *((sint32*)(text + 12)), GAME_COMMAND_MODIFY_GROUPS, *((sint32*)(text + 20)), *((sint32*)(text + 16))); - game_do_command(3 | (_selectedGroup << 8) | (0 << 16), GAME_COMMAND_FLAG_APPLY, w->number, *((sint32*)(text + 24)), GAME_COMMAND_MODIFY_GROUPS, *((sint32*)(text + 32)), *((sint32*)(text + 28))); + game_do_command(3 | (_selectedGroup << 8) | (1 << 16), GAME_COMMAND_FLAG_APPLY, w->number, *((int32_t*)(text + 0)), GAME_COMMAND_MODIFY_GROUPS, *((int32_t*)(text + 8)), *((int32_t*)(text + 4))); + game_do_command(3 | (_selectedGroup << 8) | (2 << 16), GAME_COMMAND_FLAG_APPLY, w->number, *((int32_t*)(text + 12)), GAME_COMMAND_MODIFY_GROUPS, *((int32_t*)(text + 20)), *((int32_t*)(text + 16))); + game_do_command(3 | (_selectedGroup << 8) | (0 << 16), GAME_COMMAND_FLAG_APPLY, w->number, *((int32_t*)(text + 24)), GAME_COMMAND_MODIFY_GROUPS, *((int32_t*)(text + 32)), *((int32_t*)(text + 28))); } static void window_multiplayer_groups_invalidate(rct_window *w) @@ -828,7 +828,7 @@ static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dp window_multiplayer_draw_tab_images(w, dpi); rct_widget* widget = &window_multiplayer_groups_widgets[WIDX_DEFAULT_GROUP]; - sint32 group = network_get_group_index(network_get_default_group()); + int32_t group = network_get_group_index(network_get_default_group()); if (group != -1) { char buffer[300]; char* lineCh; @@ -847,8 +847,8 @@ static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dp ); } - sint32 x = w->x + window_multiplayer_groups_widgets[WIDX_CONTENT_PANEL].left + 4; - sint32 y = w->y + window_multiplayer_groups_widgets[WIDX_CONTENT_PANEL].top + 4; + int32_t x = w->x + window_multiplayer_groups_widgets[WIDX_CONTENT_PANEL].left + 4; + int32_t y = w->y + window_multiplayer_groups_widgets[WIDX_CONTENT_PANEL].top + 4; gfx_draw_string_left(dpi, STR_DEFAULT_GROUP, nullptr, w->colours[2], x, y); @@ -877,13 +877,13 @@ static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dp } } -static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 y = 0; + int32_t y = 0; gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); - for (sint32 i = 0; i < network_get_num_actions(); i++) { + for (int32_t i = 0; i < network_get_num_actions(); i++) { if (i == w->selected_list_item) { gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1); } @@ -894,7 +894,7 @@ static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelin if (y + SCROLLABLE_ROW_HEIGHT + 1 >= dpi->y) { char buffer[300] = {0}; - sint32 groupindex = network_get_group_index(_selectedGroup); + int32_t groupindex = network_get_group_index(_selectedGroup); if (groupindex != -1){ if (network_can_perform_action(groupindex, i)) { char* lineCh = buffer; @@ -905,7 +905,7 @@ static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelin } // Draw action name - set_format_arg(0, uint16, network_get_action_name_string_id(i)); + set_format_arg(0, uint16_t, network_get_action_name_string_id(i)); gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, COLOUR_BLACK, 10, y); } y += SCROLLABLE_ROW_HEIGHT; @@ -979,15 +979,15 @@ static void window_multiplayer_options_paint(rct_window *w, rct_drawpixelinfo *d #pragma endregion -static void window_multiplayer_draw_tab_image(rct_window *w, rct_drawpixelinfo *dpi, sint32 page, sint32 spriteIndex) +static void window_multiplayer_draw_tab_image(rct_window *w, rct_drawpixelinfo *dpi, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB1 + page; if (!widget_is_disabled(w, widgetIndex)) { if (w->page == page) { - sint32 numFrames = window_multiplayer_animation_frames[w->page]; + int32_t numFrames = window_multiplayer_animation_frames[w->page]; if (numFrames > 1) { - sint32 frame = w->frame_no / window_multiplayer_animation_divisor[w->page]; + int32_t frame = w->frame_no / window_multiplayer_animation_divisor[w->page]; spriteIndex += (frame % numFrames); } } diff --git a/src/openrct2-ui/windows/MusicCredits.cpp b/src/openrct2-ui/windows/MusicCredits.cpp index fbbc83cfbc..71160b33a0 100644 --- a/src/openrct2-ui/windows/MusicCredits.cpp +++ b/src/openrct2-ui/windows/MusicCredits.cpp @@ -80,9 +80,9 @@ static constexpr const rct_string_id music_credits_rct2[] = { }; static void window_music_credits_mouseup(rct_window *w, rct_widgetindex widgetIndex); -static void window_music_credits_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); +static void window_music_credits_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); static void window_music_credits_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_music_credits_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_music_credits_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_music_credits_events = { nullptr, @@ -165,10 +165,10 @@ static void window_music_credits_mouseup(rct_window *w, rct_widgetindex widgetIn * * rct2: 0x0066DB37 */ -static void window_music_credits_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_music_credits_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); - *height = static_cast(Util::CountOf(music_credits) + Util::CountOf(music_credits_rct2)) * lineHeight + 12; + int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); + *height = static_cast(Util::CountOf(music_credits) + Util::CountOf(music_credits_rct2)) * lineHeight + 12; } /** @@ -184,12 +184,12 @@ static void window_music_credits_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x0066D7BF */ -static void window_music_credits_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_music_credits_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); + int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); - sint32 x = 245; - sint32 y = 2; + int32_t x = 245; + int32_t y = 2; for (size_t i = 0; i < Util::CountOf(music_credits); i++) { gfx_draw_string_centred(dpi, music_credits[i], x, y, COLOUR_BLACK, nullptr); diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index 56653b562f..b07182200c 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -177,8 +177,8 @@ static void window_network_status_paint(rct_window *w, rct_drawpixelinfo *dpi) lineCh = utf8_write_codepoint(lineCh, FORMAT_BLACK); safe_strcpy(lineCh, window_network_status_text, sizeof(buffer) - (lineCh - buffer)); gfx_clip_string(buffer, w->widgets[WIDX_BACKGROUND].right - 50); - sint32 x = w->x + (w->width / 2); - sint32 y = w->y + (w->height / 2); + int32_t x = w->x + (w->width / 2); + int32_t y = w->y + (w->height / 2); x -= gfx_get_string_width(buffer) / 2; gfx_draw_string(dpi, buffer, COLOUR_BLACK, x, y); } diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index 11adfd7187..73c8acdac0 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -20,7 +20,7 @@ #include #include -#define SELECTED_RIDE_UNDEFINED ((uint16)0xFFFF) +#define SELECTED_RIDE_UNDEFINED ((uint16_t)0xFFFF) // clang-format off enum WINDOW_NEW_CAMPAIGN_WIDGET_IDX { @@ -53,7 +53,7 @@ static rct_widget window_new_campaign_widgets[] = { static void window_new_campaign_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_new_campaign_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_new_campaign_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_new_campaign_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_new_campaign_invalidate(rct_window *w); static void window_new_campaign_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -89,25 +89,25 @@ static rct_window_event_list window_new_campaign_events = { }; // clang-format on -static uint8 window_new_campaign_rides[MAX_RIDES]; -static uint8 window_new_campaign_shop_items[64]; +static uint8_t window_new_campaign_rides[MAX_RIDES]; +static uint8_t window_new_campaign_shop_items[64]; -static sint32 ride_value_compare(const void *a, const void *b) +static int32_t ride_value_compare(const void *a, const void *b) { Ride *rideA, *rideB; - rideA = get_ride(*((uint8*)a)); - rideB = get_ride(*((uint8*)b)); + rideA = get_ride(*((uint8_t*)a)); + rideB = get_ride(*((uint8_t*)b)); return rideB->value - rideA->value; } -static sint32 ride_name_compare(const void *a, const void *b) +static int32_t ride_name_compare(const void *a, const void *b) { char rideAName[256], rideBName[256]; Ride *rideA, *rideB; - rideA = get_ride(*((uint8*)a)); - rideB = get_ride(*((uint8*)b)); + rideA = get_ride(*((uint8_t*)a)); + rideB = get_ride(*((uint8_t*)b)); format_string(rideAName, 256, rideA->name, &rideA->name_arguments); format_string(rideBName, 256, rideB->name, &rideB->name_arguments); @@ -119,11 +119,11 @@ static sint32 ride_name_compare(const void *a, const void *b) * * rct2: 0x0069E16F */ -rct_window * window_new_campaign_open(sint16 campaignType) +rct_window * window_new_campaign_open(int16_t campaignType) { rct_window *w; Ride *ride; - sint32 i, numApplicableRides; + int32_t i, numApplicableRides; w = window_bring_to_front_by_class(WC_NEW_CAMPAIGN); if (w != nullptr) { @@ -178,12 +178,12 @@ rct_window * window_new_campaign_open(sint16 campaignType) // Take top 128 most valuable rides if (numApplicableRides > DROPDOWN_ITEMS_MAX_SIZE) { - qsort(window_new_campaign_rides, numApplicableRides, sizeof(uint8), ride_value_compare); + qsort(window_new_campaign_rides, numApplicableRides, sizeof(uint8_t), ride_value_compare); numApplicableRides = DROPDOWN_ITEMS_MAX_SIZE; } // Sort rides by name - qsort(window_new_campaign_rides, numApplicableRides, sizeof(uint8), ride_name_compare); + qsort(window_new_campaign_rides, numApplicableRides, sizeof(uint8_t), ride_name_compare); window_new_campaign_rides[numApplicableRides] = 255; @@ -196,10 +196,10 @@ rct_window * window_new_campaign_open(sint16 campaignType) */ static void window_new_campaign_get_shop_items() { - sint32 i, numItems; + int32_t i, numItems; Ride * ride; - uint64 items = 0; + uint64_t items = 0; FOR_ALL_RIDES(i, ride) { rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); @@ -207,7 +207,7 @@ static void window_new_campaign_get_shop_items() { continue; } - uint8 itemType = rideEntry->shop_item; + uint8_t itemType = rideEntry->shop_item; if (itemType != SHOP_ITEM_NONE && shop_item_is_food_or_drink(itemType)) items |= 1ULL << itemType; } @@ -267,8 +267,8 @@ static void window_new_campaign_mousedown(rct_window *w, rct_widgetindex widgetI if (w->campaign.campaign_type == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) { window_new_campaign_get_shop_items(); if (window_new_campaign_shop_items[0] != 255) { - sint32 numItems = 0; - for (sint32 i = 0; i < DROPDOWN_ITEMS_MAX_SIZE; i++) { + int32_t numItems = 0; + for (int32_t i = 0; i < DROPDOWN_ITEMS_MAX_SIZE; i++) { if (window_new_campaign_shop_items[i] == 255) break; @@ -289,15 +289,15 @@ static void window_new_campaign_mousedown(rct_window *w, rct_widgetindex widgetI ); } } else { - sint32 numItems = 0; - for (sint32 i = 0; i < DROPDOWN_ITEMS_MAX_SIZE; i++) + int32_t numItems = 0; + for (int32_t i = 0; i < DROPDOWN_ITEMS_MAX_SIZE; i++) { if (window_new_campaign_rides[i] == 255) break; Ride * ride = get_ride(window_new_campaign_rides[i]); gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; - gDropdownItemsArgs[i] = ((uint64)ride->name_arguments << 16ULL) | ride->name; + gDropdownItemsArgs[i] = ((uint64_t)ride->name_arguments << 16ULL) | ride->name; numItems++; } @@ -329,7 +329,7 @@ static void window_new_campaign_mousedown(rct_window *w, rct_widgetindex widgetI * * rct2: 0x0069E537 */ -static void window_new_campaign_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_new_campaign_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_RIDE_DROPDOWN_BUTTON) return; @@ -366,7 +366,7 @@ static void window_new_campaign_invalidate(rct_window *w) if (w->campaign.ride_id != SELECTED_RIDE_UNDEFINED) { Ride *ride = get_ride(w->campaign.ride_id); window_new_campaign_widgets[WIDX_RIDE_DROPDOWN].text = ride->name; - set_format_arg(0, uint32, ride->name_arguments); + set_format_arg(0, uint32_t, ride->name_arguments); } break; case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: @@ -395,7 +395,7 @@ static void window_new_campaign_invalidate(rct_window *w) */ static void window_new_campaign_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; window_draw_widgets(w, dpi); diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 7549b1ab40..6518b6b154 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -38,7 +38,7 @@ #define WH 382 #define WW 601 -static uint8 _windowNewRideCurrentTab; +static uint8_t _windowNewRideCurrentTab; static ride_list_item _windowNewRideHighlightedItem[6]; static ride_list_item _windowNewRideListItems[384]; @@ -207,14 +207,14 @@ static rct_widget window_new_ride_widgets[] = { static void window_new_ride_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_new_ride_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); static void window_new_ride_update(rct_window *w); -static void window_new_ride_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_new_ride_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_new_ride_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_new_ride_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_new_ride_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_new_ride_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_new_ride_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_new_ride_invalidate(rct_window *w); static void window_new_ride_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); -static void window_new_ride_list_vehicles_for(const uint8 rideType, const rct_ride_entry * rideEntry, char * out); +static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); +static void window_new_ride_list_vehicles_for(const uint8_t rideType, const rct_ride_entry * rideEntry, char * out); // 0x0098E354 static rct_window_event_list window_new_ride_events = { @@ -260,19 +260,19 @@ static constexpr const rct_string_id window_new_ride_titles[WINDOW_NEW_RIDE_PAGE STR_RESEARCH_AND_DEVELOPMENT, }; -static constexpr const sint32 window_new_ride_tab_animation_loops[] = { 20, 32, 10, 72, 24, 28, 16 }; -static constexpr const sint32 window_new_ride_tab_animation_divisor[] = { 4, 8, 2, 4, 4, 4, 2 }; +static constexpr const int32_t window_new_ride_tab_animation_loops[] = { 20, 32, 10, 72, 24, 28, 16 }; +static constexpr const int32_t window_new_ride_tab_animation_divisor[] = { 4, 8, 2, 4, 4, 4, 2 }; // clang-format on -static void window_new_ride_set_page(rct_window *w, sint32 page); +static void window_new_ride_set_page(rct_window *w, int32_t page); static void window_new_ride_refresh_widget_sizing(rct_window *w); -static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w, sint32 x, sint32 y); -static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixelinfo *dpi, ride_list_item item, sint32 x, sint32 y, sint32 width); +static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w, int32_t x, int32_t y); +static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixelinfo *dpi, ride_list_item item, int32_t x, int32_t y, int32_t width); static void window_new_ride_select(rct_window *w); -static ride_list_item * window_new_ride_iterate_over_ride_group(uint8 rideType, uint8 rideGroupIndex, ride_list_item * nextListItem); +static ride_list_item * window_new_ride_iterate_over_ride_group(uint8_t rideType, uint8_t rideGroupIndex, ride_list_item * nextListItem); static ride_list_item _lastTrackDesignCountRideType; -static sint32 _lastTrackDesignCount; +static int32_t _lastTrackDesignCount; /** * @@ -287,7 +287,7 @@ void window_new_ride_init_vars() _windowNewRideCurrentTab = WINDOW_NEW_RIDE_PAGE_TRANSPORT; } - for (sint16 i = 0; i < 6; i++) { + for (int16_t i = 0; i < 6; i++) { /* Reset what is highlighted in each tab. Each 16bit number represents the item in its respective tab. @@ -303,12 +303,12 @@ void window_new_ride_init_vars() */ static void window_new_ride_populate_list() { - uint8 currentCategory = _windowNewRideCurrentTab; + uint8_t currentCategory = _windowNewRideCurrentTab; ride_list_item *nextListItem = _windowNewRideListItems; // For each ride type in the view order list - for (sint32 i = 0; i < (sint32)Util::CountOf(RideTypeViewOrder); i++) { - uint8 rideType = RideTypeViewOrder[i]; + for (int32_t i = 0; i < (int32_t)Util::CountOf(RideTypeViewOrder); i++) { + uint8_t rideType = RideTypeViewOrder[i]; if (rideType == RIDE_TYPE_NULL) continue; @@ -321,7 +321,7 @@ static void window_new_ride_populate_list() nextListItem = window_new_ride_iterate_over_ride_group(rideType, 0, nextListItem); } else { - for (uint8 j = 0; j < MAX_RIDE_GROUPS_PER_RIDE_TYPE; j++) { + for (uint8_t j = 0; j < MAX_RIDE_GROUPS_PER_RIDE_TYPE; j++) { nextListItem = window_new_ride_iterate_over_ride_group(rideType, j, nextListItem); } } @@ -332,11 +332,11 @@ static void window_new_ride_populate_list() nextListItem->entry_index = RIDE_ENTRY_INDEX_NULL; } -static ride_list_item * window_new_ride_iterate_over_ride_group(uint8 rideType, uint8 rideGroupIndex, ride_list_item * nextListItem) +static ride_list_item * window_new_ride_iterate_over_ride_group(uint8_t rideType, uint8_t rideGroupIndex, ride_list_item * nextListItem) { bool buttonForRideTypeCreated = false; bool allowDrawingOverLastButton = false; - uint8 *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideType); + uint8_t *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideType); char preferredVehicleName[DAT_NAME_LENGTH + 1]; safe_strcpy(preferredVehicleName, " ", sizeof(preferredVehicleName)); @@ -344,7 +344,7 @@ static ride_list_item * window_new_ride_iterate_over_ride_group(uint8 rideType, // For each ride entry for this ride type while (*rideEntryIndexPtr != RIDE_ENTRY_INDEX_NULL) { - uint8 rideEntryIndex = *rideEntryIndexPtr++; + uint8_t rideEntryIndex = *rideEntryIndexPtr++; char rideEntryName[DAT_NAME_LENGTH + 1]; memcpy(rideEntryName, object_entry_get_entry(OBJECT_TYPE_RIDE, rideEntryIndex)->name, 8); rideEntryName[DAT_NAME_LENGTH] = 0; @@ -421,15 +421,15 @@ static ride_list_item * window_new_ride_iterate_over_ride_group(uint8 rideType, */ static void window_new_ride_scroll_to_focused_ride(rct_window *w) { - sint32 scrollWidth = 0; - sint32 scrollHeight = 0; + int32_t scrollWidth = 0; + int32_t scrollHeight = 0; window_get_scroll_size(w, 0, &scrollWidth, &scrollHeight); // Find row index of the focused ride type rct_widget *listWidget = &window_new_ride_widgets[WIDX_RIDE_LIST]; assert(_windowNewRideCurrentTab < Util::CountOf(_windowNewRideHighlightedItem)); - sint32 focusRideType = _windowNewRideHighlightedItem[_windowNewRideCurrentTab].ride_type_and_entry; - sint32 count = 0, row = 0; + int32_t focusRideType = _windowNewRideHighlightedItem[_windowNewRideCurrentTab].ride_type_and_entry; + int32_t count = 0, row = 0; ride_list_item *listItem = _windowNewRideListItems; while (listItem->type != RIDE_TYPE_NULL || listItem->entry_index != 255) { if (listItem->type == focusRideType) { @@ -442,7 +442,7 @@ static void window_new_ride_scroll_to_focused_ride(rct_window *w) }; // Update the Y scroll position - sint32 listWidgetHeight = listWidget->bottom - listWidget->top - 1; + int32_t listWidgetHeight = listWidget->bottom - listWidget->top - 1; scrollHeight = std::max(0, scrollHeight - listWidgetHeight); w->scrolls[0].v_top = std::min(row * 116, scrollHeight); widget_scroll_update_thumbs(w, WIDX_RIDE_LIST); @@ -523,7 +523,7 @@ void window_new_ride_focus(ride_list_item rideItem) return; rideEntry = get_ride_entry(rideItem.entry_index); - uint8 rideTypeIndex = ride_entry_get_first_non_null_ride_type(rideEntry); + uint8_t rideTypeIndex = ride_entry_get_first_non_null_ride_type(rideEntry); window_new_ride_set_page(w, gRideCategories[rideTypeIndex]); @@ -560,12 +560,12 @@ void window_new_ride_focus(ride_list_item rideItem) } } -static void window_new_ride_set_page(rct_window *w, sint32 page) +static void window_new_ride_set_page(rct_window *w, int32_t page) { _windowNewRideCurrentTab = page; w->frame_no = 0; w->new_ride.highlighted_ride_id = -1; - w->new_ride.selected_ride_countdown = std::numeric_limits::max(); + w->new_ride.selected_ride_countdown = std::numeric_limits::max(); window_new_ride_populate_list(); if (page < WINDOW_NEW_RIDE_PAGE_RESEARCH) { w->new_ride.highlighted_ride_id = _windowNewRideHighlightedItem[page].ride_type_and_entry; @@ -587,7 +587,7 @@ static void window_new_ride_set_page(rct_window *w, sint32 page) */ static void window_new_ride_refresh_widget_sizing(rct_window *w) { - sint32 width, height; + int32_t width, height; // Show or hide unrelated widgets if (_windowNewRideCurrentTab != WINDOW_NEW_RIDE_PAGE_RESEARCH) { @@ -634,22 +634,22 @@ static void window_new_ride_refresh_widget_sizing(rct_window *w) static void window_new_ride_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_NEW_RIDE_PAGE_COUNT; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + _windowNewRideCurrentTab); } -static constexpr const sint32 ThrillRidesTabAnimationSequence[] = { +static constexpr const int32_t ThrillRidesTabAnimationSequence[] = { 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0 }; -static void window_new_ride_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex) +static void window_new_ride_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_1 + page; if (w->widgets[widgetIndex].type != WWT_EMPTY && !(w->disabled_widgets & (1LL << widgetIndex))) { - sint32 frame = 0; + int32_t frame = 0; if (_windowNewRideCurrentTab == page) frame = w->frame_no / window_new_ride_tab_animation_divisor[page]; @@ -725,11 +725,11 @@ static void window_new_ride_update(rct_window *w) * * rct2: 0x006B6BC9 */ -static void window_new_ride_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_new_ride_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { ride_list_item *listItem = _windowNewRideListItems; - sint32 count = 0; + int32_t count = 0; while (listItem->type != RIDE_TYPE_NULL || listItem->entry_index != 255) { count++; listItem++; @@ -741,7 +741,7 @@ static void window_new_ride_scrollgetsize(rct_window *w, sint32 scrollIndex, sin * * rct2: 0x006B6C89 */ -static void window_new_ride_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_new_ride_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { ride_list_item item; @@ -761,7 +761,7 @@ static void window_new_ride_scrollmousedown(rct_window *w, sint32 scrollIndex, s * * rct2: 0x006B6C51 */ -static void window_new_ride_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_new_ride_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { ride_list_item item; @@ -804,7 +804,7 @@ static void window_new_ride_invalidate(rct_window *w) window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_EMPTY; if (gResearchLastItem.rawValue != RESEARCHED_ITEMS_SEPARATOR) { - uint8 type = gResearchLastItem.type; + uint8_t type = gResearchLastItem.type; window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_FLATBTN; window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = (type == RESEARCH_ENTRY_TYPE_RIDE) ? SPR_NEW_RIDE : SPR_NEW_SCENERY; @@ -823,7 +823,7 @@ static void window_new_ride_paint(rct_window *w, rct_drawpixelinfo *dpi) if (_windowNewRideCurrentTab != WINDOW_NEW_RIDE_PAGE_RESEARCH) { ride_list_item item; - item.ride_type_and_entry = static_cast(w->new_ride.highlighted_ride_id); + item.ride_type_and_entry = static_cast(w->new_ride.highlighted_ride_id); if (item.type != RIDE_TYPE_NULL || item.entry_index != 255) window_new_ride_paint_ride_information(w, dpi, item, w->x + 3, w->y + w->height - 64, w->width - 6); } else { @@ -835,28 +835,28 @@ static void window_new_ride_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006B6ABF */ -static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { if (_windowNewRideCurrentTab == WINDOW_NEW_RIDE_PAGE_RESEARCH) return; gfx_clear(dpi, ColourMapA[w->colours[1]].mid_light); - sint32 x = 1; - sint32 y = 1; + int32_t x = 1; + int32_t y = 1; ride_list_item *listItem = _windowNewRideListItems; while (listItem->type != RIDE_TYPE_NULL || listItem->entry_index != 255) { rct_ride_entry *rideEntry; // Draw flat button rectangle - sint32 flags = 0; - if (w->new_ride.selected_ride_id == *((sint16*)listItem)) + int32_t flags = 0; + if (w->new_ride.selected_ride_id == *((int16_t*)listItem)) flags |= INSET_RECT_FLAG_BORDER_INSET; - if (w->new_ride.highlighted_ride_id == *((sint16*)listItem) || flags != 0) + if (w->new_ride.highlighted_ride_id == *((int16_t*)listItem) || flags != 0) gfx_fill_rect_inset(dpi, x, y, x + 115, y + 115, w->colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT | flags); // Draw ride image with feathered border rideEntry = get_ride_entry(listItem->entry_index); - sint32 imageId = rideEntry->images_offset; + int32_t imageId = rideEntry->images_offset; for (size_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { @@ -884,7 +884,7 @@ static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, s * * rct2: 0x006B6D3C */ -static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w, sint32 x, sint32 y) +static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w, int32_t x, int32_t y) { ride_list_item result; result.type = RIDE_TYPE_NULL; @@ -893,12 +893,12 @@ static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w if (--x < 0 || --y < 0) return result; - sint32 column = x / 116; - sint32 row = y / 116; + int32_t column = x / 116; + int32_t row = y / 116; if (column >= 5) return result; - sint32 index = column + (row * 5); + int32_t index = column + (row * 5); ride_list_item *listItem = _windowNewRideListItems; while (listItem->type != RIDE_TYPE_NULL || listItem->entry_index != 255) { @@ -910,7 +910,7 @@ static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w return result; } -static sint32 get_num_track_designs(ride_list_item item) +static int32_t get_num_track_designs(ride_list_item item) { char entry[DAT_NAME_LENGTH + 1]; const char * entryPtr = nullptr; @@ -931,11 +931,11 @@ static sint32 get_num_track_designs(ride_list_item item) if (rideEntry != nullptr && RideGroupManager::RideTypeHasRideGroups(item.type)) { const RideGroup * rideGroup = RideGroupManager::GetRideGroup(item.type, rideEntry); - return (sint32)repo->GetCountForRideGroup(item.type, rideGroup); + return (int32_t)repo->GetCountForRideGroup(item.type, rideGroup); } else { - return (sint32)repo->GetCountForObjectEntry(item.type, String::ToStd(entryPtr)); + return (int32_t)repo->GetCountForObjectEntry(item.type, String::ToStd(entryPtr)); } } @@ -943,7 +943,7 @@ static sint32 get_num_track_designs(ride_list_item item) * * rct2: 0x006B701C */ -static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixelinfo *dpi, ride_list_item item, sint32 x, sint32 y, sint32 width) +static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixelinfo *dpi, ride_list_item item, int32_t x, int32_t y, int32_t width) { rct_ride_entry *rideEntry = get_ride_entry(item.entry_index); rct_ride_name rideNaming; @@ -990,7 +990,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli // Price if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { // Get price of ride - sint32 unk2 = RideConstructionDefaultTrackType[item.type]; + int32_t unk2 = RideConstructionDefaultTrackType[item.type]; money32 price = RideTrackCosts[item.type].track_price; if (ride_type_has_flag(item.type, RIDE_TYPE_FLAG_FLAT_RIDE)) { price *= FlatRideTrackPricing[unk2]; @@ -1015,7 +1015,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli static void window_new_ride_select(rct_window *w) { ride_list_item item; - item.ride_type_and_entry = static_cast(w->new_ride.selected_ride_id); + item.ride_type_and_entry = static_cast(w->new_ride.selected_ride_id); if (item.type == RIDE_TYPE_NULL) return; @@ -1043,11 +1043,11 @@ static void window_new_ride_select(rct_window *w) ride_construct_new(item); } -static void window_new_ride_list_vehicles_for(const uint8 rideType, const rct_ride_entry * rideEntry, char * out) +static void window_new_ride_list_vehicles_for(const uint8_t rideType, const rct_ride_entry * rideEntry, char * out) { rct_ride_entry * currentRideEntry; const RideGroup * rideGroup, * currentRideGroup; - sint32 rideEntryIndex; + int32_t rideEntryIndex; if (RideGroupManager::RideTypeIsIndependent(rideType)) { @@ -1057,9 +1057,9 @@ static void window_new_ride_list_vehicles_for(const uint8 rideType, const rct_ri memset(out, 0, AVAILABILITY_STRING_SIZE); - uint8 * rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideType); + uint8_t * rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideType); - for (uint8 *currentRideEntryIndex = rideEntryIndexPtr, numItems = 0; *currentRideEntryIndex != RIDE_ENTRY_INDEX_NULL; currentRideEntryIndex++) + for (uint8_t *currentRideEntryIndex = rideEntryIndexPtr, numItems = 0; *currentRideEntryIndex != RIDE_ENTRY_INDEX_NULL; currentRideEntryIndex++) { rideEntryIndex = *currentRideEntryIndex; currentRideEntry = get_ride_entry(rideEntryIndex); diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index e84dfcd58e..6f0720806c 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -40,11 +40,11 @@ static rct_widget window_news_widgets[] = { static void window_news_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_news_update(rct_window *w); -static void window_news_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_news_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_news_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_news_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_news_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_news_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_news_events = { nullptr, @@ -105,8 +105,8 @@ rct_window * window_news_open() // sub_66E4BA: rct_widget *widget; - sint32 width = 0; - sint32 height = 0; + int32_t width = 0; + int32_t height = 0; window_get_scroll_size(window, 0, &width, &height); widget = &window_news_widgets[WIDX_SCROLL]; window->scrolls[0].v_top = std::max(0, height - (widget->bottom - widget->top - 1)); @@ -115,7 +115,7 @@ rct_window * window_news_open() return window; } -static sint32 window_news_get_item_height() +static int32_t window_news_get_item_height() { return 4 * font_get_line_height(gCurrentFontSpriteBase) + 2; } @@ -143,7 +143,7 @@ static void window_news_mouseup(rct_window *w, rct_widgetindex widgetIndex) */ static void window_news_update(rct_window *w) { - sint32 i, j, x, y, z; + int32_t i, j, x, y, z; if (w->news.var_480 == -1 || --w->news.var_484 != 0) @@ -189,12 +189,12 @@ static void window_news_update(rct_window *w) * * rct2: 0x0066EA3C */ -static void window_news_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_news_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 itemHeight = window_news_get_item_height(); + int32_t itemHeight = window_news_get_item_height(); *height = 0; - for (sint32 i = 11; i < 61; i++) + for (int32_t i = 11; i < 61; i++) { if (news_item_is_empty(i)) break; @@ -207,10 +207,10 @@ static void window_news_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 * * rct2: 0x0066EA5C */ -static void window_news_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_news_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 itemHeight = window_news_get_item_height(); - sint32 i, buttonIndex; + int32_t itemHeight = window_news_get_item_height(); + int32_t i, buttonIndex; buttonIndex = 0; for (i = 11; i < 61; i++) @@ -274,11 +274,11 @@ static void window_news_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x0066E4EE */ -static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); - sint32 itemHeight = window_news_get_item_height(); - sint32 i, x, y, yy, press; + int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); + int32_t itemHeight = window_news_get_item_height(); + int32_t i, x, y, yy, press; y = 0; for (i = 11; i < 61; i++) @@ -314,7 +314,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint3 press = 0; if (w->news.var_480 != -1) { - const uint8 idx = 11 + w->news.var_480; + const uint8_t idx = 11 + w->news.var_480; news_item_is_valid_idx(idx); if (i == idx && w->news.var_482 == 1) press = INSET_RECT_FLAG_BORDER_INSET; @@ -334,11 +334,11 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint3 } rct_peep* peep = GET_PEEP(newsItem->Assoc); - sint32 clip_x = 10, clip_y = 19; + int32_t clip_x = 10, clip_y = 19; // If normal peep set sprite to normal (no food) // If staff set sprite to staff sprite - sint32 sprite_type = 0; + int32_t sprite_type = 0; if (peep->type == PEEP_TYPE_STAFF){ sprite_type = peep->sprite_type; if (peep->staff_type == STAFF_TYPE_ENTERTAINER){ @@ -346,7 +346,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint3 } } - uint32 image_id = g_peep_animation_entries[sprite_type].sprite_animation->base_image; + uint32_t image_id = g_peep_animation_entries[sprite_type].sprite_animation->base_image; image_id += 0xA0000001; image_id |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24); @@ -379,7 +379,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint3 press = 0; if (w->news.var_480 != -1) { - const uint8 idx = 11 + w->news.var_480; + const uint8_t idx = 11 + w->news.var_480; news_item_is_valid_idx(idx); if (i == idx && w->news.var_482 == 2) press = 0x20; diff --git a/src/openrct2-ui/windows/NewsOptions.cpp b/src/openrct2-ui/windows/NewsOptions.cpp index 0472c05f4d..098f46a447 100644 --- a/src/openrct2-ui/windows/NewsOptions.cpp +++ b/src/openrct2-ui/windows/NewsOptions.cpp @@ -26,7 +26,7 @@ enum { }; struct notification_def { - uint8 category; + uint8_t category; rct_string_id caption; size_t config_offset; }; @@ -121,7 +121,7 @@ static rct_window_event_list window_news_options_events = { }; // clang-format on -static void window_news_options_set_page(rct_window *w, sint32 page); +static void window_news_options_set_page(rct_window *w, int32_t page); static void window_news_options_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi); static bool *get_notification_value_ptr(const notification_def *ndef); @@ -167,9 +167,9 @@ static void window_news_options_mouseup(rct_window *w, rct_widgetindex widgetInd break; default: { - sint32 checkBoxIndex = widgetIndex - WIDX_CHECKBOX_0; + int32_t checkBoxIndex = widgetIndex - WIDX_CHECKBOX_0; if (checkBoxIndex >= 0) { - sint32 matchIndex = 0; + int32_t matchIndex = 0; for (size_t i = 0; i < Util::CountOf(NewsItemOptionDefinitions); i++) { const notification_def *ndef = &NewsItemOptionDefinitions[i]; if (ndef->category != w->page) continue; @@ -208,9 +208,9 @@ static void window_news_options_invalidate(rct_window *w) // Set checkboxes rct_widget *baseCheckBox = &w->widgets[WIDX_CHECKBOX_0]; - sint32 y = baseCheckBox->top; + int32_t y = baseCheckBox->top; - sint32 checkboxWidgetIndex = WIDX_CHECKBOX_0; + int32_t checkboxWidgetIndex = WIDX_CHECKBOX_0; rct_widget *checkboxWidget = &w->widgets[checkboxWidgetIndex]; for (size_t i = 0; i < Util::CountOf(NewsItemOptionDefinitions); i++) { const notification_def *ndef = &NewsItemOptionDefinitions[i]; @@ -260,7 +260,7 @@ static void window_news_options_paint(rct_window *w, rct_drawpixelinfo *dpi) window_news_options_draw_tab_images(w, dpi); } -static void window_news_options_set_page(rct_window *w, sint32 page) +static void window_news_options_set_page(rct_window *w, int32_t page) { if (w->page != page) { w->page = page; @@ -269,18 +269,18 @@ static void window_news_options_set_page(rct_window *w, sint32 page) } } -const sint32 window_news_option_tab_animation_divisor[] = { 1, 4, 4 }; -const sint32 window_news_option_tab_animation_frames[] = { 1, 16, 8 }; +const int32_t window_news_option_tab_animation_divisor[] = { 1, 4, 4 }; +const int32_t window_news_option_tab_animation_frames[] = { 1, 16, 8 }; -static void window_news_options_draw_tab_image(rct_window *w, rct_drawpixelinfo *dpi, sint32 page, sint32 spriteIndex) +static void window_news_options_draw_tab_image(rct_window *w, rct_drawpixelinfo *dpi, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_PARK + page; if (!(w->disabled_widgets & (1LL << widgetIndex))) { if (w->page == page) { - sint32 numFrames = window_news_option_tab_animation_frames[w->page]; + int32_t numFrames = window_news_option_tab_animation_frames[w->page]; if (numFrames > 1) { - sint32 frame = w->frame_no / window_news_option_tab_animation_divisor[w->page]; + int32_t frame = w->frame_no / window_news_option_tab_animation_divisor[w->page]; spriteIndex += (frame % numFrames); } } diff --git a/src/openrct2-ui/windows/ObjectLoadError.cpp b/src/openrct2-ui/windows/ObjectLoadError.cpp index b74f75a30f..732962b34f 100644 --- a/src/openrct2-ui/windows/ObjectLoadError.cpp +++ b/src/openrct2-ui/windows/ObjectLoadError.cpp @@ -54,11 +54,11 @@ static rct_string_id get_object_type_string(const rct_object_entry *entry); static void window_object_load_error_close(rct_window *w); static void window_object_load_error_update(rct_window *w); static void window_object_load_error_mouseup(rct_window *w, rct_widgetindex widgetIndex); -static void window_object_load_error_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_object_load_error_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_object_load_error_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_object_load_error_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_object_load_error_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_object_load_error_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_object_load_error_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_object_load_error_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_object_load_error_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_object_load_error_events = { window_object_load_error_close, @@ -93,7 +93,7 @@ static rct_window_event_list window_object_load_error_events = { // clang-format on static std::vector _invalid_entries; -static sint32 highlighted_index = -1; +static int32_t highlighted_index = -1; static std::string file_path; /** @@ -105,7 +105,7 @@ static std::string file_path; static rct_string_id get_object_type_string(const rct_object_entry *entry) { rct_string_id result; - uint8 objectType = object_entry_get_type(entry); + uint8_t objectType = object_entry_get_type(entry); switch (objectType) { case OBJECT_TYPE_RIDE: result = STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS; @@ -162,11 +162,11 @@ static void copy_object_names_to_clipboard(rct_window *w) utf8 * buffer = new utf8[buffer_len]{}; size_t cur_len = 0; - for (uint16 i = 0; i < w->no_list_items; i++) { + for (uint16_t i = 0; i < w->no_list_items; i++) { cur_len += (8 + line_sep_len); assert(cur_len < buffer_len); - uint16 nameLength = 8; + uint16_t nameLength = 8; for (; nameLength > 0; nameLength--) { if (_invalid_entries[i].name[nameLength - 1] != ' ') @@ -206,7 +206,7 @@ rct_window * window_object_load_error_open(utf8 * path, size_t numMissingObjects } // Refresh list items and path - window->no_list_items = (uint16)numMissingObjects; + window->no_list_items = (uint16_t)numMissingObjects; file_path = path; window_invalidate(window); @@ -252,10 +252,10 @@ static void window_object_load_error_mouseup(rct_window *w, rct_widgetindex widg } } -static void window_object_load_error_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_object_load_error_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { // Highlight item that the cursor is over, or remove highlighting if none - sint32 selected_item; + int32_t selected_item; selected_item = y / SCROLLABLE_ROW_HEIGHT; if (selected_item < 0 || selected_item >= w->no_list_items) highlighted_index = -1; @@ -265,7 +265,7 @@ static void window_object_load_error_scrollmouseover(rct_window *w, sint32 scrol widget_invalidate(w, WIDX_SCROLL); } -static void window_object_load_error_select_element_from_list(rct_window *w, sint32 index) +static void window_object_load_error_select_element_from_list(rct_window *w, int32_t index) { if (index < 0 || index > w->no_list_items) { w->selected_list_item = -1; @@ -276,14 +276,14 @@ static void window_object_load_error_select_element_from_list(rct_window *w, sin widget_invalidate(w, WIDX_SCROLL); } -static void window_object_load_error_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_object_load_error_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 selected_item; + int32_t selected_item; selected_item = y / SCROLLABLE_ROW_HEIGHT; window_object_load_error_select_element_from_list(w, selected_item); } -static void window_object_load_error_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_object_load_error_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *height = w->no_list_items * SCROLLABLE_ROW_HEIGHT; } @@ -302,14 +302,14 @@ static void window_object_load_error_paint(rct_window *w, rct_drawpixelinfo *dpi gfx_draw_string_left_clipped(dpi, STR_BLACK_STRING, gCommonFormatArgs, COLOUR_BLACK, w->x + 5, w->y + 43, WW-5); } -static void window_object_load_error_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_object_load_error_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); - const sint32 list_width = w->widgets[WIDX_SCROLL].right - w->widgets[WIDX_SCROLL].left; + const int32_t list_width = w->widgets[WIDX_SCROLL].right - w->widgets[WIDX_SCROLL].left; - for (sint32 i = 0; i < w->no_list_items; i++) + for (int32_t i = 0; i < w->no_list_items; i++) { - sint32 y = i * SCROLLABLE_ROW_HEIGHT; + int32_t y = i * SCROLLABLE_ROW_HEIGHT; if (y > dpi->y + dpi->height) break; diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index bd55544686..a72b7a89e3 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -412,7 +412,7 @@ static constexpr const rct_string_id window_options_fullscreen_mode_names[] = { STR_OPTIONS_DISPLAY_FULLSCREEN_BORDERLESS, }; -const sint32 window_options_tab_animation_divisor[] = +const int32_t window_options_tab_animation_divisor[] = { 4, // WINDOW_OPTIONS_PAGE_DISPLAY, 1, // WINDOW_OPTIONS_PAGE_RENDERING, @@ -423,7 +423,7 @@ const sint32 window_options_tab_animation_divisor[] = 2, // WINDOW_OPTIONS_PAGE_ADVANCED, 1 // WINDOW_OPTIONS_PAGE_TWITCH, }; -const sint32 window_options_tab_animation_frames[] = +const int32_t window_options_tab_animation_frames[] = { 8, // WINDOW_OPTIONS_PAGE_DISPLAY, 1, // WINDOW_OPTIONS_PAGE_RENDERING, @@ -435,11 +435,11 @@ const sint32 window_options_tab_animation_frames[] = 1 // WINDOW_OPTIONS_PAGE_TWITCH, }; -static void window_options_set_page(rct_window *w, sint32 page); +static void window_options_set_page(rct_window *w, int32_t page); static void window_options_set_pressed_tab(rct_window *w); -static void window_options_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex); +static void window_options_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex); static void window_options_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); -static void window_options_show_dropdown(rct_window *w, rct_widget *widget, sint32 num_items); +static void window_options_show_dropdown(rct_window *w, rct_widget *widget, int32_t num_items); static void window_options_update_height_markers(); #pragma region Events @@ -447,11 +447,11 @@ static void window_options_update_height_markers(); static void window_options_close(rct_window *w); static void window_options_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_options_update(rct_window *w); static void window_options_invalidate(rct_window *w); static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_options_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); +static void window_options_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); static void window_options_text_input(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_options_tooltip(rct_window *w, rct_widgetindex widgetIndex, rct_string_id *stringid); @@ -501,7 +501,7 @@ static rct_window_event_list window_options_events = { (1 << WIDX_TAB_7) | \ (1 << WIDX_TAB_8) -static uint64 window_options_page_enabled_widgets[] = { +static uint64_t window_options_page_enabled_widgets[] = { MAIN_OPTIONS_ENABLED_WIDGETS | (1 << WIDX_RESOLUTION) | (1 << WIDX_RESOLUTION_DROPDOWN) | @@ -610,7 +610,7 @@ static uint64 window_options_page_enabled_widgets[] = { #pragma endregion static struct Resolution * _resolutions = nullptr; -static sint32 _numResolutions = 0; +static int32_t _numResolutions = 0; /** * @@ -991,7 +991,7 @@ static void window_options_mouseup(rct_window *w, rct_widgetindex widgetIndex) */ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - uint32 num_items; + uint32_t num_items; widget = &w->widgets[widgetIndex - 1]; @@ -1002,13 +1002,13 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, { _numResolutions = context_get_resolutions(&_resolutions); - sint32 selectedResolution = -1; - for (sint32 i = 0; i < _numResolutions; i++) { + int32_t selectedResolution = -1; + for (int32_t i = 0; i < _numResolutions; i++) { struct Resolution *resolution = &_resolutions[i]; gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; - uint16 *args = (uint16*)&gDropdownItemsArgs[i]; + uint16_t *args = (uint16_t*)&gDropdownItemsArgs[i]; args[0] = STR_RESOLUTION_X_BY_Y; args[1] = resolution->Width; args[2] = resolution->Height; @@ -1039,12 +1039,12 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_DRAWING_ENGINE_DROPDOWN: { - sint32 numItems = 3; + int32_t numItems = 3; #ifdef DISABLE_OPENGL numItems = 2; #endif - for (sint32 i = 0; i < numItems; i++) { + for (int32_t i = 0; i < numItems; i++) { gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[i] = DrawingEngineStringIds[i]; } @@ -1182,7 +1182,7 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, audio_populate_devices(); // populate the list with the sound devices - for (size_t i = 0; (sint32)i < gAudioDeviceCount; i++) { + for (size_t i = 0; (int32_t)i < gAudioDeviceCount; i++) { gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM; gDropdownItemsArgs[i] = (uintptr_t)gAudioDevices[i].name; } @@ -1209,7 +1209,7 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, case WINDOW_OPTIONS_PAGE_CONTROLS_AND_INTERFACE: switch (widgetIndex) { case WIDX_THEMES_DROPDOWN: - num_items = (uint32)theme_manager_get_num_available_themes(); + num_items = (uint32_t)theme_manager_get_num_available_themes(); for (size_t i = 0; i < num_items; i++) { gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM; @@ -1227,7 +1227,7 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, widget->right - widget->left - 3 ); - dropdown_set_checked((sint32)theme_manager_get_active_available_theme_index(), true); + dropdown_set_checked((int32_t)theme_manager_get_active_available_theme_index(), true); widget_invalidate(w, WIDX_THEMES_DROPDOWN); break; } @@ -1236,7 +1236,7 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, case WINDOW_OPTIONS_PAGE_MISC: switch (widgetIndex) { case WIDX_TITLE_SEQUENCE_DROPDOWN: - num_items = (sint32)title_sequence_manager_get_count(); + num_items = (int32_t)title_sequence_manager_get_count(); for (size_t i = 0; i < num_items; i++) { gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM; gDropdownItemsArgs[i] = (uintptr_t)title_sequence_manager_get_name(i); @@ -1251,7 +1251,7 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, num_items ); - dropdown_set_checked((sint32)title_get_current_sequence(), true); + dropdown_set_checked((int32_t)title_get_current_sequence(), true); break; case WIDX_SCENARIO_GROUPING_DROPDOWN: num_items = 2; @@ -1309,7 +1309,7 @@ static void window_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, * * rct2: 0x006BB076 */ -static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -1324,8 +1324,8 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, gConfigGeneral.fullscreen_width = resolution->Width; gConfigGeneral.fullscreen_height = resolution->Height; - if (gConfigGeneral.fullscreen_mode == static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) - context_set_fullscreen_mode(static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)); + if (gConfigGeneral.fullscreen_mode == static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) + context_set_fullscreen_mode(static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)); config_save_default(); gfx_invalidate_screen(); @@ -1336,17 +1336,17 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, if (dropdownIndex != gConfigGeneral.fullscreen_mode){ context_set_fullscreen_mode(dropdownIndex); - gConfigGeneral.fullscreen_mode = (uint8)dropdownIndex; + gConfigGeneral.fullscreen_mode = (uint8_t)dropdownIndex; config_save_default(); gfx_invalidate_screen(); } break; case WIDX_DRAWING_ENGINE_DROPDOWN: if (dropdownIndex != gConfigGeneral.drawing_engine) { - sint32 srcEngine = drawing_engine_get_type(); - sint32 dstEngine = dropdownIndex; + int32_t srcEngine = drawing_engine_get_type(); + int32_t dstEngine = dropdownIndex; - gConfigGeneral.drawing_engine = (uint8)dstEngine; + gConfigGeneral.drawing_engine = (uint8_t)dstEngine; bool recreate_window = drawing_engine_requires_new_window(srcEngine, dstEngine); platform_refresh_video(recreate_window); config_save_default(); @@ -1357,7 +1357,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, // Note: offset by one to compensate for lack of NN option. if ((dropdownIndex + 1) != gConfigGeneral.scale_quality) { - gConfigGeneral.scale_quality = (uint8)dropdownIndex + 1; + gConfigGeneral.scale_quality = (uint8_t)dropdownIndex + 1; config_save_default(); gfx_invalidate_screen(); context_trigger_resize(); @@ -1390,22 +1390,22 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_CURRENCY_DROPDOWN: if(dropdownIndex == CURRENCY_CUSTOM + 1) { // Add 1 because the separator occupies a position - gConfigGeneral.currency_format = (sint8)dropdownIndex - 1; + gConfigGeneral.currency_format = (int8_t)dropdownIndex - 1; context_open_window(WC_CUSTOM_CURRENCY_CONFIG); } else { - gConfigGeneral.currency_format = (sint8)dropdownIndex; + gConfigGeneral.currency_format = (int8_t)dropdownIndex; } config_save_default(); gfx_invalidate_screen(); break; case WIDX_DISTANCE_DROPDOWN: - gConfigGeneral.measurement_format = (sint8)dropdownIndex; + gConfigGeneral.measurement_format = (int8_t)dropdownIndex; config_save_default(); window_options_update_height_markers(); break; case WIDX_TEMPERATURE_DROPDOWN: if (dropdownIndex != gConfigGeneral.temperature_format) { - gConfigGeneral.temperature_format = (sint8)dropdownIndex; + gConfigGeneral.temperature_format = (int8_t)dropdownIndex; config_save_default(); gfx_invalidate_screen(); } @@ -1436,7 +1436,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_DATE_FORMAT_DROPDOWN: if (dropdownIndex != gConfigGeneral.date_format) { - gConfigGeneral.date_format = (uint8)dropdownIndex; + gConfigGeneral.date_format = (uint8_t)dropdownIndex; config_save_default(); gfx_invalidate_screen(); } @@ -1469,7 +1469,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, context_show_error(STR_OPTIONS_MUSIC_ERR_CSS50_NOT_FOUND, STR_OPTIONS_MUSIC_ERR_CSS50_NOT_FOUND_HINT); } else { - gConfigSound.title_music = (sint8)dropdownIndex; + gConfigSound.title_music = (int8_t)dropdownIndex; config_save_default(); window_invalidate(w); } @@ -1495,7 +1495,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, case WINDOW_OPTIONS_PAGE_MISC: switch (widgetIndex) { case WIDX_TITLE_SEQUENCE_DROPDOWN: - if (dropdownIndex != (sint32)title_get_current_sequence()) { + if (dropdownIndex != (int32_t)title_get_current_sequence()) { title_sequence_change_preset((size_t)dropdownIndex); config_save_default(); window_invalidate(w); @@ -1503,7 +1503,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN: if (dropdownIndex != gConfigGeneral.default_inspection_interval) { - gConfigGeneral.default_inspection_interval = (uint8)dropdownIndex; + gConfigGeneral.default_inspection_interval = (uint8_t)dropdownIndex; config_save_default(); window_invalidate(w); } @@ -1523,7 +1523,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, switch (widgetIndex) { case WIDX_AUTOSAVE_DROPDOWN: if (dropdownIndex != gConfigGeneral.autosave_frequency) { - gConfigGeneral.autosave_frequency = (uint8)dropdownIndex; + gConfigGeneral.autosave_frequency = (uint8_t)dropdownIndex; config_save_default(); window_invalidate(w); } @@ -1560,11 +1560,11 @@ static void window_options_invalidate(rct_window *w) case WINDOW_OPTIONS_PAGE_DISPLAY: { // Resolution dropdown caption. - set_format_arg(16, uint16, (uint16)gConfigGeneral.fullscreen_width); - set_format_arg(18, uint16, (uint16)gConfigGeneral.fullscreen_height); + set_format_arg(16, uint16_t, (uint16_t)gConfigGeneral.fullscreen_width); + set_format_arg(18, uint16_t, (uint16_t)gConfigGeneral.fullscreen_height); // Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)" - if (gConfigGeneral.fullscreen_mode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) + if (gConfigGeneral.fullscreen_mode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) { w->disabled_widgets |= (1 << WIDX_RESOLUTION_DROPDOWN); w->disabled_widgets |= (1 << WIDX_RESOLUTION); @@ -1731,9 +1731,9 @@ static void window_options_invalidate(rct_window *w) if (w->frame_no == 0) { widget = &window_options_audio_widgets[WIDX_SOUND_VOLUME]; - w->scrolls[0].h_left = (sint16)ceil((gConfigSound.sound_volume / 100.0f) * (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))); + w->scrolls[0].h_left = (int16_t)ceil((gConfigSound.sound_volume / 100.0f) * (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))); widget = &window_options_audio_widgets[WIDX_MUSIC_VOLUME]; - w->scrolls[1].h_left = (sint16)ceil((gConfigSound.ride_music_volume / 100.0f) * (w->scrolls[1].h_right - ((widget->right - widget->left) - 1))); + w->scrolls[1].h_left = (int16_t)ceil((gConfigSound.ride_music_volume / 100.0f) * (w->scrolls[1].h_right - ((widget->right - widget->left) - 1))); } widget_scroll_update_thumbs(w, WIDX_SOUND_VOLUME); @@ -1813,9 +1813,9 @@ static void window_options_invalidate(rct_window *w) } // Automatically adjust window height to fit widgets - sint32 y = 0; + int32_t y = 0; for (widget = &w->widgets[WIDX_PAGE_START]; widget->type != WWT_LAST; widget++) { - y = std::max(y, widget->bottom); + y = std::max(y, widget->bottom); } w->height = y + 6; w->widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1830,9 +1830,9 @@ static void window_options_update(rct_window *w) if (w->page == WINDOW_OPTIONS_PAGE_AUDIO) { rct_widget *widget = &window_options_audio_widgets[WIDX_SOUND_VOLUME]; - uint8 sound_volume = (uint8)(((float)w->scrolls[0].h_left / (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))) * 100); + uint8_t sound_volume = (uint8_t)(((float)w->scrolls[0].h_left / (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))) * 100); widget = &window_options_audio_widgets[WIDX_MUSIC_VOLUME]; - uint8 ride_music_volume = (uint8)(((float)w->scrolls[1].h_left / (w->scrolls[1].h_right - ((widget->right - widget->left) - 1))) * 100); + uint8_t ride_music_volume = (uint8_t)(((float)w->scrolls[1].h_left / (w->scrolls[1].h_right - ((widget->right - widget->left) - 1))) * 100); if (sound_volume != gConfigSound.sound_volume) { gConfigSound.sound_volume = sound_volume; config_save_default(); @@ -1861,8 +1861,8 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_FULLSCREEN_MODE, w, w->colours[1], w->x + 10, w->y + window_options_display_widgets[WIDX_FULLSCREEN].top + 1); // Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)" - sint32 colour = w->colours[1]; - if (gConfigGeneral.fullscreen_mode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) + int32_t colour = w->colours[1]; + if (gConfigGeneral.fullscreen_mode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) { colour |= COLOUR_FLAG_INSET; } @@ -1871,7 +1871,7 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_UI_SCALING_DESC, w, w->colours[1], w->x + 10, w->y + window_options_display_widgets[WIDX_SCALE].top + 1); gfx_draw_string_left(dpi, STR_DRAWING_ENGINE, w, w->colours[1], w->x + 10, w->y + window_options_display_widgets[WIDX_DRAWING_ENGINE].top + 1); - sint32 scale = (sint32)(gConfigGeneral.window_scale * 100); + int32_t scale = (int32_t)(gConfigGeneral.window_scale * 100); gfx_draw_string_left(dpi, STR_WINDOW_OBJECTIVE_VALUE_RATING, &scale, w->colours[1], w->x + w->widgets[WIDX_SCALE].left + 1, w->y + w->widgets[WIDX_SCALE].top + 1); colour = w->colours[1]; @@ -1929,9 +1929,9 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_widget pathWidget = window_options_advanced_widgets[WIDX_PATH_TO_RCT1_BUTTON]; // Apply vertical alignment if appropriate. - sint32 widgetHeight = pathWidget.bottom - pathWidget.top; - sint32 lineHeight = font_get_line_height(gCurrentFontSpriteBase); - uint32 padding = widgetHeight > lineHeight ? (widgetHeight - lineHeight) / 2 : 0; + int32_t widgetHeight = pathWidget.bottom - pathWidget.top; + int32_t lineHeight = font_get_line_height(gCurrentFontSpriteBase); + uint32_t padding = widgetHeight > lineHeight ? (widgetHeight - lineHeight) / 2 : 0; gfx_draw_string_left_clipped( dpi, @@ -1948,7 +1948,7 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi) } // helper function, all dropdown boxes have similar properties -static void window_options_show_dropdown(rct_window *w, rct_widget *widget, sint32 num_items) +static void window_options_show_dropdown(rct_window *w, rct_widget *widget, int32_t num_items) { window_dropdown_show_text_custom_width( w->x + widget->left, @@ -1968,7 +1968,7 @@ static void window_options_update_height_markers() gfx_invalidate_screen(); } -static void window_options_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_options_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { if (w->page == WINDOW_OPTIONS_PAGE_AUDIO) { *width = 1000; @@ -2020,7 +2020,7 @@ static void window_options_tooltip(rct_window *w, rct_widgetindex widgetIndex, r #pragma region Common -static void window_options_set_page(rct_window *w, sint32 page) +static void window_options_set_page(rct_window *w, int32_t page) { w->page = page; w->frame_no = 0; @@ -2037,23 +2037,23 @@ static void window_options_set_page(rct_window *w, sint32 page) static void window_options_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_OPTIONS_PAGE_COUNT; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void window_options_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex) +static void window_options_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_1 + page; rct_widget *widget = &w->widgets[widgetIndex]; - sint16 l = w->x + widget->left; - sint16 t = w->y + widget->top; + int16_t l = w->x + widget->left; + int16_t t = w->y + widget->top; if (!(w->disabled_widgets & (1LL << widgetIndex))) { if (w->page == page) { - sint32 frame = w->frame_no / window_options_tab_animation_divisor[w->page]; + int32_t frame = w->frame_no / window_options_tab_animation_divisor[w->page]; spriteIndex += (frame % window_options_tab_animation_frames[w->page]); } @@ -2061,7 +2061,7 @@ static void window_options_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, gfx_draw_sprite(dpi, spriteIndex, l, t, 0); } else { // Get the window background colour - uint8 window_colour = NOT_TRANSLUCENT(w->colours[widget->colour]); + uint8_t window_colour = NOT_TRANSLUCENT(w->colours[widget->colour]); // Draw greyed out (light border bottom right shadow) gfx_draw_sprite_solid(dpi, spriteIndex, l + 1, t + 1, ColourMapA[window_colour].lighter); diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 60ccb67abf..3c68602f12 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -150,7 +150,7 @@ static void window_park_entrance_close(rct_window *w); static void window_park_entrance_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_park_entrance_resize(rct_window *w); static void window_park_entrance_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_park_entrance_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_park_entrance_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_park_entrance_update(rct_window *w); static void window_park_entrance_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_park_entrance_invalidate(rct_window *w); @@ -425,7 +425,7 @@ static rct_window_event_list *window_park_page_events[] = { #pragma region Enabled widgets -static uint32 window_park_page_enabled_widgets[] = { +static uint32_t window_park_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | @@ -499,7 +499,7 @@ static uint32 window_park_page_enabled_widgets[] = { (1 << WIDX_TAB_7) }; -static uint32 window_park_page_hold_down_widgets[] = { +static uint32_t window_park_page_hold_down_widgets[] = { 0, 0, 0, @@ -516,7 +516,7 @@ static uint32 window_park_page_hold_down_widgets[] = { struct window_park_award { rct_string_id text; - uint32 sprite; + uint32_t sprite; }; static constexpr const window_park_award ParkAwards[] = { @@ -541,7 +541,7 @@ static constexpr const window_park_award ParkAwards[] = { // clang-format on static void window_park_init_viewport(rct_window *w); -static void window_park_set_page(rct_window *w, sint32 page); +static void window_park_set_page(rct_window *w, int32_t page); static void window_park_anchor_border_widgets(rct_window *w); static void window_park_set_pressed_tab(rct_window *w); static void window_park_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); @@ -562,7 +562,7 @@ static rct_window *window_park_open() w->page = WINDOW_PARK_PAGE_ENTRANCE; w->viewport_focus_coordinates.y = 0; w->frame_no = 0; - w->list_information_type = std::numeric_limits::max(); + w->list_information_type = std::numeric_limits::max(); w->numberOfStaff = -1; w->var_492 = 0; window_park_set_disabled_tabs(w); @@ -583,7 +583,7 @@ static void window_park_set_disabled_tabs(rct_window *w) static void window_park_prepare_window_title_text() { set_format_arg(0, rct_string_id, gParkName); - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); } #pragma region Entrance page @@ -652,7 +652,7 @@ static void window_park_entrance_mouseup(rct_window *w, rct_widgetindex widgetIn window_scroll_to_viewport(w); break; case WIDX_RENAME: - set_format_arg(16, uint32, gParkNameArgs); + set_format_arg(16, uint32_t, gParkNameArgs); window_text_input_open(w, WIDX_RENAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, gParkName, 0, USER_STRING_MAX_LENGTH); break; case WIDX_CLOSE_LIGHT: @@ -709,7 +709,7 @@ static void window_park_entrance_mousedown(rct_window *w, rct_widgetindex widget * * rct2: 0x006682B8 */ -static void window_park_entrance_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_park_entrance_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_OPEN_OR_CLOSE) { if (dropdownIndex == -1) @@ -754,7 +754,7 @@ static void window_park_entrance_textinput(rct_window *w, rct_widgetindex widget */ static void window_park_entrance_invalidate(rct_window *w) { - sint32 i, height; + int32_t i, height; w->widgets = window_park_page_widgets[w->page]; window_init_scroll_widgets(w); @@ -763,7 +763,7 @@ static void window_park_entrance_invalidate(rct_window *w) // Set open / close park button state set_format_arg(0, rct_string_id, gParkName); - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); window_park_entrance_widgets[WIDX_OPEN_OR_CLOSE].image = park_is_open() ? SPR_OPEN : SPR_CLOSED; window_park_entrance_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + !park_is_open() * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT); window_park_entrance_widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + park_is_open() * 2 + widget_is_pressed(w, WIDX_OPEN_LIGHT); @@ -864,7 +864,7 @@ static void window_park_entrance_paint(rct_window *w, rct_drawpixelinfo *dpi) */ static void window_park_init_viewport(rct_window *w) { - sint32 i, x, y, z, r, xy, zr, viewportFlags; + int32_t i, x, y, z, r, xy, zr, viewportFlags; x = y = z = r = xy = zr = 0; rct_viewport *viewport; @@ -887,7 +887,7 @@ static void window_park_init_viewport(rct_window *w) if (w->viewport == nullptr) { viewportFlags = gConfigGeneral.always_show_gridlines ? VIEWPORT_FLAG_GRIDLINES : 0; } else { - // if (w->var_482 == x && w->var_484 == y && w->var_486 == z && (uint16)w->var_488 >> 8 == r) + // if (w->var_482 == x && w->var_484 == y && w->var_486 == z && (uint16_t)w->var_488 >> 8 == r) // return; viewport = w->viewport; @@ -1025,7 +1025,7 @@ static void window_park_rating_invalidate(rct_window *w) */ static void window_park_rating_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; rct_widget *widget; window_draw_widgets(w, dpi); @@ -1045,7 +1045,7 @@ static void window_park_rating_paint(rct_window *w, rct_drawpixelinfo *dpi) x += widget->left + 22; y += widget->top + 26; - graph_draw_uint8(dpi, gParkRatingHistory, 32, x, y); + graph_draw_uint8_t(dpi, gParkRatingHistory, 32, x, y); } #pragma endregion @@ -1142,7 +1142,7 @@ static void window_park_guests_invalidate(rct_window *w) */ static void window_park_guests_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; rct_widget *widget; window_draw_widgets(w, dpi); @@ -1162,7 +1162,7 @@ static void window_park_guests_paint(rct_window *w, rct_drawpixelinfo *dpi) x += widget->left + 22; y += widget->top + 26; - graph_draw_uint8(dpi, gGuestsInParkHistory, 32, x, y); + graph_draw_uint8_t(dpi, gGuestsInParkHistory, 32, x, y); } #pragma endregion @@ -1196,7 +1196,7 @@ static void window_park_price_resize(rct_window *w) */ static void window_park_price_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - sint32 newFee; + int32_t newFee; switch (widgetIndex) { case WIDX_CLOSE: @@ -1265,7 +1265,7 @@ static void window_park_price_invalidate(rct_window *w) } money16 parkEntranceFee = park_get_entrance_fee(); - set_format_arg(6, uint32, parkEntranceFee); + set_format_arg(6, uint32_t, parkEntranceFee); window_park_price_widgets[WIDX_PRICE].text = parkEntranceFee == 0 ? STR_FREE : STR_ARG_6_CURRENCY2DP; window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_7); @@ -1278,7 +1278,7 @@ static void window_park_price_invalidate(rct_window *w) */ static void window_park_price_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); @@ -1320,7 +1320,7 @@ static void window_park_stats_resize(rct_window *w) */ static void window_park_stats_update(rct_window *w) { - sint32 i; + int32_t i; w->frame_no++; widget_invalidate(w, WIDX_TAB_5); @@ -1367,7 +1367,7 @@ static void window_park_stats_invalidate(rct_window *w) */ static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, parkSize, stringIndex; + int32_t x, y, parkSize, stringIndex; window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); @@ -1382,20 +1382,20 @@ static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL; parkSize = squaredmetres_to_squaredfeet(parkSize); } - set_format_arg(0, uint32, parkSize); + set_format_arg(0, uint32_t, parkSize); gfx_draw_string_left(dpi, stringIndex, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; // Draw number of rides / attractions - if (w->list_information_type != (uint16)-1) { - set_format_arg(0, uint32, w->list_information_type); + if (w->list_information_type != (uint16_t)-1) { + set_format_arg(0, uint32_t, w->list_information_type); gfx_draw_string_left(dpi, STR_NUMBER_OF_RIDES_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); } y += LIST_ROW_HEIGHT; // Draw number of staff if (w->numberOfStaff != -1) { - set_format_arg(0, uint32, w->numberOfStaff); + set_format_arg(0, uint32_t, w->numberOfStaff); gfx_draw_string_left(dpi, STR_STAFF_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y); } y += LIST_ROW_HEIGHT; @@ -1533,7 +1533,7 @@ static void window_park_objective_invalidate(rct_window *w) */ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); @@ -1551,8 +1551,8 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) y += LIST_ROW_HEIGHT; // Objective - set_format_arg(0, uint16, gScenarioObjectiveNumGuests); - set_format_arg(2, sint16, date_get_total_months(MONTH_OCTOBER, gScenarioObjectiveYear)); + set_format_arg(0, uint16_t, gScenarioObjectiveNumGuests); + set_format_arg(2, int16_t, date_get_total_months(MONTH_OCTOBER, gScenarioObjectiveYear)); set_format_arg(4, money32, gScenarioObjectiveCurrency); y += gfx_draw_string_left_wrapped(dpi, gCommonFormatArgs, x, y, 221, ObjectiveNames[gScenarioObjectiveType], COLOUR_BLACK); @@ -1560,7 +1560,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) // Objective outcome if (gScenarioCompletedCompanyValue != MONEY32_UNDEFINED) { - if ((uint32)gScenarioCompletedCompanyValue == 0x80000001) { + if ((uint32_t)gScenarioCompletedCompanyValue == 0x80000001) { // Objective failed gfx_draw_string_left_wrapped(dpi, nullptr, x, y, 222, STR_OBJECTIVE_FAILED, COLOUR_BLACK); } else { @@ -1667,10 +1667,10 @@ static void window_park_awards_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); - sint32 x = w->x + window_park_awards_widgets[WIDX_PAGE_BACKGROUND].left + 4; - sint32 y = w->y + window_park_awards_widgets[WIDX_PAGE_BACKGROUND].top + 4; - sint32 count = 0; - for (sint32 i = 0; i < MAX_AWARDS; i++) { + int32_t x = w->x + window_park_awards_widgets[WIDX_PAGE_BACKGROUND].left + 4; + int32_t y = w->y + window_park_awards_widgets[WIDX_PAGE_BACKGROUND].top + 4; + int32_t count = 0; + for (int32_t i = 0; i < MAX_AWARDS; i++) { Award *award = &gCurrentAwards[i]; if (award->Time == 0) continue; @@ -1694,9 +1694,9 @@ static void window_park_awards_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x00668496 */ -static void window_park_set_page(rct_window *w, sint32 page) +static void window_park_set_page(rct_window *w, int32_t page) { - sint32 listen; + int32_t listen; if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) if (w->classification == gCurrentToolWidget.window_classification && w->number == gCurrentToolWidget.window_number) @@ -1742,7 +1742,7 @@ static void window_park_anchor_border_widgets(rct_window *w) static void window_park_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < 7; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); @@ -1750,7 +1750,7 @@ static void window_park_set_pressed_tab(rct_window *w) static void window_park_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) { - sint32 sprite_idx; + int32_t sprite_idx; // Entrance tab if (!(w->disabled_widgets & (1 << WIDX_TAB_1))) diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index bb55a2cb88..1b85f81b0b 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -81,7 +81,7 @@ static void window_player_overview_close(rct_window *w); static void window_player_overview_mouse_up(rct_window *w, rct_widgetindex widgetIndex); static void window_player_overview_resize(rct_window *w); static void window_player_overview_mouse_down(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_player_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_player_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_player_overview_update(rct_window* w); static void window_player_overview_invalidate(rct_window *w); static void window_player_overview_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -162,12 +162,12 @@ static rct_window_event_list *window_player_page_events[] = { #pragma endregion -static void window_player_set_page(rct_window* w, sint32 page); +static void window_player_set_page(rct_window* w, int32_t page); static void window_player_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); static void window_player_update_viewport(rct_window *w, bool scroll); static void window_player_update_title(rct_window* w); -static uint32 window_player_page_enabled_widgets[] = { +static uint32_t window_player_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | @@ -182,7 +182,7 @@ static uint32 window_player_page_enabled_widgets[] = { }; // clang-format on -rct_window * window_player_open(uint8 id) +rct_window * window_player_open(uint8_t id) { rct_window* window; @@ -224,8 +224,8 @@ rct_window * window_player_open(uint8 id) static void window_player_overview_show_group_dropdown(rct_window *w, rct_widget *widget) { rct_widget *dropdownWidget; - sint32 numItems, i; - sint32 player = network_get_player_index((uint8)w->number); + int32_t numItems, i; + int32_t player = network_get_player_index((uint8_t)w->number); if (player == -1) { return; } @@ -271,7 +271,7 @@ void window_player_overview_mouse_up(rct_window *w, rct_widgetindex widgetIndex) case WIDX_LOCATE:{ rct_window* mainWindow = window_get_main(); if (mainWindow != nullptr) { - sint32 player = network_get_player_index((uint8)w->number); + int32_t player = network_get_player_index((uint8_t)w->number); if (player == -1) { return; } @@ -296,16 +296,16 @@ void window_player_overview_mouse_down(rct_window *w, rct_widgetindex widgetInde } } -void window_player_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +void window_player_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { - sint32 player = network_get_player_index((uint8)w->number); + int32_t player = network_get_player_index((uint8_t)w->number); if (player == -1) { return; } if (dropdownIndex == -1) { return; } - sint32 group = network_get_group_id(dropdownIndex); + int32_t group = network_get_group_id(dropdownIndex); game_do_command(0, GAME_COMMAND_FLAG_APPLY, w->number, group, GAME_COMMAND_SET_PLAYER_GROUP, 0, 0); window_invalidate(w); } @@ -320,7 +320,7 @@ void window_player_overview_update(rct_window* w) w->frame_no++; widget_invalidate(w, WIDX_TAB_1 + w->page); - if (network_get_player_index((uint8)w->number) == -1) { + if (network_get_player_index((uint8_t)w->number) == -1) { window_close(w); return; } @@ -341,13 +341,13 @@ void window_player_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); window_player_draw_tab_images(dpi, w); - sint32 player = network_get_player_index((uint8)w->number); + int32_t player = network_get_player_index((uint8_t)w->number); if (player == -1) { return; } // Draw current group - sint32 groupindex = network_get_group_index(network_get_player_group(player)); + int32_t groupindex = network_get_group_index(network_get_player_group(player)); if (groupindex != -1) { rct_widget* widget = &window_player_overview_widgets[WIDX_GROUP]; char buffer[300]; @@ -369,8 +369,8 @@ void window_player_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Draw ping - sint32 x = w->x + 90; - sint32 y = w->y + 24; + int32_t x = w->x + 90; + int32_t y = w->y + 24; set_format_arg(0, rct_string_id, STR_PING); gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, 0, x, y); @@ -381,8 +381,8 @@ void window_player_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) // Draw last action x = w->x + (w->width / 2); y = w->y + w->height - 13; - sint32 width = w->width - 8; - sint32 lastaction = network_get_player_last_action(player, 0); + int32_t width = w->width - 8; + int32_t lastaction = network_get_player_last_action(player, 0); set_format_arg(0, rct_string_id, STR_ACTION_NA); if (lastaction != -999) { set_format_arg(0, rct_string_id, network_get_action_name_string_id(lastaction)); @@ -421,7 +421,7 @@ void window_player_overview_invalidate(rct_window *w) w->widgets[WIDX_VIEWPORT].right = w->width - 26; w->widgets[WIDX_VIEWPORT].bottom = w->height - 14; - sint32 groupDropdownWidth = w->widgets[WIDX_GROUP].right - w->widgets[WIDX_GROUP].left; + int32_t groupDropdownWidth = w->widgets[WIDX_GROUP].right - w->widgets[WIDX_GROUP].left; w->widgets[WIDX_GROUP].left = (w->width - groupDropdownWidth) / 2; w->widgets[WIDX_GROUP].right = w->widgets[WIDX_GROUP].left + groupDropdownWidth; w->widgets[WIDX_GROUP_DROPDOWN].left = w->widgets[WIDX_GROUP].right - 10; @@ -473,7 +473,7 @@ void window_player_statistics_update(rct_window* w) w->frame_no++; widget_invalidate(w, WIDX_TAB_1 + w->page); - if (network_get_player_index((uint8)w->number) == -1) { + if (network_get_player_index((uint8_t)w->number) == -1) { window_close(w); } } @@ -507,26 +507,26 @@ void window_player_statistics_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); window_player_draw_tab_images(dpi, w); - sint32 player = network_get_player_index((uint8)w->number); + int32_t player = network_get_player_index((uint8_t)w->number); if (player == -1) { return; } - sint32 x = w->x + window_player_overview_widgets[WIDX_PAGE_BACKGROUND].left + 4; - sint32 y = w->y + window_player_overview_widgets[WIDX_PAGE_BACKGROUND].top + 4; + int32_t x = w->x + window_player_overview_widgets[WIDX_PAGE_BACKGROUND].left + 4; + int32_t y = w->y + window_player_overview_widgets[WIDX_PAGE_BACKGROUND].top + 4; - set_format_arg(0, uint32, network_get_player_commands_ran(player)); + set_format_arg(0, uint32_t, network_get_player_commands_ran(player)); gfx_draw_string_left(dpi, STR_COMMANDS_RAN, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; - set_format_arg(0, uint32, network_get_player_money_spent(player)); + set_format_arg(0, uint32_t, network_get_player_money_spent(player)); gfx_draw_string_left(dpi, STR_MONEY_SPENT, gCommonFormatArgs, COLOUR_BLACK, x, y); } -static void window_player_set_page(rct_window* w, sint32 page) +static void window_player_set_page(rct_window* w, int32_t page) { - sint32 originalPage = w->page; + int32_t originalPage = w->page; w->page = page; w->frame_no = 0; @@ -565,7 +565,7 @@ static void window_player_set_page(rct_window* w, sint32 page) static void window_player_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) { rct_widget *widget; - sint32 x, y, imageId; + int32_t x, y, imageId; // Tab 1 if (!widget_is_disabled(w, WIDX_TAB_1)) { @@ -593,7 +593,7 @@ static void window_player_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) static void window_player_update_viewport(rct_window *w, bool scroll) { - sint32 playerIndex = network_get_player_index((uint8)w->number); + int32_t playerIndex = network_get_player_index((uint8_t)w->number); if (playerIndex == -1) { return; } @@ -602,7 +602,7 @@ static void window_player_update_viewport(rct_window *w, bool scroll) if (viewport != nullptr) { LocationXYZ16 coord = network_get_player_last_action_coord(playerIndex); if (coord.x != 0 || coord.y != 0 || coord.z != 0) { - sint32 viewX, viewY; + int32_t viewX, viewY; centre_2d_coordinates(coord.x, coord.y, coord.z, &viewX, &viewY, viewport); // Don't scroll if the view was originally undefined @@ -632,7 +632,7 @@ static void window_player_update_viewport(rct_window *w, bool scroll) static void window_player_update_title(rct_window* w) { - sint32 player = network_get_player_index((uint8)w->number); + int32_t player = network_get_player_index((uint8_t)w->number); if (player != -1) { set_format_arg(0, const char *, network_get_player_name(player)); // set title caption to player name } else { diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index fda43aba9c..ebf6b619b9 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -105,7 +105,7 @@ static void window_research_development_paint(rct_window *w, rct_drawpixelinfo * static void window_research_funding_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_research_funding_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_research_funding_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_research_funding_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_research_funding_update(rct_window *w); static void window_research_funding_invalidate(rct_window *w); static void window_research_funding_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -183,7 +183,7 @@ static rct_window_event_list *window_research_page_events[] = { #pragma region Enabled widgets -static uint32 window_research_page_enabled_widgets[] = { +static uint32_t window_research_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | @@ -205,7 +205,7 @@ static uint32 window_research_page_enabled_widgets[] = { #pragma endregion -const sint32 window_research_tab_animation_loops[] = { 16, 16 }; +const int32_t window_research_tab_animation_loops[] = { 16, 16 }; static constexpr const rct_string_id ResearchCategoryNames[] = { STR_RESEARCH_CATEGORY_TRANSPORT, @@ -225,7 +225,7 @@ static constexpr const rct_string_id ResearchStageNames[] = { }; // clang-format on -static void window_research_set_page(rct_window *w, sint32 page); +static void window_research_set_page(rct_window *w, int32_t page); static void window_research_set_pressed_tab(rct_window *w); static void window_research_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); @@ -312,7 +312,7 @@ static void window_research_development_invalidate(rct_window *w) window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_EMPTY; if (gResearchLastItem.rawValue != RESEARCHED_ITEMS_SEPARATOR) { - uint8 type = gResearchLastItem.type; + uint8_t type = gResearchLastItem.type; window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_FLATBTN; window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = type == RESEARCH_ENTRY_TYPE_RIDE? SPR_NEW_RIDE : SPR_NEW_SCENERY; } @@ -334,8 +334,8 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp { baseWidgetIndex = baseWidgetIndex - WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP; - sint32 x = w->x + 10; - sint32 y = w->y + w->widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP + baseWidgetIndex].top + 12; + int32_t x = w->x + 10; + int32_t y = w->y + w->widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP + baseWidgetIndex].top + 12; rct_string_id stringId; if (gResearchProgressStage == RESEARCH_STAGE_FINISHED_ALL) { @@ -372,7 +372,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp // Expected set_format_arg(0, rct_string_id, STR_RESEARCH_STAGE_UNKNOWN); if (gResearchProgressStage != RESEARCH_STAGE_INITIAL_RESEARCH) { - uint16 expectedDay = gResearchExpectedDay; + uint16_t expectedDay = gResearchExpectedDay; if (expectedDay != 255) { // TODO: Should probably use game date format setting set_format_arg(0, rct_string_id, STR_RESEARCH_EXPECTED_FORMAT); @@ -391,7 +391,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp if (gResearchLastItem.rawValue != RESEARCHED_ITEMS_SEPARATOR) { stringId = research_item_get_name(&gResearchLastItem); - uint8 type = gResearchLastItem.type; + uint8_t type = gResearchLastItem.type; lastDevelopmentFormat = (type == RESEARCH_ENTRY_TYPE_RIDE) ? STR_RESEARCH_RIDE_LABEL : STR_RESEARCH_SCENERY_LABEL; gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 266, lastDevelopmentFormat, COLOUR_BLACK); @@ -440,7 +440,7 @@ static void window_research_funding_mouseup(rct_window *w, rct_widgetindex widge static void window_research_funding_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { rct_widget *dropdownWidget; - sint32 i; + int32_t i; if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON) return; @@ -462,7 +462,7 @@ static void window_research_funding_mousedown(rct_window *w, rct_widgetindex wid dropdownWidget->right - dropdownWidget->left - 3 ); - sint32 currentResearchLevel = gResearchFundingLevel; + int32_t currentResearchLevel = gResearchFundingLevel; dropdown_set_checked(currentResearchLevel, true); } @@ -470,7 +470,7 @@ static void window_research_funding_mousedown(rct_window *w, rct_widgetindex wid * * rct2: 0x0069DB6D */ -static void window_research_funding_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_research_funding_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON || dropdownIndex == -1) return; @@ -514,15 +514,15 @@ static void window_research_funding_invalidate(rct_window *w) window_research_funding_widgets[WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON].type = WWT_BUTTON; // Current funding - sint32 currentResearchLevel = gResearchFundingLevel; + int32_t currentResearchLevel = gResearchFundingLevel; window_research_funding_widgets[WIDX_RESEARCH_FUNDING].text = ResearchFundingLevelNames[currentResearchLevel]; } // Checkboxes - uint8 activeResearchTypes = gResearchPriorities; - for (sint32 i = 0; i < 7; i++) { - sint32 mask = 1 << i; - sint32 widgetMask = 1 << (i + WIDX_TRANSPORT_RIDES); + uint8_t activeResearchTypes = gResearchPriorities; + for (int32_t i = 0; i < 7; i++) { + int32_t mask = 1 << i; + int32_t widgetMask = 1 << (i + WIDX_TRANSPORT_RIDES); // Set checkbox disabled if research type is complete if (gResearchUncompletedCategories & mask) { @@ -557,7 +557,7 @@ void window_research_funding_page_paint(rct_window *w, rct_drawpixelinfo *dpi, r if (gParkFlags & PARK_FLAGS_NO_MONEY) return; - sint32 currentResearchLevel = gResearchFundingLevel; + int32_t currentResearchLevel = gResearchFundingLevel; money32 currentResearchCostPerWeek = research_cost_table[currentResearchLevel]; gfx_draw_string_left(dpi, STR_RESEARCH_COST_PER_MONTH, ¤tResearchCostPerWeek, COLOUR_BLACK, w->x + 10, w->y + 77); } @@ -570,7 +570,7 @@ void window_research_funding_page_paint(rct_window *w, rct_drawpixelinfo *dpi, r * * rct2: 0x0069CAC5 */ -static void window_research_set_page(rct_window *w, sint32 page) +static void window_research_set_page(rct_window *w, int32_t page) { w->page = page; w->frame_no = 0; @@ -603,19 +603,19 @@ static void window_research_set_page(rct_window *w, sint32 page) static void window_research_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_RESEARCH_PAGE_COUNT; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void window_research_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex) +static void window_research_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_1 + page; if (!(w->disabled_widgets & (1LL << widgetIndex))) { if (w->page == page) { - sint32 frame = w->frame_no / 2; + int32_t frame = w->frame_no / 2; if (page == WINDOW_RESEARCH_PAGE_DEVELOPMENT) frame %= 8; spriteIndex += frame; diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 1ccea969e9..cdd575f5f9 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -377,7 +377,7 @@ static rct_widget *window_ride_page_widgets[] = { (1ULL << WIDX_TAB_9) | \ (1ULL << WIDX_TAB_10) -static constexpr const uint64 window_ride_page_enabled_widgets[] = { +static constexpr const uint64_t window_ride_page_enabled_widgets[] = { MAIN_RIDE_ENABLED_WIDGETS | (1ULL << WIDX_VIEW) | (1ULL << WIDX_VIEW_DROPDOWN) | @@ -472,7 +472,7 @@ static constexpr const uint64 window_ride_page_enabled_widgets[] = { (1ULL << WIDX_SHOW_GUESTS_QUEUING), }; -static constexpr const uint64 window_ride_page_hold_down_widgets[] = { +static constexpr const uint64_t window_ride_page_hold_down_widgets[] = { 0, (1ULL << WIDX_VEHICLE_TRAINS_INCREASE) | (1ULL << WIDX_VEHICLE_TRAINS_DECREASE) | @@ -507,7 +507,7 @@ static void window_ride_init_viewport(rct_window *w); static void window_ride_main_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_main_resize(rct_window *w); static void window_ride_main_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_main_update(rct_window *w); static void window_ride_main_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_ride_main_viewport_rotate(rct_window *w); @@ -517,16 +517,16 @@ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_ride_vehicle_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_vehicle_resize(rct_window *w); static void window_ride_vehicle_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_vehicle_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_vehicle_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_vehicle_update(rct_window *w); static void window_ride_vehicle_invalidate(rct_window *w); static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_ride_operating_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_operating_resize(rct_window *w); static void window_ride_operating_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_operating_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_operating_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_operating_update(rct_window *w); static void window_ride_operating_invalidate(rct_window *w); static void window_ride_operating_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -534,7 +534,7 @@ static void window_ride_operating_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_ride_maintenance_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_maintenance_resize(rct_window *w); static void window_ride_maintenance_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_maintenance_update(rct_window *w); static void window_ride_maintenance_invalidate(rct_window *w); static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -543,18 +543,18 @@ static void window_ride_colour_close(rct_window *w); static void window_ride_colour_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_colour_resize(rct_window *w); static void window_ride_colour_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_colour_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_colour_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_colour_update(rct_window *w); -static void window_ride_colour_tooldown(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_ride_colour_tooldrag(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_ride_colour_tooldown(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_ride_colour_tooldrag(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_ride_colour_invalidate(rct_window *w); static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_ride_music_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_music_resize(rct_window *w); static void window_ride_music_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_music_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_music_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_music_update(rct_window *w); static void window_ride_music_invalidate(rct_window *w); static void window_ride_music_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -563,10 +563,10 @@ static void window_ride_measurements_close(rct_window *w); static void window_ride_measurements_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_measurements_resize(rct_window *w); static void window_ride_measurements_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_measurements_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_measurements_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_measurements_update(rct_window *w); -static void window_ride_measurements_tooldown(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_ride_measurements_tooldrag(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_ride_measurements_tooldown(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_ride_measurements_tooldrag(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_ride_measurements_toolabort(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_measurements_invalidate(rct_window *w); static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -575,12 +575,12 @@ static void window_ride_graphs_mouseup(rct_window *w, rct_widgetindex widgetInde static void window_ride_graphs_resize(rct_window *w); static void window_ride_graphs_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); static void window_ride_graphs_update(rct_window *w); -static void window_ride_graphs_scrollgetheight(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_ride_graphs_15(rct_window *w, sint32 scrollIndex, sint32 scrollAreaType); +static void window_ride_graphs_scrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_ride_graphs_15(rct_window *w, int32_t scrollIndex, int32_t scrollAreaType); static void window_ride_graphs_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_ride_graphs_invalidate(rct_window *w); static void window_ride_graphs_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_ride_income_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_income_resize(rct_window *w); @@ -597,7 +597,7 @@ static void window_ride_customer_update(rct_window *w); static void window_ride_customer_invalidate(rct_window *w); static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_ride_set_page(rct_window *w, sint32 page); +static void window_ride_set_page(rct_window *w, int32_t page); // 0x0098DFD4 static rct_window_event_list window_ride_main_events = { @@ -935,22 +935,22 @@ static rct_window_event_list *window_ride_page_events[] = { #pragma endregion static bool _collectTrackDesignScenery = false; -static sint32 _lastSceneryX = 0; -static sint32 _lastSceneryY = 0; +static int32_t _lastSceneryX = 0; +static int32_t _lastSceneryY = 0; -static void set_operating_setting(sint32 rideNumber, uint8 setting, uint8 value); +static void set_operating_setting(int32_t rideNumber, uint8_t setting, uint8_t value); // Cached overall view for each ride // (Re)calculated when the ride window is opened struct ride_overall_view { - sint16 x, y, z; - uint8 zoom; + int16_t x, y, z; + uint8_t zoom; }; static ride_overall_view ride_overall_views[MAX_RIDES] = {}; -static constexpr const sint32 window_ride_tab_animation_divisor[] = { 0, 0, 2, 2, 4, 2, 8, 8, 2, 0 }; -static constexpr const sint32 window_ride_tab_animation_frames[] = { 0, 0, 4, 16, 8, 16, 8, 8, 8, 0 }; +static constexpr const int32_t window_ride_tab_animation_divisor[] = { 0, 0, 2, 2, 4, 2, 8, 8, 2, 0 }; +static constexpr const int32_t window_ride_tab_animation_frames[] = { 0, 0, 4, 16, 8, 16, 8, 8, 8, 0 }; static constexpr const rct_string_id RatingNames[] = { STR_RATING_LOW, @@ -1075,7 +1075,7 @@ static constexpr const rct_string_id MusicStyleNames[] = { struct window_ride_maze_design_option { rct_string_id text; - uint32 sprite; + uint32_t sprite; }; static constexpr const window_ride_maze_design_option MazeOptions[] = { @@ -1087,8 +1087,8 @@ static constexpr const window_ride_maze_design_option MazeOptions[] = { struct window_ride_colour_preview { - uint32 track; - uint32 supports; + uint32_t track; + uint32_t supports; }; static constexpr const window_ride_colour_preview TrackColourPreviews[] = { @@ -1187,9 +1187,9 @@ static constexpr const window_ride_colour_preview TrackColourPreviews[] = { // clang-format on struct rct_window_graphs_y_axis { - uint8 interval; - sint8 unit; - sint8 unit_interval; + uint8_t interval; + int8_t unit; + int8_t unit_interval; rct_string_id label; }; @@ -1204,34 +1204,34 @@ static constexpr const rct_window_graphs_y_axis window_graphs_y_axi[] = { // Used for sorting the ride type cheat dropdown. struct RideTypeLabel { - uint8 ride_type_id; + uint8_t ride_type_id; rct_string_id label_id; const char* label_string; }; -static sint32 RideDropdownDataLanguage = LANGUAGE_UNDEFINED; +static int32_t RideDropdownDataLanguage = LANGUAGE_UNDEFINED; static std::vector RideDropdownData; // Used for sorting the vehicle type dropdown. struct VehicleTypeLabel { - sint32 subtype_id; + int32_t subtype_id; rct_string_id label_id; const char* label_string; }; -static sint32 VehicleDropdownDataLanguage = LANGUAGE_UNDEFINED; +static int32_t VehicleDropdownDataLanguage = LANGUAGE_UNDEFINED; static rct_ride_entry *VehicleDropdownRideType = nullptr; static bool VehicleDropdownExpanded = false; static std::vector VehicleDropdownData; -static void window_ride_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, sint32 page, sint32 spriteIndex) +static void window_ride_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, int32_t page, int32_t spriteIndex) { rct_widgetindex widgetIndex = WIDX_TAB_1 + page; if (!(w->disabled_widgets & (1LL << widgetIndex))) { if (w->page == page) { - sint32 frame = w->frame_no / window_ride_tab_animation_divisor[w->page]; + int32_t frame = w->frame_no / window_ride_tab_animation_divisor[w->page]; spriteIndex += (frame % window_ride_tab_animation_frames[w->page]); } @@ -1248,8 +1248,8 @@ static void window_ride_draw_tab_main(rct_drawpixelinfo *dpi, rct_window *w) rct_widgetindex widgetIndex = WIDX_TAB_1 + WINDOW_RIDE_PAGE_MAIN; if (!(w->disabled_widgets & (1LL << widgetIndex))) { - sint32 spriteIndex = 0; - sint32 rideType = get_ride(w->number)->type; + int32_t spriteIndex = 0; + int32_t rideType = get_ride(w->number)->type; switch (gRideClassifications[rideType]) { case RIDE_CLASS_RIDE: @@ -1283,10 +1283,10 @@ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo *dpi, rct_window *w) rct_widget *widget = &w->widgets[widgetIndex]; if (!(w->disabled_widgets & (1LL << widgetIndex))) { - sint32 x = widget->left + 1; - sint32 y = widget->top + 1; - sint32 width = widget->right - x; - sint32 height = widget->bottom - 3 - y; + int32_t x = widget->left + 1; + int32_t y = widget->top + 1; + int32_t width = widget->right - x; + int32_t height = widget->bottom - 3 - y; if (w->page == WINDOW_RIDE_PAGE_VEHICLE) height += 4; @@ -1327,11 +1327,11 @@ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo *dpi, rct_window *w) y /= 4; } - const uint8 vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, rideEntry->tab_vehicle); + const uint8_t vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, rideEntry->tab_vehicle); rct_ride_entry_vehicle* rideVehicleEntry = &rideEntry->vehicles[vehicle]; vehicle_colour vehicleColour = ride_get_vehicle_colour(ride, 0); - sint32 spriteIndex = 32; + int32_t spriteIndex = 32; if (w->page == WINDOW_RIDE_PAGE_VEHICLE) spriteIndex += w->frame_no; spriteIndex /= (rideVehicleEntry->flags & VEHICLE_ENTRY_FLAG_11) ? 4 : 2; @@ -1355,7 +1355,7 @@ static void window_ride_draw_tab_customer(rct_drawpixelinfo *dpi, rct_window *w) if (!(w->disabled_widgets & (1LL << widgetIndex))) { rct_widget *widget = &w->widgets[widgetIndex]; - sint32 spriteIndex = 0; + int32_t spriteIndex = 0; if (w->page == WINDOW_RIDE_PAGE_CUSTOMER) spriteIndex = w->var_492 & ~3; @@ -1391,10 +1391,10 @@ static void window_ride_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) */ static void window_ride_disable_tabs(rct_window *w) { - uint32 disabled_tabs = 0; + uint32_t disabled_tabs = 0; Ride *ride = get_ride(w->number & 0xFF); - uint8 ride_type = ride->type; // ecx + uint8_t ride_type = ride->type; // ecx if (!ride_type_has_flag(ride_type, RIDE_TYPE_FLAG_HAS_DATA_LOGGING)) disabled_tabs |= (1 << WIDX_TAB_8); // 0x800 @@ -1445,14 +1445,14 @@ static void window_ride_disable_tabs(rct_window *w) w->disabled_widgets = disabled_tabs; } -static void window_ride_update_overall_view(uint8 ride_index) { +static void window_ride_update_overall_view(uint8_t ride_index) { // Calculate x, y, z bounds of the entire ride using its track elements tile_element_iterator it; tile_element_iterator_begin(&it); - sint32 minx = std::numeric_limits::max(), miny = std::numeric_limits::max(), minz = std::numeric_limits::max(); - sint32 maxx = std::numeric_limits::min(), maxy = std::numeric_limits::min(), maxz = std::numeric_limits::min(); + int32_t minx = std::numeric_limits::max(), miny = std::numeric_limits::max(), minz = std::numeric_limits::max(); + int32_t maxx = std::numeric_limits::min(), maxy = std::numeric_limits::min(), maxz = std::numeric_limits::min(); while (tile_element_iterator_next(&it)) { if (it.element->GetType() != TILE_ELEMENT_TYPE_TRACK) @@ -1461,10 +1461,10 @@ static void window_ride_update_overall_view(uint8 ride_index) { if (track_element_get_ride_index(it.element) != ride_index) continue; - sint32 x = it.x * 32; - sint32 y = it.y * 32; - sint32 z1 = it.element->base_height * 8; - sint32 z2 = it.element->clearance_height * 8; + int32_t x = it.x * 32; + int32_t y = it.y * 32; + int32_t z1 = it.element->base_height * 8; + int32_t z2 = it.element->clearance_height * 8; minx = std::min(minx, x); miny = std::min(miny, y); @@ -1481,17 +1481,17 @@ static void window_ride_update_overall_view(uint8 ride_index) { view->z = (minz + maxz) / 2 - 8; // Calculate size to determine from how far away to view the ride - sint32 dx = maxx - minx; - sint32 dy = maxy - miny; - sint32 dz = maxz - minz; + int32_t dx = maxx - minx; + int32_t dy = maxy - miny; + int32_t dz = maxz - minz; - sint32 size = (sint32) std::sqrt(dx*dx + dy*dy + dz*dz); + int32_t size = (int32_t) std::sqrt(dx*dx + dy*dy + dz*dz); if (size >= 80) { // Each farther zoom level shows twice as many tiles (log) // Appropriate zoom is lowered by one to fill the entire view with the ride - view->zoom = Math::Clamp(0, (sint32) std::ceil(std::log(size / 80)) - 1, 3); + view->zoom = Math::Clamp(0, (int32_t) std::ceil(std::log(size / 80)) - 1, 3); } else { @@ -1504,7 +1504,7 @@ static void window_ride_update_overall_view(uint8 ride_index) { * * rct2: 0x006AEAB4 */ -static rct_window *window_ride_open(sint32 rideIndex) +static rct_window *window_ride_open(int32_t rideIndex) { rct_window *w; @@ -1526,7 +1526,7 @@ static rct_window *window_ride_open(sint32 rideIndex) w->max_width = 500; w->max_height = 450; - window_ride_update_overall_view((uint8) rideIndex); + window_ride_update_overall_view((uint8_t) rideIndex); return w; } @@ -1535,7 +1535,7 @@ static rct_window *window_ride_open(sint32 rideIndex) * * rct2: 0x006ACC28 */ -rct_window *window_ride_main_open(sint32 rideIndex) +rct_window *window_ride_main_open(int32_t rideIndex) { rct_window *w; @@ -1566,9 +1566,9 @@ rct_window *window_ride_main_open(sint32 rideIndex) * * rct2: 0x006ACCCE */ -static rct_window * window_ride_open_station(sint32 rideIndex, sint32 stationIndex) +static rct_window * window_ride_open_station(int32_t rideIndex, int32_t stationIndex) { - sint32 i; + int32_t i; Ride *ride; rct_window *w; @@ -1621,7 +1621,7 @@ static rct_window * window_ride_open_station(sint32 rideIndex, sint32 stationInd rct_window *window_ride_open_track(rct_tile_element *tileElement) { - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); if ( (tileElement->GetType() == TILE_ELEMENT_TYPE_ENTRANCE) || (TrackSequenceProperties[track_element_get_type(tileElement)][0] & TRACK_SEQUENCE_FLAG_ORIGIN) @@ -1641,13 +1641,13 @@ rct_window *window_ride_open_track(rct_tile_element *tileElement) rct_window *window_ride_open_vehicle(rct_vehicle *vehicle) { rct_vehicle *headVehicle = vehicle_get_head(vehicle); - uint16 headVehicleSpriteIndex = headVehicle->sprite_index; - sint32 rideIndex = headVehicle->ride; + uint16_t headVehicleSpriteIndex = headVehicle->sprite_index; + int32_t rideIndex = headVehicle->ride; Ride *ride = get_ride(rideIndex); // Get view index - sint32 view = 1; - for (sint32 i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { + int32_t view = 1; + for (int32_t i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { if (ride->vehicles[i] == headVehicleSpriteIndex) break; @@ -1667,11 +1667,11 @@ rct_window *window_ride_open_vehicle(rct_vehicle *vehicle) tool_cancel(); } - sint32 openedPeepWindow = 0; + int32_t openedPeepWindow = 0; if (w->ride.view == view) { - sint32 numPeepsLeft = vehicle->num_peeps; - for (sint32 i = 0; i < 32 && numPeepsLeft > 0; i++) { - uint16 peepSpriteIndex = vehicle->peep[i]; + int32_t numPeepsLeft = vehicle->num_peeps; + for (int32_t i = 0; i < 32 && numPeepsLeft > 0; i++) { + uint16_t peepSpriteIndex = vehicle->peep[i]; if (peepSpriteIndex == SPRITE_INDEX_NULL) continue; @@ -1723,9 +1723,9 @@ rct_window *window_ride_open_vehicle(rct_vehicle *vehicle) * * rct2: 0x006AF1D2 */ -static void window_ride_set_page(rct_window *w, sint32 page) +static void window_ride_set_page(rct_window *w, int32_t page) { - sint32 listen; + int32_t listen; if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) if (w->classification == gCurrentToolWidget.window_classification && w->number == gCurrentToolWidget.window_number) @@ -1769,7 +1769,7 @@ static void window_ride_set_page(rct_window *w, sint32 page) static void window_ride_set_pressed_tab(rct_window *w) { - sint32 i; + int32_t i; for (i = 0; i < WINDOW_RIDE_PAGE_COUNT; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); @@ -1797,7 +1797,7 @@ static void window_ride_init_viewport(rct_window *w) if (w->page != WINDOW_RIDE_PAGE_MAIN) return; Ride* ride = get_ride(w->number); - sint32 eax = w->viewport_focus_coordinates.var_480 - 1; + int32_t eax = w->viewport_focus_coordinates.var_480 - 1; union{ sprite_focus sprite; @@ -1828,8 +1828,8 @@ static void window_ride_init_viewport(rct_window *w) } } else if (eax >= ride->num_vehicles && eax < (ride->num_vehicles + ride->num_stations)){ - sint32 stationIndex = -1; - sint32 count = eax - ride->num_vehicles; + int32_t stationIndex = -1; + int32_t count = eax - ride->num_vehicles; do { stationIndex++; if (ride->station_starts[stationIndex].xy != RCT_XY8_UNDEFINED) @@ -1861,7 +1861,7 @@ static void window_ride_init_viewport(rct_window *w) } focus.coordinate.var_480 = w->viewport_focus_coordinates.var_480; - uint16 viewport_flags = 0; + uint16_t viewport_flags = 0; if (w->viewport != nullptr) { if (focus.coordinate.x == w->viewport_focus_coordinates.x && @@ -1895,10 +1895,10 @@ static void window_ride_init_viewport(rct_window *w) if (!w->viewport && ride->overall_view.xy != RCT_XY8_UNDEFINED){ rct_widget* view_widget = &w->widgets[WIDX_VIEWPORT]; - sint32 x = view_widget->left + 1 + w->x; - sint32 y = view_widget->top + 1 + w->y; - sint32 width = view_widget->right - view_widget->left - 1; - sint32 height = view_widget->bottom - view_widget->top - 1; + int32_t x = view_widget->left + 1 + w->x; + int32_t y = view_widget->top + 1 + w->y; + int32_t width = view_widget->right - view_widget->left - 1; + int32_t height = view_widget->bottom - view_widget->top - 1; viewport_create( w, x, @@ -1930,7 +1930,7 @@ static void window_ride_rename(rct_window *w) Ride *ride; ride = get_ride(w->number); - set_format_arg(16, uint32, ride->name_arguments); + set_format_arg(16, uint32_t, ride->name_arguments); window_text_input_open(w, WIDX_RENAME, STR_RIDE_ATTRACTION_NAME, STR_ENTER_NEW_NAME_FOR_THIS_RIDE_ATTRACTION, ride->name, ride->name_arguments, 32); } @@ -1940,8 +1940,8 @@ static void window_ride_rename(rct_window *w) */ static void window_ride_main_mouseup(rct_window *w, rct_widgetindex widgetIndex) { - uint8 rideIndex; - sint32 status; + uint8_t rideIndex; + int32_t status; switch (widgetIndex) { case WIDX_CLOSE: @@ -1960,7 +1960,7 @@ static void window_ride_main_mouseup(rct_window *w, rct_widgetindex widgetIndex) window_ride_set_page(w, widgetIndex - WIDX_TAB_1); break; case WIDX_CONSTRUCTION: - rideIndex = (uint8)w->number; + rideIndex = (uint8_t)w->number; ride_construct(rideIndex); if (window_find_by_number(WC_RIDE_CONSTRUCTION, rideIndex) != nullptr) { window_close(w); @@ -2003,9 +2003,9 @@ static void window_ride_main_mouseup(rct_window *w, rct_widgetindex widgetIndex) */ static void window_ride_main_resize(rct_window *w) { - const sint32 offset = gCheatsAllowArbitraryRideTypeChanges ? 15 : 0; + const int32_t offset = gCheatsAllowArbitraryRideTypeChanges ? 15 : 0; w->flags |= WF_RESIZABLE; - sint32 minHeight = 180 + offset; + int32_t minHeight = 180 + offset; if (theme_get_flags() & UITHEME_FLAG_USE_LIGHTS_RIDE) minHeight = 200 + offset + RCT1_LIGHT_OFFSET - (ride_type_has_flag(get_ride(w->number)->type, RIDE_TYPE_FLAG_NO_TEST_MODE) ? 14 : 0); window_set_resize(w, 316, minHeight, 500, 450); @@ -2021,7 +2021,7 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) rct_widget *dropdownWidget = widget - 1; Ride *ride = get_ride(w->number); - sint32 numItems = 1; + int32_t numItems = 1; if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_NO_VEHICLES)) { numItems += ride->num_stations; numItems += ride->num_vehicles; @@ -2041,11 +2041,11 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) // First item gDropdownItemsFormat[0] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[0] = STR_OVERALL_VIEW; - sint32 currentItem = 1; + int32_t currentItem = 1; // Vehicles - sint32 name = RideComponentNames[RideNameConvention[ride->type].vehicle].number; - for (sint32 i = 1; i <= ride->num_vehicles; i++) { + int32_t name = RideComponentNames[RideNameConvention[ride->type].vehicle].number; + for (int32_t i = 1; i <= ride->num_vehicles; i++) { gDropdownItemsFormat[currentItem] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[currentItem] = name | (currentItem << 16); currentItem++; @@ -2053,7 +2053,7 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) // Stations name = RideComponentNames[RideNameConvention[ride->type].station].number; - for (sint32 i = 1; i <= ride->num_stations; i++) { + for (int32_t i = 1; i <= ride->num_stations; i++) { gDropdownItemsFormat[currentItem] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[currentItem] = name | (i << 16); currentItem++; @@ -2062,7 +2062,7 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) // Set highlighted item if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) { - for (sint32 i = 0; i < ride->num_vehicles; i++) + for (int32_t i = 0; i < ride->num_vehicles; i++) { // The +1 is to skip 'Overall view' dropdown_set_disabled(i + 1, true);; @@ -2080,7 +2080,7 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) static void window_ride_show_open_dropdown(rct_window *w, rct_widget *widget) { Ride *ride; - sint32 numItems, highlightedIndex = 0, checkedIndex; + int32_t numItems, highlightedIndex = 0, checkedIndex; ride = get_ride(w->number); @@ -2157,7 +2157,7 @@ static void populate_ride_type_dropdown() RideDropdownData.clear(); - for (uint8 i = 0; i < RIDE_TYPE_COUNT; i++) + for (uint8_t i = 0; i < RIDE_TYPE_COUNT; i++) { RideTypeLabel label = { i, RideNaming[i].name, ls.GetString(RideNaming[i].name) }; RideDropdownData.push_back(label); @@ -2190,8 +2190,8 @@ static void window_ride_show_ride_type_dropdown(rct_window *w, rct_widget *widge ); // Find the current ride type in the ordered list. - uint8 pos = 0; - for (uint8 i = 0; i < RIDE_TYPE_COUNT; i++) + uint8_t pos = 0; + for (uint8_t i = 0; i < RIDE_TYPE_COUNT; i++) { if (RideDropdownData[i].ride_type_id == ride->type) { @@ -2210,7 +2210,7 @@ static void populate_vehicle_type_dropdown(Ride *ride) rct_ride_entry *rideEntry = get_ride_entry_by_ride(ride); bool selectionShouldBeExpanded; - sint32 rideTypeIterator, rideTypeIteratorMax; + int32_t rideTypeIterator, rideTypeIteratorMax; if (gCheatsShowVehiclesFromOtherTrackTypes && !(ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) || ride->type == RIDE_TYPE_MAZE || ride->type == RIDE_TYPE_MINI_GOLF)) { selectionShouldBeExpanded = true; @@ -2240,11 +2240,11 @@ static void populate_vehicle_type_dropdown(Ride *ride) if (selectionShouldBeExpanded && (rideTypeIterator == RIDE_TYPE_MAZE || rideTypeIterator == RIDE_TYPE_MINI_GOLF)) continue; - uint8 *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideTypeIterator); + uint8_t *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideTypeIterator); - for (uint8 *currentRideEntryIndex = rideEntryIndexPtr; *currentRideEntryIndex != RIDE_ENTRY_INDEX_NULL; currentRideEntryIndex++) + for (uint8_t *currentRideEntryIndex = rideEntryIndexPtr; *currentRideEntryIndex != RIDE_ENTRY_INDEX_NULL; currentRideEntryIndex++) { - sint32 rideEntryIndex = *currentRideEntryIndex; + int32_t rideEntryIndex = *currentRideEntryIndex; rct_ride_entry *currentRideEntry = get_ride_entry(rideEntryIndex); // Skip if vehicle type has not been invented yet @@ -2299,8 +2299,8 @@ static void window_ride_show_vehicle_type_dropdown(rct_window *w, rct_widget *wi ); // Find the current vehicle type in the ordered list. - uint8 pos = 0; - for (uint8 i = 0; i < VehicleDropdownData.size(); i++) + uint8_t pos = 0; + for (uint8_t i = 0; i < VehicleDropdownData.size(); i++) { if (VehicleDropdownData[i].subtype_id == ride->subtype) { @@ -2337,10 +2337,10 @@ static void window_ride_main_mousedown(rct_window *w, rct_widgetindex widgetInde * * rct2: 0x006AF300 */ -static void window_ride_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_main_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { Ride *ride; - sint32 status = 0; + int32_t status = 0; switch (widgetIndex) { case WIDX_VIEW_DROPDOWN: @@ -2383,8 +2383,8 @@ static void window_ride_main_dropdown(rct_window *w, rct_widgetindex widgetIndex case WIDX_RIDE_TYPE_DROPDOWN: if (dropdownIndex != -1 && dropdownIndex < RIDE_TYPE_COUNT) { - uint8 rideLabelId = Math::Clamp(0, dropdownIndex, RIDE_TYPE_COUNT - 1); - uint8 rideType = RideDropdownData[rideLabelId].ride_type_id; + uint8_t rideLabelId = Math::Clamp(0, dropdownIndex, RIDE_TYPE_COUNT - 1); + uint8_t rideType = RideDropdownData[rideLabelId].ride_type_id; if (rideType < RIDE_TYPE_COUNT) { set_operating_setting(w->number, RIDE_SETTING_RIDE_TYPE, rideType); @@ -2412,8 +2412,8 @@ static void window_ride_main_update(rct_window *w) return; if (w->ride.view <= ride->num_vehicles) { - sint32 vehicleIndex = w->ride.view - 1; - uint16 vehicleSpriteIndex = ride->vehicles[vehicleIndex]; + int32_t vehicleIndex = w->ride.view - 1; + uint16_t vehicleSpriteIndex = ride->vehicles[vehicleIndex]; if (vehicleSpriteIndex == SPRITE_INDEX_NULL) return; @@ -2461,7 +2461,7 @@ static void window_ride_main_viewport_rotate(rct_window *w) static void window_ride_main_invalidate(rct_window *w) { rct_widget *widgets; - sint32 i, height; + int32_t i, height; widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) { @@ -2477,9 +2477,9 @@ static void window_ride_main_invalidate(rct_window *w) w->disabled_widgets |= (1 << WIDX_DEMOLISH); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); - set_format_arg(6, uint16, RideNaming[ride->type].name); - uint32 spriteIds[] = { + set_format_arg(2, uint32_t, ride->name_arguments); + set_format_arg(6, uint16_t, RideNaming[ride->type].name); + uint32_t spriteIds[] = { SPR_CLOSED, SPR_OPEN, SPR_TESTING, @@ -2492,7 +2492,7 @@ static void window_ride_main_invalidate(rct_window *w) window_ride_anchor_border_widgets(w); - const sint32 offset = gCheatsAllowArbitraryRideTypeChanges ? 15 : 0; + const int32_t offset = gCheatsAllowArbitraryRideTypeChanges ? 15 : 0; // Anchor main page specific widgets window_ride_main_widgets[WIDX_VIEWPORT].right = w->width - 26; window_ride_main_widgets[WIDX_VIEWPORT].bottom = w->height - (14 + offset); @@ -2565,11 +2565,11 @@ static void window_ride_main_invalidate(rct_window *w) */ static rct_string_id window_ride_get_status_overall_view(rct_window *w, void *arguments) { - sint32 argument; + int32_t argument; rct_string_id formatSecondary, stringId; ride_get_status(w->number, &formatSecondary, &argument); - *(uint16*)((uintptr_t)arguments + 0) = formatSecondary; + *(uint16_t*)((uintptr_t)arguments + 0) = formatSecondary; *(uintptr_t*)((uintptr_t)arguments + 2) = argument; stringId = STR_RED_OUTLINED_STRING; if (formatSecondary != STR_BROKEN_DOWN && formatSecondary != STR_CRASHED) @@ -2586,8 +2586,8 @@ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *argumen { Ride *ride; rct_vehicle *vehicle; - sint32 vehicleIndex; - uint16 vehicleSpriteIndex; + int32_t vehicleIndex; + uint16_t vehicleSpriteIndex; rct_string_id stringId; ride = get_ride(w->number); @@ -2599,7 +2599,7 @@ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *argumen vehicle = &(get_sprite(vehicleSpriteIndex)->vehicle); if (vehicle->status != VEHICLE_STATUS_CRASHING && vehicle->status != VEHICLE_STATUS_CRASHED) { - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; if (trackType == TRACK_ELEM_BLOCK_BRAKES || trackType == TRACK_ELEM_CABLE_LIFT_HILL || trackType == TRACK_ELEM_25_DEG_UP_TO_FLAT || @@ -2616,7 +2616,7 @@ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *argumen stringId = VehicleStatusNames[vehicle->status]; // Get speed in mph - *((uint16*)((uintptr_t)arguments + 2)) = (abs(vehicle->velocity) * 9) >> 18; + *((uint16_t*)((uintptr_t)arguments + 2)) = (abs(vehicle->velocity) * 9) >> 18; if (ride->type == RIDE_TYPE_MINI_GOLF) return 0; @@ -2627,7 +2627,7 @@ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *argumen const ride_component_name stationName = RideComponentNames[RideNameConvention[ride->type].station]; *(rct_string_id*)((uintptr_t)arguments + 4) = (ride->num_stations > 1) ? stationName.number : stationName.singular; - *((uint16*)((uintptr_t)arguments + 6)) = vehicle->current_station + 1; + *((uint16_t*)((uintptr_t)arguments + 6)) = vehicle->current_station + 1; *(rct_string_id*)((uintptr_t)arguments + 0) = stringId; return stringId != STR_CRASHING && stringId != STR_CRASHED_0 ? STR_BLACK_STRING : STR_RED_OUTLINED_STRING; } @@ -2639,8 +2639,8 @@ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *argumen static rct_string_id window_ride_get_status_station(rct_window *w, void *arguments) { Ride *ride = get_ride(w->number); - sint32 count = w->ride.view - ride->num_vehicles - 1; - sint32 stationIndex = -1; + int32_t count = w->ride.view - ride->num_vehicles - 1; + int32_t stationIndex = -1; rct_string_id stringId = 0; do { @@ -2651,19 +2651,19 @@ static rct_string_id window_ride_get_status_station(rct_window *w, void *argumen // Entrance / exit if (ride->status == RIDE_STATUS_CLOSED) { - if (ride_get_entrance_location((uint8)w->number, (uint8)stationIndex).isNull()) + if (ride_get_entrance_location((uint8_t)w->number, (uint8_t)stationIndex).isNull()) stringId = STR_NO_ENTRANCE; - else if (ride_get_exit_location((uint8)w->number, (uint8)stationIndex).isNull()) + else if (ride_get_exit_location((uint8_t)w->number, (uint8_t)stationIndex).isNull()) stringId = STR_NO_EXIT; } else { - if (ride_get_entrance_location((uint8)w->number, (uint8)stationIndex).isNull()) + if (ride_get_entrance_location((uint8_t)w->number, (uint8_t)stationIndex).isNull()) stringId = STR_EXIT_ONLY; } // Queue length if (stringId == 0) { - sint32 queueLength = ride->queue_length[stationIndex]; - set_format_arg_body(static_cast(arguments), 2, (uintptr_t)queueLength, sizeof(uint16)); + int32_t queueLength = ride->queue_length[stationIndex]; + set_format_arg_body(static_cast(arguments), 2, (uintptr_t)queueLength, sizeof(uint16_t)); stringId = STR_QUEUE_EMPTY; if (queueLength == 1) stringId = STR_QUEUE_ONE_PERSON; @@ -2671,7 +2671,7 @@ static rct_string_id window_ride_get_status_station(rct_window *w, void *argumen stringId = STR_QUEUE_PEOPLE; } - set_format_arg_body(static_cast(arguments), 0, (uintptr_t)stringId, sizeof(rct_string_id)); + set_format_arg_body(static_cast(arguments), 0, (uintptr_t)stringId, sizeof(rct_string_id)); return STR_BLACK_STRING; } @@ -2718,13 +2718,13 @@ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi) if (w->ride.view != 0) { stringId = RideComponentNames[RideNameConvention[ride->type].vehicle].number; if (w->ride.view > ride->num_vehicles) { - set_format_arg(2, uint16, w->ride.view - ride->num_vehicles); + set_format_arg(2, uint16_t, w->ride.view - ride->num_vehicles); stringId = RideComponentNames[RideNameConvention[ride->type].station].number; } else { - set_format_arg(2, uint16, w->ride.view); + set_format_arg(2, uint16_t, w->ride.view); } } - set_format_arg(0, uint16, stringId); + set_format_arg(0, uint16_t, stringId); widget = &window_ride_main_widgets[WIDX_VIEW]; gfx_draw_string_centred( @@ -2823,14 +2823,14 @@ static void window_ride_vehicle_mousedown(rct_window *w, rct_widgetindex widgetI * * rct2: 0x006B2767 */ -static void window_ride_vehicle_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_vehicle_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; switch (widgetIndex) { case WIDX_VEHICLE_TYPE_DROPDOWN: - sint32 newRideType = VehicleDropdownData[dropdownIndex].subtype_id; + int32_t newRideType = VehicleDropdownData[dropdownIndex].subtype_id; ride_set_ride_entry(w->number, newRideType); break; } @@ -2857,7 +2857,7 @@ static void window_ride_vehicle_invalidate(rct_window *w) Ride *ride; rct_ride_entry *rideEntry; rct_string_id stringId; - sint32 carsPerTrain; + int32_t carsPerTrain; widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) { @@ -2871,7 +2871,7 @@ static void window_ride_vehicle_invalidate(rct_window *w) rideEntry = get_ride_entry_by_ride(ride); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); // Widget setup carsPerTrain = ride->num_cars_per_train - rideEntry->zero_cars; @@ -2903,23 +2903,23 @@ static void window_ride_vehicle_invalidate(rct_window *w) } - set_format_arg(6, uint16, carsPerTrain); + set_format_arg(6, uint16_t, carsPerTrain); RIDE_COMPONENT_TYPE vehicleType = RideNameConvention[ride->type].vehicle; stringId = RideComponentNames[vehicleType].count; if (ride->num_vehicles > 1) { stringId = RideComponentNames[vehicleType].count_plural; } set_format_arg(8, rct_string_id, stringId); - set_format_arg(10, uint16, ride->num_vehicles); + set_format_arg(10, uint16_t, ride->num_vehicles); stringId = RideComponentNames[vehicleType].count; if (ride->max_trains > 1) { stringId = RideComponentNames[vehicleType].count_plural; } set_format_arg(12, rct_string_id, stringId); - set_format_arg(14, uint16, ride->max_trains); + set_format_arg(14, uint16_t, ride->max_trains); - set_format_arg(16, uint16, std::max(1, ride->min_max_cars_per_train & 0xF) - rideEntry->zero_cars); + set_format_arg(16, uint16_t, std::max(1, ride->min_max_cars_per_train & 0xF) - rideEntry->zero_cars); stringId = RideComponentNames[RIDE_COMPONENT_TYPE_CAR].singular; if ((ride->min_max_cars_per_train & 0xF) - rideEntry->zero_cars > 1) { @@ -2946,8 +2946,8 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) { Ride *ride; rct_ride_entry *rideEntry; - sint32 x, y; - sint16 factor; + int32_t x, y; + int16_t factor; window_draw_widgets(w, dpi); window_ride_draw_tab_images(dpi, w); @@ -2977,7 +2977,7 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) factor = rideEntry->intensity_multiplier; if (factor > 0) { - sint32 lineHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + int32_t lineHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); if (lineHeight != 10) x += 150; else @@ -2999,10 +2999,10 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) } struct rct_vehicle_paintinfo { - sint16 x; - sint16 y; - sint32 sprite_index; - sint32 tertiary_colour; + int16_t x; + int16_t y; + int32_t sprite_index; + int32_t tertiary_colour; }; static rct_vehicle_paintinfo _sprites_to_draw[144]; @@ -3011,7 +3011,7 @@ static rct_vehicle_paintinfo _sprites_to_draw[144]; * * rct2: 0x006B2502 */ -static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { Ride *ride = get_ride(w->number); rct_ride_entry *rideEntry = get_ride_entry_by_ride(ride); @@ -3020,26 +3020,26 @@ static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dp gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width, dpi->y + dpi->height, PALETTE_INDEX_12); rct_widget *widget = &window_ride_vehicle_widgets[WIDX_VEHICLE_TRAINS_PREVIEW]; - sint32 startX = std::max(2, ((widget->right - widget->left) - ((ride->num_vehicles - 1) * 36)) / 2 - 25); - sint32 startY = widget->bottom - widget->top - 4; + int32_t startX = std::max(2, ((widget->right - widget->left) - ((ride->num_vehicles - 1) * 36)) / 2 - 25); + int32_t startY = widget->bottom - widget->top - 4; rct_ride_entry_vehicle* rideVehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, 0)]; startY += rideVehicleEntry->tab_height; // For each train - for (sint32 i = 0; i < ride->num_vehicles; i++) { + for (int32_t i = 0; i < ride->num_vehicles; i++) { rct_vehicle_paintinfo *nextSpriteToDraw = _sprites_to_draw; - sint32 x = startX; - sint32 y = startY; + int32_t x = startX; + int32_t y = startY; // For each car in train - for (sint32 j = 0; j < ride->num_cars_per_train; j++) { + for (int32_t j = 0; j < ride->num_cars_per_train; j++) { rideVehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, j)]; x += rideVehicleEntry->spacing / 17432; y -= (rideVehicleEntry->spacing / 2) / 17432; // Get colour of vehicle - sint32 vehicleColourIndex = 0; + int32_t vehicleColourIndex = 0; switch (ride->colour_scheme_type & 3) { case VEHICLE_COLOUR_SCHEME_SAME: vehicleColourIndex = 0; @@ -3053,7 +3053,7 @@ static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dp } vehicle_colour vehicleColour = ride_get_vehicle_colour(ride, vehicleColourIndex); - sint32 spriteIndex = 16; + int32_t spriteIndex = 16; if (rideVehicleEntry->flags & VEHICLE_ENTRY_FLAG_11) spriteIndex /= 2; @@ -3091,13 +3091,13 @@ static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dp #pragma region Operating -static void set_operating_setting(sint32 rideNumber, uint8 setting, uint8 value) +static void set_operating_setting(int32_t rideNumber, uint8_t setting, uint8_t value) { gGameCommandErrorTitle = STR_CANT_CHANGE_OPERATING_MODE; game_do_command(0, (value << 8) | 1, 0, (setting << 8) | rideNumber, GAME_COMMAND_SET_RIDE_SETTING, 0, 0); } -static void window_ride_mode_tweak_set(rct_window *w, uint8 value) +static void window_ride_mode_tweak_set(rct_window *w, uint8_t value) { Ride *ride = get_ride(w->number); @@ -3130,16 +3130,16 @@ static void window_ride_mode_tweak_increase(rct_window *w) { Ride *ride = get_ride(w->number); - uint8 maxValue = RideProperties[ride->type].max_value; - uint8 minValue = gCheatsFastLiftHill ? 0 : RideProperties[ride->type].min_value; + uint8_t maxValue = RideProperties[ride->type].max_value; + uint8_t minValue = gCheatsFastLiftHill ? 0 : RideProperties[ride->type].min_value; if (gCheatsFastLiftHill) { maxValue = 255; } - uint8 increment = ride->mode == RIDE_MODE_BUMPERCAR ? 10 : 1; + uint8_t increment = ride->mode == RIDE_MODE_BUMPERCAR ? 10 : 1; - window_ride_mode_tweak_set(w, Math::Clamp(minValue, ride->operation_option + increment, maxValue)); + window_ride_mode_tweak_set(w, Math::Clamp(minValue, ride->operation_option + increment, maxValue)); } /** @@ -3150,15 +3150,15 @@ static void window_ride_mode_tweak_decrease(rct_window *w) { Ride *ride = get_ride(w->number); - uint8 maxValue = RideProperties[ride->type].max_value; - uint8 minValue = gCheatsFastLiftHill ? 0 : RideProperties[ride->type].min_value; + uint8_t maxValue = RideProperties[ride->type].max_value; + uint8_t minValue = gCheatsFastLiftHill ? 0 : RideProperties[ride->type].min_value; if (gCheatsFastLiftHill) { maxValue = 255; } - uint8 decrement = ride->mode == RIDE_MODE_BUMPERCAR ? 10 : 1; + uint8_t decrement = ride->mode == RIDE_MODE_BUMPERCAR ? 10 : 1; - window_ride_mode_tweak_set(w, Math::Clamp(minValue, ride->operation_option - decrement, maxValue)); + window_ride_mode_tweak_set(w, Math::Clamp(minValue, ride->operation_option - decrement, maxValue)); } /** @@ -3169,8 +3169,8 @@ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget) { rct_widget *dropdownWidget; Ride *ride; - const uint8 *availableModes, *mode; - sint32 i, numAvailableModes; + const uint8_t *availableModes, *mode; + int32_t i, numAvailableModes; dropdownWidget = widget - 1; ride = get_ride(w->number); @@ -3216,7 +3216,7 @@ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget) static void window_ride_load_dropdown(rct_window *w, rct_widget *widget) { rct_widget *dropdownWidget; - sint32 i; + int32_t i; dropdownWidget = widget - 1; Ride *ride = get_ride(w->number); @@ -3299,7 +3299,7 @@ static void window_ride_operating_resize(rct_window *w) static void window_ride_operating_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget) { Ride *ride = get_ride(w->number); - uint8 upper_bound, lower_bound; + uint8_t upper_bound, lower_bound; switch (widgetIndex) { case WIDX_MODE_TWEAK_INCREASE: @@ -3311,32 +3311,32 @@ static void window_ride_operating_mousedown(rct_window *w, rct_widgetindex widge case WIDX_LIFT_HILL_SPEED_INCREASE: upper_bound = gCheatsFastLiftHill ? 255 : RideLiftData[ride->type].maximum_speed; lower_bound = gCheatsFastLiftHill ? 0 : RideLiftData[ride->type].minimum_speed; - set_operating_setting(w->number, RIDE_SETTING_LIFT_HILL_SPEED, Math::Clamp(lower_bound, ride->lift_hill_speed + 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_LIFT_HILL_SPEED, Math::Clamp(lower_bound, ride->lift_hill_speed + 1, upper_bound)); break; case WIDX_LIFT_HILL_SPEED_DECREASE: upper_bound = gCheatsFastLiftHill ? 255 : RideLiftData[ride->type].maximum_speed; lower_bound = gCheatsFastLiftHill ? 0 : RideLiftData[ride->type].minimum_speed; - set_operating_setting(w->number, RIDE_SETTING_LIFT_HILL_SPEED, Math::Clamp(lower_bound, ride->lift_hill_speed - 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_LIFT_HILL_SPEED, Math::Clamp(lower_bound, ride->lift_hill_speed - 1, upper_bound)); break; case WIDX_MINIMUM_LENGTH_INCREASE: upper_bound = 250; lower_bound = 0; - set_operating_setting(w->number, RIDE_SETTING_MIN_WAITING_TIME, Math::Clamp(lower_bound, ride->min_waiting_time + 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_MIN_WAITING_TIME, Math::Clamp(lower_bound, ride->min_waiting_time + 1, upper_bound)); break; case WIDX_MINIMUM_LENGTH_DECREASE: upper_bound = 250; lower_bound = 0; - set_operating_setting(w->number, RIDE_SETTING_MIN_WAITING_TIME, Math::Clamp(lower_bound, ride->min_waiting_time - 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_MIN_WAITING_TIME, Math::Clamp(lower_bound, ride->min_waiting_time - 1, upper_bound)); break; case WIDX_MAXIMUM_LENGTH_INCREASE: upper_bound = 250; lower_bound = 0; - set_operating_setting(w->number, RIDE_SETTING_MAX_WAITING_TIME, Math::Clamp(lower_bound, ride->max_waiting_time + 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_MAX_WAITING_TIME, Math::Clamp(lower_bound, ride->max_waiting_time + 1, upper_bound)); break; case WIDX_MAXIMUM_LENGTH_DECREASE: upper_bound = 250; lower_bound = 0; - set_operating_setting(w->number, RIDE_SETTING_MAX_WAITING_TIME, Math::Clamp(lower_bound, ride->max_waiting_time - 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_MAX_WAITING_TIME, Math::Clamp(lower_bound, ride->max_waiting_time - 1, upper_bound)); break; case WIDX_MODE_DROPDOWN: window_ride_mode_dropdown(w, widget); @@ -3347,12 +3347,12 @@ static void window_ride_operating_mousedown(rct_window *w, rct_widgetindex widge case WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE: upper_bound = gCheatsFastLiftHill ? 255 : 20; lower_bound = 1; - set_operating_setting(w->number, RIDE_SETTING_NUM_CIRCUITS, Math::Clamp(lower_bound, ride->num_circuits + 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_NUM_CIRCUITS, Math::Clamp(lower_bound, ride->num_circuits + 1, upper_bound)); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE: upper_bound = gCheatsFastLiftHill ? 255 : 20; lower_bound = 1; - set_operating_setting(w->number, RIDE_SETTING_NUM_CIRCUITS, Math::Clamp(lower_bound, ride->num_circuits - 1, upper_bound)); + set_operating_setting(w->number, RIDE_SETTING_NUM_CIRCUITS, Math::Clamp(lower_bound, ride->num_circuits - 1, upper_bound)); break; } } @@ -3361,10 +3361,10 @@ static void window_ride_operating_mousedown(rct_window *w, rct_widgetindex widge * * rct2: 0x006B1165 */ -static void window_ride_operating_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_operating_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { Ride *ride; - const uint8 *availableModes; + const uint8_t *availableModes; if (dropdownIndex == -1) return; @@ -3424,7 +3424,7 @@ static void window_ride_operating_invalidate(rct_window *w) ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); // Widget setup w->pressed_widgets &= ~( @@ -3442,7 +3442,7 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED].type = WWT_SPINNER; window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED_INCREASE].type = WWT_BUTTON; window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED_DECREASE].type = WWT_BUTTON; - set_format_arg(20, uint16, ride->lift_hill_speed); + set_format_arg(20, uint16_t, ride->lift_hill_speed); } else { window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED_LABEL].type = WWT_EMPTY; window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED].type = WWT_EMPTY; @@ -3456,7 +3456,7 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS].type = WWT_SPINNER; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE].type = WWT_BUTTON; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE].type = WWT_BUTTON; - set_format_arg(22, uint16, ride->num_circuits); + set_format_arg(22, uint16_t, ride->num_circuits); } else { window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_LABEL].type = WWT_EMPTY; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS].type = WWT_EMPTY; @@ -3510,9 +3510,9 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_MAXIMUM_LENGTH_DECREASE].type = WWT_BUTTON; set_format_arg(10, rct_string_id, STR_FORMAT_SECONDS); - set_format_arg(12, uint16, ride->min_waiting_time); + set_format_arg(12, uint16_t, ride->min_waiting_time); set_format_arg(14, rct_string_id, STR_FORMAT_SECONDS); - set_format_arg(16, uint16, ride->max_waiting_time); + set_format_arg(16, uint16_t, ride->max_waiting_time); if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD) w->pressed_widgets |= (1 << WIDX_LOAD_CHECKBOX); @@ -3542,25 +3542,25 @@ static void window_ride_operating_invalidate(rct_window *w) w->pressed_widgets |= (1 << WIDX_MAXIMUM_LENGTH_CHECKBOX); // Mode specific functionality - set_format_arg(18, uint16, ride->operation_option); + set_format_arg(18, uint16_t, ride->operation_option); switch (ride->mode) { case RIDE_MODE_POWERED_LAUNCH_PASSTROUGH: case RIDE_MODE_POWERED_LAUNCH: case RIDE_MODE_UPWARD_LAUNCH: case RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED: - set_format_arg(18, uint16, (ride->launch_speed * 9) / 4); + set_format_arg(18, uint16_t, (ride->launch_speed * 9) / 4); format = STR_RIDE_MODE_SPEED_VALUE; caption = STR_LAUNCH_SPEED; tooltip = STR_LAUNCH_SPEED_TIP; break; case RIDE_MODE_STATION_TO_STATION: - set_format_arg(18, uint16, (ride->speed * 9) / 4); + set_format_arg(18, uint16_t, (ride->speed * 9) / 4); format = STR_RIDE_MODE_SPEED_VALUE; caption = STR_SPEED; tooltip = STR_SPEED_TIP; break; case RIDE_MODE_RACE: - set_format_arg(18, uint16, ride->num_laps); + set_format_arg(18, uint16_t, ride->num_laps); format = STR_NUMBER_OF_LAPS_VALUE; caption = STR_NUMBER_OF_LAPS; tooltip = STR_NUMBER_OF_LAPS_TIP; @@ -3593,9 +3593,9 @@ static void window_ride_operating_invalidate(rct_window *w) if (format != 0) { if (ride->type == RIDE_TYPE_TWIST) { - uint16 arg; - memcpy(&arg, gCommonFormatArgs + 18, sizeof(uint16)); - set_format_arg(18, uint16, arg * 3); + uint16_t arg; + memcpy(&arg, gCommonFormatArgs + 18, sizeof(uint16_t)); + set_format_arg(18, uint16_t, arg * 3); } window_ride_operating_widgets[WIDX_MODE_TWEAK_LABEL].type = WWT_LABEL; @@ -3624,7 +3624,7 @@ static void window_ride_operating_invalidate(rct_window *w) static void window_ride_operating_paint(rct_window *w, rct_drawpixelinfo *dpi) { Ride *ride; - uint16 blockSections; + uint16_t blockSections; window_draw_widgets(w, dpi); window_ride_draw_tab_images(dpi, w); @@ -3686,7 +3686,7 @@ static void window_ride_locate_mechanic(rct_window *w) * * rct2: 0x006B7D08 */ -static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 value, sint32 colour) +static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t value, int32_t colour) { gfx_fill_rect_inset(dpi, x, y, x + 149, y + 8, w->colours[1], INSET_RECT_F_30); if (colour & BAR_BLINK) { @@ -3755,12 +3755,12 @@ static void window_ride_maintenance_mousedown(rct_window *w, rct_widgetindex wid } rct_widget *dropdownWidget = widget; - sint32 j, num_items; + int32_t j, num_items; switch (widgetIndex) { case WIDX_INSPECTION_INTERVAL_DROPDOWN: dropdownWidget--; - for (sint32 i = 0; i < 7; i++) { + for (int32_t i = 0; i < 7; i++) { gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[i] = RideInspectionIntervalNames[i]; } @@ -3786,9 +3786,9 @@ static void window_ride_maintenance_mousedown(rct_window *w, rct_widgetindex wid } gDropdownItemsFormat[0] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[0] = STR_DEBUG_FIX_RIDE; - for (sint32 i = 0; i < 8; i++) { - assert(j < (sint32)Util::CountOf(rideEntry->ride_type)); - if (RideAvailableBreakdowns[rideEntry->ride_type[j]] & (uint8)(1 << i)) { + for (int32_t i = 0; i < 8; i++) { + assert(j < (int32_t)Util::CountOf(rideEntry->ride_type)); + if (RideAvailableBreakdowns[rideEntry->ride_type[j]] & (uint8_t)(1 << i)) { if (i == BREAKDOWN_BRAKES_FAILURE && (ride->mode == RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED)) { if (ride->num_vehicles != 1) continue; @@ -3812,10 +3812,10 @@ static void window_ride_maintenance_mousedown(rct_window *w, rct_widgetindex wid ); num_items = 1; - sint32 breakdownReason = ride->breakdown_reason_pending; + int32_t breakdownReason = ride->breakdown_reason_pending; if (breakdownReason != BREAKDOWN_NONE && (ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING)) { - for (sint32 i = 0; i < 8; i++) { - if (RideAvailableBreakdowns[rideEntry->ride_type[j]] & (uint8)(1 << i)) { + for (int32_t i = 0; i < 8; i++) { + if (RideAvailableBreakdowns[rideEntry->ride_type[j]] & (uint8_t)(1 << i)) { if (i == BREAKDOWN_BRAKES_FAILURE && (ride->mode == RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED)) { if (ride->num_vehicles != 1) continue; @@ -3844,7 +3844,7 @@ static void window_ride_maintenance_mousedown(rct_window *w, rct_widgetindex wid * * rct2: 0x006B1AD9 */ -static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -3865,8 +3865,8 @@ static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widg case BREAKDOWN_SAFETY_CUT_OUT: if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) break; - for (sint32 i = 0; i < ride->num_vehicles; ++i) { - uint16 spriteId = ride->vehicles[i]; + for (int32_t i = 0; i < ride->num_vehicles; ++i) { + uint16_t spriteId = ride->vehicles[i]; while (spriteId != SPRITE_INDEX_NULL) { vehicle = GET_VEHICLE(spriteId); vehicle->update_flags &= ~( @@ -3901,16 +3901,16 @@ static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widg context_show_error(STR_DEBUG_CANT_FORCE_BREAKDOWN, STR_DEBUG_RIDE_IS_CLOSED); } else { - sint32 j; + int32_t j; for (j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) { if (rideEntry->ride_type[j] != RIDE_TYPE_NULL) break; } - sint32 i; - sint32 num_items = 1; + int32_t i; + int32_t num_items = 1; for (i = 0; i < BREAKDOWN_COUNT; i++) { - assert(j < (sint32)Util::CountOf(rideEntry->ride_type)); - if (RideAvailableBreakdowns[rideEntry->ride_type[j]] & (uint8)(1 << i)) { + assert(j < (int32_t)Util::CountOf(rideEntry->ride_type)); + if (RideAvailableBreakdowns[rideEntry->ride_type[j]] & (uint8_t)(1 << i)) { if (i == BREAKDOWN_BRAKES_FAILURE && (ride->mode == RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED)) { if (ride->num_vehicles != 1) continue; @@ -3964,7 +3964,7 @@ static void window_ride_maintenance_invalidate(rct_window *w) Ride *ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); window_ride_maintenance_widgets[WIDX_INSPECTION_INTERVAL].text = RideInspectionIntervalNames[ride->inspection_interval]; @@ -4005,8 +4005,8 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) // Locate mechanic button image rct_widget *widget = &window_ride_maintenance_widgets[WIDX_LOCATE_MECHANIC]; - sint32 x = w->x + widget->left; - sint32 y = w->y + widget->top; + int32_t x = w->x + widget->left; + int32_t y = w->y + widget->top; gfx_draw_sprite(dpi, (gStaffMechanicColour << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | SPR_MECHANIC, x, y, 0); // Inspection label @@ -4020,18 +4020,18 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) x = w->x + widget->left + 4; y = w->y + widget->top + 4; - uint16 reliability = ride->reliability_percentage; + uint16_t reliability = ride->reliability_percentage; gfx_draw_string_left(dpi, STR_RELIABILITY_LABEL_1757, &reliability, COLOUR_BLACK, x, y); - window_ride_maintenance_draw_bar(w, dpi, x + 103, y, std::max(10, reliability), COLOUR_BRIGHT_GREEN); + window_ride_maintenance_draw_bar(w, dpi, x + 103, y, std::max(10, reliability), COLOUR_BRIGHT_GREEN); y += 11; - uint16 downTime = ride->downtime; + uint16_t downTime = ride->downtime; gfx_draw_string_left(dpi, STR_DOWN_TIME_LABEL_1889, &downTime, COLOUR_BLACK, x, y); window_ride_maintenance_draw_bar(w, dpi, x + 103, y, downTime, COLOUR_BRIGHT_RED); y += 26; // Last inspection - uint16 lastInspection = ride->last_inspection; + uint16_t lastInspection = ride->last_inspection; // Use singular form for 1 minute of time or less rct_string_id stringId; @@ -4059,7 +4059,7 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) // Mechanic status if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) { rct_peep *peep; - uint16 spriteIndex; + uint16_t spriteIndex; switch (ride->mechanic_status) { case RIDE_MECHANIC_STATUS_CALLING: @@ -4092,7 +4092,7 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) if (mechanicSprite->IsMechanic()) { set_format_arg(0, rct_string_id, mechanicSprite->name_string_idx); - set_format_arg(2, uint32, mechanicSprite->id); + set_format_arg(2, uint32_t, mechanicSprite->id); gfx_draw_string_left_wrapped(dpi, gCommonFormatArgs, x + 4, y, 280, stringId, COLOUR_BLACK); } } @@ -4104,7 +4104,7 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Colour -static constexpr const uint8 window_ride_entrance_style_list[] = { +static constexpr const uint8_t window_ride_entrance_style_list[] = { RIDE_ENTRANCE_STYLE_PLAIN, RIDE_ENTRANCE_STYLE_CANVAS_TENT, RIDE_ENTRANCE_STYLE_WOODEN, @@ -4120,14 +4120,14 @@ static constexpr const uint8 window_ride_entrance_style_list[] = { RIDE_ENTRANCE_STYLE_NONE }; -static uint32 window_ride_get_colour_button_image(sint32 colour) +static uint32_t window_ride_get_colour_button_image(int32_t colour) { return IMAGE_TYPE_TRANSPARENT | SPRITE_ID_PALETTE_COLOUR_1(colour) | SPR_PALETTE_BTN; } -static sint32 window_ride_has_track_colour(Ride *ride, sint32 trackColour) +static int32_t window_ride_has_track_colour(Ride *ride, int32_t trackColour) { - uint16 colourUse = RideEntranceDefinitions[ride->entrance_style].colour_use_flags; + uint16_t colourUse = RideEntranceDefinitions[ride->entrance_style].colour_use_flags; switch (trackColour) { case 0: return ((colourUse & 1) && !ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) || ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN); @@ -4137,13 +4137,13 @@ static sint32 window_ride_has_track_colour(Ride *ride, sint32 trackColour) } } -static void window_ride_set_track_colour_scheme(rct_window *w, sint32 x, sint32 y) +static void window_ride_set_track_colour_scheme(rct_window *w, int32_t x, int32_t y) { rct_tile_element *tileElement; - uint8 newColourScheme; - sint32 interactionType, z, direction; + uint8_t newColourScheme; + int32_t interactionType, z, direction; - newColourScheme = (uint8)w->ride_colour; + newColourScheme = (uint8_t)w->ride_colour; LocationXY16 mapCoord = {}; get_map_coordinates_from_pos(x, y, VIEWPORT_INTERACTION_MASK_RIDE, &mapCoord.x, &mapCoord.y, &interactionType, &tileElement, nullptr); @@ -4224,11 +4224,11 @@ static void window_ride_colour_resize(rct_window *w) static void window_ride_colour_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget) { Ride *ride; - uint16 colourSchemeIndex; + uint16_t colourSchemeIndex; vehicle_colour vehicleColour; rct_widget *dropdownWidget; rct_ride_entry *rideEntry; - sint32 i, numItems, checkedIndex; + int32_t i, numItems, checkedIndex; rct_string_id stringId; ride = get_ride(w->number); @@ -4286,7 +4286,7 @@ static void window_ride_colour_mousedown(rct_window *w, rct_widgetindex widgetIn break; case WIDX_ENTRANCE_STYLE_DROPDOWN: checkedIndex = -1; - for (i = 0; i < (sint32)Util::CountOf(window_ride_entrance_style_list); i++) { + for (i = 0; i < (int32_t)Util::CountOf(window_ride_entrance_style_list); i++) { gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[i] = RideEntranceDefinitions[window_ride_entrance_style_list[i]].string_id; @@ -4337,9 +4337,9 @@ static void window_ride_colour_mousedown(rct_window *w, rct_widgetindex widgetIn numItems = ride->num_cars_per_train; stringId = (ride->colour_scheme_type & 3) == VEHICLE_COLOUR_SCHEME_PER_TRAIN ? STR_RIDE_COLOUR_TRAIN_OPTION : STR_RIDE_COLOUR_VEHICLE_OPTION; - for (i = 0; i < std::min(numItems, (sint32)DROPDOWN_ITEMS_MAX_SIZE); i++) { + for (i = 0; i < std::min(numItems, (int32_t)DROPDOWN_ITEMS_MAX_SIZE); i++) { gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; - gDropdownItemsArgs[i] = ((sint64)(i + 1) << 32) | ((RideComponentNames[RideNameConvention[ride->type].vehicle].capitalised) << 16) | stringId; + gDropdownItemsArgs[i] = ((int64_t)(i + 1) << 32) | ((RideComponentNames[RideNameConvention[ride->type].vehicle].capitalised) << 16) | stringId; } window_dropdown_show_text_custom_width( @@ -4374,14 +4374,14 @@ static void window_ride_colour_mousedown(rct_window *w, rct_widgetindex widgetIn * * rct2: 0x006B0331 */ -static void window_ride_colour_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_colour_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; switch (widgetIndex) { case WIDX_TRACK_COLOUR_SCHEME_DROPDOWN: - w->ride_colour = (uint16)dropdownIndex; + w->ride_colour = (uint16_t)dropdownIndex; window_invalidate(w); break; case WIDX_TRACK_MAIN_COLOUR: @@ -4435,7 +4435,7 @@ static void window_ride_colour_update(rct_window *w) * * rct2: 0x006B04EC */ -static void window_ride_colour_tooldown(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_ride_colour_tooldown(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_PAINT_INDIVIDUAL_AREA) window_ride_set_track_colour_scheme(w, x, y); @@ -4445,7 +4445,7 @@ static void window_ride_colour_tooldown(rct_window *w, rct_widgetindex widgetInd * * rct2: 0x006B04F3 */ -static void window_ride_colour_tooldrag(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_ride_colour_tooldrag(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_PAINT_INDIVIDUAL_AREA) window_ride_set_track_colour_scheme(w, x, y); @@ -4475,10 +4475,10 @@ static void window_ride_colour_invalidate(rct_window *w) rideEntry = get_ride_entry_by_ride(ride); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); // Track colours - sint32 colourScheme = w->ride_colour; + int32_t colourScheme = w->ride_colour; trackColour = ride_get_track_colour(ride, colourScheme); // Maze style @@ -4547,7 +4547,7 @@ static void window_ride_colour_invalidate(rct_window *w) // Vehicle colours if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_NO_VEHICLES) && ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS)) { - sint32 vehicleColourSchemeType = ride->colour_scheme_type & 3; + int32_t vehicleColourSchemeType = ride->colour_scheme_type & 3; if (vehicleColourSchemeType == 0) w->vehicleIndex = 0; @@ -4560,8 +4560,8 @@ static void window_ride_colour_invalidate(rct_window *w) bool allowChangingAdditionalColour1 = false; bool allowChangingAdditionalColour2 = false; - for (sint32 i = 0; i < ride->num_cars_per_train; i++) { - uint8 vehicleTypeIndex = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, i); + for (int32_t i = 0; i < ride->num_cars_per_train; i++) { + uint8_t vehicleTypeIndex = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, i); if (rideEntry->vehicles[vehicleTypeIndex].flags & VEHICLE_ENTRY_FLAG_ENABLE_ADDITIONAL_COLOUR_1) { @@ -4599,7 +4599,7 @@ static void window_ride_colour_invalidate(rct_window *w) set_format_arg( 6, rct_string_id, VehicleColourSchemeNames[vehicleColourSchemeType]); set_format_arg( 8, rct_string_id, RideComponentNames[RideNameConvention[ride->type].vehicle].singular); set_format_arg(10, rct_string_id, RideComponentNames[RideNameConvention[ride->type].vehicle].capitalised); - set_format_arg(12, uint16, w->vehicleIndex + 1); + set_format_arg(12, uint16_t, w->vehicleIndex + 1); // Vehicle index if (vehicleColourSchemeType != 0) { window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_INDEX].type = WWT_DROPDOWN; @@ -4653,15 +4653,15 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) // if (rideEntry->shop_item == SHOP_ITEM_NONE) { - sint32 x = w->x + widget->left; - sint32 y = w->y + widget->top; + int32_t x = w->x + widget->left; + int32_t y = w->y + widget->top; // Track if (ride->type == RIDE_TYPE_MAZE) { - sint32 spriteIndex = MazeOptions[trackColour.supports].sprite; + int32_t spriteIndex = MazeOptions[trackColour.supports].sprite; gfx_draw_sprite(dpi, spriteIndex, x, y, 0); } else { - sint32 spriteIndex = TrackColourPreviews[ride->type].track; + int32_t spriteIndex = TrackColourPreviews[ride->type].track; if (spriteIndex != 0) { spriteIndex |= SPRITE_ID_PALETTE_COLOUR_2(trackColour.main, trackColour.additional); gfx_draw_sprite(dpi, spriteIndex, x, y, 0); @@ -4675,11 +4675,11 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) } } } else { - sint32 x = w->x + (widget->left + widget->right) / 2 - 8; - sint32 y = w->y + (widget->bottom + widget->top) / 2 - 6; + int32_t x = w->x + (widget->left + widget->right) / 2 - 8; + int32_t y = w->y + (widget->bottom + widget->top) / 2 - 6; - uint8 shopItem = rideEntry->shop_item_secondary == SHOP_ITEM_NONE ? rideEntry->shop_item : rideEntry->shop_item_secondary; - sint32 spriteIndex = ShopItemImage[shopItem]; + uint8_t shopItem = rideEntry->shop_item_secondary == SHOP_ITEM_NONE ? rideEntry->shop_item : rideEntry->shop_item_secondary; + int32_t spriteIndex = ShopItemImage[shopItem]; spriteIndex |= SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour_main[0]); gfx_draw_sprite(dpi, spriteIndex, x, y, 0); @@ -4702,12 +4702,12 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) if (ride->entrance_style != RIDE_ENTRANCE_STYLE_NONE) { const rct_ride_entrance_definition *entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; - sint32 terniaryColour = 0; + int32_t terniaryColour = 0; if (entranceStyle->base_image_id & IMAGE_TYPE_TRANSPARENT) { terniaryColour = IMAGE_TYPE_TRANSPARENT | (GlassPaletteIds[trackColour.main] << 19); } - sint32 spriteIndex = SPRITE_ID_PALETTE_COLOUR_2(trackColour.main, trackColour.additional); + int32_t spriteIndex = SPRITE_ID_PALETTE_COLOUR_2(trackColour.main, trackColour.additional); spriteIndex += RideEntranceDefinitions[ride->entrance_style].sprite_index; // Back @@ -4728,12 +4728,12 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006B0192 */ -static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { Ride *ride; rct_ride_entry *rideEntry; rct_widget *vehiclePreviewWidget; - sint32 trainCarIndex, x, y, spriteIndex; + int32_t trainCarIndex, x, y, spriteIndex; vehicle_colour vehicleColour; ride = get_ride(w->number); @@ -4770,7 +4770,7 @@ static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi #pragma region Music -static constexpr const uint8 MusicStyleOrder[] = { +static constexpr const uint8_t MusicStyleOrder[] = { MUSIC_STYLE_GENTLE, MUSIC_STYLE_SUMMER, MUSIC_STYLE_WATER, @@ -4802,7 +4802,7 @@ static constexpr const uint8 MusicStyleOrder[] = { MUSIC_STYLE_ORGAN }; -static uint8 window_ride_current_music_style_order[42]; +static uint8_t window_ride_current_music_style_order[42]; /** * @@ -4812,7 +4812,7 @@ static void window_ride_toggle_music(rct_window *w) { Ride *ride = get_ride(w->number); - sint32 activateMusic = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) ? 0 : 1; + int32_t activateMusic = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) ? 0 : 1; gGameCommandErrorTitle = STR_CANT_CHANGE_OPERATING_MODE; game_do_command(0, (activateMusic << 8) | 1, 0, (6 << 8) | w->number, GAME_COMMAND_SET_RIDE_SETTING, 0, 0); @@ -4863,7 +4863,7 @@ static void window_ride_music_resize(rct_window *w) static void window_ride_music_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget) { rct_widget *dropdownWidget; - sint32 i; + int32_t i; if (widgetIndex != WIDX_MUSIC_DROPDOWN) return; @@ -4871,7 +4871,7 @@ static void window_ride_music_mousedown(rct_window *w, rct_widgetindex widgetInd dropdownWidget = widget - 1; Ride *ride = get_ride(w->number); - sint32 numItems = 0; + int32_t numItems = 0; if (ride->type == RIDE_TYPE_MERRY_GO_ROUND) { window_ride_current_music_style_order[numItems++] = MUSIC_STYLE_FAIRGROUND_ORGAN; } else { @@ -4911,9 +4911,9 @@ static void window_ride_music_mousedown(rct_window *w, rct_widgetindex widgetInd * * rct2: 0x006B1F03 */ -static void window_ride_music_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_music_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { - uint8 musicStyle; + uint8_t musicStyle; if (widgetIndex != WIDX_MUSIC_DROPDOWN || dropdownIndex == -1) return; @@ -4941,7 +4941,7 @@ static void window_ride_music_update(rct_window *w) static void window_ride_music_invalidate(rct_window *w) { rct_widget *widgets; - sint32 isMusicActivated; + int32_t isMusicActivated; widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) { @@ -4953,7 +4953,7 @@ static void window_ride_music_invalidate(rct_window *w) Ride *ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); // Set selected music window_ride_music_widgets[WIDX_MUSIC].text = MusicStyleNames[ride->music]; @@ -4990,7 +4990,7 @@ static void window_ride_music_paint(rct_window *w, rct_drawpixelinfo *dpi) static rct_string_id get_rating_name(ride_rating rating) { - sint32 index = Math::Clamp(0, rating >> 8, (sint32)Util::CountOf(RatingNames) - 1); + int32_t index = Math::Clamp(0, rating >> 8, (int32_t)Util::CountOf(RatingNames) - 1); return RatingNames[index]; } @@ -5025,7 +5025,7 @@ static void setup_scenery_selection(rct_window* w) while (tool_set(w, WIDX_BACKGROUND, TOOL_CROSSHAIR)); - gTrackDesignSaveRideIndex = (uint8)w->number; + gTrackDesignSaveRideIndex = (uint8_t)w->number; track_design_save_init(); gGamePaused |= GAME_PAUSED_SAVING_TRACK; @@ -5077,7 +5077,7 @@ void window_ride_measurements_design_cancel() */ static void window_ride_measurements_design_save(rct_window *w) { - track_design_save((uint8)w->number); + track_design_save((uint8_t)w->number); } /** @@ -5174,7 +5174,7 @@ static void window_ride_measurements_mousedown(rct_window *w, rct_widgetindex wi * * rct2: 0x006AD4B2 */ -static void window_ride_measurements_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_measurements_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_SAVE_TRACK_DESIGN) return; @@ -5183,7 +5183,7 @@ static void window_ride_measurements_dropdown(rct_window *w, rct_widgetindex wid dropdownIndex = gDropdownHighlightedIndex; if (dropdownIndex == 0) - track_design_save((uint8)w->number); + track_design_save((uint8_t)w->number); else setup_scenery_selection(w); } @@ -5203,11 +5203,11 @@ static void window_ride_measurements_update(rct_window *w) * * rct2: 0x006D2AE7 */ -static void window_ride_measurements_tooldown(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_ride_measurements_tooldown(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { rct_tile_element *tileElement; - sint16 mapX, mapY; - sint32 interactionType; + int16_t mapX, mapY; + int32_t interactionType; _lastSceneryX = x; _lastSceneryY = y; @@ -5225,7 +5225,7 @@ static void window_ride_measurements_tooldown(rct_window *w, rct_widgetindex wid } } -static void window_ride_measurements_tooldrag(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_ride_measurements_tooldrag(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (x == _lastSceneryX && y == _lastSceneryY) return; @@ -5233,8 +5233,8 @@ static void window_ride_measurements_tooldrag(rct_window *w, rct_widgetindex wid _lastSceneryY = y; rct_tile_element *tileElement; - sint16 mapX, mapY; - sint32 interactionType; + int16_t mapX, mapY; + int32_t interactionType; get_map_coordinates_from_pos(x, y, 0xFCCF, &mapX, &mapY, &interactionType, &tileElement, nullptr); switch (interactionType) { @@ -5274,7 +5274,7 @@ static void window_ride_measurements_invalidate(rct_window *w) Ride *ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); window_ride_measurements_widgets[WIDX_SAVE_TRACK_DESIGN].tooltip = STR_SAVE_TRACK_DESIGN_NOT_POSSIBLE; window_ride_measurements_widgets[WIDX_SAVE_TRACK_DESIGN].type = WWT_EMPTY; @@ -5309,8 +5309,8 @@ static void window_ride_measurements_invalidate(rct_window *w) */ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint16 holes, maxSpeed, averageSpeed, drops, highestDropHeight, inversions, time; - sint32 maxPositiveVerticalGs, maxNegativeVerticalGs, maxLateralGs, totalAirTime, length; + int16_t holes, maxSpeed, averageSpeed, drops, highestDropHeight, inversions, time; + int32_t maxPositiveVerticalGs, maxNegativeVerticalGs, maxLateralGs, totalAirTime, length; window_draw_widgets(w, dpi); window_ride_draw_tab_images(dpi, w); @@ -5318,8 +5318,8 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi if (window_ride_measurements_widgets[WIDX_SAVE_DESIGN].type == WWT_BUTTON) { rct_widget *widget = &window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND]; - sint32 x = w->x + (widget->right - widget->left) / 2; - sint32 y = w->y + widget->top + 40; + int32_t x = w->x + (widget->right - widget->left) / 2; + int32_t y = w->y + widget->top + 40; gfx_draw_string_centred_wrapped(dpi, nullptr, x, y, w->width - 8, STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT, COLOUR_BLACK); x = w->x + 4; @@ -5327,13 +5327,13 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi gfx_fill_rect_inset(dpi, x, y, w->x + 312, y + 1, w->colours[1], INSET_RECT_FLAG_BORDER_INSET); } else { Ride *ride = get_ride(w->number); - sint32 x = w->x + window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND].left + 4; - sint32 y = w->y + window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND].top + 4; + int32_t x = w->x + window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND].left + 4; + int32_t y = w->y + window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND].top + 4; if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) { // Excitement rct_string_id ratingName = get_rating_name(ride->excitement); - set_format_arg(0, uint32, ride->excitement); + set_format_arg(0, uint32_t, ride->excitement); set_format_arg(4, rct_string_id, ratingName); rct_string_id stringId = ride->excitement == RIDE_RATING_UNDEFINED ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING; gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, x, y); @@ -5341,7 +5341,7 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi // Intensity ratingName = get_rating_name(ride->intensity); - set_format_arg(0, uint32, ride->intensity); + set_format_arg(0, uint32_t, ride->intensity); set_format_arg(4, rct_string_id, ratingName); stringId = STR_INTENSITY_RATING; @@ -5355,7 +5355,7 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi // Nausea ratingName = get_rating_name(ride->nausea); - set_format_arg(0, uint32, ride->nausea); + set_format_arg(0, uint32_t, ride->nausea); set_format_arg(4, rct_string_id, ratingName); stringId = ride->excitement == RIDE_RATING_UNDEFINED ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING; gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, x, y); @@ -5382,56 +5382,56 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi y += LIST_ROW_HEIGHT; // Ride time - sint32 numTimes = 0; - for (sint32 i = 0; i < ride->num_stations; i++) { + int32_t numTimes = 0; + for (int32_t i = 0; i < ride->num_stations; i++) { time = ride->time[numTimes]; if (time != 0) { - set_format_arg(0 + (numTimes * 4), uint16, STR_RIDE_TIME_ENTRY_WITH_SEPARATOR); - set_format_arg(2 + (numTimes * 4), uint16, time); + set_format_arg(0 + (numTimes * 4), uint16_t, STR_RIDE_TIME_ENTRY_WITH_SEPARATOR); + set_format_arg(2 + (numTimes * 4), uint16_t, time); numTimes++; } } if (numTimes == 0) { set_format_arg(0, rct_string_id, STR_RIDE_TIME_ENTRY); - set_format_arg(2, uint16, 0); + set_format_arg(2, uint16_t, 0); numTimes++; } else { //sadly, STR_RIDE_TIME_ENTRY_WITH_SEPARATOR are defined with the separator AFTER an entry //therefore we set the last entry to use the no-separator format now, post-format - set_format_arg(0 + ((numTimes - 1) * 4), uint16, STR_RIDE_TIME_ENTRY); + set_format_arg(0 + ((numTimes - 1) * 4), uint16_t, STR_RIDE_TIME_ENTRY); } - set_format_arg(0 + (numTimes * 4), uint16, 0); - set_format_arg(2 + (numTimes * 4), uint16, 0); - set_format_arg(4 + (numTimes * 4), uint16, 0); - set_format_arg(6 + (numTimes * 4), uint16, 0); + set_format_arg(0 + (numTimes * 4), uint16_t, 0); + set_format_arg(2 + (numTimes * 4), uint16_t, 0); + set_format_arg(4 + (numTimes * 4), uint16_t, 0); + set_format_arg(6 + (numTimes * 4), uint16_t, 0); gfx_draw_string_left_clipped(dpi, STR_RIDE_TIME, gCommonFormatArgs, COLOUR_BLACK, x, y, 308); y += LIST_ROW_HEIGHT; } // Ride length - sint32 numLengths = 0; - for (sint32 i = 0; i < ride->num_stations; i++) { + int32_t numLengths = 0; + for (int32_t i = 0; i < ride->num_stations; i++) { length = ride->length[numLengths]; if (length != 0) { length >>= 16; - set_format_arg(0 + (numLengths * 4), uint16, STR_RIDE_LENGTH_ENTRY_WITH_SEPARATOR); - set_format_arg(2 + (numLengths * 4), uint16, (length & 0xFFFF)); + set_format_arg(0 + (numLengths * 4), uint16_t, STR_RIDE_LENGTH_ENTRY_WITH_SEPARATOR); + set_format_arg(2 + (numLengths * 4), uint16_t, (length & 0xFFFF)); numLengths++; } } if (numLengths == 0) { set_format_arg(0, rct_string_id, STR_RIDE_LENGTH_ENTRY); - set_format_arg(2, uint16, 0); + set_format_arg(2, uint16_t, 0); numLengths++; } else { //sadly, STR_RIDE_LENGTH_ENTRY_WITH_SEPARATOR are defined with the separator AFTER an entry //therefore we set the last entry to use the no-separator format now, post-format set_format_arg(0 + ((numLengths - 1) * 4), rct_string_id, STR_RIDE_LENGTH_ENTRY); } - set_format_arg(0 + (numLengths * 4), uint16, 0); - set_format_arg(2 + (numLengths * 4), uint16, 0); - set_format_arg(4 + (numLengths * 4), uint16, 0); - set_format_arg(6 + (numLengths * 4), uint16, 0); + set_format_arg(0 + (numLengths * 4), uint16_t, 0); + set_format_arg(2 + (numLengths * 4), uint16_t, 0); + set_format_arg(4 + (numLengths * 4), uint16_t, 0); + set_format_arg(6 + (numLengths * 4), uint16_t, 0); gfx_draw_string_left_clipped(dpi, STR_RIDE_LENGTH, gCommonFormatArgs, COLOUR_BLACK, x, y, 308); y += LIST_ROW_HEIGHT; @@ -5505,7 +5505,7 @@ enum { * * rct2: 0x006AE8A6 */ -static void window_ride_set_graph(rct_window *w, sint32 type) +static void window_ride_set_graph(rct_window *w, int32_t type) { if ((w->list_information_type & 0xFF) == type) { w->list_information_type ^= 0x8000; @@ -5580,7 +5580,7 @@ static void window_ride_graphs_update(rct_window *w) { rct_widget *widget; rct_ride_measurement *measurement; - sint32 x; + int32_t x; w->frame_no++; window_event_invalidate_call(w); @@ -5605,7 +5605,7 @@ static void window_ride_graphs_update(rct_window *w) * * rct2: 0x006AEA75 */ -static void window_ride_graphs_scrollgetheight(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_ride_graphs_scrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { rct_ride_measurement *measurement; @@ -5617,14 +5617,14 @@ static void window_ride_graphs_scrollgetheight(rct_window *w, sint32 scrollIndex // Get measurement size measurement = ride_get_measurement(w->number, nullptr); if (measurement != nullptr) - *width = std::max(*width, measurement->num_items); + *width = std::max(*width, measurement->num_items); } /** * * rct2: 0x006AE953 */ -static void window_ride_graphs_15(rct_window *w, sint32 scrollIndex, sint32 scrollAreaType) +static void window_ride_graphs_15(rct_window *w, int32_t scrollIndex, int32_t scrollAreaType) { w->list_information_type |= 0x8000; } @@ -5640,7 +5640,7 @@ static void window_ride_graphs_tooltip(rct_window* w, rct_widgetindex widgetInde rct_string_id message; rct_ride_measurement *measurement = ride_get_measurement(w->number, &message); if (measurement != nullptr && (measurement->flags & RIDE_MEASUREMENT_FLAG_RUNNING)) { - set_format_arg(4, uint16, measurement->vehicle_index + 1); + set_format_arg(4, uint16_t, measurement->vehicle_index + 1); Ride *ride = get_ride(w->number); set_format_arg(2, rct_string_id, RideComponentNames[RideNameConvention[ride->type].vehicle].count); } else { @@ -5659,7 +5659,7 @@ static void window_ride_graphs_invalidate(rct_window *w) { rct_widget *widgets; Ride *ride; - sint32 x, y; + int32_t x, y; widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) { @@ -5672,7 +5672,7 @@ static void window_ride_graphs_invalidate(rct_window *w) ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); // Set pressed graph button type w->pressed_widgets &= ~(1 << WIDX_GRAPH_VELOCITY); @@ -5725,7 +5725,7 @@ static void window_ride_graphs_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006AE4C7 */ -static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { gfx_clear(dpi, ColourMapA[COLOUR_SATURATED_GREEN].darker); @@ -5734,19 +5734,19 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi rct_ride_measurement *measurement = ride_get_measurement(w->number, &stringId); if (measurement == nullptr) { // No measurement message - sint32 x = (widget->right - widget->left) / 2; - sint32 y = (widget->bottom - widget->top) / 2 - 5; - sint32 width = widget->right - widget->left - 2; + int32_t x = (widget->right - widget->left) / 2; + int32_t y = (widget->bottom - widget->top) / 2 - 5; + int32_t width = widget->right - widget->left - 2; gfx_draw_string_centred_wrapped(dpi, gCommonFormatArgs, x, y, width, stringId, COLOUR_BLACK); return; } // Vertical grid lines - const uint8 lightColour = ColourMapA[COLOUR_SATURATED_GREEN].mid_light; - const uint8 darkColour = ColourMapA[COLOUR_SATURATED_GREEN].mid_dark; + const uint8_t lightColour = ColourMapA[COLOUR_SATURATED_GREEN].mid_light; + const uint8_t darkColour = ColourMapA[COLOUR_SATURATED_GREEN].mid_dark; - sint32 time = 0; - for (sint32 x = 0; x < dpi->x + dpi->width; x += 80) { + int32_t time = 0; + for (int32_t x = 0; x < dpi->x + dpi->width; x += 80) { if (x + 80 >= dpi->x) { gfx_fill_rect(dpi, x + 0, dpi->y, x + 0, dpi->y + dpi->height - 1, lightColour); gfx_fill_rect(dpi, x + 16, dpi->y, x + 16, dpi->y + dpi->height - 1, darkColour); @@ -5758,23 +5758,23 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi } // Horizontal grid lines - sint32 listType = w->list_information_type & 0xFF; - sint16 yUnit = window_graphs_y_axi[listType].unit; + int32_t listType = w->list_information_type & 0xFF; + int16_t yUnit = window_graphs_y_axi[listType].unit; rct_string_id stringID = window_graphs_y_axi[listType].label; - sint16 yUnitInterval = window_graphs_y_axi[listType].unit_interval; - sint16 yInterval = window_graphs_y_axi[listType].interval; + int16_t yUnitInterval = window_graphs_y_axi[listType].unit_interval; + int16_t yInterval = window_graphs_y_axi[listType].interval; // Scale modifier if (listType == GRAPH_ALTITUDE) { yUnit -= gMapBaseZ * 3; } - for (sint32 y = widget->bottom - widget->top - 13; y >= 8; y -= yInterval, yUnit += yUnitInterval) { + for (int32_t y = widget->bottom - widget->top - 13; y >= 8; y -= yInterval, yUnit += yUnitInterval) { // Minor / major line - sint32 colour = yUnit == 0 ? lightColour : darkColour; + int32_t colour = yUnit == 0 ? lightColour : darkColour; gfx_fill_rect(dpi, dpi->x, y, dpi->x + dpi->width - 1, y, colour); - sint16 scaled_yUnit = yUnit; + int16_t scaled_yUnit = yUnit; // Scale modifier if (listType == GRAPH_ALTITUDE) scaled_yUnit /= 2; @@ -5784,16 +5784,16 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi // Time marks time = 0; - for (sint32 x = 0; x < dpi->x + dpi->width; x += 80) { + for (int32_t x = 0; x < dpi->x + dpi->width; x += 80) { if (x + 80 >= dpi->x) gfx_draw_string_left(dpi, STR_RIDE_STATS_TIME, &time, COLOUR_BLACK, x + 2, 1); time += 5; } // Plot - sint32 x = dpi->x; - sint32 top, bottom; - for (sint32 width = 0; width < dpi->width; width++, x++) { + int32_t x = dpi->x; + int32_t top, bottom; + for (int32_t width = 0; width < dpi->width; width++, x++) { if (x < 0 || x >= measurement->num_items - 1) continue; @@ -5822,7 +5822,7 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi top = widget->bottom - widget->top - top - 13; bottom = widget->bottom - widget->top - bottom - 13; if (top > bottom) { - sint32 tmp = top; + int32_t tmp = top; top = bottom; bottom = tmp; } @@ -5836,9 +5836,9 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi static utf8 _moneyInputText[MONEY_STRING_MAXLENGTH]; -static void update_same_price_throughout_flags(uint32 shop_item) +static void update_same_price_throughout_flags(uint32_t shop_item) { - uint32 newFlags; + uint32_t newFlags; if (shop_item_is_photo(shop_item)) { newFlags = gSamePriceThroughoutParkA; @@ -5873,7 +5873,7 @@ static void window_ride_income_toggle_primary_price(rct_window *w) { Ride * ride; rct_ride_entry * rideEntry; - uint32 shop_item; + uint32_t shop_item; money16 price; ride = get_ride(w->number); @@ -5902,7 +5902,7 @@ static void window_ride_income_toggle_secondary_price(rct_window *w) { Ride * ride; rct_ride_entry * rideEntry; - uint32 shop_item; + uint32_t shop_item; money16 price; ride = get_ride(w->number); @@ -6139,7 +6139,7 @@ static void window_ride_income_invalidate(rct_window *w) { rct_widget *widgets; rct_ride_entry *rideEntry; - sint32 primaryItem, secondaryItem; + int32_t primaryItem, secondaryItem; widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) { @@ -6151,7 +6151,7 @@ static void window_ride_income_invalidate(rct_window *w) Ride *ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); rideEntry = get_ride_entry_by_ride(ride); @@ -6239,7 +6239,7 @@ static void window_ride_income_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_ride_entry *rideEntry; rct_string_id stringId; money32 profit, costPerHour; - sint32 x, y, primaryItem, secondaryItem; + int32_t x, y, primaryItem, secondaryItem; window_draw_widgets(w, dpi); window_ride_draw_tab_images(dpi, w); @@ -6414,7 +6414,7 @@ static void window_ride_customer_invalidate(rct_window *w) Ride *ride = get_ride(w->number); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); window_ride_customer_widgets[WIDX_SHOW_GUESTS_THOUGHTS].type = WWT_FLATBTN; if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) { @@ -6436,10 +6436,10 @@ static void window_ride_customer_invalidate(rct_window *w) static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi) { Ride *ride; - sint32 x, y; - uint8 shopItem; - sint16 popularity, satisfaction, queueTime, age; - sint32 customersPerHour; + int32_t x, y; + uint8_t shopItem; + int16_t popularity, satisfaction, queueTime, age; + int32_t customersPerHour; rct_string_id stringId; window_draw_widgets(w, dpi); @@ -6451,7 +6451,7 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi) // Customers currently on ride if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE) { - sint16 customersOnRide = ride->num_riders; + int16_t customersOnRide = ride->num_riders; gfx_draw_string_left(dpi, STR_CUSTOMERS_ON_RIDE, &customersOnRide, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } @@ -6495,7 +6495,7 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi) shopItem = get_ride_entry_by_ride(ride)->shop_item; if (shopItem != SHOP_ITEM_NONE) { set_format_arg(0, rct_string_id, ShopItemStringIds[shopItem].plural); - set_format_arg(2, uint32, ride->no_primary_items_sold); + set_format_arg(2, uint32_t, ride->no_primary_items_sold); gfx_draw_string_left(dpi, STR_ITEMS_SOLD, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } @@ -6506,7 +6506,7 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi) get_ride_entry_by_ride(ride)->shop_item_secondary; if (shopItem != SHOP_ITEM_NONE) { set_format_arg(0, rct_string_id, ShopItemStringIds[shopItem].plural); - set_format_arg(2, uint32, ride->no_secondary_items_sold); + set_format_arg(2, uint32_t, ride->no_secondary_items_sold); gfx_draw_string_left(dpi, STR_ITEMS_SOLD, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 0b74eb76ba..e4bb7409d8 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -132,10 +132,10 @@ static void window_ride_construction_close(rct_window *w); static void window_ride_construction_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_construction_resize(rct_window *w); static void window_ride_construction_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget *widget); -static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_construction_update(rct_window *w); -static void window_ride_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_ride_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_ride_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_ride_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_ride_construction_invalidate(rct_window *w); static void window_ride_construction_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -439,19 +439,19 @@ static constexpr const rct_string_id RideConfigurationStringIds[] = { #pragma endregion static bool _trackPlaceCtrlState; -static sint32 _trackPlaceCtrlZ; +static int32_t _trackPlaceCtrlZ; static bool _trackPlaceShiftState; -static sint32 _trackPlaceShiftStartScreenX; -static sint32 _trackPlaceShiftStartScreenY; -static sint32 _trackPlaceShiftZ; -static sint32 _trackPlaceZ; +static int32_t _trackPlaceShiftStartScreenX; +static int32_t _trackPlaceShiftStartScreenY; +static int32_t _trackPlaceShiftZ; +static int32_t _trackPlaceZ; static money32 _trackPlaceCost; static bool _autoOpeningShop; static bool _autoRotatingShop; -static uint8 _currentlyShowingBrakeOrBoosterSpeed; +static uint8_t _currentlyShowingBrakeOrBoosterSpeed; static bool _boosterTrackSelected; -static uint32 _currentDisabledSpecialTrackPieces; +static uint32_t _currentDisabledSpecialTrackPieces; static void window_ride_construction_construct(rct_window *w); static void window_ride_construction_mouseup_demolish(rct_window* w); @@ -461,25 +461,25 @@ static void window_ride_construction_exit_click(rct_window *w); static void window_ride_construction_draw_track_piece( rct_window *w, rct_drawpixelinfo *dpi, - sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 unknown, - sint32 width, sint32 height + int32_t rideIndex, int32_t trackType, int32_t trackDirection, int32_t unknown, + int32_t width, int32_t height ); static void sub_6CBCE2( rct_drawpixelinfo * dpi, - sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edx, - sint32 originX, sint32 originY, sint32 originZ + int32_t rideIndex, int32_t trackType, int32_t trackDirection, int32_t edx, + int32_t originX, int32_t originY, int32_t originZ ); static void window_ride_construction_update_map_selection(); static void window_ride_construction_update_possible_ride_configurations(); static void window_ride_construction_update_widgets(rct_window *w); -static void window_ride_construction_select_map_tiles(Ride *ride, sint32 trackType, sint32 trackDirection, sint32 x, sint32 y); +static void window_ride_construction_select_map_tiles(Ride *ride, int32_t trackType, int32_t trackDirection, int32_t x, int32_t y); static void window_ride_construction_show_special_track_dropdown(rct_window *w, rct_widget *widget); -static void ride_selected_track_set_seat_rotation(sint32 seatRotation); -static void loc_6C7502(sint32 al); -static void ride_construction_set_brakes_speed(sint32 brakesSpeed); -static void ride_construction_tooldown_entrance_exit(sint32 screenX, sint32 screenY); +static void ride_selected_track_set_seat_rotation(int32_t seatRotation); +static void loc_6C7502(int32_t al); +static void ride_construction_set_brakes_speed(int32_t brakesSpeed); +static void ride_construction_tooldown_entrance_exit(int32_t screenX, int32_t screenY); -static uint8 _currentPossibleRideConfigurations[32]; +static uint8_t _currentPossibleRideConfigurations[32]; static constexpr const rct_string_id RideConstructionSeatAngleRotationStrings[] = { STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_180, @@ -500,12 +500,12 @@ static constexpr const rct_string_id RideConstructionSeatAngleRotationStrings[] STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_495, }; -static bool is_track_enabled(sint32 trackFlagIndex) +static bool is_track_enabled(int32_t trackFlagIndex) { return (_enabledRidePieces & (1ULL << trackFlagIndex)) != 0; } -static sint32 ride_get_alternative_type(Ride *ride) +static int32_t ride_get_alternative_type(Ride *ride) { return (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? RideData4[ride->type].alternate_type : @@ -526,7 +526,7 @@ static void close_ride_window_for_construction(rct_windownumber number) */ rct_window *window_ride_construction_open() { - sint32 rideIndex = _currentRideIndex; + int32_t rideIndex = _currentRideIndex; close_ride_window_for_construction(rideIndex); rct_window *w; @@ -634,7 +634,7 @@ static void window_ride_construction_close(rct_window *w) hide_gridlines(); - uint8 rideIndex = _currentRideIndex; + uint8_t rideIndex = _currentRideIndex; Ride * ride = get_ride(rideIndex); // If we demolish a ride all windows will be closed including the construction window, @@ -666,7 +666,7 @@ static void window_ride_construction_close(rct_window *w) } else { - sint32 previousPauseState = gGamePaused; + int32_t previousPauseState = gGamePaused; gGamePaused = 0; ride_action_modify(rideIndex, RIDE_MODIFY_DEMOLISH, GAME_COMMAND_FLAG_APPLY); gGamePaused = previousPauseState; @@ -723,9 +723,9 @@ static void window_ride_construction_resize(rct_window *w) } Ride *ride = get_ride(_currentRideIndex); - sint32 rideType = ride_get_alternative_type(ride); + int32_t rideType = ride_get_alternative_type(ride); - uint64 disabledWidgets = 0; + uint64_t disabledWidgets = 0; if (_currentTrackCurve & 0x100) { disabledWidgets |= @@ -1275,7 +1275,7 @@ static void window_ride_construction_resize(rct_window *w) } // Set and invalidate the changed widgets - uint64 currentDisabledWidgets = w->disabled_widgets; + uint64_t currentDisabledWidgets = w->disabled_widgets; if (currentDisabledWidgets == disabledWidgets) return; @@ -1533,9 +1533,9 @@ static void window_ride_construction_mousedown(rct_window *w, rct_widgetindex wi _currentTrackPrice = MONEY32_UNDEFINED; window_ride_construction_update_active_elements(); } else { - uint8 *brakesSpeedPtr = &_currentBrakeSpeed2; - uint8 maxBrakesSpeed = 30; - uint8 brakesSpeed = *brakesSpeedPtr + 2; + uint8_t *brakesSpeedPtr = &_currentBrakeSpeed2; + uint8_t maxBrakesSpeed = 30; + uint8_t brakesSpeed = *brakesSpeedPtr + 2; if (brakesSpeed <= maxBrakesSpeed) { if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) { ride_construction_set_brakes_speed(brakesSpeed); @@ -1553,8 +1553,8 @@ static void window_ride_construction_mousedown(rct_window *w, rct_widgetindex wi _currentTrackPrice = MONEY32_UNDEFINED; window_ride_construction_update_active_elements(); } else { - uint8 *brakesSpeedPtr = &_currentBrakeSpeed2; - uint8 brakesSpeed = *brakesSpeedPtr - 2; + uint8_t *brakesSpeedPtr = &_currentBrakeSpeed2; + uint8_t brakesSpeed = *brakesSpeedPtr - 2; if (brakesSpeed >= 2) { if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) { ride_construction_set_brakes_speed(brakesSpeed); @@ -1608,7 +1608,7 @@ static void window_ride_construction_mousedown(rct_window *w, rct_widgetindex wi * * rct2: 0x006C78CD */ -static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_SPECIAL_TRACK_DROPDOWN) return; @@ -1617,7 +1617,7 @@ static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex wid ride_construction_invalidate_current_track(); _currentTrackPrice = MONEY32_UNDEFINED; - sint32 trackPiece = _currentPossibleRideConfigurations[dropdownIndex]; + int32_t trackPiece = _currentPossibleRideConfigurations[dropdownIndex]; switch (trackPiece) { case TRACK_ELEM_END_STATION: case TRACK_ELEM_S_BEND_LEFT: @@ -1640,7 +1640,7 @@ static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex wid */ static void window_ride_construction_construct(rct_window *w) { - sint32 trackType, trackDirection, rideIndex, liftHillAndAlternativeState, x, y, z, properties; + int32_t trackType, trackDirection, rideIndex, liftHillAndAlternativeState, x, y, z, properties; track_begin_end trackBeginEnd; _currentTrackPrice = MONEY32_UNDEFINED; @@ -1759,7 +1759,7 @@ static void window_ride_construction_construct(rct_window *w) */ static void window_ride_construction_mouseup_demolish(rct_window* w) { - sint32 x, y, z, direction, type; + int32_t x, y, z, direction, type; rct_tile_element *tileElement; CoordsXYE inputElement, outputElement; track_begin_end trackBeginEnd; @@ -1975,10 +1975,10 @@ static void window_ride_construction_update(rct_window *w) * * rct2: 0x006CC538 */ -static bool ride_get_place_position_from_screen_position(sint32 screenX, sint32 screenY, sint32 *outX, sint32 *outY) +static bool ride_get_place_position_from_screen_position(int32_t screenX, int32_t screenY, int32_t *outX, int32_t *outY) { - sint16 mapX, mapY, mapZ; - sint32 interactionType, direction; + int16_t mapX, mapY, mapZ; + int32_t interactionType, direction; rct_tile_element *tileElement; rct_viewport *viewport; @@ -2023,7 +2023,7 @@ static bool ride_get_place_position_from_screen_position(sint32 screenX, sint32 tileElement = map_get_surface_element_at(mapX >> 5, mapY >> 5); mapZ = floor2(tileElement->base_height * 8, 16); mapZ += _trackPlaceShiftZ; - mapZ = std::max(mapZ, 16); + mapZ = std::max(mapZ, 16); _trackPlaceZ = mapZ; } } else { @@ -2032,7 +2032,7 @@ static bool ride_get_place_position_from_screen_position(sint32 screenX, sint32 if (_trackPlaceShiftState != 0) { mapZ += _trackPlaceShiftZ; } - _trackPlaceZ = std::max(mapZ, 16); + _trackPlaceZ = std::max(mapZ, 16); } if (mapX == LOCATION_NULL) @@ -2047,7 +2047,7 @@ static bool ride_get_place_position_from_screen_position(sint32 screenX, sint32 * * rct2: 0x006C8229 */ -static void window_ride_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_ride_construction_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_CONSTRUCT: @@ -2064,7 +2064,7 @@ static void window_ride_construction_toolupdate(rct_window* w, rct_widgetindex w * * rct2: 0x006C8248 */ -static void window_ride_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_ride_construction_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_CONSTRUCT: @@ -2097,22 +2097,22 @@ static void window_ride_construction_invalidate(rct_window *w) stringId = STR_BOOSTER; } } - set_format_arg(0, uint16, stringId); + set_format_arg(0, uint16_t, stringId); if (_currentlyShowingBrakeOrBoosterSpeed) { - uint16 brakeSpeed2 = ((_currentBrakeSpeed2 * 9) >> 2) & 0xFFFF; + uint16_t brakeSpeed2 = ((_currentBrakeSpeed2 * 9) >> 2) & 0xFFFF; if (_boosterTrackSelected) { brakeSpeed2 = get_booster_speed(ride->type, brakeSpeed2); } - set_format_arg(2, uint16, brakeSpeed2); + set_format_arg(2, uint16_t, brakeSpeed2); } window_ride_construction_widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].text = RideConstructionSeatAngleRotationStrings[_currentSeatRotationAngle]; // Set window title arguments set_format_arg(4, rct_string_id, ride->name); - set_format_arg(6, uint32, ride->name_arguments); + set_format_arg(6, uint32_t, ride->name_arguments); } /** @@ -2123,7 +2123,7 @@ static void window_ride_construction_paint(rct_window *w, rct_drawpixelinfo *dpi { rct_drawpixelinfo clipdpi; rct_widget *widget; - sint32 x, y, width, height; + int32_t x, y, width, height; window_draw_widgets(w, dpi); @@ -2131,7 +2131,7 @@ static void window_ride_construction_paint(rct_window *w, rct_drawpixelinfo *dpi if (widget->type == WWT_EMPTY) return; - sint32 trackType, trackDirection, rideIndex, liftHillAndAlternativeState; + int32_t trackType, trackDirection, rideIndex, liftHillAndAlternativeState; if (window_ride_construction_update_state(&trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, nullptr, nullptr, nullptr, nullptr)) return; @@ -2161,8 +2161,8 @@ static void window_ride_construction_paint(rct_window *w, rct_drawpixelinfo *dpi static void window_ride_construction_draw_track_piece( rct_window *w, rct_drawpixelinfo *dpi, - sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 unknown, - sint32 width, sint32 height + int32_t rideIndex, int32_t trackType, int32_t trackDirection, int32_t unknown, + int32_t width, int32_t height ) { const rct_preview_track *trackBlock; Ride *ride; @@ -2173,15 +2173,15 @@ static void window_ride_construction_draw_track_piece( while ((trackBlock + 1)->index != 0xFF) trackBlock++; - sint16 x = trackBlock->x; - sint16 z = trackBlock->z; - sint16 y = trackBlock->y; + int16_t x = trackBlock->x; + int16_t z = trackBlock->z; + int16_t y = trackBlock->y; if (trackBlock->var_09 & 2) { x = 0; y = 0; } - sint16 tmp; + int16_t tmp; switch (trackDirection & 3) { case 1: tmp = x; @@ -2205,7 +2205,7 @@ static void window_ride_construction_draw_track_piece( y = 4112 + (y / 2); z = 1024 + z; - sint16 previewZOffset = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? + int16_t previewZOffset = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? FlatRideTrackDefinitions[trackType].preview_z_offset : TrackDefinitions[trackType].preview_z_offset; z -= previewZOffset; @@ -2216,7 +2216,7 @@ static void window_ride_construction_draw_track_piece( dpi->x += x - width / 2; dpi->y += y - height / 2 - 16; - uint32 d = unknown << 16; + uint32_t d = unknown << 16; d |= rideIndex; d |= trackType << 8; @@ -2236,13 +2236,13 @@ static rct_tile_element *_backupTileElementArrays[5]; */ static void sub_6CBCE2( rct_drawpixelinfo * dpi, - sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edx, - sint32 originX, sint32 originY, sint32 originZ + int32_t rideIndex, int32_t trackType, int32_t trackDirection, int32_t edx, + int32_t originX, int32_t originY, int32_t originZ ) { Ride *ride; const rct_preview_track *trackBlock; - sint32 preserve_current_viewport_flags; - sint32 offsetX, offsetY; + int32_t preserve_current_viewport_flags; + int32_t offsetX, offsetY; paint_session * session = paint_session_alloc(dpi); preserve_current_viewport_flags = gCurrentViewportFlags; @@ -2251,10 +2251,10 @@ static void sub_6CBCE2( ride = get_ride(rideIndex); - sint16 preserveMapSizeUnits = gMapSizeUnits; - sint16 preserveMapSizeMinus2 = gMapSizeMinus2; - sint16 preserveMapSize = gMapSize; - sint16 preserveMapSizeMaxXY = gMapSizeMaxXY; + int16_t preserveMapSizeUnits = gMapSizeUnits; + int16_t preserveMapSizeMinus2 = gMapSizeMinus2; + int16_t preserveMapSize = gMapSize; + int16_t preserveMapSizeMaxXY = gMapSizeMaxXY; gMapSizeUnits = 255 * 32; gMapSizeMinus2 = (255 * 32) + 286; @@ -2263,8 +2263,8 @@ static void sub_6CBCE2( trackBlock = get_track_def_from_ride(ride, trackType); while (trackBlock->index != 255) { - sint32 bl = trackBlock->var_08; - sint32 bh; + int32_t bl = trackBlock->var_08; + int32_t bh; switch (trackDirection) { default: case 0: @@ -2302,13 +2302,13 @@ static void sub_6CBCE2( bl |= bh; break; } - sint32 x = originX + offsetX; - sint32 y = originY + offsetY; - sint32 baseZ = (originZ + trackBlock->z) >> 3; - sint32 clearanceZ = ((trackBlock->var_07 + RideData5[ride->type].clearance_height) >> 3) + baseZ + 4; + int32_t x = originX + offsetX; + int32_t y = originY + offsetY; + int32_t baseZ = (originZ + trackBlock->z) >> 3; + int32_t clearanceZ = ((trackBlock->var_07 + RideData5[ride->type].clearance_height) >> 3) + baseZ + 4; - sint32 tileX = x >> 5; - sint32 tileY = y >> 5; + int32_t tileX = x >> 5; + int32_t tileY = y >> 5; // Replace map elements with temporary ones containing track _backupTileElementArrays[0] = map_get_first_element_at(tileX + 0, tileY + 0); @@ -2381,9 +2381,9 @@ void window_ride_construction_update_active_elements_impl() _selectedTrackType = 255; if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) { - sint32 x = _currentTrackBeginX; - sint32 y = _currentTrackBeginY; - sint32 z = _currentTrackBeginZ; + int32_t x = _currentTrackBeginX; + int32_t y = _currentTrackBeginY; + int32_t z = _currentTrackBeginZ; if (!sub_6C683D(&x, &y, &z, _currentTrackPieceDirection & 3, _currentTrackPieceType, 0, &tileElement, 0)) { _selectedTrackType = track_element_get_type(tileElement); if (track_element_has_speed_setting(track_element_get_type(tileElement))) @@ -2404,7 +2404,7 @@ void window_ride_construction_update_enabled_track_pieces() { Ride *ride = get_ride(_currentRideIndex); rct_ride_entry *rideEntry = get_ride_entry_by_ride(ride); - sint32 rideType = (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? RideData4[ride->type].alternate_type : ride->type; + int32_t rideType = (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? RideData4[ride->type].alternate_type : ride->type; if (rideEntry == nullptr) return; @@ -2433,7 +2433,7 @@ void window_ride_construction_update_enabled_track_pieces() */ void sub_6C94D8() { - sint32 x, y, z, direction, type, rideIndex, liftHillAndAlternativeState; + int32_t x, y, z, direction, type, rideIndex, liftHillAndAlternativeState; // Recheck if area is fine for new track. // Set by footpath placement @@ -2533,7 +2533,7 @@ void sub_6C94D8() static void window_ride_construction_update_map_selection() { Ride *ride; - sint32 trackType, trackDirection, x, y; + int32_t trackType, trackDirection, x, y; map_invalidate_map_selection_tiles(); gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_CONSTRUCT; @@ -2574,8 +2574,8 @@ static void window_ride_construction_update_map_selection() static void window_ride_construction_update_possible_ride_configurations() { Ride *ride; - sint32 trackType; - sint32 edi; + int32_t trackType; + int32_t edi; ride = get_ride(_currentRideIndex); @@ -2585,10 +2585,10 @@ static void window_ride_construction_update_possible_ride_configurations() else edi = ride->type; - sint32 currentPossibleRideConfigurationIndex = 0; + int32_t currentPossibleRideConfigurationIndex = 0; _numCurrentPossibleSpecialTrackPieces = 0; for (trackType = 0; trackType < 256; trackType++) { - sint32 edx = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? + int32_t edx = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? FlatRideTrackDefinitions[trackType].type : TrackDefinitions[trackType].type; @@ -2603,7 +2603,7 @@ static void window_ride_construction_update_possible_ride_configurations() continue; } - sint32 slope, bank; + int32_t slope, bank; if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_FRONT || _rideConstructionState == RIDE_CONSTRUCTION_STATE_PLACE) { if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) { slope = FlatRideTrackDefinitions[trackType].vangle_start; @@ -2664,9 +2664,9 @@ static void window_ride_construction_update_possible_ride_configurations() */ static void window_ride_construction_update_widgets(rct_window *w) { - uint8 rideIndex = _currentRideIndex; + uint8_t rideIndex = _currentRideIndex; Ride *ride = get_ride(rideIndex); - sint32 rideType = ride_get_alternative_type(ride); + int32_t rideType = ride_get_alternative_type(ride); w->hold_down_widgets = 0; if (ride_type_has_flag(rideType, RIDE_TYPE_FLAG_IS_SHOP) || !_stationConstructed) { @@ -2779,7 +2779,7 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].type = WWT_FLATBTN; } - sint32 x; + int32_t x; if ((is_track_enabled(TRACK_LIFT_HILL) && _currentTrackCurve < 256) || (gCheatsEnableChainLiftOnAllTrack && ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_TRACK))) { window_ride_construction_widgets[WIDX_CHAIN_LIFT].type = WWT_FLATBTN; x = 9; @@ -2788,7 +2788,7 @@ static void window_ride_construction_update_widgets(rct_window *w) x = 23; } - for (sint32 i = WIDX_SLOPE_DOWN_STEEP; i <= WIDX_SLOPE_UP_STEEP; i++) { + for (int32_t i = WIDX_SLOPE_DOWN_STEEP; i <= WIDX_SLOPE_UP_STEEP; i++) { window_ride_construction_widgets[i].left = x; window_ride_construction_widgets[i].right = x + 23; x += 24; @@ -2800,9 +2800,9 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP; if (is_track_enabled(TRACK_SLOPE_VERTICAL)) { if (_previousTrackSlopeEnd == TRACK_SLOPE_UP_60 || _previousTrackSlopeEnd == TRACK_SLOPE_UP_90) { - sint32 originalSlopeUpSteepLeft = window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].left; - sint32 originalSlopeUpSteepRight = window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].right; - for (sint32 i = WIDX_SLOPE_UP_STEEP; i > WIDX_SLOPE_DOWN_STEEP; i--) { + int32_t originalSlopeUpSteepLeft = window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].left; + int32_t originalSlopeUpSteepRight = window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].right; + for (int32_t i = WIDX_SLOPE_UP_STEEP; i > WIDX_SLOPE_DOWN_STEEP; i--) { window_ride_construction_widgets[i].left = window_ride_construction_widgets[i - 1].left; window_ride_construction_widgets[i].right = window_ride_construction_widgets[i - 1].right; } @@ -2811,9 +2811,9 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].image = SPR_RIDE_CONSTRUCTION_VERTICAL_RISE; window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_VERTICAL_RISE_TIP; } else if (_previousTrackSlopeEnd == TRACK_SLOPE_DOWN_60 || _previousTrackSlopeEnd == TRACK_SLOPE_DOWN_90) { - sint32 originalSlopeDownSteepLeft = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left; - sint32 originalSlopeDownSteepRight = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].right; - for (sint32 i = WIDX_SLOPE_DOWN_STEEP; i < WIDX_SLOPE_UP_STEEP; i++) { + int32_t originalSlopeDownSteepLeft = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left; + int32_t originalSlopeDownSteepRight = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].right; + for (int32_t i = WIDX_SLOPE_DOWN_STEEP; i < WIDX_SLOPE_UP_STEEP; i++) { window_ride_construction_widgets[i].left = window_ride_construction_widgets[i + 1].left; window_ride_construction_widgets[i].right = window_ride_construction_widgets[i + 1].right; } @@ -2835,7 +2835,7 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_HELIX_UP; window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_HELIX_UP_TIP; - sint32 tmp = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left; + int32_t tmp = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left; window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left = window_ride_construction_widgets[WIDX_SLOPE_DOWN].left; window_ride_construction_widgets[WIDX_SLOPE_DOWN].left = tmp; @@ -2863,7 +2863,7 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_HELIX_UP; window_ride_construction_widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_HELIX_UP_TIP; - sint32 tmp = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left; + int32_t tmp = window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left; window_ride_construction_widgets[WIDX_SLOPE_DOWN_STEEP].left = window_ride_construction_widgets[WIDX_SLOPE_DOWN].left; window_ride_construction_widgets[WIDX_SLOPE_DOWN].left = tmp; @@ -2991,14 +2991,14 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER_DOWN].type = WWT_BUTTON; window_ride_construction_widgets[WIDX_BANKING_GROUPBOX].right = 92; if (window_ride_construction_widgets[WIDX_BANK_LEFT].type != WWT_SPINNER) { - for (sint32 i = WIDX_BANK_LEFT; i <= WIDX_BANK_RIGHT; i++) { + for (int32_t i = WIDX_BANK_LEFT; i <= WIDX_BANK_RIGHT; i++) { window_ride_construction_widgets[i].left -= 36; window_ride_construction_widgets[i].right -= 36; } } } - uint64 pressedWidgets = w->pressed_widgets & ( + uint64_t pressedWidgets = w->pressed_widgets & ( (1 << WIDX_BACKGROUND) | (1 << WIDX_TITLE) | (1 << WIDX_CLOSE) | @@ -3137,7 +3137,7 @@ static void window_ride_construction_update_widgets(rct_window *w) window_invalidate(w); } -static void window_ride_construction_select_map_tiles(Ride *ride, sint32 trackType, sint32 trackDirection, sint32 x, sint32 y) +static void window_ride_construction_select_map_tiles(Ride *ride, int32_t trackType, int32_t trackDirection, int32_t x, int32_t y) { // If the scenery tool is active, we do not display our tiles as it // will conflict with larger scenery objects selecting tiles @@ -3147,11 +3147,11 @@ static void window_ride_construction_select_map_tiles(Ride *ride, sint32 trackTy } const rct_preview_track *trackBlock; - sint32 offsetX, offsetY; + int32_t offsetX, offsetY; trackBlock = get_track_def_from_ride(ride, trackType); trackDirection &= 3; - sint32 selectionTileIndex = 0; + int32_t selectionTileIndex = 0; while (trackBlock->index != 255) { switch (trackDirection) { default: @@ -3187,9 +3187,9 @@ static void window_ride_construction_select_map_tiles(Ride *ride, sint32 trackTy */ static void window_ride_construction_show_special_track_dropdown(rct_window *w, rct_widget *widget) { - sint32 defaultIndex = -1; - for (sint32 i = 0; i < _numCurrentPossibleRideConfigurations; i++) { - uint8 trackPiece = _currentPossibleRideConfigurations[i]; + int32_t defaultIndex = -1; + for (int32_t i = 0; i < _numCurrentPossibleRideConfigurations; i++) { + uint8_t trackPiece = _currentPossibleRideConfigurations[i]; rct_string_id trackPieceStringId = RideConfigurationStringIds[trackPiece]; if (trackPieceStringId == STR_RAPIDS) { Ride *ride = get_ride(_currentRideIndex); @@ -3219,7 +3219,7 @@ static void window_ride_construction_show_special_track_dropdown(rct_window *w, widget->right - widget->left ); - for (sint32 i = 0; i < 32; i++) + for (int32_t i = 0; i < 32; i++) { if (_currentDisabledSpecialTrackPieces & (1 << i)) { @@ -3233,9 +3233,9 @@ static void window_ride_construction_show_special_track_dropdown(rct_window *w, * * rct2: 0x006C7630 */ -static void ride_selected_track_set_seat_rotation(sint32 seatRotation) +static void ride_selected_track_set_seat_rotation(int32_t seatRotation) { - sint32 x, y, z; + int32_t x, y, z; x = _currentTrackBeginX; y = _currentTrackBeginY; z = _currentTrackBeginZ; @@ -3247,7 +3247,7 @@ static void ride_selected_track_set_seat_rotation(sint32 seatRotation) * * rct2: 0x006C7502 */ -static void loc_6C7502(sint32 al) +static void loc_6C7502(int32_t al) { _currentTrackSlopeEnd = al; _currentTrackPrice = MONEY32_UNDEFINED; @@ -3263,10 +3263,10 @@ static void loc_6C7502(sint32 al) * * rct2: 0x006C76E9 */ -static void ride_construction_set_brakes_speed(sint32 brakesSpeed) +static void ride_construction_set_brakes_speed(int32_t brakesSpeed) { rct_tile_element *tileElement; - sint32 x, y, z; + int32_t x, y, z; x = _currentTrackBeginX; y = _currentTrackBeginY; @@ -3289,9 +3289,9 @@ static void ride_construction_set_brakes_speed(sint32 brakesSpeed) * * rct2: 0x006CC6A8 */ -void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) +void ride_construction_toolupdate_construct(int32_t screenX, int32_t screenY) { - sint32 x, y, z; + int32_t x, y, z; Ride *ride; const rct_preview_track *trackBlock; @@ -3321,7 +3321,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) gMapSelectionTiles[1].x = -1; gMapSelectionTiles[1].y = -1; - sint32 trackType, trackDirection, rideIndex, liftHillAndAlternativeState; + int32_t trackType, trackDirection, rideIndex, liftHillAndAlternativeState; if (window_ride_construction_update_state(&trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, nullptr, nullptr, nullptr, nullptr)) { ride_construction_invalidate_current_track(); map_invalidate_map_selection_tiles(); @@ -3339,7 +3339,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) if (_trackPlaceZ == 0) { // Raise z above all slopes and water if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE_CONSTRUCT) { - sint32 highestZ = 0; + int32_t highestZ = 0; LocationXY16 *selectedTile = gMapSelectionTiles; while (selectedTile->x != -1) { if (selectedTile->x < (256 * 32) && selectedTile->y < (256 * 32)) { @@ -3355,9 +3355,9 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) } // loc_6CC91B: trackBlock = get_track_def_from_ride(ride, trackType); - sint32 bx = 0; + int32_t bx = 0; do { - bx = std::min(bx, trackBlock->z); + bx = std::min(bx, trackBlock->z); trackBlock++; } while (trackBlock->index != 255); z -= bx; @@ -3431,7 +3431,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) constexpr sLocationXY8 DirOffsets[4] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}}; bool keepOrientation = false; - for (sint8 i = 0; i < 4; i++) + for (int8_t i = 0; i < 4; i++) { pathsByDir[i] = map_get_footpath_element( (x >> 5) + DirOffsets[i].x, @@ -3478,7 +3478,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) if (!keepOrientation) { - for (sint8 i = 0; i < 4; i++) + for (int8_t i = 0; i < 4; i++) { if (pathsByDir[i]) { @@ -3501,10 +3501,10 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY) * * rct2: 0x006CD354 */ -void ride_construction_toolupdate_entrance_exit(sint32 screenX, sint32 screenY) +void ride_construction_toolupdate_entrance_exit(int32_t screenX, int32_t screenY) { - sint32 x, y, direction; - uint8 stationNum; + int32_t x, y, direction; + uint8_t stationNum; map_invalidate_selection_rect(); map_invalidate_map_selection_tiles(); @@ -3549,10 +3549,10 @@ void ride_construction_toolupdate_entrance_exit(sint32 screenX, sint32 screenY) * * rct2: 0x006CCA73 */ -void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) +void ride_construction_tooldown_construct(int32_t screenX, int32_t screenY) { const CursorState * state = context_get_cursor_state(); - sint32 trackType, trackDirection, rideIndex, liftHillAndAlternativeState, x, y, z, properties, highestZ; + int32_t trackType, trackDirection, rideIndex, liftHillAndAlternativeState, x, y, z, properties, highestZ; rct_window *w; map_invalidate_map_selection_tiles(); @@ -3594,9 +3594,9 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) Ride *ride = get_ride(_currentRideIndex); if (_trackPlaceZ == 0) { const rct_preview_track *trackBlock = get_track_def_from_ride(ride, _currentTrackPieceType); - sint32 bx = 0; + int32_t bx = 0; do { - bx = std::min(bx, trackBlock->z); + bx = std::min(bx, trackBlock->z); trackBlock++; } while (trackBlock->index != 255); z -= bx; @@ -3610,7 +3610,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) } if (ride->type == RIDE_TYPE_MAZE) { - for (sint32 zAttempts = 41; zAttempts >= 0; zAttempts--) { + for (int32_t zAttempts = 41; zAttempts >= 0; zAttempts--) { _rideConstructionState = RIDE_CONSTRUCTION_STATE_MAZE_BUILD; _currentTrackBeginX = x; _currentTrackBeginY = y; @@ -3674,7 +3674,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) return; } - for (sint32 zAttempts = 41; zAttempts >= 0; zAttempts--) { + for (int32_t zAttempts = 41; zAttempts >= 0; zAttempts--) { _rideConstructionState = RIDE_CONSTRUCTION_STATE_FRONT; _currentTrackBeginX = x; _currentTrackBeginY = y; @@ -3702,14 +3702,14 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) zAttempts == 0 || z < 0 ) { - sint32 saveTrackDirection = _currentTrackPieceDirection; - sint32 saveCurrentTrackCurve = _currentTrackCurve; - sint32 savePreviousTrackSlopeEnd = _previousTrackSlopeEnd; - sint32 saveCurrentTrackSlopeEnd = _currentTrackSlopeEnd; - sint32 savePreviousTrackBankEnd = _previousTrackBankEnd; - sint32 saveCurrentTrackBankEnd = _currentTrackBankEnd; - sint32 saveCurrentTrackAlternative = _currentTrackAlternative; - sint32 saveCurrentTrackLiftHill = _currentTrackLiftHill; + int32_t saveTrackDirection = _currentTrackPieceDirection; + int32_t saveCurrentTrackCurve = _currentTrackCurve; + int32_t savePreviousTrackSlopeEnd = _previousTrackSlopeEnd; + int32_t saveCurrentTrackSlopeEnd = _currentTrackSlopeEnd; + int32_t savePreviousTrackBankEnd = _previousTrackBankEnd; + int32_t saveCurrentTrackBankEnd = _currentTrackBankEnd; + int32_t saveCurrentTrackAlternative = _currentTrackAlternative; + int32_t saveCurrentTrackLiftHill = _currentTrackLiftHill; ride_initialise_construction_window(_currentRideIndex); @@ -3751,14 +3751,14 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) * * rct2: 0x006CCA73 */ -static void ride_construction_tooldown_entrance_exit(sint32 screenX, sint32 screenY) +static void ride_construction_tooldown_entrance_exit(int32_t screenX, int32_t screenY) { ride_construction_invalidate_current_track(); map_invalidate_selection_rect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - sint32 mapX, mapY, direction; + int32_t mapX, mapY, direction; ride_get_entrance_or_exit_position_from_screen_position(screenX, screenY, &mapX, &mapY, &direction); if (gRideEntranceExitPlaceDirection == 255) return; diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index e974d63866..c16ccb8729 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -74,15 +74,15 @@ static bool _quickDemolishMode = false; static void window_ride_list_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_ride_list_resize(rct_window *w); static void window_ride_list_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_ride_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_ride_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_ride_list_update(rct_window *w); -static void window_ride_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_ride_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_ride_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_ride_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_ride_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_ride_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_ride_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_ride_list_invalidate(rct_window *w); static void window_ride_list_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_ride_list_events = { nullptr, @@ -183,7 +183,7 @@ static constexpr const rct_string_id page_names[] = { }; // clang-format on -static sint32 _window_ride_list_information_type; +static int32_t _window_ride_list_information_type; static void window_ride_list_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); static void window_ride_list_close_all(rct_window *w); @@ -320,15 +320,15 @@ static void window_ride_list_mousedown(rct_window *w, rct_widgetindex widgetInde } else if (widgetIndex == WIDX_INFORMATION_TYPE_DROPDOWN) { widget--; - sint32 lastType; + int32_t lastType; if (w->page == PAGE_RIDES) lastType = INFORMATION_TYPE_GUESTS_FAVOURITE; else lastType = INFORMATION_TYPE_RUNNING_COST; - sint32 numItems = 0; - sint32 selectedIndex = -1; - for (sint32 type = INFORMATION_TYPE_STATUS; type <= lastType; type++) { + int32_t numItems = 0; + int32_t selectedIndex = -1; + for (int32_t type = INFORMATION_TYPE_STATUS; type <= lastType; type++) { if ((gParkFlags & PARK_FLAGS_NO_MONEY)) { if (ride_info_type_money_mapping[type]) { continue; @@ -364,7 +364,7 @@ static void window_ride_list_mousedown(rct_window *w, rct_widgetindex widgetInde * * rct2: 0x006B3547 */ -static void window_ride_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_ride_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_OPEN_CLOSE_ALL) { @@ -384,13 +384,13 @@ static void window_ride_list_dropdown(rct_window *w, rct_widgetindex widgetIndex if (dropdownIndex == -1) return; - sint32 informationType = INFORMATION_TYPE_STATUS; - uint32 arg = (uint32)gDropdownItemsArgs[dropdownIndex]; + int32_t informationType = INFORMATION_TYPE_STATUS; + uint32_t arg = (uint32_t)gDropdownItemsArgs[dropdownIndex]; for (size_t i = 0; i < Util::CountOf(ride_info_type_string_mapping); i++) { if (arg == ride_info_type_string_mapping[i]) { - informationType = (sint32)i; + informationType = (int32_t)i; } } @@ -415,9 +415,9 @@ static void window_ride_list_update(rct_window *w) * * rct2: 0x006B35A1 */ -static void window_ride_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_ride_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 top; + int32_t top; *height = w->no_list_items * SCROLLABLE_ROW_HEIGHT; if (w->selected_list_item != -1) { @@ -438,16 +438,16 @@ static void window_ride_list_scrollgetsize(rct_window *w, sint32 scrollIndex, si * * rct2: 0x006B361F */ -static void window_ride_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_ride_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) return; // Open ride window - uint8 rideIndex = w->list_item_positions[index]; + uint8_t rideIndex = w->list_item_positions[index]; if (_quickDemolishMode && network_get_mode() != NETWORK_MODE_CLIENT) { ride_action_modify(rideIndex, RIDE_MODIFY_DEMOLISH, GAME_COMMAND_FLAG_APPLY); window_ride_list_refresh_list(w); @@ -463,9 +463,9 @@ static void window_ride_list_scrollmousedown(rct_window *w, sint32 scrollIndex, * * rct2: 0x006B35EF */ -static void window_ride_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_ride_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index; + int32_t index; index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) @@ -493,7 +493,7 @@ static void window_ride_list_invalidate(rct_window *w) window_ride_list_widgets[WIDX_CURRENT_INFORMATION_TYPE].text = ride_info_type_string_mapping[_window_ride_list_information_type]; // Set correct active tab - for (sint32 i = 0; i < 3; i++) + for (int32_t i = 0; i < 3; i++) w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); @@ -527,9 +527,9 @@ static void window_ride_list_invalidate(rct_window *w) w->widgets[WIDX_CLOSE_LIGHT].type = WWT_IMGBTN; w->widgets[WIDX_OPEN_LIGHT].type = WWT_IMGBTN; - sint8 allClosed = -1; - sint8 allOpen = -1; - sint32 i; + int8_t allClosed = -1; + int8_t allOpen = -1; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) { if (w->page != gRideClassifications[ride->type]) @@ -574,9 +574,9 @@ static void window_ride_list_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006B3240 */ -static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 i, y, argument; + int32_t i, y, argument; rct_string_id format, formatSecondary; Ride *ride; @@ -597,7 +597,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, // Ride name set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, 0, y - 1, 159); // Ride information @@ -605,75 +605,75 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, switch (_window_ride_list_information_type) { case INFORMATION_TYPE_STATUS: ride_get_status(w->list_item_positions[i], &formatSecondary, &argument); - set_format_arg(2, sint32, argument); + set_format_arg(2, int32_t, argument); break; case INFORMATION_TYPE_POPULARITY: formatSecondary = STR_POPULARITY_UNKNOWN_LABEL; if (ride->popularity != 255) { formatSecondary = STR_POPULARITY_LABEL; - set_format_arg(2, uint16, ride->popularity * 4); + set_format_arg(2, uint16_t, ride->popularity * 4); } break; case INFORMATION_TYPE_SATISFACTION: formatSecondary = STR_SATISFACTION_UNKNOWN_LABEL; if (ride->satisfaction != 255) { formatSecondary = STR_SATISFACTION_LABEL; - set_format_arg(2, uint16, ride->satisfaction * 5); + set_format_arg(2, uint16_t, ride->satisfaction * 5); } break; case INFORMATION_TYPE_PROFIT: formatSecondary = 0; if (ride->profit != MONEY32_UNDEFINED) { formatSecondary = STR_PROFIT_LABEL; - set_format_arg(2, sint32, ride->profit); + set_format_arg(2, int32_t, ride->profit); } break; case INFORMATION_TYPE_TOTAL_CUSTOMERS: formatSecondary = STR_RIDE_LIST_TOTAL_CUSTOMERS_LABEL; - set_format_arg(2, uint32, ride->total_customers); + set_format_arg(2, uint32_t, ride->total_customers); break; case INFORMATION_TYPE_TOTAL_PROFIT: formatSecondary = 0; if (ride->total_profit != MONEY32_UNDEFINED) { formatSecondary = STR_RIDE_LIST_TOTAL_PROFIT_LABEL; - set_format_arg(2, sint32, ride->total_profit); + set_format_arg(2, int32_t, ride->total_profit); } break; case INFORMATION_TYPE_CUSTOMERS: formatSecondary = STR_RIDE_LIST_CUSTOMERS_PER_HOUR_LABEL; - set_format_arg(2, uint32, ride_customers_per_hour(ride)); + set_format_arg(2, uint32_t, ride_customers_per_hour(ride)); break; case INFORMATION_TYPE_AGE: { - sint16 age = date_get_year(gDateMonthsElapsed - ride->build_date); + int16_t age = date_get_year(gDateMonthsElapsed - ride->build_date); switch (age) { case 0: formatSecondary = STR_RIDE_LIST_BUILT_THIS_YEAR_LABEL; break; case 1: formatSecondary = STR_RIDE_LIST_BUILT_LAST_YEAR_LABEL; break; default: formatSecondary = STR_RIDE_LIST_BUILT_X_YEARS_AGO_LABEL; break; } - set_format_arg(2, sint16, age); + set_format_arg(2, int16_t, age); break; } case INFORMATION_TYPE_INCOME: formatSecondary = 0; if (ride->income_per_hour != MONEY32_UNDEFINED) { formatSecondary = STR_RIDE_LIST_INCOME_LABEL; - set_format_arg(2, sint32, ride->income_per_hour); + set_format_arg(2, int32_t, ride->income_per_hour); } break; case INFORMATION_TYPE_RUNNING_COST: formatSecondary = STR_RIDE_LIST_RUNNING_COST_UNKNOWN; - if (ride->upkeep_cost != (money16)(uint16)0xFFFF) { + if (ride->upkeep_cost != (money16)(uint16_t)0xFFFF) { formatSecondary = STR_RIDE_LIST_RUNNING_COST_LABEL; - set_format_arg(2, sint32, ride->upkeep_cost * 16); + set_format_arg(2, int32_t, ride->upkeep_cost * 16); } break; case INFORMATION_TYPE_QUEUE_LENGTH: - set_format_arg(2, uint16, ride_get_total_queue_length(ride)); + set_format_arg(2, uint16_t, ride_get_total_queue_length(ride)); formatSecondary = STR_QUEUE_EMPTY; { - uint16 arg; - memcpy(&arg, gCommonFormatArgs + 2, sizeof(uint16)); + uint16_t arg; + memcpy(&arg, gCommonFormatArgs + 2, sizeof(uint16_t)); if (arg == 1) formatSecondary = STR_QUEUE_ONE_PERSON; @@ -682,28 +682,28 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, } break; case INFORMATION_TYPE_QUEUE_TIME: - set_format_arg(2, uint16, ride_get_max_queue_time(ride)); + set_format_arg(2, uint16_t, ride_get_max_queue_time(ride)); formatSecondary = STR_QUEUE_TIME_LABEL; { - uint16 arg; - memcpy(&arg, gCommonFormatArgs + 2, sizeof(uint16)); + uint16_t arg; + memcpy(&arg, gCommonFormatArgs + 2, sizeof(uint16_t)); if (arg > 1) formatSecondary = STR_QUEUE_TIME_PLURAL_LABEL; } break; case INFORMATION_TYPE_RELIABILITY: - set_format_arg(2, uint16, ride->reliability_percentage); + set_format_arg(2, uint16_t, ride->reliability_percentage); formatSecondary = STR_RELIABILITY_LABEL; break; case INFORMATION_TYPE_DOWN_TIME: - set_format_arg(2, uint16, ride->downtime); + set_format_arg(2, uint16_t, ride->downtime); formatSecondary = STR_DOWN_TIME_LABEL; break; case INFORMATION_TYPE_GUESTS_FAVOURITE: formatSecondary = 0; if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE) { - set_format_arg(2, uint16, ride->guests_favourite); + set_format_arg(2, uint16_t, ride->guests_favourite); formatSecondary = ride->guests_favourite == 1 ? STR_GUESTS_FAVOURITE_LABEL : STR_GUESTS_FAVOURITE_PLURAL_LABEL; } break; @@ -725,7 +725,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, */ static void window_ride_list_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) { - sint32 sprite_idx; + int32_t sprite_idx; // Rides tab sprite_idx = SPR_TAB_RIDE_0; @@ -754,10 +754,10 @@ static void window_ride_list_draw_tab_images(rct_drawpixelinfo *dpi, rct_window */ void window_ride_list_refresh_list(rct_window *w) { - sint32 i; + int32_t i; Ride *ride, *otherRide; char bufferA[128], bufferB[128]; - sint32 list_index = 0; + int32_t list_index = 0; FOR_ALL_RIDES(i, ride) { if (w->page != gRideClassifications[ride->type] || (ride->status == RIDE_STATUS_CLOSED && !ride_has_any_track_elements(i))) @@ -768,7 +768,7 @@ void window_ride_list_refresh_list(rct_window *w) } w->list_item_positions[list_index] = i; - sint32 current_list_position = list_index; + int32_t current_list_position = list_index; switch (w->list_information_type) { case INFORMATION_TYPE_STATUS: format_string_to_upper(bufferA, 128, ride->name, &ride->name_arguments); @@ -919,7 +919,7 @@ void window_ride_list_refresh_list(rct_window *w) static void window_ride_list_close_all(rct_window *w) { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) { @@ -933,7 +933,7 @@ static void window_ride_list_close_all(rct_window *w) static void window_ride_list_open_all(rct_window *w) { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) { diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index 397c3cc7ff..3e67e4cbeb 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -69,7 +69,7 @@ static constexpr const rct_string_id window_save_prompt_labels[][2] = { static void window_save_prompt_close(rct_window *w); static void window_save_prompt_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_save_prompt_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_save_prompt_callback(sint32 result, const utf8 * path); +static void window_save_prompt_callback(int32_t result, const utf8 * path); static rct_window_event_list window_save_prompt_events = { window_save_prompt_close, @@ -109,12 +109,12 @@ static rct_window_event_list window_save_prompt_events = { */ rct_window * window_save_prompt_open() { - sint32 width, height; + int32_t width, height; rct_string_id stringId; rct_window* window; - uint8 prompt_mode; + uint8_t prompt_mode; rct_widget *widgets; - uint64 enabled_widgets; + uint64_t enabled_widgets; prompt_mode = gSavePromptMode; if (prompt_mode == PM_QUIT) @@ -264,7 +264,7 @@ static void window_save_prompt_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); } -static void window_save_prompt_callback(sint32 result, const utf8 * path) +static void window_save_prompt_callback(int32_t result, const utf8 * path) { if (result == MODAL_RESULT_OK) { game_load_or_quit_no_save_prompt(); diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index e3c24befad..0bf127e17a 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -59,16 +59,16 @@ static void window_scenery_close(rct_window *w); static void window_scenery_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_scenery_resize(rct_window *w); static void window_scenery_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_scenery_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_scenery_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_scenery_update(rct_window *w); static void window_scenery_event_07(rct_window *w); -static void window_scenery_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_scenery_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_scenery_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_scenery_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_scenery_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_scenery_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_scenery_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_scenery_invalidate(rct_window *w); static void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_scenery_events = { window_scenery_close, @@ -180,17 +180,17 @@ static rct_widget window_scenery_widgets[] = { void window_scenery_update_scroll(rct_window *w); // rct2: 0x00F64F2C -static sint16 window_scenery_tab_entries[SCENERY_WINDOW_TABS][SCENERY_ENTRIES_BY_TAB + 1]; +static int16_t window_scenery_tab_entries[SCENERY_WINDOW_TABS][SCENERY_ENTRIES_BY_TAB + 1]; /** * Was part of 0x006DFA00 * The same code repeated five times for every scenery entry type */ -static void init_scenery_entry(rct_scenery_entry *sceneryEntry, sint32 index, uint8 sceneryTabId) +static void init_scenery_entry(rct_scenery_entry *sceneryEntry, int32_t index, uint8_t sceneryTabId) { if (scenery_is_invented(index) || gCheatsIgnoreResearchStatus) { if (sceneryTabId != 0xFF) { - for (sint32 i = 0; i < SCENERY_ENTRIES_BY_TAB; i++) { + for (int32_t i = 0; i < SCENERY_ENTRIES_BY_TAB; i++) { if (window_scenery_tab_entries[sceneryTabId][i] == -1) { window_scenery_tab_entries[sceneryTabId][i] = index; @@ -200,8 +200,8 @@ static void init_scenery_entry(rct_scenery_entry *sceneryEntry, sint32 index, ui } } - for (sint32 i = 0; i < SCENERY_WINDOW_TABS - 1; i++) { - sint32 counter = 0; + for (int32_t i = 0; i < SCENERY_WINDOW_TABS - 1; i++) { + int32_t counter = 0; while (window_scenery_tab_entries[i][counter] != -1) { @@ -213,7 +213,7 @@ static void init_scenery_entry(rct_scenery_entry *sceneryEntry, sint32 index, ui } } - for (sint32 i = 0; i < SCENERY_ENTRIES_BY_TAB; i++) { + for (int32_t i = 0; i < SCENERY_ENTRIES_BY_TAB; i++) { if (window_scenery_tab_entries[SCENERY_WINDOW_TABS - 1][i] == -1) { window_scenery_tab_entries[SCENERY_WINDOW_TABS - 1][i] = index; @@ -232,7 +232,7 @@ void window_scenery_init() { bool enabledScenerySets[SCENERY_WINDOW_TABS] = { false }; - for (sint32 scenerySetIndex = 0; scenerySetIndex < SCENERY_WINDOW_TABS; scenerySetIndex++) { + for (int32_t scenerySetIndex = 0; scenerySetIndex < SCENERY_WINDOW_TABS; scenerySetIndex++) { window_scenery_tab_entries[scenerySetIndex][0] = -1; if (scenerySetIndex == MAX_SCENERY_GROUP_OBJECTS) continue; @@ -241,9 +241,9 @@ void window_scenery_init() if (sceneryGroupEntry == nullptr) continue; - sint32 sceneryTabEntryCount = 0; - for (sint32 i = 0; i < sceneryGroupEntry->entry_count; i++) { - uint16 sceneryEntryId = sceneryGroupEntry->scenery_entries[i]; + int32_t sceneryTabEntryCount = 0; + for (int32_t i = 0; i < sceneryGroupEntry->entry_count; i++) { + uint16_t sceneryEntryId = sceneryGroupEntry->scenery_entries[i]; if (scenery_is_invented(sceneryEntryId) || gCheatsIgnoreResearchStatus) { window_scenery_tab_entries[scenerySetIndex][sceneryTabEntryCount] = sceneryEntryId; window_scenery_tab_entries[scenerySetIndex][++sceneryTabEntryCount] = -1; @@ -254,7 +254,7 @@ void window_scenery_init() } // small scenery - for (uint16 sceneryId = SCENERY_SMALL_SCENERY_ID_MIN; sceneryId < SCENERY_SMALL_SCENERY_ID_MAX; sceneryId++) { + for (uint16_t sceneryId = SCENERY_SMALL_SCENERY_ID_MIN; sceneryId < SCENERY_SMALL_SCENERY_ID_MAX; sceneryId++) { if (get_small_scenery_entry(sceneryId) == nullptr) continue; @@ -263,8 +263,8 @@ void window_scenery_init() } // large scenery - for (sint32 sceneryId = SCENERY_LARGE_SCENERY_ID_MIN; sceneryId < SCENERY_LARGE_SCENERY_ID_MAX; sceneryId++) { - sint32 largeSceneryIndex = sceneryId - SCENERY_LARGE_SCENERY_ID_MIN; + for (int32_t sceneryId = SCENERY_LARGE_SCENERY_ID_MIN; sceneryId < SCENERY_LARGE_SCENERY_ID_MAX; sceneryId++) { + int32_t largeSceneryIndex = sceneryId - SCENERY_LARGE_SCENERY_ID_MIN; if (get_large_scenery_entry(largeSceneryIndex) == nullptr) continue; @@ -274,8 +274,8 @@ void window_scenery_init() } // walls - for (sint32 sceneryId = SCENERY_WALLS_ID_MIN; sceneryId < SCENERY_WALLS_ID_MAX; sceneryId++) { - sint32 wallSceneryIndex = sceneryId - SCENERY_WALLS_ID_MIN; + for (int32_t sceneryId = SCENERY_WALLS_ID_MIN; sceneryId < SCENERY_WALLS_ID_MAX; sceneryId++) { + int32_t wallSceneryIndex = sceneryId - SCENERY_WALLS_ID_MIN; if (get_wall_entry(wallSceneryIndex) == nullptr) continue; @@ -285,8 +285,8 @@ void window_scenery_init() } // banners - for (sint32 sceneryId = SCENERY_BANNERS_ID_MIN; sceneryId < SCENERY_BANNERS_ID_MAX; sceneryId++) { - sint32 bannerIndex = sceneryId - SCENERY_BANNERS_ID_MIN; + for (int32_t sceneryId = SCENERY_BANNERS_ID_MIN; sceneryId < SCENERY_BANNERS_ID_MAX; sceneryId++) { + int32_t bannerIndex = sceneryId - SCENERY_BANNERS_ID_MIN; if (get_banner_entry(bannerIndex) == nullptr) continue; @@ -296,8 +296,8 @@ void window_scenery_init() } // path bits - for (sint32 sceneryId = SCENERY_PATH_SCENERY_ID_MIN; sceneryId < SCENERY_PATH_SCENERY_ID_MAX; sceneryId++) { - sint32 pathBitIndex = sceneryId - SCENERY_PATH_SCENERY_ID_MIN; + for (int32_t sceneryId = SCENERY_PATH_SCENERY_ID_MIN; sceneryId < SCENERY_PATH_SCENERY_ID_MAX; sceneryId++) { + int32_t pathBitIndex = sceneryId - SCENERY_PATH_SCENERY_ID_MIN; if (get_footpath_item_entry(pathBitIndex) == nullptr) continue; @@ -309,11 +309,11 @@ void window_scenery_init() for (rct_widgetindex widgetIndex = WIDX_SCENERY_TAB_1; widgetIndex < WIDX_SCENERY_LIST; widgetIndex++) window_scenery_widgets[widgetIndex].type = WWT_EMPTY; - uint8 tabIndexes[SCENERY_WINDOW_TABS]; - uint8 order[SCENERY_WINDOW_TABS]; - sint32 usedValues = 0; + uint8_t tabIndexes[SCENERY_WINDOW_TABS]; + uint8_t order[SCENERY_WINDOW_TABS]; + int32_t usedValues = 0; - for (sint32 scenerySetId = 0; scenerySetId < MAX_SCENERY_GROUP_OBJECTS; scenerySetId++) { + for (int32_t scenerySetId = 0; scenerySetId < MAX_SCENERY_GROUP_OBJECTS; scenerySetId++) { rct_scenery_group_entry* sceneryEntry = get_scenery_group_entry(scenerySetId); if (sceneryEntry == nullptr) continue; @@ -326,9 +326,9 @@ void window_scenery_init() while (true) { bool finished = true; - for (sint32 i = 1; i < usedValues; i++) { + for (int32_t i = 1; i < usedValues; i++) { if (order[i - 1] > order[i]) { - uint8 tmp = tabIndexes[i - 1]; + uint8_t tmp = tabIndexes[i - 1]; tabIndexes[i - 1] = tabIndexes[i]; tabIndexes[i] = tmp; tmp = order[i - 1]; @@ -345,9 +345,9 @@ void window_scenery_init() tabIndexes[usedValues] = SCENERY_WINDOW_TABS - 1; usedValues++; - uint16 left = 3; - for (sint32 i = 0; i < usedValues; i ++) { - uint32 tabIndex = tabIndexes[i]; + uint16_t left = 3; + for (int32_t i = 0; i < usedValues; i ++) { + uint32_t tabIndex = tabIndexes[i]; rct_widget* tabWidget = &window_scenery_widgets[tabIndex + WIDX_SCENERY_TAB_1]; if (left != 3 || tabIndex != SCENERY_WINDOW_TABS - 1) { @@ -384,17 +384,17 @@ void window_scenery_set_default_placement_configuration() gWindowSceneryTertiaryColour = COLOUR_DARK_BROWN; window_scenery_init(); - for (sint32 i = 0; i < SCENERY_WINDOW_TABS; i++) + for (int32_t i = 0; i < SCENERY_WINDOW_TABS; i++) gWindowSceneryTabSelections[i] = WINDOW_SCENERY_TAB_SELECTION_UNDEFINED; - for (sint32 i = 0; i < SCENERY_WINDOW_TABS; i++) { + for (int32_t i = 0; i < SCENERY_WINDOW_TABS; i++) { if (window_scenery_tab_entries[i][0] != -1) { gWindowSceneryActiveTabIndex = i; return; } } - for (sint32 i = 0; i < 16; i++) { + for (int32_t i = 0; i < 16; i++) { rct_widget *tabWidget = &window_scenery_widgets[WIDX_SCENERY_TAB_1 + i]; if (tabWidget->type != WWT_EMPTY) { gWindowSceneryActiveTabIndex = i; @@ -497,24 +497,24 @@ void window_scenery_close(rct_window *w) tool_cancel(); } -static sint32 count_rows(sint32 items){ - sint32 rows = items / 9; +static int32_t count_rows(int32_t items){ + int32_t rows = items / 9; return rows; } struct scenery_item { - sint32 allRows; - sint32 selected_item; - sint16 sceneryId; + int32_t allRows; + int32_t selected_item; + int16_t sceneryId; }; -static scenery_item window_scenery_count_rows_with_selected_item(sint32 tabIndex) +static scenery_item window_scenery_count_rows_with_selected_item(int32_t tabIndex) { scenery_item sceneryItem = { 0, 0, -1 }; - sint32 totalItems = 0; - sint16 id = 0; - sint16 sceneryId = gWindowSceneryTabSelections[tabIndex]; + int32_t totalItems = 0; + int16_t id = 0; + int16_t sceneryId = gWindowSceneryTabSelections[tabIndex]; while ((id = window_scenery_tab_entries[tabIndex][totalItems]) != -1){ if (id == sceneryId){ @@ -527,20 +527,20 @@ static scenery_item window_scenery_count_rows_with_selected_item(sint32 tabIndex return sceneryItem; } -static sint32 window_scenery_count_rows() +static int32_t window_scenery_count_rows() { - sint32 tabIndex = gWindowSceneryActiveTabIndex; - sint32 totalItems = 0; + int32_t tabIndex = gWindowSceneryActiveTabIndex; + int32_t totalItems = 0; while (window_scenery_tab_entries[tabIndex][totalItems] != -1){ totalItems++; } - sint32 rows = count_rows(totalItems + 8); + int32_t rows = count_rows(totalItems + 8); return rows; } -static sint32 window_scenery_rows_height(sint32 rows) +static int32_t window_scenery_rows_height(int32_t rows) { return rows * SCENERY_BUTTON_HEIGHT; } @@ -596,23 +596,23 @@ static void window_scenery_mouseup(rct_window *w, rct_widgetindex widgetIndex) */ void window_scenery_update_scroll(rct_window *w) { - sint32 tabIndex = gWindowSceneryActiveTabIndex; - sint32 listHeight = w->height - 14 - window_scenery_widgets[WIDX_SCENERY_LIST].top - 1; + int32_t tabIndex = gWindowSceneryActiveTabIndex; + int32_t listHeight = w->height - 14 - window_scenery_widgets[WIDX_SCENERY_LIST].top - 1; scenery_item sceneryItem = window_scenery_count_rows_with_selected_item(tabIndex); w->scrolls[0].v_bottom = window_scenery_rows_height(sceneryItem.allRows) + 1; - sint32 maxTop = std::max(0, w->scrolls[0].v_bottom - listHeight); - sint32 rowSelected = count_rows(sceneryItem.selected_item); + int32_t maxTop = std::max(0, w->scrolls[0].v_bottom - listHeight); + int32_t rowSelected = count_rows(sceneryItem.selected_item); if (sceneryItem.sceneryId == -1) { rowSelected = 0; - sint16 sceneryId = window_scenery_tab_entries[tabIndex][0]; + int16_t sceneryId = window_scenery_tab_entries[tabIndex][0]; if (sceneryId != -1) gWindowSceneryTabSelections[tabIndex] = sceneryId; } w->scrolls[0].v_top = window_scenery_rows_height(rowSelected); - w->scrolls[0].v_top = std::min(maxTop, w->scrolls[0].v_top); + w->scrolls[0].v_top = std::min(maxTop, w->scrolls[0].v_top); widget_scroll_update_thumbs(w, WIDX_SCENERY_LIST); } @@ -686,19 +686,19 @@ static void window_scenery_mousedown(rct_window *w, rct_widgetindex widgetIndex, * * rct2: 0x006E1A54 */ -static void window_scenery_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_scenery_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; if (widgetIndex == WIDX_SCENERY_PRIMARY_COLOUR_BUTTON) { - gWindowSceneryPrimaryColour = (uint8)dropdownIndex; + gWindowSceneryPrimaryColour = (uint8_t)dropdownIndex; } else if (widgetIndex == WIDX_SCENERY_SECONDARY_COLOUR_BUTTON) { - gWindowScenerySecondaryColour = (uint8)dropdownIndex; + gWindowScenerySecondaryColour = (uint8_t)dropdownIndex; } else if (widgetIndex == WIDX_SCENERY_TERTIARY_COLOUR_BUTTON) { - gWindowSceneryTertiaryColour = (uint8)dropdownIndex; + gWindowSceneryTertiaryColour = (uint8_t)dropdownIndex; } window_invalidate(w); @@ -724,8 +724,8 @@ static void window_scenery_update(rct_window *w) const CursorState * state = context_get_cursor_state(); rct_window *other = window_find_from_point(state->x, state->y); if (other == w) { - sint32 window_x = state->x - w->x + 26; - sint32 window_y = state->y - w->y; + int32_t window_x = state->x - w->x + 26; + int32_t window_y = state->y - w->y; if (window_y < 44 || window_x <= w->width) { rct_widgetindex widgetIndex = window_find_widget_from_point(w, state->x, state->y); @@ -739,7 +739,7 @@ static void window_scenery_update(rct_window *w) w->max_height = WINDOW_SCENERY_HEIGHT; } } else { - sint32 windowHeight = std::min(463, w->scrolls[0].v_bottom + 62); + int32_t windowHeight = std::min(463, w->scrolls[0].v_bottom + 62); if (context_get_height() < 600) windowHeight = std::min(374, windowHeight); windowHeight = std::max(WINDOW_SCENERY_HEIGHT, windowHeight); @@ -773,8 +773,8 @@ static void window_scenery_update(rct_window *w) } else if (gWindowSceneryPaintEnabled == 1) { // the repaint scenery tool is active gCurrentToolId = TOOL_PAINT_DOWN; } else { - uint16 tabIndex = gWindowSceneryActiveTabIndex; - sint16 tabSelectedSceneryId = gWindowSceneryTabSelections[tabIndex]; + uint16_t tabIndex = gWindowSceneryActiveTabIndex; + int16_t tabSelectedSceneryId = gWindowSceneryTabSelections[tabIndex]; if (tabSelectedSceneryId != -1) { if (tabSelectedSceneryId >= 0x400) { // banner @@ -796,19 +796,19 @@ static void window_scenery_update(rct_window *w) * * rct2: 0x006E1A91 */ -void window_scenery_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +void window_scenery_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 rows = window_scenery_count_rows(); + int32_t rows = window_scenery_count_rows(); *height = window_scenery_rows_height(rows); } -static sint16 get_scenery_id_by_cursor_pos(sint16 x, sint16 y) +static int16_t get_scenery_id_by_cursor_pos(int16_t x, int16_t y) { - sint32 tabSceneryIndex = x / SCENERY_BUTTON_WIDTH + (y / SCENERY_BUTTON_HEIGHT) * 9; - uint8 tabIndex = gWindowSceneryActiveTabIndex; + int32_t tabSceneryIndex = x / SCENERY_BUTTON_WIDTH + (y / SCENERY_BUTTON_HEIGHT) * 9; + uint8_t tabIndex = gWindowSceneryActiveTabIndex; - sint32 itemCounter = 0; - sint16 sceneryId = 0; + int32_t itemCounter = 0; + int16_t sceneryId = 0; while (itemCounter <= tabSceneryIndex) { sceneryId = window_scenery_tab_entries[tabIndex][itemCounter]; if (sceneryId == -1) @@ -824,13 +824,13 @@ static sint16 get_scenery_id_by_cursor_pos(sint16 x, sint16 y) * * rct2: 0x006E1C4A */ -void window_scenery_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_scenery_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint16 sceneryId = get_scenery_id_by_cursor_pos(x, y); + int16_t sceneryId = get_scenery_id_by_cursor_pos(x, y); if (sceneryId == -1) return; - uint8 tabIndex = gWindowSceneryActiveTabIndex; + uint8_t tabIndex = gWindowSceneryActiveTabIndex; gWindowSceneryTabSelections[tabIndex] = sceneryId; gWindowSceneryPaintEnabled &= 0xFE; @@ -845,9 +845,9 @@ void window_scenery_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, * * rct2: 0x006E1BB8 */ -void window_scenery_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_scenery_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint16 sceneryId = get_scenery_id_by_cursor_pos(x, y); + int16_t sceneryId = get_scenery_id_by_cursor_pos(x, y); if (sceneryId != -1) { w->scenery.selected_scenery_id = sceneryId; window_invalidate(w); @@ -862,7 +862,7 @@ void window_scenery_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_stri { switch (widgetIndex) { case WIDX_SCENERY_LIST: - set_format_arg(0, uint16, STR_LIST); + set_format_arg(0, uint16_t, STR_LIST); break; case WIDX_SCENERY_TAB_1: case WIDX_SCENERY_TAB_2: @@ -897,8 +897,8 @@ void window_scenery_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_stri */ void window_scenery_invalidate(rct_window *w) { - uint16 tabIndex = gWindowSceneryActiveTabIndex; - uint32 titleStringId = STR_MISCELLANEOUS; + uint16_t tabIndex = gWindowSceneryActiveTabIndex; + uint32_t titleStringId = STR_MISCELLANEOUS; if (tabIndex < SCENERY_WINDOW_TABS - 1) { rct_scenery_group_entry * sgEntry = get_scenery_group_entry(tabIndex); if (sgEntry != nullptr) { @@ -925,7 +925,7 @@ void window_scenery_invalidate(rct_window *w) window_scenery_widgets[WIDX_SCENERY_EYEDROPPER_BUTTON].type = WWT_FLATBTN; } - sint16 tabSelectedSceneryId = gWindowSceneryTabSelections[tabIndex]; + int16_t tabSelectedSceneryId = gWindowSceneryTabSelections[tabIndex]; if (tabSelectedSceneryId != -1) { if (tabSelectedSceneryId < 0x100) { if (!(gWindowSceneryPaintEnabled & 1)) { @@ -1036,16 +1036,16 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) { window_draw_widgets(w, dpi); - uint16 tabIndex = gWindowSceneryActiveTabIndex; - uint16 selectedWidgetId = tabIndex + 4; - uint32 imageId = ((w->colours[1] << 19) | window_scenery_widgets[selectedWidgetId].image) + 1ul; + uint16_t tabIndex = gWindowSceneryActiveTabIndex; + uint16_t selectedWidgetId = tabIndex + 4; + uint32_t imageId = ((w->colours[1] << 19) | window_scenery_widgets[selectedWidgetId].image) + 1ul; gfx_draw_sprite(dpi, imageId, w->x + window_scenery_widgets[selectedWidgetId].left, w->y + window_scenery_widgets[selectedWidgetId].top, selectedWidgetId); - sint16 selectedSceneryEntryId = w->scenery.selected_scenery_id; + int16_t selectedSceneryEntryId = w->scenery.selected_scenery_id; if (selectedSceneryEntryId == -1) { if (gWindowSceneryPaintEnabled & 1) // repaint coloured scenery tool is on return; @@ -1058,7 +1058,7 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) return; } - uint32 price = 0; + uint32_t price = 0; rct_scenery_entry* sceneryEntry = nullptr; if (selectedSceneryEntryId >= 0x400) { @@ -1082,7 +1082,7 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) price = gSceneryPlaceCost; } - set_format_arg(0, uint32, price); + set_format_arg(0, uint32_t, price); if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { // -14 @@ -1099,18 +1099,18 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006E15ED */ -void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { gfx_clear(dpi, ColourMapA[w->colours[1]].mid_light); - uint8 tabIndex = gWindowSceneryActiveTabIndex; + uint8_t tabIndex = gWindowSceneryActiveTabIndex; - sint32 sceneryTabItemIndex = 0; - sint16 currentSceneryGlobalId = -1; - sint16 left = 0, top = 0; + int32_t sceneryTabItemIndex = 0; + int16_t currentSceneryGlobalId = -1; + int16_t left = 0, top = 0; while ((currentSceneryGlobalId = window_scenery_tab_entries[tabIndex][sceneryTabItemIndex]) != -1) { - uint16 tabSelectedSceneryId = gWindowSceneryTabSelections[tabIndex]; + uint16_t tabSelectedSceneryId = gWindowSceneryTabSelections[tabIndex]; if (gWindowSceneryPaintEnabled == 1 || gWindowSceneryEyedropperEnabled) { if (w->scenery.selected_scenery_id == currentSceneryGlobalId) { @@ -1134,7 +1134,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc if (clip_drawpixelinfo(&clipdpi, dpi, left + 1, top + 1, SCENERY_BUTTON_WIDTH - 2, SCENERY_BUTTON_HEIGHT - 2)) { if (currentSceneryGlobalId >= SCENERY_BANNERS_ID_MIN) { sceneryEntry = get_banner_entry(currentSceneryGlobalId - SCENERY_BANNERS_ID_MIN); - uint32 imageId = sceneryEntry->image + gWindowSceneryRotation * 2; + uint32_t imageId = sceneryEntry->image + gWindowSceneryRotation * 2; imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; gfx_draw_sprite(&clipdpi, imageId, 0x21, 0x28, w->colours[1]); @@ -1142,7 +1142,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc } else if (currentSceneryGlobalId >= SCENERY_LARGE_SCENERY_ID_MIN) { sceneryEntry = get_large_scenery_entry(currentSceneryGlobalId - SCENERY_LARGE_SCENERY_ID_MIN); - uint32 imageId = sceneryEntry->image + gWindowSceneryRotation; + uint32_t imageId = sceneryEntry->image + gWindowSceneryRotation; imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS; @@ -1150,9 +1150,9 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc } else if (currentSceneryGlobalId >= SCENERY_WALLS_ID_MIN) { sceneryEntry = get_wall_entry(currentSceneryGlobalId - SCENERY_WALLS_ID_MIN); - uint32 imageId = sceneryEntry->image; - uint8 tertiaryColour = w->colours[1]; - uint16 spriteTop = (sceneryEntry->wall.height * 2) + 0x32; + uint32_t imageId = sceneryEntry->image; + uint8_t tertiaryColour = w->colours[1]; + uint16_t spriteTop = (sceneryEntry->wall.height * 2) + 0x32; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_GLASS) { imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; @@ -1185,13 +1185,13 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc } else if (currentSceneryGlobalId >= SCENERY_PATH_SCENERY_ID_MIN) { sceneryEntry = get_footpath_item_entry(currentSceneryGlobalId - SCENERY_PATH_SCENERY_ID_MIN); - uint32 imageId = sceneryEntry->image; + uint32_t imageId = sceneryEntry->image; gfx_draw_sprite(&clipdpi, imageId, 0x0B, 0x10, w->colours[1]); } else { sceneryEntry = get_small_scenery_entry(currentSceneryGlobalId); - uint32 imageId = sceneryEntry->image + gWindowSceneryRotation; + uint32_t imageId = sceneryEntry->image + gWindowSceneryRotation; if (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) { imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; @@ -1201,7 +1201,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc } } - uint16 spriteTop = (sceneryEntry->small_scenery.height / 4) + 0x2B; + uint16_t spriteTop = (sceneryEntry->small_scenery.height / 4) + 0x2B; if (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_FULL_TILE) && scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_VOFFSET_CENTRE)) { @@ -1233,11 +1233,11 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc } } -static sint32 window_scenery_find_tab_with_scenery_id(sint32 sceneryId) +static int32_t window_scenery_find_tab_with_scenery_id(int32_t sceneryId) { - for (sint32 i = 0; i < SCENERY_WINDOW_TABS; i++) { - for (sint32 j = 0; j < SCENERY_ENTRIES_BY_TAB; j++) { - sint16 entry = window_scenery_tab_entries[i][j]; + for (int32_t i = 0; i < SCENERY_WINDOW_TABS; i++) { + for (int32_t j = 0; j < SCENERY_ENTRIES_BY_TAB; j++) { + int16_t entry = window_scenery_tab_entries[i][j]; if (entry == -1) break; if (entry == sceneryId) return i; } @@ -1245,12 +1245,12 @@ static sint32 window_scenery_find_tab_with_scenery_id(sint32 sceneryId) return -1; } -bool window_scenery_set_selected_item(sint32 sceneryId) +bool window_scenery_set_selected_item(int32_t sceneryId) { bool result = false; rct_window * w = window_bring_to_front_by_class(WC_SCENERY); if (w != nullptr) { - sint32 tabIndex = window_scenery_find_tab_with_scenery_id(sceneryId); + int32_t tabIndex = window_scenery_find_tab_with_scenery_id(sceneryId); if (tabIndex != -1) { gWindowSceneryActiveTabIndex = tabIndex; gWindowSceneryTabSelections[tabIndex] = sceneryId; diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index 9a963fb3bb..2c2451b13d 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -39,7 +39,7 @@ using namespace OpenRCT2::Network; static char _playerName[32 + 1]; static std::vector _serverEntries; static std::mutex _mutex; -static uint32 _numPlayersOnline = 0; +static uint32_t _numPlayersOnline = 0; static rct_string_id status_text = STR_SERVER_LIST_CONNECTING; // clang-format off @@ -74,15 +74,15 @@ static rct_widget window_server_list_widgets[] = { static void window_server_list_close(rct_window *w); static void window_server_list_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_server_list_resize(rct_window *w); -static void window_server_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_server_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_server_list_update(rct_window *w); -static void window_server_list_scroll_getsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_server_list_scroll_mousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_server_list_scroll_mouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_server_list_scroll_getsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_server_list_scroll_mousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_server_list_scroll_mouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_server_list_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_server_list_invalidate(rct_window *w); static void window_server_list_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_server_list_events = { window_server_list_close, @@ -121,10 +121,10 @@ enum { DDIDX_FAVOURITE }; -static sint32 _hoverButtonIndex = -1; +static int32_t _hoverButtonIndex = -1; static std::string _version; -static void server_list_get_item_button(sint32 buttonIndex, sint32 x, sint32 y, sint32 width, sint32 *outX, sint32 *outY); +static void server_list_get_item_button(int32_t buttonIndex, int32_t x, int32_t y, int32_t width, int32_t *outX, int32_t *outY); static void server_list_load_server_entries(); static void server_list_save_server_entries(); static void dispose_server_entry_list(); @@ -174,7 +174,7 @@ rct_window * window_server_list_open() safe_strcpy(_playerName, gConfigNetwork.player_name, sizeof(_playerName)); server_list_load_server_entries(); - window->no_list_items = (uint16)_serverEntries.size(); + window->no_list_items = (uint16_t)_serverEntries.size(); #ifndef DISABLE_HTTP fetch_servers(); @@ -201,8 +201,8 @@ static void window_server_list_mouseup(rct_window *w, rct_widgetindex widgetInde break; case WIDX_LIST: { - sint32 serverIndex = w->selected_list_item; - if (serverIndex >= 0 && serverIndex < (sint32)_serverEntries.size()) + int32_t serverIndex = w->selected_list_item; + if (serverIndex >= 0 && serverIndex < (int32_t)_serverEntries.size()) { const auto &server = _serverEntries[serverIndex]; if (is_version_valid(server.version)) @@ -236,10 +236,10 @@ static void window_server_list_resize(rct_window *w) window_set_resize(w, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); } -static void window_server_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_server_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { auto serverIndex = w->selected_list_item; - if (serverIndex >= 0 && serverIndex < (sint32)_serverEntries.size()) + if (serverIndex >= 0 && serverIndex < (int32_t)_serverEntries.size()) { auto &server = _serverEntries[serverIndex]; switch (dropdownIndex) @@ -274,21 +274,21 @@ static void window_server_list_update(rct_window *w) } } -static void window_server_list_scroll_getsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_server_list_scroll_getsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *width = 0; *height = w->no_list_items * ITEM_HEIGHT; } -static void window_server_list_scroll_mousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_server_list_scroll_mousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 serverIndex = w->selected_list_item; + int32_t serverIndex = w->selected_list_item; if (serverIndex < 0) return; - if (serverIndex >= (sint32)_serverEntries.size()) return; + if (serverIndex >= (int32_t)_serverEntries.size()) return; rct_widget *listWidget = &w->widgets[WIDX_LIST]; - sint32 ddx = w->x + listWidget->left + x + 2 - w->scrolls[0].h_left; - sint32 ddy = w->y + listWidget->top + y + 2 - w->scrolls[0].v_top; + int32_t ddx = w->x + listWidget->left + x + 2 - w->scrolls[0].h_left; + int32_t ddy = w->y + listWidget->top + y + 2 - w->scrolls[0].v_top; gDropdownItemsFormat[0] = STR_JOIN_GAME; if (_serverEntries[serverIndex].favourite) { @@ -299,20 +299,20 @@ static void window_server_list_scroll_mousedown(rct_window *w, sint32 scrollInde window_dropdown_show_text(ddx, ddy, 0, COLOUR_GREY, 0, 2); } -static void window_server_list_scroll_mouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_server_list_scroll_mouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { // Item - sint32 index = y / ITEM_HEIGHT; + int32_t index = y / ITEM_HEIGHT; if (index < 0 || index >= w->no_list_items) { index = -1; } - sint32 hoverButtonIndex = -1; + int32_t hoverButtonIndex = -1; if (index != -1) { - sint32 width = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; - sint32 sy = index * ITEM_HEIGHT; - for (sint32 i = 0; i < 2; i++) { - sint32 bx, by; + int32_t width = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; + int32_t sy = index * ITEM_HEIGHT; + for (int32_t i = 0; i < 2; i++) { + int32_t bx, by; server_list_get_item_button(i, 0, sy, width, &bx, &by); if (x >= bx && y >= by && x < bx + 24 && y < by + 24) { @@ -322,8 +322,8 @@ static void window_server_list_scroll_mouseover(rct_window *w, sint32 scrollInde } } - sint32 width = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; - sint32 right = width - 3 - 14 - 10; + int32_t width = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; + int32_t right = width - 3 - 14 - 10; if (x < right) { w->widgets[WIDX_LIST].tooltip = STR_NONE; @@ -385,11 +385,11 @@ static void window_server_list_invalidate(rct_window *w) window_server_list_widgets[WIDX_CLOSE].left = w->width - 2 - 11; window_server_list_widgets[WIDX_CLOSE].right = w->width - 2 - 11 + 10; - sint32 margin = 6; - sint32 buttonHeight = 13; - sint32 buttonTop = w->height - margin - buttonHeight - 13; - sint32 buttonBottom = buttonTop + buttonHeight; - sint32 listBottom = buttonTop - margin; + int32_t margin = 6; + int32_t buttonHeight = 13; + int32_t buttonTop = w->height - margin - buttonHeight - 13; + int32_t buttonBottom = buttonTop + buttonHeight; + int32_t listBottom = buttonTop - margin; window_server_list_widgets[WIDX_PLAYER_NAME_INPUT].right = w->width - 6; window_server_list_widgets[WIDX_LIST].left = 6; @@ -402,7 +402,7 @@ static void window_server_list_invalidate(rct_window *w) window_server_list_widgets[WIDX_START_SERVER].top = buttonTop; window_server_list_widgets[WIDX_START_SERVER].bottom = buttonBottom; - w->no_list_items = (uint16)_serverEntries.size(); + w->no_list_items = (uint16_t)_serverEntries.size(); } static void window_server_list_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -419,18 +419,18 @@ static void window_server_list_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, status_text, (void *)&_numPlayersOnline, COLOUR_WHITE, w->x + 8, w->y + w->height - 15); } -static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { std::lock_guard guard(_mutex); - uint8 paletteIndex = ColourMapA[w->colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light; gfx_clear(dpi, paletteIndex); - sint32 width = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; + int32_t width = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; - sint32 y = 0; + int32_t y = 0; w->widgets[WIDX_LIST].tooltip = STR_NONE; - for (sint32 i = 0; i < w->no_list_items; i++) { + for (int32_t i = 0; i < w->no_list_items; i++) { if (y >= dpi->y + dpi->height) continue; // if (y + ITEM_HEIGHT < dpi->y) continue; @@ -444,7 +444,7 @@ static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi w->widgets[WIDX_LIST].tooltip = STR_NETWORK_VERSION_TIP; } - sint32 colour = w->colours[1]; + int32_t colour = w->colours[1]; if (serverDetails->favourite) { colour = COLOUR_YELLOW; } @@ -456,11 +456,11 @@ static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi gfx_draw_string(dpi, serverDetails->name.c_str(), colour, 3, y + 3); } - sint32 right = width - 3 - 14; + int32_t right = width - 3 - 14; // Draw compatibility icon right -= 10; - sint32 compatibilitySpriteId; + int32_t compatibilitySpriteId; if (serverDetails->version.empty()) { // Server not online... compatibilitySpriteId = SPR_G2_RCT1_CLOSE_BUTTON_0; @@ -485,14 +485,14 @@ static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi if (serverDetails->maxplayers > 0) { snprintf(players, 32, "%d/%d", serverDetails->players, serverDetails->maxplayers); } - sint32 numPlayersStringWidth = gfx_get_string_width(players); + int32_t numPlayersStringWidth = gfx_get_string_width(players); gfx_draw_string(dpi, players, w->colours[1], right - numPlayersStringWidth, y + 3); y += ITEM_HEIGHT; } } -static void server_list_get_item_button(sint32 buttonIndex, sint32 x, sint32 y, sint32 width, sint32 *outX, sint32 *outY) +static void server_list_get_item_button(int32_t buttonIndex, int32_t x, int32_t y, int32_t width, int32_t *outX, int32_t *outY) { *outX = width - 3 - 36 - (30 * buttonIndex); *outY = y + 2; @@ -587,7 +587,7 @@ static void sort_servers() static void join_server(std::string address) { - sint32 port = gConfigNetwork.default_port; + int32_t port = gConfigNetwork.default_port; auto beginBracketIndex = address.find('['); auto endBracketIndex = address.find(']'); auto dotIndex = address.find('.'); @@ -642,13 +642,13 @@ static void fetch_servers() Http::DoAsync(request, fetch_servers_callback); } -static uint32 get_total_player_count() +static uint32_t get_total_player_count() { return std::accumulate( _serverEntries.begin(), _serverEntries.end(), 0, - [](uint32 acc, const server_entry &entry) + [](uint32_t acc, const server_entry &entry) { return acc + entry.players; }); @@ -673,7 +673,7 @@ static void fetch_servers_callback(Http::Response & response) return; } - sint32 status = (sint32)json_integer_value(jsonStatus); + int32_t status = (int32_t)json_integer_value(jsonStatus); if (status != 200) { status_text = STR_SERVER_LIST_MASTER_SERVER_FAILED; window_invalidate_by_class(WC_SERVER_LIST); @@ -689,8 +689,8 @@ static void fetch_servers_callback(Http::Response & response) return; } - sint32 count = (sint32)json_array_size(jsonServers); - for (sint32 i = 0; i < count; i++) { + int32_t count = (int32_t)json_array_size(jsonServers); + for (int32_t i = 0; i < count; i++) { json_t *server = json_array_get(jsonServers, i); if (!json_is_object(server)) { continue; @@ -713,7 +713,7 @@ static void fetch_servers_callback(Http::Response & response) continue; } - auto address = String::StdFormat("%s:%d", json_string_value(addressIp), (sint32)json_integer_value(port)); + auto address = String::StdFormat("%s:%d", json_string_value(addressIp), (int32_t)json_integer_value(port)); { std::lock_guard guard(_mutex); auto &newserver = add_server_entry(address); @@ -721,8 +721,8 @@ static void fetch_servers_callback(Http::Response & response) newserver.requiresPassword = json_is_true(requiresPassword); newserver.description = (description == nullptr ? "" : json_string_value(description)); newserver.version = json_string_value(version); - newserver.players = (uint8)json_integer_value(players); - newserver.maxplayers = (uint8)json_integer_value(maxPlayers); + newserver.players = (uint8_t)json_integer_value(players); + newserver.maxplayers = (uint8_t)json_integer_value(maxPlayers); } } diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index ed1cffbd3a..1cb4d2447f 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -166,7 +166,7 @@ static void window_server_start_scenarioselect_callback(const utf8 *path) } } -static void window_server_start_loadsave_callback(sint32 result, const utf8 * path) +static void window_server_start_loadsave_callback(int32_t result, const utf8 * path) { if (result == MODAL_RESULT_OK && context_load_park_from_file(path)) { network_begin_server(gConfigNetwork.default_port, gConfigNetwork.listen_address); @@ -326,7 +326,7 @@ static void window_server_start_invalidate(rct_window *w) colour_scheme_update_by_class(w, WC_SERVER_LIST); widget_set_checkbox_value(w, WIDX_ADVERTISE_CHECKBOX, gConfigNetwork.advertise); - set_format_arg(18, uint16, gConfigNetwork.maxplayers); + set_format_arg(18, uint16_t, gConfigNetwork.maxplayers); } static void window_server_start_paint(rct_window *w, rct_drawpixelinfo *dpi) diff --git a/src/openrct2-ui/windows/ShortcutKeyChange.cpp b/src/openrct2-ui/windows/ShortcutKeyChange.cpp index 44c6e475de..05720fa39f 100644 --- a/src/openrct2-ui/windows/ShortcutKeyChange.cpp +++ b/src/openrct2-ui/windows/ShortcutKeyChange.cpp @@ -70,7 +70,7 @@ static rct_window_event_list window_shortcut_change_events = { }; // clang-format on -rct_window * window_shortcut_change_open(sint32 selected_key) +rct_window * window_shortcut_change_open(int32_t selected_key) { // Move this to window_shortcut_change_open window_close_by_class(WC_CHANGE_KEYBOARD_SHORTCUT); @@ -105,8 +105,8 @@ static void window_shortcut_change_paint(rct_window *w, rct_drawpixelinfo *dpi) { window_draw_widgets(w, dpi); - sint32 x = w->x + 125; - sint32 y = w->y + 30; + int32_t x = w->x + 125; + int32_t y = w->y + 30; set_format_arg(0, rct_string_id, ShortcutStringIds[gKeyboardShortcutChangeId]); gfx_draw_string_centred_wrapped(dpi, gCommonFormatArgs, x, y, 242, STR_SHORTCUT_CHANGE_PROMPT, COLOUR_BLACK); diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index f28579909a..cf871f7dd3 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -45,10 +45,10 @@ static void window_shortcut_resize(rct_window *w); static void window_shortcut_invalidate(rct_window *w); static void window_shortcut_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_shortcut_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); -static void window_shortcut_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_shortcut_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_shortcut_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_shortcut_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_shortcut_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_shortcut_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_shortcut_events = { nullptr, @@ -236,7 +236,7 @@ static void window_shortcut_tooltip(rct_window* w, rct_widgetindex widgetIndex, * * rct2: 0x006E3A07 */ -static void window_shortcut_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_shortcut_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *height = w->no_list_items * SCROLLABLE_ROW_HEIGHT; } @@ -245,9 +245,9 @@ static void window_shortcut_scrollgetsize(rct_window *w, sint32 scrollIndex, sin * * rct2: 0x006E3A3E */ -static void window_shortcut_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_shortcut_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 selected_item = (y - 1) / SCROLLABLE_ROW_HEIGHT; + int32_t selected_item = (y - 1) / SCROLLABLE_ROW_HEIGHT; if (selected_item >= w->no_list_items) return; @@ -258,9 +258,9 @@ static void window_shortcut_scrollmousedown(rct_window *w, sint32 scrollIndex, s * * rct2: 0x006E3A16 */ -static void window_shortcut_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_shortcut_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 selected_item = (y - 1) / SCROLLABLE_ROW_HEIGHT; + int32_t selected_item = (y - 1) / SCROLLABLE_ROW_HEIGHT; if (selected_item >= w->no_list_items) return; @@ -273,13 +273,13 @@ static void window_shortcut_scrollmouseover(rct_window *w, sint32 scrollIndex, s * * rct2: 0x006E38E6 */ -static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); - for (sint32 i = 0; i < w->no_list_items; ++i) + for (int32_t i = 0; i < w->no_list_items; ++i) { - sint32 y = 1 + i * SCROLLABLE_ROW_HEIGHT; + int32_t y = 1 + i * SCROLLABLE_ROW_HEIGHT; if (y > dpi->y + dpi->height) { break; @@ -290,7 +290,7 @@ static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, s continue; } - sint32 format = STR_BLACK_STRING; + int32_t format = STR_BLACK_STRING; if (i == w->selected_list_item) { format = STR_WINDOW_COLOUR_2_STRINGID; diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index 3dc49669f7..7e288a7c82 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -54,7 +54,7 @@ static rct_widget window_sign_widgets[] = { static void window_sign_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_sign_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_sign_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_sign_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_sign_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_sign_viewport_rotate(rct_window *w); static void window_sign_invalidate(rct_window *w); @@ -94,7 +94,7 @@ static rct_window_event_list window_sign_events = { }; static void window_sign_small_mouseup(rct_window *w, rct_widgetindex widgetIndex); -static void window_sign_small_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_sign_small_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_sign_small_invalidate(rct_window *w); // 0x9A410C @@ -157,8 +157,8 @@ rct_window * window_sign_open(rct_windownumber number) w->number = number; window_init_scroll_widgets(w); - sint32 view_x = gBanners[w->number].x << 5; - sint32 view_y = gBanners[w->number].y << 5; + int32_t view_x = gBanners[w->number].x << 5; + int32_t view_y = gBanners[w->number].y << 5; rct_tile_element* tile_element = map_get_first_element_at(view_x / 32, view_y / 32); @@ -178,7 +178,7 @@ rct_window * window_sign_open(rct_windownumber number) tile_element++; } - sint32 view_z = tile_element->base_height << 3; + int32_t view_z = tile_element->base_height << 3; w->frame_no = view_z; w->list_information_type = scenery_large_get_primary_colour(tile_element); @@ -217,8 +217,8 @@ rct_window * window_sign_open(rct_windownumber number) static void window_sign_mouseup(rct_window *w, rct_widgetindex widgetIndex) { rct_banner* banner = &gBanners[w->number]; - sint32 x = banner->x << 5; - sint32 y = banner->y << 5; + int32_t x = banner->x << 5; + int32_t y = banner->y << 5; rct_string_id string_id; @@ -256,7 +256,7 @@ static void window_sign_mouseup(rct_window *w, rct_widgetindex widgetIndex) if (banner->flags & BANNER_FLAG_LINKED_TO_RIDE) { Ride* ride = get_ride(banner->ride_index); - set_format_arg(16, uint32, ride->name_arguments); + set_format_arg(16, uint32_t, ride->name_arguments); string_id = ride->name; } else @@ -276,10 +276,10 @@ static void window_sign_mousedown(rct_window *w, rct_widgetindex widgetIndex, rc { switch (widgetIndex) { case WIDX_MAIN_COLOUR: - window_dropdown_show_colour(w, widget, TRANSLUCENT(w->colours[1]), (uint8)w->list_information_type); + window_dropdown_show_colour(w, widget, TRANSLUCENT(w->colours[1]), (uint8_t)w->list_information_type); break; case WIDX_TEXT_COLOUR: - window_dropdown_show_colour(w, widget, TRANSLUCENT(w->colours[1]), (uint8)w->var_492); + window_dropdown_show_colour(w, widget, TRANSLUCENT(w->colours[1]), (uint8_t)w->var_492); break; } } @@ -288,7 +288,7 @@ static void window_sign_mousedown(rct_window *w, rct_widgetindex widgetIndex, rc * * rct2: 0x6B979C */ -static void window_sign_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_sign_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { switch (widgetIndex){ case WIDX_MAIN_COLOUR: @@ -373,9 +373,9 @@ static void window_sign_viewport_rotate(rct_window *w) rct_banner* banner = &gBanners[w->number]; - sint32 view_x = (banner->x << 5) + 16; - sint32 view_y = (banner->y << 5) + 16; - sint32 view_z = w->frame_no; + int32_t view_x = (banner->x << 5) + 16; + int32_t view_y = (banner->y << 5) + 16; + int32_t view_z = w->frame_no; // Create viewport rct_widget* viewportWidget = &window_sign_widgets[WIDX_VIEWPORT]; @@ -427,8 +427,8 @@ rct_window * window_sign_small_open(rct_windownumber number){ w->colours[1] = COLOUR_DARK_BROWN; w->colours[2] = COLOUR_DARK_BROWN; - sint32 view_x = gBanners[w->number].x << 5; - sint32 view_y = gBanners[w->number].y << 5; + int32_t view_x = gBanners[w->number].x << 5; + int32_t view_y = gBanners[w->number].y << 5; rct_tile_element* tile_element = map_get_first_element_at(view_x / 32, view_y / 32); @@ -443,7 +443,7 @@ rct_window * window_sign_small_open(rct_windownumber number){ tile_element++; } - sint32 view_z = tile_element->base_height << 3; + int32_t view_z = tile_element->base_height << 3; w->frame_no = view_z; w->list_information_type = wall_get_primary_colour(tile_element); @@ -483,8 +483,8 @@ rct_window * window_sign_small_open(rct_windownumber number){ static void window_sign_small_mouseup(rct_window *w, rct_widgetindex widgetIndex) { rct_banner* banner = &gBanners[w->number]; - sint32 x = banner->x << 5; - sint32 y = banner->y << 5; + int32_t x = banner->x << 5; + int32_t y = banner->y << 5; rct_string_id string_id; @@ -518,7 +518,7 @@ static void window_sign_small_mouseup(rct_window *w, rct_widgetindex widgetIndex if (banner->flags & BANNER_FLAG_LINKED_TO_RIDE) { Ride* ride = get_ride(banner->ride_index); - set_format_arg(16, uint32, ride->name_arguments); + set_format_arg(16, uint32_t, ride->name_arguments); string_id = ride->name; } else @@ -534,7 +534,7 @@ static void window_sign_small_mouseup(rct_window *w, rct_widgetindex widgetIndex * * rct2: 0x6E617C */ -static void window_sign_small_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_sign_small_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { switch (widgetIndex){ case WIDX_MAIN_COLOUR: diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 5db8c2f152..756cd873ef 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -122,7 +122,7 @@ static rct_widget *window_staff_page_widgets[] = { window_staff_stats_widgets }; -static void window_staff_set_page(rct_window* w, sint32 page); +static void window_staff_set_page(rct_window* w, int32_t page); static void window_staff_disable_widgets(rct_window* w); static void window_staff_unknown_05(rct_window *w); static void window_staff_viewport_init(rct_window* w); @@ -131,13 +131,13 @@ static void window_staff_overview_close(rct_window *w); static void window_staff_overview_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_staff_overview_resize(rct_window *w); static void window_staff_overview_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_staff_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_staff_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_staff_overview_update(rct_window* w); static void window_staff_overview_invalidate(rct_window *w); static void window_staff_overview_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi); -static void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_staff_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_staff_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_staff_overview_tool_abort(rct_window *w, rct_widgetindex widgetIndex); static void window_staff_overview_text_input(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_staff_overview_viewport_rotate(rct_window *w); @@ -148,7 +148,7 @@ static void window_staff_options_invalidate(rct_window *w); static void window_staff_options_paint(rct_window *w, rct_drawpixelinfo *dpi); static void window_staff_options_tab_paint(rct_window* w, rct_drawpixelinfo* dpi); static void window_staff_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_staff_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_staff_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_staff_stats_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_staff_stats_resize(rct_window *w); @@ -261,7 +261,7 @@ static rct_window_event_list *window_staff_page_events[] = { &window_staff_stats_events }; -static constexpr const uint32 window_staff_page_enabled_widgets[] = { +static constexpr const uint32_t window_staff_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | @@ -289,7 +289,7 @@ static constexpr const uint32 window_staff_page_enabled_widgets[] = { }; // clang-format on -static uint8 _availableCostumes[ENTERTAINER_COSTUME_COUNT]; +static uint8_t _availableCostumes[ENTERTAINER_COSTUME_COUNT]; /** * @@ -338,7 +338,7 @@ rct_window *window_staff_open(rct_peep* peep) void window_staff_disable_widgets(rct_window* w) { rct_peep* peep = &get_sprite(w->number)->peep; - uint64 disabled_widgets = (1 << WIDX_TAB_4); + uint64_t disabled_widgets = (1 << WIDX_TAB_4); if (peep->staff_type == STAFF_TYPE_SECURITY){ disabled_widgets |= (1 << WIDX_TAB_2); @@ -376,7 +376,7 @@ void window_staff_overview_close(rct_window *w) * Mostly similar to window_peep_set_page. * rct2: 0x006BE023 */ -void window_staff_set_page(rct_window* w, sint32 page) +void window_staff_set_page(rct_window* w, int32_t page) { if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) { @@ -386,7 +386,7 @@ void window_staff_set_page(rct_window* w, sint32 page) } - sint32 listen = 0; + int32_t listen = 0; if (page == WINDOW_STAFF_OVERVIEW && w->page == WINDOW_STAFF_OVERVIEW && w->viewport){ if (!(w->viewport->flags & VIEWPORT_FLAG_SOUND_ON)) listen = 1; @@ -443,7 +443,7 @@ void window_staff_overview_mouseup(rct_window *w, rct_widgetindex widgetIndex) case WIDX_PICKUP: { // this is called in callback when hiring staff, setting nestlevel to 0 so that command is sent separately - sint32 oldNestLevel = gGameCommandNestLevel; + int32_t oldNestLevel = gGameCommandNestLevel; gGameCommandNestLevel = 0; game_command_callback = game_command_callback_pickup_staff; w->picked_peep_old_x = peep->x; @@ -500,8 +500,8 @@ void window_staff_overview_resize(rct_window *w) rct_viewport* viewport = w->viewport; if (viewport) { - sint32 new_width = w->width - 30; - sint32 new_height = w->height - 62; + int32_t new_width = w->width - 30; + int32_t new_height = w->height - 62; // Update the viewport size if (viewport->width != new_width || viewport->height != new_height) { @@ -529,9 +529,9 @@ void window_staff_overview_mousedown(rct_window *w, rct_widgetindex widgetIndex, gDropdownItemsFormat[0] = STR_SET_PATROL_AREA; gDropdownItemsFormat[1] = STR_CLEAR_PATROL_AREA; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; - sint32 extray = widget->bottom - widget->top + 1; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; + int32_t extray = widget->bottom - widget->top + 1; window_dropdown_show_text(x, y, extray, w->colours[1], 0, 2); gDropdownDefaultIndex = 0; @@ -547,7 +547,7 @@ void window_staff_overview_mousedown(rct_window *w, rct_widgetindex widgetIndex, * * rct2: 0x006BDFA3 */ -void window_staff_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +void window_staff_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_PATROL) { return; @@ -556,7 +556,7 @@ void window_staff_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, // Clear patrol if (dropdownIndex == 1) { rct_peep* peep = GET_PEEP(w->number); - for (sint32 i = 0; i < STAFF_PATROL_AREA_SIZE; i++) { + for (int32_t i = 0; i < STAFF_PATROL_AREA_SIZE; i++) { gStaffPatrolAreas[peep->staff_id * STAFF_PATROL_AREA_SIZE + i] = 0; } gStaffModes[peep->staff_id] &= ~2; @@ -579,7 +579,7 @@ void window_staff_overview_dropdown(rct_window *w, rct_widgetindex widgetIndex, */ void window_staff_overview_update(rct_window* w) { - sint32 var_496 = w->var_496; + int32_t var_496 = w->var_496; var_496++; if (var_496 >= 24) { var_496 = 0; @@ -592,12 +592,12 @@ void window_staff_overview_update(rct_window* w) * * rct2: 0x006BE814 */ -static void window_staff_set_order(rct_window* w, sint32 order_id) +static void window_staff_set_order(rct_window* w, int32_t order_id) { rct_peep* peep = GET_PEEP(w->number); - sint32 ax = peep->staff_orders ^ (1 << order_id); - sint32 flags = (ax << 8) | 1; + int32_t ax = peep->staff_orders ^ (1 << order_id); + int32_t flags = (ax << 8) | 1; game_do_command(peep->x, flags, peep->y, w->number, GAME_COMMAND_SET_STAFF_ORDER, 0, 0); } @@ -729,7 +729,7 @@ void window_staff_stats_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); window_staff_stats_widgets[WIDX_BACKGROUND].right = w->width - 1; window_staff_stats_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -764,7 +764,7 @@ void window_staff_options_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); switch (peep->staff_type){ case STAFF_TYPE_ENTERTAINER: @@ -839,7 +839,7 @@ void window_staff_overview_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); window_staff_overview_widgets[WIDX_BACKGROUND].right = w->width - 1; window_staff_overview_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -899,15 +899,15 @@ void window_staff_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Draw the centred label - uint32 argument1, argument2; + uint32_t argument1, argument2; rct_peep* peep = GET_PEEP(w->number); get_arguments_from_action(peep, &argument1, &argument2); - set_format_arg(0, uint32, argument1); - set_format_arg(4, uint32, argument2); + set_format_arg(0, uint32_t, argument1); + set_format_arg(4, uint32_t, argument2); rct_widget* widget = &w->widgets[WIDX_BTM_LABEL]; - sint32 x = (widget->left + widget->right) / 2 + w->x; - sint32 y = w->y + widget->top; - sint32 width = widget->right - widget->left; + int32_t x = (widget->left + widget->right) / 2 + w->x; + int32_t y = w->y + widget->top; + int32_t width = widget->right - widget->left; gfx_draw_string_centred_clipped(dpi, STR_BLACK_STRING, gCommonFormatArgs, COLOUR_BLACK, x, y, width); } @@ -920,10 +920,10 @@ void window_staff_options_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) if (w->disabled_widgets & (1 << WIDX_TAB_2)) return; rct_widget* widget = &w->widgets[WIDX_TAB_2]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; - sint32 image_id = SPR_TAB_STAFF_OPTIONS_0; + int32_t image_id = SPR_TAB_STAFF_OPTIONS_0; if (w->page == WINDOW_STAFF_OPTIONS){ image_id += (w->frame_no / 2) % 7; @@ -941,10 +941,10 @@ void window_staff_stats_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) if (w->disabled_widgets & (1 << WIDX_TAB_3)) return; rct_widget* widget = &w->widgets[WIDX_TAB_3]; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; - sint32 image_id = SPR_TAB_STATS_0; + int32_t image_id = SPR_TAB_STATS_0; if (w->page == WINDOW_STAFF_STATISTICS){ image_id += (w->frame_no / 4) % 7; @@ -962,10 +962,10 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) return; rct_widget* widget = &w->widgets[WIDX_TAB_1]; - sint32 width = widget->right - widget->left - 1; - sint32 height = widget->bottom - widget->top - 1; - sint32 x = widget->left + 1 + w->x; - sint32 y = widget->top + 1 + w->y; + int32_t width = widget->right - widget->left - 1; + int32_t height = widget->bottom - widget->top - 1; + int32_t x = widget->left + 1 + w->x; + int32_t y = widget->top + 1 + w->y; if (w->page == WINDOW_STAFF_OVERVIEW) height++; rct_drawpixelinfo clip_dpi; @@ -981,9 +981,9 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) if (peep->type == PEEP_TYPE_STAFF && peep->staff_type == STAFF_TYPE_ENTERTAINER) y++; - sint32 ebx = g_peep_animation_entries[peep->sprite_type].sprite_animation->base_image + 1; + int32_t ebx = g_peep_animation_entries[peep->sprite_type].sprite_animation->base_image + 1; - sint32 eax = 0; + int32_t eax = 0; if (w->page == WINDOW_STAFF_OVERVIEW){ eax = w->highlighted_item >> 16; @@ -991,7 +991,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) } ebx += eax; - sint32 sprite_id = ebx | SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour , peep->trousers_colour); + int32_t sprite_id = ebx | SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour , peep->trousers_colour); gfx_draw_sprite(&clip_dpi, sprite_id, x, y, 0); // If holding a balloon @@ -1041,8 +1041,8 @@ void window_staff_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep* peep = GET_PEEP(w->number); - sint32 x = w->x + window_staff_stats_widgets[WIDX_RESIZE].left + 4; - sint32 y = w->y + window_staff_stats_widgets[WIDX_RESIZE].top + 4; + int32_t x = w->x + window_staff_stats_widgets[WIDX_RESIZE].left + 4; + int32_t y = w->y + window_staff_stats_widgets[WIDX_RESIZE].top + 4; if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { set_format_arg(0, money32, wage_table[peep->staff_type]); @@ -1075,7 +1075,7 @@ void window_staff_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006BDFD8 */ -void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex != WIDX_PICKUP) return; @@ -1084,7 +1084,7 @@ void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetInde gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - sint32 map_x, map_y; + int32_t map_x, map_y; footpath_get_coordinates_from_pos(x, y + 16, &map_x, &map_y, nullptr, nullptr); if (map_x != LOCATION_NULL) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -1098,7 +1098,7 @@ void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetInde gPickupPeepImage = UINT32_MAX; - sint32 interactionType; + int32_t interactionType; get_map_coordinates_from_pos(x, y, VIEWPORT_INTERACTION_MASK_NONE, nullptr, nullptr, &interactionType, nullptr, nullptr); if (interactionType == VIEWPORT_INTERACTION_ITEM_NONE) return; @@ -1115,7 +1115,7 @@ void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetInde rct_peep* peep; peep = GET_PEEP(w->number); - uint32 imageId = g_peep_animation_entries[peep->sprite_type].sprite_animation[PEEP_ACTION_SPRITE_TYPE_UI].base_image; + uint32_t imageId = g_peep_animation_entries[peep->sprite_type].sprite_animation[PEEP_ACTION_SPRITE_TYPE_UI].base_image; imageId += w->picked_peep_frame >> 2; imageId |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; @@ -1126,10 +1126,10 @@ void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetInde * * rct2: 0x006BDFC3 */ -void window_staff_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_staff_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_PICKUP) { - sint32 dest_x, dest_y; + int32_t dest_x, dest_y; rct_tile_element* tileElement; footpath_get_coordinates_from_pos(x, y + 16, &dest_x, &dest_y, nullptr, &tileElement); @@ -1140,7 +1140,7 @@ void window_staff_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex, game_do_command(w->number, GAME_COMMAND_FLAG_APPLY, 2, tileElement->base_height, GAME_COMMAND_PICKUP_STAFF, dest_x, dest_y); } else if (widgetIndex == WIDX_PATROL){ - sint32 dest_x, dest_y; + int32_t dest_x, dest_y; footpath_get_coordinates_from_pos(x, y, &dest_x, &dest_y, nullptr, nullptr); if (dest_x == LOCATION_NULL) return; @@ -1206,7 +1206,7 @@ void window_staff_viewport_init(rct_window* w){ focus.rotation = get_current_rotation(); } - uint16 viewport_flags; + uint16_t viewport_flags; if (w->viewport){ //Check all combos, for now skipping y and rot @@ -1235,10 +1235,10 @@ void window_staff_viewport_init(rct_window* w){ if (!(w->viewport)){ rct_widget* view_widget = &w->widgets[WIDX_VIEWPORT]; - sint32 x = view_widget->left + 1 + w->x; - sint32 y = view_widget->top + 1 + w->y; - sint32 width = view_widget->right - view_widget->left - 1; - sint32 height = view_widget->bottom - view_widget->top - 1; + int32_t x = view_widget->left + 1 + w->x; + int32_t y = view_widget->top + 1 + w->y; + int32_t width = view_widget->right - view_widget->left - 1; + int32_t height = view_widget->bottom - view_widget->top - 1; viewport_create(w, x, y, width, height, 0, 0, 0, 0, focus.type & VIEWPORT_FOCUS_TYPE_MASK, focus.sprite_id); w->flags |= WF_NO_SCROLLING; @@ -1262,13 +1262,13 @@ void window_staff_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, } rct_peep* peep = GET_PEEP(w->number); - sint32 checkedIndex = -1; + int32_t checkedIndex = -1; //This will be moved below where Items Checked is when all //of dropdown related functions are finished. This prevents //the dropdown from not working on first click. - sint32 numCostumes = staff_get_available_entertainer_costume_list(_availableCostumes); - for (sint32 i = 0; i < numCostumes; i++) { - uint8 costume = _availableCostumes[i]; + int32_t numCostumes = staff_get_available_entertainer_costume_list(_availableCostumes); + for (int32_t i = 0; i < numCostumes; i++) { + uint8_t costume = _availableCostumes[i]; if (peep->sprite_type == PEEP_SPRITE_TYPE_ENTERTAINER_PANDA + costume) { checkedIndex = i; } @@ -1279,10 +1279,10 @@ void window_staff_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, //Get the dropdown box widget instead of button. widget--; - sint32 x = widget->left + w->x; - sint32 y = widget->top + w->y; - sint32 extray = widget->bottom - widget->top + 1; - sint32 width = widget->right - widget->left - 3; + int32_t x = widget->left + w->x; + int32_t y = widget->top + w->y; + int32_t extray = widget->bottom - widget->top + 1; + int32_t width = widget->right - widget->left - 3; window_dropdown_show_text_custom_width(x, y, extray, w->colours[1], 0, DROPDOWN_FLAG_STAY_OPEN, numCostumes, width); // See above note. @@ -1296,7 +1296,7 @@ void window_staff_options_mousedown(rct_window *w, rct_widgetindex widgetIndex, * * rct2: 0x6BE809 */ -void window_staff_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +void window_staff_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_COSTUME_BTN) { return; @@ -1306,6 +1306,6 @@ void window_staff_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, s return; rct_peep* peep = GET_PEEP(w->number); - sint32 costume = _availableCostumes[dropdownIndex] | 0x80; + int32_t costume = _availableCostumes[dropdownIndex] | 0x80; game_do_command(peep->x, (costume << 8) | 1, peep->y, w->number, GAME_COMMAND_SET_STAFF_ORDER, 0, 0); } diff --git a/src/openrct2-ui/windows/StaffFirePrompt.cpp b/src/openrct2-ui/windows/StaffFirePrompt.cpp index 23b6592159..f6cef626c7 100644 --- a/src/openrct2-ui/windows/StaffFirePrompt.cpp +++ b/src/openrct2-ui/windows/StaffFirePrompt.cpp @@ -126,10 +126,10 @@ static void window_staff_fire_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep* peep = &get_sprite(w->number)->peep; set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); - sint32 x = w->x + WW / 2; - sint32 y = w->y + (WH / 2) - 3; + int32_t x = w->x + WW / 2; + int32_t y = w->y + (WH / 2) - 3; gfx_draw_string_centred_wrapped(dpi, gCommonFormatArgs, x, y, WW - 4, STR_FIRE_STAFF_ID, COLOUR_BLACK); } diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 10df80386a..e244c33090 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -43,17 +43,17 @@ static void window_staff_list_close(rct_window *w); static void window_staff_list_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_staff_list_resize(rct_window *w); static void window_staff_list_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_staff_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_staff_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_staff_list_update(rct_window *w); -static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_staff_list_toolabort(rct_window *w, rct_widgetindex widgetIndex); -static void window_staff_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_staff_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_staff_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_staff_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_staff_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_staff_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_staff_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_staff_list_invalidate(rct_window *w); static void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_staff_list_events = { window_staff_list_close, @@ -126,11 +126,11 @@ static rct_widget window_staff_list_widgets[] = { { WIDGETS_END }, }; -static uint16 _window_staff_list_selected_type_count = 0; -static sint32 _windowStaffListHighlightedIndex; -static sint32 _windowStaffListSelectedTab = WINDOW_STAFF_LIST_TAB_HANDYMEN; +static uint16_t _window_staff_list_selected_type_count = 0; +static int32_t _windowStaffListHighlightedIndex; +static int32_t _windowStaffListSelectedTab = WINDOW_STAFF_LIST_TAB_HANDYMEN; -static uint8 window_staff_list_get_random_entertainer_costume(); +static uint8_t window_staff_list_get_random_entertainer_costume(); struct staff_naming_convention { @@ -213,10 +213,10 @@ static void window_staff_list_mouseup(rct_window *w, rct_widgetindex widgetIndex break; case WIDX_STAFF_LIST_HIRE_BUTTON: { - sint32 staffType = _windowStaffListSelectedTab; + int32_t staffType = _windowStaffListSelectedTab; if (staffType == STAFF_TYPE_ENTERTAINER) { - uint8 costume = window_staff_list_get_random_entertainer_costume(); + uint8_t costume = window_staff_list_get_random_entertainer_costume(); staffType += costume; } hire_new_staff_member(staffType); @@ -264,7 +264,7 @@ static void window_staff_list_resize(rct_window *w) */ static void window_staff_list_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - sint16 newSelectedTab; + int16_t newSelectedTab; switch (widgetIndex) { case WIDX_STAFF_LIST_HANDYMEN_TAB: @@ -274,7 +274,7 @@ static void window_staff_list_mousedown(rct_window *w, rct_widgetindex widgetInd newSelectedTab = widgetIndex - WIDX_STAFF_LIST_HANDYMEN_TAB;; if (_windowStaffListSelectedTab == newSelectedTab) break; - _windowStaffListSelectedTab = (uint8)newSelectedTab; + _windowStaffListSelectedTab = (uint8_t)newSelectedTab; window_invalidate(w); w->scrolls[0].v_top = 0; window_staff_list_cancel_tools(w); @@ -291,7 +291,7 @@ static void window_staff_list_mousedown(rct_window *w, rct_widgetindex widgetInd * * rct2: 0x006BD9A6 */ -static void window_staff_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_staff_list_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER && dropdownIndex != -1) { @@ -314,7 +314,7 @@ void window_staff_list_update(rct_window *w) // Enable highlighting of these staff members in map window if (window_find_by_class(WC_MAP) != nullptr) { - sint32 spriteIndex; + int32_t spriteIndex; rct_peep * peep; gWindowMapFlashingFlags |= (1 << 2); FOR_ALL_STAFF(spriteIndex, peep) { @@ -332,12 +332,12 @@ void window_staff_list_update(rct_window *w) * * rct2: 0x006BD990 */ -static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (widgetIndex == WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON) { - sint32 selectedPeepType = _windowStaffListSelectedTab; + int32_t selectedPeepType = _windowStaffListSelectedTab; - sint32 direction; + int32_t direction; rct_tile_element *tileElement; footpath_get_coordinates_from_pos(x, y, &x, &y, &direction, &tileElement); if (x == 0x8000) @@ -345,9 +345,9 @@ static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetInde bool isPatrolAreaSet = staff_is_patrol_area_set(200 + selectedPeepType, x, y); - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep *peep, *closestPeep = nullptr; - sint32 closestPeepDistance = std::numeric_limits::max(); + int32_t closestPeepDistance = std::numeric_limits::max(); FOR_ALL_STAFF(spriteIndex, peep) { if (peep->staff_type != selectedPeepType) continue; @@ -365,7 +365,7 @@ static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetInde continue; } - sint32 distance = abs(x - peep->x) + abs(y - peep->y); + int32_t distance = abs(x - peep->x) + abs(y - peep->y); if (distance < closestPeepDistance) { closestPeepDistance = distance; closestPeep = peep; @@ -401,12 +401,12 @@ void window_staff_list_toolabort(rct_window *w, rct_widgetindex widgetIndex) * * rct2: 0x006BDBE6 */ -void window_staff_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +void window_staff_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - sint32 i, spriteIndex; + int32_t i, spriteIndex; rct_peep *peep; - uint16 staffCount = 0; + uint16_t staffCount = 0; FOR_ALL_STAFF(spriteIndex, peep) { if (peep->staff_type == _windowStaffListSelectedTab) staffCount++; @@ -435,9 +435,9 @@ void window_staff_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 * * * rct2: 0x006BDC9A */ -void window_staff_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_staff_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 i, spriteIndex; + int32_t i, spriteIndex; rct_peep *peep; i = y / SCROLLABLE_ROW_HEIGHT; @@ -465,9 +465,9 @@ void window_staff_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 * * rct2: 0x006BDC6B */ -void window_staff_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_staff_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 i; + int32_t i; i = y / SCROLLABLE_ROW_HEIGHT; if (i != _windowStaffListHighlightedIndex) { @@ -491,14 +491,14 @@ void window_staff_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_s */ void window_staff_list_invalidate(rct_window *w) { - sint32 pressed_widgets = w->pressed_widgets & ~( + int32_t pressed_widgets = w->pressed_widgets & ~( (1LL << WIDX_STAFF_LIST_HANDYMEN_TAB) | (1LL << WIDX_STAFF_LIST_MECHANICS_TAB) | (1LL << WIDX_STAFF_LIST_SECURITY_TAB) | (1LL << WIDX_STAFF_LIST_ENTERTAINERS_TAB) ); - uint8 tabIndex = _windowStaffListSelectedTab; - uint8 widgetIndex = tabIndex + WIDX_STAFF_LIST_HANDYMEN_TAB; + uint8_t tabIndex = _windowStaffListSelectedTab; + uint8_t widgetIndex = tabIndex + WIDX_STAFF_LIST_HANDYMEN_TAB; w->pressed_widgets = pressed_widgets | (1ULL << widgetIndex); window_staff_list_widgets[WIDX_STAFF_LIST_HIRE_BUTTON].text = StaffNamingConvention[tabIndex].action_hire; @@ -507,7 +507,7 @@ void window_staff_list_invalidate(rct_window *w) if (tabIndex < 3) { window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].type = WWT_COLOURBTN; window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].image = - SPRITE_ID_PALETTE_COLOUR_1((uint32)staff_get_colour(tabIndex)) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + SPRITE_ID_PALETTE_COLOUR_1((uint32_t)staff_get_colour(tabIndex)) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; } if (_quick_fire_mode) w->pressed_widgets |= (1ULL << WIDX_STAFF_LIST_QUICK_FIRE); @@ -539,8 +539,8 @@ void window_staff_list_invalidate(rct_window *w) */ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 i; - uint8 selectedTab; + int32_t i; + uint8_t selectedTab; // Widgets window_draw_widgets(w, dpi); @@ -604,27 +604,27 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_UNIFORM_COLOUR, w, COLOUR_BLACK, w->x + 6, window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].top + w->y + 1); } - sint32 staffTypeStringId = StaffNamingConvention[selectedTab].plural; + int32_t staffTypeStringId = StaffNamingConvention[selectedTab].plural; // If the number of staff for a given type is 1, we use the singular forms of the names if (_window_staff_list_selected_type_count == 1) { staffTypeStringId = StaffNamingConvention[selectedTab].singular; } - set_format_arg(0, uint16, _window_staff_list_selected_type_count); + set_format_arg(0, uint16_t, _window_staff_list_selected_type_count); set_format_arg(2, rct_string_id, staffTypeStringId); gfx_draw_string_left(dpi, STR_STAFF_LIST_COUNTER, gCommonFormatArgs, COLOUR_BLACK, w->x + 4, window_staff_list_widgets[WIDX_STAFF_LIST_LIST].bottom + w->y + 2); } /** rct2: 0x00992A08 */ -static constexpr const uint32 staffOrderBaseSprites[] = { +static constexpr const uint32_t staffOrderBaseSprites[] = { SPR_STAFF_ORDERS_SWEEPING, SPR_STAFF_ORDERS_INSPECT_RIDES, 0, 0, }; -static constexpr const uint32 staffCostumeSprites[] = { +static constexpr const uint32_t staffCostumeSprites[] = { SPR_STAFF_COSTUME_PANDA, SPR_STAFF_COSTUME_TIGER, SPR_STAFF_COSTUME_ELEPHANT, @@ -642,19 +642,19 @@ static constexpr const uint32 staffCostumeSprites[] = { * * rct2: 0x006BD785 */ -void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 spriteIndex, y, i, staffOrderIcon_x, staffOrders, staffOrderSprite; - uint32 argument_1, argument_2; - uint8 selectedTab; + int32_t spriteIndex, y, i, staffOrderIcon_x, staffOrders, staffOrderSprite; + uint32_t argument_1, argument_2; + uint8_t selectedTab; rct_peep *peep; gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); // How much space do we have for the name and action columns? (Discount scroll area and icons.) - sint32 nonIconSpace = w->widgets[WIDX_STAFF_LIST_LIST].right - w->widgets[WIDX_STAFF_LIST_LIST].left - 15 - 68; - sint32 columnSize = nonIconSpace / 2; - sint32 actionOffset = w->widgets[WIDX_STAFF_LIST_LIST].right - columnSize - 15; + int32_t nonIconSpace = w->widgets[WIDX_STAFF_LIST_LIST].right - w->widgets[WIDX_STAFF_LIST_LIST].left - 15 - 68; + int32_t columnSize = nonIconSpace / 2; + int32_t actionOffset = w->widgets[WIDX_STAFF_LIST_LIST].right - columnSize - 15; y = 0; i = 0; @@ -670,7 +670,7 @@ void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 if (y + 11 >= dpi->y) { - sint32 format = (_quick_fire_mode ? STR_RED_STRINGID : STR_BLACK_STRING); + int32_t format = (_quick_fire_mode ? STR_RED_STRINGID : STR_BLACK_STRING); if (i == _windowStaffListHighlightedIndex) { @@ -679,12 +679,12 @@ void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 } set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, 0, y, columnSize); get_arguments_from_action(peep, &argument_1, &argument_2); - set_format_arg(0, uint32, argument_1); - set_format_arg(4, uint32, argument_2); + set_format_arg(0, uint32_t, argument_1); + set_format_arg(4, uint32_t, argument_2); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, actionOffset, y, columnSize); // True if a patrol path is set for the worker @@ -722,14 +722,14 @@ void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 } } -static uint8 window_staff_list_get_random_entertainer_costume() +static uint8_t window_staff_list_get_random_entertainer_costume() { - uint8 result = ENTERTAINER_COSTUME_PANDA; - uint8 costumeList[ENTERTAINER_COSTUME_COUNT]; - sint32 numCostumes = staff_get_available_entertainer_costume_list(costumeList); + uint8_t result = ENTERTAINER_COSTUME_PANDA; + uint8_t costumeList[ENTERTAINER_COSTUME_COUNT]; + int32_t numCostumes = staff_get_available_entertainer_costume_list(costumeList); if (numCostumes > 0) { - sint32 index = util_rand() % numCostumes; + int32_t index = util_rand() % numCostumes; result = costumeList[index]; } return result; diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index 52acf9ab28..e9fd828995 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -92,10 +92,10 @@ static rct_string_id input_text_description; static utf8 text_input[TEXT_INPUT_SIZE] = { 0 }; static rct_windowclass calling_class = 0; static rct_windownumber calling_number = 0; -static sint32 calling_widget = 0; -static sint32 _maxInputLength; +static int32_t calling_widget = 0; +static int32_t _maxInputLength; -void window_text_input_open(rct_window* call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, rct_string_id existing_text, uintptr_t existing_args, sint32 maxLength) +void window_text_input_open(rct_window* call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, rct_string_id existing_text, uintptr_t existing_args, int32_t maxLength) { // Get the raw string utf8 buffer[Util::CountOf(text_input)]{}; @@ -106,7 +106,7 @@ void window_text_input_open(rct_window* call_w, rct_widgetindex call_widget, rct window_text_input_raw_open(call_w, call_widget, title, description, buffer, maxLength); } -void window_text_input_raw_open(rct_window* call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, const_utf8string existing_text, sint32 maxLength) +void window_text_input_raw_open(rct_window* call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, const_utf8string existing_text, int32_t maxLength) { _maxInputLength = maxLength; @@ -125,12 +125,12 @@ void window_text_input_raw_open(rct_window* call_w, rct_widgetindex call_widget, char wrapped_string[TEXT_INPUT_SIZE]; safe_strcpy(wrapped_string, text_input, TEXT_INPUT_SIZE); - sint32 no_lines = 0, font_height = 0; + int32_t no_lines = 0, font_height = 0; // String length needs to add 12 either side of box +13 for cursor when max length. gfx_wrap_string(wrapped_string, WW - (24 + 13), &no_lines, &font_height); - sint32 height = no_lines * 10 + WH; + int32_t height = no_lines * 10 + WH; // Window will be in the centre of the screen rct_window* w = window_create_centred( @@ -194,10 +194,10 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) { window_draw_widgets(w, dpi); - sint32 y = w->y + 25; + int32_t y = w->y + 25; - sint32 no_lines = 0; - sint32 font_height = 0; + int32_t no_lines = 0; + int32_t font_height = 0; gfx_draw_string_centred(dpi, input_text_description, w->x + WW / 2, y, w->colours[1], &TextInputDescriptionArgs); @@ -220,11 +220,11 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) char* wrap_pointer = wrapped_string; size_t char_count = 0; - uint8 cur_drawn = 0; + uint8_t cur_drawn = 0; - sint32 cursorX = 0; - sint32 cursorY = 0; - for (sint32 line = 0; line <= no_lines; line++) { + int32_t cursorX = 0; + int32_t cursorY = 0; + for (int32_t line = 0; line <= no_lines; line++) { gfx_draw_string(dpi, wrap_pointer, w->colours[1], w->x + 12, y); size_t string_length = get_string_size(wrap_pointer) - 1; @@ -236,18 +236,18 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) cursorX = w->x + 13 + gfx_get_string_width(temp_string); cursorY = y; - sint32 width = 6; + int32_t width = 6; if (gTextInput->SelectionStart < strlen(text_input)){ // Make a 1 utf8-character wide string for measuring the width // of the currently selected character. utf8 tmp[5] = { 0 }; // This is easier than setting temp_string[0..5] - uint32 codepoint = utf8_get_next(text_input + gTextInput->SelectionStart, nullptr); + uint32_t codepoint = utf8_get_next(text_input + gTextInput->SelectionStart, nullptr); utf8_write_codepoint(tmp, codepoint); width = std::max(gfx_get_string_width(tmp) - 2, 4); } if (w->frame_no > 15){ - uint8 colour = ColourMapA[w->colours[1]].mid_light; + uint8_t colour = ColourMapA[w->colours[1]].mid_light; // TODO: palette index addition gfx_fill_rect(dpi, cursorX, y + 9, cursorX + width, y + 9, colour + 5); } @@ -318,13 +318,13 @@ static void window_text_input_invalidate(rct_window *w) char wrapped_string[TEXT_INPUT_SIZE]; safe_strcpy(wrapped_string, text_input, TEXT_INPUT_SIZE); - sint32 no_lines = 0, font_height = 0; + int32_t no_lines = 0, font_height = 0; // String length needs to add 12 either side of box // +13 for cursor when max length. gfx_wrap_string(wrapped_string, WW - (24 + 13), &no_lines, &font_height); - sint32 height = no_lines * 10 + WH; + int32_t height = no_lines * 10 + WH; // Change window size if required. if (height != w->height) { diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index 2f96edd7b3..dab1aee882 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -38,16 +38,16 @@ enum { static void window_themes_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_themes_resize(rct_window *w); static void window_themes_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_themes_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_themes_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_themes_update(rct_window *w); -static void window_themes_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_themes_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_themes_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_themes_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_themes_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_themes_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_themes_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_themes_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_themes_invalidate(rct_window *w); static void window_themes_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_themes_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); static rct_window_event_list window_themes_events = { @@ -140,7 +140,7 @@ static rct_widget window_themes_widgets[] = { { WIDGETS_END }, }; -static sint32 window_themes_tab_animation_loops[] = { +static int32_t window_themes_tab_animation_loops[] = { 32, 32, 1, @@ -151,7 +151,7 @@ static sint32 window_themes_tab_animation_loops[] = { 14, 38 }; -static sint32 window_themes_tab_animation_divisor[] = { +static int32_t window_themes_tab_animation_divisor[] = { 4, 4, 1, @@ -162,7 +162,7 @@ static sint32 window_themes_tab_animation_divisor[] = { 2, 2 }; -static sint32 window_themes_tab_sprites[] = { +static int32_t window_themes_tab_sprites[] = { SPR_TAB_PAINT_0, SPR_TAB_KIOSKS_AND_FACILITIES_0, SPR_TAB_PARK_ENTRANCE, @@ -267,26 +267,26 @@ static rct_windowclass *window_themes_tab_classes[] = { }; // clang-format on -static uint8 _selected_tab = 0; -static sint16 _colour_index_1 = -1; -static sint8 _colour_index_2 = -1; -static constexpr const uint8 _row_height = 32; -static constexpr const uint8 _button_offset_x = 220; -static constexpr const uint8 _button_offset_y = 3; -static constexpr const uint8 _check_offset_y = 3 + 12 + 2; +static uint8_t _selected_tab = 0; +static int16_t _colour_index_1 = -1; +static int8_t _colour_index_2 = -1; +static constexpr const uint8_t _row_height = 32; +static constexpr const uint8_t _button_offset_x = 220; +static constexpr const uint8_t _button_offset_y = 3; +static constexpr const uint8_t _check_offset_y = 3 + 12 + 2; static void window_themes_init_vars() { _selected_tab = WINDOW_THEMES_TAB_SETTINGS; } -static rct_windowclass get_window_class_tab_index(sint32 index) +static rct_windowclass get_window_class_tab_index(int32_t index) { rct_windowclass * classes = window_themes_tab_classes[_selected_tab]; return classes[index]; } -static sint32 get_colour_scheme_tab_count() +static int32_t get_colour_scheme_tab_count() { switch (_selected_tab) { case 1: return sizeof(window_themes_tab_1_classes); @@ -302,8 +302,8 @@ static sint32 get_colour_scheme_tab_count() static void window_themes_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) { - for (sint32 i = 0; i < WINDOW_THEMES_TAB_COUNT; i++) { - sint32 sprite_idx = window_themes_tab_sprites[i]; + for (int32_t i = 0; i < WINDOW_THEMES_TAB_COUNT; i++) { + int32_t sprite_idx = window_themes_tab_sprites[i]; if (_selected_tab == i) sprite_idx += w->frame_no / window_themes_tab_animation_divisor[_selected_tab]; gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_THEMES_SETTINGS_TAB + i].left, w->y + w->widgets[WIDX_THEMES_SETTINGS_TAB + i].top, 0); @@ -465,8 +465,8 @@ static void window_themes_resize(rct_window *w) static void window_themes_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - sint16 newSelectedTab; - sint32 num_items; + int16_t newSelectedTab; + int32_t num_items; switch (widgetIndex) { case WIDX_THEMES_SETTINGS_TAB: @@ -481,7 +481,7 @@ static void window_themes_mousedown(rct_window *w, rct_widgetindex widgetIndex, newSelectedTab = widgetIndex - WIDX_THEMES_SETTINGS_TAB; if (_selected_tab == newSelectedTab) break; - _selected_tab = (uint8)newSelectedTab; + _selected_tab = (uint8_t)newSelectedTab; w->scrolls[0].v_top = 0; w->frame_no = 0; window_event_resize_call(w); @@ -489,10 +489,10 @@ static void window_themes_mousedown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_THEMES_PRESETS_DROPDOWN: theme_manager_load_available_themes(); - num_items = (sint32)theme_manager_get_num_available_themes(); + num_items = (int32_t)theme_manager_get_num_available_themes(); widget--; - for (sint32 i = 0; i < num_items; i++) { + for (int32_t i = 0; i < num_items; i++) { gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM; gDropdownItemsArgs[i] = (uintptr_t)theme_manager_get_available_theme_name(i); } @@ -508,7 +508,7 @@ static void window_themes_mousedown(rct_window *w, rct_widgetindex widgetIndex, widget->right - widget->left - 3 ); - dropdown_set_checked((sint32)theme_manager_get_active_available_theme_index(), true); + dropdown_set_checked((int32_t)theme_manager_get_active_available_theme_index(), true); break; case WIDX_THEMES_RCT1_RIDE_LIGHTS: if (theme_get_flags() & UITHEME_FLAG_PREDEFINED) { @@ -548,13 +548,13 @@ static void window_themes_mousedown(rct_window *w, rct_widgetindex widgetIndex, } } -static void window_themes_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_themes_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { switch (widgetIndex) { case WIDX_THEMES_LIST: if (dropdownIndex != -1) { rct_windowclass wc = get_window_class_tab_index(_colour_index_1); - uint8 colour = theme_get_colour(wc, _colour_index_2); + uint8_t colour = theme_get_colour(wc, _colour_index_2); colour = (colour & COLOUR_FLAG_TRANSLUCENT) | dropdownIndex; theme_set_colour(wc, _colour_index_2, colour); colour_scheme_update_all(); @@ -585,13 +585,13 @@ void window_themes_update(rct_window *w) } -void window_themes_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +void window_themes_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { if (_selected_tab == WINDOW_THEMES_TAB_SETTINGS || _selected_tab == WINDOW_THEMES_TAB_FEATURES) return; - sint32 scrollHeight = get_colour_scheme_tab_count() * _row_height; - sint32 i = scrollHeight - window_themes_widgets[WIDX_THEMES_LIST].bottom + window_themes_widgets[WIDX_THEMES_LIST].top + 21; + int32_t scrollHeight = get_colour_scheme_tab_count() * _row_height; + int32_t i = scrollHeight - window_themes_widgets[WIDX_THEMES_LIST].bottom + window_themes_widgets[WIDX_THEMES_LIST].top + 21; if (i < 0) i = 0; if (i < w->scrolls[0].v_top) { @@ -603,15 +603,15 @@ void window_themes_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *widt *height = scrollHeight; } -void window_themes_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_themes_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { if (y / _row_height < get_colour_scheme_tab_count()) { - sint32 y2 = y % _row_height; + int32_t y2 = y % _row_height; _colour_index_1 = y / _row_height; _colour_index_2 = ((x - _button_offset_x) / 12); rct_windowclass wc = get_window_class_tab_index(_colour_index_1); - sint32 numColours = theme_desc_get_num_colours(wc); + int32_t numColours = theme_desc_get_num_colours(wc); if (_colour_index_2 < numColours) { if (x >= _button_offset_x && x < _button_offset_x + 12 * 6 && y2 >= _button_offset_y && y2 < _button_offset_y + 11) { if (theme_get_flags() & UITHEME_FLAG_PREDEFINED) { @@ -623,7 +623,7 @@ void window_themes_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].right = window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].left + 12; window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].bottom = window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK].top + 12; - uint8 colour = theme_get_colour(wc, _colour_index_2); + uint8_t colour = theme_get_colour(wc, _colour_index_2); window_dropdown_show_colour(w, &(window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK]), w->colours[1], colour); widget_invalidate(w, WIDX_THEMES_LIST); } @@ -632,7 +632,7 @@ void window_themes_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, if (theme_get_flags() & UITHEME_FLAG_PREDEFINED) { context_show_error(STR_THEMES_ERR_CANT_CHANGE_THIS_THEME, STR_THEMES_DESC_CANT_CHANGE_THIS_THEME); } else { - uint8 colour = theme_get_colour(wc, _colour_index_2); + uint8_t colour = theme_get_colour(wc, _colour_index_2); if (colour & COLOUR_FLAG_TRANSLUCENT) { colour &= ~COLOUR_FLAG_TRANSLUCENT; } else { @@ -647,7 +647,7 @@ void window_themes_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, } } -void window_themes_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_themes_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { //if (_selected_tab == WINDOW_THEMES_TAB_SETTINGS) // return; @@ -686,7 +686,7 @@ void window_themes_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_strin void window_themes_invalidate(rct_window *w) { - sint32 pressed_widgets = w->pressed_widgets & ~( + int32_t pressed_widgets = w->pressed_widgets & ~( (1LL << WIDX_THEMES_SETTINGS_TAB) | (1LL << WIDX_THEMES_MAIN_UI_TAB) | (1LL << WIDX_THEMES_PARK_TAB) | @@ -795,9 +795,9 @@ void window_themes_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006BD785 */ -void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 y; + int32_t y; if (_selected_tab == WINDOW_THEMES_TAB_SETTINGS || _selected_tab == WINDOW_THEMES_TAB_FEATURES) return; @@ -806,13 +806,13 @@ void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scr //gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); gfx_clear(dpi, ColourMapA[w->colours[1]].mid_light); y = 0; - for (sint32 i = 0; i < get_colour_scheme_tab_count(); i++) { + for (int32_t i = 0; i < get_colour_scheme_tab_count(); i++) { if (y > dpi->y + dpi->height) { break; } if (y + _row_height >= dpi->y) { if (i + 1 < get_colour_scheme_tab_count()) { - sint32 colour = w->colours[1]; + int32_t colour = w->colours[1]; if (colour & COLOUR_FLAG_TRANSLUCENT) { translucent_window_palette windowPalette = TranslucentWindowPalettes[BASE_COLOUR(colour)]; @@ -828,12 +828,12 @@ void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scr } rct_windowclass wc = get_window_class_tab_index(i); - sint32 numColours = theme_desc_get_num_colours(wc); - for (uint8 j = 0; j < numColours; j++) { + int32_t numColours = theme_desc_get_num_colours(wc); + for (uint8_t j = 0; j < numColours; j++) { gfx_draw_string_left(dpi, theme_desc_get_name(wc), nullptr, w->colours[1], 2, y + 4); - uint8 colour = theme_get_colour(wc, j); - uint32 image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + uint8_t colour = theme_get_colour(wc, j); + uint32_t image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; if (i == _colour_index_1 && j == _colour_index_2) { image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN_PRESSED; } diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 440a577886..5ff3de7b00 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -417,8 +417,8 @@ static rct_widget *PageWidgets[] = { static struct { // Offsets from the bottom of the window - sint16 details_top_offset, details_bottom_offset; - sint16 properties_top_offset, properties_bottom_offset; + int16_t details_top_offset, details_bottom_offset; + int16_t properties_top_offset, properties_bottom_offset; // String to be displayed in the details groupbox rct_string_id string_id; } PageGroupBoxSettings[] = { @@ -434,18 +434,18 @@ static struct { }; // clang-format on -static constexpr sint32 ViewportInteractionFlags = VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_SPRITE +static constexpr int32_t ViewportInteractionFlags = VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_SPRITE & VIEWPORT_INTERACTION_MASK_RIDE & VIEWPORT_INTERACTION_MASK_SCENERY & VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_FOOTPATH_ITEM & VIEWPORT_INTERACTION_MASK_PARK & VIEWPORT_INTERACTION_MASK_WALL & VIEWPORT_INTERACTION_MASK_LARGE_SCENERY & VIEWPORT_INTERACTION_MASK_BANNER; -static sint16 windowTileInspectorHighlightedIndex = -1; +static int16_t windowTileInspectorHighlightedIndex = -1; static bool windowTileInspectorTileSelected = false; -static sint32 windowTileInspectorToolMouseX = 0; -static sint32 windowTileInspectorToolMouseY = 0; +static int32_t windowTileInspectorToolMouseX = 0; +static int32_t windowTileInspectorToolMouseY = 0; static bool windowTileInspectorToolCtrlDown = false; -static sint32 windowTileInspectorToolMapX = 0; -static sint32 windowTileInspectorToolMapY = 0; +static int32_t windowTileInspectorToolMapX = 0; +static int32_t windowTileInspectorToolMapY = 0; static bool windowTileInspectorApplyToAll = false; static bool windowTileInspectorElementCopied = false; static rct_tile_element tileInspectorCopiedElement; @@ -454,17 +454,17 @@ static void window_tile_inspector_mouseup(rct_window *w, rct_widgetindex widgetI static void window_tile_inspector_resize(rct_window *w); static void window_tile_inspector_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); static void window_tile_inspector_update(rct_window *w); -static void window_tile_inspector_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); -static void window_tile_inspector_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_tile_inspector_update_selected_tile(rct_window *w, sint32 x, sint32 y); -static void window_tile_inspector_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_tile_inspector_tool_drag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_tile_inspector_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_tile_inspector_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_tile_inspector_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_tile_inspector_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); +static void window_tile_inspector_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_tile_inspector_update_selected_tile(rct_window *w, int32_t x, int32_t y); +static void window_tile_inspector_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_tile_inspector_tool_drag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_tile_inspector_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_tile_inspector_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_tile_inspector_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_tile_inspector_invalidate(rct_window *w); static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static void window_tile_inspector_set_page(rct_window* w, const TILE_INSPECTOR_PAGE page); // clang-format off @@ -499,7 +499,7 @@ static rct_window_event_list TileInspectorWindowEvents = { window_tile_inspector_scrollpaint }; -static uint64 PageEnabledWidgets[] = { +static uint64_t PageEnabledWidgets[] = { (1ULL << WIDX_CLOSE) | (1ULL << WIDX_BUTTON_CORRUPT), (1ULL << WIDX_CLOSE) | (1ULL << WIDX_BUTTON_CORRUPT) | (1ULL << WIDX_BUTTON_REMOVE) | (1ULL << WIDX_BUTTON_ROTATE) | (1ULL << WIDX_BUTTON_COPY) | (1ULL << WIDX_SURFACE_SPINNER_HEIGHT_INCREASE) | (1ULL << WIDX_SURFACE_SPINNER_HEIGHT_DECREASE) | (1ULL << WIDX_SURFACE_BUTTON_REMOVE_FENCES) | (1ULL << WIDX_SURFACE_BUTTON_RESTORE_FENCES) | (1ULL << WIDX_SURFACE_CHECK_CORNER_N) | (1ULL << WIDX_SURFACE_CHECK_CORNER_E) | (1ULL << WIDX_SURFACE_CHECK_CORNER_S) | (1ULL << WIDX_SURFACE_CHECK_CORNER_W) | (1ULL << WIDX_SURFACE_CHECK_DIAGONAL), (1ULL << WIDX_CLOSE) | (1ULL << WIDX_BUTTON_CORRUPT) | (1ULL << WIDX_BUTTON_REMOVE) | (1ULL << WIDX_BUTTON_ROTATE) | (1ULL << WIDX_BUTTON_COPY) | (1ULL << WIDX_PATH_SPINNER_HEIGHT_INCREASE) | (1ULL << WIDX_PATH_SPINNER_HEIGHT_DECREASE) | (1ULL << WIDX_PATH_CHECK_SLOPED) | (1ULL << WIDX_PATH_CHECK_EDGE_N) | (1ULL << WIDX_PATH_CHECK_EDGE_NE) | (1ULL << WIDX_PATH_CHECK_EDGE_E) | (1ULL << WIDX_PATH_CHECK_EDGE_SE) | (1ULL << WIDX_PATH_CHECK_EDGE_S) | (1ULL << WIDX_PATH_CHECK_EDGE_SW) | (1ULL << WIDX_PATH_CHECK_EDGE_W) | (1ULL << WIDX_PATH_CHECK_EDGE_NW), @@ -512,7 +512,7 @@ static uint64 PageEnabledWidgets[] = { (1ULL << WIDX_CLOSE) | (1ULL << WIDX_BUTTON_CORRUPT) | (1ULL << WIDX_BUTTON_REMOVE) | (1ULL << WIDX_BUTTON_COPY) | (1ULL << WIDX_CORRUPT_SPINNER_HEIGHT_INCREASE) | (1ULL << WIDX_CORRUPT_SPINNER_HEIGHT_DECREASE) | (1ULL << WIDX_CORRUPT_BUTTON_CLAMP), }; -static uint64 PageHoldDownWidgets[] = { +static uint64_t PageHoldDownWidgets[] = { (1ULL << WIDX_SPINNER_X_INCREASE) | (1ULL << WIDX_SPINNER_X_DECREASE) | (1ULL << WIDX_SPINNER_Y_INCREASE) | (1ULL << WIDX_SPINNER_Y_DECREASE), (1ULL << WIDX_SPINNER_X_INCREASE) | (1ULL << WIDX_SPINNER_X_DECREASE) | (1ULL << WIDX_SPINNER_Y_INCREASE) | (1ULL << WIDX_SPINNER_Y_DECREASE) | (1ULL << WIDX_SURFACE_SPINNER_HEIGHT_INCREASE) | (1ULL << WIDX_SURFACE_SPINNER_HEIGHT_DECREASE), (1ULL << WIDX_SPINNER_X_INCREASE) | (1ULL << WIDX_SPINNER_X_DECREASE) | (1ULL << WIDX_SPINNER_Y_INCREASE) | (1ULL << WIDX_SPINNER_Y_DECREASE) | (1ULL << WIDX_PATH_SPINNER_HEIGHT_INCREASE) | (1ULL << WIDX_PATH_SPINNER_HEIGHT_DECREASE), @@ -525,7 +525,7 @@ static uint64 PageHoldDownWidgets[] = { (1ULL << WIDX_SPINNER_X_INCREASE) | (1ULL << WIDX_SPINNER_X_DECREASE) | (1ULL << WIDX_SPINNER_Y_INCREASE) | (1ULL << WIDX_SPINNER_Y_DECREASE) | (1ULL << WIDX_CORRUPT_SPINNER_HEIGHT_INCREASE) | (1ULL << WIDX_CORRUPT_SPINNER_HEIGHT_DECREASE), }; -static uint64 PageDisabledWidgets[] = { +static uint64_t PageDisabledWidgets[] = { (1ULL << WIDX_BUTTON_CORRUPT) | (1ULL << WIDX_BUTTON_MOVE_UP) | (1ULL << WIDX_BUTTON_MOVE_DOWN) | (1ULL << WIDX_BUTTON_REMOVE) | (1ULL << WIDX_BUTTON_ROTATE) | (1ULL << WIDX_BUTTON_COPY), 0, 0, @@ -585,7 +585,7 @@ static rct_tile_element* window_tile_inspector_get_selected_element(rct_window * return map_get_first_element_at(windowTileInspectorTileX, windowTileInspectorTileY) + windowTileInspectorSelectedIndex; } -static void window_tile_inspector_select_element_from_list(rct_window *w, sint32 index) +static void window_tile_inspector_select_element_from_list(rct_window *w, int32_t index) { if (index < 0 || index >= windowTileInspectorElementCount) { @@ -605,7 +605,7 @@ static void window_tile_inspector_load_tile(rct_window* w, rct_tile_element* ele w->scrolls[0].v_top = 0; rct_tile_element* element = map_get_first_element_at(windowTileInspectorTileX, windowTileInspectorTileY); - sint16 numItems = 0; + int16_t numItems = 0; do { if (element == elementToSelect) @@ -621,7 +621,7 @@ static void window_tile_inspector_load_tile(rct_window* w, rct_tile_element* ele window_invalidate(w); } -static void window_tile_inspector_insert_corrupt_element(sint32 elementIndex) +static void window_tile_inspector_insert_corrupt_element(int32_t elementIndex) { openrct2_assert(elementIndex >= 0 && elementIndex < windowTileInspectorElementCount, "elementIndex out of range"); @@ -636,7 +636,7 @@ static void window_tile_inspector_insert_corrupt_element(sint32 elementIndex) ); } -static void window_tile_inspector_remove_element(sint32 elementIndex) +static void window_tile_inspector_remove_element(int32_t elementIndex) { openrct2_assert(elementIndex >= 0 && elementIndex < windowTileInspectorElementCount, "elementIndex out of range"); @@ -651,7 +651,7 @@ static void window_tile_inspector_remove_element(sint32 elementIndex) ); } -static void window_tile_inspector_rotate_element(sint32 elementIndex) +static void window_tile_inspector_rotate_element(int32_t elementIndex) { openrct2_assert(elementIndex >= 0 && elementIndex < windowTileInspectorElementCount, "elementIndex out of range"); @@ -667,7 +667,7 @@ static void window_tile_inspector_rotate_element(sint32 elementIndex) } // Swap element with its parent -static void window_tile_inspector_swap_elements(sint16 first, sint16 second) +static void window_tile_inspector_swap_elements(int16_t first, int16_t second) { openrct2_assert(first >= 0 && first < windowTileInspectorElementCount, "first out of range"); @@ -709,7 +709,7 @@ static void window_tile_inspector_copy_element(rct_window *w) static void window_tile_inspector_paste_element(rct_window *w) { // Construct the data to send using the surface's properties - sint32 data[2]; + int32_t data[2]; memcpy(&data[0], &tileInspectorCopiedElement, 8); assert_struct_size(data, sizeof(tileInspectorCopiedElement)); @@ -724,7 +724,7 @@ static void window_tile_inspector_paste_element(rct_window *w) ); } -static void window_tile_inspector_base_height_offset(sint16 elementIndex, sint8 heightOffset) +static void window_tile_inspector_base_height_offset(int16_t elementIndex, int8_t heightOffset) { game_do_command( TILE_INSPECTOR_ANY_BASE_HEIGHT_OFFSET, @@ -750,7 +750,7 @@ static void window_tile_inspector_surface_show_park_fences(bool showFences) ); } -static void window_tile_inspector_surface_toggle_corner(sint32 cornerIndex) +static void window_tile_inspector_surface_toggle_corner(int32_t cornerIndex) { game_do_command( TILE_INSPECTOR_SURFACE_TOGGLE_CORNER, @@ -776,7 +776,7 @@ static void window_tile_inspector_surface_toggle_diagonal() ); } -static void window_tile_inspector_path_set_sloped(sint32 elementIndex, bool sloped) +static void window_tile_inspector_path_set_sloped(int32_t elementIndex, bool sloped) { game_do_command( TILE_INSPECTOR_PATH_SET_SLOPE, @@ -789,7 +789,7 @@ static void window_tile_inspector_path_set_sloped(sint32 elementIndex, bool slop ); } -static void window_tile_inspector_path_toggle_edge(sint32 elementIndex, sint32 cornerIndex) +static void window_tile_inspector_path_toggle_edge(int32_t elementIndex, int32_t cornerIndex) { openrct2_assert(elementIndex >= 0 && elementIndex < windowTileInspectorElementCount, "elementIndex out of range"); @@ -805,7 +805,7 @@ static void window_tile_inspector_path_toggle_edge(sint32 elementIndex, sint32 c ); } -static void window_tile_inspector_entrance_make_usable(sint32 elementIndex) +static void window_tile_inspector_entrance_make_usable(int32_t elementIndex) { Guard::ArgumentInRange(elementIndex, 0, windowTileInspectorElementCount - 1); game_do_command( @@ -819,7 +819,7 @@ static void window_tile_inspector_entrance_make_usable(sint32 elementIndex) ); } -static void window_tile_inspector_wall_set_slope(sint32 elementIndex, sint32 slopeValue) +static void window_tile_inspector_wall_set_slope(int32_t elementIndex, int32_t slopeValue) { // Make sure only the correct bits are set openrct2_assert((slopeValue & 0xC0) == slopeValue, "slopeValue doesn't match its mask"); @@ -835,7 +835,7 @@ static void window_tile_inspector_wall_set_slope(sint32 elementIndex, sint32 slo ); } -static void window_tile_inspector_track_block_height_offset(sint32 elementIndex, sint8 heightOffset) +static void window_tile_inspector_track_block_height_offset(int32_t elementIndex, int8_t heightOffset) { game_do_command( TILE_INSPECTOR_TRACK_BASE_HEIGHT_OFFSET, @@ -848,7 +848,7 @@ static void window_tile_inspector_track_block_height_offset(sint32 elementIndex, ); } -static void window_tile_inspector_track_block_set_lift(sint32 elementIndex, bool entireTrackBlock, bool chain) +static void window_tile_inspector_track_block_set_lift(int32_t elementIndex, bool entireTrackBlock, bool chain) { game_do_command( TILE_INSPECTOR_TRACK_SET_CHAIN, @@ -861,7 +861,7 @@ static void window_tile_inspector_track_block_set_lift(sint32 elementIndex, bool ); } -static void window_tile_inspector_quarter_tile_set(sint32 elementIndex, const sint32 quarterIndex) +static void window_tile_inspector_quarter_tile_set(int32_t elementIndex, const int32_t quarterIndex) { // quarterIndex is widget index relative to WIDX_SCENERY_CHECK_QUARTER_N, so a value from 0-3 openrct2_assert(quarterIndex >= 0 && quarterIndex < 4, "quarterIndex out of range"); @@ -877,7 +877,7 @@ static void window_tile_inspector_quarter_tile_set(sint32 elementIndex, const si ); } -static void window_tile_inspector_toggle_quadrant_collosion(sint32 elementIndex, const sint32 quadrantIndex) +static void window_tile_inspector_toggle_quadrant_collosion(int32_t elementIndex, const int32_t quadrantIndex) { game_do_command( TILE_INSPECTOR_SCENERY_SET_QUARTER_COLLISION, @@ -890,7 +890,7 @@ static void window_tile_inspector_toggle_quadrant_collosion(sint32 elementIndex, ); } -static void window_tile_inspector_banner_toggle_block(sint32 elementIndex, sint32 edgeIndex) +static void window_tile_inspector_banner_toggle_block(int32_t elementIndex, int32_t edgeIndex) { openrct2_assert(edgeIndex >= 0 && edgeIndex < 4, "edgeIndex out of range"); @@ -908,7 +908,7 @@ static void window_tile_inspector_banner_toggle_block(sint32 elementIndex, sint3 ); } -static void window_tile_inspector_clamp_corrupt(sint32 elementIndex) +static void window_tile_inspector_clamp_corrupt(int32_t elementIndex) { game_do_command( TILE_INSPECTOR_CORRUPT_CLAMP, @@ -932,7 +932,7 @@ static void window_tile_inspector_mouseup(rct_window *w, rct_widgetindex widgetI window_tile_inspector_insert_corrupt_element(windowTileInspectorSelectedIndex); break; case WIDX_BUTTON_REMOVE: { - sint32 nextItemToSelect = windowTileInspectorSelectedIndex - 1; + int32_t nextItemToSelect = windowTileInspectorSelectedIndex - 1; window_tile_inspector_remove_element(windowTileInspectorSelectedIndex); window_tile_inspector_select_element_from_list(w, nextItemToSelect); break; @@ -998,9 +998,9 @@ static void window_tile_inspector_mouseup(rct_window *w, rct_widgetindex widgetI case WIDX_PATH_CHECK_EDGE_N: { // 0 = east/right, 1 = south/bottom, 2 = west/left, 3 = north/top - const sint32 eswn = (widgetIndex - WIDX_PATH_CHECK_EDGE_E) / 2; + const int32_t eswn = (widgetIndex - WIDX_PATH_CHECK_EDGE_E) / 2; // Transform to world orientation - const sint32 index = (eswn - get_current_rotation()) & 3; + const int32_t index = (eswn - get_current_rotation()) & 3; window_tile_inspector_path_toggle_edge(windowTileInspectorSelectedIndex, index + 4); // The corners are stored in the 4 most significant bits, hence the + 4 break; } @@ -1010,9 +1010,9 @@ static void window_tile_inspector_mouseup(rct_window *w, rct_widgetindex widgetI case WIDX_PATH_CHECK_EDGE_NW: { // 0 = NE, 1 = SE, 2 = SW, 3 = NW - const sint32 neseswnw = (widgetIndex - WIDX_PATH_CHECK_EDGE_NE) / 2; + const int32_t neseswnw = (widgetIndex - WIDX_PATH_CHECK_EDGE_NE) / 2; // Transform to world orientation - const sint32 index = (neseswnw - get_current_rotation()) & 3; + const int32_t index = (neseswnw - get_current_rotation()) & 3; window_tile_inspector_path_toggle_edge(windowTileInspectorSelectedIndex, index); break; } @@ -1100,19 +1100,19 @@ static void window_tile_inspector_mousedown(rct_window *w, rct_widgetindex widge switch (widgetIndex) { case WIDX_SPINNER_X_INCREASE: - windowTileInspectorTileX = std::min(windowTileInspectorTileX + 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1); + windowTileInspectorTileX = std::min(windowTileInspectorTileX + 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1); window_tile_inspector_load_tile(w, nullptr); break; case WIDX_SPINNER_X_DECREASE: - windowTileInspectorTileX = std::max(windowTileInspectorTileX - 1, 0); + windowTileInspectorTileX = std::max(windowTileInspectorTileX - 1, 0); window_tile_inspector_load_tile(w, nullptr); break; case WIDX_SPINNER_Y_INCREASE: - windowTileInspectorTileY = std::min(windowTileInspectorTileY + 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1); + windowTileInspectorTileY = std::min(windowTileInspectorTileY + 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1); window_tile_inspector_load_tile(w, nullptr); break; case WIDX_SPINNER_Y_DECREASE: - windowTileInspectorTileY = std::max(windowTileInspectorTileY - 1, 0); + windowTileInspectorTileY = std::max(windowTileInspectorTileY - 1, 0); window_tile_inspector_load_tile(w, nullptr); break; } // switch widget index @@ -1286,7 +1286,7 @@ static void window_tile_inspector_update(rct_window *w) window_close(w); } -static void window_tile_inspector_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_tile_inspector_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) { return; @@ -1308,14 +1308,14 @@ static void window_tile_inspector_dropdown(rct_window *w, rct_widgetindex widget } } -static void window_tile_inspector_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_tile_inspector_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { map_invalidate_selection_rect(); gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - sint16 mapX = x; - sint16 mapY = y; + int16_t mapX = x; + int16_t mapY = y; rct_tile_element* clickedElement = nullptr; if (input_test_place_object_modifier(PLACE_OBJECT_MODIFIER_COPY_Z)) { @@ -1347,7 +1347,7 @@ static void window_tile_inspector_tool_update(rct_window* w, rct_widgetindex wid map_invalidate_selection_rect(); } -static void window_tile_inspector_update_selected_tile(rct_window* w, sint32 x, sint32 y) +static void window_tile_inspector_update_selected_tile(rct_window* w, int32_t x, int32_t y) { const bool ctrlIsHeldDown = input_test_place_object_modifier(PLACE_OBJECT_MODIFIER_COPY_Z); @@ -1362,8 +1362,8 @@ static void window_tile_inspector_update_selected_tile(rct_window* w, sint32 x, windowTileInspectorToolMouseY = y; windowTileInspectorToolCtrlDown = ctrlIsHeldDown; - sint16 mapX = x; - sint16 mapY = y; + int16_t mapX = x; + int16_t mapY = y; rct_tile_element* clickedElement = nullptr; if (ctrlIsHeldDown) { @@ -1396,17 +1396,17 @@ static void window_tile_inspector_update_selected_tile(rct_window* w, sint32 x, window_tile_inspector_load_tile(w, clickedElement); } -static void window_tile_inspector_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_tile_inspector_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { window_tile_inspector_update_selected_tile(w, x, y); } -static void window_tile_inspector_tool_drag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_tile_inspector_tool_drag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { window_tile_inspector_update_selected_tile(w, x, y); } -static void window_tile_inspector_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_tile_inspector_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { *width = WW - 30; *height = windowTileInspectorElementCount * SCROLLABLE_ROW_HEIGHT; @@ -1436,16 +1436,16 @@ static void window_tile_inspector_set_page(rct_window *w, const TILE_INSPECTOR_P w->pressed_widgets = 0; } -static void window_tile_inspector_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_tile_inspector_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { // Because the list items are displayed in reverse order, subtract the calculated index from the amount of elements - const sint16 index = windowTileInspectorElementCount - (y - 1) / SCROLLABLE_ROW_HEIGHT - 1; + const int16_t index = windowTileInspectorElementCount - (y - 1) / SCROLLABLE_ROW_HEIGHT - 1; window_tile_inspector_select_element_from_list(w, index); } -static void window_tile_inspector_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_tile_inspector_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - sint16 index = windowTileInspectorElementCount - (y - 1) / SCROLLABLE_ROW_HEIGHT - 1; + int16_t index = windowTileInspectorElementCount - (y - 1) / SCROLLABLE_ROW_HEIGHT - 1; if (index < 0 || index >= windowTileInspectorElementCount) windowTileInspectorHighlightedIndex = -1; else @@ -1538,7 +1538,7 @@ static void window_tile_inspector_invalidate(rct_window *w) // Using a switch, because I don't think giving each page their own callbacks is // needed here, as only the mouseup and invalidate functions are different. - const sint32 propertiesAnchor = w->widgets[WIDX_GROUPBOX_PROPERTIES].top; + const int32_t propertiesAnchor = w->widgets[WIDX_GROUPBOX_PROPERTIES].top; const rct_tile_element *const tileElement = window_tile_inspector_get_selected_element(w); switch (w->page) { @@ -1689,7 +1689,7 @@ static void window_tile_inspector_invalidate(rct_window *w) w->widgets[WIDX_WALL_DROPDOWN_SLOPE].text = WallSlopeStringIds[tileElement->GetSceneryQuadrant()]; w->widgets[WIDX_WALL_DROPDOWN_SLOPE_BUTTON].top = GBBT(propertiesAnchor, 1) + 4; w->widgets[WIDX_WALL_DROPDOWN_SLOPE_BUTTON].bottom = GBBB(propertiesAnchor, 1) - 4; - const uint8 wallType = tileElement->properties.wall.type; + const uint8_t wallType = tileElement->properties.wall.type; const rct_wall_scenery_entry wallEntry = get_wall_entry(wallType)->wall; const bool canBeSloped = !(wallEntry.flags & WALL_SCENERY_CANT_BUILD_ON_SLOPE); // Wall slope dropdown @@ -1782,8 +1782,8 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) if (windowTileInspectorSelectedIndex != -1) { // X and Y of first element in detail box - sint32 x = w->x + w->widgets[WIDX_GROUPBOX_DETAILS].left + 7; - sint32 y = w->y + w->widgets[WIDX_GROUPBOX_DETAILS].top + 14; + int32_t x = w->x + w->widgets[WIDX_GROUPBOX_DETAILS].left + 7; + int32_t y = w->y + w->widgets[WIDX_GROUPBOX_DETAILS].top + 14; // Get map element rct_tile_element *const tileElement = window_tile_inspector_get_selected_element(w); @@ -1796,8 +1796,8 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SURFACE_TERAIN, &terrainNameId, COLOUR_DARK_GREEN, x, y); // Edge texture name - sint32 idx = surface_get_terrain_edge(tileElement); - openrct2_assert((uint32)idx < Util::CountOf(TerrainEdgeTypeStringIds), "Tried accessing invalid entry %d in terrainEdgeTypeStringIds", idx); + int32_t idx = surface_get_terrain_edge(tileElement); + openrct2_assert((uint32_t)idx < Util::CountOf(TerrainEdgeTypeStringIds), "Tried accessing invalid entry %d in terrainEdgeTypeStringIds", idx); rct_string_id terrainEdgeNameId = TerrainEdgeTypeStringIds[surface_get_terrain_edge(tileElement)]; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SURFACE_EDGE, &terrainEdgeNameId, COLOUR_DARK_GREEN, x, y + 11); @@ -1811,7 +1811,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SURFACE_OWNERSHIP, &landOwnership, COLOUR_DARK_GREEN, x, y + 22); // Water level - sint32 waterLevel = surface_get_water_height(tileElement); + int32_t waterLevel = surface_get_water_height(tileElement); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL, &waterLevel, COLOUR_DARK_GREEN, x, y + 33); // Properties @@ -1822,7 +1822,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_SURFACE_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); // Raised corners @@ -1840,7 +1840,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Path addition if (footpath_element_has_path_scenery(tileElement)) { - const uint8 pathAdditionType = footpath_element_get_path_scenery_index(tileElement); + const uint8_t pathAdditionType = footpath_element_get_path_scenery_index(tileElement); rct_string_id additionNameId = get_footpath_item_entry(pathAdditionType)->name; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_PATH_ADDITIONS, &additionNameId, COLOUR_DARK_GREEN, x, y + 11); } @@ -1855,7 +1855,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_PATH_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); // Path connections @@ -1868,17 +1868,17 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) case TILE_INSPECTOR_PAGE_TRACK: { // Details // Ride - sint16 rideId = track_element_get_ride_index(tileElement); + int16_t rideId = track_element_get_ride_index(tileElement); Ride *ride = get_ride(rideId); rct_string_id rideType = RideNaming[ride->type].name; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_TRACK_RIDE_TYPE, &rideType, COLOUR_DARK_GREEN, x, y); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_TRACK_RIDE_ID, &rideId, COLOUR_DARK_GREEN, x, y + 11); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(0 + sizeof(rct_string_id), uint32, ride->name_arguments); + set_format_arg(0 + sizeof(rct_string_id), uint32_t, ride->name_arguments); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_TRACK_RIDE_NAME, gCommonFormatArgs, COLOUR_DARK_GREEN, x, y + 22); // Track - sint16 trackType = track_element_get_type(tileElement); - sint16 sequenceNumber = tile_element_get_track_sequence(tileElement); + int16_t trackType = track_element_get_type(tileElement); + int16_t sequenceNumber = tile_element_get_track_sequence(tileElement); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_TRACK_PIECE_ID, &trackType, COLOUR_DARK_GREEN, x, y + 33); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_TRACK_SEQUENCE, &sequenceNumber, COLOUR_DARK_GREEN, x, y + 44); @@ -1889,7 +1889,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_TRACK_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); break; } @@ -1897,14 +1897,14 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) case TILE_INSPECTOR_PAGE_SCENERY: { // Details // Age - sint16 age = tileElement->properties.scenery.age; + int16_t age = tileElement->properties.scenery.age; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SCENERY_AGE, &age, COLOUR_DARK_GREEN, x, y); // Quadrant value const rct_scenery_entry * sceneryEntry = get_small_scenery_entry(tileElement->properties.scenery.type); if (!(scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_FULL_TILE))) { - sint16 quadrant = tileElement->GetSceneryQuadrant(); + int16_t quadrant = tileElement->GetSceneryQuadrant(); static rct_string_id quadrant_string_idx[] = { STR_TILE_INSPECTOR_SCENERY_QUADRANT_SW, STR_TILE_INSPECTOR_SCENERY_QUADRANT_NW, @@ -1915,7 +1915,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Scenery ID - sint16 idx = tileElement->properties.scenery.type; + int16_t idx = tileElement->properties.scenery.type; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX, &idx, COLOUR_DARK_GREEN, x, y + 22); // Properties @@ -1925,7 +1925,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_SCENERY_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); // Quarter tile @@ -1947,15 +1947,15 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) if (tileElement->properties.entrance.type == ENTRANCE_TYPE_PARK_ENTRANCE) { // Park entrance ID - sint32 middleX = windowTileInspectorTileX << 5; - sint32 middleY = windowTileInspectorTileY << 5; + int32_t middleX = windowTileInspectorTileX << 5; + int32_t middleY = windowTileInspectorTileY << 5; // TODO: Make this work with Left/Right park entrance parts - sint16 parkEntranceIndex = park_entrance_get_index(middleX, middleY, tileElement->base_height * 8); + int16_t parkEntranceIndex = park_entrance_get_index(middleX, middleY, tileElement->base_height * 8); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, &parkEntranceIndex, COLOUR_DARK_GREEN, x, y + 11); } else { - sint16 rideEntranceIndex = (tileElement->properties.entrance.index & 0x30) >> 4; // TODO: use mask or function + int16_t rideEntranceIndex = (tileElement->properties.entrance.index & 0x30) >> 4; // TODO: use mask or function if (tileElement->properties.entrance.type == ENTRANCE_TYPE_RIDE_ENTRANCE) { // Ride entrance ID @@ -1977,7 +1977,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) } else { // Ride ID - sint16 rideId = tileElement->properties.entrance.ride_index; + int16_t rideId = tileElement->properties.entrance.ride_index; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID, &rideId, COLOUR_DARK_GREEN, x, y + 22); } @@ -1988,7 +1988,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_ENTRANCE_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); break; } @@ -1996,7 +1996,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) case TILE_INSPECTOR_PAGE_WALL: { // Details // Type - sint16 wallType = tileElement->properties.wall.type; + int16_t wallType = tileElement->properties.wall.type; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_WALL_TYPE, &wallType, COLOUR_DARK_GREEN, x, y); // Banner info @@ -2015,7 +2015,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_WALL_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); // Slope label @@ -2029,11 +2029,11 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) { // Details // Type - sint16 largeSceneryType = scenery_large_get_type(tileElement); + int16_t largeSceneryType = scenery_large_get_type(tileElement); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE, &largeSceneryType, COLOUR_DARK_GREEN, x, y); // Part ID - sint16 pieceID = scenery_large_get_sequence(tileElement); + int16_t pieceID = scenery_large_get_sequence(tileElement); gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_LARGE_SCENERY_PIECE_ID, &pieceID, COLOUR_DARK_GREEN, x, y + 11); // Banner info @@ -2055,7 +2055,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_LARGE_SCENERY_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); break; } @@ -2064,7 +2064,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) { // Details // Banner info - const uint8 bannerIndex = tileElement->properties.banner.index; + const uint8_t bannerIndex = tileElement->properties.banner.index; if (gBanners[bannerIndex].flags & BANNER_FLAG_NO_ENTRY) { rct_string_id noEntryStringIdx = STR_NO_ENTRY; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, &noEntryStringIdx, COLOUR_DARK_GREEN, x, y); @@ -2080,7 +2080,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_BANNER_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); // Blocked paths @@ -2099,7 +2099,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) // Current base height x = w->x + w->widgets[WIDX_CORRUPT_SPINNER_HEIGHT].left + 3; - sint32 baseHeight = tileElement->base_height; + int32_t baseHeight = tileElement->base_height; gfx_draw_string_left(dpi, STR_FORMAT_INTEGER, &baseHeight, COLOUR_DARK_GREEN, x, y); break; } @@ -2107,13 +2107,13 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) } } -static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, sint32 scrollIndex) +static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) { - const sint32 listWidth = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; + const int32_t listWidth = w->widgets[WIDX_LIST].right - w->widgets[WIDX_LIST].left; gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); - sint32 y = SCROLLABLE_ROW_HEIGHT * (windowTileInspectorElementCount - 1); - sint32 i = 0; + int32_t y = SCROLLABLE_ROW_HEIGHT * (windowTileInspectorElementCount - 1); + int32_t i = 0; char buffer[256]; if (!windowTileInspectorTileSelected) @@ -2125,7 +2125,7 @@ static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo* do { const bool selectedRow = i == windowTileInspectorSelectedIndex; const bool hoveredRow = i == windowTileInspectorHighlightedIndex; - sint32 type = tileElement->GetType(); + int32_t type = tileElement->GetType(); const char* typeName = ""; if (selectedRow) @@ -2192,8 +2192,8 @@ static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo* typeName = buffer; } - const sint32 baseHeight = tileElement->base_height; - const sint32 clearanceHeight = tileElement->clearance_height; + const int32_t baseHeight = tileElement->base_height; + const int32_t clearanceHeight = tileElement->clearance_height; const bool ghost = (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) != 0; const bool broken = (tileElement->flags & TILE_ELEMENT_FLAG_BROKEN) != 0; const bool last = (tileElement->flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0; @@ -2201,19 +2201,19 @@ static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo* const rct_string_id stringFormat = (selectedRow || hoveredRow) ? STR_WHITE_STRING : STR_WINDOW_COLOUR_2_STRINGID; // Undo relative scroll offset, but keep the 3 pixel padding - const sint32 x = -w->widgets[WIDX_LIST].left; + const int32_t x = -w->widgets[WIDX_LIST].left; set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, char*, typeName); gfx_draw_string_left_clipped(dpi, stringFormat, gCommonFormatArgs, COLOUR_BLACK, x + COL_X_TYPE + 3, y, COL_X_BH); // 3px padding // Base height set_format_arg(0, rct_string_id, STR_FORMAT_INTEGER); - set_format_arg(2, sint32, baseHeight); + set_format_arg(2, int32_t, baseHeight); gfx_draw_string_left(dpi, stringFormat, gCommonFormatArgs, COLOUR_BLACK, x + COL_X_BH, y); // Clearance height set_format_arg(0, rct_string_id, STR_FORMAT_INTEGER); - set_format_arg(2, sint32, clearanceHeight); + set_format_arg(2, int32_t, clearanceHeight); gfx_draw_string_left(dpi, stringFormat, gCommonFormatArgs, COLOUR_BLACK, x + COL_X_CH, y); // Checkmarks for ghost, broken en last for tile diff --git a/src/openrct2-ui/windows/TitleCommandEditor.cpp b/src/openrct2-ui/windows/TitleCommandEditor.cpp index 5726061b1d..a47e36d136 100644 --- a/src/openrct2-ui/windows/TitleCommandEditor.cpp +++ b/src/openrct2-ui/windows/TitleCommandEditor.cpp @@ -29,8 +29,8 @@ // clang-format off struct TITLE_COMMAND_ORDER { - // originally a uint8, but the new millisecond wait times require a uint16. - uint16 command; + // originally a uint8_t, but the new millisecond wait times require a uint16_t. + uint16_t command; rct_string_id nameStringId; rct_string_id descStringId; }; @@ -77,7 +77,7 @@ enum WINDOW_WATER_WIDGET_IDX { #define WHA ((WW-WS*2)/2) static bool _window_title_command_editor_insert; -static sint32 _window_title_command_editor_index; +static int32_t _window_title_command_editor_index; #define BUF_SIZE 50 static char textbox1Buffer[BUF_SIZE]; static char textbox2Buffer[BUF_SIZE]; @@ -113,17 +113,17 @@ static rct_widget window_title_command_editor_widgets[] = { static void window_title_command_editor_close(rct_window * w); static void window_title_command_editor_mouseup(rct_window * w, rct_widgetindex widgetIndex); static void window_title_command_editor_mousedown(rct_window * w, rct_widgetindex widgetIndex, rct_widget * widget); -static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_title_command_editor_update(rct_window * w); -static void window_title_command_editor_tool_down(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_title_command_editor_tool_down(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_title_command_editor_invalidate(rct_window * w); static void window_title_command_editor_paint(rct_window * w, rct_drawpixelinfo * dpi); static void window_title_command_editor_textinput(rct_window * w, rct_widgetindex widgetIndex, char * text); static void scenario_select_callback(const utf8 * path); -static sint32 get_command_info_index(sint32 index); -static TITLE_COMMAND_ORDER get_command_info(sint32 index); +static int32_t get_command_info_index(int32_t index); +static TITLE_COMMAND_ORDER get_command_info(int32_t index); static LocationXY16 get_location(); -static uint8 get_zoom(); +static uint8_t get_zoom(); static rct_window_event_list window_title_command_editor_events = { window_title_command_editor_close, @@ -167,9 +167,9 @@ static void scenario_select_callback(const utf8 * path) } } -static sint32 get_command_info_index(sint32 index) +static int32_t get_command_info_index(int32_t index) { - for (sint32 i = 0; i < (sint32)NUM_COMMANDS; i++) + for (int32_t i = 0; i < (int32_t)NUM_COMMANDS; i++) { if (_window_title_command_editor_orders[i].command == index) return i; @@ -177,9 +177,9 @@ static sint32 get_command_info_index(sint32 index) return 0; } -static TITLE_COMMAND_ORDER get_command_info(sint32 index) +static TITLE_COMMAND_ORDER get_command_info(int32_t index) { - for (sint32 i = 0; i < (sint32)NUM_COMMANDS; i++) + for (int32_t i = 0; i < (int32_t)NUM_COMMANDS; i++) { if (_window_title_command_editor_orders[i].command == index) return _window_title_command_editor_orders[i]; @@ -193,7 +193,7 @@ static LocationXY16 get_location() rct_window * w = window_get_main(); if (w != nullptr) { - sint32 interactionType; + int32_t interactionType; rct_tile_element * tileElement; get_map_coordinates_from_pos_window(w, w->viewport->view_width / 2, w->viewport->view_height / 2, VIEWPORT_INTERACTION_MASK_TERRAIN, &mapCoord.x, &mapCoord.y, &interactionType, &tileElement, nullptr); @@ -207,9 +207,9 @@ static LocationXY16 get_location() return mapCoord; } -static uint8 get_zoom() +static uint8_t get_zoom() { - uint8 zoom = 0; + uint8_t zoom = 0; rct_window * w = window_get_main(); if (w != nullptr) { @@ -227,7 +227,7 @@ static bool sprite_selector_tool_is_active() return true; } -void window_title_command_editor_open(TitleSequence * sequence, sint32 index, bool insert) +void window_title_command_editor_open(TitleSequence * sequence, int32_t index, bool insert) { _sequence = sequence; @@ -335,14 +335,14 @@ static void window_title_command_editor_mouseup(rct_window * w, rct_widgetindex if (command.Type == TITLE_SCRIPT_LOCATION) { LocationXY16 mapCoord = get_location(); - command.X = (uint8)mapCoord.x; - command.Y = (uint8)mapCoord.y; + command.X = (uint8_t)mapCoord.x; + command.Y = (uint8_t)mapCoord.y; snprintf(textbox1Buffer, BUF_SIZE, "%d", command.X); snprintf(textbox2Buffer, BUF_SIZE, "%d", command.Y); } else if (command.Type == TITLE_SCRIPT_ZOOM) { - uint8 zoom = get_zoom(); + uint8_t zoom = get_zoom(); command.Zoom = zoom; snprintf(textbox1Buffer, BUF_SIZE, "%d", command.Zoom); } @@ -420,8 +420,8 @@ static void window_title_command_editor_mousedown(rct_window * w, rct_widgetinde case WIDX_INPUT_DROPDOWN: if (command.Type == TITLE_SCRIPT_SPEED) { - sint32 numItems = 4; - for (sint32 i = 0; i < numItems; i++) + int32_t numItems = 4; + for (int32_t i = 0; i < numItems; i++) { gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; gDropdownItemsArgs[i] = SpeedNames[i]; @@ -441,8 +441,8 @@ static void window_title_command_editor_mousedown(rct_window * w, rct_widgetinde } else if (command.Type == TITLE_SCRIPT_LOAD) { - sint32 numItems = (sint32)_sequence->NumSaves; - for (sint32 i = 0; i < numItems; i++) + int32_t numItems = (int32_t)_sequence->NumSaves; + for (int32_t i = 0; i < numItems; i++) { gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM; gDropdownItemsArgs[i] = (uintptr_t)_sequence->Saves[i]; @@ -464,7 +464,7 @@ static void window_title_command_editor_mousedown(rct_window * w, rct_widgetinde } } -static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -492,8 +492,8 @@ static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex case TITLE_SCRIPT_LOCATION: { LocationXY16 mapCoord = get_location(); - command.X = (uint8)mapCoord.x; - command.Y = (uint8)mapCoord.y; + command.X = (uint8_t)mapCoord.x; + command.Y = (uint8_t)mapCoord.y; snprintf(textbox1Buffer, BUF_SIZE, "%d", command.X); snprintf(textbox2Buffer, BUF_SIZE, "%d", command.Y); break; @@ -537,14 +537,14 @@ static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex case TITLE_SCRIPT_SPEED: if (dropdownIndex != command.Speed - 1) { - command.Speed = (uint8)(dropdownIndex + 1); + command.Speed = (uint8_t)(dropdownIndex + 1); window_invalidate(w); } break; case TITLE_SCRIPT_LOAD: if (dropdownIndex != command.SaveIndex) { - command.SaveIndex = (uint8)dropdownIndex; + command.SaveIndex = (uint8_t)dropdownIndex; window_invalidate(w); } break; @@ -556,7 +556,7 @@ static void window_title_command_editor_dropdown(rct_window * w, rct_widgetindex static void window_title_command_editor_textinput(rct_window * w, rct_widgetindex widgetIndex, char * text) { char * end; - sint32 value = strtol(widgetIndex != WIDX_TEXTBOX_Y ? textbox1Buffer : textbox2Buffer, &end, 10); + int32_t value = strtol(widgetIndex != WIDX_TEXTBOX_Y ? textbox1Buffer : textbox2Buffer, &end, 10); if (value < 0) value = 0; // The Wait command is the only one with acceptable values greater than 255. if (value > 255 && command.Type != TITLE_SCRIPT_WAIT) value = 255; @@ -571,7 +571,7 @@ static void window_title_command_editor_textinput(rct_window * w, rct_widgetinde { if (value < 100) value = 100; if (value > 65000) value = 65000; - command.Milliseconds = (uint16)value; + command.Milliseconds = (uint16_t)value; snprintf(textbox1Buffer, BUF_SIZE, "%d", command.Milliseconds); } else @@ -579,7 +579,7 @@ static void window_title_command_editor_textinput(rct_window * w, rct_widgetinde // Both Rotate and Zoom have a maximum value of 3, but Rotate has a min value of 1 not 0. if (value > 3) value = 3; if (value < 1 && command.Type == TITLE_SCRIPT_ROTATE) value = 1; - command.Rotations = (uint8)value; + command.Rotations = (uint8_t)value; snprintf(textbox1Buffer, BUF_SIZE, "%d", command.Rotations); } } @@ -595,7 +595,7 @@ static void window_title_command_editor_textinput(rct_window * w, rct_widgetinde { if (*end == '\0') { - command.X = (uint8)value; + command.X = (uint8_t)value; } snprintf(textbox1Buffer, BUF_SIZE, "%d", command.X); window_invalidate(w); @@ -610,7 +610,7 @@ static void window_title_command_editor_textinput(rct_window * w, rct_widgetinde { if (*end == '\0') { - command.Y = (uint8)value; + command.Y = (uint8_t)value; } snprintf(textbox2Buffer, BUF_SIZE, "%d", command.Y); window_invalidate(w); @@ -633,15 +633,15 @@ static void window_title_command_editor_update(rct_window * w) } } -static void window_title_command_editor_tool_down(rct_window * w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_title_command_editor_tool_down(rct_window * w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { viewport_interaction_info info; viewport_interaction_get_item_left(x, y, &info); if (info.type == VIEWPORT_INTERACTION_ITEM_SPRITE) { - uint16 spriteIndex = info.sprite->unknown.sprite_index; - uint16 spriteIdentifier = info.sprite->unknown.sprite_identifier; + uint16_t spriteIndex = info.sprite->unknown.sprite_index; + uint16_t spriteIdentifier = info.sprite->unknown.sprite_identifier; bool validSprite = false; if (spriteIdentifier == SPRITE_IDENTIFIER_PEEP) { @@ -654,7 +654,7 @@ static void window_title_command_editor_tool_down(rct_window * w, rct_widgetinde validSprite = true; rct_vehicle * vehicle = GET_VEHICLE(spriteIndex); Ride * ride = get_ride(vehicle->ride); - set_format_arg(16, uint32, ride->name_arguments); + set_format_arg(16, uint32_t, ride->name_arguments); format_string(command.SpriteName, USER_STRING_MAX_LENGTH, ride->name, &ride->name_arguments); } else if (spriteIdentifier == SPRITE_IDENTIFIER_LITTER) @@ -786,7 +786,7 @@ static void window_title_command_editor_paint(rct_window * w, rct_drawpixelinfo } if (command.Type == TITLE_SCRIPT_FOLLOW) { - uint8 colour = COLOUR_BLACK; + uint8_t colour = COLOUR_BLACK; rct_string_id spriteString = STR_TITLE_COMMAND_EDITOR_FORMAT_SPRITE_NAME; if (command.SpriteIndex != SPRITE_INDEX_NULL) { diff --git a/src/openrct2-ui/windows/TitleEditor.cpp b/src/openrct2-ui/windows/TitleEditor.cpp index be182fc553..a29c9570d3 100644 --- a/src/openrct2-ui/windows/TitleEditor.cpp +++ b/src/openrct2-ui/windows/TitleEditor.cpp @@ -43,23 +43,23 @@ static void window_title_editor_close(rct_window * w); static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIndex); static void window_title_editor_resize(rct_window * w); static void window_title_editor_mousedown(rct_window * w, rct_widgetindex widgetIndex, rct_widget * widget); -static void window_title_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +static void window_title_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex); static void window_title_editor_update(rct_window * w); -static void window_title_editor_scrollgetsize(rct_window * w, sint32 scrollIndex, sint32 * width, sint32 * height); -static void window_title_editor_scrollmousedown(rct_window * w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_title_editor_scrollmouseover(rct_window * w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_title_editor_scrollgetsize(rct_window * w, int32_t scrollIndex, int32_t * width, int32_t * height); +static void window_title_editor_scrollmousedown(rct_window * w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_title_editor_scrollmouseover(rct_window * w, int32_t scrollIndex, int32_t x, int32_t y); static void window_title_editor_textinput(rct_window * w, rct_widgetindex widgetIndex, char * text); static void window_title_editor_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id * stringId); static void window_title_editor_invalidate(rct_window * w); static void window_title_editor_paint(rct_window * w, rct_drawpixelinfo * dpi); -static void window_title_editor_scrollpaint(rct_window * w, rct_drawpixelinfo * dpi, sint32 scrollIndex); +static void window_title_editor_scrollpaint(rct_window * w, rct_drawpixelinfo * dpi, int32_t scrollIndex); static void window_title_editor_scrollpaint_saves(rct_window * w, rct_drawpixelinfo * dpi); static void window_title_editor_scrollpaint_commands(rct_window * w, rct_drawpixelinfo * dpi); static void window_title_editor_draw_tab_images(rct_drawpixelinfo * dpi, rct_window * w); static void window_title_editor_load_sequence(size_t index); static ITitleSequencePlayer * window_title_editor_get_player(); static bool window_title_editor_check_can_edit(); -static void window_title_editor_add_park_callback(sint32 result, const utf8 * path); +static void window_title_editor_add_park_callback(int32_t result, const utf8 * path); static void window_title_editor_rename_park(size_t index, const utf8 * name); static rct_window_event_list window_title_editor_events = { @@ -194,26 +194,26 @@ static const utf8 * _sequenceName; static utf8 * _renameSavePath = nullptr; -static sint16 _window_title_editor_highlighted_index; +static int16_t _window_title_editor_highlighted_index; -static sint32 window_title_editor_tab_animation_loops[] = { +static int32_t window_title_editor_tab_animation_loops[] = { 64, 1, 28 }; -static sint32 window_title_editor_tab_animation_divisor[] = { +static int32_t window_title_editor_tab_animation_divisor[] = { 4, 1, 4 }; -static sint32 window_title_editor_tab_sprites[] = { +static int32_t window_title_editor_tab_sprites[] = { SPR_TAB_RIDE_0, SPR_FLOPPY, SPR_TAB_STATS_0 }; // clang-format on -void window_title_editor_open(sint32 tab) +void window_title_editor_open(int32_t tab) { rct_window * window; @@ -349,7 +349,7 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn if (w->selected_list_item != -1) { TitleSequenceRemovePark(_editingTitleSequence, w->selected_list_item); - if (w->selected_list_item >= (sint16)_editingTitleSequence->NumSaves) + if (w->selected_list_item >= (int16_t)_editingTitleSequence->NumSaves) { w->selected_list_item--; } @@ -366,7 +366,7 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn } break; case WIDX_TITLE_EDITOR_LOAD_SAVE: - if (w->selected_list_item >= 0 && w->selected_list_item < (sint16)_editingTitleSequence->NumSaves) + if (w->selected_list_item >= 0 && w->selected_list_item < (int16_t)_editingTitleSequence->NumSaves) { auto handle = TitleSequenceGetParkHandle(_editingTitleSequence, w->selected_list_item); auto stream = (IStream *)handle->Stream; @@ -398,13 +398,13 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn if (w->selected_list_item != -1) window_title_command_editor_open(_editingTitleSequence, w->selected_list_item + 1, true); else - window_title_command_editor_open(_editingTitleSequence, (sint32)_editingTitleSequence->NumCommands, true); + window_title_command_editor_open(_editingTitleSequence, (int32_t)_editingTitleSequence->NumCommands, true); } break; case WIDX_TITLE_EDITOR_EDIT: if (window_title_editor_check_can_edit()) { - if (w->selected_list_item != -1 && w->selected_list_item < (sint16)_editingTitleSequence->NumCommands) + if (w->selected_list_item != -1 && w->selected_list_item < (int16_t)_editingTitleSequence->NumCommands) { window_title_command_editor_open(_editingTitleSequence, w->selected_list_item, false); } @@ -413,14 +413,14 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn case WIDX_TITLE_EDITOR_DELETE: if (window_title_editor_check_can_edit()) { - if (w->selected_list_item != -1 && w->selected_list_item < (sint16)_editingTitleSequence->NumCommands) + if (w->selected_list_item != -1 && w->selected_list_item < (int16_t)_editingTitleSequence->NumCommands) { - for (sint32 i = w->selected_list_item; i < (sint16)_editingTitleSequence->NumCommands - 1; i++) + for (int32_t i = w->selected_list_item; i < (int16_t)_editingTitleSequence->NumCommands - 1; i++) { _editingTitleSequence->Commands[i] = _editingTitleSequence->Commands[i + 1]; } _editingTitleSequence->NumCommands--; - if (w->selected_list_item >= (sint16)_editingTitleSequence->NumCommands) + if (w->selected_list_item >= (int16_t)_editingTitleSequence->NumCommands) { w->selected_list_item--; } @@ -430,8 +430,8 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn break; case WIDX_TITLE_EDITOR_SKIP_TO: { - sint32 position = w->selected_list_item; - if (title_is_previewing_sequence() && position != -1 && position < (sint32)_editingTitleSequence->NumCommands) + int32_t position = w->selected_list_item; + if (title_is_previewing_sequence() && position != -1 && position < (int32_t)_editingTitleSequence->NumCommands) { auto player = window_title_editor_get_player(); player->Seek(position); @@ -442,7 +442,7 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn case WIDX_TITLE_EDITOR_MOVE_DOWN: if (window_title_editor_check_can_edit()) { - if (w->selected_list_item != -1 && w->selected_list_item < (sint16)_editingTitleSequence->NumCommands - 1) + if (w->selected_list_item != -1 && w->selected_list_item < (int16_t)_editingTitleSequence->NumCommands - 1) { TitleCommand * a = &_editingTitleSequence->Commands[w->selected_list_item]; TitleCommand * b = &_editingTitleSequence->Commands[w->selected_list_item + 1]; @@ -457,7 +457,7 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn case WIDX_TITLE_EDITOR_MOVE_UP: if (window_title_editor_check_can_edit()) { - if (w->selected_list_item > 0 && w->selected_list_item < (sint16)_editingTitleSequence->NumCommands) + if (w->selected_list_item > 0 && w->selected_list_item < (int16_t)_editingTitleSequence->NumCommands) { TitleCommand * a = &_editingTitleSequence->Commands[w->selected_list_item - 1]; TitleCommand * b = &_editingTitleSequence->Commands[w->selected_list_item]; @@ -500,8 +500,8 @@ static void window_title_editor_mouseup(rct_window * w, rct_widgetindex widgetIn if (title_is_previewing_sequence()) { auto player = window_title_editor_get_player(); - sint32 position = player->GetCurrentPosition() + 1; - if (position >= (sint32)_editingTitleSequence->NumCommands) + int32_t position = player->GetCurrentPosition() + 1; + if (position >= (int32_t)_editingTitleSequence->NumCommands) { position = 0; } @@ -528,7 +528,7 @@ static void window_title_editor_mousedown(rct_window * w, rct_widgetindex widget case WIDX_TITLE_EDITOR_SAVES_TAB: case WIDX_TITLE_EDITOR_SCRIPT_TAB: { - sint32 newSelectedTab = widgetIndex - WIDX_TITLE_EDITOR_PRESETS_TAB; + int32_t newSelectedTab = widgetIndex - WIDX_TITLE_EDITOR_PRESETS_TAB; if (w->selected_tab != newSelectedTab) { w->selected_tab = newSelectedTab; @@ -548,8 +548,8 @@ static void window_title_editor_mousedown(rct_window * w, rct_widgetindex widget } else { - sint32 numItems = (sint32)title_sequence_manager_get_count(); - for (sint32 i = 0; i < numItems; i++) + int32_t numItems = (int32_t)title_sequence_manager_get_count(); + for (int32_t i = 0; i < numItems; i++) { gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM; gDropdownItemsArgs[i] = (uintptr_t)title_sequence_manager_get_name(i); @@ -565,13 +565,13 @@ static void window_title_editor_mousedown(rct_window * w, rct_widgetindex widget DROPDOWN_FLAG_STAY_OPEN, numItems, widget->right - widget->left - 3); - dropdown_set_checked((sint32)_selectedTitleSequence, true); + dropdown_set_checked((int32_t)_selectedTitleSequence, true); } break; } } -static void window_title_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_title_editor_dropdown(rct_window * w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -600,7 +600,7 @@ static void window_title_editor_update(rct_window * w) widget_invalidate(w, WIDX_TITLE_EDITOR_PRESETS_TAB + w->selected_tab); } -static void window_title_editor_scrollgetsize(rct_window * w, sint32 scrollIndex, sint32 * width, sint32 * height) +static void window_title_editor_scrollgetsize(rct_window * w, int32_t scrollIndex, int32_t * width, int32_t * height) { size_t lineCount = 1; if (w->selected_tab == WINDOW_TITLE_EDITOR_TAB_SAVES) @@ -608,8 +608,8 @@ static void window_title_editor_scrollgetsize(rct_window * w, sint32 scrollIndex else if (w->selected_tab == WINDOW_TITLE_EDITOR_TAB_SCRIPT) lineCount = _editingTitleSequence->NumCommands; - *height = (sint32)(lineCount * SCROLLABLE_ROW_HEIGHT); - sint32 i = *height - window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].bottom + window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].top + 21; + *height = (int32_t)(lineCount * SCROLLABLE_ROW_HEIGHT); + int32_t i = *height - window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].bottom + window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].top + 21; if (i < 0) { i = 0; @@ -623,21 +623,21 @@ static void window_title_editor_scrollgetsize(rct_window * w, sint32 scrollIndex *width = SCROLL_WIDTH; } -static void window_title_editor_scrollmousedown(rct_window * w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_title_editor_scrollmousedown(rct_window * w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index = y / SCROLLABLE_ROW_HEIGHT; + int32_t index = y / SCROLLABLE_ROW_HEIGHT; w->selected_list_item = -1; switch (w->selected_tab) { case WINDOW_TITLE_EDITOR_TAB_SAVES: - if (index < (sint32)_editingTitleSequence->NumSaves) + if (index < (int32_t)_editingTitleSequence->NumSaves) { w->selected_list_item = index; widget_invalidate(w, WIDX_TITLE_EDITOR_LIST); } break; case WINDOW_TITLE_EDITOR_TAB_SCRIPT: - if (index < (sint32)_editingTitleSequence->NumCommands) + if (index < (int32_t)_editingTitleSequence->NumCommands) { w->selected_list_item = index; widget_invalidate(w, WIDX_TITLE_EDITOR_LIST); @@ -646,18 +646,18 @@ static void window_title_editor_scrollmousedown(rct_window * w, sint32 scrollInd } } -static void window_title_editor_scrollmouseover(rct_window * w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_title_editor_scrollmouseover(rct_window * w, int32_t scrollIndex, int32_t x, int32_t y) { - sint32 index = y / SCROLLABLE_ROW_HEIGHT; + int32_t index = y / SCROLLABLE_ROW_HEIGHT; switch (w->selected_tab) { case WINDOW_TITLE_EDITOR_TAB_SAVES: - if (index < (sint32)_editingTitleSequence->NumSaves) - _window_title_editor_highlighted_index = (sint16)index; + if (index < (int32_t)_editingTitleSequence->NumSaves) + _window_title_editor_highlighted_index = (int16_t)index; break; case WINDOW_TITLE_EDITOR_TAB_SCRIPT: - if (index < (sint32)_editingTitleSequence->NumCommands) - _window_title_editor_highlighted_index = (sint16)index; + if (index < (int32_t)_editingTitleSequence->NumCommands) + _window_title_editor_highlighted_index = (int16_t)index; break; } widget_invalidate(w, WIDX_TITLE_EDITOR_LIST); @@ -725,7 +725,7 @@ static void window_title_editor_tooltip(rct_window * w, rct_widgetindex widgetIn static void window_title_editor_invalidate(rct_window * w) { - sint32 pressed_widgets = w->pressed_widgets & ~( + int32_t pressed_widgets = w->pressed_widgets & ~( (1LL << WIDX_TITLE_EDITOR_PRESETS_TAB) | (1LL << WIDX_TITLE_EDITOR_SAVES_TAB) | (1LL << WIDX_TITLE_EDITOR_SCRIPT_TAB) @@ -854,7 +854,7 @@ static void window_title_editor_paint(rct_window * w, rct_drawpixelinfo * dpi) } } -static void window_title_editor_scrollpaint(rct_window * w, rct_drawpixelinfo * dpi, sint32 scrollIndex) +static void window_title_editor_scrollpaint(rct_window * w, rct_drawpixelinfo * dpi, int32_t scrollIndex) { gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, ColourMapA[w->colours[1]].mid_light); switch (w->selected_tab) @@ -870,17 +870,17 @@ static void window_title_editor_scrollpaint(rct_window * w, rct_drawpixelinfo * static void window_title_editor_scrollpaint_saves(rct_window * w, rct_drawpixelinfo * dpi) { - sint32 currentSaveIndex = -1; + int32_t currentSaveIndex = -1; // ITitleSequencePlayer * player = window_title_editor_get_player(); - // sint32 position = title_sequence_player_get_current_position(player); + // int32_t position = title_sequence_player_get_current_position(player); // const TitleCommand * command = &_editingTitleSequence->Commands[position]; - sint32 x = 0; - sint32 y = 0; + int32_t x = 0; + int32_t y = 0; if (_editingTitleSequence == nullptr) return; - for (sint32 i = 0; i < (sint32)_editingTitleSequence->NumSaves; i++, y += SCROLLABLE_ROW_HEIGHT) + for (int32_t i = 0; i < (int32_t)_editingTitleSequence->NumSaves; i++, y += SCROLLABLE_ROW_HEIGHT) { bool selected = false; bool hover = false; @@ -908,7 +908,7 @@ static void window_title_editor_scrollpaint_saves(rct_window * w, rct_drawpixeli else { format_string(buffer + 1, 255, STR_STRING, gCommonFormatArgs); - buffer[0] = (utf8)(uint8)FORMAT_BLACK; + buffer[0] = (utf8)(uint8_t)FORMAT_BLACK; } set_format_arg(0, uintptr_t, &buffer); gfx_draw_string_left(dpi, STR_STRING, gCommonFormatArgs, w->colours[1], x + 5, y); @@ -917,16 +917,16 @@ static void window_title_editor_scrollpaint_saves(rct_window * w, rct_drawpixeli static void window_title_editor_scrollpaint_commands(rct_window * w, rct_drawpixelinfo * dpi) { - sint32 position = -1; + int32_t position = -1; if (title_is_previewing_sequence() && _selectedTitleSequence == title_get_current_sequence()) { auto player = window_title_editor_get_player(); position = player->GetCurrentPosition(); } - sint32 x = 0; - sint32 y = 0; - for (sint32 i = 0; i < (sint32)_editingTitleSequence->NumCommands; i++, y += SCROLLABLE_ROW_HEIGHT) + int32_t x = 0; + int32_t y = 0; + for (int32_t i = 0; i < (int32_t)_editingTitleSequence->NumCommands; i++, y += SCROLLABLE_ROW_HEIGHT) { TitleCommand * command = &_editingTitleSequence->Commands[i]; bool selected = false; @@ -937,7 +937,7 @@ static void window_title_editor_scrollpaint_commands(rct_window * w, rct_drawpix selected = true; gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + SCROLLABLE_ROW_HEIGHT - 1, ColourMapA[w->colours[1]].dark); } - else if (i == (sint32)_window_title_editor_highlighted_index || i == position) + else if (i == (int32_t)_window_title_editor_highlighted_index || i == position) { hover = true; gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + SCROLLABLE_ROW_HEIGHT - 1, ColourMapA[w->colours[1]].mid_dark); @@ -967,16 +967,16 @@ static void window_title_editor_scrollpaint_commands(rct_window * w, rct_drawpix break; case TITLE_SCRIPT_LOCATION: commandName = STR_TITLE_EDITOR_COMMAND_LOCATION; - set_format_arg(0, uint16, command->X); - set_format_arg(2, uint16, command->Y); + set_format_arg(0, uint16_t, command->X); + set_format_arg(2, uint16_t, command->Y); break; case TITLE_SCRIPT_ROTATE: commandName = STR_TITLE_EDITOR_COMMAND_ROTATE; - set_format_arg(0, uint16, command->Rotations); + set_format_arg(0, uint16_t, command->Rotations); break; case TITLE_SCRIPT_ZOOM: commandName = STR_TITLE_EDITOR_COMMAND_ZOOM; - set_format_arg(0, uint16, command->Zoom); + set_format_arg(0, uint16_t, command->Zoom); break; case TITLE_SCRIPT_SPEED: commandName = STR_TITLE_EDITOR_COMMAND_SPEED; @@ -995,7 +995,7 @@ static void window_title_editor_scrollpaint_commands(rct_window * w, rct_drawpix break; case TITLE_SCRIPT_WAIT: commandName = STR_TITLE_EDITOR_COMMAND_WAIT; - set_format_arg(0, uint16, command->Milliseconds); + set_format_arg(0, uint16_t, command->Milliseconds); break; case TITLE_SCRIPT_RESTART: commandName = STR_TITLE_EDITOR_RESTART; @@ -1057,11 +1057,11 @@ static void window_title_editor_scrollpaint_commands(rct_window * w, rct_drawpix static void window_title_editor_draw_tab_images(rct_drawpixelinfo * dpi, rct_window * w) { - for (sint32 i = 0; i < WINDOW_TITLE_EDITOR_TAB_COUNT; i++) + for (int32_t i = 0; i < WINDOW_TITLE_EDITOR_TAB_COUNT; i++) { - sint32 x = 0; - sint32 y = 0; - sint32 spriteId = window_title_editor_tab_sprites[i]; + int32_t x = 0; + int32_t y = 0; + int32_t spriteId = window_title_editor_tab_sprites[i]; if (w->selected_tab == i) { spriteId += w->frame_no / window_title_editor_tab_animation_divisor[w->selected_tab]; @@ -1132,9 +1132,9 @@ static bool save_filename_exists(const utf8 * filename) return false; } -static void window_title_editor_add_park_callback(sint32 result, const utf8 * path) +static void window_title_editor_add_park_callback(int32_t result, const utf8 * path) { - uint32 extension = get_file_extension_type(path); + uint32_t extension = get_file_extension_type(path); if (extension != FILE_EXTENSION_SV4 && extension != FILE_EXTENSION_SV6) return; diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 53cdeffed2..361452bf60 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -76,8 +76,8 @@ rct_window * window_title_logo_open() */ static void window_title_logo_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x = 2; - sint32 y = 2; + int32_t x = 2; + int32_t y = 2; gfx_draw_sprite(dpi, SPR_G2_LOGO, w->x + x, w->y + y, 0); gfx_draw_sprite(dpi, SPR_G2_TITLE, w->x + x + 104, w->y + y + 18, 0); } diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index 9fd6d07084..49111176a0 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -38,8 +38,8 @@ static rct_widget window_title_menu_widgets[] = { static void window_title_menu_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_title_menu_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_title_menu_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); -static void window_title_menu_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId); +static void window_title_menu_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); +static void window_title_menu_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId); static void window_title_menu_paint(rct_window *w, rct_drawpixelinfo *dpi); static rct_window_event_list window_title_menu_events = { @@ -100,7 +100,7 @@ rct_window * window_title_menu_open() ); rct_widgetindex i = 0; - sint32 x = 0; + int32_t x = 0; for (rct_widget *widget = window->widgets; widget->type != WWT_LAST; widget++) { if (widget_is_enabled(window, i)) { widget->left = x; @@ -184,7 +184,7 @@ static void window_title_menu_mousedown(rct_window *w, rct_widgetindex widgetInd } } -static void window_title_menu_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_title_menu_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_GAME_TOOLS) { switch (dropdownIndex) { @@ -204,7 +204,7 @@ static void window_title_menu_dropdown(rct_window *w, rct_widgetindex widgetInde } } -static void window_title_menu_cursor(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y, sint32 *cursorId) +static void window_title_menu_cursor(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y, int32_t *cursorId) { gTooltipTimeout = 2000; } diff --git a/src/openrct2-ui/windows/TitleScenarioSelect.cpp b/src/openrct2-ui/windows/TitleScenarioSelect.cpp index 4b394ca15c..58f5986fd8 100644 --- a/src/openrct2-ui/windows/TitleScenarioSelect.cpp +++ b/src/openrct2-ui/windows/TitleScenarioSelect.cpp @@ -26,7 +26,7 @@ #define INITIAL_NUM_UNLOCKED_SCENARIOS 5 // clang-format off -enum class LIST_ITEM_TYPE : uint8 +enum class LIST_ITEM_TYPE : uint8_t { HEADING, SCENARIO, @@ -100,12 +100,12 @@ static void window_scenarioselect_init_tabs(rct_window *w); static void window_scenarioselect_close(rct_window *w); static void window_scenarioselect_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_scenarioselect_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_scenarioselect_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_scenarioselect_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_scenarioselect_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_scenarioselect_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_scenarioselect_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_scenarioselect_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_scenarioselect_invalidate(rct_window *w); static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_scenarioselect_events = { window_scenarioselect_close, @@ -139,7 +139,7 @@ static rct_window_event_list window_scenarioselect_events = { }; // clang-format on -static void draw_category_heading(rct_window *w, rct_drawpixelinfo *dpi, sint32 left, sint32 right, sint32 y, rct_string_id stringId); +static void draw_category_heading(rct_window *w, rct_drawpixelinfo *dpi, int32_t left, int32_t right, int32_t y, rct_string_id stringId); static void initialise_list_items(rct_window *w); static bool is_scenario_visible(rct_window *w, const scenario_index_entry *scenario); static bool is_locking_enabled(rct_window *w); @@ -155,8 +155,8 @@ static bool _titleEditor = false; rct_window * window_scenarioselect_open(scenarioselect_callback callback, bool titleEditor) { rct_window* window; - sint32 windowWidth; - sint32 windowHeight = 334; + int32_t windowWidth; + int32_t windowHeight = 334; _callback = callback; @@ -207,7 +207,7 @@ rct_window * window_scenarioselect_open(scenarioselect_callback callback, bool t */ static void window_scenarioselect_init_tabs(rct_window *w) { - sint32 showPages = 0; + int32_t showPages = 0; size_t numScenarios = scenario_repository_get_count(); for (size_t i = 0; i < numScenarios; i++) { @@ -220,7 +220,7 @@ static void window_scenarioselect_init_tabs(rct_window *w) } else { - sint32 category = scenario->category; + int32_t category = scenario->category; if (category > SCENARIO_CATEGORY_OTHER) { category = SCENARIO_CATEGORY_OTHER; @@ -229,13 +229,13 @@ static void window_scenarioselect_init_tabs(rct_window *w) } } - sint32 firstPage = bitscanforward(showPages); + int32_t firstPage = bitscanforward(showPages); if (firstPage != -1) { w->selected_tab = firstPage; } - sint32 x = 3; - for (sint32 i = 0; i < 8; i++) { + int32_t x = 3; + for (int32_t i = 0; i < 8; i++) { rct_widget* widget = &w->widgets[i + WIDX_TAB1]; if (!(showPages & (1 << i))) { widget->type = WWT_EMPTY; @@ -276,13 +276,13 @@ static void window_scenarioselect_mousedown(rct_window *w, rct_widgetindex widge } } -static sint32 get_scenario_list_item_size() +static int32_t get_scenario_list_item_size() { if (!LocalisationService_UseTrueTypeFont()) return 24; // Scenario title - sint32 lineHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + int32_t lineHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); // 'Completed by' line lineHeight += font_get_line_height(FONT_SPRITE_BASE_SMALL); @@ -290,11 +290,11 @@ static sint32 get_scenario_list_item_size() return lineHeight; } -static void window_scenarioselect_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_scenarioselect_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { - const sint32 scenarioItemHeight = get_scenario_list_item_size(); + const int32_t scenarioItemHeight = get_scenario_list_item_size(); - sint32 y = 0; + int32_t y = 0; for (const auto &listItem : _listItems) { switch (listItem.type) @@ -314,9 +314,9 @@ static void window_scenarioselect_scrollgetsize(rct_window *w, sint32 scrollInde * * rct2: 0x6780FE */ -static void window_scenarioselect_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_scenarioselect_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - const sint32 scenarioItemHeight = get_scenario_list_item_size(); + const int32_t scenarioItemHeight = get_scenario_list_item_size(); for (const auto &listItem : _listItems) { @@ -348,9 +348,9 @@ static void window_scenarioselect_scrollmousedown(rct_window *w, sint32 scrollIn * * rct2: 0x678162 */ -static void window_scenarioselect_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_scenarioselect_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { - const sint32 scenarioItemHeight = get_scenario_list_item_size(); + const int32_t scenarioItemHeight = get_scenario_list_item_size(); bool originalShowLockedInformation = _showLockedInformation; _showLockedInformation = false; @@ -394,7 +394,7 @@ static void window_scenarioselect_invalidate(rct_window *w) w->pressed_widgets |= 1LL << (w->selected_tab + WIDX_TAB1); - sint32 windowWidth = w->width; + int32_t windowWidth = w->width; window_scenarioselect_widgets[WIDX_BACKGROUND].right = windowWidth - 1; window_scenarioselect_widgets[WIDX_TITLEBAR].right = windowWidth - 2; window_scenarioselect_widgets[WIDX_CLOSE].left = windowWidth - 13; @@ -402,17 +402,17 @@ static void window_scenarioselect_invalidate(rct_window *w) window_scenarioselect_widgets[WIDX_TABCONTENT].right = windowWidth - 1; window_scenarioselect_widgets[WIDX_SCENARIOLIST].right = windowWidth - 179; - sint32 windowHeight = w->height; + int32_t windowHeight = w->height; window_scenarioselect_widgets[WIDX_BACKGROUND].bottom = windowHeight - 1; window_scenarioselect_widgets[WIDX_TABCONTENT].bottom = windowHeight - 1; - const sint32 bottomMargin = gConfigGeneral.debugging_tools ? 17 : 5; + const int32_t bottomMargin = gConfigGeneral.debugging_tools ? 17 : 5; window_scenarioselect_widgets[WIDX_SCENARIOLIST].bottom = windowHeight - bottomMargin; } static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 format; + int32_t format; const scenario_index_entry *scenario; window_draw_widgets(w, dpi); @@ -420,13 +420,13 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) format = (theme_get_flags() & UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT) ? STR_SMALL_WINDOW_COLOUR_2_STRINGID : STR_WINDOW_COLOUR_2_STRINGID; // Text for each tab - for (sint32 i = 0; i < 8; i++) { + for (int32_t i = 0; i < 8; i++) { rct_widget *widget = &window_scenarioselect_widgets[WIDX_TAB1 + i]; if (widget->type == WWT_EMPTY) continue; - sint32 x = (widget->left + widget->right) / 2 + w->x; - sint32 y = (widget->top + widget->bottom) / 2 + w->y - 3; + int32_t x = (widget->left + widget->right) / 2 + w->x; + int32_t y = (widget->top + widget->bottom) / 2 + w->y - 3; if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor) { set_format_arg(0, rct_string_id, ScenarioOriginStringIds[i]); @@ -441,8 +441,8 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) if (scenario == nullptr) { if (_showLockedInformation) { // Show locked information - sint32 x = w->x + window_scenarioselect_widgets[WIDX_SCENARIOLIST].right + 4; - sint32 y = w->y + window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5; + int32_t x = w->x + window_scenarioselect_widgets[WIDX_SCENARIOLIST].right + 4; + int32_t y = w->y + window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5; gfx_draw_string_centred_clipped(dpi, STR_SCENARIO_LOCKED, nullptr, COLOUR_BLACK, x + 85, y, 170); y += 15; y += gfx_draw_string_left_wrapped(dpi, nullptr, x, y, 170, STR_SCENARIO_LOCKED_DESC, COLOUR_BLACK) + 5; @@ -462,8 +462,8 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Scenario name - sint32 x = w->x + window_scenarioselect_widgets[WIDX_SCENARIOLIST].right + 4; - sint32 y = w->y + window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5; + int32_t x = w->x + window_scenarioselect_widgets[WIDX_SCENARIOLIST].right + 4; + int32_t y = w->y + window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5; set_format_arg(0, rct_string_id, STR_STRING); set_format_arg(2, const char *, scenario->name); gfx_draw_string_centred_clipped(dpi, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, COLOUR_BLACK, x + 85, y, 170); @@ -476,9 +476,9 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) // Scenario objective set_format_arg(0, rct_string_id, ObjectiveNames[scenario->objective_type]); - set_format_arg(2, sint16, scenario->objective_arg_3); - set_format_arg(4, sint16, date_get_total_months(MONTH_OCTOBER, scenario->objective_arg_1)); - set_format_arg(6, sint32, scenario->objective_arg_2); + set_format_arg(2, int16_t, scenario->objective_arg_3); + set_format_arg(4, int16_t, date_get_total_months(MONTH_OCTOBER, scenario->objective_arg_1)); + set_format_arg(6, int32_t, scenario->objective_arg_2); y += gfx_draw_string_left_wrapped(dpi, gCommonFormatArgs, x, y, 170, STR_OBJECTIVE, COLOUR_BLACK) + 5; // Scenario score @@ -495,11 +495,11 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) } } -static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - sint32 colour; + int32_t colour; - uint8 paletteIndex = ColourMapA[w->colours[1]].mid_light; + uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light; gfx_clear(dpi, paletteIndex); rct_string_id highlighted_format = (theme_get_flags() & UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT) ? STR_WHITE_STRING : STR_WINDOW_COLOUR_2_STRINGID; @@ -508,14 +508,14 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo * bool wide = gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor; rct_widget *listWidget = &w->widgets[WIDX_SCENARIOLIST]; - sint32 listWidth = listWidget->right - listWidget->left - 12; + int32_t listWidth = listWidget->right - listWidget->left - 12; - const sint32 scenarioItemHeight = get_scenario_list_item_size(); + const int32_t scenarioItemHeight = get_scenario_list_item_size(); // Scenario title - sint32 scenarioTitleHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + int32_t scenarioTitleHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); - sint32 y = 0; + int32_t y = 0; for (const auto &listItem : _listItems) { if (y > dpi->y + dpi->height) { @@ -526,7 +526,7 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo * { case LIST_ITEM_TYPE::HEADING: { - const sint32 horizontalRuleMargin = 4; + const int32_t horizontalRuleMargin = 4; draw_category_heading(w, dpi, horizontalRuleMargin, listWidth - horizontalRuleMargin, y + 2, listItem.heading.string_id); y += 18; break; @@ -581,25 +581,25 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo * } } -static void draw_category_heading(rct_window *w, rct_drawpixelinfo *dpi, sint32 left, sint32 right, sint32 y, rct_string_id stringId) +static void draw_category_heading(rct_window *w, rct_drawpixelinfo *dpi, int32_t left, int32_t right, int32_t y, rct_string_id stringId) { - uint8 baseColour = w->colours[1]; - uint8 lightColour = ColourMapA[baseColour].lighter; - uint8 darkColour = ColourMapA[baseColour].mid_dark; + uint8_t baseColour = w->colours[1]; + uint8_t lightColour = ColourMapA[baseColour].lighter; + uint8_t darkColour = ColourMapA[baseColour].mid_dark; // Draw string - sint32 centreX = (left + right) / 2; + int32_t centreX = (left + right) / 2; gfx_draw_string_centred(dpi, stringId, centreX, y, baseColour, nullptr); // Get string dimensions utf8 *buffer = gCommonStringFormatBuffer; format_string(buffer, 256, stringId, nullptr); - sint32 categoryStringHalfWidth = (gfx_get_string_width(buffer) / 2) + 4; - sint32 strLeft = centreX - categoryStringHalfWidth; - sint32 strRight = centreX + categoryStringHalfWidth; + int32_t categoryStringHalfWidth = (gfx_get_string_width(buffer) / 2) + 4; + int32_t strLeft = centreX - categoryStringHalfWidth; + int32_t strRight = centreX + categoryStringHalfWidth; // Draw light horizontal rule - sint32 lineY = y + 4; + int32_t lineY = y + 4; gfx_draw_line(dpi, left, lineY, strLeft, lineY, lightColour); gfx_draw_line(dpi, strRight, lineY, right, lineY, lightColour); @@ -615,12 +615,12 @@ static void initialise_list_items(rct_window *w) _listItems.clear(); // Mega park unlock - const uint32 rct1RequiredCompletedScenarios = (1 << SC_MEGA_PARK) - 1; - uint32 rct1CompletedScenarios = 0; + const uint32_t rct1RequiredCompletedScenarios = (1 << SC_MEGA_PARK) - 1; + uint32_t rct1CompletedScenarios = 0; size_t megaParkListItemIndex = SIZE_MAX; - sint32 numUnlocks = INITIAL_NUM_UNLOCKED_SCENARIOS; - uint8 currentHeading = UINT8_MAX; + int32_t numUnlocks = INITIAL_NUM_UNLOCKED_SCENARIOS; + uint8_t currentHeading = UINT8_MAX; for (size_t i = 0; i < numScenarios; i++) { const scenario_index_entry *scenario = scenario_repository_get_by_index(i); @@ -643,7 +643,7 @@ static void initialise_list_items(rct_window *w) headingStringId = ScenarioOriginStringIds[currentHeading]; } } else if (w->selected_tab == SCENARIO_CATEGORY_OTHER) { - sint32 category = scenario->category; + int32_t category = scenario->category; if (category <= SCENARIO_CATEGORY_REAL) { category = SCENARIO_CATEGORY_OTHER; } @@ -730,7 +730,7 @@ static bool is_scenario_visible(rct_window *w, const scenario_index_entry *scena return false; } } else { - sint32 category = scenario->category; + int32_t category = scenario->category; if (category > SCENARIO_CATEGORY_OTHER) { category = SCENARIO_CATEGORY_OTHER; } diff --git a/src/openrct2-ui/windows/Tooltip.cpp b/src/openrct2-ui/windows/Tooltip.cpp index f2ae779492..154aee4e00 100644 --- a/src/openrct2-ui/windows/Tooltip.cpp +++ b/src/openrct2-ui/windows/Tooltip.cpp @@ -61,9 +61,9 @@ static rct_window_event_list window_tooltip_events = { // clang-format on static utf8 _tooltipText[sizeof(gCommonStringFormatBuffer)]; -static sint16 _tooltipNumLines; +static int16_t _tooltipNumLines; -void window_tooltip_reset(sint32 x, sint32 y) +void window_tooltip_reset(int32_t x, int32_t y) { gTooltipCursorX = x; gTooltipCursorY = y; @@ -73,10 +73,10 @@ void window_tooltip_reset(sint32 x, sint32 y) input_set_flag(INPUT_FLAG_4, false); } -void window_tooltip_show(rct_string_id id, sint32 x, sint32 y) +void window_tooltip_show(rct_string_id id, int32_t x, int32_t y) { rct_window *w; - sint32 width, height; + int32_t width, height; w = window_find_by_class(WC_ERROR); if (w != nullptr) @@ -87,14 +87,14 @@ void window_tooltip_show(rct_string_id id, sint32 x, sint32 y) format_string(buffer, 256, id, gCommonFormatArgs); gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; - sint32 tooltip_text_width; + int32_t tooltip_text_width; tooltip_text_width = gfx_get_string_width_new_lined(buffer); buffer = gCommonStringFormatBuffer; tooltip_text_width = std::min(tooltip_text_width, 196); gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; - sint32 numLines, fontSpriteBase; + int32_t numLines, fontSpriteBase; tooltip_text_width = gfx_wrap_string(buffer, tooltip_text_width + 1, &numLines, &fontSpriteBase); _tooltipNumLines = numLines; @@ -105,14 +105,14 @@ void window_tooltip_show(rct_string_id id, sint32 x, sint32 y) memcpy(_tooltipText, buffer, sizeof(_tooltipText)); - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); x = Math::Clamp(0, x - (width / 2), screenWidth - width); // TODO The cursor size will be relative to the window DPI. // The amount to offset the y should be adjusted. - sint32 max_y = screenHeight - height; + int32_t max_y = screenHeight - height; y += 26; // Normally, we'd display the tooltip 26 lower if (y > max_y) // If y is too large, the tooltip could be forced below the cursor if we'd just clamped y, @@ -138,7 +138,7 @@ void window_tooltip_show(rct_string_id id, sint32 x, sint32 y) * * rct2: 0x006EA10D */ -void window_tooltip_open(rct_window *widgetWindow, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_tooltip_open(rct_window *widgetWindow, rct_widgetindex widgetIndex, int32_t x, int32_t y) { rct_widget *widget; @@ -186,10 +186,10 @@ static void window_tooltip_update(rct_window *w) */ static void window_tooltip_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 left = w->x; - sint32 top = w->y; - sint32 right = w->x + w->width - 1; - sint32 bottom = w->y + w->height - 1; + int32_t left = w->x; + int32_t top = w->y; + int32_t right = w->x + w->width - 1; + int32_t bottom = w->y + w->height - 1; // Background gfx_filter_rect(dpi, left + 1, top + 1, right - 1, bottom - 1, PALETTE_45); diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index fc3ace91b0..70d1570438 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -157,7 +157,7 @@ enum { #pragma region Toolbar_widget_ordering // from left to right -static constexpr const sint32 left_aligned_widgets_order[] = { +static constexpr const int32_t left_aligned_widgets_order[] = { WIDX_PAUSE, WIDX_FASTFORWARD, WIDX_FILE_MENU, @@ -177,7 +177,7 @@ static constexpr const sint32 left_aligned_widgets_order[] = { }; // from right to left -static constexpr const sint32 right_aligned_widgets_order[] = { +static constexpr const int32_t right_aligned_widgets_order[] = { WIDX_NEWS, WIDX_GUESTS, WIDX_STAFF, @@ -231,11 +231,11 @@ static rct_widget window_top_toolbar_widgets[] = { static void window_top_toolbar_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_top_toolbar_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget); -static void window_top_toolbar_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); -static void window_top_toolbar_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_top_toolbar_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_top_toolbar_tool_up(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_top_toolbar_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex); +static void window_top_toolbar_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_top_toolbar_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_top_toolbar_tool_up(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_top_toolbar_tool_abort(rct_window *w, rct_widgetindex widgetIndex); static void window_top_toolbar_invalidate(rct_window *w); static void window_top_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi); @@ -273,27 +273,27 @@ static rct_window_event_list window_top_toolbar_events = { // clang-format on static void top_toolbar_init_view_menu(rct_window *window, rct_widget *widget); -static void top_toolbar_view_menu_dropdown(sint16 dropdownIndex); +static void top_toolbar_view_menu_dropdown(int16_t dropdownIndex); static void top_toolbar_init_fastforward_menu(rct_window *window, rct_widget *widget); -static void top_toolbar_fastforward_menu_dropdown(sint16 dropdownIndex); +static void top_toolbar_fastforward_menu_dropdown(int16_t dropdownIndex); static void top_toolbar_init_rotate_menu(rct_window *window, rct_widget *widget); -static void top_toolbar_rotate_menu_dropdown(sint16 dropdownIndex); +static void top_toolbar_rotate_menu_dropdown(int16_t dropdownIndex); static void top_toolbar_init_debug_menu(rct_window *window, rct_widget *widget); -static void top_toolbar_debug_menu_dropdown(sint16 dropdownIndex); +static void top_toolbar_debug_menu_dropdown(int16_t dropdownIndex); static void top_toolbar_init_network_menu(rct_window *window, rct_widget *widget); -static void top_toolbar_network_menu_dropdown(sint16 dropdownIndex); +static void top_toolbar_network_menu_dropdown(int16_t dropdownIndex); static void toggle_footpath_window(); static void toggle_land_window(rct_window *topToolbar, rct_widgetindex widgetIndex); static void toggle_clear_scenery_window(rct_window *topToolbar, rct_widgetindex widgetIndex); static void toggle_water_window(rct_window *topToolbar, rct_widgetindex widgetIndex); -static money32 selection_lower_land(uint8 flags); -static money32 selection_raise_land(uint8 flags); +static money32 selection_lower_land(uint8_t flags); +static money32 selection_raise_land(uint8_t flags); static bool _menuDropdownIncludesTwitch; -static uint8 _unkF64F0E; -static sint16 _unkF64F0A; +static uint8_t _unkF64F0E; +static int16_t _unkF64F0A; // rct2: 0x00F64F15 static colour_t _secondaryColour; // rct2: 0x00F64F16 @@ -395,7 +395,7 @@ static void window_top_toolbar_mouseup(rct_window *w, rct_widgetindex widgetInde */ static void window_top_toolbar_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { - sint32 numItems; + int32_t numItems; switch (widgetIndex) { case WIDX_FILE_MENU: @@ -542,7 +542,7 @@ static void window_top_toolbar_scenarioselect_callback(const utf8 *path) * * rct2: 0x0066C9EA */ -static void window_top_toolbar_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +static void window_top_toolbar_dropdown(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { switch (widgetIndex) { case WIDX_FILE_MENU: @@ -666,7 +666,7 @@ static void window_top_toolbar_dropdown(rct_window *w, rct_widgetindex widgetInd */ static void window_top_toolbar_invalidate(rct_window *w) { - sint32 x, enabledWidgets, widgetIndex, widgetWidth, firstAlignment; + int32_t x, enabledWidgets, widgetIndex, widgetWidth, firstAlignment; rct_widget *widget; // Enable / disable buttons @@ -786,7 +786,7 @@ static void window_top_toolbar_invalidate(rct_window *w) } // Align right hand side toolbar buttons - sint32 screenWidth = context_get_width(); + int32_t screenWidth = context_get_width(); firstAlignment = 1; x = std::max(640, screenWidth); for (size_t i = 0; i < Util::CountOf(right_aligned_widgets_order); ++i) { @@ -843,7 +843,7 @@ static void window_top_toolbar_invalidate(rct_window *w) */ static void window_top_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y, imgId; + int32_t x, y, imgId; window_draw_widgets(w, dpi); @@ -868,10 +868,10 @@ static void window_top_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_sprite(dpi, imgId, x + 6, y + 3, 0); - for (sint32 i = 0; i < gGameSpeed && gGameSpeed <= 4; i++) { + for (int32_t i = 0; i < gGameSpeed && gGameSpeed <= 4; i++) { gfx_draw_sprite(dpi, SPR_G2_SPEED_ARROW, x + 5 + i * 5, y + 15, 0); } - for (sint32 i = 0; i < 3 && i < gGameSpeed - 4 && gGameSpeed >= 5; i++) { + for (int32_t i = 0; i < 3 && i < gGameSpeed - 4 && gGameSpeed >= 5; i++) { gfx_draw_sprite(dpi, SPR_G2_HYPER_ARROW, x + 5 + i * 6, y + 15, 0); } } @@ -941,10 +941,10 @@ static void window_top_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006E3158 */ -static void repaint_scenery_tool_down(sint16 x, sint16 y, rct_widgetindex widgetIndex){ +static void repaint_scenery_tool_down(int16_t x, int16_t y, rct_widgetindex widgetIndex){ // ax, cx, bl - sint16 grid_x, grid_y; - sint32 type; + int16_t grid_x, grid_y; + int32_t type; // edx rct_tile_element* tile_element; auto flags = @@ -1042,7 +1042,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, rct_widgetindex widget } } -static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex widgetIndex) +static void scenery_eyedropper_tool_down(int16_t x, int16_t y, rct_widgetindex widgetIndex) { auto flags = VIEWPORT_INTERACTION_MASK_SCENERY & @@ -1051,8 +1051,8 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid VIEWPORT_INTERACTION_MASK_BANNER & VIEWPORT_INTERACTION_MASK_FOOTPATH_ITEM; - sint16 gridX, gridY; - sint32 type; + int16_t gridX, gridY; + int32_t type; rct_tile_element* tileElement; rct_viewport * viewport; get_map_coordinates_from_pos(x, y, flags, &gridX, &gridY, &type, &tileElement, &viewport); @@ -1060,11 +1060,11 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid switch (type) { case VIEWPORT_INTERACTION_ITEM_SCENERY: { - sint32 entryIndex = tileElement->properties.scenery.type; + int32_t entryIndex = tileElement->properties.scenery.type; rct_scenery_entry * sceneryEntry = get_small_scenery_entry(entryIndex); if (sceneryEntry != nullptr) { - sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_SMALL_SCENERY, entryIndex); + int32_t sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_SMALL_SCENERY, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryRotation = (get_current_rotation() + tile_element_get_direction(tileElement)) & 3; @@ -1077,11 +1077,11 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid } case VIEWPORT_INTERACTION_ITEM_WALL: { - sint32 entryIndex = tileElement->properties.wall.type; + int32_t entryIndex = tileElement->properties.wall.type; rct_scenery_entry * sceneryEntry = get_wall_entry(entryIndex); if (sceneryEntry != nullptr) { - sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_WALLS, entryIndex); + int32_t sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_WALLS, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryPrimaryColour = wall_get_primary_colour(tileElement); @@ -1094,11 +1094,11 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid } case VIEWPORT_INTERACTION_ITEM_LARGE_SCENERY: { - sint32 entryIndex = scenery_large_get_type(tileElement); + int32_t entryIndex = scenery_large_get_type(tileElement); rct_scenery_entry * sceneryEntry = get_large_scenery_entry(entryIndex); if (sceneryEntry != nullptr) { - sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_LARGE_SCENERY, entryIndex); + int32_t sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_LARGE_SCENERY, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryRotation = (get_current_rotation() + tile_element_get_direction(tileElement)) & 3; @@ -1111,11 +1111,11 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid } case VIEWPORT_INTERACTION_ITEM_BANNER: { - sint32 bannerIndex = tileElement->properties.banner.index; + int32_t bannerIndex = tileElement->properties.banner.index; rct_banner *banner = &gBanners[bannerIndex]; rct_scenery_entry * sceneryEntry = get_banner_entry(banner->type); if (sceneryEntry != nullptr) { - sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_BANNERS, banner->type); + int32_t sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_BANNERS, banner->type); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryEyedropperEnabled = false; } @@ -1124,10 +1124,10 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid } case VIEWPORT_INTERACTION_ITEM_FOOTPATH_ITEM: { - sint32 entryIndex = footpath_element_get_path_scenery_index(tileElement); + int32_t entryIndex = footpath_element_get_path_scenery_index(tileElement); rct_scenery_entry * sceneryEntry = get_footpath_item_entry(entryIndex); if (sceneryEntry != nullptr) { - sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_PATH_BITS, entryIndex); + int32_t sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_PATH_BITS, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryEyedropperEnabled = false; } @@ -1147,7 +1147,7 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, rct_widgetindex wid * edx : parameter_2 * edi : parameter_3 */ -static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid_x, sint16* grid_y, uint32* parameter_1, uint32* parameter_2, uint32* parameter_3){ +static void sub_6E1F34(int16_t x, int16_t y, uint16_t selected_scenery, int16_t* grid_x, int16_t* grid_y, uint32_t* parameter_1, uint32_t* parameter_2, uint32_t* parameter_3){ rct_window* w = window_find_by_class(WC_SCENERY); if (w == nullptr) { @@ -1155,7 +1155,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid return; } - uint8 scenery_type = selected_scenery >> 8; + uint8_t scenery_type = selected_scenery >> 8; bool can_raise_item = false; if (scenery_type == SCENERY_TYPE_SMALL) { @@ -1186,7 +1186,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_WALL & VIEWPORT_INTERACTION_MASK_LARGE_SCENERY; - sint32 interaction_type; + int32_t interaction_type; get_map_coordinates_from_pos(x, y, flags, nullptr, nullptr, &interaction_type, &tile_element, nullptr); if (interaction_type != VIEWPORT_INTERACTION_ITEM_NONE) { @@ -1233,7 +1233,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid rct_scenery_entry* scenery = get_small_scenery_entry(selected_scenery); if (!scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_FULL_TILE)) { - uint8 cl = 0; + uint8_t cl = 0; // If CTRL not pressed if (!gSceneryCtrlPressed) { @@ -1253,16 +1253,16 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid return; } - sint16 z = (tile_element->base_height * 8) & 0xFFF0; + int16_t z = (tile_element->base_height * 8) & 0xFFF0; z += gSceneryShiftPressZOffset; - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } } else { - sint16 z = gSceneryCtrlPressZ; + int16_t z = gSceneryCtrlPressZ; screen_get_map_xy_quadrant_with_z(x, y, z, grid_x, grid_y, &cl); @@ -1271,7 +1271,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid z += gSceneryShiftPressZOffset; } - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } @@ -1279,7 +1279,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid if (*grid_x == LOCATION_NULL) return; - uint8 rotation = gWindowSceneryRotation; + uint8_t rotation = gWindowSceneryRotation; if (!scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_ROTATABLE)) { @@ -1307,7 +1307,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid auto flags = VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_WATER; - sint32 interaction_type = 0; + int32_t interaction_type = 0; rct_tile_element* tile_element; get_map_coordinates_from_pos(x, y, flags, grid_x, grid_y, &interaction_type, &tile_element, nullptr); @@ -1318,7 +1318,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid } gSceneryPlaceZ = 0; - uint16 water_height = surface_get_water_height(tile_element); + uint16_t water_height = surface_get_water_height(tile_element); if (water_height != 0) { gSceneryPlaceZ = water_height * 16; } @@ -1332,16 +1332,16 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid return; } - sint16 z = (tile_element->base_height * 8) & 0xFFF0; + int16_t z = (tile_element->base_height * 8) & 0xFFF0; z += gSceneryShiftPressZOffset; - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } } else { - sint16 z = gSceneryCtrlPressZ; + int16_t z = gSceneryCtrlPressZ; screen_get_map_xy_with_z(x, y, z, grid_x, grid_y); // If SHIFT pressed @@ -1349,7 +1349,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid z += gSceneryShiftPressZOffset; } - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } @@ -1359,7 +1359,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid *grid_x &= 0xFFE0; *grid_y &= 0xFFE0; - uint8 rotation = gWindowSceneryRotation; + uint8_t rotation = gWindowSceneryRotation; if (!scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_ROTATABLE)) { @@ -1381,7 +1381,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid auto flags = VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_FOOTPATH_ITEM; - sint32 interaction_type = 0; + int32_t interaction_type = 0; rct_tile_element* tile_element; get_map_coordinates_from_pos(x, y, flags, grid_x, grid_y, &interaction_type, &tile_element, nullptr); @@ -1403,7 +1403,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid case SCENERY_TYPE_WALL: { // Walls - uint8 cl; + uint8_t cl; // If CTRL not pressed if (!gSceneryCtrlPressed) { screen_get_map_xy_side(x, y, grid_x, grid_y, &cl); @@ -1422,16 +1422,16 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid return; } - sint16 z = (tile_element->base_height * 8) & 0xFFF0; + int16_t z = (tile_element->base_height * 8) & 0xFFF0; z += gSceneryShiftPressZOffset; - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } } else { - sint16 z = gSceneryCtrlPressZ; + int16_t z = gSceneryCtrlPressZ; screen_get_map_xy_side_with_z(x, y, z, grid_x, grid_y, &cl); // If SHIFT pressed @@ -1439,7 +1439,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid z += gSceneryShiftPressZOffset; } - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } @@ -1476,16 +1476,16 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid return; } - sint16 z = (tile_element->base_height * 8) & 0xFFF0; + int16_t z = (tile_element->base_height * 8) & 0xFFF0; z += gSceneryShiftPressZOffset; - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } } else { - sint16 z = gSceneryCtrlPressZ; + int16_t z = gSceneryCtrlPressZ; screen_get_map_xy_with_z(x, y, z, grid_x, grid_y); // If SHIFT pressed @@ -1493,7 +1493,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid z += gSceneryShiftPressZOffset; } - z = std::max(z, 16); + z = std::max(z, 16); gSceneryPlaceZ = z; } @@ -1504,7 +1504,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid *grid_x &= 0xFFE0; *grid_y &= 0xFFE0; - uint8 rotation = gWindowSceneryRotation; + uint8_t rotation = gWindowSceneryRotation; rotation -= get_current_rotation(); rotation &= 0x3; @@ -1519,7 +1519,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid auto flags = VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_FOOTPATH_ITEM; - sint32 interaction_type = 0; + int32_t interaction_type = 0; rct_tile_element* tile_element; get_map_coordinates_from_pos(x, y, flags, grid_x, grid_y, &interaction_type, &tile_element, nullptr); @@ -1529,11 +1529,11 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid return; } - uint8 rotation = gWindowSceneryRotation; + uint8_t rotation = gWindowSceneryRotation; rotation -= get_current_rotation(); rotation &= 0x3; - sint16 z = tile_element->base_height; + int16_t z = tile_element->base_height; if (tile_element->properties.path.type & (1 << 2)) { if (rotation != ((tile_element->properties.path.type & 3) ^ 2)) { @@ -1561,7 +1561,7 @@ static void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid * * rct2: 0x006E2CC6 */ -static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window *w, rct_widgetindex widgetIndex) +static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_window *w, rct_widgetindex widgetIndex) { scenery_remove_ghost_tool_placement(); if (gWindowSceneryPaintEnabled & 1) { @@ -1572,13 +1572,13 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window return; } - sint32 selectedTab = gWindowSceneryTabSelections[gWindowSceneryActiveTabIndex]; - uint8 sceneryType = (selectedTab & 0xFF00) >> 8; + int32_t selectedTab = gWindowSceneryTabSelections[gWindowSceneryActiveTabIndex]; + uint8_t sceneryType = (selectedTab & 0xFF00) >> 8; if (selectedTab == -1) return; - sint16 gridX, gridY; - uint32 parameter_1, parameter_2, parameter_3; + int16_t gridX, gridY; + uint32_t parameter_1, parameter_2, parameter_3; sub_6E1F34(x, y, selectedTab, &gridX, &gridY, ¶meter_1, ¶meter_2, ¶meter_3); @@ -1587,18 +1587,18 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window switch (sceneryType){ case SCENERY_TYPE_SMALL: { - sint32 quantity = 1; + int32_t quantity = 1; bool isCluster = gWindowSceneryClusterEnabled && (network_get_mode() != NETWORK_MODE_CLIENT || network_can_perform_command(network_get_current_player_group_index(), -2)); if (isCluster) { quantity = 35; } - sint32 successfulPlacements = 0; - for (sint32 q = 0; q < quantity; q++) { - sint32 zCoordinate = gSceneryPlaceZ; + int32_t successfulPlacements = 0; + for (int32_t q = 0; q < quantity; q++) { + int32_t zCoordinate = gSceneryPlaceZ; rct_scenery_entry* scenery = get_small_scenery_entry((parameter_1 >> 8) & 0xFF); - sint16 cur_grid_x = gridX; - sint16 cur_grid_y = gridY; + int16_t cur_grid_x = gridX; + int16_t cur_grid_y = gridY; if (isCluster) { @@ -1617,7 +1617,7 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } } - uint8 zAttemptRange = 1; + uint8_t zAttemptRange = 1; if ( gSceneryPlaceZ != 0 && gSceneryShiftPressed @@ -1627,11 +1627,11 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window bool success = false; for (; zAttemptRange != 0; zAttemptRange--){ - sint32 flags = GAME_COMMAND_FLAG_APPLY | (parameter_1 & 0xFF00); + int32_t flags = GAME_COMMAND_FLAG_APPLY | (parameter_1 & 0xFF00); gDisableErrorWindowSound = true; gGameCommandErrorTitle = STR_CANT_POSITION_THIS_HERE; - sint32 cost = game_do_command( + int32_t cost = game_do_command( cur_grid_x, flags, cur_grid_y, @@ -1678,10 +1678,10 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } case SCENERY_TYPE_PATH_ITEM: { - sint32 flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_PATH_SCENERY | (parameter_1 & 0xFF00); + int32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_PATH_SCENERY | (parameter_1 & 0xFF00); gGameCommandErrorTitle = STR_CANT_POSITION_THIS_HERE; - sint32 cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_PATH, parameter_3, 0); + int32_t cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_PATH, parameter_3, 0); if (cost != MONEY32_UNDEFINED) { audio_play_sound_at_location(SOUND_PLACE_ITEM, gCommandPosition.x, gCommandPosition.y, gCommandPosition.z); } @@ -1689,7 +1689,7 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } case SCENERY_TYPE_WALL: { - uint8 zAttemptRange = 1; + uint8_t zAttemptRange = 1; if ( gSceneryPlaceZ != 0 && gSceneryShiftPressed @@ -1698,11 +1698,11 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } for (; zAttemptRange != 0; zAttemptRange--) { - sint32 flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; + int32_t flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; gDisableErrorWindowSound = true; gGameCommandErrorTitle = STR_CANT_BUILD_PARK_ENTRANCE_HERE; - sint32 cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_WALL, gSceneryPlaceZ, _secondaryColour | (_tertiaryColour << 8)); + int32_t cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_WALL, gSceneryPlaceZ, _secondaryColour | (_tertiaryColour << 8)); gDisableErrorWindowSound = false; if (cost != MONEY32_UNDEFINED){ @@ -1726,7 +1726,7 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } case SCENERY_TYPE_LARGE: { - uint8 zAttemptRange = 1; + uint8_t zAttemptRange = 1; if ( gSceneryPlaceZ != 0 && gSceneryShiftPressed @@ -1735,11 +1735,11 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } for (; zAttemptRange != 0; zAttemptRange--) { - sint32 flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; + int32_t flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; gDisableErrorWindowSound = true; gGameCommandErrorTitle = STR_CANT_POSITION_THIS_HERE; - sint32 cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_LARGE_SCENERY, parameter_3, gSceneryPlaceZ); + int32_t cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_LARGE_SCENERY, parameter_3, gSceneryPlaceZ); gDisableErrorWindowSound = false; if (cost != MONEY32_UNDEFINED){ @@ -1763,7 +1763,7 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window } case SCENERY_TYPE_BANNER: { - sint32 flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; + int32_t flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; gGameCommandErrorTitle = STR_CANT_POSITION_THIS_HERE; game_command_callback = game_command_callback_place_banner; @@ -1777,7 +1777,7 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window * * rct2: 0x0068E213 */ -static void top_toolbar_tool_update_scenery_clear(sint16 x, sint16 y){ +static void top_toolbar_tool_update_scenery_clear(int16_t x, int16_t y){ map_invalidate_selection_rect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; @@ -1792,7 +1792,7 @@ static void top_toolbar_tool_update_scenery_clear(sint16 x, sint16 y){ return; } - uint8 state_changed = 0; + uint8_t state_changed = 0; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -1804,8 +1804,8 @@ static void top_toolbar_tool_update_scenery_clear(sint16 x, sint16 y){ state_changed++; } - sint16 tool_size = std::max(1, gLandToolSize); - sint16 tool_length = (tool_size - 1) * 32; + int16_t tool_size = std::max(1, gLandToolSize); + int16_t tool_length = (tool_size - 1) * 32; // Move to tool bottom left mapTile.x -= (tool_size - 1) * 16; @@ -1840,11 +1840,11 @@ static void top_toolbar_tool_update_scenery_clear(sint16 x, sint16 y){ if (!state_changed) return; - sint32 eax = gMapSelectPositionA.x; - sint32 ecx = gMapSelectPositionA.y; - sint32 edi = gMapSelectPositionB.x; - sint32 ebp = gMapSelectPositionB.y; - sint32 clear = (gClearSmallScenery << 0) | (gClearLargeScenery << 1) | (gClearFootpath << 2); + int32_t eax = gMapSelectPositionA.x; + int32_t ecx = gMapSelectPositionA.y; + int32_t edi = gMapSelectPositionB.x; + int32_t ebp = gMapSelectPositionB.y; + int32_t clear = (gClearSmallScenery << 0) | (gClearLargeScenery << 1) | (gClearFootpath << 2); money32 cost = game_do_command(eax, 0, ecx, clear, GAME_COMMAND_CLEAR_SCENERY, edi, ebp); if (gClearSceneryCost != cost) { @@ -1854,7 +1854,7 @@ static void top_toolbar_tool_update_scenery_clear(sint16 x, sint16 y){ } } -static void top_toolbar_tool_update_land_paint(sint16 x, sint16 y) +static void top_toolbar_tool_update_land_paint(int16_t x, int16_t y) { map_invalidate_selection_rect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; @@ -1872,7 +1872,7 @@ static void top_toolbar_tool_update_land_paint(sint16 x, sint16 y) return; } - uint8 state_changed = 0; + uint8_t state_changed = 0; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) { @@ -1886,8 +1886,8 @@ static void top_toolbar_tool_update_land_paint(sint16 x, sint16 y) state_changed++; } - sint16 tool_size = std::max(1, gLandToolSize); - sint16 tool_length = (tool_size - 1) * 32; + int16_t tool_size = std::max(1, gLandToolSize); + int16_t tool_length = (tool_size - 1) * 32; // Move to tool bottom left mapTile.x -= (tool_size - 1) * 16; @@ -1931,7 +1931,7 @@ static void top_toolbar_tool_update_land_paint(sint16 x, sint16 y) * * rct2: 0x00664280 */ -static void top_toolbar_tool_update_land(sint16 x, sint16 y) +static void top_toolbar_tool_update_land(int16_t x, int16_t y) { const bool mapCtrlPressed = input_test_place_object_modifier(PLACE_OBJECT_MODIFIER_COPY_Z); @@ -1954,14 +1954,14 @@ static void top_toolbar_tool_update_land(sint16 x, sint16 y) return; } - sint16 tool_size = gLandToolSize; + int16_t tool_size = gLandToolSize; LocationXY16 mapTile; - uint8 side; + uint8_t side; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; if (tool_size == 1) { - sint32 selectionType; + int32_t selectionType; // Get selection type and map coordinates from mouse x,y position mapTile = { x, y }; screen_pos_to_map_pos(&mapTile.x, &mapTile.y, &selectionType); @@ -1981,7 +1981,7 @@ static void top_toolbar_tool_update_land(sint16 x, sint16 y) return; } - uint8 state_changed = 0; + uint8_t state_changed = 0; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) { @@ -2057,7 +2057,7 @@ static void top_toolbar_tool_update_land(sint16 x, sint16 y) return; } - uint8 state_changed = 0; + uint8_t state_changed = 0; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -2078,7 +2078,7 @@ static void top_toolbar_tool_update_land(sint16 x, sint16 y) if (tool_size == 0) tool_size = 1; - sint16 tool_length = (tool_size - 1) * 32; + int16_t tool_length = (tool_size - 1) * 32; // Decide on shape of the brush for bigger selection size switch (gMapSelectType) @@ -2167,7 +2167,7 @@ static void top_toolbar_tool_update_land(sint16 x, sint16 y) * * rct2: 0x006E6BDC */ -static void top_toolbar_tool_update_water(sint16 x, sint16 y){ +static void top_toolbar_tool_update_water(int16_t x, int16_t y){ map_invalidate_selection_rect(); if (gCurrentToolId == TOOL_UP_DOWN_ARROW){ @@ -2199,7 +2199,7 @@ static void top_toolbar_tool_update_water(sint16 x, sint16 y){ gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; LocationXY16 mapTile = {}; - sint32 interaction_type = 0; + int32_t interaction_type = 0; get_map_coordinates_from_pos( x, y, @@ -2222,7 +2222,7 @@ static void top_toolbar_tool_update_water(sint16 x, sint16 y){ mapTile.x += 16; mapTile.y += 16; - uint8 state_changed = 0; + uint8_t state_changed = 0; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -2234,8 +2234,8 @@ static void top_toolbar_tool_update_water(sint16 x, sint16 y){ state_changed++; } - sint16 tool_size = std::max(1, gLandToolSize); - sint16 tool_length = (tool_size - 1) * 32; + int16_t tool_size = std::max(1, gLandToolSize); + int16_t tool_length = (tool_size - 1) * 32; // Move to tool bottom left mapTile.x -= (tool_size - 1) * 16; @@ -2297,10 +2297,10 @@ static void top_toolbar_tool_update_water(sint16 x, sint16 y){ * On failure returns MONEY32_UNDEFINED * On success places ghost scenery and returns cost to place proper */ -static money32 try_place_ghost_scenery(LocationXY16 map_tile, uint32 parameter_1, uint32 parameter_2, uint32 parameter_3, uint16 selected_tab){ +static money32 try_place_ghost_scenery(LocationXY16 map_tile, uint32_t parameter_1, uint32_t parameter_2, uint32_t parameter_3, uint16_t selected_tab){ scenery_remove_ghost_tool_placement(); - uint8 scenery_type = (selected_tab & 0xFF00) >> 8; + uint8_t scenery_type = (selected_tab & 0xFF00) >> 8; money32 cost = 0; rct_tile_element* tileElement; @@ -2322,7 +2322,7 @@ static money32 try_place_ghost_scenery(LocationXY16 map_tile, uint32 parameter_1 gSceneryGhostPosition.x = map_tile.x; gSceneryGhostPosition.y = map_tile.y; - gSceneryPlaceRotation = (uint16)(parameter_3 & 0xFF); + gSceneryPlaceRotation = (uint16_t)(parameter_3 & 0xFF); gSceneryPlaceObject = selected_tab; tileElement = gSceneryTileElement; @@ -2456,7 +2456,7 @@ static money32 try_place_ghost_scenery(LocationXY16 map_tile, uint32 parameter_1 * * rct2: 0x006E287B */ -static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ +static void top_toolbar_tool_update_scenery(int16_t x, int16_t y){ map_invalidate_selection_rect(); map_invalidate_map_selection_tiles(); @@ -2473,17 +2473,17 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ if (gWindowSceneryEyedropperEnabled) return; - sint16 selected_tab = gWindowSceneryTabSelections[gWindowSceneryActiveTabIndex]; + int16_t selected_tab = gWindowSceneryTabSelections[gWindowSceneryActiveTabIndex]; if (selected_tab == -1){ scenery_remove_ghost_tool_placement(); return; } - uint8 scenery_type = (selected_tab & 0xFF00) >> 8; - uint8 selected_scenery = selected_tab & 0xFF; + uint8_t scenery_type = (selected_tab & 0xFF00) >> 8; + uint8_t selected_scenery = selected_tab & 0xFF; LocationXY16 mapTile = {}; - uint32 parameter1, parameter2, parameter3; + uint32_t parameter1, parameter2, parameter3; sub_6E1F34(x, y, selected_tab, &mapTile.x, &mapTile.y, ¶meter1, ¶meter2, ¶meter3); @@ -2493,7 +2493,7 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ } rct_scenery_entry* scenery; - uint8 bl; + uint8_t bl; money32 cost = 0; switch (scenery_type){ @@ -2573,7 +2573,7 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ if ((gSceneryGhostType & SCENERY_GHOST_FLAG_1) && mapTile.x == gSceneryGhostPosition.x && mapTile.y == gSceneryGhostPosition.y && - (sint16)(parameter2 & 0xFF) == gSceneryGhostPosition.z){ + (int16_t)(parameter2 & 0xFF) == gSceneryGhostPosition.z){ return; } @@ -2641,7 +2641,7 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ scenery = get_large_scenery_entry(selected_scenery); LocationXY16* selectedTile = gMapSelectionTiles; - for (rct_large_scenery_tile* tile = scenery->large_scenery.tiles; tile->x_offset != (sint16)(uint16)0xFFFF; tile++){ + for (rct_large_scenery_tile* tile = scenery->large_scenery.tiles; tile->x_offset != (int16_t)(uint16_t)0xFFFF; tile++){ LocationXY16 tileLocation = { tile->x_offset, tile->y_offset }; rotate_map_coordinates(&tileLocation.x, &tileLocation.y, (parameter1 >> 8) & 0xFF); @@ -2663,7 +2663,7 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ mapTile.x == gSceneryGhostPosition.x && mapTile.y == gSceneryGhostPosition.y && gSceneryPlaceZ == _unkF64F0A && - (sint16)(parameter3 & 0xFFFF) == gSceneryPlaceObject + (int16_t)(parameter3 & 0xFFFF) == gSceneryPlaceObject ) { return; } @@ -2709,7 +2709,7 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ if ((gSceneryGhostType & SCENERY_GHOST_FLAG_4) && mapTile.x == gSceneryGhostPosition.x && mapTile.y == gSceneryGhostPosition.y && - (sint16)(parameter2 & 0xFF) == gSceneryGhostPosition.z && + (int16_t)(parameter2 & 0xFF) == gSceneryGhostPosition.z && ((parameter2 >> 8) & 0xFF) == gSceneryPlaceRotation ) { return; @@ -2733,7 +2733,7 @@ static void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ * * rct2: 0x0066CB25 */ -static void window_top_toolbar_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_top_toolbar_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_CLEAR_SCENERY: @@ -2758,7 +2758,7 @@ static void window_top_toolbar_tool_update(rct_window* w, rct_widgetindex widget * * rct2: 0x0066CB73 */ -static void window_top_toolbar_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_top_toolbar_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex){ case WIDX_CLEAR_SCENERY: @@ -2808,15 +2808,15 @@ static void window_top_toolbar_tool_down(rct_window* w, rct_widgetindex widgetIn * * rct2: 0x006644DD */ -static money32 selection_raise_land(uint8 flags) +static money32 selection_raise_land(uint8_t flags) { - sint32 centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; - sint32 centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; + int32_t centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; + int32_t centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; centreX += 16; centreY += 16; - uint32 xBounds = (gMapSelectPositionA.x & 0xFFFF) | (gMapSelectPositionB.x << 16); - uint32 yBounds = (gMapSelectPositionA.y & 0xFFFF) | (gMapSelectPositionB.y << 16); + uint32_t xBounds = (gMapSelectPositionA.x & 0xFFFF) | (gMapSelectPositionB.x << 16); + uint32_t yBounds = (gMapSelectPositionA.y & 0xFFFF) | (gMapSelectPositionB.y << 16); gGameCommandErrorTitle = STR_CANT_RAISE_LAND_HERE; if (gLandMountainMode) { @@ -2830,15 +2830,15 @@ static money32 selection_raise_land(uint8 flags) * * rct2: 0x006645B3 */ -static money32 selection_lower_land(uint8 flags) +static money32 selection_lower_land(uint8_t flags) { - sint32 centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; - sint32 centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; + int32_t centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; + int32_t centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; centreX += 16; centreY += 16; - uint32 xBounds = (gMapSelectPositionA.x & 0xFFFF) | (gMapSelectPositionB.x << 16); - uint32 yBounds = (gMapSelectPositionA.y & 0xFFFF) | (gMapSelectPositionB.y << 16); + uint32_t xBounds = (gMapSelectPositionA.x & 0xFFFF) | (gMapSelectPositionB.x << 16); + uint32_t yBounds = (gMapSelectPositionA.y & 0xFFFF) | (gMapSelectPositionB.y << 16); gGameCommandErrorTitle = STR_CANT_LOWER_LAND_HERE; if (gLandMountainMode) { @@ -2852,7 +2852,7 @@ static money32 selection_lower_land(uint8 flags) * part of window_top_toolbar_tool_drag(0x0066CB4E) * rct2: 0x00664454 */ -static void window_top_toolbar_land_tool_drag(sint16 x, sint16 y) +static void window_top_toolbar_land_tool_drag(int16_t x, int16_t y) { rct_window *window = window_find_from_point(x, y); if (!window) @@ -2867,9 +2867,9 @@ static void window_top_toolbar_land_tool_drag(sint16 x, sint16 y) if (!viewport) return; - sint16 tile_height = -16 / (1 << viewport->zoom); + int16_t tile_height = -16 / (1 << viewport->zoom); - sint32 y_diff = y - gInputDragLastY; + int32_t y_diff = y - gInputDragLastY; if (y_diff <= tile_height) { gInputDragLastY += tile_height; @@ -2892,7 +2892,7 @@ static void window_top_toolbar_land_tool_drag(sint16 x, sint16 y) * part of window_top_toolbar_tool_drag(0x0066CB4E) * rct2: 0x006E6D4B */ -static void window_top_toolbar_water_tool_drag(sint16 x, sint16 y) +static void window_top_toolbar_water_tool_drag(int16_t x, int16_t y) { rct_window *window = window_find_from_point(x, y); if (!window) @@ -2907,7 +2907,7 @@ static void window_top_toolbar_water_tool_drag(sint16 x, sint16 y) if (!viewport) return; - sint16 dx = -16; + int16_t dx = -16; dx >>= viewport->zoom; y -= gInputDragLastY; @@ -2959,7 +2959,7 @@ static void window_top_toolbar_water_tool_drag(sint16 x, sint16 y) * * rct2: 0x0066CB4E */ -static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex){ case WIDX_CLEAR_SCENERY: @@ -3019,7 +3019,7 @@ static void window_top_toolbar_tool_drag(rct_window* w, rct_widgetindex widgetIn * * rct2: 0x0066CC5B */ -static void window_top_toolbar_tool_up(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_top_toolbar_tool_up(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { switch (widgetIndex) { case WIDX_LAND: @@ -3056,7 +3056,7 @@ static void window_top_toolbar_tool_abort(rct_window *w, rct_widgetindex widgetI } static void top_toolbar_init_fastforward_menu(rct_window* w, rct_widget* widget) { - sint32 num_items = 4; + int32_t num_items = 4; gDropdownItemsFormat[0] = STR_TOGGLE_OPTION; gDropdownItemsFormat[1] = STR_TOGGLE_OPTION; gDropdownItemsFormat[2] = STR_TOGGLE_OPTION; @@ -3101,7 +3101,7 @@ static void top_toolbar_init_fastforward_menu(rct_window* w, rct_widget* widget) } } -static void top_toolbar_fastforward_menu_dropdown(sint16 dropdownIndex) +static void top_toolbar_fastforward_menu_dropdown(int16_t dropdownIndex) { rct_window* w = window_get_main(); if (w) { @@ -3131,7 +3131,7 @@ static void top_toolbar_init_rotate_menu(rct_window* w, rct_widget* widget) gDropdownDefaultIndex = DDIDX_ROTATE_CLOCKWISE; } -static void top_toolbar_rotate_menu_dropdown(sint16 dropdownIndex) +static void top_toolbar_rotate_menu_dropdown(int16_t dropdownIndex) { rct_window* w = window_get_main(); if (w) { @@ -3196,7 +3196,7 @@ static void top_toolbar_init_network_menu(rct_window* w, rct_widget* widget) gDropdownDefaultIndex = DDIDX_MULTIPLAYER; } -static void top_toolbar_debug_menu_dropdown(sint16 dropdownIndex) +static void top_toolbar_debug_menu_dropdown(int16_t dropdownIndex) { rct_window* w = window_get_main(); if (w) { @@ -3231,7 +3231,7 @@ static void top_toolbar_debug_menu_dropdown(sint16 dropdownIndex) } } -static void top_toolbar_network_menu_dropdown(sint16 dropdownIndex) +static void top_toolbar_network_menu_dropdown(int16_t dropdownIndex) { rct_window* w = window_get_main(); if (w) { @@ -3324,7 +3324,7 @@ static void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) { * * rct2: 0x0066CF8A */ -static void top_toolbar_view_menu_dropdown(sint16 dropdownIndex) +static void top_toolbar_view_menu_dropdown(int16_t dropdownIndex) { rct_window* w = window_get_main(); if (w) { diff --git a/src/openrct2-ui/windows/TrackDesignManage.cpp b/src/openrct2-ui/windows/TrackDesignManage.cpp index 128c9646c3..a787f80c2f 100644 --- a/src/openrct2-ui/windows/TrackDesignManage.cpp +++ b/src/openrct2-ui/windows/TrackDesignManage.cpp @@ -250,8 +250,8 @@ static void window_track_delete_prompt_open() { window_close_by_class(WC_TRACK_DELETE_PROMPT); - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); rct_window *w = window_create( std::max(TOP_TOOLBAR_HEIGHT + 1, (screenWidth - 250) / 2), (screenHeight - 44) / 2, diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 2ab3cde263..f8b0b86714 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -65,8 +65,8 @@ static rct_widget window_track_place_widgets[] = { static void window_track_place_close(rct_window *w); static void window_track_place_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_track_place_update(rct_window *w); -static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_track_place_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_track_place_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); static void window_track_place_toolabort(rct_window *w, rct_widgetindex widgetIndex); static void window_track_place_unknown14(rct_window *w); static void window_track_place_invalidate(rct_window *w); @@ -104,30 +104,30 @@ static rct_window_event_list window_track_place_events = { }; // clang-format on -static std::vector _window_track_place_mini_preview; -static sint16 _window_track_place_last_x; -static sint16 _window_track_place_last_y; +static std::vector _window_track_place_mini_preview; +static int16_t _window_track_place_last_x; +static int16_t _window_track_place_last_y; -static uint8 _window_track_place_ride_index; +static uint8_t _window_track_place_ride_index; static bool _window_track_place_last_was_valid; -static sint16 _window_track_place_last_valid_x; -static sint16 _window_track_place_last_valid_y; -static sint16 _window_track_place_last_valid_z; +static int16_t _window_track_place_last_valid_x; +static int16_t _window_track_place_last_valid_y; +static int16_t _window_track_place_last_valid_z; static money32 _window_track_place_last_cost; static rct_track_td6 *_trackDesign; static void window_track_place_clear_provisional(); -static sint32 window_track_place_get_base_z(sint32 x, sint32 y); -static void window_track_place_attempt_placement(rct_track_td6 *td6, sint32 x, sint32 y, sint32 z, sint32 bl, money32 *cost, uint8 *rideIndex); +static int32_t window_track_place_get_base_z(int32_t x, int32_t y); +static void window_track_place_attempt_placement(rct_track_td6 *td6, int32_t x, int32_t y, int32_t z, int32_t bl, money32 *cost, uint8_t *rideIndex); static void window_track_place_clear_mini_preview(); static void window_track_place_draw_mini_preview(rct_track_td6 *td6); -static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, sint32 pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max); -static void window_track_place_draw_mini_preview_maze(rct_track_td6 *td6, sint32 pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max); -static LocationXY16 draw_mini_preview_get_pixel_position(sint16 x, sint16 y); +static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, int32_t pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max); +static void window_track_place_draw_mini_preview_maze(rct_track_td6 *td6, int32_t pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max); +static LocationXY16 draw_mini_preview_get_pixel_position(int16_t x, int16_t y); static bool draw_mini_preview_is_pixel_in_bounds(LocationXY16 pixel); -static uint8 *draw_mini_preview_get_pixel_ptr(LocationXY16 pixel); +static uint8_t *draw_mini_preview_get_pixel_ptr(LocationXY16 pixel); /** * @@ -252,9 +252,9 @@ static void window_track_place_update(rct_window *w) * * rct2: 0x006CFF2D */ -static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { - sint16 mapX, mapY, mapZ; + int16_t mapX, mapY, mapZ; map_invalidate_map_selection_tiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; @@ -282,8 +282,8 @@ static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetI window_track_place_clear_provisional(); // Try increasing Z until a feasible placement is found - for (sint32 i = 0; i < 7; i++) { - uint8 rideIndex; + for (int32_t i = 0; i < 7; i++) { + uint8_t rideIndex; window_track_place_attempt_placement(_trackDesign, mapX, mapY, mapZ, 105, &cost, &rideIndex); if (cost != MONEY32_UNDEFINED) { _window_track_place_ride_index = rideIndex; @@ -311,12 +311,12 @@ static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetI * * rct2: 0x006CFF34 */ -static void window_track_place_tooldown(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_track_place_tooldown(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { - sint32 i; - sint16 mapX, mapY, mapZ; + int32_t i; + int16_t mapX, mapY, mapZ; money32 cost; - uint8 rideIndex; + uint8_t rideIndex; window_track_place_clear_provisional(); map_invalidate_map_selection_tiles(); @@ -411,10 +411,10 @@ static void window_track_place_clear_provisional() * * rct2: 0x006D17C6 */ -static sint32 window_track_place_get_base_z(sint32 x, sint32 y) +static int32_t window_track_place_get_base_z(int32_t x, int32_t y) { rct_tile_element *tileElement; - sint32 z; + int32_t z; tileElement = map_get_surface_element_at(x >> 5, y >> 5); z = tileElement->base_height * 8; @@ -435,9 +435,9 @@ static sint32 window_track_place_get_base_z(sint32 x, sint32 y) return z + place_virtual_track(_trackDesign, PTD_OPERATION_GET_PLACE_Z, true, 0, x, y, z); } -static void window_track_place_attempt_placement(rct_track_td6 *td6, sint32 x, sint32 y, sint32 z, sint32 bl, money32 *cost, uint8 *rideIndex) +static void window_track_place_attempt_placement(rct_track_td6 *td6, int32_t x, int32_t y, int32_t z, int32_t bl, money32 *cost, uint8_t *rideIndex) { - sint32 eax, ebx, ecx, edx, esi, edi, ebp; + int32_t eax, ebx, ecx, edx, esi, edi, ebp; money32 result; edx = esi = ebp = 0; @@ -491,7 +491,7 @@ static void window_track_place_draw_mini_preview(rct_track_td6 *td6) // First pass is used to determine the width and height of the image so it can centre it LocationXY16 min = { 0, 0 }; LocationXY16 max = { 0, 0 }; - for (sint32 pass = 0; pass < 2; pass++) { + for (int32_t pass = 0; pass < 2; pass++) { LocationXY16 origin = { 0, 0 }; if (pass == 1) { origin.x -= ((max.x + min.x) >> 6) * 32; @@ -506,15 +506,15 @@ static void window_track_place_draw_mini_preview(rct_track_td6 *td6) } } -static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, sint32 pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max) +static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, int32_t pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max) { - uint8 rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; + uint8_t rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; rct_td6_track_element *trackElement = td6->track_elements; const rct_preview_track * * trackBlockArray = (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) ? TrackBlocks : FlatRideTrackBlocks; while (trackElement->type != 255) { - sint32 trackType = trackElement->type; + int32_t trackType = trackElement->type; if (trackType == TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP) { trackType = 255; } @@ -522,8 +522,8 @@ static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, sint3 // Follow a single track piece shape const rct_preview_track *trackBlock = trackBlockArray[trackType]; while (trackBlock->index != 255) { - sint16 x = origin.x; - sint16 y = origin.y; + int16_t x = origin.x; + int16_t y = origin.y; map_offset_with_rotation(&x, &y, trackBlock->x, trackBlock->y, rotation); if (pass == 0) { @@ -534,15 +534,15 @@ static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, sint3 } else { LocationXY16 pixelPosition = draw_mini_preview_get_pixel_position(x, y); if (draw_mini_preview_is_pixel_in_bounds(pixelPosition)) { - uint8 *pixel = draw_mini_preview_get_pixel_ptr(pixelPosition); + uint8_t *pixel = draw_mini_preview_get_pixel_ptr(pixelPosition); - uint8 bits = trackBlock->var_08 << (rotation & 3); + uint8_t bits = trackBlock->var_08 << (rotation & 3); bits = (bits & 0x0F) | ((bits & 0xF0) >> 4); // Station track is a lighter colour - uint8 colour = (TrackSequenceProperties[trackType][0] & TRACK_SEQUENCE_FLAG_ORIGIN) ? PALETTE_INDEX_PRIMARY_LIGHTEST : PALETTE_INDEX_PRIMARY_MID_DARK; + uint8_t colour = (TrackSequenceProperties[trackType][0] & TRACK_SEQUENCE_FLAG_ORIGIN) ? PALETTE_INDEX_PRIMARY_LIGHTEST : PALETTE_INDEX_PRIMARY_MID_DARK; - for (sint32 i = 0; i < 4; i++) { + for (int32_t i = 0; i < 4; i++) { if (bits & 1) pixel[338 + i] = colour; // x + 2, y + 2 if (bits & 2) pixel[168 + i] = colour; // y + 1 if (bits & 4) pixel[ 2 + i] = colour; // x + 2 @@ -572,13 +572,13 @@ static void window_track_place_draw_mini_preview_track(rct_track_td6 *td6, sint3 } } -static void window_track_place_draw_mini_preview_maze(rct_track_td6 *td6, sint32 pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max) +static void window_track_place_draw_mini_preview_maze(rct_track_td6 *td6, int32_t pass, LocationXY16 origin, LocationXY16 *min, LocationXY16 *max) { - uint8 rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; + uint8_t rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; rct_td6_maze_element *mazeElement = td6->maze_elements; while (mazeElement->all != 0) { - sint16 x = mazeElement->x * 32; - sint16 y = mazeElement->y * 32; + int16_t x = mazeElement->x * 32; + int16_t y = mazeElement->y * 32; rotate_map_coordinates(&x, &y, rotation); x += origin.x; @@ -592,12 +592,12 @@ static void window_track_place_draw_mini_preview_maze(rct_track_td6 *td6, sint32 } else { LocationXY16 pixelPosition = draw_mini_preview_get_pixel_position(x, y); if (draw_mini_preview_is_pixel_in_bounds(pixelPosition)) { - uint8 *pixel = draw_mini_preview_get_pixel_ptr(pixelPosition); + uint8_t *pixel = draw_mini_preview_get_pixel_ptr(pixelPosition); // Entrance or exit is a lighter colour - uint8 colour = mazeElement->type == 8 || mazeElement->type == 128 ? PALETTE_INDEX_PRIMARY_LIGHTEST : PALETTE_INDEX_PRIMARY_MID_DARK; + uint8_t colour = mazeElement->type == 8 || mazeElement->type == 128 ? PALETTE_INDEX_PRIMARY_LIGHTEST : PALETTE_INDEX_PRIMARY_MID_DARK; - for (sint32 i = 0; i < 4; i++) { + for (int32_t i = 0; i < 4; i++) { pixel[338 + i] = colour; // x + 2, y + 2 pixel[168 + i] = colour; // y + 1 pixel[ 2 + i] = colour; // x + 2 @@ -609,11 +609,11 @@ static void window_track_place_draw_mini_preview_maze(rct_track_td6 *td6, sint32 } } -static LocationXY16 draw_mini_preview_get_pixel_position(sint16 x, sint16 y) +static LocationXY16 draw_mini_preview_get_pixel_position(int16_t x, int16_t y) { return { - (sint16)(80 + ((y / 32) - (x / 32)) * 4), - (sint16)(38 + ((y / 32) + (x / 32)) * 2) + (int16_t)(80 + ((y / 32) - (x / 32)) * 4), + (int16_t)(38 + ((y / 32) + (x / 32)) * 2) }; } @@ -622,7 +622,7 @@ static bool draw_mini_preview_is_pixel_in_bounds(LocationXY16 pixel) return pixel.x >= 0 && pixel.y >= 0 && pixel.x <= 160 && pixel.y <= 75; } -static uint8 *draw_mini_preview_get_pixel_ptr(LocationXY16 pixel) +static uint8_t *draw_mini_preview_get_pixel_ptr(LocationXY16 pixel) { return &_window_track_place_mini_preview[pixel.y * TRACK_MINI_PREVIEW_WIDTH + pixel.x]; } diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index b1e9a27f6b..c87558fb33 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -57,14 +57,14 @@ static rct_widget window_track_list_widgets[] = { static void window_track_list_close(rct_window *w); static void window_track_list_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_track_list_update(rct_window *w); -static void window_track_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -static void window_track_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); -static void window_track_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y); +static void window_track_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void window_track_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); +static void window_track_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y); static void window_track_list_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text); static void window_track_list_tooltip(rct_window* w, rct_widgetindex widgetIndex, rct_string_id *stringId); static void window_track_list_invalidate(rct_window *w); static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi); -static void window_track_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +static void window_track_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); static rct_window_event_list window_track_list_events = { window_track_list_close, @@ -104,10 +104,10 @@ ride_list_item _window_track_list_item; static std::vector _trackDesigns; static utf8 _filterString[USER_STRING_MAX_LENGTH]; -static std::vector _filteredTrackIds; -static uint16 _loadedTrackDesignIndex; +static std::vector _filteredTrackIds; +static uint16_t _loadedTrackDesignIndex; static rct_track_td6 * _loadedTrackDesign; -static std::vector _trackDesignPreviewPixels; +static std::vector _trackDesignPreviewPixels; static void track_list_load_designs(ride_list_item item); static bool track_list_load_design_for_preview(utf8 *path); @@ -124,11 +124,11 @@ rct_window * window_track_list_open(ride_list_item item) String::Set(_filterString, sizeof(_filterString), ""); track_list_load_designs(item); - sint32 x, y; + int32_t x, y; if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - sint32 screenWidth = context_get_width(); - sint32 screenHeight = context_get_height(); + int32_t screenWidth = context_get_width(); + int32_t screenHeight = context_get_height(); x = screenWidth / 2 - 300; y = std::max(TOP_TOOLBAR_HEIGHT + 1, screenHeight / 2 - 200); } @@ -187,7 +187,7 @@ static void window_track_list_filter_list() // Nothing to filter, so fill the list with all indices if (String::LengthOf(_filterString) == 0) { - for (uint16 i = 0; i < _trackDesigns.size(); i++) + for (uint16_t i = 0; i < _trackDesigns.size(); i++) _filteredTrackIds.push_back(i); return; @@ -196,15 +196,15 @@ static void window_track_list_filter_list() // Convert filter to lowercase utf8 filterStringLower[sizeof(_filterString)]; String::Set(filterStringLower, sizeof(filterStringLower), _filterString); - for (sint32 i = 0; filterStringLower[i] != '\0'; i++) + for (int32_t i = 0; filterStringLower[i] != '\0'; i++) filterStringLower[i] = (utf8)tolower(filterStringLower[i]); // Fill the set with indices for tracks that match the filter - for (uint16 i = 0; i < _trackDesigns.size(); i++) + for (uint16_t i = 0; i < _trackDesigns.size(); i++) { utf8 trackNameLower[USER_STRING_MAX_LENGTH]; String::Set(trackNameLower, sizeof(trackNameLower), _trackDesigns[i].name); - for (sint32 j = 0; trackNameLower[j] != '\0'; j++) + for (int32_t j = 0; trackNameLower[j] != '\0'; j++) trackNameLower[j] = (utf8)tolower(trackNameLower[j]); if (strstr(trackNameLower, filterStringLower) != nullptr) @@ -250,7 +250,7 @@ static void window_track_list_close(rct_window *w) * * rct2: 0x006CFB82 */ -static void window_track_list_select(rct_window *w, sint32 listIndex) +static void window_track_list_select(rct_window *w, int32_t listIndex) { // Displays a message if the ride can't load, fix #4080 if (_loadedTrackDesign == nullptr) { @@ -273,7 +273,7 @@ static void window_track_list_select(rct_window *w, sint32 listIndex) gTrackDesignSceneryToggle = true; } - uint16 trackDesignIndex = _filteredTrackIds[listIndex]; + uint16_t trackDesignIndex = _filteredTrackIds[listIndex]; track_design_file_ref *tdRef = &_trackDesigns[trackDesignIndex]; if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { auto intent = Intent(WC_MANAGE_TRACK_DESIGN); @@ -290,7 +290,7 @@ static void window_track_list_select(rct_window *w, sint32 listIndex) } } -static sint32 window_track_list_get_list_item_index_from_position(sint32 x, sint32 y) +static int32_t window_track_list_get_list_item_index_from_position(int32_t x, int32_t y) { size_t maxItems = _filteredTrackIds.size(); if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { @@ -298,8 +298,8 @@ static sint32 window_track_list_get_list_item_index_from_position(sint32 x, sint maxItems++; } - sint32 index = y / SCROLLABLE_ROW_HEIGHT; - if (index < 0 || (uint32)index >= maxItems) { + int32_t index = y / SCROLLABLE_ROW_HEIGHT; + if (index < 0 || (uint32_t)index >= maxItems) { index = -1; } return index; @@ -357,7 +357,7 @@ static void window_track_list_mouseup(rct_window *w, rct_widgetindex widgetIndex * * rct2: 0x006CFAB0 */ -static void window_track_list_scrollgetsize(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +static void window_track_list_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { size_t numItems = _filteredTrackIds.size(); if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { @@ -365,17 +365,17 @@ static void window_track_list_scrollgetsize(rct_window *w, sint32 scrollIndex, s numItems++; } - *height = (sint32)(numItems * SCROLLABLE_ROW_HEIGHT); + *height = (int32_t)(numItems * SCROLLABLE_ROW_HEIGHT); } /** * * rct2: 0x006CFB39 */ -static void window_track_list_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_track_list_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { if (!w->track_list.track_list_being_updated) { - sint32 i = window_track_list_get_list_item_index_from_position(x, y); + int32_t i = window_track_list_get_list_item_index_from_position(x, y); if (i != -1) { window_track_list_select(w, i); } @@ -386,11 +386,11 @@ static void window_track_list_scrollmousedown(rct_window *w, sint32 scrollIndex, * * rct2: 0x006CFAD7 */ -static void window_track_list_scrollmouseover(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +static void window_track_list_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { if (!w->track_list.track_list_being_updated) { - sint32 i = window_track_list_get_list_item_index_from_position(x, y); + int32_t i = window_track_list_get_list_item_index_from_position(x, y); if (i != -1 && w->selected_list_item != i) { w->selected_list_item = i; @@ -492,7 +492,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) { window_draw_widgets(w, dpi); - sint32 listItemIndex = w->selected_list_item; + int32_t listItemIndex = w->selected_list_item; if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { if (_trackDesigns.size() == 0 || listItemIndex == -1) @@ -506,10 +506,10 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) listItemIndex--; } - sint32 trackIndex = _filteredTrackIds[listItemIndex]; + int32_t trackIndex = _filteredTrackIds[listItemIndex]; // Track preview - sint32 x, y, colour; + int32_t x, y, colour; rct_widget *widget = &window_track_list_widgets[WIDX_TRACK_PREVIEW]; x = w->x + widget->left + 1; y = w->y + widget->top + 1; @@ -530,7 +530,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) return; } - sint32 trackPreviewX = x, trackPreviewY = y; + int32_t trackPreviewX = x, trackPreviewY = y; x = w->x + (widget->left + widget->right) / 2; y = w->y + (widget->top + widget->bottom) / 2; @@ -594,14 +594,14 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->type == RIDE_TYPE_MINI_GOLF) { // Holes - uint16 holes = td6->holes & 0x1F; + uint16_t holes = td6->holes & 0x1F; gfx_draw_string_left(dpi, STR_HOLES, &holes, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } else { // Maximum speed - uint16 speed = ((td6->max_speed << 16) * 9) >> 18; + uint16_t speed = ((td6->max_speed << 16) * 9) >> 18; gfx_draw_string_left(dpi, STR_MAX_SPEED, &speed, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; @@ -613,7 +613,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) // Ride length set_format_arg(0, rct_string_id, STR_RIDE_LENGTH_ENTRY); - set_format_arg(2, uint16, td6->ride_length); + set_format_arg(2, uint16_t, td6->ride_length); gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, gCommonFormatArgs, COLOUR_BLACK, x, y, 214); y += LIST_ROW_HEIGHT; } @@ -621,7 +621,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_G_FORCES)) { // Maximum positive vertical Gs - sint32 gForces = td6->max_positive_vertical_g * 32; + int32_t gForces = td6->max_positive_vertical_g * 32; gfx_draw_string_left(dpi, STR_MAX_POSITIVE_VERTICAL_G, &gForces, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; @@ -641,7 +641,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->total_air_time != 0) { // Total air time - sint32 airTime = td6->total_air_time * 25; + int32_t airTime = td6->total_air_time * 25; gfx_draw_string_left(dpi, STR_TOTAL_AIR_TIME, &airTime, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } @@ -651,19 +651,19 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_DROPS)) { // Drops - uint16 drops = td6->drops & 0x3F; + uint16_t drops = td6->drops & 0x3F; gfx_draw_string_left(dpi, STR_DROPS, &drops, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; // Drop height is multiplied by 0.75 - uint16 highestDropHeight = (td6->highest_drop_height * 3) / 4; + uint16_t highestDropHeight = (td6->highest_drop_height * 3) / 4; gfx_draw_string_left(dpi, STR_HIGHEST_DROP_HEIGHT, &highestDropHeight, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } if (td6->type != RIDE_TYPE_MINI_GOLF) { - uint16 inversions = td6->inversions & 0x1F; + uint16_t inversions = td6->inversions & 0x1F; if (inversions != 0) { // Inversions @@ -677,8 +677,8 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (td6->space_required_x != 0xFF) { // Space required - set_format_arg(0, uint16, td6->space_required_x); - set_format_arg(2, uint16, td6->space_required_y); + set_format_arg(0, uint16_t, td6->space_required_x); + set_format_arg(2, uint16_t, td6->space_required_y); gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } @@ -693,13 +693,13 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) * * rct2: 0x006CF8CD */ -static void window_track_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +static void window_track_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { - uint8 paletteIndex = ColourMapA[w->colours[0]].mid_light; + uint8_t paletteIndex = ColourMapA[w->colours[0]].mid_light; gfx_clear(dpi, paletteIndex); - sint32 x = 0; - sint32 y = 0; + int32_t x = 0; + int32_t y = 0; size_t listIndex = 0; if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { if (_trackDesigns.size() == 0) { diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index 22cecc3ef0..49421baf1b 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -79,10 +79,10 @@ static void window_view_clipping_close_button(rct_window* w); static void window_view_clipping_mouseup(rct_window* w, rct_widgetindex widgetIndex); static void window_view_clipping_mousedown(rct_window*w, rct_widgetindex widgetIndex, rct_widget *widget); static void window_view_clipping_update(rct_window* w); -static void window_view_clipping_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_view_clipping_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_view_clipping_tool_drag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -static void window_view_clipping_tool_up(rct_window* w, rct_widgetindex, sint32, sint32); +static void window_view_clipping_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_view_clipping_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_view_clipping_tool_drag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +static void window_view_clipping_tool_up(rct_window* w, rct_widgetindex, int32_t, int32_t); static void window_view_clipping_invalidate(rct_window* w); static void window_view_clipping_paint(rct_window* w, rct_drawpixelinfo* dpi); static void window_view_clipping_scrollgetsize(rct_window* w, int scrollIndex, int* width, int* height); @@ -122,12 +122,12 @@ static rct_window_event_list window_view_clipping_events = { #pragma endregion -static void window_view_clipping_set_clipheight(rct_window *w, const uint8 clipheight) +static void window_view_clipping_set_clipheight(rct_window *w, const uint8_t clipheight) { gClipHeight = clipheight; rct_widget* widget = &window_view_clipping_widgets[WIDX_CLIP_HEIGHT_SLIDER]; const float clip_height_ratio = (float)gClipHeight / 255; - w->scrolls[0].h_left = (sint16)std::ceil(clip_height_ratio * (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))); + w->scrolls[0].h_left = (int16_t)std::ceil(clip_height_ratio * (w->scrolls[0].h_right - ((widget->right - widget->left) - 1))); } rct_window * window_view_clipping_open() @@ -284,8 +284,8 @@ static void window_view_clipping_update(rct_window *w) { const rct_widget *const widget = &window_view_clipping_widgets[WIDX_CLIP_HEIGHT_SLIDER]; const rct_scroll *const scroll = &w->scrolls[0]; - const sint16 scroll_width = widget->right - widget->left - 1; - const uint8 clip_height = (uint8)(((float)scroll->h_left / (scroll->h_right - scroll_width)) * 255); + const int16_t scroll_width = widget->right - widget->left - 1; + const uint8_t clip_height = (uint8_t)(((float)scroll->h_left / (scroll->h_right - scroll_width)) * 255); if (clip_height != gClipHeight) { gClipHeight = clip_height; @@ -307,16 +307,16 @@ static void window_view_clipping_update(rct_window *w) widget_invalidate(w, WIDX_CLIP_HEIGHT_SLIDER); } -static void window_view_clipping_tool_update(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_view_clipping_tool_update(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (_dragging) { return; } - sint16 mapX = x; - sint16 mapY = y; - sint32 direction; + int16_t mapX = x; + int16_t mapY = y; + int32_t direction; screen_pos_to_map_pos(&mapX, &mapY, &direction); if (mapX != LOCATION_NULL) { @@ -329,11 +329,11 @@ static void window_view_clipping_tool_update(rct_window* w, rct_widgetindex widg } } -static void window_view_clipping_tool_down(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_view_clipping_tool_down(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { - sint16 mapX = x; - sint16 mapY = y; - sint32 direction; + int16_t mapX = x; + int16_t mapY = y; + int32_t direction; screen_pos_to_map_pos(&mapX, &mapY, &direction); if (mapX != LOCATION_NULL) { @@ -342,16 +342,16 @@ static void window_view_clipping_tool_down(rct_window* w, rct_widgetindex widget } } -static void window_view_clipping_tool_drag(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +static void window_view_clipping_tool_drag(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (!_dragging) { return; } - sint16 mapX = x; - sint16 mapY = y; - sint32 direction; + int16_t mapX = x; + int16_t mapY = y; + int32_t direction; screen_pos_to_map_pos(&mapX, &mapY, &direction); if (mapX != LOCATION_NULL) { @@ -366,10 +366,10 @@ static void window_view_clipping_tool_drag(rct_window* w, rct_widgetindex widget } } -static void window_view_clipping_tool_up(struct rct_window*, rct_widgetindex, sint32, sint32) +static void window_view_clipping_tool_up(struct rct_window*, rct_widgetindex, int32_t, int32_t) { - gClipSelectionA = { uint8(gMapSelectPositionA.x / 32), uint8(gMapSelectPositionA.y / 32) }; - gClipSelectionB = { uint8(gMapSelectPositionB.x / 32), uint8(gMapSelectPositionB.y / 32) }; + gClipSelectionA = { uint8_t(gMapSelectPositionA.x / 32), uint8_t(gMapSelectPositionA.y / 32) }; + gClipSelectionB = { uint8_t(gMapSelectPositionB.x / 32), uint8_t(gMapSelectPositionB.y / 32) }; _toolActive = false; tool_cancel(); gfx_invalidate_screen(); @@ -399,8 +399,8 @@ static void window_view_clipping_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); // Clip height value - sint32 x = w->x + 8; - sint32 y = w->y + w->widgets[WIDX_CLIP_HEIGHT_VALUE].top; + int32_t x = w->x + 8; + int32_t y = w->y + w->widgets[WIDX_CLIP_HEIGHT_VALUE].top; gfx_draw_string_left(dpi, STR_VIEW_CLIPPING_HEIGHT_VALUE, nullptr, w->colours[0], x, y); x = w->x + w->widgets[WIDX_CLIP_HEIGHT_VALUE].left + 1; @@ -409,7 +409,7 @@ static void window_view_clipping_paint(rct_window *w, rct_drawpixelinfo *dpi) fixed16_1dp clipHeightValueInUnits; fixed32_2dp clipHeightValueInMeters; fixed16_1dp clipHeightValueInFeet; - sint32 clipHeightRawValue = (sint32)gClipHeight; + int32_t clipHeightRawValue = (int32_t)gClipHeight; switch (gClipHeightDisplayType) { case DISPLAY_TYPE::DISPLAY_RAW: default: diff --git a/src/openrct2-ui/windows/Viewport.cpp b/src/openrct2-ui/windows/Viewport.cpp index 34ee57fa2b..74e9223b21 100644 --- a/src/openrct2-ui/windows/Viewport.cpp +++ b/src/openrct2-ui/windows/Viewport.cpp @@ -82,7 +82,7 @@ static rct_window_event_list window_viewport_events = { }; // clang-format on -static sint32 _viewportNumber = 1; +static int32_t _viewportNumber = 1; /** * Creates a custom viewport window. @@ -108,8 +108,8 @@ rct_window * window_viewport_open() rct_window *mainWindow = window_get_main(); if (mainWindow != nullptr) { rct_viewport *mainViewport = mainWindow->viewport; - sint32 x = mainViewport->view_x + (mainViewport->view_width / 2); - sint32 y = mainViewport->view_y + (mainViewport->view_height / 2); + int32_t x = mainViewport->view_x + (mainViewport->view_width / 2); + int32_t y = mainViewport->view_y + (mainViewport->view_height / 2); w->saved_view_x = x - (w->viewport->view_width / 2); w->saved_view_y = y - (w->viewport->view_height / 2); } @@ -133,7 +133,7 @@ static void window_viewport_anchor_border_widgets(rct_window *w) static void window_viewport_mouseup(rct_window *w, rct_widgetindex widgetIndex) { rct_window *mainWindow; - sint16 x, y; + int16_t x, y; switch (widgetIndex) { case WIDX_CLOSE: @@ -188,7 +188,7 @@ static void window_viewport_invalidate(rct_window *w) { rct_widget *viewportWidget; rct_viewport *viewport; - sint32 i; + int32_t i; viewportWidget = &window_viewport_widgets[WIDX_VIEWPORT]; viewport = w->viewport; @@ -203,7 +203,7 @@ static void window_viewport_invalidate(rct_window *w) } // Set title - set_format_arg(0, uint32, w->number); + set_format_arg(0, uint32_t, w->number); // Set disabled widgets w->disabled_widgets = 0; diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index 152effd35b..293918f63c 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -161,7 +161,7 @@ static void window_water_mousedown(rct_window *w, rct_widgetindex widgetIndex, r static void window_water_textinput(rct_window *w, rct_widgetindex widgetIndex, char *text) { - sint32 size; + int32_t size; char* end; if (widgetIndex != WIDX_PREVIEW || text == nullptr) @@ -214,7 +214,7 @@ static void window_water_invalidate(rct_window *w) */ static void window_water_paint(rct_window *w, rct_drawpixelinfo *dpi) { - sint32 x, y; + int32_t x, y; x = w->x + (window_water_widgets[WIDX_PREVIEW].left + window_water_widgets[WIDX_PREVIEW].right) / 2; y = w->y + (window_water_widgets[WIDX_PREVIEW].top + window_water_widgets[WIDX_PREVIEW].bottom) / 2; diff --git a/src/openrct2-ui/windows/Window.h b/src/openrct2-ui/windows/Window.h index 40bddf122b..f8061eb774 100644 --- a/src/openrct2-ui/windows/Window.h +++ b/src/openrct2-ui/windows/Window.h @@ -15,7 +15,7 @@ #include #include -using loadsave_callback = void (*)(sint32 result, const utf8 * path); +using loadsave_callback = void (*)(int32_t result, const utf8 * path); using scenarioselect_callback = void (*)(const utf8 *path); struct rct_peep; struct rct_tile_element; @@ -45,7 +45,7 @@ rct_window * window_options_open(); rct_window * window_save_prompt_open(); rct_window * window_server_list_open(); rct_window * window_server_start_open(); -rct_window * window_shortcut_change_open(sint32 selected_key); +rct_window * window_shortcut_change_open(int32_t selected_key); rct_window * window_shortcut_keys_open(); rct_window * window_staff_list_open(); rct_window * window_staff_open(rct_peep* peep); @@ -70,26 +70,26 @@ rct_window * window_park_objective_open(); rct_window * window_park_rating_open(); rct_window * window_banner_open(rct_windownumber number); -rct_window * window_ride_demolish_prompt_open(sint32 rideIndex); -rct_window * window_ride_refurbish_prompt_open(sint32 rideIndex); +rct_window * window_ride_demolish_prompt_open(int32_t rideIndex); +rct_window * window_ride_refurbish_prompt_open(int32_t rideIndex); rct_window * window_sign_open(rct_windownumber number); rct_window * window_sign_small_open(rct_windownumber number); -rct_window * window_player_open(uint8 id); -rct_window * window_new_campaign_open(sint16 campaignType); +rct_window * window_player_open(uint8_t id); +rct_window * window_new_campaign_open(int16_t campaignType); rct_window * window_install_track_open(const utf8* path); void window_guest_list_init_vars(); void window_guest_list_refresh_list(); rct_window * window_guest_list_open(); -rct_window * window_guest_list_open_with_filter(sint32 type, sint32 index); +rct_window * window_guest_list_open_with_filter(int32_t type, int32_t index); rct_window * window_staff_fire_prompt_open(rct_peep* peep); -void window_title_editor_open(sint32 tab); -void window_title_command_editor_open(struct TitleSequence * sequence, sint32 command, bool insert); +void window_title_editor_open(int32_t tab); +void window_title_command_editor_open(struct TitleSequence * sequence, int32_t command, bool insert); rct_window * window_scenarioselect_open(scenarioselect_callback callback, bool titleEditor); rct_window * window_error_open(rct_string_id title, rct_string_id message); -rct_window * window_loadsave_open(sint32 type, const char *defaultName); +rct_window * window_loadsave_open(int32_t type, const char *defaultName); void window_loadsave_set_loadsave_callback(loadsave_callback cb); rct_window * window_track_place_open(const struct track_design_file_ref *tdFileRef); rct_window * window_track_manage_open(struct track_design_file_ref *tdFileRef); @@ -109,7 +109,7 @@ void window_new_ride_focus(ride_list_item rideItem); rct_window * window_ride_list_open(); void window_ride_list_refresh_list(rct_window * w); -rct_window * window_ride_main_open(sint32 rideIndex); +rct_window * window_ride_main_open(int32_t rideIndex); rct_window * window_ride_open_track(rct_tile_element * tileElement); rct_window * window_ride_open_vehicle(rct_vehicle * vehicle); void window_ride_measurements_design_cancel(); @@ -128,8 +128,8 @@ rct_window * window_network_status_open_password(); void window_network_status_close(); void window_text_input_key(rct_window * w, char keychar); -void window_text_input_open(rct_window * call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, rct_string_id existing_text, uintptr_t existing_args, sint32 maxLength); -void window_text_input_raw_open(rct_window * call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, const_utf8string existing_text, sint32 maxLength); +void window_text_input_open(rct_window * call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, rct_string_id existing_text, uintptr_t existing_args, int32_t maxLength); +void window_text_input_raw_open(rct_window * call_w, rct_widgetindex call_widget, rct_string_id title, rct_string_id description, const_utf8string existing_text, int32_t maxLength); rct_window * window_object_load_error_open(utf8 * path, size_t numMissingObjects, const rct_object_entry * missingObjects); @@ -143,12 +143,12 @@ bool clear_scenery_tool_is_active(); bool water_tool_is_active(); rct_window * window_scenery_open(); -bool window_scenery_set_selected_item(sint32 sceneryId); +bool window_scenery_set_selected_item(int32_t sceneryId); void window_scenery_set_default_placement_configuration(); void window_scenery_init(); void window_scenery_reset_selected_scenery_items(); -extern uint8 gToolbarDirtyFlags; +extern uint8_t gToolbarDirtyFlags; rct_window * window_game_bottom_toolbar_open(); void window_game_bottom_toolbar_invalidate_news_item(); @@ -159,7 +159,7 @@ void window_tile_inspector_clear_clipboard(); rct_window * window_editor_object_selection_open(); -void window_tooltip_reset(sint32 x, sint32 y); -void window_tooltip_show(rct_string_id id, sint32 x, sint32 y); -void window_tooltip_open(rct_window * widgetWindow, rct_widgetindex widgetIndex, sint32 x, sint32 y); +void window_tooltip_reset(int32_t x, int32_t y); +void window_tooltip_show(rct_string_id id, int32_t x, int32_t y); +void window_tooltip_open(rct_window * widgetWindow, rct_widgetindex widgetIndex, int32_t x, int32_t y); void window_tooltip_close(); diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index 3371ba13e6..fc1c537213 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -48,16 +48,16 @@ bool gCheatsDisableRideValueAging = false; bool gCheatsIgnoreResearchStatus = false; bool gCheatsEnableAllDrawableTrackPieces = false; -sint32 park_rating_spinner_value; -sint32 year_spinner_value = 1; -sint32 month_spinner_value = 1; -sint32 day_spinner_value = 1; +int32_t park_rating_spinner_value; +int32_t year_spinner_value = 1; +int32_t month_spinner_value = 1; +int32_t day_spinner_value = 1; #pragma region Cheat functions -static void cheat_set_grass_length(sint32 length) +static void cheat_set_grass_length(int32_t length) { - sint32 x, y; + int32_t x, y; rct_tile_element *tileElement; for (y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { @@ -114,7 +114,7 @@ static void cheat_fix_vandalism() static void cheat_remove_litter() { rct_litter* litter; - uint16 spriteIndex, nextSpriteIndex; + uint16_t spriteIndex, nextSpriteIndex; for (spriteIndex = gSpriteListHead[SPRITE_LIST_LITTER]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex) { litter = &(get_sprite(spriteIndex)->litter); @@ -144,7 +144,7 @@ static void cheat_remove_litter() static void cheat_fix_rides() { - sint32 rideIndex; + int32_t rideIndex; Ride *ride; rct_peep *mechanic; @@ -166,7 +166,7 @@ static void cheat_fix_rides() static void cheat_renew_rides() { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) @@ -178,7 +178,7 @@ static void cheat_renew_rides() static void cheat_make_destructible() { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) { @@ -192,7 +192,7 @@ static void cheat_make_destructible() static void cheat_reset_crash_status() { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride){ @@ -207,7 +207,7 @@ static void cheat_reset_crash_status() static void cheat_10_minute_inspections() { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) { @@ -261,19 +261,19 @@ static void cheat_clear_loan() GameActions::Execute(&gameAction); } -static void cheat_generate_guests(sint32 count) +static void cheat_generate_guests(int32_t count) { auto& park = GetContext()->GetGameState()->GetPark(); - for (sint32 i = 0; i < count; i++) + for (int32_t i = 0; i < count; i++) { park.GenerateGuest(); } window_invalidate_by_class(WC_BOTTOM_TOOLBAR); } -static void cheat_set_guest_parameter(sint32 parameter, sint32 value) +static void cheat_set_guest_parameter(int32_t parameter, int32_t value) { - sint32 spriteIndex; + int32_t spriteIndex; rct_peep *peep; FOR_ALL_GUESTS(spriteIndex, peep) { @@ -317,9 +317,9 @@ static void cheat_set_guest_parameter(sint32 parameter, sint32 value) } -static void cheat_give_all_guests(sint32 object) +static void cheat_give_all_guests(int32_t object) { - sint32 spriteIndex; + int32_t spriteIndex; rct_peep *peep; FOR_ALL_GUESTS(spriteIndex, peep) { @@ -350,8 +350,8 @@ static void cheat_remove_all_guests() { rct_peep *peep; rct_vehicle *vehicle; - uint16 spriteIndex, nextSpriteIndex; - sint32 rideIndex; + uint16_t spriteIndex, nextSpriteIndex; + int32_t rideIndex; Ride *ride; FOR_ALL_RIDES(rideIndex, ride) @@ -407,7 +407,7 @@ static void cheat_remove_all_guests() static void cheat_explode_guests() { - sint32 sprite_index; + int32_t sprite_index; rct_peep *peep; FOR_ALL_GUESTS(sprite_index, peep) { @@ -417,9 +417,9 @@ static void cheat_explode_guests() } } -static void cheat_set_staff_speed(uint8 value) +static void cheat_set_staff_speed(uint8_t value) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep *peep; FOR_ALL_STAFF(spriteIndex, peep) { @@ -430,8 +430,8 @@ static void cheat_set_staff_speed(uint8 value) static void cheat_own_all_land() { - const sint32 min = 32; - const sint32 max = gMapSizeUnits - 32; + const int32_t min = 32; + const int32_t max = gMapSizeUnits - 32; for (CoordsXY coords = {min, min}; coords.y <= max; coords.y += 32) { for (coords.x = min; coords.x <= max; coords.x += 32) { @@ -441,14 +441,14 @@ static void cheat_own_all_land() if (surfaceElement->properties.surface.ownership & OWNERSHIP_OWNED) continue; - sint32 base_z = surfaceElement->base_height; - sint32 destOwnership = check_max_allowable_land_rights_for_tile(coords.x >> 5, coords.y >> 5, base_z); + int32_t base_z = surfaceElement->base_height; + int32_t destOwnership = check_max_allowable_land_rights_for_tile(coords.x >> 5, coords.y >> 5, base_z); // only own tiles that were not set to 0 if (destOwnership != OWNERSHIP_UNOWNED) { surfaceElement->properties.surface.ownership |= destOwnership; update_park_fences_around_tile(coords); - uint16 baseHeight = surfaceElement->base_height * 8; + uint16_t baseHeight = surfaceElement->base_height * 8; map_invalidate_tile(coords.x, coords.y, baseHeight, baseHeight + 16); } } @@ -456,13 +456,13 @@ static void cheat_own_all_land() // Completely unown peep spawn points for (const auto &spawn : gPeepSpawns) { - sint32 x = spawn.x; - sint32 y = spawn.y; + int32_t x = spawn.x; + int32_t y = spawn.y; if (x != PEEP_SPAWN_UNDEFINED) { rct_tile_element * surfaceElement = map_get_surface_element_at({x, y}); surfaceElement->properties.surface.ownership = OWNERSHIP_UNOWNED; update_park_fences_around_tile({x, y}); - uint16 baseHeight = surfaceElement->base_height * 8; + uint16_t baseHeight = surfaceElement->base_height * 8; map_invalidate_tile(x, y, baseHeight, baseHeight + 16); } } @@ -473,15 +473,15 @@ static void cheat_own_all_land() #pragma endregion void game_command_cheat( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - sint32 cheat = *ecx; + int32_t cheat = *ecx; if (*ebx & GAME_COMMAND_FLAG_APPLY) { switch (cheat) diff --git a/src/openrct2/Cheats.h b/src/openrct2/Cheats.h index 66008af425..51a5eb7092 100644 --- a/src/openrct2/Cheats.h +++ b/src/openrct2/Cheats.h @@ -111,12 +111,12 @@ enum { #define CHEATS_STAFF_NORMAL_SPEED 0x60 #define CHEATS_STAFF_FREEZE_SPEED 0 -extern sint32 park_rating_spinner_value; -extern sint32 year_spinner_value; -extern sint32 month_spinner_value; -extern sint32 day_spinner_value; +extern int32_t park_rating_spinner_value; +extern int32_t year_spinner_value; +extern int32_t month_spinner_value; +extern int32_t day_spinner_value; -void game_command_cheat(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); +void game_command_cheat(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); void cheats_reset(); diff --git a/src/openrct2/CmdlineSprite.cpp b/src/openrct2/CmdlineSprite.cpp index 3b41ec78f0..fcc168a8ca 100644 --- a/src/openrct2/CmdlineSprite.cpp +++ b/src/openrct2/CmdlineSprite.cpp @@ -26,19 +26,19 @@ using namespace OpenRCT2::Drawing; #pragma pack(push, 1) struct rct_sprite_file_header { - uint32 num_entries; - uint32 total_size; + uint32_t num_entries; + uint32_t total_size; }; assert_struct_size(rct_sprite_file_header, 8); struct rct_sprite_file_palette_entry { - uint8 b, g, r, a; + uint8_t b, g, r, a; }; struct rle_code { - uint8 num_pixels; - uint8 offset_x; + uint8_t num_pixels; + uint8_t offset_x; }; assert_struct_size(rle_code, 2); @@ -57,7 +57,7 @@ static rct_sprite_file_palette_entry spriteFilePalette[256]; static rct_sprite_file_header spriteFileHeader; static rct_g1_element *spriteFileEntries; -static uint8 *spriteFileData; +static uint8_t *spriteFileData; #ifdef _WIN32 @@ -77,13 +77,13 @@ static FILE * fopen_utf8(const char * path, const char * mode) static void sprite_entries_make_absolute() { - for (uint32 i = 0; i < spriteFileHeader.num_entries; i++) + for (uint32_t i = 0; i < spriteFileHeader.num_entries; i++) spriteFileEntries[i].offset += (uintptr_t)spriteFileData; } static void sprite_entries_make_relative() { - for (uint32 i = 0; i < spriteFileHeader.num_entries; i++) + for (uint32_t i = 0; i < spriteFileHeader.num_entries; i++) spriteFileEntries[i].offset -= (uintptr_t)spriteFileData; } @@ -99,7 +99,7 @@ static bool sprite_file_open(const utf8 *path) } if (spriteFileHeader.num_entries > 0) { - sint32 openEntryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element_32bit); + int32_t openEntryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element_32bit); rct_g1_element_32bit * openElements = (rct_g1_element_32bit *)malloc(openEntryTableSize); if (openElements == nullptr) { fclose(file); @@ -112,7 +112,7 @@ static bool sprite_file_open(const utf8 *path) return false; } - spriteFileData = (uint8 *)malloc(spriteFileHeader.total_size); + spriteFileData = (uint8_t *)malloc(spriteFileHeader.total_size); if (fread(spriteFileData, spriteFileHeader.total_size, 1, file) != 1) { free(spriteFileData); free(openElements); @@ -120,13 +120,13 @@ static bool sprite_file_open(const utf8 *path) return false; } - sint32 entryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element); + int32_t entryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element); spriteFileEntries = (rct_g1_element *)malloc(entryTableSize); - for (uint32 i = 0; i < spriteFileHeader.num_entries; i++) { + for (uint32_t i = 0; i < spriteFileHeader.num_entries; i++) { rct_g1_element_32bit * inElement = &openElements[i]; rct_g1_element * outElement = &spriteFileEntries[i]; - outElement->offset = (uint8*)((uintptr_t)inElement->offset + (uintptr_t)spriteFileData); + outElement->offset = (uint8_t*)((uintptr_t)inElement->offset + (uintptr_t)spriteFileData); outElement->width = inElement->width; outElement->height = inElement->height; outElement->x_offset = inElement->x_offset; @@ -154,18 +154,18 @@ static bool sprite_file_save(const char *path) } if (spriteFileHeader.num_entries > 0) { - sint32 saveEntryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element_32bit); + int32_t saveEntryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element_32bit); rct_g1_element_32bit * saveElements = (rct_g1_element_32bit *)malloc(saveEntryTableSize); if (saveElements == nullptr) { fclose(file); return false; } - for (uint32 i = 0; i < spriteFileHeader.num_entries; i++) { + for (uint32_t i = 0; i < spriteFileHeader.num_entries; i++) { rct_g1_element * inElement = &spriteFileEntries[i]; rct_g1_element_32bit * outElement = &saveElements[i]; - outElement->offset = (uint32)((uintptr_t)inElement->offset - (uintptr_t)spriteFileData); + outElement->offset = (uint32_t)((uintptr_t)inElement->offset - (uintptr_t)spriteFileData); outElement->width = inElement->width; outElement->height = inElement->height; outElement->x_offset = inElement->x_offset; @@ -197,16 +197,16 @@ static void sprite_file_close() SafeFree(spriteFileData); } -static bool sprite_file_export(sint32 spriteIndex, const char *outPath) +static bool sprite_file_export(int32_t spriteIndex, const char *outPath) { rct_g1_element *spriteHeader; rct_drawpixelinfo dpi; - uint8 *pixels; - sint32 pixelBufferSize; + uint8_t *pixels; + int32_t pixelBufferSize; spriteHeader = &spriteFileEntries[spriteIndex]; pixelBufferSize = spriteHeader->width * spriteHeader->height; - pixels = (uint8 *)malloc(pixelBufferSize); + pixels = (uint8_t *)malloc(pixelBufferSize); memset(pixels, 0, pixelBufferSize); dpi.bits = pixels; @@ -220,9 +220,9 @@ static bool sprite_file_export(sint32 spriteIndex, const char *outPath) memcpy(spriteFilePalette, CmdlineSprite::_standardPalette, 256 * 4); if (spriteHeader->flags & G1_FLAG_RLE_COMPRESSION) { - gfx_rle_sprite_to_buffer(spriteHeader->offset, pixels, (uint8*)spriteFilePalette, &dpi, IMAGE_TYPE_DEFAULT, 0, spriteHeader->height, 0, spriteHeader->width); + gfx_rle_sprite_to_buffer(spriteHeader->offset, pixels, (uint8_t*)spriteFilePalette, &dpi, IMAGE_TYPE_DEFAULT, 0, spriteHeader->height, 0, spriteHeader->width); } else { - gfx_bmp_sprite_to_buffer((uint8*)spriteFilePalette, spriteHeader->offset, pixels, spriteHeader, &dpi, spriteHeader->height, spriteHeader->width, IMAGE_TYPE_DEFAULT); + gfx_bmp_sprite_to_buffer((uint8_t*)spriteFilePalette, spriteHeader->offset, pixels, spriteHeader, &dpi, spriteHeader->height, spriteHeader->width, IMAGE_TYPE_DEFAULT); } auto const pixels8 = dpi.bits; @@ -235,7 +235,7 @@ static bool sprite_file_export(sint32 spriteIndex, const char *outPath) image.Depth = 8; image.Stride = dpi.width + dpi.pitch; image.Palette = std::make_unique(*((rct_palette *)&spriteFilePalette)); - image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); + image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); Imaging::WriteToFile(outPath, image, IMAGE_FORMAT::PNG); return true; } @@ -246,7 +246,7 @@ static bool sprite_file_export(sint32 spriteIndex, const char *outPath) } } -static bool sprite_file_import(const char *path, sint16 x_offset, sint16 y_offset, bool keep_palette, rct_g1_element *outElement, uint8 **outBuffer, int *outBufferLength, sint32 mode) +static bool sprite_file_import(const char *path, int16_t x_offset, int16_t y_offset, bool keep_palette, rct_g1_element *outElement, uint8_t **outBuffer, int *outBufferLength, int32_t mode) { try { @@ -263,7 +263,7 @@ static bool sprite_file_import(const char *path, sint16 x_offset, sint16 y_offse auto result = importer.Import(image, x_offset, y_offset, flags, (ImageImporter::IMPORT_MODE)mode); *outElement = result.Element; - *outBuffer = (uint8 *)result.Buffer; + *outBuffer = (uint8_t *)result.Buffer; *outBufferLength = (int)result.BufferLength; return true; } @@ -274,7 +274,7 @@ static bool sprite_file_import(const char *path, sint16 x_offset, sint16 y_offse } } -sint32 cmdline_for_sprite(const char **argv, sint32 argc) +int32_t cmdline_for_sprite(const char **argv, int32_t argc) { gOpenRCT2Headless = true; if (argc == 0) @@ -299,14 +299,14 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) return 1; } else { const char *spriteFilePath = argv[1]; - sint32 spriteIndex = atoi(argv[2]); + int32_t spriteIndex = atoi(argv[2]); if (!sprite_file_open(spriteFilePath)) { fprintf(stderr, "Unable to open input sprite file.\n"); return -1; } - if (spriteIndex < 0 || spriteIndex >= (sint32)spriteFileHeader.num_entries) { + if (spriteIndex < 0 || spriteIndex >= (int32_t)spriteFileHeader.num_entries) { sprite_file_close(); fprintf(stderr, "Sprite #%d does not exist in sprite file.\n", spriteIndex); return -1; @@ -329,7 +329,7 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) } const char *spriteFilePath = argv[1]; - sint32 spriteIndex = atoi(argv[2]); + int32_t spriteIndex = atoi(argv[2]); const char *outputPath = argv[3]; if (!sprite_file_open(spriteFilePath)) { @@ -337,7 +337,7 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) return -1; } - if (spriteIndex < 0 || spriteIndex >= (sint32)spriteFileHeader.num_entries) { + if (spriteIndex < 0 || spriteIndex >= (int32_t)spriteFileHeader.num_entries) { fprintf(stderr, "Sprite #%d does not exist in sprite file.\n", spriteIndex); return -1; } @@ -372,8 +372,8 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) return -1; } - sint32 maxIndex = (sint32)spriteFileHeader.num_entries; - sint32 numbers = (sint32)std::floor(std::log(maxIndex)); + int32_t maxIndex = (int32_t)spriteFileHeader.num_entries; + int32_t numbers = (int32_t)std::floor(std::log(maxIndex)); size_t pathLen = strlen(outputPath); if (pathLen >= (size_t)(MAX_PATH - numbers - 5)) { @@ -381,12 +381,12 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) return -1; } - for (sint32 x = 0; x < numbers; x++){ + for (int32_t x = 0; x < numbers; x++){ outputPath[pathLen + x] = '0'; } safe_strcpy(outputPath + pathLen + numbers, ".png", MAX_PATH - pathLen - numbers); - for (sint32 spriteIndex = 0; spriteIndex < maxIndex; spriteIndex++){ + for (int32_t spriteIndex = 0; spriteIndex < maxIndex; spriteIndex++){ if (spriteIndex % 100 == 99) { @@ -438,8 +438,8 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) const char *spriteFilePath = argv[1]; const char *imagePath = argv[2]; - sint16 x_offset = 0; - sint16 y_offset = 0; + int16_t x_offset = 0; + int16_t y_offset = 0; if (argc == 5) { @@ -461,9 +461,9 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) } rct_g1_element spriteElement; - uint8 *buffer; + uint8_t *buffer; - sint32 bufferLength; + int32_t bufferLength; if (!sprite_file_import(imagePath, x_offset, y_offset, false, &spriteElement, &buffer, &bufferLength, gSpriteMode)) return -1; @@ -477,7 +477,7 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) spriteFileEntries = (rct_g1_element *)realloc(spriteFileEntries, spriteFileHeader.num_entries * sizeof(rct_g1_element)); sprite_entries_make_relative(); - spriteFileData = (uint8 *)realloc(spriteFileData, spriteFileHeader.total_size); + spriteFileData = (uint8_t *)realloc(spriteFileData, spriteFileHeader.total_size); sprite_entries_make_absolute(); spriteFileEntries[spriteFileHeader.num_entries - 1] = spriteElement; @@ -562,7 +562,7 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) char *imagePath = platform_get_absolute_path(json_string_value(path), directoryPath); rct_g1_element spriteElement; - uint8 *buffer; + uint8_t *buffer; int bufferLength; if (!sprite_file_import(imagePath, @@ -589,7 +589,7 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) spriteFileEntries = (rct_g1_element *)realloc(spriteFileEntries, spriteFileHeader.num_entries * sizeof(rct_g1_element)); sprite_entries_make_relative(); - spriteFileData = (uint8 *)realloc(spriteFileData, spriteFileHeader.total_size); + spriteFileData = (uint8_t *)realloc(spriteFileData, spriteFileHeader.total_size); sprite_entries_make_absolute(); spriteFileEntries[spriteFileHeader.num_entries - 1] = spriteElement; diff --git a/src/openrct2/CmdlineSprite.h b/src/openrct2/CmdlineSprite.h index dcb9028315..3b35797800 100644 --- a/src/openrct2/CmdlineSprite.h +++ b/src/openrct2/CmdlineSprite.h @@ -12,7 +12,7 @@ #include "common.h" -sint32 cmdline_for_sprite(const char **argv, sint32 argc); -extern sint32 gSpriteMode; +int32_t cmdline_for_sprite(const char **argv, int32_t argc); +extern int32_t gSpriteMode; #endif diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 9a6be3556c..75e5a57b2e 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -104,15 +104,15 @@ namespace OpenRCT2 std::unique_ptr _titleScreen; std::unique_ptr _gameState; - sint32 _drawingEngineType = DRAWING_ENGINE_SOFTWARE; + int32_t _drawingEngineType = DRAWING_ENGINE_SOFTWARE; std::unique_ptr _drawingEngine; std::unique_ptr _painter; bool _initialised = false; bool _isWindowMinimised = false; - uint32 _lastTick = 0; - uint32 _accumulator = 0; - uint32 _lastUpdateTick = 0; + uint32_t _lastTick = 0; + uint32_t _accumulator = 0; + uint32_t _lastUpdateTick = 0; bool _variableFrame = false; /** If set, will end the OpenRCT2 game loop. Intentially private to this module so that the flag can not be set back to false. */ @@ -194,7 +194,7 @@ namespace OpenRCT2 return _scenarioRepository.get(); } - sint32 GetDrawingEngineType() override + int32_t GetDrawingEngineType() override { return _drawingEngineType; } @@ -204,7 +204,7 @@ namespace OpenRCT2 return _drawingEngine.get(); } - sint32 RunOpenRCT2(int argc, const char * * argv) override + int32_t RunOpenRCT2(int argc, const char * * argv) override { if (Initialise()) { @@ -232,7 +232,7 @@ namespace OpenRCT2 context_open_window(WC_SAVE_PROMPT); } - std::string GetPathLegacy(sint32 pathId) override + std::string GetPathLegacy(int32_t pathId) override { static constexpr const char * const LegacyFileNames[PATH_ID_END] = { @@ -431,7 +431,7 @@ namespace OpenRCT2 #endif } gScenarioTicks = 0; - util_srand((uint32)time(nullptr)); + util_srand((uint32_t)time(nullptr)); input_reset_place_obj_modifier(); viewport_init_all(); @@ -597,7 +597,7 @@ namespace OpenRCT2 auto intent = Intent(WC_OBJECT_LOAD_ERROR); intent.putExtra(INTENT_EXTRA_PATH, path); intent.putExtra(INTENT_EXTRA_LIST, (void *)e.MissingObjects.data()); - intent.putExtra(INTENT_EXTRA_LIST_COUNT, (uint32)e.MissingObjects.size()); + intent.putExtra(INTENT_EXTRA_LIST_COUNT, (uint32_t)e.MissingObjects.size()); auto windowManager = _uiContext->GetWindowManager(); windowManager->OpenIntent(&intent); @@ -612,7 +612,7 @@ namespace OpenRCT2 } auto windowManager = _uiContext->GetWindowManager(); - set_format_arg(0, uint16, e.Flag); + set_format_arg(0, uint16_t, e.Flag); windowManager->ShowError(STR_FAILED_TO_LOAD_IMCOMPATIBLE_RCTC_FLAG, STR_NONE); } catch (const std::exception& e) @@ -862,16 +862,16 @@ namespace OpenRCT2 void RunFixedFrame() { - uint32 currentTick = platform_get_ticks(); + uint32_t currentTick = platform_get_ticks(); if (_lastTick == 0) { _lastTick = currentTick; } - uint32 elapsed = currentTick - _lastTick; + uint32_t elapsed = currentTick - _lastTick; _lastTick = currentTick; - _accumulator = std::min(_accumulator + elapsed, (uint32)GAME_UPDATE_MAX_THRESHOLD); + _accumulator = std::min(_accumulator + elapsed, (uint32_t)GAME_UPDATE_MAX_THRESHOLD); _uiContext->ProcessMessages(); @@ -894,7 +894,7 @@ namespace OpenRCT2 void RunVariableFrame() { - uint32 currentTick = platform_get_ticks(); + uint32_t currentTick = platform_get_ticks(); bool draw = !_isWindowMinimised && !gOpenRCT2Headless; @@ -904,10 +904,10 @@ namespace OpenRCT2 _lastTick = currentTick; } - uint32 elapsed = currentTick - _lastTick; + uint32_t elapsed = currentTick - _lastTick; _lastTick = currentTick; - _accumulator = std::min(_accumulator + elapsed, (uint32)GAME_UPDATE_MAX_THRESHOLD); + _accumulator = std::min(_accumulator + elapsed, (uint32_t)GAME_UPDATE_MAX_THRESHOLD); _uiContext->ProcessMessages(); @@ -941,8 +941,8 @@ namespace OpenRCT2 void Update() { - uint32 currentUpdateTick = platform_get_ticks(); - gTicksSinceLastUpdate = std::min(currentUpdateTick - _lastUpdateTick, 500); + uint32_t currentUpdateTick = platform_get_ticks(); + gTicksSinceLastUpdate = std::min(currentUpdateTick - _lastUpdateTick, 500); _lastUpdateTick = currentUpdateTick; if (game_is_not_paused()) @@ -1077,14 +1077,14 @@ void openrct2_finish() GetContext()->Finish(); } -void context_setcurrentcursor(sint32 cursor) +void context_setcurrentcursor(int32_t cursor) { GetContext()->GetUiContext()->SetCursor((CURSOR_ID)cursor); } void context_update_cursor_scale() { - GetContext()->GetUiContext()->SetCursorScale(static_cast(std::round(gConfigGeneral.window_scale))); + GetContext()->GetUiContext()->SetCursorScale(static_cast(std::round(gConfigGeneral.window_scale))); } void context_hide_cursor() @@ -1097,21 +1097,21 @@ void context_show_cursor() GetContext()->GetUiContext()->SetCursorVisible(true); } -void context_get_cursor_position(sint32 * x, sint32 * y) +void context_get_cursor_position(int32_t * x, int32_t * y) { GetContext()->GetUiContext()->GetCursorPosition(x, y); } -void context_get_cursor_position_scaled(sint32 * x, sint32 * y) +void context_get_cursor_position_scaled(int32_t * x, int32_t * y) { context_get_cursor_position(x, y); // Compensate for window scaling. - *x = (sint32)std::ceil(*x / gConfigGeneral.window_scale); - *y = (sint32)std::ceil(*y / gConfigGeneral.window_scale); + *x = (int32_t)std::ceil(*x / gConfigGeneral.window_scale); + *y = (int32_t)std::ceil(*y / gConfigGeneral.window_scale); } -void context_set_cursor_position(sint32 x, sint32 y) +void context_set_cursor_position(int32_t x, int32_t y) { GetContext()->GetUiContext()->SetCursorPosition(x, y); } @@ -1121,12 +1121,12 @@ const CursorState * context_get_cursor_state() return GetContext()->GetUiContext()->GetCursorState(); } -const uint8 * context_get_keys_state() +const uint8_t * context_get_keys_state() { return GetContext()->GetUiContext()->GetKeysState(); } -const uint8 * context_get_keys_pressed() +const uint8_t * context_get_keys_pressed() { return GetContext()->GetUiContext()->GetKeysPressed(); } @@ -1151,7 +1151,7 @@ void context_trigger_resize() return GetContext()->GetUiContext()->TriggerResize(); } -void context_set_fullscreen_mode(sint32 mode) +void context_set_fullscreen_mode(int32_t mode) { return GetContext()->GetUiContext()->SetFullscreenMode((FULLSCREEN_MODE)mode); } @@ -1161,21 +1161,21 @@ void context_recreate_window() GetContext()->GetUiContext()->RecreateWindow(); } -sint32 context_get_resolutions(Resolution * * outResolutions) +int32_t context_get_resolutions(Resolution * * outResolutions) { auto resolutions = GetContext()->GetUiContext()->GetFullscreenResolutions(); -sint32 count = (sint32)resolutions.size(); +int32_t count = (int32_t)resolutions.size(); *outResolutions = Memory::AllocateArray(count); std::copy_n(resolutions.begin(), count, *outResolutions); return count; } -sint32 context_get_width() +int32_t context_get_width() { return GetContext()->GetUiContext()->GetWidth(); } -sint32 context_get_height() +int32_t context_get_height() { return GetContext()->GetUiContext()->GetHeight(); } @@ -1202,7 +1202,7 @@ rct_window * context_open_window_view(rct_windowclass wc) return windowManager->OpenView(wc); } -rct_window * context_open_detail_window(uint8 type, sint32 id) +rct_window * context_open_detail_window(uint8_t type, int32_t id) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); return windowManager->OpenDetails(type, id); @@ -1255,7 +1255,7 @@ void context_quit() GetContext()->Quit(); } -const utf8 * context_get_path_legacy(sint32 pathId) +const utf8 * context_get_path_legacy(int32_t pathId) { static utf8 result[MAX_PATH]; auto path = GetContext()->GetPathLegacy(pathId); diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 998bf07286..db6cba2d25 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -22,16 +22,16 @@ interface ITrackDesignRepository; class Intent; struct rct_window; -using rct_windowclass = uint8; +using rct_windowclass = uint8_t; struct CursorState { - sint32 x, y; - uint8 left, middle, right, any; - sint32 wheel; - sint32 old; + int32_t x, y; + uint8_t left, middle, right, any; + int32_t wheel; + int32_t old; bool touch, touchIsDouble; - uint32 touchDownTimestamp; + uint32_t touchDownTimestamp; }; struct TextInputSession @@ -48,8 +48,8 @@ struct TextInputSession struct Resolution { - sint32 Width; - sint32 Height; + int32_t Width; + int32_t Height; }; enum @@ -102,10 +102,10 @@ namespace OpenRCT2 virtual std::shared_ptr GetObjectRepository() abstract; virtual ITrackDesignRepository * GetTrackDesignRepository() abstract; virtual IScenarioRepository * GetScenarioRepository() abstract; - virtual sint32 GetDrawingEngineType() abstract; + virtual int32_t GetDrawingEngineType() abstract; virtual Drawing::IDrawingEngine * GetDrawingEngine() abstract; - virtual sint32 RunOpenRCT2(int argc, const char * * argv) abstract; + virtual int32_t RunOpenRCT2(int argc, const char * * argv) abstract; virtual bool Initialise() abstract; virtual void InitialiseDrawingEngine() abstract; @@ -119,7 +119,7 @@ namespace OpenRCT2 /** * This is deprecated, use IPlatformEnvironment. */ - virtual std::string GetPathLegacy(sint32 pathId) abstract; + virtual std::string GetPathLegacy(int32_t pathId) abstract; }; std::unique_ptr CreateContext(); @@ -203,30 +203,30 @@ enum }; void context_init(); -void context_setcurrentcursor(sint32 cursor); +void context_setcurrentcursor(int32_t cursor); void context_update_cursor_scale(); void context_hide_cursor(); void context_show_cursor(); -void context_get_cursor_position(sint32 * x, sint32 * y); -void context_get_cursor_position_scaled(sint32 * x, sint32 * y); -void context_set_cursor_position(sint32 x, sint32 y); +void context_get_cursor_position(int32_t * x, int32_t * y); +void context_get_cursor_position_scaled(int32_t * x, int32_t * y); +void context_set_cursor_position(int32_t x, int32_t y); const CursorState * context_get_cursor_state(); -const uint8 * context_get_keys_state(); -const uint8 * context_get_keys_pressed(); +const uint8_t * context_get_keys_state(); +const uint8_t * context_get_keys_pressed(); TextInputSession * context_start_text_input(utf8 * buffer, size_t maxLength); void context_stop_text_input(); bool context_is_input_active(); void context_trigger_resize(); -void context_set_fullscreen_mode(sint32 mode); +void context_set_fullscreen_mode(int32_t mode); void context_recreate_window(); -sint32 context_get_resolutions(struct Resolution * * outResolutions); -sint32 context_get_width(); -sint32 context_get_height(); +int32_t context_get_resolutions(struct Resolution * * outResolutions); +int32_t context_get_width(); +int32_t context_get_height(); bool context_has_focus(); void context_set_cursor_trap(bool value); rct_window * context_open_window(rct_windowclass wc); -rct_window * context_open_detail_window(uint8 type, sint32 id); -rct_window * context_open_window_view(uint8 view); +rct_window * context_open_detail_window(uint8_t type, int32_t id); +rct_window * context_open_window_view(uint8_t view); rct_window * context_show_error(rct_string_id title, rct_string_id message); rct_window * context_open_intent(Intent * intent); void context_broadcast_intent(Intent * intent); @@ -234,8 +234,8 @@ void context_force_close_window_by_class(rct_windowclass wc); void context_update_map_tooltip(); void context_handle_input(); void context_input_handle_keyboard(bool isTitle); -bool context_read_bmp(void * * outPixels, uint32 * outWidth, uint32 * outHeight, const utf8 * path); +bool context_read_bmp(void * * outPixels, uint32_t * outWidth, uint32_t * outHeight, const utf8 * path); void context_quit(); -const utf8 * context_get_path_legacy(sint32 pathId); +const utf8 * context_get_path_legacy(int32_t pathId); bool context_load_park_from_file(const utf8 * path); bool context_load_park_from_stream(void * stream); diff --git a/src/openrct2/Date.cpp b/src/openrct2/Date.cpp index 025d77b672..684cdcd3ba 100644 --- a/src/openrct2/Date.cpp +++ b/src/openrct2/Date.cpp @@ -14,25 +14,25 @@ using namespace OpenRCT2; -constexpr sint32 MONTH_TICKS_INCREMENT = 4; -constexpr sint32 MASK_WEEK_TICKS = 0x3FFF; -constexpr sint32 MASK_FORTNIGHT_TICKS = 0x7FFF; -constexpr sint32 MASK_MONTH_TICKS = 0xFFFF; +constexpr int32_t MONTH_TICKS_INCREMENT = 4; +constexpr int32_t MASK_WEEK_TICKS = 0x3FFF; +constexpr int32_t MASK_FORTNIGHT_TICKS = 0x7FFF; +constexpr int32_t MASK_MONTH_TICKS = 0xFFFF; -Date::Date(uint32 monthsElapsed, uint16 monthTicks) +Date::Date(uint32_t monthsElapsed, uint16_t monthTicks) : _monthTicks(monthTicks), _monthsElapsed(monthsElapsed) { } -Date Date::FromYMD(sint32 year, sint32 month, sint32 day) +Date Date::FromYMD(int32_t year, int32_t month, int32_t day) { // Year, months Guard::ArgumentInRange(month, 0, MONTH_COUNT - 1); - sint32 monthsElapsed = (year * MONTH_COUNT) + month; + int32_t monthsElapsed = (year * MONTH_COUNT) + month; // Day - sint32 monthTicks = 0; + int32_t monthTicks = 0; if (day != 0) { auto daysInMonth = GetDaysInMonth(month); @@ -45,7 +45,7 @@ Date Date::FromYMD(sint32 year, sint32 month, sint32 day) void Date::Update() { - sint32 monthTicks = _monthTicks + MONTH_TICKS_INCREMENT; + int32_t monthTicks = _monthTicks + MONTH_TICKS_INCREMENT; if (monthTicks > MASK_MONTH_TICKS) { _monthTicks = 0; @@ -53,33 +53,33 @@ void Date::Update() } else { - _monthTicks = (uint16)monthTicks; + _monthTicks = (uint16_t)monthTicks; } } -uint16 Date::GetMonthTicks() const +uint16_t Date::GetMonthTicks() const { return _monthTicks; } -uint32 Date::GetMonthsElapsed() const +uint32_t Date::GetMonthsElapsed() const { return _monthsElapsed; } -sint32 Date::GetDay() const +int32_t Date::GetDay() const { auto month = GetMonth(); auto daysInMonth = GetDaysInMonth(month); return ((_monthTicks * daysInMonth) >> 16) & 0xFF; } -sint32 Date::GetMonth() const +int32_t Date::GetMonth() const { return _monthsElapsed % MONTH_COUNT; } -sint32 Date::GetYear() const +int32_t Date::GetYear() const { return _monthsElapsed / MONTH_COUNT; } @@ -90,9 +90,9 @@ bool Date::IsDayStart() const { return false; } - sint32 prevMonthTick = _monthTicks - 4; - sint32 currentMonth = GetMonth(); - sint32 currentDaysInMonth = GetDaysInMonth(currentMonth); + int32_t prevMonthTick = _monthTicks - 4; + int32_t currentMonth = GetMonth(); + int32_t currentDaysInMonth = GetDaysInMonth(currentMonth); return ((currentDaysInMonth * _monthTicks) >> 16 != (currentDaysInMonth * prevMonthTick) >> 16); } @@ -111,7 +111,7 @@ bool Date::IsMonthStart() const return (_monthTicks == 0); } -sint32 Date::GetDaysInMonth(sint32 month) +int32_t Date::GetDaysInMonth(int32_t month) { Guard::ArgumentInRange(month, 0, MONTH_COUNT - 1); diff --git a/src/openrct2/Date.h b/src/openrct2/Date.h index 13c42b6ac2..9142163491 100644 --- a/src/openrct2/Date.h +++ b/src/openrct2/Date.h @@ -19,28 +19,28 @@ namespace OpenRCT2 class Date final { private: - uint16 _monthTicks = 0; - uint32 _monthsElapsed = 0; + uint16_t _monthTicks = 0; + uint32_t _monthsElapsed = 0; public: Date() = default; - Date(uint32 monthsElapsed, uint16 monthTicks); + Date(uint32_t monthsElapsed, uint16_t monthTicks); - static Date FromYMD(sint32 year, sint32 month = 0, sint32 day = 0); + static Date FromYMD(int32_t year, int32_t month = 0, int32_t day = 0); void Update(); - uint16 GetMonthTicks() const; - uint32 GetMonthsElapsed() const; - sint32 GetDay() const; - sint32 GetMonth() const; - sint32 GetYear() const; + uint16_t GetMonthTicks() const; + uint32_t GetMonthsElapsed() const; + int32_t GetDay() const; + int32_t GetMonth() const; + int32_t GetYear() const; bool IsDayStart() const; bool IsWeekStart() const; bool IsFortnightStart() const; bool IsMonthStart() const; - static sint32 GetDaysInMonth(sint32 month); + static int32_t GetDaysInMonth(int32_t month); }; } diff --git a/src/openrct2/Diagnostic.cpp b/src/openrct2/Diagnostic.cpp index f3e1a046b1..bc0230246e 100644 --- a/src/openrct2/Diagnostic.cpp +++ b/src/openrct2/Diagnostic.cpp @@ -46,7 +46,7 @@ void diagnostic_log(DIAGNOSTIC_LEVEL diagnosticLevel, const char *format, ...) va_end(args); } -void diagnostic_log_with_location(DIAGNOSTIC_LEVEL diagnosticLevel, const char *file, const char *function, sint32 line, const char *format, ...) +void diagnostic_log_with_location(DIAGNOSTIC_LEVEL diagnosticLevel, const char *file, const char *function, int32_t line, const char *format, ...) { va_list args; char buf[1024]; @@ -89,7 +89,7 @@ void diagnostic_log(DIAGNOSTIC_LEVEL diagnosticLevel, const char *format, ...) } } -void diagnostic_log_with_location(DIAGNOSTIC_LEVEL diagnosticLevel, const char *file, const char *function, sint32 line, const char *format, ...) +void diagnostic_log_with_location(DIAGNOSTIC_LEVEL diagnosticLevel, const char *file, const char *function, int32_t line, const char *format, ...) { va_list args; if (_log_levels[diagnosticLevel]) diff --git a/src/openrct2/Diagnostic.h b/src/openrct2/Diagnostic.h index e534f35a2e..dbb9204e92 100644 --- a/src/openrct2/Diagnostic.h +++ b/src/openrct2/Diagnostic.h @@ -71,7 +71,7 @@ enum DIAGNOSTIC_LEVEL { extern bool _log_levels[DIAGNOSTIC_LEVEL_COUNT]; void diagnostic_log(DIAGNOSTIC_LEVEL diagnosticLevel, const char *format, ...); -void diagnostic_log_with_location(DIAGNOSTIC_LEVEL diagnosticLevel, const char *file, const char *function, sint32 line, const char *format, ...); +void diagnostic_log_with_location(DIAGNOSTIC_LEVEL diagnosticLevel, const char *file, const char *function, int32_t line, const char *format, ...); #ifdef _MSC_VER #define diagnostic_log_macro(level, format, ...) diagnostic_log_with_location(level, __FILE__, __FUNCTION__, __LINE__, format, ## __VA_ARGS__) diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 27768534b5..2b48628805 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -40,9 +40,9 @@ using namespace OpenRCT2; namespace Editor { - static std::array, OBJECT_TYPE_COUNT> _editorSelectedObjectFlags; + static std::array, OBJECT_TYPE_COUNT> _editorSelectedObjectFlags; - static void ConvertSaveToScenarioCallback(sint32 result, const utf8 * path); + static void ConvertSaveToScenarioCallback(int32_t result, const utf8 * path); static void SetAllLandOwned(); static bool LoadLandscapeFromSV4(const char * path); static bool LoadLandscapeFromSC4(const char * path); @@ -86,7 +86,7 @@ namespace Editor context_open_intent(&intent); } - static void ConvertSaveToScenarioCallback(sint32 result, const utf8 * path) + static void ConvertSaveToScenarioCallback(int32_t result, const utf8 * path) { if (result != MODAL_RESULT_OK) { @@ -174,7 +174,7 @@ namespace Editor */ static void SetAllLandOwned() { - sint32 mapSize = gMapSize; + int32_t mapSize = gMapSize; game_do_command(64, 1, 64, 2, GAME_COMMAND_SET_LAND_OWNERSHIP, (mapSize - 3) * 32, (mapSize - 3) * 32); } @@ -189,7 +189,7 @@ namespace Editor // after we have loaded a new park. window_close_all(); - uint32 extension = get_file_extension_type(path); + uint32_t extension = get_file_extension_type(path); switch (extension) { case FILE_EXTENSION_SC6: @@ -278,7 +278,7 @@ namespace Editor // { - sint32 i; + int32_t i; Ride * ride; FOR_ALL_RIDES(i, ride) { @@ -289,7 +289,7 @@ namespace Editor ride_init_all(); // - for (sint32 i = 0; i < MAX_SPRITES; i++) + for (int32_t i = 0; i < MAX_SPRITES; i++) { rct_sprite * sprite = get_sprite(i); user_string_free(sprite->unknown.name_string_idx); @@ -343,7 +343,7 @@ namespace Editor MONEY(5000000, 00) ); - gBankLoanInterestRate = Math::Clamp((uint8)5, gBankLoanInterestRate, (uint8)80); + gBankLoanInterestRate = Math::Clamp((uint8_t)5, gBankLoanInterestRate, (uint8_t)80); } climate_reset(gClimate); @@ -429,7 +429,7 @@ namespace Editor * * rct2: 0x006AB9B8 */ - sint32 CheckObjectSelection() + int32_t CheckObjectSelection() { bool isTrackDesignerManager = gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER); @@ -473,14 +473,14 @@ namespace Editor */ bool CheckPark() { - sint32 parkSize = park_calculate_size(); + int32_t parkSize = park_calculate_size(); if (parkSize == 0) { gGameCommandErrorText = STR_PARK_MUST_OWN_SOME_LAND; return false; } - for (sint32 i = 0; i < MAX_PARK_ENTRANCES; i++) + for (int32_t i = 0; i < MAX_PARK_ENTRANCES; i++) { if (gParkEntrances[i].x != LOCATION_NULL) { @@ -501,10 +501,10 @@ namespace Editor continue; } - sint32 x = parkEntrance.x; - sint32 y = parkEntrance.y; - sint32 z = parkEntrance.z / 8; - sint32 direction = parkEntrance.direction ^ 2; + int32_t x = parkEntrance.x; + int32_t y = parkEntrance.y; + int32_t z = parkEntrance.z / 8; + int32_t direction = parkEntrance.direction ^ 2; switch (footpath_is_connected_to_map_edge(x, y, z, direction, 0)) { @@ -522,7 +522,7 @@ namespace Editor } } - for (sint32 i = 0; i < MAX_PEEP_SPAWNS; i++) + for (int32_t i = 0; i < MAX_PEEP_SPAWNS; i++) { if (gPeepSpawns[i].x != PEEP_SPAWN_UNDEFINED) { @@ -540,13 +540,13 @@ namespace Editor } void GameCommandEditScenarioOptions( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { if (!(*ebx & GAME_COMMAND_FLAG_APPLY)) { @@ -757,9 +757,9 @@ namespace Editor *ebx = 0; } - uint8 GetSelectedObjectFlags(sint32 objectType, size_t index) + uint8_t GetSelectedObjectFlags(int32_t objectType, size_t index) { - uint8 result = 0; + uint8_t result = 0; auto &list = _editorSelectedObjectFlags[objectType]; if (list.size() > index) { @@ -768,7 +768,7 @@ namespace Editor return result; } - void ClearSelectedObject(sint32 objectType, size_t index, uint32 flags) + void ClearSelectedObject(int32_t objectType, size_t index, uint32_t flags) { auto &list = _editorSelectedObjectFlags[objectType]; if (list.size() <= index) @@ -778,7 +778,7 @@ namespace Editor list[index] &= ~flags; } - void SetSelectedObject(sint32 objectType, size_t index, uint32 flags) + void SetSelectedObject(int32_t objectType, size_t index, uint32_t flags) { auto &list = _editorSelectedObjectFlags[objectType]; if (list.size() <= index) @@ -794,7 +794,7 @@ void editor_open_windows_for_current_step() Editor::OpenWindowsForCurrentStep(); } -void game_command_edit_scenario_options(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp) +void game_command_edit_scenario_options(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp) { Editor::GameCommandEditScenarioOptions(eax, ebx, ecx, edx, esi, edi, ebp); } diff --git a/src/openrct2/Editor.h b/src/openrct2/Editor.h index e740672ac8..7e30708920 100644 --- a/src/openrct2/Editor.h +++ b/src/openrct2/Editor.h @@ -21,14 +21,14 @@ namespace Editor bool LoadLandscape(const utf8 *path); bool CheckPark(); - sint32 CheckObjectSelection(); + int32_t CheckObjectSelection(); void OpenWindowsForCurrentStep(); - void GameCommandEditScenarioOptions(sint32*, sint32*, sint32*, sint32*, sint32*, sint32*, sint32*); + void GameCommandEditScenarioOptions(int32_t*, int32_t*, int32_t*, int32_t*, int32_t*, int32_t*, int32_t*); - uint8 GetSelectedObjectFlags(sint32 objectType, size_t index); - void ClearSelectedObject(sint32 objectType, size_t index, uint32 flags); - void SetSelectedObject(sint32 objectType, size_t index, uint32 flags); + uint8_t GetSelectedObjectFlags(int32_t objectType, size_t index); + void ClearSelectedObject(int32_t objectType, size_t index, uint32_t flags); + void SetSelectedObject(int32_t objectType, size_t index, uint32_t flags); } // namespace Editor enum RCT2_EDITOR_STEP @@ -70,6 +70,6 @@ enum void editor_open_windows_for_current_step(); -void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); +void game_command_edit_scenario_options(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); #endif diff --git a/src/openrct2/EditorObjectSelectionSession.cpp b/src/openrct2/EditorObjectSelectionSession.cpp index 0bca5ec4b2..46d8e55b22 100644 --- a/src/openrct2/EditorObjectSelectionSession.cpp +++ b/src/openrct2/EditorObjectSelectionSession.cpp @@ -27,9 +27,9 @@ bool _maxObjectsWasHit; -std::vector _objectSelectionFlags; -sint32 _numSelectedObjectsForType[OBJECT_TYPE_COUNT]; -static sint32 _numAvailableObjectsForType[OBJECT_TYPE_COUNT]; +std::vector _objectSelectionFlags; +int32_t _numSelectedObjectsForType[OBJECT_TYPE_COUNT]; +static int32_t _numAvailableObjectsForType[OBJECT_TYPE_COUNT]; static void setup_in_use_selection_flags(); static void setup_track_designer_objects(); @@ -43,13 +43,13 @@ static void window_editor_object_selection_select_default_objects(); */ static void setup_track_manager_objects() { - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) + for (int32_t i = 0; i < numObjects; i++) { - uint8 * selectionFlags = &_objectSelectionFlags[i]; + uint8_t * selectionFlags = &_objectSelectionFlags[i]; const ObjectRepositoryItem * item = &items[i]; - uint8 object_type = object_entry_get_type(&item->ObjectEntry); + uint8_t object_type = object_entry_get_type(&item->ObjectEntry); if (object_type == OBJECT_TYPE_RIDE) { *selectionFlags |= OBJECT_SELECTION_FLAG_6; @@ -72,18 +72,18 @@ static void setup_track_manager_objects() */ static void setup_track_designer_objects() { - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) + for (int32_t i = 0; i < numObjects; i++) { - uint8 * selectionFlags = &_objectSelectionFlags[i]; + uint8_t * selectionFlags = &_objectSelectionFlags[i]; const ObjectRepositoryItem * item = &items[i]; - uint8 objectType = object_entry_get_type(&item->ObjectEntry); + uint8_t objectType = object_entry_get_type(&item->ObjectEntry); if (objectType == OBJECT_TYPE_RIDE) { *selectionFlags |= OBJECT_SELECTION_FLAG_6; - for (uint8 rideType : item->RideInfo.RideType) + for (uint8_t rideType : item->RideInfo.RideType) { if (rideType != RIDE_TYPE_NULL) { @@ -104,9 +104,9 @@ static void setup_track_designer_objects() */ void setup_in_use_selection_flags() { - for (uint8 objectType = 0; objectType < OBJECT_TYPE_COUNT; objectType++) + for (uint8_t objectType = 0; objectType < OBJECT_TYPE_COUNT; objectType++) { - for (sint32 i = 0; i < object_entry_group_counts[objectType]; i++) + for (int32_t i = 0; i < object_entry_group_counts[objectType]; i++) { Editor::ClearSelectedObject(objectType, i, OBJECT_SELECTION_FLAG_ALL); if (object_entry_get_chunk(objectType, i) != nullptr) @@ -119,7 +119,7 @@ void setup_in_use_selection_flags() tile_element_iterator iter; tile_element_iterator_begin(&iter); do { - uint16 type; + uint16_t type; rct_banner* banner; switch (iter.element->GetType()) { @@ -134,7 +134,7 @@ void setup_in_use_selection_flags() Editor::SetSelectedObject(OBJECT_TYPE_PATHS, type, OBJECT_SELECTION_FLAG_SELECTED); if (footpath_element_has_path_scenery(iter.element)) { - uint8 path_additions = footpath_element_get_path_scenery_index(iter.element); + uint8_t path_additions = footpath_element_get_path_scenery_index(iter.element); Editor::SetSelectedObject(OBJECT_TYPE_PATH_BITS, path_additions, OBJECT_SELECTION_FLAG_SELECTED); } break; @@ -175,22 +175,22 @@ void setup_in_use_selection_flags() } } while (tile_element_iterator_next(&iter)); - for (uint8 ride_index = 0; ride_index < 0xFF; ride_index++) { + for (uint8_t ride_index = 0; ride_index < 0xFF; ride_index++) { Ride* ride = get_ride(ride_index); if (ride->type != RIDE_TYPE_NULL) { - uint8 type = ride->subtype; + uint8_t type = ride->subtype; Editor::SetSelectedObject(OBJECT_TYPE_RIDE, type, OBJECT_SELECTION_FLAG_SELECTED); } } - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) { - uint8 *selectionFlags = &_objectSelectionFlags[i]; + for (int32_t i = 0; i < numObjects; i++) { + uint8_t *selectionFlags = &_objectSelectionFlags[i]; const ObjectRepositoryItem * item = &items[i]; *selectionFlags &= ~OBJECT_SELECTION_FLAG_IN_USE; - uint8 entryType, entryIndex; + uint8_t entryType, entryIndex; if (find_object_in_entry_group(&item->ObjectEntry, &entryType, &entryIndex)) { auto flags = Editor::GetSelectedObjectFlags(entryType, entryIndex); if (flags & OBJECT_SELECTION_FLAG_SELECTED) @@ -213,17 +213,17 @@ void setup_in_use_selection_flags() */ void sub_6AB211() { - sint32 numObjects = (sint32)object_repository_get_items_count(); - _objectSelectionFlags = std::vector(numObjects); + int32_t numObjects = (int32_t)object_repository_get_items_count(); + _objectSelectionFlags = std::vector(numObjects); - for (uint8 objectType = 0; objectType < OBJECT_TYPE_COUNT; objectType++) { + for (uint8_t objectType = 0; objectType < OBJECT_TYPE_COUNT; objectType++) { _numSelectedObjectsForType[objectType] = 0; _numAvailableObjectsForType[objectType] = 0; } const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) { - uint8 objectType = object_entry_get_type(&items[i].ObjectEntry); + for (int32_t i = 0; i < numObjects; i++) { + uint8_t objectType = object_entry_get_type(&items[i].ObjectEntry); _numAvailableObjectsForType[objectType]++; } @@ -266,7 +266,7 @@ void editor_object_flags_free() */ static void remove_selected_objects_from_research(const rct_object_entry* installedObject) { - uint8 entry_type, entry_index; + uint8_t entry_type, entry_index; if (!find_object_in_entry_group(installedObject, &entry_type, &entry_index)) return; @@ -298,13 +298,13 @@ static void remove_selected_objects_from_research(const rct_object_entry* instal */ void unload_unselected_objects() { - sint32 numItems = (sint32)object_repository_get_items_count(); + int32_t numItems = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); size_t numObjectsToUnload = 0; rct_object_entry * objectsToUnload = (rct_object_entry *)malloc(numItems * sizeof(rct_object_entry)); - for (sint32 i = 0; i < numItems; i++) { + for (int32_t i = 0; i < numItems; i++) { if (!(_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_SELECTED)) { const rct_object_entry * entry = &items[i].ObjectEntry; @@ -338,9 +338,9 @@ static void window_editor_object_selection_select_default_objects() */ static void window_editor_object_selection_select_required_objects() { - sint32 i; + int32_t i; - for (i = 0; i < (sint32)Util::CountOf(RequiredSelectedObjects); i++) + for (i = 0; i < (int32_t)Util::CountOf(RequiredSelectedObjects); i++) window_editor_object_selection_select_object(0, 0xF, &RequiredSelectedObjects[i]); } @@ -355,10 +355,10 @@ void reset_selected_object_count_and_size() objectType = 0; } - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) { - uint8 objectType = object_entry_get_type(&items[i].ObjectEntry); + for (int32_t i = 0; i < numObjects; i++) { + uint8_t objectType = object_entry_get_type(&items[i].ObjectEntry); if (_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_SELECTED) { _numSelectedObjectsForType[objectType]++; } @@ -370,7 +370,7 @@ void reset_selected_object_count_and_size() * optional / required dependants of an * object. */ -static void set_object_selection_error(uint8 is_master_object, rct_string_id error_msg){ +static void set_object_selection_error(uint8_t is_master_object, rct_string_id error_msg){ gGameCommandErrorText = error_msg; if (!is_master_object){ reset_selected_object_count_and_size(); @@ -381,9 +381,9 @@ static void set_object_selection_error(uint8 is_master_object, rct_string_id err * * rct2: 0x006AB54F */ -sint32 window_editor_object_selection_select_object(uint8 bh, sint32 flags, const rct_object_entry *entry) +int32_t window_editor_object_selection_select_object(uint8_t bh, int32_t flags, const rct_object_entry *entry) { - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * item = object_repository_find_object_by_entry(entry); if (item == nullptr) { set_object_selection_error(bh, STR_OBJECT_SELECTION_ERR_OBJECT_DATA_NOT_FOUND); @@ -391,15 +391,15 @@ sint32 window_editor_object_selection_select_object(uint8 bh, sint32 flags, cons } // Get repository item index - sint32 index = -1; + int32_t index = -1; const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) { + for (int32_t i = 0; i < numObjects; i++) { if (&items[i] == item) { index = i; } } - uint8 * selectionFlags = &_objectSelectionFlags[index]; + uint8_t * selectionFlags = &_objectSelectionFlags[index]; if (!(flags & 1)) { if (!(*selectionFlags & OBJECT_SELECTION_FLAG_SELECTED)) { return 1; @@ -413,7 +413,7 @@ sint32 window_editor_object_selection_select_object(uint8 bh, sint32 flags, cons return 0; } - uint8 objectType = object_entry_get_type(&item->ObjectEntry); + uint8_t objectType = object_entry_get_type(&item->ObjectEntry); if (objectType == OBJECT_TYPE_SCENERY_GROUP && (flags & (1 << 2))) { for (const auto& sgEntry : item->SceneryGroupInfo.Entries) { @@ -434,8 +434,8 @@ sint32 window_editor_object_selection_select_object(uint8 bh, sint32 flags, cons return 1; } - uint8 objectType = object_entry_get_type(&item->ObjectEntry); - uint16 maxObjects = object_entry_group_counts[objectType]; + uint8_t objectType = object_entry_get_type(&item->ObjectEntry); + uint16_t maxObjects = object_entry_group_counts[objectType]; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) { maxObjects = 4; } @@ -475,13 +475,13 @@ sint32 window_editor_object_selection_select_object(uint8 bh, sint32 flags, cons } } -bool editor_check_object_group_at_least_one_selected(sint32 checkObjectType) +bool editor_check_object_group_at_least_one_selected(int32_t checkObjectType) { - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - for (sint32 i = 0; i < numObjects; i++) { - uint8 objectType = object_entry_get_type(&items[i].ObjectEntry); + for (int32_t i = 0; i < numObjects; i++) { + uint8_t objectType = object_entry_get_type(&items[i].ObjectEntry); if (checkObjectType == objectType && (_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_SELECTED)) { return true; } @@ -489,21 +489,21 @@ bool editor_check_object_group_at_least_one_selected(sint32 checkObjectType) return false; } -sint32 editor_remove_unused_objects() +int32_t editor_remove_unused_objects() { sub_6AB211(); setup_in_use_selection_flags(); - sint32 numObjects = (sint32)object_repository_get_items_count(); + int32_t numObjects = (int32_t)object_repository_get_items_count(); const ObjectRepositoryItem * items = object_repository_get_items(); - sint32 numUnselectedObjects = 0; - for (sint32 i = 0; i < numObjects; i++) + int32_t numUnselectedObjects = 0; + for (int32_t i = 0; i < numObjects; i++) { if (!(_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_IN_USE) && !(_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_ALWAYS_REQUIRED)) { const ObjectRepositoryItem * item = &items[i]; - uint8 objectType = object_entry_get_type(&item->ObjectEntry); + uint8_t objectType = object_entry_get_type(&item->ObjectEntry); if (objectType == OBJECT_TYPE_PARK_ENTRANCE || objectType == OBJECT_TYPE_SCENARIO_TEXT || objectType == OBJECT_TYPE_WATER || objectType == OBJECT_TYPE_SCENERY_GROUP) { diff --git a/src/openrct2/EditorObjectSelectionSession.h b/src/openrct2/EditorObjectSelectionSession.h index c5851b83ac..91f6804b00 100644 --- a/src/openrct2/EditorObjectSelectionSession.h +++ b/src/openrct2/EditorObjectSelectionSession.h @@ -14,19 +14,19 @@ #include "object/Object.h" extern bool _maxObjectsWasHit; -extern std::vector _objectSelectionFlags; -extern sint32 _numSelectedObjectsForType[OBJECT_TYPE_COUNT]; +extern std::vector _objectSelectionFlags; +extern int32_t _numSelectedObjectsForType[OBJECT_TYPE_COUNT]; -bool editor_check_object_group_at_least_one_selected(sint32 objectType); +bool editor_check_object_group_at_least_one_selected(int32_t objectType); void editor_object_flags_free(); void unload_unselected_objects(); void sub_6AB211(); void reset_selected_object_count_and_size(); -sint32 window_editor_object_selection_select_object(uint8 bh, sint32 flags, const rct_object_entry *entry); +int32_t window_editor_object_selection_select_object(uint8_t bh, int32_t flags, const rct_object_entry *entry); /** * Removes all unused objects from the object selection. * @return The number of removed objects. */ -sint32 editor_remove_unused_objects(); +int32_t editor_remove_unused_objects(); diff --git a/src/openrct2/FileClassifier.cpp b/src/openrct2/FileClassifier.cpp index 1d88116cb4..e4f15f607c 100644 --- a/src/openrct2/FileClassifier.cpp +++ b/src/openrct2/FileClassifier.cpp @@ -64,7 +64,7 @@ bool TryClassifyFile(IStream * stream, ClassifiedFileInfo * result) static bool TryClassifyAsS6(IStream * stream, ClassifiedFileInfo * result) { bool success = false; - uint64 originalPosition = stream->GetPosition(); + uint64_t originalPosition = stream->GetPosition(); try { auto chunkReader = SawyerChunkReader(stream); @@ -92,17 +92,17 @@ static bool TryClassifyAsS6(IStream * stream, ClassifiedFileInfo * result) static bool TryClassifyAsS4(IStream * stream, ClassifiedFileInfo * result) { bool success = false; - uint64 originalPosition = stream->GetPosition(); + uint64_t originalPosition = stream->GetPosition(); try { size_t dataLength = (size_t)stream->GetLength(); - auto deleter_lambda = [dataLength](uint8 * ptr) { Memory::FreeArray(ptr, dataLength); }; - std::unique_ptr data(stream->ReadArray(dataLength), deleter_lambda); + auto deleter_lambda = [dataLength](uint8_t * ptr) { Memory::FreeArray(ptr, dataLength); }; + std::unique_ptr data(stream->ReadArray(dataLength), deleter_lambda); stream->SetPosition(originalPosition); - sint32 fileTypeVersion = sawyercoding_detect_file_type(data.get(), dataLength); + int32_t fileTypeVersion = sawyercoding_detect_file_type(data.get(), dataLength); - sint32 type = fileTypeVersion & FILE_TYPE_MASK; - sint32 version = fileTypeVersion & FILE_VERSION_MASK; + int32_t type = fileTypeVersion & FILE_TYPE_MASK; + int32_t version = fileTypeVersion & FILE_VERSION_MASK; if (type == FILE_TYPE_SV4) { @@ -129,21 +129,21 @@ static bool TryClassifyAsS4(IStream * stream, ClassifiedFileInfo * result) static bool TryClassifyAsTD4_TD6(IStream * stream, ClassifiedFileInfo * result) { bool success = false; - uint64 originalPosition = stream->GetPosition(); + uint64_t originalPosition = stream->GetPosition(); try { size_t dataLength = (size_t)stream->GetLength(); - auto deleter_lambda = [dataLength](uint8 * ptr) { Memory::FreeArray(ptr, dataLength); }; - std::unique_ptr data(stream->ReadArray(dataLength), deleter_lambda); + auto deleter_lambda = [dataLength](uint8_t * ptr) { Memory::FreeArray(ptr, dataLength); }; + std::unique_ptr data(stream->ReadArray(dataLength), deleter_lambda); stream->SetPosition(originalPosition); if (sawyercoding_validate_track_checksum(data.get(), dataLength)) { - std::unique_ptr)> td6data(Memory::Allocate(0x10000), &Memory::Free); + std::unique_ptr)> td6data(Memory::Allocate(0x10000), &Memory::Free); size_t td6len = sawyercoding_decode_td6(data.get(), td6data.get(), dataLength); if (td6data != nullptr && td6len >= 8) { - uint8 version = (td6data.get()[7] >> 2) & 3; + uint8_t version = (td6data.get()[7] >> 2) & 3; if (version <= 2) { result->Type = FILE_TYPE::TRACK_DESIGN; @@ -161,7 +161,7 @@ static bool TryClassifyAsTD4_TD6(IStream * stream, ClassifiedFileInfo * result) return success; } -uint32 get_file_extension_type(const utf8 * path) +uint32_t get_file_extension_type(const utf8 * path) { auto extension = Path::GetExtension(path); if (String::Equals(extension, ".dat", true)) return FILE_EXTENSION_DAT; diff --git a/src/openrct2/FileClassifier.h b/src/openrct2/FileClassifier.h index 33c6eb519b..1e00626a20 100644 --- a/src/openrct2/FileClassifier.h +++ b/src/openrct2/FileClassifier.h @@ -39,11 +39,11 @@ enum class FILE_TYPE struct ClassifiedFileInfo { FILE_TYPE Type = FILE_TYPE::UNDEFINED; - uint32 Version = 0; + uint32_t Version = 0; }; #define FILE_TYPE_S4_CUTOFF 2 bool TryClassifyFile(const std::string &path, ClassifiedFileInfo * result); bool TryClassifyFile(IStream * stream, ClassifiedFileInfo * result); -uint32 get_file_extension_type(const utf8 * path); +uint32_t get_file_extension_type(const utf8 * path); diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 2da8325265..e608ce043d 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -63,22 +63,22 @@ #define NUMBER_OF_AUTOSAVES_TO_KEEP 9 -uint16 gTicksSinceLastUpdate; -uint8 gGamePaused = 0; -sint32 gGameSpeed = 1; +uint16_t gTicksSinceLastUpdate; +uint8_t gGamePaused = 0; +int32_t gGameSpeed = 1; float gDayNightCycle = 0; bool gInUpdateCode = false; bool gInMapInitCode = false; -sint32 gGameCommandNestLevel; +int32_t gGameCommandNestLevel; bool gGameCommandIsNetworked; char gCurrentLoadedPath[MAX_PATH]; bool gLoadKeepWindowsOpen = false; -uint8 gUnk13CA740; -uint8 gUnk141F568; +uint8_t gUnk13CA740; +uint8_t gUnk141F568; -uint32 gCurrentTicks; +uint32_t gCurrentTicks; // clang-format off GAME_COMMAND_CALLBACK_POINTER * game_command_callback = nullptr; @@ -95,18 +95,18 @@ static GAME_COMMAND_CALLBACK_POINTER * const game_command_callback_table[] = { game_command_callback_pickup_staff }; // clang-format on -sint32 game_command_playerid = -1; +int32_t game_command_playerid = -1; rct_string_id gGameCommandErrorTitle; rct_string_id gGameCommandErrorText; -uint8 gErrorType; +uint8_t gErrorType; rct_string_id gErrorStringId; using namespace OpenRCT2; -sint32 game_command_callback_get_index(GAME_COMMAND_CALLBACK_POINTER * callback) +int32_t game_command_callback_get_index(GAME_COMMAND_CALLBACK_POINTER * callback) { - for (uint32 i = 0; i < Util::CountOf(game_command_callback_table); i++) + for (uint32_t i = 0; i < Util::CountOf(game_command_callback_table); i++) { if (game_command_callback_table[i] == callback) { @@ -116,7 +116,7 @@ sint32 game_command_callback_get_index(GAME_COMMAND_CALLBACK_POINTER * callback) return 0; } -GAME_COMMAND_CALLBACK_POINTER * game_command_callback_get_callback(uint32 index) +GAME_COMMAND_CALLBACK_POINTER * game_command_callback_get_callback(uint32_t index) { if (index < Util::CountOf(game_command_callback_table)) { @@ -178,7 +178,7 @@ void update_palette_effects() if (gClimateLightningFlash == 1) { // Change palette to lighter colour during lightning - sint32 palette = SPR_GAME_PALETTE_DEFAULT; + int32_t palette = SPR_GAME_PALETTE_DEFAULT; if (water_type != nullptr) { @@ -187,10 +187,10 @@ void update_palette_effects() const rct_g1_element * g1 = gfx_get_g1_element(palette); if (g1 != nullptr) { - sint32 xoffset = g1->x_offset; + int32_t xoffset = g1->x_offset; xoffset = xoffset * 4; - uint8 * paletteOffset = gGamePalette + xoffset; - for (sint32 i = 0; i < g1->width; i++) + uint8_t * paletteOffset = gGamePalette + xoffset; + for (int32_t i = 0; i < g1->width; i++) { paletteOffset[(i * 4) + 0] = -((0xFF - g1->offset[(i * 3) + 0]) / 2) - 1; paletteOffset[(i * 4) + 1] = -((0xFF - g1->offset[(i * 3) + 1]) / 2) - 1; @@ -205,7 +205,7 @@ void update_palette_effects() if (gClimateLightningFlash == 2) { // Change palette back to normal after lightning - sint32 palette = SPR_GAME_PALETTE_DEFAULT; + int32_t palette = SPR_GAME_PALETTE_DEFAULT; if (water_type != nullptr) { @@ -215,10 +215,10 @@ void update_palette_effects() const rct_g1_element * g1 = gfx_get_g1_element(palette); if (g1 != nullptr) { - sint32 xoffset = g1->x_offset; + int32_t xoffset = g1->x_offset; xoffset = xoffset * 4; - uint8 * paletteOffset = gGamePalette + xoffset; - for (sint32 i = 0; i < g1->width; i++) + uint8_t * paletteOffset = gGamePalette + xoffset; + for (int32_t i = 0; i < g1->width; i++) { paletteOffset[(i * 4) + 0] = g1->offset[(i * 3) + 0]; paletteOffset[(i * 4) + 1] = g1->offset[(i * 3) + 1]; @@ -228,7 +228,7 @@ void update_palette_effects() } // Animate the water/lava/chain movement palette - uint32 shade = 0; + uint32_t shade = 0; if (gConfigGeneral.render_weather_gloom) { auto paletteId = climate_get_weather_gloom_palette_id(gClimateCurrent); @@ -241,9 +241,9 @@ void update_palette_effects() } } } - uint32 j = gPaletteEffectFrame; - j = (((uint16) ((~j / 2) * 128) * 15) >> 16); - uint32 waterId = SPR_GAME_PALETTE_WATER; + uint32_t j = gPaletteEffectFrame; + j = (((uint16_t) ((~j / 2) * 128) * 15) >> 16); + uint32_t waterId = SPR_GAME_PALETTE_WATER; if (water_type != nullptr) { waterId = water_type->palette_index_1; @@ -251,10 +251,10 @@ void update_palette_effects() const rct_g1_element * g1 = gfx_get_g1_element(shade + waterId); if (g1 != nullptr) { - uint8 * vs = &g1->offset[j * 3]; - uint8 * vd = &gGamePalette[230 * 4]; - sint32 n = 5; - for (sint32 i = 0; i < n; i++) + uint8_t * vs = &g1->offset[j * 3]; + uint8_t * vd = &gGamePalette[230 * 4]; + int32_t n = 5; + for (int32_t i = 0; i < n; i++) { vd[0] = vs[0]; vd[1] = vs[1]; @@ -276,10 +276,10 @@ void update_palette_effects() g1 = gfx_get_g1_element(shade + waterId); if (g1 != nullptr) { - uint8 * vs = &g1->offset[j * 3]; - uint8 * vd = &gGamePalette[235 * 4]; - sint32 n = 5; - for (sint32 i = 0; i < n; i++) + uint8_t * vs = &g1->offset[j * 3]; + uint8_t * vd = &gGamePalette[235 * 4]; + int32_t n = 5; + for (int32_t i = 0; i < n; i++) { vd[0] = vs[0]; vd[1] = vs[1]; @@ -293,15 +293,15 @@ void update_palette_effects() } } - j = ((uint16) (gPaletteEffectFrame * -960) * 3) >> 16; + j = ((uint16_t) (gPaletteEffectFrame * -960) * 3) >> 16; waterId = SPR_GAME_PALETTE_4; g1 = gfx_get_g1_element(shade + waterId); if (g1 != nullptr) { - uint8 * vs = &g1->offset[j * 3]; - uint8 * vd = &gGamePalette[243 * 4]; - sint32 n = 3; - for (sint32 i = 0; i < n; i++) + uint8_t * vs = &g1->offset[j * 3]; + uint8_t * vd = &gGamePalette[243 * 4]; + int32_t n = 3; + for (int32_t i = 0; i < n; i++) { vd[0] = vs[0]; vd[1] = vs[1]; @@ -329,7 +329,7 @@ void update_palette_effects() * * @param cost (ebp) */ -static sint32 game_check_affordability(sint32 cost) +static int32_t game_check_affordability(int32_t cost) { if (cost <= 0) return cost; @@ -338,7 +338,7 @@ static sint32 game_check_affordability(sint32 cost) if (cost <= gCash) return cost; - set_format_arg(0, uint32, cost); + set_format_arg(0, uint32_t, cost); gGameCommandErrorText = STR_NOT_ENOUGH_CASH_REQUIRES; return MONEY32_UNDEFINED; @@ -351,7 +351,7 @@ static sint32 game_check_affordability(sint32 cost) * @param ebx flags * @param esi command */ -sint32 game_do_command(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp) +int32_t game_do_command(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp) { return game_do_command_p(esi, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); } @@ -363,10 +363,10 @@ sint32 game_do_command(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 es * @param ebx flags * @param esi command */ -sint32 game_do_command_p(uint32 command, sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp) +int32_t game_do_command_p(uint32_t command, int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp) { - sint32 cost, flags; - sint32 original_ebx, original_edx, original_esi, original_edi, original_ebp; + int32_t cost, flags; + int32_t original_ebx, original_edx, original_esi, original_edi, original_ebp; *esi = command; original_ebx = *ebx; @@ -424,7 +424,7 @@ sint32 game_do_command_p(uint32 command, sint32 * eax, sint32 * ebx, sint32 * ec if (cost != MONEY32_UNDEFINED) { // Check funds - sint32 insufficientFunds = 0; + int32_t insufficientFunds = 0; if (gGameCommandNestLevel == 1 && !(flags & GAME_COMMAND_FLAG_2) && !(flags & GAME_COMMAND_FLAG_5) && cost != 0) insufficientFunds = game_check_affordability(cost); @@ -704,7 +704,7 @@ void game_log_multiplayer_command(int command, const int * eax, const int * ebx, else if (command == GAME_COMMAND_PLACE_SCENERY || command == GAME_COMMAND_PLACE_WALL || command == GAME_COMMAND_PLACE_LARGE_SCENERY || command == GAME_COMMAND_PLACE_BANNER) { - uint8 flags = *ebx & 0xFF; + uint8_t flags = *ebx & 0xFF; if (flags & GAME_COMMAND_FLAG_GHOST) { // Don't log ghost previews being removed @@ -722,7 +722,7 @@ void game_log_multiplayer_command(int command, const int * eax, const int * ebx, else if (command == GAME_COMMAND_REMOVE_SCENERY || command == GAME_COMMAND_REMOVE_WALL || command == GAME_COMMAND_REMOVE_LARGE_SCENERY || command == GAME_COMMAND_REMOVE_BANNER) { - uint8 flags = *ebx & 0xFF; + uint8_t flags = *ebx & 0xFF; if (flags & GAME_COMMAND_FLAG_GHOST) { // Don't log ghost previews being removed @@ -760,7 +760,7 @@ void game_log_multiplayer_command(int command, const int * eax, const int * ebx, if (nameChunkOffset < 0) nameChunkOffset = 2; nameChunkOffset *= 12; - nameChunkOffset = std::min(nameChunkOffset, (sint32) (Util::CountOf(banner_name) - 12)); + nameChunkOffset = std::min(nameChunkOffset, (int32_t) (Util::CountOf(banner_name) - 12)); memcpy(banner_name + nameChunkOffset + 0, edx, 4); memcpy(banner_name + nameChunkOffset + 4, ebp, 4); memcpy(banner_name + nameChunkOffset + 8, edi, 4); @@ -835,13 +835,13 @@ bool game_is_not_paused() * rct2: 0x00667C15 */ void game_pause_toggle( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { if (*ebx & GAME_COMMAND_FLAG_APPLY) pause_toggle(); @@ -854,13 +854,13 @@ void game_pause_toggle( * rct2: 0x0066DB5F */ static void game_load_or_quit( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { if (*ebx & GAME_COMMAND_FLAG_APPLY) { @@ -901,7 +901,7 @@ void utf8_to_rct2_self(char * buffer, size_t length) char * dst = buffer; while (*src != 0 && i < length - 1) { - if (*src == (char) (uint8) 0xFF) + if (*src == (char) (uint8_t) 0xFF) { if (i < length - 3) { @@ -965,7 +965,7 @@ void game_convert_strings_to_utf8() void game_convert_news_items_to_utf8() { - for (sint32 i = 0; i < MAX_NEWS_ITEMS; i++) + for (int32_t i = 0; i < MAX_NEWS_ITEMS; i++) { NewsItem * newsItem = news_item_get(i); @@ -1011,8 +1011,8 @@ void game_fix_save_vars() { // Recalculates peep count after loading a save to fix corrupted files rct_peep * peep; - uint16 spriteIndex; - uint16 peepCount = 0; + uint16_t spriteIndex; + uint16_t peepCount = 0; FOR_ALL_GUESTS(spriteIndex, peep) { if (!peep->outside_of_park) @@ -1031,18 +1031,18 @@ void game_fix_save_vars() { if (peep->current_ride_station >= MAX_STATIONS) { - const uint8 srcStation = peep->current_ride_station; - const uint8 rideIdx = peep->current_ride; + const uint8_t srcStation = peep->current_ride_station; + const uint8_t rideIdx = peep->current_ride; if (rideIdx == RIDE_ID_NULL) { continue; } - set_format_arg(0, uint32, peep->id); + set_format_arg(0, uint32_t, peep->id); utf8 * curName = gCommonStringFormatBuffer; rct_string_id curId = peep->name_string_idx; format_string(curName, 256, curId, gCommonFormatArgs); log_warning("Peep %u (%s) has invalid ride station = %u for ride %u.", spriteIndex, curName, srcStation, rideIdx); - sint8 station = ride_get_first_valid_station_exit(get_ride(rideIdx)); + int8_t station = ride_get_first_valid_station_exit(get_ride(rideIdx)); if (station == -1) { log_warning("Couldn't find station, removing peep %u", spriteIndex); @@ -1067,9 +1067,9 @@ void game_fix_save_vars() // Fixes broken saves where a surface element could be null // and broken saves with incorrect invisible map border tiles - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { rct_tile_element * tileElement = map_get_surface_element_at(x, y); @@ -1214,7 +1214,7 @@ void save_game_as() delete intent; } -static sint32 compare_autosave_file_paths(const void * a, const void * b) +static int32_t compare_autosave_file_paths(const void * a, const void * b) { return strcmp(*(char **) a, *(char **) b); } @@ -1304,7 +1304,7 @@ void game_autosave() { const char * subDirectory = "save"; const char * fileExtension = ".sv6"; - uint32 saveFlags = 0x80000000; + uint32_t saveFlags = 0x80000000; if (gScreenFlags & SCREEN_FLAGS_EDITOR) { subDirectory = "landscape"; @@ -1344,7 +1344,7 @@ void game_autosave() scenario_save(path, saveFlags); } -static void game_load_or_quit_no_save_prompt_callback(sint32 result, const utf8 * path) +static void game_load_or_quit_no_save_prompt_callback(int32_t result, const utf8 * path) { if (result == MODAL_RESULT_OK) { diff --git a/src/openrct2/Game.h b/src/openrct2/Game.h index 9bb1c1588e..f50b1da765 100644 --- a/src/openrct2/Game.h +++ b/src/openrct2/Game.h @@ -92,7 +92,7 @@ enum GAME_COMMAND GAME_COMMAND_COUNT }; -enum : uint32 +enum : uint32_t { GAME_COMMAND_FLAG_APPLY = (1 << 0), // If this flag is set, the command is applied, otherwise only the cost is retrieved GAME_COMMAND_FLAG_2 = (1 << 2), @@ -118,37 +118,37 @@ enum ERROR_TYPE_FILE_LOAD = 255 }; -using GAME_COMMAND_POINTER = void(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -using GAME_COMMAND_CALLBACK_POINTER = void(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); +using GAME_COMMAND_POINTER = void(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +using GAME_COMMAND_CALLBACK_POINTER = void(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); extern GAME_COMMAND_CALLBACK_POINTER * game_command_callback; -sint32 game_command_callback_get_index(GAME_COMMAND_CALLBACK_POINTER * callback); -GAME_COMMAND_CALLBACK_POINTER * game_command_callback_get_callback(uint32 index); -extern sint32 game_command_playerid; +int32_t game_command_callback_get_index(GAME_COMMAND_CALLBACK_POINTER * callback); +GAME_COMMAND_CALLBACK_POINTER * game_command_callback_get_callback(uint32_t index); +extern int32_t game_command_playerid; extern rct_string_id gGameCommandErrorTitle; extern rct_string_id gGameCommandErrorText; -extern uint8 gErrorType; +extern uint8_t gErrorType; extern rct_string_id gErrorStringId; extern GAME_COMMAND_POINTER * new_game_command_table[GAME_COMMAND_COUNT]; -extern uint32 gCurrentTicks; +extern uint32_t gCurrentTicks; -extern uint16 gTicksSinceLastUpdate; -extern uint8 gGamePaused; -extern sint32 gGameSpeed; +extern uint16_t gTicksSinceLastUpdate; +extern uint8_t gGamePaused; +extern int32_t gGameSpeed; extern float gDayNightCycle; extern bool gInUpdateCode; extern bool gInMapInitCode; -extern sint32 gGameCommandNestLevel; +extern int32_t gGameCommandNestLevel; extern bool gGameCommandIsNetworked; extern char gCurrentLoadedPath[260]; extern bool gLoadKeepWindowsOpen; -extern uint8 gUnk13CA740; -extern uint8 gUnk141F568; +extern uint8_t gUnk13CA740; +extern uint8_t gUnk141F568; void game_increase_game_speed(); void game_reduce_game_speed(); @@ -157,15 +157,15 @@ void game_create_windows(); void reset_all_sprite_quadrant_placements(); void update_palette_effects(); -sint32 game_do_command(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); -sint32 game_do_command_p(uint32 command, sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); +int32_t game_do_command(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +int32_t game_do_command_p(uint32_t command, int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); void game_log_multiplayer_command(int command, const int * eax, const int * ebx, const int * ecx, int * edx, int * edi, int * ebp); void game_load_or_quit_no_save_prompt(); void load_from_sv6(const char * path); void game_load_init(); -void game_pause_toggle(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); +void game_pause_toggle(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); void pause_toggle(); bool game_is_paused(); bool game_is_not_paused(); diff --git a/src/openrct2/GameState.cpp b/src/openrct2/GameState.cpp index 811ecbc43b..e7a6eff1ae 100644 --- a/src/openrct2/GameState.cpp +++ b/src/openrct2/GameState.cpp @@ -39,7 +39,7 @@ GameState::GameState() /** * Initialises the map, park etc. basically all S6 data. */ -void GameState::InitAll(sint32 mapSize) +void GameState::InitAll(int32_t mapSize) { gInMapInitCode = true; @@ -73,7 +73,7 @@ void GameState::Update() { gInUpdateCode = true; - uint32 numUpdates; + uint32_t numUpdates; // 0x006E3AEC // screen_game_process_mouse_input(); screenshot_check(); @@ -96,7 +96,7 @@ void GameState::Update() else { numUpdates = gTicksSinceLastUpdate / GAME_UPDATE_TIME_MS; - numUpdates = Math::Clamp(1, numUpdates, GAME_MAX_UPDATES); + numUpdates = Math::Clamp(1, numUpdates, GAME_MAX_UPDATES); } if (network_get_mode() == NETWORK_MODE_CLIENT && network_get_status() == NETWORK_STATUS_CONNECTED && network_get_authstatus() == NETWORK_AUTH_OK) @@ -122,7 +122,7 @@ void GameState::Update() } // Update the game one or more times - for (uint32 i = 0; i < numUpdates; i++) + for (uint32_t i = 0; i < numUpdates; i++) { UpdateLogic(); if (gGameSpeed == 1) diff --git a/src/openrct2/GameState.h b/src/openrct2/GameState.h index bf1c83886e..59c5eeea6e 100644 --- a/src/openrct2/GameState.h +++ b/src/openrct2/GameState.h @@ -32,7 +32,7 @@ namespace OpenRCT2 Date& GetDate() { return _date; } Park& GetPark() { return *_park; } - void InitAll(sint32 mapSize); + void InitAll(int32_t mapSize); void Update(); void UpdateLogic(); }; diff --git a/src/openrct2/Input.cpp b/src/openrct2/Input.cpp index efc6265151..ca439c185a 100644 --- a/src/openrct2/Input.cpp +++ b/src/openrct2/Input.cpp @@ -11,13 +11,13 @@ #include "Input.h" INPUT_STATE _inputState; -uint8 _inputFlags; -uint8 gInputPlaceObjectModifier; +uint8_t _inputFlags; +uint8_t gInputPlaceObjectModifier; widget_ref gHoverWidget; widget_ref gPressedWidget; -uint16 _tooltipNotShownTicks; +uint16_t _tooltipNotShownTicks; TOOL_IDX gCurrentToolId; widget_ref gCurrentToolWidget; diff --git a/src/openrct2/Input.h b/src/openrct2/Input.h index 183601a2aa..49e8f60eb2 100644 --- a/src/openrct2/Input.h +++ b/src/openrct2/Input.h @@ -69,36 +69,36 @@ struct widget_ref { rct_widgetindex widget_index; }; -extern uint8 gInputPlaceObjectModifier; +extern uint8_t gInputPlaceObjectModifier; -extern sint32 gInputDragLastX; -extern sint32 gInputDragLastY; +extern int32_t gInputDragLastX; +extern int32_t gInputDragLastY; extern widget_ref gHoverWidget; extern widget_ref gPressedWidget; -extern uint16 gTooltipTimeout; +extern uint16_t gTooltipTimeout; extern widget_ref gTooltipWidget; -extern sint32 gTooltipCursorX; -extern sint32 gTooltipCursorY; +extern int32_t gTooltipCursorX; +extern int32_t gTooltipCursorY; extern TOOL_IDX gCurrentToolId; extern widget_ref gCurrentToolWidget; // TODO: Move to openrct2-ui and make static again extern INPUT_STATE _inputState; -extern uint8 _inputFlags; -extern uint16 _tooltipNotShownTicks; +extern uint8_t _inputFlags; +extern uint16_t _tooltipNotShownTicks; -void input_window_position_begin(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +void input_window_position_begin(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y); void title_handle_keyboard_input(); void game_handle_input(); void game_handle_keyboard_input(); void game_handle_edge_scroll(); -sint32 get_next_key(); +int32_t get_next_key(); -void store_mouse_input(sint32 state, sint32 x, sint32 y); +void store_mouse_input(int32_t state, int32_t x, int32_t y); void input_set_flag(INPUT_FLAGS flag, bool on); bool input_test_flag(INPUT_FLAGS flag); @@ -113,6 +113,6 @@ void reset_tooltip_not_shown(); void input_reset_place_obj_modifier(); -void input_scroll_viewport(sint32 scrollX, sint32 scrollY); +void input_scroll_viewport(int32_t scrollX, int32_t scrollY); #endif diff --git a/src/openrct2/Intro.cpp b/src/openrct2/Intro.cpp index 429dda6a18..602c4cceec 100644 --- a/src/openrct2/Intro.cpp +++ b/src/openrct2/Intro.cpp @@ -21,10 +21,10 @@ #define PALETTE_G1_IDX_DEVELOPER 23217 #define PALETTE_G1_IDX_LOGO 23224 -uint8 gIntroState; +uint8_t gIntroState; // Used mainly for timing but also for Y coordinate and fading. -static sint32 _introStateCounter; +static int32_t _introStateCounter; static void *_soundChannel = nullptr; static bool _chainLiftFinished; @@ -151,7 +151,7 @@ void intro_update() void intro_draw(rct_drawpixelinfo *dpi) { - sint32 screenWidth = context_get_width(); + int32_t screenWidth = context_get_width(); switch (gIntroState) { case INTRO_STATE_DISCLAIMER_1: @@ -224,7 +224,7 @@ static void screen_intro_process_mouse_input() */ static void screen_intro_process_keyboard_input() { - const uint8 * keys = context_get_keys_state(); + const uint8_t * keys = context_get_keys_state(); for (int i = 0; i < 256; i++) { if (keys[i] != 0) { screen_intro_skip_part(); @@ -249,9 +249,9 @@ static void screen_intro_skip_part() static void screen_intro_draw_logo(rct_drawpixelinfo *dpi) { - sint32 screenWidth = context_get_width(); - sint32 imageWidth = 640; - sint32 imageX = (screenWidth - imageWidth) / 2; + int32_t screenWidth = context_get_width(); + int32_t imageWidth = 640; + int32_t imageX = (screenWidth - imageWidth) / 2; drawing_engine_invalidate_image(SPR_INTRO_LOGO_00); drawing_engine_invalidate_image(SPR_INTRO_LOGO_10); diff --git a/src/openrct2/Intro.h b/src/openrct2/Intro.h index 6a57e97742..db2965f30d 100644 --- a/src/openrct2/Intro.h +++ b/src/openrct2/Intro.h @@ -29,7 +29,7 @@ enum INTRO_STATE { INTRO_STATE_FINISH = 255, }; -extern uint8 gIntroState; +extern uint8_t gIntroState; void intro_update(); void intro_draw(rct_drawpixelinfo *dpi); diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index 3b62295f30..746a3a8ea6 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -9,8 +9,8 @@ #include "OpenRCT2.h" -sint32 gExitCode; -sint32 gOpenRCT2StartupAction = STARTUP_ACTION_TITLE; +int32_t gExitCode; +int32_t gOpenRCT2StartupAction = STARTUP_ACTION_TITLE; utf8 gOpenRCT2StartupActionPath[512] = { 0 }; utf8 gExePath[MAX_PATH]; utf8 gCustomUserDataPath[MAX_PATH] = { 0 }; @@ -24,7 +24,7 @@ bool gOpenRCT2NoGraphics = false; bool gOpenRCT2ShowChangelog; bool gOpenRCT2SilentBreakpad; -uint32 gCurrentDrawCount = 0; -uint8 gScreenFlags; -uint32 gScreenAge; -uint8 gSavePromptMode; +uint32_t gCurrentDrawCount = 0; +uint8_t gScreenFlags; +uint32_t gScreenAge; +uint8_t gSavePromptMode; diff --git a/src/openrct2/OpenRCT2.h b/src/openrct2/OpenRCT2.h index 59b13be043..f8cc766117 100644 --- a/src/openrct2/OpenRCT2.h +++ b/src/openrct2/OpenRCT2.h @@ -33,9 +33,9 @@ enum }; /** The exit code for OpenRCT2 when it exits. */ -extern sint32 gExitCode; +extern int32_t gExitCode; -extern sint32 gOpenRCT2StartupAction; +extern int32_t gOpenRCT2StartupAction; extern utf8 gOpenRCT2StartupActionPath[512]; extern utf8 gExePath[MAX_PATH]; extern utf8 gCustomUserDataPath[MAX_PATH]; @@ -48,19 +48,19 @@ extern bool gOpenRCT2ShowChangelog; extern bool gOpenRCT2SilentBreakpad; #ifndef DISABLE_NETWORK -extern sint32 gNetworkStart; +extern int32_t gNetworkStart; extern char gNetworkStartHost[128]; -extern sint32 gNetworkStartPort; +extern int32_t gNetworkStartPort; extern char* gNetworkStartAddress; #endif -extern uint32 gCurrentDrawCount; -extern uint8 gScreenFlags; -extern uint32 gScreenAge; -extern uint8 gSavePromptMode; +extern uint32_t gCurrentDrawCount; +extern uint8_t gScreenFlags; +extern uint32_t gScreenAge; +extern uint8_t gSavePromptMode; void openrct2_write_full_version_info(utf8 * buffer, size_t bufferSize); void openrct2_finish(); -sint32 cmdline_run(const char * * argv, sint32 argc); +int32_t cmdline_run(const char * * argv, int32_t argc); diff --git a/src/openrct2/ParkImporter.h b/src/openrct2/ParkImporter.h index 904bf7dfbc..4d5b41f7c4 100644 --- a/src/openrct2/ParkImporter.h +++ b/src/openrct2/ParkImporter.h @@ -87,9 +87,9 @@ public: class UnsupportedRCTCFlagException : public std::exception { public: - uint8 const Flag; + uint8_t const Flag; - explicit UnsupportedRCTCFlagException(uint8 flag) + explicit UnsupportedRCTCFlagException(uint8_t flag) : Flag(flag) { } diff --git a/src/openrct2/PlatformEnvironment.cpp b/src/openrct2/PlatformEnvironment.cpp index fa40f35dbb..adbce7523a 100644 --- a/src/openrct2/PlatformEnvironment.cpp +++ b/src/openrct2/PlatformEnvironment.cpp @@ -25,7 +25,7 @@ private: public: explicit PlatformEnvironment(DIRBASE_VALUES basePaths) { - for (sint32 i = 0; i < DIRBASE_COUNT; i++) + for (int32_t i = 0; i < DIRBASE_COUNT; i++) { _basePath[i] = basePaths[i]; } diff --git a/src/openrct2/PlatformEnvironment.h b/src/openrct2/PlatformEnvironment.h index c7a00ad71e..96b7fa2296 100644 --- a/src/openrct2/PlatformEnvironment.h +++ b/src/openrct2/PlatformEnvironment.h @@ -15,7 +15,7 @@ namespace OpenRCT2 { - enum class DIRBASE : sint32 + enum class DIRBASE : int32_t { RCT1, // Base directory for original RollerCoaster Tycoon 1 content. RCT2, // Base directory for original RollerCoaster Tycoon 2 content. @@ -25,7 +25,7 @@ namespace OpenRCT2 CACHE, // Base directory for OpenRCT2 cache files. DOCUMENTATION, // Base directory for OpenRCT2 doc files. }; - constexpr sint32 DIRBASE_COUNT = 7; + constexpr int32_t DIRBASE_COUNT = 7; using DIRBASE_VALUES = std::string[DIRBASE_COUNT]; enum class DIRID diff --git a/src/openrct2/actions/BannerSetNameAction.hpp b/src/openrct2/actions/BannerSetNameAction.hpp index 920bb57ac2..2e956dc35f 100644 --- a/src/openrct2/actions/BannerSetNameAction.hpp +++ b/src/openrct2/actions/BannerSetNameAction.hpp @@ -34,7 +34,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index e706743b12..4badfcfb05 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -33,7 +33,7 @@ GameActionResult::GameActionResult(GA_ERROR error, rct_string_id title, rct_stri ErrorMessage = message; } -GameActionResult::GameActionResult(GA_ERROR error, rct_string_id title, rct_string_id message, uint8 * args) +GameActionResult::GameActionResult(GA_ERROR error, rct_string_id title, rct_string_id message, uint8_t * args) { Error = error; ErrorTitle = title; @@ -45,7 +45,7 @@ namespace GameActions { static GameActionFactory _actions[GAME_COMMAND_COUNT]; - GameActionFactory Register(uint32 id, GameActionFactory factory) + GameActionFactory Register(uint32_t id, GameActionFactory factory) { Guard::Assert(id < Util::CountOf(_actions)); Guard::ArgumentNotNull(factory); @@ -65,7 +65,7 @@ namespace GameActions initialized = true; } - std::unique_ptr Create(uint32 id) + std::unique_ptr Create(uint32_t id) { Initialize(); @@ -82,7 +82,7 @@ namespace GameActions return std::unique_ptr(result); } - static bool CheckActionInPausedMode(uint32 actionFlags) + static bool CheckActionInPausedMode(uint32_t actionFlags) { if (gGamePaused == 0) return true; if (gCheatsBuildInPauseMode) return true; @@ -102,7 +102,7 @@ namespace GameActions { Guard::ArgumentNotNull(action); - uint16 actionFlags = action->GetActionFlags(); + uint16_t actionFlags = action->GetActionFlags(); if (!CheckActionInPausedMode(actionFlags)) { GameActionResult::Ptr result = std::make_unique(); @@ -125,7 +125,7 @@ namespace GameActions { result->Error = GA_ERROR::INSUFFICIENT_FUNDS; result->ErrorMessage = STR_NOT_ENOUGH_CASH_REQUIRES; - set_format_arg_on(result->ErrorMessageArgs.data(), 0, uint32, result->Cost); + set_format_arg_on(result->ErrorMessageArgs.data(), 0, uint32_t, result->Cost); } } return result; @@ -135,8 +135,8 @@ namespace GameActions { Guard::ArgumentNotNull(action); - uint16 actionFlags = action->GetActionFlags(); - uint32 flags = action->GetFlags(); + uint16_t actionFlags = action->GetActionFlags(); + uint32_t flags = action->GetFlags(); GameActionResult::Ptr result = Query(action); if (result->Error == GA_ERROR::OK) @@ -190,7 +190,7 @@ namespace GameActions { if (network_get_mode() == NETWORK_MODE_SERVER && result->Error == GA_ERROR::OK) { - uint32 playerId = action->GetPlayer(); + uint32_t playerId = action->GetPlayer(); network_set_player_last_action(network_get_player_index(playerId), action->GetType()); if (result->Cost != 0) diff --git a/src/openrct2/actions/GameAction.h b/src/openrct2/actions/GameAction.h index cc31ecbaa4..e77de206bd 100644 --- a/src/openrct2/actions/GameAction.h +++ b/src/openrct2/actions/GameAction.h @@ -25,7 +25,7 @@ /** * Common error codes for game actions. */ -enum class GA_ERROR : uint16 +enum class GA_ERROR : uint16_t { OK, INVALID_PARAMETERS, @@ -47,9 +47,9 @@ enum class GA_ERROR : uint16 namespace GA_FLAGS { - constexpr uint16 ALLOW_WHILE_PAUSED = 1 << 0; - constexpr uint16 CLIENT_ONLY = 1 << 1; - constexpr uint16 EDITOR_ONLY = 1 << 2; + constexpr uint16_t ALLOW_WHILE_PAUSED = 1 << 0; + constexpr uint16_t CLIENT_ONLY = 1 << 1; + constexpr uint16_t EDITOR_ONLY = 1 << 2; } #ifdef __WARN_SUGGEST_FINAL_METHODS__ @@ -69,15 +69,15 @@ public: GA_ERROR Error = GA_ERROR::OK; rct_string_id ErrorTitle = STR_NONE; rct_string_id ErrorMessage = STR_NONE; - std::array ErrorMessageArgs; + std::array ErrorMessageArgs; CoordsXYZ Position = {}; money32 Cost = 0; - uint16 ExpenditureType = 0; + uint16_t ExpenditureType = 0; GameActionResult() = default; GameActionResult(GA_ERROR error, rct_string_id message); GameActionResult(GA_ERROR error, rct_string_id title, rct_string_id message); - GameActionResult(GA_ERROR error, rct_string_id title, rct_string_id message, uint8 * args); + GameActionResult(GA_ERROR error, rct_string_id title, rct_string_id message, uint8_t * args); GameActionResult(const GameActionResult&) = delete; virtual ~GameActionResult() {}; }; @@ -89,27 +89,27 @@ public: using Callback_t = std::function; private: - uint32 const _type; + uint32_t const _type; - uint32 _playerId = 0; // Callee - uint32 _flags = 0; // GAME_COMMAND_FLAGS - uint32 _networkId = 0; + uint32_t _playerId = 0; // Callee + uint32_t _flags = 0; // GAME_COMMAND_FLAGS + uint32_t _networkId = 0; Callback_t _callback; public: - GameAction(uint32 type) + GameAction(uint32_t type) : _type(type) { } virtual ~GameAction() = default; - uint32 GetPlayer() const + uint32_t GetPlayer() const { return _playerId; } - void SetPlayer(uint32 playerId) + void SetPlayer(uint32_t playerId) { _playerId = playerId; } @@ -117,7 +117,7 @@ public: /** * Gets the GA_FLAGS flags that are enabled for this game action. */ - virtual uint16 GetActionFlags() const + virtual uint16_t GetActionFlags() const { // Make sure we execute some things only on the client. if ((GetFlags() & GAME_COMMAND_FLAG_GHOST) != 0 || @@ -132,17 +132,17 @@ public: /** * Currently used for GAME_COMMAND_FLAGS, needs refactoring once everything is replaced. */ - uint32 GetFlags() const + uint32_t GetFlags() const { return _flags; } - uint32 SetFlags(uint32 flags) + uint32_t SetFlags(uint32_t flags) { return _flags = flags; } - uint32 GetType() const + uint32_t GetType() const { return _type; } @@ -162,7 +162,7 @@ public: _networkId = id; } - uint32 GetNetworkId() const + uint32_t GetNetworkId() const { return _networkId; } @@ -195,13 +195,13 @@ public: #pragma GCC diagnostic pop #endif -template +template struct GameActionBase : GameAction { public: using Result = TResultType; - static constexpr uint32 TYPE = TType; + static constexpr uint32_t TYPE = TType; GameActionBase() : GameAction(TYPE) @@ -230,10 +230,10 @@ namespace GameActions { void Initialize(); void Register(); - GameAction::Ptr Create(uint32 id); + GameAction::Ptr Create(uint32_t id); GameActionResult::Ptr Query(const GameAction * action); GameActionResult::Ptr Execute(const GameAction * action); - GameActionFactory Register(uint32 id, GameActionFactory action); + GameActionFactory Register(uint32_t id, GameActionFactory action); template static GameActionFactory Register() diff --git a/src/openrct2/actions/GameActionCompat.cpp b/src/openrct2/actions/GameActionCompat.cpp index d5102ae2b6..de55409cfd 100644 --- a/src/openrct2/actions/GameActionCompat.cpp +++ b/src/openrct2/actions/GameActionCompat.cpp @@ -21,7 +21,7 @@ #include "WallRemoveAction.hpp" #pragma region PlaceParkEntranceAction - money32 place_park_entrance(sint16 x, sint16 y, sint16 z, uint8 direction) + money32 place_park_entrance(int16_t x, int16_t y, int16_t z, uint8_t direction) { auto gameAction = PlaceParkEntranceAction(x, y, z, direction); auto result = GameActions::Execute(&gameAction); @@ -40,13 +40,13 @@ * rct2: 0x006666E7 */ void game_command_place_park_entrance( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_PLACE_PARK_ENTRANCE DEPRECATED"); } @@ -55,7 +55,7 @@ * * rct2: 0x00666F4E */ - money32 park_entrance_place_ghost(sint32 x, sint32 y, sint32 z, sint32 direction) + money32 park_entrance_place_ghost(int32_t x, int32_t y, int32_t z, int32_t direction) { park_entrance_remove_ghost(); @@ -104,9 +104,9 @@ */ void ride_construct_new(ride_list_item listItem) { - sint32 rideEntryIndex = ride_get_entry_index(listItem.type, listItem.entry_index); - sint32 colour1 = ride_get_random_colour_preset_index(listItem.type); - sint32 colour2 = ride_get_unused_preset_vehicle_colour(rideEntryIndex); + int32_t rideEntryIndex = ride_get_entry_index(listItem.type, listItem.entry_index); + int32_t colour1 = ride_get_random_colour_preset_index(listItem.type); + int32_t colour2 = ride_get_unused_preset_vehicle_colour(rideEntryIndex); auto gameAction = RideCreateAction(listItem.type, listItem.entry_index, colour1, colour2); @@ -121,11 +121,11 @@ GameActions::Execute(&gameAction); } - money32 ride_create_command(sint32 type, sint32 subType, sint32 flags, uint8 *outRideIndex, uint8 *outRideColour) + money32 ride_create_command(int32_t type, int32_t subType, int32_t flags, uint8_t *outRideIndex, uint8_t *outRideColour) { - sint32 rideEntryIndex = ride_get_entry_index(type, subType); - sint32 colour1 = ride_get_random_colour_preset_index(type); - sint32 colour2 = ride_get_unused_preset_vehicle_colour(rideEntryIndex); + int32_t rideEntryIndex = ride_get_entry_index(type, subType); + int32_t colour1 = ride_get_random_colour_preset_index(type); + int32_t colour2 = ride_get_unused_preset_vehicle_colour(rideEntryIndex); auto gameAction = RideCreateAction(type, subType, colour1, colour2); gameAction.SetFlags(flags); @@ -144,13 +144,13 @@ * rct2: 0x006B3F0F */ void game_command_create_ride( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_CREATE_RIDE DEPRECATED"); } @@ -159,7 +159,7 @@ #pragma region RideSetStatusAction - void ride_set_status(sint32 rideIndex, sint32 status) + void ride_set_status(int32_t rideIndex, int32_t status) { auto gameAction = RideSetStatusAction(rideIndex, status); GameActions::Execute(&gameAction); @@ -170,13 +170,13 @@ * rct2: 0x006B4EA6 */ void game_command_set_ride_status( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_SET_RIDE_STATUS DEPRECATED"); } @@ -184,7 +184,7 @@ #pragma endregion #pragma region RideSetNameAction - void ride_set_name(sint32 rideIndex, const char *name) + void ride_set_name(int32_t rideIndex, const char *name) { auto gameAction = RideSetNameAction(rideIndex, name); GameActions::Execute(&gameAction); @@ -195,20 +195,20 @@ * rct2: 0x006B578B */ void game_command_set_ride_name( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_SET_RIDE_NAME DEPRECATED"); } #pragma endregion #pragma region RideModifyAction - void ride_action_modify(sint32 rideIndex, sint32 modifyType, sint32 flags) + void ride_action_modify(int32_t rideIndex, int32_t modifyType, int32_t flags) { auto gameAction = RideDemolishAction(rideIndex, modifyType); gameAction.SetFlags(flags); @@ -221,13 +221,13 @@ * rct2: 0x006B49D9 */ void game_command_demolish_ride( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_DEMOLISH_RIDE DEPRECATED"); } @@ -235,7 +235,7 @@ #pragma region GuestSetName - void guest_set_name(uint16 spriteIndex, const char * name) + void guest_set_name(uint16_t spriteIndex, const char * name) { auto gameAction = GuestSetNameAction(spriteIndex, name); GameActions::Execute(&gameAction); @@ -246,13 +246,13 @@ * rct2: 0x00698D6C */ void game_command_set_guest_name( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_SET_GUEST_NAME DEPRECATED"); } @@ -261,20 +261,20 @@ #pragma region StaffSetName - void staff_set_name(uint16 spriteIndex, const char * name) + void staff_set_name(uint16_t spriteIndex, const char * name) { auto gameAction = StaffSetNameAction(spriteIndex, name); GameActions::Execute(&gameAction); } void game_command_set_staff_name( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_SET_STAFF_NAME DEPRECATED"); } @@ -297,7 +297,7 @@ #pragma endregion #pragma region MazeSetTrack - money32 maze_set_track(uint16 x, uint16 y, uint16 z, uint8 flags, bool initialPlacement, uint8 direction, uint8 rideIndex, uint8 mode) + money32 maze_set_track(uint16_t x, uint16_t y, uint16_t z, uint8_t flags, bool initialPlacement, uint8_t direction, uint8_t rideIndex, uint8_t mode) { auto gameAction = MazeSetTrackAction(x, y, z, initialPlacement, direction, rideIndex, mode); gameAction.SetFlags(flags); @@ -327,13 +327,13 @@ * rct2: 0x006CD8CE */ void game_command_set_maze_track( - [[maybe_unused]] sint32 * eax, - [[maybe_unused]] sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + [[maybe_unused]] int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { Guard::Assert(false, "GAME_COMMAND_SET_MAZE_TRACK DEPRECATED"); } diff --git a/src/openrct2/actions/GuestSetNameAction.hpp b/src/openrct2/actions/GuestSetNameAction.hpp index 4bc57149bd..5124493b36 100644 --- a/src/openrct2/actions/GuestSetNameAction.hpp +++ b/src/openrct2/actions/GuestSetNameAction.hpp @@ -25,18 +25,18 @@ struct GuestSetNameAction : public GameActionBase { private: - uint16 _spriteIndex; + uint16_t _spriteIndex; std::string _name; public: GuestSetNameAction() {} - GuestSetNameAction(uint16 spriteIndex, const std::string& name) + GuestSetNameAction(uint16_t spriteIndex, const std::string& name) : _spriteIndex(spriteIndex), _name(name) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -95,7 +95,7 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_CANT_NAME_GUEST, STR_NONE); } - set_format_arg(0, uint32, peep->id); + set_format_arg(0, uint32_t, peep->id); utf8 * curName = gCommonStringFormatBuffer; rct_string_id curId = peep->name_string_idx; format_string(curName, 256, curId, gCommonFormatArgs); diff --git a/src/openrct2/actions/MazeSetTrackAction.hpp b/src/openrct2/actions/MazeSetTrackAction.hpp index cf7ca4e58c..b6592d2f7c 100644 --- a/src/openrct2/actions/MazeSetTrackAction.hpp +++ b/src/openrct2/actions/MazeSetTrackAction.hpp @@ -23,7 +23,7 @@ #include "../world/Park.h" /** rct2: 0x00993CE9 */ -static constexpr const uint8 byte_993CE9[] = +static constexpr const uint8_t byte_993CE9[] = { 0xFF, 0xE0, 0xFF, 14, 0, 1, 2, @@ -33,13 +33,13 @@ static constexpr const uint8 byte_993CE9[] = }; /** rct2: 0x00993CFC */ -static constexpr const uint8 byte_993CFC[] = +static constexpr const uint8_t byte_993CFC[] = { 5, 12, 0xFF, 0xFF, 9, 0, 0xFF, 0xFF, 13, 4, 0xFF, 0xFF, 1, 8, 0xFF, 0xFF }; /** rct2: 0x00993D0C */ -static constexpr const uint8 byte_993D0C[] = +static constexpr const uint8_t byte_993D0C[] = { 3, 0, 0xFF, 0xFF, 0, 1, 0xFF, 0xFF, 1, 2, 0xFF, 0xFF, 2, 3, 0xFF, 0xFF }; @@ -48,17 +48,17 @@ static constexpr const uint8 byte_993D0C[] = struct MazeSetTrackAction : public GameActionBase { private: - uint16 _x; - uint16 _y; - uint16 _z; + uint16_t _x; + uint16_t _y; + uint16_t _z; bool _initialPlacement; - uint8 _direction; - uint8 _rideIndex; - uint8 _mode; + uint8_t _direction; + uint8_t _rideIndex; + uint8_t _mode; public: MazeSetTrackAction() {} - MazeSetTrackAction(uint16 x, uint16 y, uint16 z, bool initialPlacement, uint8 direction, uint8 rideIndex, uint8 mode) + MazeSetTrackAction(uint16_t x, uint16_t y, uint16_t z, bool initialPlacement, uint8_t direction, uint8_t rideIndex, uint8_t mode) : _x(x), _y(y), _z(z), @@ -69,7 +69,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -120,10 +120,10 @@ public: return res; } - uint8 baseHeight = _z >> 3; - uint8 clearanceHeight = (_z + 32) >> 3; + uint8_t baseHeight = _z >> 3; + uint8_t clearanceHeight = (_z + 32) >> 3; - sint8 heightDifference = baseHeight - tileElement->base_height; + int8_t heightDifference = baseHeight - tileElement->base_height; if (heightDifference >= 0 && !gCheatsDisableSupportLimits) { heightDifference = heightDifference >> 1; @@ -201,15 +201,15 @@ public: return res; } - uint32 flags = GetFlags(); + uint32_t flags = GetFlags(); if (!(flags & GAME_COMMAND_FLAG_GHOST) && !(flags & GAME_COMMAND_FLAG_2)) { footpath_remove_litter(_x, _y, _z); wall_remove_at(floor2(_x, 32), floor2(_y, 32), _z, _z + 32); } - uint8 baseHeight = _z >> 3; - uint8 clearanceHeight = (_z + 32) >> 3; + uint8_t baseHeight = _z >> 3; + uint8_t clearanceHeight = (_z + 32) >> 3; rct_tile_element * tileElement = map_get_track_element_at_of_type_from_ride(_x, _y, baseHeight, TRACK_ELEM_MAZE, _rideIndex); if (tileElement == nullptr) @@ -220,8 +220,8 @@ public: money32 price = (((RideTrackCosts[ride->type].track_price * TrackPricing[TRACK_ELEM_MAZE]) >> 16)); res->Cost = price / 2 * 10; - uint16 flooredX = floor2(_x, 32); - uint16 flooredY = floor2(_y, 32); + uint16_t flooredX = floor2(_x, 32); + uint16_t flooredY = floor2(_y, 32); tileElement = tile_element_insert(_x / 32, _y / 32, baseHeight, 0xF); assert(tileElement != nullptr); @@ -255,7 +255,7 @@ public: { case GC_SET_MAZE_TRACK_BUILD: { - uint8 segmentOffset = MazeGetSegmentBit(_x, _y); + uint8_t segmentOffset = MazeGetSegmentBit(_x, _y); tileElement->properties.track.maze_entry &= ~(1 << segmentOffset); @@ -264,11 +264,11 @@ public: segmentOffset = byte_993CE9[(_direction + segmentOffset)]; tileElement->properties.track.maze_entry &= ~(1 << segmentOffset); - uint8 temp_edx = byte_993CFC[segmentOffset]; + uint8_t temp_edx = byte_993CFC[segmentOffset]; if (temp_edx != 0xFF) { - uint16 previousElementX = floor2(_x, 32) - CoordsDirectionDelta[_direction].x; - uint16 previousElementY = floor2(_y, 32) - CoordsDirectionDelta[_direction].y; + uint16_t previousElementX = floor2(_x, 32) - CoordsDirectionDelta[_direction].x; + uint16_t previousElementY = floor2(_y, 32) - CoordsDirectionDelta[_direction].y; rct_tile_element * previousTileElement = map_get_track_element_at_of_type_from_ride( previousElementX, @@ -297,8 +297,8 @@ public: case GC_SET_MAZE_TRACK_FILL: if (!_initialPlacement) { - uint16 previousSegmentX = _x - CoordsDirectionDelta[_direction].x / 2; - uint16 previousSegmentY = _y - CoordsDirectionDelta[_direction].y / 2; + uint16_t previousSegmentX = _x - CoordsDirectionDelta[_direction].x / 2; + uint16_t previousSegmentY = _y - CoordsDirectionDelta[_direction].y / 2; tileElement = map_get_track_element_at_of_type_from_ride( previousSegmentX, @@ -316,7 +316,7 @@ public: return res; } - uint32 segmentBit = MazeGetSegmentBit(previousSegmentX, previousSegmentY); + uint32_t segmentBit = MazeGetSegmentBit(previousSegmentX, previousSegmentY); tileElement->properties.track.maze_entry |= (1 << segmentBit); segmentBit--; @@ -329,9 +329,9 @@ public: { tileElement->properties.track.maze_entry |= (1 << segmentBit); - uint32 direction1 = byte_993D0C[segmentBit]; - uint16 nextElementX = floor2(previousSegmentX, 32) + CoordsDirectionDelta[direction1].x; - uint16 nextElementY = floor2(previousSegmentY, 32) + CoordsDirectionDelta[direction1].y; + uint32_t direction1 = byte_993D0C[segmentBit]; + uint16_t nextElementX = floor2(previousSegmentX, 32) + CoordsDirectionDelta[direction1].x; + uint16_t nextElementY = floor2(previousSegmentY, 32) + CoordsDirectionDelta[direction1].y; rct_tile_element * tmp_tileElement = map_get_track_element_at_of_type_from_ride( nextElementX, @@ -342,7 +342,7 @@ public: if (tmp_tileElement != nullptr) { - uint8 edx11 = byte_993CFC[segmentBit]; + uint8_t edx11 = byte_993CFC[segmentBit]; tmp_tileElement->properties.track.maze_entry |= 1 << (edx11); } @@ -366,10 +366,10 @@ public: } private: - uint8 MazeGetSegmentBit(uint16 x, uint16 y) const + uint8_t MazeGetSegmentBit(uint16_t x, uint16_t y) const { - uint8 minorX = x & 0x1F; // 0 or 16 - uint8 minorY = y & 0x1F; // 0 or 16 + uint8_t minorX = x & 0x1F; // 0 or 16 + uint8_t minorY = y & 0x1F; // 0 or 16 if (minorX == 0 && minorY == 0) { diff --git a/src/openrct2/actions/ParkMarketingAction.hpp b/src/openrct2/actions/ParkMarketingAction.hpp index 232f34f745..80e6253714 100644 --- a/src/openrct2/actions/ParkMarketingAction.hpp +++ b/src/openrct2/actions/ParkMarketingAction.hpp @@ -24,20 +24,20 @@ struct ParkMarketingAction : public GameActionBase { private: - sint32 _type; - sint32 _item; - sint32 _numWeeks; + int32_t _type; + int32_t _item; + int32_t _numWeeks; public: ParkMarketingAction() {} - ParkMarketingAction(sint32 type, sint32 item, sint32 numWeeks) + ParkMarketingAction(int32_t type, int32_t item, int32_t numWeeks) : _type(type), _item(item), _numWeeks(numWeeks) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } diff --git a/src/openrct2/actions/ParkSetLoanAction.hpp b/src/openrct2/actions/ParkSetLoanAction.hpp index fbf54347b7..a0dce67cec 100644 --- a/src/openrct2/actions/ParkSetLoanAction.hpp +++ b/src/openrct2/actions/ParkSetLoanAction.hpp @@ -30,7 +30,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } diff --git a/src/openrct2/actions/ParkSetNameAction.hpp b/src/openrct2/actions/ParkSetNameAction.hpp index a548ea9256..79d536471b 100644 --- a/src/openrct2/actions/ParkSetNameAction.hpp +++ b/src/openrct2/actions/ParkSetNameAction.hpp @@ -34,7 +34,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } diff --git a/src/openrct2/actions/ParkSetResearchFundingAction.hpp b/src/openrct2/actions/ParkSetResearchFundingAction.hpp index 83af852d5c..fce2c72541 100644 --- a/src/openrct2/actions/ParkSetResearchFundingAction.hpp +++ b/src/openrct2/actions/ParkSetResearchFundingAction.hpp @@ -22,18 +22,18 @@ struct ParkSetResearchFundingAction : public GameActionBase { private: - sint16 _x; - sint16 _y; - sint16 _z; - uint8 _direction; + int16_t _x; + int16_t _y; + int16_t _z; + uint8_t _direction; public: PlaceParkEntranceAction() {} - PlaceParkEntranceAction(sint16 x, sint16 y, sint16 z, sint16 direction) : + PlaceParkEntranceAction(int16_t x, int16_t y, int16_t z, int16_t direction) : _x(x), _y(y), _z(z), @@ -40,7 +40,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameActionBase::GetActionFlags() | GA_FLAGS::EDITOR_ONLY; } @@ -75,8 +75,8 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_TOO_CLOSE_TO_EDGE_OF_MAP); } - sint8 entranceNum = -1; - for (uint8 i = 0; i < MAX_PARK_ENTRANCES; ++i) + int8_t entranceNum = -1; + for (uint8_t i = 0; i < MAX_PARK_ENTRANCES; ++i) { if (gParkEntrances[i].x == LOCATION_NULL) { @@ -90,10 +90,10 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_ERR_TOO_MANY_PARK_ENTRANCES); } - sint8 zLow = _z * 2; - sint8 zHigh = zLow + 12; + int8_t zLow = _z * 2; + int8_t zHigh = zLow + 12; LocationXY16 entranceLoc = { _x, _y }; - for (uint8 index = 0; index < 3; index++) + for (uint8_t index = 0; index < 3; index++) { if (index == 1) { @@ -127,7 +127,7 @@ public: GameActionResult::Ptr Execute() const override { - uint32 flags = GetFlags(); + uint32_t flags = GetFlags(); gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LAND_PURCHASE; @@ -135,8 +135,8 @@ public: gCommandPosition.y = _y; gCommandPosition.z = _z * 16; - sint8 entranceNum = -1; - for (uint8 i = 0; i < MAX_PARK_ENTRANCES; ++i) + int8_t entranceNum = -1; + for (uint8_t i = 0; i < MAX_PARK_ENTRANCES; ++i) { if (gParkEntrances[i].x == LOCATION_NULL) { @@ -152,10 +152,10 @@ public: gParkEntrances[entranceNum].z = _z * 16; gParkEntrances[entranceNum].direction = _direction; - sint8 zLow = _z * 2; - sint8 zHigh = zLow + 12; + int8_t zLow = _z * 2; + int8_t zHigh = zLow + 12; CoordsXY entranceLoc = { _x, _y }; - for (uint8 index = 0; index < 3; index++) + for (uint8_t index = 0; index < 3; index++) { if (index == 1) { diff --git a/src/openrct2/actions/PlacePeepSpawnAction.hpp b/src/openrct2/actions/PlacePeepSpawnAction.hpp index 56a290e7a0..1af58bcd78 100644 --- a/src/openrct2/actions/PlacePeepSpawnAction.hpp +++ b/src/openrct2/actions/PlacePeepSpawnAction.hpp @@ -19,7 +19,7 @@ #include "../world/Park.h" #include "../world/Footpath.h" -static sint32 _nextPeepSpawnIndex = 0; +static int32_t _nextPeepSpawnIndex = 0; struct PlacePeepSpawnAction : public GameActionBase { @@ -33,7 +33,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameActionBase::GetActionFlags() | GA_FLAGS::EDITOR_ONLY | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -96,8 +96,8 @@ public: gCommandPosition.z = _location.z / 8; // Find empty or next appropriate peep spawn to use - sint32 peepSpawnIndex = -1; - for (sint32 i = 0; i < MAX_PEEP_SPAWNS; i++) { + int32_t peepSpawnIndex = -1; + for (int32_t i = 0; i < MAX_PEEP_SPAWNS; i++) { if (gPeepSpawns[i].x == PEEP_SPAWN_UNDEFINED) { peepSpawnIndex = i; break; @@ -111,14 +111,14 @@ public: _nextPeepSpawnIndex = (peepSpawnIndex + 1) % MAX_PEEP_SPAWNS; // Before the new location is set, clear the old location - sint32 prevX = gPeepSpawns[peepSpawnIndex].x; + int32_t prevX = gPeepSpawns[peepSpawnIndex].x; gPeepSpawns[peepSpawnIndex].x = PEEP_SPAWN_UNDEFINED; map_invalidate_tile_full(prevX, gPeepSpawns[peepSpawnIndex].y); } // Shift the spawn point to the middle of the tile - sint32 middleX, middleY; + int32_t middleX, middleY; middleX = _location.x + 16 + (word_981D6C[_location.direction].x * 15); middleY = _location.y + 16 + (word_981D6C[_location.direction].y * 15); diff --git a/src/openrct2/actions/RideCreateAction.hpp b/src/openrct2/actions/RideCreateAction.hpp index 0b41e16966..fa8f3b6af4 100644 --- a/src/openrct2/actions/RideCreateAction.hpp +++ b/src/openrct2/actions/RideCreateAction.hpp @@ -32,20 +32,20 @@ public: RideCreateGameActionResult() : GameActionResult(GA_ERROR::OK, 0) {} RideCreateGameActionResult(GA_ERROR error, rct_string_id message) : GameActionResult(error, message) {} - sint32 rideIndex = -1; + int32_t rideIndex = -1; }; struct RideCreateAction : public GameActionBase { private: - sint32 _rideType; - sint32 _subType; - uint8 _colour1; - uint8 _colour2; + int32_t _rideType; + int32_t _subType; + uint8_t _colour1; + uint8_t _colour2; public: RideCreateAction() {} - RideCreateAction(sint32 rideType, sint32 subType, sint32 colour1, sint32 colour2) : + RideCreateAction(int32_t rideType, int32_t subType, int32_t colour1, int32_t colour2) : _rideType(rideType), _subType(subType), _colour1(colour1), @@ -53,7 +53,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED;; } @@ -67,7 +67,7 @@ public: GameActionResult::Ptr Query() const override { - sint32 rideIndex = ride_get_empty_slot(); + int32_t rideIndex = ride_get_empty_slot(); if (rideIndex == -1) { // No more free slots available. @@ -79,7 +79,7 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_RIDE_TYPE); } - sint32 rideEntryIndex = ride_get_entry_index(_rideType, _subType); + int32_t rideEntryIndex = ride_get_entry_index(_rideType, _subType); if (rideEntryIndex >= 128) { return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_RIDE_TYPE); @@ -110,8 +110,8 @@ public: rct_ride_entry * rideEntry; auto res = std::make_unique(); - sint32 rideEntryIndex = ride_get_entry_index(_rideType, _subType); - sint32 rideIndex = ride_get_empty_slot(); + int32_t rideEntryIndex = ride_get_entry_index(_rideType, _subType); + int32_t rideIndex = ride_get_empty_slot(); res->rideIndex = rideIndex; @@ -140,7 +140,7 @@ public: ride_set_name_to_default(ride, rideEntry); } - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { ride->station_starts[i].xy = RCT_XY8_UNDEFINED; ride_clear_entrance_location(ride, i); diff --git a/src/openrct2/actions/RideDemolishAction.hpp b/src/openrct2/actions/RideDemolishAction.hpp index 3e3d30f913..dd3678d448 100644 --- a/src/openrct2/actions/RideDemolishAction.hpp +++ b/src/openrct2/actions/RideDemolishAction.hpp @@ -30,18 +30,18 @@ using namespace OpenRCT2; struct RideDemolishAction : public GameActionBase { private: - sint32 _rideIndex = -1; - uint8 _modifyType = RIDE_MODIFY_DEMOLISH; + int32_t _rideIndex = -1; + uint8_t _modifyType = RIDE_MODIFY_DEMOLISH; public: RideDemolishAction() {} - RideDemolishAction(sint32 rideIndex, uint8 modifyType) : + RideDemolishAction(int32_t rideIndex, uint8_t modifyType) : _rideIndex(rideIndex), _modifyType(modifyType) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags(); } @@ -140,12 +140,12 @@ private: } } - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep *peep; FOR_ALL_GUESTS(spriteIndex, peep) { - uint8 ride_id_bit = _rideIndex % 8; - uint8 ride_id_offset = _rideIndex / 8; + uint8_t ride_id_bit = _rideIndex % 8; + uint8_t ride_id_offset = _rideIndex / 8; // clear ride from potentially being in rides_been_on peep->rides_been_on[ride_id_offset] &= ~(1 << ride_id_bit); @@ -211,7 +211,7 @@ private: peep->favourite_ride = MAX_RIDES; } - for (sint32 i = 0; i < PEEP_MAX_THOUGHTS; i++) + for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; i++) { if (peep->thoughts[i].type != PEEP_THOUGHT_TYPE_NONE && peep->thoughts[i].item == _rideIndex) @@ -236,9 +236,9 @@ private: if (ride->overall_view.xy != RCT_XY8_UNDEFINED) { - sint32 x = (ride->overall_view.x * 32) + 16; - sint32 y = (ride->overall_view.y * 32) + 16; - sint32 z = tile_element_height(x, y); + int32_t x = (ride->overall_view.x * 32) + 16; + int32_t y = (ride->overall_view.y * 32) + 16; + int32_t z = tile_element_height(x, y); res->Position = { x, y, z }; } @@ -260,7 +260,7 @@ private: return res; } - money32 MazeRemoveTrack(uint16 x, uint16 y, uint16 z, uint8 direction) const + money32 MazeRemoveTrack(uint16_t x, uint16_t y, uint16_t z, uint8_t direction) const { auto setMazeTrack = MazeSetTrackAction(x, y, z, false, direction, _rideIndex, GC_SET_MAZE_TRACK_FILL); setMazeTrack.SetFlags(GetFlags()); @@ -282,7 +282,7 @@ private: { money32 refundPrice = 0; - uint8 oldpaused = gGamePaused; + uint8_t oldpaused = gGamePaused; gGamePaused = 0; tile_element_iterator it; @@ -296,11 +296,11 @@ private: if (track_element_get_ride_index(it.element) != _rideIndex) continue; - sint32 x = it.x * 32, y = it.y * 32; - sint32 z = it.element->base_height * 8; + int32_t x = it.x * 32, y = it.y * 32; + int32_t z = it.element->base_height * 8; - uint8 rotation = tile_element_get_direction(it.element); - uint8 type = track_element_get_type(it.element); + uint8_t rotation = tile_element_get_direction(it.element); + uint8_t type = track_element_get_type(it.element); if (type != TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP) { @@ -330,7 +330,7 @@ private: { 16, 0 }, }; - for (uint8 dir = 0; dir < 4; dir++) + for (uint8_t dir = 0; dir < 4; dir++) { const LocationXY16& off = DirOffsets[dir]; money32 removePrice = MazeRemoveTrack(x + off.x, y + off.y, z, dir); @@ -362,9 +362,9 @@ private: if (ride->overall_view.xy != RCT_XY8_UNDEFINED) { - sint32 x = (ride->overall_view.x * 32) + 16; - sint32 y = (ride->overall_view.y * 32) + 16; - sint32 z = tile_element_height(x, y); + int32_t x = (ride->overall_view.x * 32) + 16; + int32_t y = (ride->overall_view.y * 32) + 16; + int32_t z = tile_element_height(x, y); res->Position = { x, y, z }; } diff --git a/src/openrct2/actions/RideSetName.hpp b/src/openrct2/actions/RideSetName.hpp index 4b87ded5e3..591d555f5a 100644 --- a/src/openrct2/actions/RideSetName.hpp +++ b/src/openrct2/actions/RideSetName.hpp @@ -25,18 +25,18 @@ struct RideSetNameAction : public GameActionBase { private: - sint32 _rideIndex = -1; + int32_t _rideIndex = -1; std::string _name; public: RideSetNameAction() {} - RideSetNameAction(sint32 rideIndex, const std::string& name) + RideSetNameAction(int32_t rideIndex, const std::string& name) : _rideIndex(rideIndex), _name(name) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } diff --git a/src/openrct2/actions/RideSetStatus.hpp b/src/openrct2/actions/RideSetStatus.hpp index 0320008358..25feebb0d0 100644 --- a/src/openrct2/actions/RideSetStatus.hpp +++ b/src/openrct2/actions/RideSetStatus.hpp @@ -32,18 +32,18 @@ static rct_string_id _StatusErrorTitles[] = struct RideSetStatusAction : public GameActionBase { private: - sint32 _rideIndex = -1; - uint8 _status = RIDE_STATUS_CLOSED; + int32_t _rideIndex = -1; + uint8_t _status = RIDE_STATUS_CLOSED; public: RideSetStatusAction() {} - RideSetStatusAction(uint8 rideIndex, uint8 status) : + RideSetStatusAction(uint8_t rideIndex, uint8_t status) : _rideIndex(rideIndex), _status(status) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -61,7 +61,7 @@ public: Ride *ride = get_ride(_rideIndex); res->ErrorTitle = _StatusErrorTitles[_status]; set_format_arg_on(res->ErrorMessageArgs.data(), 6, rct_string_id, ride->name); - set_format_arg_on(res->ErrorMessageArgs.data(), 8, uint32, ride->name_arguments); + set_format_arg_on(res->ErrorMessageArgs.data(), 8, uint32_t, ride->name_arguments); if (_rideIndex >= MAX_RIDES || _rideIndex < 0) { @@ -102,7 +102,7 @@ public: Ride *ride = get_ride(_rideIndex); res->ErrorTitle = _StatusErrorTitles[_status]; set_format_arg_on(res->ErrorMessageArgs.data(), 6, rct_string_id, ride->name); - set_format_arg_on(res->ErrorMessageArgs.data(), 8,uint32, ride->name_arguments); + set_format_arg_on(res->ErrorMessageArgs.data(), 8,uint32_t, ride->name_arguments); if (ride->type == RIDE_TYPE_NULL) { diff --git a/src/openrct2/actions/SetParkEntranceFeeAction.hpp b/src/openrct2/actions/SetParkEntranceFeeAction.hpp index 8f37b2cf2b..eb81758972 100644 --- a/src/openrct2/actions/SetParkEntranceFeeAction.hpp +++ b/src/openrct2/actions/SetParkEntranceFeeAction.hpp @@ -29,7 +29,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } diff --git a/src/openrct2/actions/SignSetNameAction.hpp b/src/openrct2/actions/SignSetNameAction.hpp index 7f9ded13c8..3fb3c7d1f6 100644 --- a/src/openrct2/actions/SignSetNameAction.hpp +++ b/src/openrct2/actions/SignSetNameAction.hpp @@ -24,18 +24,18 @@ struct SignSetNameAction : public GameActionBase { private: - sint32 _bannerIndex; + int32_t _bannerIndex; std::string _name; public: SignSetNameAction() = default; - SignSetNameAction(sint32 bannerIndex, const std::string& name) + SignSetNameAction(int32_t bannerIndex, const std::string& name) : _bannerIndex(bannerIndex) , _name(name) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -72,8 +72,8 @@ public: { rct_banner* banner = &gBanners[_bannerIndex]; - sint32 x = banner->x << 5; - sint32 y = banner->y << 5; + int32_t x = banner->x << 5; + int32_t y = banner->y << 5; if (_name.empty() == false) { @@ -95,7 +95,7 @@ public: else { // If empty name take closest ride name. - uint8 rideIndex = banner_get_closest_ride_index(x, y, 16); + uint8_t rideIndex = banner_get_closest_ride_index(x, y, 16); if (rideIndex == RIDE_ID_NULL) { return MakeResult(); diff --git a/src/openrct2/actions/StaffSetColourAction.hpp b/src/openrct2/actions/StaffSetColourAction.hpp index de16d5e5d0..8c7117253d 100644 --- a/src/openrct2/actions/StaffSetColourAction.hpp +++ b/src/openrct2/actions/StaffSetColourAction.hpp @@ -23,18 +23,18 @@ struct StaffSetColourAction : public GameActionBase { private: - uint8 _staffType; - uint8 _colour; + uint8_t _staffType; + uint8_t _colour; public: StaffSetColourAction() {} - StaffSetColourAction(uint8 staffType, uint8 colour) + StaffSetColourAction(uint8_t staffType, uint8_t colour) : _staffType(staffType), _colour(colour) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -65,7 +65,7 @@ public: } // Update each staff member's uniform - sint32 spriteIndex; + int32_t spriteIndex; rct_peep * peep; FOR_ALL_PEEPS(spriteIndex, peep) { diff --git a/src/openrct2/actions/StaffSetNameAction.hpp b/src/openrct2/actions/StaffSetNameAction.hpp index ad9f65b60b..93b12383e9 100644 --- a/src/openrct2/actions/StaffSetNameAction.hpp +++ b/src/openrct2/actions/StaffSetNameAction.hpp @@ -26,18 +26,18 @@ struct StaffSetNameAction : public GameActionBase { private: - uint16 _spriteIndex; + uint16_t _spriteIndex; std::string _name; public: StaffSetNameAction() {} - StaffSetNameAction(uint16 spriteIndex, const std::string& name) + StaffSetNameAction(uint16_t spriteIndex, const std::string& name) : _spriteIndex(spriteIndex), _name(name) { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GA_FLAGS::ALLOW_WHILE_PAUSED; } @@ -95,7 +95,7 @@ public: return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE); } - set_format_arg(0, uint32, peep->id); + set_format_arg(0, uint32_t, peep->id); utf8 * curName = gCommonStringFormatBuffer; rct_string_id curId = peep->name_string_idx; format_string(curName, 256, curId, gCommonFormatArgs); diff --git a/src/openrct2/actions/WallRemoveAction.hpp b/src/openrct2/actions/WallRemoveAction.hpp index 7a1ca8e802..145e7f1900 100644 --- a/src/openrct2/actions/WallRemoveAction.hpp +++ b/src/openrct2/actions/WallRemoveAction.hpp @@ -31,7 +31,7 @@ public: { } - uint16 GetActionFlags() const override + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags(); } diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index 8be7c05643..425cd07161 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -31,16 +31,16 @@ using namespace OpenRCT2::Audio; struct AudioParams { bool in_range; - sint32 volume; - sint32 pan; + int32_t volume; + int32_t pan; }; audio_device * gAudioDevices = nullptr; -sint32 gAudioDeviceCount; -sint32 gAudioCurrentDevice = -1; +int32_t gAudioDeviceCount; +int32_t gAudioCurrentDevice = -1; bool gGameSoundsOff = false; -sint32 gVolumeAdjustZoom = 0; +int32_t gVolumeAdjustZoom = 0; void * gTitleMusicChannel = nullptr; void * gRainSoundChannel = nullptr; @@ -54,7 +54,7 @@ rct_vehicle_sound_params gVehicleSoundParamsList[AUDIO_MAX_VEHICLE_SOUNDS]; rct_vehicle_sound_params * gVehicleSoundParamsListEnd; // clang-format off -static sint32 SoundVolumeAdjust[SOUND_MAXID] = +static int32_t SoundVolumeAdjust[SOUND_MAXID] = { 0, // SOUND_LIFT_1 0, // SOUND_TRACK_FRICTION_1 @@ -122,7 +122,7 @@ static sint32 SoundVolumeAdjust[SOUND_MAXID] = }; // clang-format on -AudioParams audio_get_params_from_location(sint32 soundId, const LocationXYZ16 *location); +AudioParams audio_get_params_from_location(int32_t soundId, const LocationXYZ16 *location); void audio_init() { @@ -136,7 +136,7 @@ void audio_init() Mixer_Init(gConfigSound.device); audio_populate_devices(); - for (sint32 i = 0; i < gAudioDeviceCount; i++) + for (int32_t i = 0; i < gAudioDeviceCount; i++) { if (String::Equals(gAudioDevices[i].name, gConfigSound.device)) { @@ -168,16 +168,16 @@ void audio_populate_devices() devices.insert(devices.begin(), defaultDevice); #endif - gAudioDeviceCount = (sint32)devices.size(); + gAudioDeviceCount = (int32_t)devices.size(); gAudioDevices = Memory::AllocateArray(gAudioDeviceCount); - for (sint32 i = 0; i < gAudioDeviceCount; i++) + for (int32_t i = 0; i < gAudioDeviceCount; i++) { auto device = &gAudioDevices[i]; String::Set(device->name, sizeof(device->name), devices[i].c_str()); } } -sint32 audio_play_sound_at_location(sint32 soundId, sint16 x, sint16 y, sint16 z) +int32_t audio_play_sound_at_location(int32_t soundId, int16_t x, int16_t y, int16_t z) { if (gGameSoundsOff) return 0; @@ -201,9 +201,9 @@ sint32 audio_play_sound_at_location(sint32 soundId, sint16 x, sint16 y, sint16 z * @param location The location at which the sound effect is to be played. * @return The audio parameters to be used when playing this sound effect. */ -AudioParams audio_get_params_from_location(sint32 soundId, const LocationXYZ16 *location) +AudioParams audio_get_params_from_location(int32_t soundId, const LocationXYZ16 *location) { - sint32 volumeDown = 0; + int32_t volumeDown = 0; AudioParams params; params.in_range = true; params.volume = 0; @@ -215,7 +215,7 @@ AudioParams audio_get_params_from_location(sint32 soundId, const LocationXYZ16 * volumeDown = 10; } - uint8 rotation = get_current_rotation(); + uint8_t rotation = get_current_rotation(); LocationXY16 pos2 = coordinate_3d_to_2d(location, rotation); rct_viewport * viewport = nullptr; @@ -223,8 +223,8 @@ AudioParams audio_get_params_from_location(sint32 soundId, const LocationXYZ16 * { if (viewport->flags & VIEWPORT_FLAG_SOUND_ON) { - sint16 vy = pos2.y - viewport->view_y; - sint16 vx = pos2.x - viewport->view_x; + int16_t vy = pos2.y - viewport->view_y; + int16_t vx = pos2.x - viewport->view_x; params.pan = viewport->x + (vx >> viewport->zoom); params.volume = SoundVolumeAdjust[soundId] + ((-1024 * viewport->zoom - 1) * (1 << volumeDown)) + 1; @@ -239,16 +239,16 @@ AudioParams audio_get_params_from_location(sint32 soundId, const LocationXYZ16 * return params; } -sint32 audio_play_sound(sint32 soundId, sint32 volume, sint32 pan) +int32_t audio_play_sound(int32_t soundId, int32_t volume, int32_t pan) { if (gGameSoundsOff) return 0; - sint32 mixerPan = 0; + int32_t mixerPan = 0; if (pan != AUDIO_PLAY_AT_CENTRE) { - sint32 x2 = pan << 16; - uint16 screenWidth = std::max(64, OpenRCT2::GetContext()->GetUiContext()->GetWidth()); + int32_t x2 = pan << 16; + uint16_t screenWidth = std::max(64, OpenRCT2::GetContext()->GetUiContext()->GetWidth()); mixerPan = ((x2 / screenWidth) - 0x8000) >> 4; } @@ -269,7 +269,7 @@ void audio_start_title_music() return; } - sint32 pathId; + int32_t pathId; switch (gConfigSound.title_music) { case 1: pathId = PATH_ID_CSS50; @@ -336,7 +336,7 @@ void audio_stop_rain_sound() void audio_init_ride_sounds_and_info() { - sint32 deviceNum = 0; + int32_t deviceNum = 0; audio_init_ride_sounds(deviceNum); for (auto &rideMusicInfo : gRideMusicInfoList) @@ -347,7 +347,7 @@ void audio_init_ride_sounds_and_info() try { auto fs = FileStream(path, FILE_MODE_OPEN); - uint32 head = fs.ReadValue(); + uint32_t head = fs.ReadValue(); if (head == 0x78787878) { rideMusicInfo.length = 0; @@ -365,7 +365,7 @@ void audio_init_ride_sounds_and_info() } } -void audio_init_ride_sounds(sint32 device) +void audio_init_ride_sounds(int32_t device) { audio_close(); for (auto &vehicleSound : gVehicleSoundList) diff --git a/src/openrct2/audio/AudioChannel.h b/src/openrct2/audio/AudioChannel.h index 9ff17bf698..d521887936 100644 --- a/src/openrct2/audio/AudioChannel.h +++ b/src/openrct2/audio/AudioChannel.h @@ -25,25 +25,25 @@ namespace OpenRCT2::Audio virtual IAudioSource * GetSource() const abstract; - virtual sint32 GetGroup() const abstract; - virtual void SetGroup(sint32 group) abstract; + virtual int32_t GetGroup() const abstract; + virtual void SetGroup(int32_t group) abstract; virtual double GetRate() const abstract; virtual void SetRate(double rate) abstract; - virtual uint64 GetOffset() const abstract; - virtual bool SetOffset(uint64 offset) abstract; + virtual uint64_t GetOffset() const abstract; + virtual bool SetOffset(uint64_t offset) abstract; - virtual sint32 GetLoop() const abstract; - virtual void SetLoop(sint32 value) abstract; + virtual int32_t GetLoop() const abstract; + virtual void SetLoop(int32_t value) abstract; - virtual sint32 GetVolume() const abstract; + virtual int32_t GetVolume() const abstract; virtual float GetVolumeL() const abstract; virtual float GetVolumeR() const abstract; virtual float GetOldVolumeL() const abstract; virtual float GetOldVolumeR() const abstract; - virtual sint32 GetOldVolume() const abstract; - virtual void SetVolume(sint32 volume) abstract; + virtual int32_t GetOldVolume() const abstract; + virtual void SetVolume(int32_t volume) abstract; virtual float GetPan() const abstract; virtual void SetPan(float pan) abstract; @@ -61,7 +61,7 @@ namespace OpenRCT2::Audio virtual bool IsPlaying() const abstract; - virtual void Play(IAudioSource * source, sint32 loop = 0) abstract; + virtual void Play(IAudioSource * source, int32_t loop = 0) abstract; virtual void UpdateOldVolume() abstract; virtual size_t Read(void * dst, size_t len) abstract; diff --git a/src/openrct2/audio/AudioContext.h b/src/openrct2/audio/AudioContext.h index 30d51fc87b..1f53d85ca7 100644 --- a/src/openrct2/audio/AudioContext.h +++ b/src/openrct2/audio/AudioContext.h @@ -37,9 +37,9 @@ namespace OpenRCT2::Audio virtual void StartTitleMusic() abstract; - virtual IAudioChannel * PlaySound(sint32 soundId, sint32 volume, sint32 pan) abstract; - virtual IAudioChannel * PlaySoundAtLocation(sint32 soundId, sint16 x, sint16 y, sint16 z) abstract; - virtual IAudioChannel * PlaySoundPanned(sint32 soundId, sint32 pan, sint16 x, sint16 y, sint16 z) abstract; + virtual IAudioChannel * PlaySound(int32_t soundId, int32_t volume, int32_t pan) abstract; + virtual IAudioChannel * PlaySoundAtLocation(int32_t soundId, int16_t x, int16_t y, int16_t z) abstract; + virtual IAudioChannel * PlaySoundPanned(int32_t soundId, int32_t pan, int16_t x, int16_t y, int16_t z) abstract; virtual void ToggleAllSounds() abstract; virtual void PauseSounds() abstract; diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index 826c02bbf2..34fa320ab4 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -35,7 +35,7 @@ void Mixer_Init(const char * device) audioContext->SetOutputDevice(std::string(device)); } -void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, double rate, sint32 deleteondone) +void * Mixer_Play_Effect(size_t id, int32_t loop, int32_t volume, float pan, double rate, int32_t deleteondone) { IAudioChannel * channel = nullptr; if (gConfigSound.sound_enabled) @@ -50,7 +50,7 @@ void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, doubl if (mixer != nullptr) { mixer->Lock(); - IAudioSource * source = mixer->GetSoundSource((sint32)id); + IAudioSource * source = mixer->GetSoundSource((int32_t)id); channel = mixer->Play(source, loop, deleteondone != 0, false); if (channel != nullptr) { @@ -74,7 +74,7 @@ void Mixer_Stop_Channel(void * channel) } } -void Mixer_Channel_Volume(void * channel, sint32 volume) +void Mixer_Channel_Volume(void * channel, int32_t volume) { IAudioMixer * audioMixer = GetMixer(); if (audioMixer != nullptr) @@ -107,27 +107,27 @@ void Mixer_Channel_Rate(void* channel, double rate) } } -sint32 Mixer_Channel_IsPlaying(void * channel) +int32_t Mixer_Channel_IsPlaying(void * channel) { return static_cast(channel)->IsPlaying(); } -uint64 Mixer_Channel_GetOffset(void * channel) +uint64_t Mixer_Channel_GetOffset(void * channel) { return static_cast(channel)->GetOffset(); } -sint32 Mixer_Channel_SetOffset(void * channel, uint64 offset) +int32_t Mixer_Channel_SetOffset(void * channel, uint64_t offset) { return static_cast(channel)->SetOffset(offset); } -void Mixer_Channel_SetGroup(void * channel, sint32 group) +void Mixer_Channel_SetGroup(void * channel, int32_t group) { static_cast(channel)->SetGroup(group); } -void * Mixer_Play_Music(sint32 pathId, sint32 loop, sint32 streaming) +void * Mixer_Play_Music(int32_t pathId, int32_t loop, int32_t streaming) { IAudioChannel * channel = nullptr; IAudioMixer * mixer = GetMixer(); @@ -169,17 +169,17 @@ void Mixer_SetVolume(float volume) GetMixer()->SetVolume(volume); } -sint32 DStoMixerVolume(sint32 volume) +int32_t DStoMixerVolume(int32_t volume) { - return (sint32)(MIXER_VOLUME_MAX * (std::pow(10.0f, (float)volume / 2000))); + return (int32_t)(MIXER_VOLUME_MAX * (std::pow(10.0f, (float)volume / 2000))); } -float DStoMixerPan(sint32 pan) +float DStoMixerPan(int32_t pan) { return (((float)pan + -DSBPAN_LEFT) / DSBPAN_RIGHT) / 2; } -double DStoMixerRate(sint32 frequency) +double DStoMixerRate(int32_t frequency) { return (double)frequency / 22050; } diff --git a/src/openrct2/audio/AudioMixer.h b/src/openrct2/audio/AudioMixer.h index f7803a52a4..fc0d34e229 100644 --- a/src/openrct2/audio/AudioMixer.h +++ b/src/openrct2/audio/AudioMixer.h @@ -38,13 +38,13 @@ namespace OpenRCT2::Audio virtual void Close() abstract; virtual void Lock() abstract; virtual void Unlock() abstract; - virtual IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) abstract; + virtual IAudioChannel * Play(IAudioSource * source, int32_t loop, bool deleteondone, bool deletesourceondone) abstract; virtual void Stop(IAudioChannel * channel) abstract; virtual bool LoadMusic(size_t pathid) abstract; virtual void SetVolume(float volume) abstract; - virtual IAudioSource * GetSoundSource(sint32 id) abstract; - virtual IAudioSource * GetMusicSource(sint32 id) abstract; + virtual IAudioSource * GetSoundSource(int32_t id) abstract; + virtual IAudioSource * GetMusicSource(int32_t id) abstract; }; } // namespace OpenRCT2::Audio @@ -56,19 +56,19 @@ namespace OpenRCT2::Audio #endif void Mixer_Init(const char * device); -void* Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, double rate, sint32 deleteondone); +void* Mixer_Play_Effect(size_t id, int32_t loop, int32_t volume, float pan, double rate, int32_t deleteondone); void Mixer_Stop_Channel(void* channel); -void Mixer_Channel_Volume(void* channel, sint32 volume); +void Mixer_Channel_Volume(void* channel, int32_t volume); void Mixer_Channel_Pan(void* channel, float pan); void Mixer_Channel_Rate(void* channel, double rate); -sint32 Mixer_Channel_IsPlaying(void* channel); -uint64 Mixer_Channel_GetOffset(void* channel); -sint32 Mixer_Channel_SetOffset(void* channel, uint64 offset); -void Mixer_Channel_SetGroup(void* channel, sint32 group); -void* Mixer_Play_Music(sint32 pathId, sint32 loop, sint32 streaming); +int32_t Mixer_Channel_IsPlaying(void* channel); +uint64_t Mixer_Channel_GetOffset(void* channel); +int32_t Mixer_Channel_SetOffset(void* channel, uint64_t offset); +void Mixer_Channel_SetGroup(void* channel, int32_t group); +void* Mixer_Play_Music(int32_t pathId, int32_t loop, int32_t streaming); void Mixer_SetVolume(float volume); -sint32 DStoMixerVolume(sint32 volume); -float DStoMixerPan(sint32 pan); -double DStoMixerRate(sint32 frequency); +int32_t DStoMixerVolume(int32_t volume); +float DStoMixerPan(int32_t pan); +double DStoMixerRate(int32_t frequency); diff --git a/src/openrct2/audio/AudioSource.h b/src/openrct2/audio/AudioSource.h index 8941d02225..337f4aad6a 100644 --- a/src/openrct2/audio/AudioSource.h +++ b/src/openrct2/audio/AudioSource.h @@ -21,9 +21,9 @@ namespace OpenRCT2::Audio { virtual ~IAudioSource() = default; - virtual uint64 GetLength() const abstract; + virtual uint64_t GetLength() const abstract; // virtual AudioFormat GetFormat() abstract; - virtual size_t Read(void * dst, uint64 offset, size_t len) abstract; + virtual size_t Read(void * dst, uint64_t offset, size_t len) abstract; }; namespace AudioSource diff --git a/src/openrct2/audio/DummyAudioContext.cpp b/src/openrct2/audio/DummyAudioContext.cpp index 5f6badf161..b9e4054685 100644 --- a/src/openrct2/audio/DummyAudioContext.cpp +++ b/src/openrct2/audio/DummyAudioContext.cpp @@ -22,9 +22,9 @@ namespace OpenRCT2::Audio void StartTitleMusic() override { } - IAudioChannel * PlaySound(sint32 /*soundId*/, sint32 /*volume*/, sint32 /*pan*/) override { return nullptr; } - IAudioChannel * PlaySoundAtLocation(sint32 /*soundId*/, sint16 /*x*/, sint16 /*y*/, sint16 /*z*/) override { return nullptr; } - IAudioChannel * PlaySoundPanned(sint32 /*soundId*/, sint32 /*pan*/, sint16 /*x*/, sint16 /*y*/, sint16 /*z*/) override { return nullptr; } + IAudioChannel * PlaySound(int32_t /*soundId*/, int32_t /*volume*/, int32_t /*pan*/) override { return nullptr; } + IAudioChannel * PlaySoundAtLocation(int32_t /*soundId*/, int16_t /*x*/, int16_t /*y*/, int16_t /*z*/) override { return nullptr; } + IAudioChannel * PlaySoundPanned(int32_t /*soundId*/, int32_t /*pan*/, int16_t /*x*/, int16_t /*y*/, int16_t /*z*/) override { return nullptr; } void ToggleAllSounds() override { } void PauseSounds() override { } diff --git a/src/openrct2/audio/NullAudioSource.cpp b/src/openrct2/audio/NullAudioSource.cpp index 925f78e1d5..919724accc 100644 --- a/src/openrct2/audio/NullAudioSource.cpp +++ b/src/openrct2/audio/NullAudioSource.cpp @@ -17,12 +17,12 @@ namespace OpenRCT2::Audio class NullAudioSource : public IAudioSource { public: - uint64 GetLength() const override + uint64_t GetLength() const override { return 0; } - size_t Read([[maybe_unused]] void* dst, [[maybe_unused]] uint64 offset, [[maybe_unused]] size_t len) override + size_t Read([[maybe_unused]] void* dst, [[maybe_unused]] uint64_t offset, [[maybe_unused]] size_t len) override { return 0; } diff --git a/src/openrct2/audio/audio.h b/src/openrct2/audio/audio.h index c064816c13..19ec169834 100644 --- a/src/openrct2/audio/audio.h +++ b/src/openrct2/audio/audio.h @@ -26,55 +26,55 @@ struct audio_device struct rct_ride_music { - uint8 ride_id; - uint8 tune_id; - sint16 volume; - sint16 pan; - uint16 frequency; + uint8_t ride_id; + uint8_t tune_id; + int16_t volume; + int16_t pan; + uint16_t frequency; void* sound_channel; }; struct rct_ride_music_info { - uint8 path_id; - uint32 offset; - uint32 length; + uint8_t path_id; + uint32_t offset; + uint32_t length; }; struct rct_ride_music_params { - uint8 ride_id; - uint8 tune_id; - sint32 offset; - sint16 volume; - sint16 pan; - uint16 frequency; + uint8_t ride_id; + uint8_t tune_id; + int32_t offset; + int16_t volume; + int16_t pan; + uint16_t frequency; }; struct rct_vehicle_sound { - uint16 id; - sint16 volume; - uint16 sound1_id; - sint16 sound1_volume; - sint16 sound1_pan; - uint16 sound1_freq; - uint16 sound2_id; - sint16 sound2_volume; - sint16 sound2_pan; - uint16 sound2_freq; + uint16_t id; + int16_t volume; + uint16_t sound1_id; + int16_t sound1_volume; + int16_t sound1_pan; + uint16_t sound1_freq; + uint16_t sound2_id; + int16_t sound2_volume; + int16_t sound2_pan; + uint16_t sound2_freq; void* sound1_channel; void* sound2_channel; }; struct rct_vehicle_sound_params { - uint16 id; - sint16 pan_x; - sint16 pan_y; - uint16 frequency; - sint16 volume; - uint16 priority; + uint16_t id; + int16_t pan_x; + int16_t pan_y; + uint16_t frequency; + int16_t volume; + uint16_t priority; }; enum RCT2_SOUND @@ -146,11 +146,11 @@ enum RCT2_SOUND }; extern audio_device * gAudioDevices; -extern sint32 gAudioDeviceCount; -extern sint32 gAudioCurrentDevice; +extern int32_t gAudioDeviceCount; +extern int32_t gAudioCurrentDevice; extern bool gGameSoundsOff; -extern sint32 gVolumeAdjustZoom; +extern int32_t gVolumeAdjustZoom; extern void * gTitleMusicChannel; extern void * gRainSoundChannel; @@ -182,7 +182,7 @@ void audio_init_ride_sounds_and_info(); * Loads the ride sounds. * rct2: 0x006BA9B5 */ -void audio_init_ride_sounds(sint32 device); +void audio_init_ride_sounds(int32_t device); /** * Temporarily stops playing sounds until audio_unpause_sounds() is called. * rct2: 0x006BABB4 @@ -196,7 +196,7 @@ void audio_pause_sounds(); * sound at a position relative to the centre of the viewport. * @return 0 if the sound was not out of range; otherwise, soundId. */ -sint32 audio_play_sound(sint32 soundId, sint32 volume, sint32 pan); +int32_t audio_play_sound(int32_t soundId, int32_t volume, int32_t pan); /** * Plays the specified sound at a virtual location. * @param soundId The sound effect to play. @@ -205,7 +205,7 @@ sint32 audio_play_sound(sint32 soundId, sint32 volume, sint32 pan); * @param z The z coordinate of the location. * @return 0 if the sound was not out of range; otherwise, soundId. */ -sint32 audio_play_sound_at_location(sint32 soundId, sint16 x, sint16 y, sint16 z); +int32_t audio_play_sound_at_location(int32_t soundId, int16_t x, int16_t y, int16_t z); /** * Populates the gAudioDevices array with the available audio devices. */ diff --git a/src/openrct2/cmdline/BenchGfxCommmands.cpp b/src/openrct2/cmdline/BenchGfxCommmands.cpp index 608e260542..0b3bc66580 100644 --- a/src/openrct2/cmdline/BenchGfxCommmands.cpp +++ b/src/openrct2/cmdline/BenchGfxCommmands.cpp @@ -22,8 +22,8 @@ const CommandLineCommand CommandLine::BenchGfxCommands[] static exitcode_t HandleBenchGfx(CommandLineArgEnumerator *argEnumerator) { const char * * argv = (const char * *)argEnumerator->GetArguments() + argEnumerator->GetIndex(); - sint32 argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); - sint32 result = cmdline_for_gfxbench(argv, argc); + int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); + int32_t result = cmdline_for_gfxbench(argv, argc); if (result < 0) { return EXITCODE_FAIL; } diff --git a/src/openrct2/cmdline/CommandLine.cpp b/src/openrct2/cmdline/CommandLine.cpp index f9348e0ce3..72fd0bf106 100644 --- a/src/openrct2/cmdline/CommandLine.cpp +++ b/src/openrct2/cmdline/CommandLine.cpp @@ -17,7 +17,7 @@ #pragma region CommandLineArgEnumerator -CommandLineArgEnumerator::CommandLineArgEnumerator(const char * const * arguments, sint32 count) +CommandLineArgEnumerator::CommandLineArgEnumerator(const char * const * arguments, int32_t count) { _arguments = arguments; _count = count; @@ -55,12 +55,12 @@ bool CommandLineArgEnumerator::TryPop() } } -bool CommandLineArgEnumerator::TryPopInteger(sint32 * result) +bool CommandLineArgEnumerator::TryPopInteger(int32_t * result) { char const * arg; if (TryPopString(&arg)) { - *result = (sint32)atol(arg); + *result = (int32_t)atol(arg); return true; } @@ -487,7 +487,7 @@ namespace CommandLine *((bool *)option->OutAddress) = true; return true; case CMDLINE_TYPE_INTEGER: - *((sint32 *)option->OutAddress) = (sint32)atol(valueString); + *((int32_t *)option->OutAddress) = (int32_t)atol(valueString); return true; case CMDLINE_TYPE_REAL: *((float *)option->OutAddress) = (float)atof(valueString); @@ -541,7 +541,7 @@ namespace CommandLine } } // namespace CommandLine -sint32 cmdline_run(const char * * argv, sint32 argc) +int32_t cmdline_run(const char * * argv, int32_t argc) { auto argEnumerator = CommandLineArgEnumerator(argv, argc); diff --git a/src/openrct2/cmdline/CommandLine.hpp b/src/openrct2/cmdline/CommandLine.hpp index 659281bd0b..adbb79f16a 100644 --- a/src/openrct2/cmdline/CommandLine.hpp +++ b/src/openrct2/cmdline/CommandLine.hpp @@ -18,25 +18,25 @@ class CommandLineArgEnumerator final { private: const char * const * _arguments; - uint16 _count; - uint16 _index; + uint16_t _count; + uint16_t _index; public: const char * const * GetArguments() const { return _arguments; } - uint16 GetCount() const { return _count; } - uint16 GetIndex() const { return _index; } + uint16_t GetCount() const { return _count; } + uint16_t GetIndex() const { return _index; } - CommandLineArgEnumerator(const char * const * arguments, sint32 count); + CommandLineArgEnumerator(const char * const * arguments, int32_t count); void Reset(); bool Backtrack(); bool TryPop(); - bool TryPopInteger(sint32 * result); + bool TryPopInteger(int32_t * result); bool TryPopReal(float * result); bool TryPopString(const char * * result); }; -using exitcode_t = sint32; +using exitcode_t = int32_t; using CommandLineFunc = exitcode_t (*)(CommandLineArgEnumerator *); enum @@ -54,7 +54,7 @@ struct CommandLineExample struct CommandLineOptionDefinition { - uint8 Type; + uint8_t Type; void * OutAddress; char ShortName; const char * LongName; diff --git a/src/openrct2/cmdline/ConvertCommand.cpp b/src/openrct2/cmdline/ConvertCommand.cpp index 3117f2d629..7a137cbc8d 100644 --- a/src/openrct2/cmdline/ConvertCommand.cpp +++ b/src/openrct2/cmdline/ConvertCommand.cpp @@ -19,8 +19,8 @@ #include "../interface/Window.h" #include "../OpenRCT2.h" -static void WriteConvertFromAndToMessage(uint32 sourceFileType, uint32 destinationFileType); -static const utf8 * GetFileTypeFriendlyName(uint32 fileType); +static void WriteConvertFromAndToMessage(uint32_t sourceFileType, uint32_t destinationFileType); +static const utf8 * GetFileTypeFriendlyName(uint32_t fileType); exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator * enumerator) { @@ -40,7 +40,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator * enumerat utf8 sourcePath[MAX_PATH]; Path::GetAbsolute(sourcePath, sizeof(sourcePath), rawSourcePath); - uint32 sourceFileType = get_file_extension_type(sourcePath); + uint32_t sourceFileType = get_file_extension_type(sourcePath); // Get the destination path const utf8 * rawDestinationPath; @@ -52,7 +52,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator * enumerat utf8 destinationPath[MAX_PATH]; Path::GetAbsolute(destinationPath, sizeof(sourcePath), rawDestinationPath); - uint32 destinationFileType = get_file_extension_type(destinationPath); + uint32_t destinationFileType = get_file_extension_type(destinationPath); // Validate target type if (destinationFileType != FILE_EXTENSION_SC6 && @@ -143,7 +143,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator * enumerat return EXITCODE_OK; } -static void WriteConvertFromAndToMessage(uint32 sourceFileType, uint32 destinationFileType) +static void WriteConvertFromAndToMessage(uint32_t sourceFileType, uint32_t destinationFileType) { const utf8 * sourceFileTypeName = GetFileTypeFriendlyName(sourceFileType); const utf8 * destinationFileTypeName = GetFileTypeFriendlyName(destinationFileType); @@ -151,7 +151,7 @@ static void WriteConvertFromAndToMessage(uint32 sourceFileType, uint32 destinati Console::WriteLine(); } -static const utf8 * GetFileTypeFriendlyName(uint32 fileType) +static const utf8 * GetFileTypeFriendlyName(uint32_t fileType) { switch (fileType) { case FILE_EXTENSION_SC4: return "RollerCoaster Tycoon 1 scenario"; diff --git a/src/openrct2/cmdline/RootCommands.cpp b/src/openrct2/cmdline/RootCommands.cpp index e91b41b15f..b692525a2b 100644 --- a/src/openrct2/cmdline/RootCommands.cpp +++ b/src/openrct2/cmdline/RootCommands.cpp @@ -35,12 +35,12 @@ #endif // USE_BREAKPAD #ifndef DISABLE_NETWORK -sint32 gNetworkStart = NETWORK_MODE_NONE; +int32_t gNetworkStart = NETWORK_MODE_NONE; char gNetworkStartHost[128]; -sint32 gNetworkStartPort = NETWORK_DEFAULT_PORT; +int32_t gNetworkStartPort = NETWORK_DEFAULT_PORT; char* gNetworkStartAddress = nullptr; -static uint32 _port = 0; +static uint32_t _port = 0; static char* _address = nullptr; #endif diff --git a/src/openrct2/cmdline/ScreenshotCommands.cpp b/src/openrct2/cmdline/ScreenshotCommands.cpp index 4d682f94f4..a547428fa7 100644 --- a/src/openrct2/cmdline/ScreenshotCommands.cpp +++ b/src/openrct2/cmdline/ScreenshotCommands.cpp @@ -41,8 +41,8 @@ const CommandLineCommand CommandLine::ScreenshotCommands[] static exitcode_t HandleScreenshot(CommandLineArgEnumerator *argEnumerator) { const char * * argv = (const char * *)argEnumerator->GetArguments() + argEnumerator->GetIndex(); - sint32 argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); - sint32 result = cmdline_for_screenshot(argv, argc, &options); + int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); + int32_t result = cmdline_for_screenshot(argv, argc, &options); if (result < 0) { return EXITCODE_FAIL; } diff --git a/src/openrct2/cmdline/SpriteCommands.cpp b/src/openrct2/cmdline/SpriteCommands.cpp index aba2e290f7..85922e1ac4 100644 --- a/src/openrct2/cmdline/SpriteCommands.cpp +++ b/src/openrct2/cmdline/SpriteCommands.cpp @@ -16,7 +16,7 @@ #define SZ_CLOSEST "closest" #define SZ_DITHERING "dithering" -sint32 gSpriteMode = 0; +int32_t gSpriteMode = 0; static const char * _mode; @@ -49,8 +49,8 @@ static exitcode_t HandleSprite(CommandLineArgEnumerator *argEnumerator) Memory::Free(_mode); const char * * argv = (const char * *)argEnumerator->GetArguments() + argEnumerator->GetIndex() - 1; - sint32 argc = argEnumerator->GetCount() - argEnumerator->GetIndex() + 1; - sint32 result = cmdline_for_sprite(argv, argc); + int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex() + 1; + int32_t result = cmdline_for_sprite(argv, argc); if (result < 0) { return EXITCODE_FAIL; } diff --git a/src/openrct2/cmdline/UriHandler.cpp b/src/openrct2/cmdline/UriHandler.cpp index 727942f73d..e37d8a2d2a 100644 --- a/src/openrct2/cmdline/UriHandler.cpp +++ b/src/openrct2/cmdline/UriHandler.cpp @@ -17,7 +17,7 @@ static exitcode_t HandleUri(const std::string &uri); #ifndef DISABLE_NETWORK static exitcode_t HandleUriJoin(const std::vector &args); -static bool TryParseHostnamePort(const std::string &hostnamePort, std::string * outHostname, sint32 * outPort, sint32 defaultPort); +static bool TryParseHostnamePort(const std::string &hostnamePort, std::string * outHostname, int32_t * outPort, int32_t defaultPort); #endif exitcode_t CommandLine::HandleCommandUri(CommandLineArgEnumerator * enumerator) @@ -58,7 +58,7 @@ static exitcode_t HandleUri(const std::string &uri) static exitcode_t HandleUriJoin(const std::vector &args) { std::string hostname; - sint32 port; + int32_t port; if (args.size() > 1 && TryParseHostnamePort(args[1], &hostname, &port, NETWORK_DEFAULT_PORT)) { // Set the network start configuration @@ -74,13 +74,13 @@ static exitcode_t HandleUriJoin(const std::vector &args) } } -static bool TryParseHostnamePort(const std::string &hostnamePort, std::string * outHostname, sint32 * outPort, sint32 defaultPort) +static bool TryParseHostnamePort(const std::string &hostnamePort, std::string * outHostname, int32_t * outPort, int32_t defaultPort) { try { // Argument is in hostname:port format, so we need to split std::string hostname = hostnamePort; - sint32 port = defaultPort; + int32_t port = defaultPort; size_t colonIndex = hostnamePort.find_first_of(':'); if (colonIndex != std::string::npos) { diff --git a/src/openrct2/common.h b/src/openrct2/common.h index a491aa23d0..51139c96cf 100644 --- a/src/openrct2/common.h +++ b/src/openrct2/common.h @@ -22,15 +22,6 @@ #include #include -using sint8 = int8_t; -using sint16 = int16_t; -using sint32 = int32_t; -using sint64 = int64_t; -using uint8 = uint8_t; -using uint16 = uint16_t; -using uint32 = uint32_t; -using uint64 = uint64_t; - #include "Diagnostic.h" using utf8 = char; @@ -47,17 +38,17 @@ using utf16string = utf16*; #define MAX_PATH 260 #endif -using codepoint_t = uint32; -using colour_t = uint8; +using codepoint_t = uint32_t; +using colour_t = uint8_t; -#define rol8(x, shift) (((uint8)(x) << (shift)) | ((uint8)(x) >> (8 - (shift)))) -#define ror8(x, shift) (((uint8)(x) >> (shift)) | ((uint8)(x) << (8 - (shift)))) -#define rol16(x, shift) (((uint16)(x) << (shift)) | ((uint16)(x) >> (16 - (shift)))) -#define ror16(x, shift) (((uint16)(x) >> (shift)) | ((uint16)(x) << (16 - (shift)))) -#define rol32(x, shift) (((uint32)(x) << (shift)) | ((uint32)(x) >> (32 - (shift)))) -#define ror32(x, shift) (((uint32)(x) >> (shift)) | ((uint32)(x) << (32 - (shift)))) -#define rol64(x, shift) (((uint64)(x) << (shift)) | ((uint32)(x) >> (64 - (shift)))) -#define ror64(x, shift) (((uint64)(x) >> (shift)) | ((uint32)(x) << (64 - (shift)))) +#define rol8(x, shift) (((uint8_t)(x) << (shift)) | ((uint8_t)(x) >> (8 - (shift)))) +#define ror8(x, shift) (((uint8_t)(x) >> (shift)) | ((uint8_t)(x) << (8 - (shift)))) +#define rol16(x, shift) (((uint16_t)(x) << (shift)) | ((uint16_t)(x) >> (16 - (shift)))) +#define ror16(x, shift) (((uint16_t)(x) >> (shift)) | ((uint16_t)(x) << (16 - (shift)))) +#define rol32(x, shift) (((uint32_t)(x) << (shift)) | ((uint32_t)(x) >> (32 - (shift)))) +#define ror32(x, shift) (((uint32_t)(x) >> (shift)) | ((uint32_t)(x) << (32 - (shift)))) +#define rol64(x, shift) (((uint64_t)(x) << (shift)) | ((uint32_t)(x) >> (64 - (shift)))) +#define ror64(x, shift) (((uint64_t)(x) >> (shift)) | ((uint32_t)(x) << (64 - (shift)))) // Rounds an integer down to the given power of 2. y must be a power of 2. #define floor2(x, y) ((x) & (~((y) - 1))) @@ -78,8 +69,8 @@ using colour_t = uint8; #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define RCT2_ENDIANESS __ORDER_LITTLE_ENDIAN__ -#define LOBYTE(w) ((uint8)(w)) -#define HIBYTE(w) ((uint8)(((uint16)(w)>>8)&0xFF)) +#define LOBYTE(w) ((uint8_t)(w)) +#define HIBYTE(w) ((uint8_t)(((uint16_t)(w)>>8)&0xFF)) #endif // __BYTE_ORDER__ #ifndef RCT2_ENDIANESS @@ -100,18 +91,18 @@ char *strndup(const char *src, size_t size); #define OPENRCT2_MASTER_SERVER_URL "https://servers.openrct2.io" // Time (represented as number of 100-nanosecond intervals since 0001-01-01T00:00:00Z) -using datetime64 = uint64; +using datetime64 = uint64_t; #define DATETIME64_MIN ((datetime64)0) // Represent fixed point numbers. dp = decimal point -using fixed8_1dp = uint8; -using fixed8_2dp = uint8; -using fixed16_1dp = sint16; -using fixed16_2dp = sint16; -using fixed32_1dp = sint32; -using fixed32_2dp = sint32; -using fixed64_1dp = sint64; +using fixed8_1dp = uint8_t; +using fixed8_2dp = uint8_t; +using fixed16_1dp = int16_t; +using fixed16_2dp = int16_t; +using fixed32_1dp = int32_t; +using fixed32_2dp = int32_t; +using fixed64_1dp = int64_t; // Money is stored as a multiple of 0.10. using money8 = fixed8_1dp; @@ -129,13 +120,13 @@ using money64 = fixed64_1dp; #define MONEY(whole, fraction) ((whole) * 10 + ((fraction) / 10)) #define MONEY_FREE MONEY(0,00) -#define MONEY16_UNDEFINED (money16)(uint16)0xFFFF +#define MONEY16_UNDEFINED (money16)(uint16_t)0xFFFF #define MONEY32_UNDEFINED ((money32)0x80000000) -using BannerIndex = uint8; +using BannerIndex = uint8_t; using EMPTY_ARGS_VOID_POINTER = void(); -using rct_string_id = uint16; +using rct_string_id = uint16_t; #define SafeFree(x) do { free(x); (x) = nullptr; } while (false) @@ -196,48 +187,48 @@ using rct_string_id = uint16; #pragma pack(push, 1) struct registers { union { - sint32 eax; - sint16 ax; + int32_t eax; + int16_t ax; struct { char al; char ah; }; }; union { - sint32 ebx; - sint16 bx; + int32_t ebx; + int16_t bx; struct { char bl; char bh; }; }; union { - sint32 ecx; - sint16 cx; + int32_t ecx; + int16_t cx; struct { char cl; char ch; }; }; union { - sint32 edx; - sint16 dx; + int32_t edx; + int16_t dx; struct { char dl; char dh; }; }; union { - sint32 esi; - sint16 si; + int32_t esi; + int16_t si; }; union { - sint32 edi; - sint16 di; + int32_t edi; + int16_t di; }; union { - sint32 ebp; - sint16 bp; + int32_t ebp; + int16_t bp; }; }; assert_struct_size(registers, 7 * 4); diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 6f8057cc9a..f776657059 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -39,89 +39,89 @@ namespace Config { #pragma region Enums - static const auto Enum_MeasurementFormat = ConfigEnum( + static const auto Enum_MeasurementFormat = ConfigEnum( { - ConfigEnumEntry("IMPERIAL", MEASUREMENT_FORMAT_IMPERIAL), - ConfigEnumEntry("METRIC", MEASUREMENT_FORMAT_METRIC), - ConfigEnumEntry("SI", MEASUREMENT_FORMAT_SI), + ConfigEnumEntry("IMPERIAL", MEASUREMENT_FORMAT_IMPERIAL), + ConfigEnumEntry("METRIC", MEASUREMENT_FORMAT_METRIC), + ConfigEnumEntry("SI", MEASUREMENT_FORMAT_SI), }); - static const auto Enum_Currency = ConfigEnum( + static const auto Enum_Currency = ConfigEnum( { - ConfigEnumEntry("GBP", CURRENCY_POUNDS), - ConfigEnumEntry("USD", CURRENCY_DOLLARS), - ConfigEnumEntry("FRF", CURRENCY_FRANC), - ConfigEnumEntry("DEM", CURRENCY_DEUTSCHMARK), - ConfigEnumEntry("JPY", CURRENCY_YEN), - ConfigEnumEntry("ESP", CURRENCY_PESETA), - ConfigEnumEntry("ITL", CURRENCY_LIRA), - ConfigEnumEntry("NLG", CURRENCY_GUILDERS), - ConfigEnumEntry("SEK", CURRENCY_KRONA), - ConfigEnumEntry("EUR", CURRENCY_EUROS), - ConfigEnumEntry("KRW", CURRENCY_WON), - ConfigEnumEntry("RUB", CURRENCY_ROUBLE), - ConfigEnumEntry("CZK", CURRENCY_CZECH_KORUNA), - ConfigEnumEntry("HKD", CURRENCY_HKD), - ConfigEnumEntry("TWD", CURRENCY_TWD), - ConfigEnumEntry("CNY", CURRENCY_YUAN), - ConfigEnumEntry("CUSTOM", CURRENCY_CUSTOM), + ConfigEnumEntry("GBP", CURRENCY_POUNDS), + ConfigEnumEntry("USD", CURRENCY_DOLLARS), + ConfigEnumEntry("FRF", CURRENCY_FRANC), + ConfigEnumEntry("DEM", CURRENCY_DEUTSCHMARK), + ConfigEnumEntry("JPY", CURRENCY_YEN), + ConfigEnumEntry("ESP", CURRENCY_PESETA), + ConfigEnumEntry("ITL", CURRENCY_LIRA), + ConfigEnumEntry("NLG", CURRENCY_GUILDERS), + ConfigEnumEntry("SEK", CURRENCY_KRONA), + ConfigEnumEntry("EUR", CURRENCY_EUROS), + ConfigEnumEntry("KRW", CURRENCY_WON), + ConfigEnumEntry("RUB", CURRENCY_ROUBLE), + ConfigEnumEntry("CZK", CURRENCY_CZECH_KORUNA), + ConfigEnumEntry("HKD", CURRENCY_HKD), + ConfigEnumEntry("TWD", CURRENCY_TWD), + ConfigEnumEntry("CNY", CURRENCY_YUAN), + ConfigEnumEntry("CUSTOM", CURRENCY_CUSTOM), }); - static const auto Enum_CurrencySymbolAffix = ConfigEnum( + static const auto Enum_CurrencySymbolAffix = ConfigEnum( { - ConfigEnumEntry("PREFIX", CURRENCY_PREFIX), - ConfigEnumEntry("SUFFIX", CURRENCY_SUFFIX), + ConfigEnumEntry("PREFIX", CURRENCY_PREFIX), + ConfigEnumEntry("SUFFIX", CURRENCY_SUFFIX), }); - static const auto Enum_DateFormat = ConfigEnum( + static const auto Enum_DateFormat = ConfigEnum( { - ConfigEnumEntry("DD/MM/YY", DATE_FORMAT_DAY_MONTH_YEAR), - ConfigEnumEntry("MM/DD/YY", DATE_FORMAT_MONTH_DAY_YEAR), - ConfigEnumEntry("YY/MM/DD", DATE_FORMAT_YEAR_MONTH_DAY), - ConfigEnumEntry("YY/DD/MM", DATE_FORMAT_YEAR_DAY_MONTH), + ConfigEnumEntry("DD/MM/YY", DATE_FORMAT_DAY_MONTH_YEAR), + ConfigEnumEntry("MM/DD/YY", DATE_FORMAT_MONTH_DAY_YEAR), + ConfigEnumEntry("YY/MM/DD", DATE_FORMAT_YEAR_MONTH_DAY), + ConfigEnumEntry("YY/DD/MM", DATE_FORMAT_YEAR_DAY_MONTH), }); - static const auto Enum_DrawingEngine = ConfigEnum( + static const auto Enum_DrawingEngine = ConfigEnum( { - ConfigEnumEntry("SOFTWARE", DRAWING_ENGINE_SOFTWARE), - ConfigEnumEntry("SOFTWARE_HWD", DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY), - ConfigEnumEntry("OPENGL", DRAWING_ENGINE_OPENGL), + ConfigEnumEntry("SOFTWARE", DRAWING_ENGINE_SOFTWARE), + ConfigEnumEntry("SOFTWARE_HWD", DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY), + ConfigEnumEntry("OPENGL", DRAWING_ENGINE_OPENGL), }); - static const auto Enum_Temperature = ConfigEnum( + static const auto Enum_Temperature = ConfigEnum( { - ConfigEnumEntry("CELSIUS", TEMPERATURE_FORMAT_C), - ConfigEnumEntry("FAHRENHEIT", TEMPERATURE_FORMAT_F), + ConfigEnumEntry("CELSIUS", TEMPERATURE_FORMAT_C), + ConfigEnumEntry("FAHRENHEIT", TEMPERATURE_FORMAT_F), }); - static const auto Enum_ScaleQuality = ConfigEnum( + static const auto Enum_ScaleQuality = ConfigEnum( { - ConfigEnumEntry("NEAREST_NEIGHBOUR", SCALE_QUALITY_NN), - ConfigEnumEntry("LINEAR", SCALE_QUALITY_LINEAR), - ConfigEnumEntry("SMOOTH_NEAREST_NEIGHBOUR", SCALE_QUALITY_SMOOTH_NN), + ConfigEnumEntry("NEAREST_NEIGHBOUR", SCALE_QUALITY_NN), + ConfigEnumEntry("LINEAR", SCALE_QUALITY_LINEAR), + ConfigEnumEntry("SMOOTH_NEAREST_NEIGHBOUR", SCALE_QUALITY_SMOOTH_NN), }); - static const auto Enum_VirtualFloorStyle = ConfigEnum( + static const auto Enum_VirtualFloorStyle = ConfigEnum( { - ConfigEnumEntry("OFF", VIRTUAL_FLOOR_STYLE_OFF), - ConfigEnumEntry("CLEAR", VIRTUAL_FLOOR_STYLE_CLEAR), - ConfigEnumEntry("GLASSY", VIRTUAL_FLOOR_STYLE_GLASSY), + ConfigEnumEntry("OFF", VIRTUAL_FLOOR_STYLE_OFF), + ConfigEnumEntry("CLEAR", VIRTUAL_FLOOR_STYLE_CLEAR), + ConfigEnumEntry("GLASSY", VIRTUAL_FLOOR_STYLE_GLASSY), }); /** * Config enum wrapping LanguagesDescriptors. */ - static class LanguageConfigEnum final : public IConfigEnum + static class LanguageConfigEnum final : public IConfigEnum { public: - std::string GetName(sint32 value) const override + std::string GetName(int32_t value) const override { return LanguagesDescriptors[value].locale; } - sint32 GetValue(const std::string &key, sint32 defaultValue) const override + int32_t GetValue(const std::string &key, int32_t defaultValue) const override { - sint32 i = 0; + int32_t i = 0; for (const auto &langDesc : LanguagesDescriptors) { if (String::Equals(key.c_str(), langDesc.locale)) @@ -142,47 +142,47 @@ namespace Config { auto model = &gConfigGeneral; model->always_show_gridlines = reader->GetBoolean("always_show_gridlines", false); - model->autosave_frequency = reader->GetSint32("autosave", AUTOSAVE_EVERY_5MINUTES); + model->autosave_frequency = reader->Getint32_t("autosave", AUTOSAVE_EVERY_5MINUTES); model->confirmation_prompt = reader->GetBoolean("confirmation_prompt", false); - model->currency_format = reader->GetEnum("currency_format", platform_get_locale_currency(), Enum_Currency); - model->custom_currency_rate = reader->GetSint32("custom_currency_rate", 10); - model->custom_currency_affix = reader->GetEnum("custom_currency_affix", CURRENCY_SUFFIX, Enum_CurrencySymbolAffix); + model->currency_format = reader->GetEnum("currency_format", platform_get_locale_currency(), Enum_Currency); + model->custom_currency_rate = reader->Getint32_t("custom_currency_rate", 10); + model->custom_currency_affix = reader->GetEnum("custom_currency_affix", CURRENCY_SUFFIX, Enum_CurrencySymbolAffix); model->custom_currency_symbol = reader->GetCString("custom_currency_symbol", "Ctm"); model->edge_scrolling = reader->GetBoolean("edge_scrolling", true); - model->edge_scrolling_speed = reader->GetSint32("edge_scrolling_speed", 12); - model->fullscreen_mode = reader->GetSint32("fullscreen_mode", 0); - model->fullscreen_height = reader->GetSint32("fullscreen_height", -1); - model->fullscreen_width = reader->GetSint32("fullscreen_width", -1); + model->edge_scrolling_speed = reader->Getint32_t("edge_scrolling_speed", 12); + model->fullscreen_mode = reader->Getint32_t("fullscreen_mode", 0); + model->fullscreen_height = reader->Getint32_t("fullscreen_height", -1); + model->fullscreen_width = reader->Getint32_t("fullscreen_width", -1); model->rct1_path = reader->GetCString("rct1_path", nullptr); model->rct2_path = reader->GetCString("game_path", nullptr); model->landscape_smoothing = reader->GetBoolean("landscape_smoothing", true); - model->language = reader->GetEnum("language", platform_get_locale_language(), Enum_LanguageEnum); - model->measurement_format = reader->GetEnum("measurement_format", platform_get_locale_measurement_format(), Enum_MeasurementFormat); + model->language = reader->GetEnum("language", platform_get_locale_language(), Enum_LanguageEnum); + model->measurement_format = reader->GetEnum("measurement_format", platform_get_locale_measurement_format(), Enum_MeasurementFormat); model->play_intro = reader->GetBoolean("play_intro", false); model->save_plugin_data = reader->GetBoolean("save_plugin_data", true); model->debugging_tools = reader->GetBoolean("debugging_tools", false); model->show_height_as_units = reader->GetBoolean("show_height_as_units", false); - model->temperature_format = reader->GetEnum("temperature_format", platform_get_locale_temperature_format(), Enum_Temperature); - model->window_height = reader->GetSint32("window_height", -1); - model->window_snap_proximity = reader->GetSint32("window_snap_proximity", 5); - model->window_width = reader->GetSint32("window_width", -1); - model->default_display = reader->GetSint32("default_display", 0); - model->drawing_engine = reader->GetEnum("drawing_engine", DRAWING_ENGINE_SOFTWARE, Enum_DrawingEngine); + model->temperature_format = reader->GetEnum("temperature_format", platform_get_locale_temperature_format(), Enum_Temperature); + model->window_height = reader->Getint32_t("window_height", -1); + model->window_snap_proximity = reader->Getint32_t("window_snap_proximity", 5); + model->window_width = reader->Getint32_t("window_width", -1); + model->default_display = reader->Getint32_t("default_display", 0); + model->drawing_engine = reader->GetEnum("drawing_engine", DRAWING_ENGINE_SOFTWARE, Enum_DrawingEngine); model->uncap_fps = reader->GetBoolean("uncap_fps", false); model->use_vsync = reader->GetBoolean("use_vsync", true); - model->virtual_floor_style = reader->GetEnum("virtual_floor_style", VIRTUAL_FLOOR_STYLE_GLASSY, Enum_VirtualFloorStyle); + model->virtual_floor_style = reader->GetEnum("virtual_floor_style", VIRTUAL_FLOOR_STYLE_GLASSY, Enum_VirtualFloorStyle); // Default config setting is false until ghost trains are implemented #4540 model->test_unfinished_tracks = reader->GetBoolean("test_unfinished_tracks", false); model->no_test_crashes = reader->GetBoolean("no_test_crashes", false); - model->date_format = reader->GetEnum("date_format", platform_get_locale_date_format(), Enum_DateFormat); + model->date_format = reader->GetEnum("date_format", platform_get_locale_date_format(), Enum_DateFormat); model->auto_staff_placement = reader->GetBoolean("auto_staff", true); model->handymen_mow_default = reader->GetBoolean("handymen_mow_default", false); - model->default_inspection_interval = reader->GetSint32("default_inspection_interval", 2); + model->default_inspection_interval = reader->Getint32_t("default_inspection_interval", 2); model->last_run_version = reader->GetCString("last_run_version", nullptr); model->invert_viewport_drag = reader->GetBoolean("invert_viewport_drag", false); - model->load_save_sort = reader->GetSint32("load_save_sort", SORT_NAME_ASCENDING); + model->load_save_sort = reader->Getint32_t("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 @@ -194,18 +194,18 @@ namespace Config model->allow_loading_with_incorrect_checksum = reader->GetBoolean("allow_loading_with_incorrect_checksum", true); model->steam_overlay_pause = reader->GetBoolean("steam_overlay_pause", true); model->window_scale = reader->GetFloat("window_scale", platform_get_default_scale()); - model->scale_quality = reader->GetEnum("scale_quality", SCALE_QUALITY_SMOOTH_NN, Enum_ScaleQuality); + model->scale_quality = reader->GetEnum("scale_quality", SCALE_QUALITY_SMOOTH_NN, Enum_ScaleQuality); model->show_fps = reader->GetBoolean("show_fps", false); model->trap_cursor = reader->GetBoolean("trap_cursor", false); model->auto_open_shops = reader->GetBoolean("auto_open_shops", false); - model->scenario_select_mode = reader->GetSint32("scenario_select_mode", SCENARIO_SELECT_MODE_ORIGIN); + model->scenario_select_mode = reader->Getint32_t("scenario_select_mode", SCENARIO_SELECT_MODE_ORIGIN); model->scenario_unlocking_enabled = reader->GetBoolean("scenario_unlocking_enabled", true); model->scenario_hide_mega_park = reader->GetBoolean("scenario_hide_mega_park", true); model->last_save_game_directory = reader->GetCString("last_game_directory", nullptr); model->last_save_landscape_directory = reader->GetCString("last_landscape_directory", nullptr); model->last_save_scenario_directory = reader->GetCString("last_scenario_directory", nullptr); model->last_save_track_directory = reader->GetCString("last_track_directory", nullptr); - model->window_limit = reader->GetSint32("window_limit", WINDOW_LIMIT_MAX); + model->window_limit = reader->Getint32_t("window_limit", WINDOW_LIMIT_MAX); model->zoom_to_cursor = reader->GetBoolean("zoom_to_cursor", true); model->render_weather_effects = reader->GetBoolean("render_weather_effects", true); model->render_weather_gloom = reader->GetBoolean("render_weather_gloom", true); @@ -220,43 +220,43 @@ namespace Config auto model = &gConfigGeneral; writer->WriteSection("general"); writer->WriteBoolean("always_show_gridlines", model->always_show_gridlines); - writer->WriteSint32("autosave", model->autosave_frequency); + writer->Writeint32_t("autosave", model->autosave_frequency); writer->WriteBoolean("confirmation_prompt", model->confirmation_prompt); - writer->WriteEnum("currency_format", model->currency_format, Enum_Currency); - writer->WriteSint32("custom_currency_rate", model->custom_currency_rate); - writer->WriteEnum("custom_currency_affix", model->custom_currency_affix, Enum_CurrencySymbolAffix); + writer->WriteEnum("currency_format", model->currency_format, Enum_Currency); + writer->Writeint32_t("custom_currency_rate", model->custom_currency_rate); + writer->WriteEnum("custom_currency_affix", model->custom_currency_affix, Enum_CurrencySymbolAffix); writer->WriteString("custom_currency_symbol", model->custom_currency_symbol); writer->WriteBoolean("edge_scrolling", model->edge_scrolling); - writer->WriteSint32("edge_scrolling_speed", model->edge_scrolling_speed); - writer->WriteSint32("fullscreen_mode", model->fullscreen_mode); - writer->WriteSint32("fullscreen_height", model->fullscreen_height); - writer->WriteSint32("fullscreen_width", model->fullscreen_width); + writer->Writeint32_t("edge_scrolling_speed", model->edge_scrolling_speed); + writer->Writeint32_t("fullscreen_mode", model->fullscreen_mode); + writer->Writeint32_t("fullscreen_height", model->fullscreen_height); + writer->Writeint32_t("fullscreen_width", model->fullscreen_width); writer->WriteString("rct1_path", model->rct1_path); writer->WriteString("game_path", model->rct2_path); writer->WriteBoolean("landscape_smoothing", model->landscape_smoothing); - writer->WriteEnum("language", model->language, Enum_LanguageEnum); - writer->WriteEnum("measurement_format", model->measurement_format, Enum_MeasurementFormat); + writer->WriteEnum("language", model->language, Enum_LanguageEnum); + writer->WriteEnum("measurement_format", model->measurement_format, Enum_MeasurementFormat); writer->WriteBoolean("play_intro", model->play_intro); writer->WriteBoolean("save_plugin_data", model->save_plugin_data); writer->WriteBoolean("debugging_tools", model->debugging_tools); writer->WriteBoolean("show_height_as_units", model->show_height_as_units); - writer->WriteEnum("temperature_format", model->temperature_format, Enum_Temperature); - writer->WriteSint32("window_height", model->window_height); - writer->WriteSint32("window_snap_proximity", model->window_snap_proximity); - writer->WriteSint32("window_width", model->window_width); - writer->WriteSint32("default_display", model->default_display); - writer->WriteEnum("drawing_engine", model->drawing_engine, Enum_DrawingEngine); + writer->WriteEnum("temperature_format", model->temperature_format, Enum_Temperature); + writer->Writeint32_t("window_height", model->window_height); + writer->Writeint32_t("window_snap_proximity", model->window_snap_proximity); + writer->Writeint32_t("window_width", model->window_width); + writer->Writeint32_t("default_display", model->default_display); + writer->WriteEnum("drawing_engine", model->drawing_engine, Enum_DrawingEngine); writer->WriteBoolean("uncap_fps", model->uncap_fps); writer->WriteBoolean("use_vsync", model->use_vsync); writer->WriteBoolean("test_unfinished_tracks", model->test_unfinished_tracks); writer->WriteBoolean("no_test_crashes", model->no_test_crashes); - writer->WriteEnum("date_format", model->date_format, Enum_DateFormat); + writer->WriteEnum("date_format", model->date_format, Enum_DateFormat); writer->WriteBoolean("auto_staff", model->auto_staff_placement); writer->WriteBoolean("handymen_mow_default", model->handymen_mow_default); - writer->WriteSint32("default_inspection_interval", model->default_inspection_interval); + writer->Writeint32_t("default_inspection_interval", model->default_inspection_interval); writer->WriteString("last_run_version", model->last_run_version); writer->WriteBoolean("invert_viewport_drag", model->invert_viewport_drag); - writer->WriteSint32("load_save_sort", model->load_save_sort); + writer->Writeint32_t("load_save_sort", model->load_save_sort); writer->WriteBoolean("minimize_fullscreen_focus_loss", model->minimize_fullscreen_focus_loss); writer->WriteBoolean("day_night_cycle", model->day_night_cycle); writer->WriteBoolean("enable_light_fx", model->enable_light_fx); @@ -265,25 +265,25 @@ namespace Config writer->WriteBoolean("allow_loading_with_incorrect_checksum", model->allow_loading_with_incorrect_checksum); writer->WriteBoolean("steam_overlay_pause", model->steam_overlay_pause); writer->WriteFloat("window_scale", model->window_scale); - writer->WriteEnum("scale_quality", model->scale_quality, Enum_ScaleQuality); + writer->WriteEnum("scale_quality", model->scale_quality, Enum_ScaleQuality); writer->WriteBoolean("show_fps", model->show_fps); writer->WriteBoolean("trap_cursor", model->trap_cursor); writer->WriteBoolean("auto_open_shops", model->auto_open_shops); - writer->WriteSint32("scenario_select_mode", model->scenario_select_mode); + writer->Writeint32_t("scenario_select_mode", model->scenario_select_mode); writer->WriteBoolean("scenario_unlocking_enabled", model->scenario_unlocking_enabled); writer->WriteBoolean("scenario_hide_mega_park", model->scenario_hide_mega_park); writer->WriteString("last_game_directory", model->last_save_game_directory); writer->WriteString("last_landscape_directory", model->last_save_landscape_directory); writer->WriteString("last_scenario_directory", model->last_save_scenario_directory); writer->WriteString("last_track_directory", model->last_save_track_directory); - writer->WriteSint32("window_limit", model->window_limit); + writer->Writeint32_t("window_limit", model->window_limit); writer->WriteBoolean("zoom_to_cursor", model->zoom_to_cursor); writer->WriteBoolean("render_weather_effects", model->render_weather_effects); writer->WriteBoolean("render_weather_gloom", model->render_weather_gloom); writer->WriteBoolean("show_guest_purchases", model->show_guest_purchases); writer->WriteBoolean("show_real_names_of_guests", model->show_real_names_of_guests); writer->WriteBoolean("allow_early_completion", model->allow_early_completion); - writer->WriteEnum("virtual_floor_style", model->virtual_floor_style, Enum_VirtualFloorStyle); + writer->WriteEnum("virtual_floor_style", model->virtual_floor_style, Enum_VirtualFloorStyle); } static void ReadInterface(IIniReader * reader) @@ -299,7 +299,7 @@ namespace Config model->console_small_font = reader->GetBoolean("console_small_font", false); model->current_theme_preset = reader->GetCString("current_theme", "*RCT2"); model->current_title_sequence_preset = reader->GetCString("current_title_sequence", "*OPENRCT2"); - model->object_selection_filter_flags = reader->GetSint32("object_selection_filter_flags", 0x3FFF); + model->object_selection_filter_flags = reader->Getint32_t("object_selection_filter_flags", 0x3FFF); } } @@ -315,7 +315,7 @@ namespace Config writer->WriteBoolean("console_small_font", model->console_small_font); writer->WriteString("current_theme", model->current_theme_preset); writer->WriteString("current_title_sequence", model->current_title_sequence_preset); - writer->WriteSint32("object_selection_filter_flags", model->object_selection_filter_flags); + writer->Writeint32_t("object_selection_filter_flags", model->object_selection_filter_flags); } static void ReadSound(IIniReader * reader) @@ -323,12 +323,12 @@ namespace Config if (reader->ReadSection("sound")) { auto model = &gConfigSound; - model->master_volume = reader->GetSint32("master_volume", 100); - model->title_music = reader->GetSint32("title_music", 2); + model->master_volume = reader->Getint32_t("master_volume", 100); + model->title_music = reader->Getint32_t("title_music", 2); model->sound_enabled = reader->GetBoolean("sound", true); - model->sound_volume = reader->GetSint32("sound_volume", 100); + model->sound_volume = reader->Getint32_t("sound_volume", 100); model->ride_music_enabled = reader->GetBoolean("ride_music", true); - model->ride_music_volume = reader->GetSint32("ride_music_volume", 100); + model->ride_music_volume = reader->Getint32_t("ride_music_volume", 100); model->audio_focus = reader->GetBoolean("audio_focus", false); model->device = reader->GetCString("audio_device", nullptr); } @@ -338,12 +338,12 @@ namespace Config { auto model = &gConfigSound; writer->WriteSection("sound"); - writer->WriteSint32("master_volume", model->master_volume); - writer->WriteSint32("title_music", model->title_music); + writer->Writeint32_t("master_volume", model->master_volume); + writer->Writeint32_t("title_music", model->title_music); writer->WriteBoolean("sound", model->sound_enabled); - writer->WriteSint32("sound_volume", model->sound_volume); + writer->Writeint32_t("sound_volume", model->sound_volume); writer->WriteBoolean("ride_music", model->ride_music_enabled); - writer->WriteSint32("ride_music_volume", model->ride_music_volume); + writer->Writeint32_t("ride_music_volume", model->ride_music_volume); writer->WriteBoolean("audio_focus", model->audio_focus); writer->WriteString("audio_device", model->device); } @@ -370,12 +370,12 @@ namespace Config auto model = &gConfigNetwork; model->player_name = String::Duplicate(playerName); - model->default_port = reader->GetSint32("default_port", NETWORK_DEFAULT_PORT); + model->default_port = reader->Getint32_t("default_port", NETWORK_DEFAULT_PORT); model->listen_address = reader->GetCString("listen_address", ""); model->default_password = reader->GetCString("default_password", nullptr); model->stay_connected = reader->GetBoolean("stay_connected", true); model->advertise = reader->GetBoolean("advertise", true); - model->maxplayers = reader->GetSint32("maxplayers", 16); + model->maxplayers = reader->Getint32_t("maxplayers", 16); model->server_name = reader->GetCString("server_name", "Server"); model->server_description = reader->GetCString("server_description", nullptr); model->server_greeting = reader->GetCString("server_greeting", nullptr); @@ -395,12 +395,12 @@ namespace Config auto model = &gConfigNetwork; writer->WriteSection("network"); writer->WriteString("player_name", model->player_name); - writer->WriteSint32("default_port", model->default_port); + writer->Writeint32_t("default_port", model->default_port); writer->WriteString("listen_address", model->listen_address); writer->WriteString("default_password", model->default_password); writer->WriteBoolean("stay_connected", model->stay_connected); writer->WriteBoolean("advertise", model->advertise); - writer->WriteSint32("maxplayers", model->maxplayers); + writer->Writeint32_t("maxplayers", model->maxplayers); writer->WriteString("server_name", model->server_name); writer->WriteString("server_description", model->server_description); writer->WriteString("server_greeting", model->server_greeting); @@ -497,18 +497,18 @@ namespace Config auto model = &gConfigFonts; model->file_name = reader->GetCString("file_name", nullptr); model->font_name = reader->GetCString("font_name", nullptr); - model->x_offset = reader->GetSint32("x_offset", false); - model->y_offset = reader->GetSint32("y_offset", true); - model->size_tiny = reader->GetSint32("size_tiny", true); - model->size_small = reader->GetSint32("size_small", false); - model->size_medium = reader->GetSint32("size_medium", false); - model->size_big = reader->GetSint32("size_big", false); - model->height_tiny = reader->GetSint32("height_tiny", false); - model->height_small = reader->GetSint32("height_small", false); - model->height_medium = reader->GetSint32("height_medium", false); - model->height_big = reader->GetSint32("height_big", false); + model->x_offset = reader->Getint32_t("x_offset", false); + model->y_offset = reader->Getint32_t("y_offset", true); + model->size_tiny = reader->Getint32_t("size_tiny", true); + model->size_small = reader->Getint32_t("size_small", false); + model->size_medium = reader->Getint32_t("size_medium", false); + model->size_big = reader->Getint32_t("size_big", false); + model->height_tiny = reader->Getint32_t("height_tiny", false); + model->height_small = reader->Getint32_t("height_small", false); + model->height_medium = reader->Getint32_t("height_medium", false); + model->height_big = reader->Getint32_t("height_big", false); model->enable_hinting = reader->GetBoolean("enable_hinting", true); - model->hinting_threshold = reader->GetSint32("hinting_threshold", false); + model->hinting_threshold = reader->Getint32_t("hinting_threshold", false); } } @@ -518,18 +518,18 @@ namespace Config writer->WriteSection("font"); writer->WriteString("file_name", model->file_name); writer->WriteString("font_name", model->font_name); - writer->WriteSint32("x_offset", model->x_offset); - writer->WriteSint32("y_offset", model->y_offset); - writer->WriteSint32("size_tiny", model->size_tiny); - writer->WriteSint32("size_small", model->size_small); - writer->WriteSint32("size_medium", model->size_medium); - writer->WriteSint32("size_big", model->size_big); - writer->WriteSint32("height_tiny", model->height_tiny); - writer->WriteSint32("height_small", model->height_small); - writer->WriteSint32("height_medium", model->height_medium); - writer->WriteSint32("height_big", model->height_big); + writer->Writeint32_t("x_offset", model->x_offset); + writer->Writeint32_t("y_offset", model->y_offset); + writer->Writeint32_t("size_tiny", model->size_tiny); + writer->Writeint32_t("size_small", model->size_small); + writer->Writeint32_t("size_medium", model->size_medium); + writer->Writeint32_t("size_big", model->size_big); + writer->Writeint32_t("height_tiny", model->height_tiny); + writer->Writeint32_t("height_small", model->height_small); + writer->Writeint32_t("height_medium", model->height_medium); + writer->Writeint32_t("height_big", model->height_big); writer->WriteBoolean("enable_hinting", model->enable_hinting); - writer->WriteSint32("hinting_threshold", model->hinting_threshold); + writer->Writeint32_t("hinting_threshold", model->hinting_threshold); } static bool SetDefaults() diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 1c477b73f6..a5936b49f7 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -18,15 +18,15 @@ struct GeneralConfiguration utf8 * rct2_path; // Display - sint32 default_display; - sint32 window_width; - sint32 window_height; - sint32 fullscreen_mode; - sint32 fullscreen_width; - sint32 fullscreen_height; + int32_t default_display; + int32_t window_width; + int32_t window_height; + int32_t fullscreen_mode; + int32_t fullscreen_width; + int32_t fullscreen_height; float window_scale; - sint32 drawing_engine; - sint32 scale_quality; + int32_t drawing_engine; + int32_t scale_quality; bool uncap_fps; bool use_vsync; bool show_fps; @@ -35,7 +35,7 @@ struct GeneralConfiguration // Map rendering bool landscape_smoothing; bool always_show_gridlines; - sint32 virtual_floor_style; + int32_t virtual_floor_style; bool day_night_cycle; bool enable_light_fx; bool upper_case_banners; @@ -45,38 +45,38 @@ struct GeneralConfiguration bool show_guest_purchases; // Localisation - sint32 language; - sint32 measurement_format; - sint32 temperature_format; + int32_t language; + int32_t measurement_format; + int32_t temperature_format; bool show_height_as_units; - sint32 date_format; - sint32 currency_format; - sint32 custom_currency_rate; - sint32 custom_currency_affix; + int32_t date_format; + int32_t currency_format; + int32_t custom_currency_rate; + int32_t custom_currency_affix; utf8 * custom_currency_symbol; // Controls bool edge_scrolling; - sint32 edge_scrolling_speed; + int32_t edge_scrolling_speed; bool trap_cursor; bool invert_viewport_drag; bool zoom_to_cursor; // Miscellaneous bool play_intro; - sint32 window_snap_proximity; + int32_t window_snap_proximity; bool allow_loading_with_incorrect_checksum; bool save_plugin_data; bool test_unfinished_tracks; bool no_test_crashes; bool debugging_tools; - sint32 autosave_frequency; + int32_t autosave_frequency; bool auto_staff_placement; bool handymen_mow_default; bool auto_open_shops; - sint32 default_inspection_interval; - sint32 window_limit; - sint32 scenario_select_mode; + int32_t default_inspection_interval; + int32_t window_limit; + int32_t scenario_select_mode; bool scenario_unlocking_enabled; bool scenario_hide_mega_park; bool steam_overlay_pause; @@ -84,7 +84,7 @@ struct GeneralConfiguration bool allow_early_completion; bool confirmation_prompt; - sint32 load_save_sort; + int32_t load_save_sort; utf8 * last_save_game_directory; utf8 * last_save_landscape_directory; utf8 * last_save_scenario_directory; @@ -102,18 +102,18 @@ struct InterfaceConfiguration bool console_small_font; utf8 * current_theme_preset; utf8 * current_title_sequence_preset; - sint32 object_selection_filter_flags; + int32_t object_selection_filter_flags; }; struct SoundConfiguration { utf8 * device; - uint8 master_volume; - uint8 title_music; + uint8_t master_volume; + uint8_t title_music; bool sound_enabled; - uint8 sound_volume; + uint8_t sound_volume; bool ride_music_enabled; - uint8 ride_music_volume; + uint8_t ride_music_volume; bool audio_focus; }; @@ -131,12 +131,12 @@ struct TwitchConfiguration struct NetworkConfiguration { utf8 * player_name; - sint32 default_port; + int32_t default_port; char * listen_address; utf8 * default_password; bool stay_connected; bool advertise; - sint32 maxplayers; + int32_t maxplayers; utf8 * server_name; utf8 * server_description; utf8 * server_greeting; @@ -175,18 +175,18 @@ struct FontConfiguration { utf8 * file_name; utf8 * font_name; - sint32 x_offset; - sint32 y_offset; - sint32 size_tiny; - sint32 size_small; - sint32 size_medium; - sint32 size_big; - sint32 height_tiny; - sint32 height_small; - sint32 height_medium; - sint32 height_big; + int32_t x_offset; + int32_t y_offset; + int32_t size_tiny; + int32_t size_small; + int32_t size_medium; + int32_t size_big; + int32_t height_tiny; + int32_t height_small; + int32_t height_medium; + int32_t height_big; bool enable_hinting; - sint32 hinting_threshold; + int32_t hinting_threshold; }; enum SORT diff --git a/src/openrct2/config/IniReader.cpp b/src/openrct2/config/IniReader.cpp index 70234766e7..d96560f8b1 100644 --- a/src/openrct2/config/IniReader.cpp +++ b/src/openrct2/config/IniReader.cpp @@ -86,7 +86,7 @@ struct StringICmp class IniReader final : public IIniReader { private: - std::vector _buffer; + std::vector _buffer; std::vector _lines; std::unordered_map _sections; std::unordered_map _values; @@ -94,7 +94,7 @@ private: public: explicit IniReader(IStream * stream) { - uint64 length = stream->GetLength() - stream->GetPosition(); + uint64_t length = stream->GetLength() - stream->GetPosition(); _buffer.resize(length); stream->Read(_buffer.data(), length); @@ -134,9 +134,9 @@ public: return result; } - sint32 GetSint32(const std::string &name, sint32 defaultValue) const override + int32_t Getint32_t(const std::string &name, int32_t defaultValue) const override { - sint32 result = defaultValue; + int32_t result = defaultValue; std::string value; if (TryGetString(name, &value)) { @@ -379,7 +379,7 @@ public: return defaultValue; } - sint32 GetSint32([[maybe_unused]] const std::string& name, sint32 defaultValue) const override + int32_t Getint32_t([[maybe_unused]] const std::string& name, int32_t defaultValue) const override { return defaultValue; } diff --git a/src/openrct2/config/IniReader.hpp b/src/openrct2/config/IniReader.hpp index 7c5875fc47..6f7639897b 100644 --- a/src/openrct2/config/IniReader.hpp +++ b/src/openrct2/config/IniReader.hpp @@ -22,7 +22,7 @@ interface IIniReader virtual bool ReadSection(const std::string &name) abstract; virtual bool GetBoolean(const std::string &name, bool defaultValue) const abstract; - virtual sint32 GetSint32(const std::string &name, sint32 defaultValue) const abstract; + virtual int32_t Getint32_t(const std::string &name, int32_t defaultValue) const abstract; virtual float GetFloat(const std::string &name, float defaultValue) const abstract; virtual std::string GetString(const std::string &name, const std::string &defaultValue) const abstract; virtual bool TryGetString(const std::string &name, std::string * outValue) const abstract; diff --git a/src/openrct2/config/IniWriter.cpp b/src/openrct2/config/IniWriter.cpp index 89a67d0640..bd2bf59069 100644 --- a/src/openrct2/config/IniWriter.cpp +++ b/src/openrct2/config/IniWriter.cpp @@ -42,7 +42,7 @@ public: WriteProperty(name, value ? "true" : "false"); } - void WriteSint32(const std::string &name, sint32 value) override + void Writeint32_t(const std::string &name, int32_t value) override { WriteProperty(name, std::to_string(value)); } diff --git a/src/openrct2/config/IniWriter.hpp b/src/openrct2/config/IniWriter.hpp index 698b2c8685..9e68a0b206 100644 --- a/src/openrct2/config/IniWriter.hpp +++ b/src/openrct2/config/IniWriter.hpp @@ -22,7 +22,7 @@ interface IIniWriter virtual void WriteSection(const std::string &name) abstract; virtual void WriteBoolean(const std::string &name, bool value) abstract; - virtual void WriteSint32(const std::string &name, sint32 value) abstract; + virtual void Writeint32_t(const std::string &name, int32_t value) abstract; virtual void WriteFloat(const std::string &name, float value) abstract; virtual void WriteString(const std::string &name, const std::string &value) abstract; virtual void WriteEnum(const std::string &name, const std::string &key) abstract; @@ -33,7 +33,7 @@ interface IIniWriter std::string key = configEnum.GetName(value); if (key.empty()) { - WriteSint32(name, value); + Writeint32_t(name, value); } else { diff --git a/src/openrct2/core/DataSerialiserTraits.h b/src/openrct2/core/DataSerialiserTraits.h index d8417ec50e..0dad1264f4 100644 --- a/src/openrct2/core/DataSerialiserTraits.h +++ b/src/openrct2/core/DataSerialiserTraits.h @@ -38,36 +38,36 @@ template<> struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> -struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; +struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> -struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; +struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> -struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; +struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> -struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; +struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> -struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; +struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> -struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; +struct DataSerializerTraits : public DataSerializerTraitsIntegral {}; template<> struct DataSerializerTraits { static void encode(IStream *stream, const std::string& str) { - uint16 len = (uint16)str.size(); - uint16 swapped = ByteSwapBE(len); + uint16_t len = (uint16_t)str.size(); + uint16_t swapped = ByteSwapBE(len); stream->Write(&swapped); stream->WriteArray(str.c_str(), len); } static void decode(IStream *stream, std::string& res) { - uint16 len; + uint16_t len; stream->Read(&len); len = ByteSwapBE(len); diff --git a/src/openrct2/core/Endianness.h b/src/openrct2/core/Endianness.h index e816c0bcd4..2079b6b009 100644 --- a/src/openrct2/core/Endianness.h +++ b/src/openrct2/core/Endianness.h @@ -17,7 +17,7 @@ struct ByteSwapT { }; template <> struct ByteSwapT<1> { - static uint8 SwapBE(uint8 value) + static uint8_t SwapBE(uint8_t value) { return value; } @@ -26,18 +26,18 @@ struct ByteSwapT<1> template <> struct ByteSwapT<2> { - static uint16 SwapBE(uint16 value) + static uint16_t SwapBE(uint16_t value) { - return (uint16)((value << 8) | (value >> 8)); + return (uint16_t)((value << 8) | (value >> 8)); } }; template <> struct ByteSwapT<4> { - static uint32 SwapBE(uint32 value) + static uint32_t SwapBE(uint32_t value) { - return (uint32)(((value << 24) | + return (uint32_t)(((value << 24) | ((value << 8) & 0x00FF0000) | ((value >> 8) & 0x0000FF00) | (value >> 24))); diff --git a/src/openrct2/core/File.cpp b/src/openrct2/core/File.cpp index 709fe2dde4..ad03c888c9 100644 --- a/src/openrct2/core/File.cpp +++ b/src/openrct2/core/File.cpp @@ -44,9 +44,9 @@ namespace File return platform_file_move(srcPath.c_str(), dstPath.c_str()); } - std::vector ReadAllBytes(const std::string_view& path) + std::vector ReadAllBytes(const std::string_view& path) { - std::vector result; + std::vector result; #if defined(_WIN32) && !defined(__MINGW32__) auto pathW = String::ToUtf16(std::string(path)); @@ -120,9 +120,9 @@ namespace File return lines; } - uint64 GetLastModified(const std::string &path) + uint64_t GetLastModified(const std::string &path) { - uint64 lastModified = 0; + uint64_t lastModified = 0; #ifdef _WIN32 auto pathW = utf8_to_widechar(path.c_str()); auto hFile = CreateFileW(pathW, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); @@ -131,7 +131,7 @@ namespace File FILETIME ftCreate, ftAccess, ftWrite; if (GetFileTime(hFile, &ftCreate, &ftAccess, &ftWrite)) { - lastModified = ((uint64)ftWrite.dwHighDateTime << 32ULL) | (uint64)ftWrite.dwLowDateTime; + lastModified = ((uint64_t)ftWrite.dwHighDateTime << 32ULL) | (uint64_t)ftWrite.dwLowDateTime; } CloseHandle(hFile); } diff --git a/src/openrct2/core/File.h b/src/openrct2/core/File.h index b7716140e6..dc6e869c66 100644 --- a/src/openrct2/core/File.h +++ b/src/openrct2/core/File.h @@ -20,9 +20,9 @@ namespace File bool Copy(const std::string &srcPath, const std::string &dstPath, bool overwrite); bool Delete(const std::string &path); bool Move(const std::string &srcPath, const std::string &dstPath); - std::vector ReadAllBytes(const std::string_view& path); + std::vector ReadAllBytes(const std::string_view& path); std::string ReadAllText(const std::string_view& path); void WriteAllBytes(const std::string &path, const void * buffer, size_t length); std::vector ReadAllLines(const std::string &path); - uint64 GetLastModified(const std::string &path); + uint64_t GetLastModified(const std::string &path); } // namespace File diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index e6a23b9846..9c26f84f8b 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -28,10 +28,10 @@ class FileIndex private: struct DirectoryStats { - uint32 TotalFiles = 0; - uint64 TotalFileSize = 0; - uint32 FileDateModifiedChecksum = 0; - uint32 PathChecksum = 0; + uint32_t TotalFiles = 0; + uint64_t TotalFileSize = 0; + uint32_t FileDateModifiedChecksum = 0; + uint32_t PathChecksum = 0; }; struct ScanResult @@ -48,21 +48,21 @@ private: struct FileIndexHeader { - uint32 HeaderSize = sizeof(FileIndexHeader); - uint32 MagicNumber = 0; - uint8 VersionA = 0; - uint8 VersionB = 0; - uint16 LanguageId = 0; + uint32_t HeaderSize = sizeof(FileIndexHeader); + uint32_t MagicNumber = 0; + uint8_t VersionA = 0; + uint8_t VersionB = 0; + uint16_t LanguageId = 0; DirectoryStats Stats; - uint32 NumItems = 0; + uint32_t NumItems = 0; }; // Index file format version which when incremented forces a rebuild - static constexpr uint8 FILE_INDEX_VERSION = 4; + static constexpr uint8_t FILE_INDEX_VERSION = 4; std::string const _name; - uint32 const _magicNumber; - uint8 const _version; + uint32_t const _magicNumber; + uint8_t const _version; std::string const _indexPath; std::string const _pattern; @@ -80,8 +80,8 @@ public: * @param paths A list of search directories. */ FileIndex(std::string name, - uint32 magicNumber, - uint8 version, + uint32_t magicNumber, + uint8_t version, std::string indexPath, std::string pattern, std::vector paths) : @@ -100,7 +100,7 @@ public: * Queries and directories and loads the index header. If the index is up to date, * the items are loaded from the index and returned, otherwise the index is rebuilt. */ - std::vector LoadOrBuild(sint32 language) const + std::vector LoadOrBuild(int32_t language) const { std::vector items; auto scanResult = Scan(); @@ -118,7 +118,7 @@ public: return items; } - std::vector Rebuild(sint32 language) const + std::vector Rebuild(int32_t language) const { auto scanResult = Scan(); auto items = Build(language, scanResult); @@ -130,7 +130,7 @@ protected: * Loads the given file and creates the item representing the data to store in the index. * TODO Use std::optional when C++17 is available. */ - virtual std::tuple Create(sint32 language, const std::string &path) const abstract; + virtual std::tuple Create(int32_t language, const std::string &path) const abstract; /** * Serialises an index item to the given stream. @@ -163,8 +163,8 @@ private: stats.TotalFiles++; stats.TotalFileSize += fileInfo->Size; stats.FileDateModifiedChecksum ^= - (uint32)(fileInfo->LastModified >> 32) ^ - (uint32)(fileInfo->LastModified & 0xFFFFFFFF); + (uint32_t)(fileInfo->LastModified >> 32) ^ + (uint32_t)(fileInfo->LastModified & 0xFFFFFFFF); stats.FileDateModifiedChecksum = ror32(stats.FileDateModifiedChecksum, 5); stats.PathChecksum += GetPathChecksum(path); } @@ -173,7 +173,7 @@ private: return ScanResult(stats, files); } - void BuildRange(sint32 language, + void BuildRange(int32_t language, const ScanResult &scanResult, size_t rangeStart, size_t rangeEnd, @@ -202,7 +202,7 @@ private: } } - std::vector Build(sint32 language, const ScanResult &scanResult) const + std::vector Build(int32_t language, const ScanResult &scanResult) const { std::vector allItems; Console::WriteLine("Building %s (%zu items)", _name.c_str(), scanResult.Files.size()); @@ -267,7 +267,7 @@ private: return allItems; } - std::tuple> ReadIndexFile(sint32 language, const DirectoryStats &stats) const + std::tuple> ReadIndexFile(int32_t language, const DirectoryStats &stats) const { bool loadedItems = false; std::vector items; @@ -292,7 +292,7 @@ private: { items.reserve(header.NumItems); // Directory is the same, just read the saved items - for (uint32 i = 0; i < header.NumItems; i++) + for (uint32_t i = 0; i < header.NumItems; i++) { auto item = Deserialise(&fs); items.push_back(item); @@ -313,7 +313,7 @@ private: return std::make_tuple(loadedItems, items); } - void WriteIndexFile(sint32 language, const DirectoryStats &stats, const std::vector &items) const + void WriteIndexFile(int32_t language, const DirectoryStats &stats, const std::vector &items) const { try { @@ -328,7 +328,7 @@ private: header.VersionB = _version; header.LanguageId = language; header.Stats = stats; - header.NumItems = (uint32)items.size(); + header.NumItems = (uint32_t)items.size(); fs.WriteValue(header); // Write items @@ -344,9 +344,9 @@ private: } } - static uint32 GetPathChecksum(const std::string &path) + static uint32_t GetPathChecksum(const std::string &path) { - uint32 hash = 0xD8430DED; + uint32_t hash = 0xD8430DED; for (const utf8 * ch = path.c_str(); *ch != '\0'; ch++) { hash += (*ch); diff --git a/src/openrct2/core/FileScanner.cpp b/src/openrct2/core/FileScanner.cpp index 5bec80fe8e..c1ad7282c1 100644 --- a/src/openrct2/core/FileScanner.cpp +++ b/src/openrct2/core/FileScanner.cpp @@ -45,11 +45,11 @@ struct DirectoryChild std::string Name; // Files only - uint64 Size = 0; - uint64 LastModified = 0; + uint64_t Size = 0; + uint64_t LastModified = 0; }; -static uint32 GetPathChecksum(const utf8 * path); +static uint32_t GetPathChecksum(const utf8 * path); static bool MatchWildcard(const utf8 * fileName, const utf8 * pattern); class FileScannerBase : public IFileScanner @@ -59,7 +59,7 @@ private: { std::string Path; std::vector Listing; - sint32 Index = 0; + int32_t Index = 0; }; // Options @@ -129,7 +129,7 @@ public: { DirectoryState * state = &_directoryStack.top(); state->Index++; - if (state->Index >= (sint32)state->Listing.size()) + if (state->Index >= (int32_t)state->Listing.size()) { _directoryStack.pop(); } @@ -266,8 +266,8 @@ private: else { result.Type = DIRECTORY_CHILD_TYPE::DC_FILE; - result.Size = ((uint64)child->nFileSizeHigh << 32ULL) | (uint64)child->nFileSizeLow; - result.LastModified = ((uint64)child->ftLastWriteTime.dwHighDateTime << 32ULL) | (uint64)child->ftLastWriteTime.dwLowDateTime; + result.Size = ((uint64_t)child->nFileSizeHigh << 32ULL) | (uint64_t)child->nFileSizeLow; + result.LastModified = ((uint64_t)child->ftLastWriteTime.dwHighDateTime << 32ULL) | (uint64_t)child->ftLastWriteTime.dwLowDateTime; } return result; } @@ -288,10 +288,10 @@ public: void GetDirectoryChildren(std::vector &children, const std::string &path) override { struct dirent * * namelist; - sint32 count = scandir(path.c_str(), &namelist, FilterFunc, alphasort); + int32_t count = scandir(path.c_str(), &namelist, FilterFunc, alphasort); if (count > 0) { - for (sint32 i = 0; i < count; i++) + for (int32_t i = 0; i < count; i++) { const struct dirent * node = namelist[i]; if (!String::Equals(node->d_name, ".") && @@ -307,7 +307,7 @@ public: } private: - static sint32 FilterFunc(const struct dirent * d) + static int32_t FilterFunc(const struct dirent * d) { return 1; } @@ -331,7 +331,7 @@ private: Path::Append(path, pathSize, node->d_name); struct stat statInfo{}; - sint32 statRes = stat(path, &statInfo); + int32_t statRes = stat(path, &statInfo); if (statRes != -1) { result.Size = statInfo.st_size; @@ -371,8 +371,8 @@ void Path::QueryDirectory(QueryDirectoryResult * result, const std::string &patt result->TotalFiles++; result->TotalFileSize += fileInfo->Size; result->FileDateModifiedChecksum ^= - (uint32)(fileInfo->LastModified >> 32) ^ - (uint32)(fileInfo->LastModified & 0xFFFFFFFF); + (uint32_t)(fileInfo->LastModified >> 32) ^ + (uint32_t)(fileInfo->LastModified & 0xFFFFFFFF); result->FileDateModifiedChecksum = ror32(result->FileDateModifiedChecksum, 5); result->PathChecksum += GetPathChecksum(path); } @@ -398,9 +398,9 @@ std::vector Path::GetDirectories(const std::string &path) return subDirectories; } -static uint32 GetPathChecksum(const utf8 * path) +static uint32_t GetPathChecksum(const utf8 * path) { - uint32 hash = 0xD8430DED; + uint32_t hash = 0xD8430DED; for (const utf8 * ch = path; *ch != '\0'; ch++) { hash += (*ch); diff --git a/src/openrct2/core/FileScanner.h b/src/openrct2/core/FileScanner.h index c91ee204a8..fbacd59bb7 100644 --- a/src/openrct2/core/FileScanner.h +++ b/src/openrct2/core/FileScanner.h @@ -16,8 +16,8 @@ struct FileInfo { const utf8 * Name; - uint64 Size; - uint64 LastModified; + uint64_t Size; + uint64_t LastModified; }; interface IFileScanner @@ -34,10 +34,10 @@ interface IFileScanner struct QueryDirectoryResult { - uint32 TotalFiles; - uint64 TotalFileSize; - uint32 FileDateModifiedChecksum; - uint32 PathChecksum; + uint32_t TotalFiles; + uint64_t TotalFileSize; + uint32_t FileDateModifiedChecksum; + uint32_t PathChecksum; }; namespace Path diff --git a/src/openrct2/core/FileStream.hpp b/src/openrct2/core/FileStream.hpp index 81ef565db7..37a0bb63fc 100644 --- a/src/openrct2/core/FileStream.hpp +++ b/src/openrct2/core/FileStream.hpp @@ -34,15 +34,15 @@ private: bool _canRead = false; bool _canWrite = false; bool _disposed = false; - uint64 _fileSize = 0; + uint64_t _fileSize = 0; public: - FileStream(const std::string &path, sint32 fileMode) : + FileStream(const std::string &path, int32_t fileMode) : FileStream(path.c_str(), fileMode) { } - FileStream(const utf8 * path, sint32 fileMode) + FileStream(const utf8 * path, int32_t fileMode) { const char * mode; switch (fileMode) { @@ -101,8 +101,8 @@ public: bool CanRead() const override { return _canRead; } bool CanWrite() const override { return _canWrite; } - uint64 GetLength() const override { return _fileSize; } - uint64 GetPosition() const override + uint64_t GetLength() const override { return _fileSize; } + uint64_t GetPosition() const override { #if defined(_MSC_VER) return _ftelli64(_file); @@ -113,12 +113,12 @@ public: #endif } - void SetPosition(uint64 position) override + void SetPosition(uint64_t position) override { Seek(position, STREAM_SEEK_BEGIN); } - void Seek(sint64 offset, sint32 origin) override + void Seek(int64_t offset, int32_t origin) override { #if defined(_MSC_VER) switch (origin) { @@ -159,9 +159,9 @@ public: #endif } - void Read(void * buffer, uint64 length) override + void Read(void * buffer, uint64_t length) override { - uint64 remainingBytes = GetLength() - GetPosition(); + uint64_t remainingBytes = GetLength() - GetPosition(); if (length <= remainingBytes) { if (fread(buffer, (size_t)length, 1, _file) == 1) @@ -172,18 +172,18 @@ public: throw IOException("Attempted to read past end of file."); } - void Write(const void * buffer, uint64 length) override + void Write(const void * buffer, uint64_t length) override { if (fwrite(buffer, (size_t)length, 1, _file) != 1) { throw IOException("Unable to write to file."); } - uint64 position = GetPosition(); + uint64_t position = GetPosition(); _fileSize = std::max(_fileSize, position); } - uint64 TryRead(void * buffer, uint64 length) override + uint64_t TryRead(void * buffer, uint64_t length) override { size_t readBytes = fread(buffer, 1, (size_t)length, _file); return readBytes; diff --git a/src/openrct2/core/Guard.cpp b/src/openrct2/core/Guard.cpp index 63d24a8c01..71e733d0b3 100644 --- a/src/openrct2/core/Guard.cpp +++ b/src/openrct2/core/Guard.cpp @@ -101,7 +101,7 @@ namespace Guard // Show message box if we are not building for testing char buffer[512]; GetAssertMessage(buffer, sizeof(buffer), formattedMessage); - sint32 result = MessageBoxA(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION); + int32_t result = MessageBoxA(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION); if (result == IDABORT) { ForceCrash(); diff --git a/src/openrct2/core/IStream.cpp b/src/openrct2/core/IStream.cpp index c2a1a7243a..23ae81c89e 100644 --- a/src/openrct2/core/IStream.cpp +++ b/src/openrct2/core/IStream.cpp @@ -16,8 +16,8 @@ utf8 * IStream::ReadString() { std::vector result; - uint8 ch; - while ((ch = ReadValue()) != 0) + uint8_t ch; + while ((ch = ReadValue()) != 0) { result.push_back(ch); } @@ -31,8 +31,8 @@ utf8 * IStream::ReadString() std::string IStream::ReadStdString() { std::string result; - uint8 ch; - while ((ch = ReadValue()) != 0) + uint8_t ch; + while ((ch = ReadValue()) != 0) { result.push_back(ch); } @@ -43,7 +43,7 @@ void IStream::WriteString(const utf8 * str) { if (str == nullptr) { - WriteValue(0); + WriteValue(0); } else { diff --git a/src/openrct2/core/IStream.hpp b/src/openrct2/core/IStream.hpp index 0f372ff35a..ec30493e4c 100644 --- a/src/openrct2/core/IStream.hpp +++ b/src/openrct2/core/IStream.hpp @@ -35,15 +35,15 @@ interface IStream virtual bool CanRead() const abstract; virtual bool CanWrite() const abstract; - virtual uint64 GetLength() const abstract; - virtual uint64 GetPosition() const abstract; - virtual void SetPosition(uint64 position) abstract; - virtual void Seek(sint64 offset, sint32 origin) abstract; + virtual uint64_t GetLength() const abstract; + virtual uint64_t GetPosition() const abstract; + virtual void SetPosition(uint64_t position) abstract; + virtual void Seek(int64_t offset, int32_t origin) abstract; - virtual void Read(void * buffer, uint64 length) abstract; - virtual void Write(const void * buffer, uint64 length) abstract; + virtual void Read(void * buffer, uint64_t length) abstract; + virtual void Write(const void * buffer, uint64_t length) abstract; - virtual uint64 TryRead(void * buffer, uint64 length) abstract; + virtual uint64_t TryRead(void * buffer, uint64_t length) abstract; /////////////////////////////////////////////////////////////////////////// // Helper methods @@ -68,7 +68,7 @@ interface IStream } /** - * Reads the given type from the stream. Use this only for small types (e.g. sint8, sint64, double) + * Reads the given type from the stream. Use this only for small types (e.g. int8_t, int64_t, double) */ template T ReadValue() @@ -79,7 +79,7 @@ interface IStream } /** - * Writes the given type to the stream. Use this only for small types (e.g. sint8, sint64, double) + * Writes the given type to the stream. Use this only for small types (e.g. int8_t, int64_t, double) */ template void WriteValue(const T value) diff --git a/src/openrct2/core/Imaging.cpp b/src/openrct2/core/Imaging.cpp index ec53ac7ae9..19d27e5807 100644 --- a/src/openrct2/core/Imaging.cpp +++ b/src/openrct2/core/Imaging.cpp @@ -85,7 +85,7 @@ namespace Imaging png_set_read_fn(png_ptr, &istream, PngReadData); png_set_sig_bytes(png_ptr, sig_read); - uint32 readFlags = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING; + uint32_t readFlags = PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING; if (expandTo32) { // If we expand the resulting image always be full RGBA @@ -101,7 +101,7 @@ namespace Imaging // Read pixels as 32bpp RGBA data auto rowBytes = png_get_rowbytes(png_ptr, info_ptr); auto rowPointers = png_get_rows(png_ptr, info_ptr); - auto pngPixels = std::vector(pngWidth * pngHeight * 4); + auto pngPixels = std::vector(pngWidth * pngHeight * 4); auto dst = pngPixels.data(); if (colourType == PNG_COLOR_TYPE_RGB) { @@ -230,7 +230,7 @@ namespace Imaging // Write pixels auto pixels = image.Pixels.data(); - for (uint32 y = 0; y < image.Height; y++) + for (uint32_t y = 0; y < image.Height; y++) { png_write_row(png_ptr, (png_byte *)pixels); pixels += image.Stride; @@ -315,9 +315,9 @@ namespace Imaging } } - Image ReadFromBuffer(const std::vector& buffer, IMAGE_FORMAT format) + Image ReadFromBuffer(const std::vector& buffer, IMAGE_FORMAT format) { - ivstream istream(buffer); + ivstream istream(buffer); return ReadFromStream(istream, format); } diff --git a/src/openrct2/core/Imaging.h b/src/openrct2/core/Imaging.h index be66202b04..982b7f7ff2 100644 --- a/src/openrct2/core/Imaging.h +++ b/src/openrct2/core/Imaging.h @@ -22,10 +22,10 @@ struct rct_palette; struct PaletteBGRA { - uint8 Blue{}; - uint8 Green{}; - uint8 Red{}; - uint8 Alpha{}; + uint8_t Blue{}; + uint8_t Green{}; + uint8_t Red{}; + uint8_t Alpha{}; }; enum class IMAGE_FORMAT @@ -40,14 +40,14 @@ enum class IMAGE_FORMAT struct Image { // Meta - uint32 Width{}; - uint32 Height{}; - uint32 Depth{}; + uint32_t Width{}; + uint32_t Height{}; + uint32_t Depth{}; // Data - std::vector Pixels; + std::vector Pixels; std::unique_ptr Palette; - uint32 Stride{}; + uint32_t Stride{}; }; using ImageReaderFunc = std::function; @@ -56,7 +56,7 @@ namespace Imaging { IMAGE_FORMAT GetImageFormatFromPath(const std::string_view& path); Image ReadFromFile(const std::string_view& path, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); - Image ReadFromBuffer(const std::vector& buffer, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); + Image ReadFromBuffer(const std::vector& buffer, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); void WriteToFile(const std::string_view& path, const Image& image, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); void SetReader(IMAGE_FORMAT format, ImageReaderFunc impl); diff --git a/src/openrct2/core/Json.hpp b/src/openrct2/core/Json.hpp index d4e8b9c789..af44ddf8d3 100644 --- a/src/openrct2/core/Json.hpp +++ b/src/openrct2/core/Json.hpp @@ -18,7 +18,7 @@ namespace Json { // Don't try to load JSON files that exceed 64 MiB - constexpr uint64 MAX_JSON_SIZE = 64 * 1024 * 1024; + constexpr uint64_t MAX_JSON_SIZE = 64 * 1024 * 1024; json_t * ReadFromFile(const utf8 * path, size_t maxSize = MAX_JSON_SIZE); void WriteToFile(const utf8 * path, const json_t * json, size_t flags = 0); diff --git a/src/openrct2/core/MemoryStream.cpp b/src/openrct2/core/MemoryStream.cpp index dc79649c76..66228ecace 100644 --- a/src/openrct2/core/MemoryStream.cpp +++ b/src/openrct2/core/MemoryStream.cpp @@ -34,7 +34,7 @@ MemoryStream::MemoryStream(size_t capacity) _position = _data; } -MemoryStream::MemoryStream(void * data, size_t dataSize, uint8 access) +MemoryStream::MemoryStream(void * data, size_t dataSize, uint8_t access) { _access = access; _dataCapacity = dataSize; @@ -87,24 +87,24 @@ bool MemoryStream::CanWrite() const return (_access & MEMORY_ACCESS::WRITE) != 0; } -uint64 MemoryStream::GetLength() const +uint64_t MemoryStream::GetLength() const { return _dataSize; } -uint64 MemoryStream::GetPosition() const +uint64_t MemoryStream::GetPosition() const { - return (uint64)((uintptr_t)_position - (uintptr_t)_data); + return (uint64_t)((uintptr_t)_position - (uintptr_t)_data); } -void MemoryStream::SetPosition(uint64 position) +void MemoryStream::SetPosition(uint64_t position) { Seek(position, STREAM_SEEK_BEGIN); } -void MemoryStream::Seek(sint64 offset, sint32 origin) +void MemoryStream::Seek(int64_t offset, int32_t origin) { - uint64 newPosition; + uint64_t newPosition; switch (origin) { default: case STREAM_SEEK_BEGIN: @@ -125,30 +125,30 @@ void MemoryStream::Seek(sint64 offset, sint32 origin) _position = (void*)((uintptr_t)_data + (uintptr_t)newPosition); } -void MemoryStream::Read(void * buffer, uint64 length) +void MemoryStream::Read(void * buffer, uint64_t length) { - uint64 position = GetPosition(); + uint64_t position = GetPosition(); if (position + length > _dataSize) { throw IOException("Attempted to read past end of stream."); } - std::copy_n((const uint8 *)_position, length, (uint8 *)buffer); + std::copy_n((const uint8_t *)_position, length, (uint8_t *)buffer); _position = (void*)((uintptr_t)_position + length); } -uint64 MemoryStream::TryRead(void * buffer, uint64 length) +uint64_t MemoryStream::TryRead(void * buffer, uint64_t length) { - uint64 remainingBytes = GetLength() - GetPosition(); - uint64 bytesToRead = std::min(length, remainingBytes); + uint64_t remainingBytes = GetLength() - GetPosition(); + uint64_t bytesToRead = std::min(length, remainingBytes); Read(buffer, bytesToRead); return bytesToRead; } -void MemoryStream::Write(const void * buffer, uint64 length) +void MemoryStream::Write(const void * buffer, uint64_t length) { - uint64 position = GetPosition(); - uint64 nextPosition = position + length; + uint64_t position = GetPosition(); + uint64_t nextPosition = position + length; if (nextPosition > _dataCapacity) { if (_access & MEMORY_ACCESS::OWNER) @@ -161,7 +161,7 @@ void MemoryStream::Write(const void * buffer, uint64 length) } } - std::copy_n((const uint8 *)buffer, length, (uint8 *)_position); + std::copy_n((const uint8_t *)buffer, length, (uint8_t *)_position); _position = (void*)((uintptr_t)_position + length); _dataSize = std::max(_dataSize, (size_t)nextPosition); } @@ -176,7 +176,7 @@ void MemoryStream::EnsureCapacity(size_t capacity) newCapacity *= 2; } - uint64 position = GetPosition(); + uint64_t position = GetPosition(); _dataCapacity = newCapacity; _data = Memory::Reallocate(_data, _dataCapacity); _position = (void *)((uintptr_t)_data + (uintptr_t)position); diff --git a/src/openrct2/core/MemoryStream.h b/src/openrct2/core/MemoryStream.h index bb59a78697..f4405d2124 100644 --- a/src/openrct2/core/MemoryStream.h +++ b/src/openrct2/core/MemoryStream.h @@ -14,9 +14,9 @@ namespace MEMORY_ACCESS { - constexpr uint8 READ = 1 << 0; - constexpr uint8 WRITE = 1 << 1; - constexpr uint8 OWNER = 1 << 2; + constexpr uint8_t READ = 1 << 0; + constexpr uint8_t WRITE = 1 << 1; + constexpr uint8_t OWNER = 1 << 2; }; /** @@ -25,7 +25,7 @@ namespace MEMORY_ACCESS class MemoryStream final : public IStream { private: - uint8 _access = MEMORY_ACCESS::READ | MEMORY_ACCESS::WRITE | MEMORY_ACCESS::OWNER; + uint8_t _access = MEMORY_ACCESS::READ | MEMORY_ACCESS::WRITE | MEMORY_ACCESS::OWNER; size_t _dataCapacity = 0; size_t _dataSize = 0; void * _data = nullptr; @@ -35,7 +35,7 @@ public: MemoryStream() = default; MemoryStream(const MemoryStream & copy); explicit MemoryStream(size_t capacity); - MemoryStream(void * data, size_t dataSize, uint8 access = MEMORY_ACCESS::READ); + MemoryStream(void * data, size_t dataSize, uint8_t access = MEMORY_ACCESS::READ); MemoryStream(const void * data, size_t dataSize); virtual ~MemoryStream(); @@ -49,15 +49,15 @@ public: bool CanRead() const override; bool CanWrite() const override; - uint64 GetLength() const override; - uint64 GetPosition() const override; - void SetPosition(uint64 position) override; - void Seek(sint64 offset, sint32 origin) override; + uint64_t GetLength() const override; + uint64_t GetPosition() const override; + void SetPosition(uint64_t position) override; + void Seek(int64_t offset, int32_t origin) override; - void Read(void * buffer, uint64 length) override; - void Write(const void * buffer, uint64 length) override; + void Read(void * buffer, uint64_t length) override; + void Write(const void * buffer, uint64_t length) override; - uint64 TryRead(void * buffer, uint64 length) override; + uint64_t TryRead(void * buffer, uint64_t length) override; private: void EnsureCapacity(size_t capacity); diff --git a/src/openrct2/core/Path.cpp b/src/openrct2/core/Path.cpp index cef298fd35..af63ebd360 100644 --- a/src/openrct2/core/Path.cpp +++ b/src/openrct2/core/Path.cpp @@ -247,7 +247,7 @@ namespace Path if (count != -1) { // Find a file which matches by name (case insensitive) - for (sint32 i = 0; i < count; i++) + for (int32_t i = 0; i < count; i++) { if (String::Equals(files[i]->d_name, fileName.c_str(), true)) { @@ -257,7 +257,7 @@ namespace Path } // Free memory - for (sint32 i = 0; i < count; i++) + for (int32_t i = 0; i < count; i++) { free(files[i]); } diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index be380d3d82..916f171d78 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -133,12 +133,12 @@ namespace String return str == nullptr || str[0] == '\0'; } - sint32 Compare(const std::string &a, const std::string &b, bool ignoreCase) + int32_t Compare(const std::string &a, const std::string &b, bool ignoreCase) { return Compare(a.c_str(), b.c_str(), ignoreCase); } - sint32 Compare(const utf8 * a, const utf8 * b, bool ignoreCase) + int32_t Compare(const utf8 * a, const utf8 * b, bool ignoreCase) { if (a == b) return 0; if (a == nullptr) a = ""; @@ -317,7 +317,7 @@ namespace String utf8 * buffer = Memory::Allocate(bufferSize); // Start with initial buffer - sint32 len = vsnprintf(buffer, bufferSize, format, args); + int32_t len = vsnprintf(buffer, bufferSize, format, args); if (len < 0) { Memory::Free(buffer); @@ -451,7 +451,7 @@ namespace String const utf8 * SkipBOM(const utf8 * buffer) { - if ((uint8)buffer[0] == 0xEF && (uint8)buffer[1] == 0xBB && (uint8)buffer[2] == 0xBF) + if ((uint8_t)buffer[0] == 0xEF && (uint8_t)buffer[1] == 0xBB && (uint8_t)buffer[2] == 0xBF) { return buffer + 3; } @@ -589,7 +589,7 @@ namespace String } #ifndef _WIN32 - static const char* GetIcuCodePage(sint32 codePage) + static const char* GetIcuCodePage(int32_t codePage) { switch (codePage) { @@ -616,7 +616,7 @@ namespace String } } - static std::string CodePageFromUnicode(icu::UnicodeString src, sint32 dstCodePage) + static std::string CodePageFromUnicode(icu::UnicodeString src, int32_t dstCodePage) { UConverter* conv; UErrorCode status = U_ZERO_ERROR; @@ -656,7 +656,7 @@ namespace String } #endif - std::string Convert(const std::string_view& src, sint32 srcCodePage, sint32 dstCodePage) + std::string Convert(const std::string_view& src, int32_t srcCodePage, int32_t dstCodePage) { #ifdef _WIN32 // Convert from source code page to UTF-16 diff --git a/src/openrct2/core/String.hpp b/src/openrct2/core/String.hpp index 99049a356a..528e5b1350 100644 --- a/src/openrct2/core/String.hpp +++ b/src/openrct2/core/String.hpp @@ -20,12 +20,12 @@ namespace CODE_PAGE // windows.h defines CP_UTF8 #undef CP_UTF8 - constexpr sint32 CP_932 = 932; // ANSI/OEM Japanese; Japanese (Shift-JIS) - constexpr sint32 CP_936 = 936; // ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312) - constexpr sint32 CP_949 = 949; // ANSI/OEM Korean (Unified Hangul Code) - constexpr sint32 CP_950 = 950; // ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5) - constexpr sint32 CP_1252 = 1252; // ANSI Latin 1; Western European (Windows) - constexpr sint32 CP_UTF8 = 65001; // Unicode (UTF-8) + constexpr int32_t CP_932 = 932; // ANSI/OEM Japanese; Japanese (Shift-JIS) + constexpr int32_t CP_936 = 936; // ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312) + constexpr int32_t CP_949 = 949; // ANSI/OEM Korean (Unified Hangul Code) + constexpr int32_t CP_950 = 950; // ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5) + constexpr int32_t CP_1252 = 1252; // ANSI Latin 1; Western European (Windows) + constexpr int32_t CP_UTF8 = 65001; // Unicode (UTF-8) } // namespace CODE_PAGE namespace String @@ -39,8 +39,8 @@ namespace String std::wstring ToUtf16(const std::string_view& src); bool IsNullOrEmpty(const utf8 * str); - sint32 Compare(const std::string &a, const std::string &b, bool ignoreCase = false); - sint32 Compare(const utf8 * a, const utf8 * b, bool ignoreCase = false); + int32_t Compare(const std::string &a, const std::string &b, bool ignoreCase = false); + int32_t Compare(const utf8 * a, const utf8 * b, bool ignoreCase = false); bool Equals(const std::string &a, const std::string &b, bool ignoreCase = false); bool Equals(const utf8 * a, const utf8 * b, bool ignoreCase = false); bool StartsWith(const utf8 * str, const utf8 * match, bool ignoreCase = false); @@ -103,7 +103,7 @@ namespace String /** * Converts a multi-byte string from one code page to another. */ - std::string Convert(const std::string_view& src, sint32 srcCodePage, sint32 dstCodePage); + std::string Convert(const std::string_view& src, int32_t srcCodePage, int32_t dstCodePage); /** * Returns an uppercased version of a UTF-8 string. diff --git a/src/openrct2/core/StringBuilder.hpp b/src/openrct2/core/StringBuilder.hpp index c3a4125375..4d072fb424 100644 --- a/src/openrct2/core/StringBuilder.hpp +++ b/src/openrct2/core/StringBuilder.hpp @@ -34,7 +34,7 @@ public: Memory::Free(_buffer); } - void Append(sint32 codepoint) + void Append(int32_t codepoint) { Append((codepoint_t)codepoint); } diff --git a/src/openrct2/core/Zip.cpp b/src/openrct2/core/Zip.cpp index bdb297f51f..0ef125461a 100644 --- a/src/openrct2/core/Zip.cpp +++ b/src/openrct2/core/Zip.cpp @@ -17,7 +17,7 @@ class ZipArchive final : public IZipArchive private: zip_t * _zip; ZIP_ACCESS _access; - std::vector> _writeBuffers; + std::vector> _writeBuffers; public: ZipArchive(const std::string_view& path, ZIP_ACCESS access) @@ -28,7 +28,7 @@ public: zipOpenMode = ZIP_CREATE; } - sint32 error; + int32_t error; _zip = zip_open(path.data(), zipOpenMode, &error); if (_zip == nullptr) { @@ -59,7 +59,7 @@ public: return result; } - uint64 GetFileSize(size_t index) const override + uint64_t GetFileSize(size_t index) const override { zip_stat_t zipFileStat; if (zip_stat_index(_zip, index, 0, &zipFileStat) == ZIP_ER_OK) @@ -72,9 +72,9 @@ public: } } - std::vector GetFileData(const std::string_view& path) const override + std::vector GetFileData(const std::string_view& path) const override { - std::vector result; + std::vector result; auto index = GetIndexFromPath(path); auto dataSize = GetFileSize(index); if (dataSize > 0 && dataSize < SIZE_MAX) @@ -83,7 +83,7 @@ public: if (zipFile != nullptr) { result.resize((size_t)dataSize); - uint64 readBytes = zip_fread(zipFile, result.data(), dataSize); + uint64_t readBytes = zip_fread(zipFile, result.data(), dataSize); if (readBytes != dataSize) { result.clear(); @@ -95,7 +95,7 @@ public: return result; } - void SetFileData(const std::string_view& path, std::vector&& data) override + void SetFileData(const std::string_view& path, std::vector&& data) override { // Push buffer to an internal list as libzip requires access to it until the zip // handle is closed. diff --git a/src/openrct2/core/Zip.h b/src/openrct2/core/Zip.h index 69d7d2e47c..e423ab8f09 100644 --- a/src/openrct2/core/Zip.h +++ b/src/openrct2/core/Zip.h @@ -23,15 +23,15 @@ interface IZipArchive virtual size_t GetNumFiles() const abstract; virtual std::string GetFileName(size_t index) const abstract; - virtual uint64 GetFileSize(size_t index) const abstract; - virtual std::vector GetFileData(const std::string_view& path) const abstract; + virtual uint64_t GetFileSize(size_t index) const abstract; + virtual std::vector GetFileData(const std::string_view& path) const abstract; /** * Creates or overwrites a file within the zip archive to the given data buffer. * @param path The path of the file within the zip. * @param data The data to write. */ - virtual void SetFileData(const std::string_view& path, std::vector&& data) abstract; + virtual void SetFileData(const std::string_view& path, std::vector&& data) abstract; virtual void DeleteFile(const std::string_view& path) abstract; virtual void RenameFile(const std::string_view& path, const std::string_view& newPath) abstract; diff --git a/src/openrct2/core/ZipAndroid.cpp b/src/openrct2/core/ZipAndroid.cpp index d7ff6c2048..de8ad1020c 100644 --- a/src/openrct2/core/ZipAndroid.cpp +++ b/src/openrct2/core/ZipAndroid.cpp @@ -82,7 +82,7 @@ public: return string; } - uint64 GetFileSize(size_t index) const override + uint64_t GetFileSize(size_t index) const override { // retrieve the JNI environment. JNIEnv *env = (JNIEnv *) SDL_AndroidGetJNIEnv(); @@ -93,7 +93,7 @@ public: return (size_t) env->CallLongMethod(_zip, fileSizeMethod, (jint) index); } - std::vector GetFileData(const std::string_view& path) const override + std::vector GetFileData(const std::string_view& path) const override { // retrieve the JNI environment. JNIEnv *env = (JNIEnv *) SDL_AndroidGetJNIEnv(); @@ -106,13 +106,13 @@ public: jmethodID fileMethod = env->GetMethodID(zipClass, "getFile", "(I)J"); jlong ptr = env->CallLongMethod(_zip, fileMethod, index); - auto dataPtr = reinterpret_cast(ptr); + auto dataPtr = reinterpret_cast(ptr); auto dataSize = this->GetFileSize(index); - return std::vector(dataPtr, dataPtr + dataSize); + return std::vector(dataPtr, dataPtr + dataSize); } - void SetFileData(const std::string_view& path, std::vector&& data) override + void SetFileData(const std::string_view& path, std::vector&& data) override { STUB(); } diff --git a/src/openrct2/drawing/AVX2Drawing.cpp b/src/openrct2/drawing/AVX2Drawing.cpp index 2d06a79930..dc2270f9aa 100644 --- a/src/openrct2/drawing/AVX2Drawing.cpp +++ b/src/openrct2/drawing/AVX2Drawing.cpp @@ -15,16 +15,16 @@ #include -void mask_avx2(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap) +void mask_avx2(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { if (width == 32) { - const sint32 maskWrapSIMD = maskWrap + 32; - const sint32 colourWrapSIMD = colourWrap + 32; - const sint32 dstWrapSIMD = dstWrap + 32; + const int32_t maskWrapSIMD = maskWrap + 32; + const int32_t colourWrapSIMD = colourWrap + 32; + const int32_t dstWrapSIMD = dstWrap + 32; const __m256i zero = {}; - for (sint32 yy = 0; yy < height; yy++) { + for (int32_t yy = 0; yy < height; yy++) { const __m256i colour = _mm256_lddqu_si256((const __m256i *)(colourSrc + yy * colourWrapSIMD)); const __m256i mask = _mm256_lddqu_si256((const __m256i *)(maskSrc + yy * maskWrapSIMD)); const __m256i dest = _mm256_lddqu_si256((const __m256i *)(dst + yy * dstWrapSIMD)); @@ -46,8 +46,8 @@ void mask_avx2(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, cons #error You have to compile this file with AVX2 enabled, when targeting x86! #endif -void mask_avx2(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap) +void mask_avx2(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { openrct2_assert(false, "AVX2 function called on a CPU that doesn't support AVX2"); } diff --git a/src/openrct2/drawing/Drawing.Sprite.cpp b/src/openrct2/drawing/Drawing.Sprite.cpp index 171746ca6e..4a33369d8e 100644 --- a/src/openrct2/drawing/Drawing.Sprite.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.cpp @@ -28,8 +28,8 @@ using namespace OpenRCT2::Ui; #pragma pack(push, 1) struct rct_g1_header { - uint32 num_entries; - uint32 total_size; + uint32_t num_entries; + uint32_t total_size; }; assert_struct_size(rct_g1_header, 8); #pragma pack(pop) @@ -45,8 +45,8 @@ struct rct_gx constexpr struct { int start; - sint32 x_offset; - sint32 y_offset; + int32_t x_offset; + int32_t y_offset; } sprite_peep_pickup_starts[15] = { @@ -67,7 +67,7 @@ sprite_peep_pickup_starts[15] = {SPR_PEEP_PICKUP_ROMAN_START, -1, 17}, }; -static inline uint32 rctc_to_rct2_index(uint32 image) +static inline uint32_t rctc_to_rct2_index(uint32_t image) { if ( image < 1542) return image; else if (image >= 1574 && image < 4983) return image - 32; @@ -88,7 +88,7 @@ static void read_and_convert_gxdat(IStream * stream, size_t count, bool is_rctc, if (is_rctc) { // Process RCTC's g1.dat file - uint32 rctc = 0; + uint32_t rctc = 0; for (size_t i = 0; i < SPR_G1_END; ++i) { // RCTC's g1.dat has a number of additional elements @@ -113,7 +113,7 @@ static void read_and_convert_gxdat(IStream * stream, size_t count, bool is_rctc, // Double cast to silence compiler warning about casting to // pointer from integer of mismatched length. - elements[i].offset = (uint8*)(uintptr_t)src.offset; + elements[i].offset = (uint8_t*)(uintptr_t)src.offset; elements[i].width = src.width; elements[i].height = src.height; elements[i].x_offset = src.x_offset; @@ -122,7 +122,7 @@ static void read_and_convert_gxdat(IStream * stream, size_t count, bool is_rctc, if (src.flags & G1_FLAG_HAS_ZOOM_SPRITE) { - elements[i].zoomed_offset = (uint16) (i - rctc_to_rct2_index(rctc - src.zoomed_offset)); + elements[i].zoomed_offset = (uint16_t) (i - rctc_to_rct2_index(rctc - src.zoomed_offset)); } else { @@ -152,7 +152,7 @@ static void read_and_convert_gxdat(IStream * stream, size_t count, bool is_rctc, // Double cast to silence compiler warning about casting to // pointer from integer of mismatched length. - elements[i].offset = (uint8*)(uintptr_t)src.offset; + elements[i].offset = (uint8_t*)(uintptr_t)src.offset; elements[i].width = src.width; elements[i].height = src.height; elements[i].x_offset = src.x_offset; @@ -163,14 +163,14 @@ static void read_and_convert_gxdat(IStream * stream, size_t count, bool is_rctc, } } -void mask_scalar(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap) +void mask_scalar(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { - for (sint32 yy = 0; yy < height; yy++) + for (int32_t yy = 0; yy < height; yy++) { - for (sint32 xx = 0; xx < width; xx++) + for (int32_t xx = 0; xx < width; xx++) { - uint8 colour = (*colourSrc) & (*maskSrc); + uint8_t colour = (*colourSrc) & (*maskSrc); if (colour != 0) { *dst = colour; @@ -245,10 +245,10 @@ bool gfx_load_g1(const IPlatformEnvironment& env) gTinyFontAntiAliased = is_rctc; // Read element data - _g1.data = fs.ReadArray(_g1.header.total_size); + _g1.data = fs.ReadArray(_g1.header.total_size); // Fix entry data offsets - for (uint32 i = 0; i < _g1.header.num_entries; i++) + for (uint32_t i = 0; i < _g1.header.num_entries; i++) { _g1.elements[i].offset += (uintptr_t)_g1.data; } @@ -308,10 +308,10 @@ bool gfx_load_g2() read_and_convert_gxdat(&fs, _g2.header.num_entries, false, _g2.elements.data()); // Read element data - _g2.data = fs.ReadArray(_g2.header.total_size); + _g2.data = fs.ReadArray(_g2.header.total_size); // Fix entry data offsets - for (uint32 i = 0; i < _g2.header.num_entries; i++) + for (uint32_t i = 0; i < _g2.header.num_entries; i++) { _g2.elements[i].offset += (uintptr_t)_g2.data; } @@ -351,8 +351,8 @@ bool gfx_load_csg() size_t fileHeaderSize = fileHeader.GetLength(); size_t fileDataSize = fileData.GetLength(); - _csg.header.num_entries = (uint32)(fileHeaderSize / sizeof(rct_g1_element_32bit)); - _csg.header.total_size = (uint32)fileDataSize; + _csg.header.num_entries = (uint32_t)(fileHeaderSize / sizeof(rct_g1_element_32bit)); + _csg.header.total_size = (uint32_t)fileDataSize; if (_csg.header.num_entries < 69917) { @@ -365,10 +365,10 @@ bool gfx_load_csg() read_and_convert_gxdat(&fileHeader, _csg.header.num_entries, false, _csg.elements.data()); // Read element data - _csg.data = fileData.ReadArray(_csg.header.total_size); + _csg.data = fileData.ReadArray(_csg.header.total_size); // Fix entry data offsets - for (uint32 i = 0; i < _csg.header.num_entries; i++) + for (uint32_t i = 0; i < _csg.header.num_entries; i++) { _csg.elements[i].offset += (uintptr_t)_csg.data; // RCT1 used zoomed offsets that counted from the beginning of the file, rather than from the current sprite. @@ -395,12 +395,12 @@ bool gfx_load_csg() * image. * rct2: 0x0067A690 */ -void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* source_pointer, uint8* dest_pointer, const rct_g1_element* source_image, rct_drawpixelinfo *dest_dpi, sint32 height, sint32 width, sint32 image_type) +void FASTCALL gfx_bmp_sprite_to_buffer(const uint8_t* palette_pointer, uint8_t* source_pointer, uint8_t* dest_pointer, const rct_g1_element* source_image, rct_drawpixelinfo *dest_dpi, int32_t height, int32_t width, int32_t image_type) { - uint16 zoom_level = dest_dpi->zoom_level; - uint8 zoom_amount = 1 << zoom_level; - uint32 dest_line_width = (dest_dpi->width / zoom_amount) + dest_dpi->pitch; - uint32 source_line_width = source_image->width * zoom_amount; + uint16_t zoom_level = dest_dpi->zoom_level; + uint8_t zoom_amount = 1 << zoom_level; + uint32_t dest_line_width = (dest_dpi->width / zoom_amount) + dest_dpi->pitch; + uint32_t source_line_width = source_image->width * zoom_amount; // Image uses the palette pointer to remap the colours of the image if (image_type & IMAGE_TYPE_REMAP){ @@ -408,10 +408,10 @@ void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* sour // 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; - for (sint32 no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, source_pointer += zoom_amount, dest_pointer++){ - uint8 pixel = *source_pointer; + uint8_t* next_source_pointer = source_pointer + source_line_width; + uint8_t* next_dest_pointer = dest_pointer + dest_line_width; + for (int32_t no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, source_pointer += zoom_amount, dest_pointer++){ + uint8_t pixel = *source_pointer; pixel = palette_pointer[pixel]; if (pixel){ *dest_pointer = pixel; @@ -430,11 +430,11 @@ void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* sour 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; - uint8* next_dest_pointer = dest_pointer + dest_line_width; + uint8_t* next_source_pointer = source_pointer + source_line_width; + uint8_t* next_dest_pointer = dest_pointer + dest_line_width; - for (sint32 no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, source_pointer += zoom_amount, dest_pointer++){ - uint8 pixel = *source_pointer; + for (int32_t no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, source_pointer += zoom_amount, dest_pointer++){ + uint8_t pixel = *source_pointer; if (pixel){ pixel = *dest_pointer; pixel = palette_pointer[pixel]; @@ -451,10 +451,10 @@ void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* sour // 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; + uint8_t* next_source_pointer = source_pointer + source_line_width; + uint8_t* next_dest_pointer = dest_pointer + dest_line_width; - for (sint32 no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, dest_pointer++, source_pointer += zoom_amount){ + for (int32_t no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, dest_pointer++, source_pointer += zoom_amount){ *dest_pointer = *source_pointer; } @@ -466,11 +466,11 @@ void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* sour // 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; + uint8_t* next_source_pointer = source_pointer + source_line_width; + uint8_t* next_dest_pointer = dest_pointer + dest_line_width; - for (sint32 no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, dest_pointer++, source_pointer += zoom_amount){ - uint8 pixel = *source_pointer; + for (int32_t no_pixels = width; no_pixels > 0; no_pixels -= zoom_amount, dest_pointer++, source_pointer += zoom_amount){ + uint8_t pixel = *source_pointer; if (pixel){ *dest_pointer = pixel; } @@ -480,18 +480,18 @@ void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* sour } } -uint8* FASTCALL gfx_draw_sprite_get_palette(sint32 image_id, uint32 tertiary_colour) { - sint32 image_type = (image_id & 0xE0000000); +uint8_t* FASTCALL gfx_draw_sprite_get_palette(int32_t image_id, uint32_t tertiary_colour) { + int32_t image_type = (image_id & 0xE0000000); if (image_type == 0) return nullptr; if (!(image_type & IMAGE_TYPE_REMAP_2_PLUS)) { - uint8 palette_ref = (image_id >> 19) & 0xFF; + uint8_t palette_ref = (image_id >> 19) & 0xFF; if (!(image_type & IMAGE_TYPE_TRANSPARENT)) { palette_ref &= 0x7F; } - uint16 palette_offset = palette_to_g1_offset[palette_ref]; + uint16_t palette_offset = palette_to_g1_offset[palette_ref]; auto g1 = gfx_get_g1_element(palette_offset); if (g1 == nullptr) { @@ -503,17 +503,17 @@ uint8* FASTCALL gfx_draw_sprite_get_palette(sint32 image_id, uint32 tertiary_col } } else { - uint8* palette_pointer = gPeepPalette; + uint8_t* palette_pointer = gPeepPalette; - uint32 primary_offset = palette_to_g1_offset[(image_id >> 19) & 0x1F]; - uint32 secondary_offset = palette_to_g1_offset[(image_id >> 24) & 0x1F]; + uint32_t primary_offset = palette_to_g1_offset[(image_id >> 19) & 0x1F]; + uint32_t secondary_offset = palette_to_g1_offset[(image_id >> 24) & 0x1F]; if (!(image_type & IMAGE_TYPE_REMAP)) { palette_pointer = gOtherPalette; #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 assert(tertiary_colour < PALETTE_TO_G1_OFFSET_COUNT); #endif // DEBUG_LEVEL_2 - uint32 tertiary_offset = palette_to_g1_offset[tertiary_colour]; + uint32_t tertiary_offset = palette_to_g1_offset[tertiary_colour]; auto tertiary_palette = gfx_get_g1_element(tertiary_offset); if (tertiary_palette != nullptr) { @@ -551,11 +551,11 @@ uint8* FASTCALL gfx_draw_sprite_get_palette(sint32 image_id, uint32 tertiary_col * dpi (esi) * tertiary_colour (ebp) */ -void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, sint32 image_id, sint32 x, sint32 y, uint32 tertiary_colour) +void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int32_t image_id, int32_t x, int32_t y, uint32_t tertiary_colour) { if (image_id != -1) { - uint8* palette_pointer = gfx_draw_sprite_get_palette(image_id, tertiary_colour); + uint8_t* palette_pointer = gfx_draw_sprite_get_palette(image_id, tertiary_colour); if (image_id & IMAGE_TYPE_REMAP_2_PLUS) { image_id |= IMAGE_TYPE_REMAP; } @@ -573,10 +573,10 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, sint32 image_id, * x (cx) * y (dx) */ -void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint32 image_id, sint32 x, sint32 y, uint8* palette_pointer, uint8* unknown_pointer) +void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, int32_t image_id, int32_t x, int32_t y, uint8_t* palette_pointer, uint8_t* unknown_pointer) { - sint32 image_element = image_id & 0x7FFFF; - sint32 image_type = image_id & 0xE0000000; + int32_t image_element = image_id & 0x7FFFF; + int32_t image_type = image_id & 0xE0000000; const rct_g1_element * g1 = gfx_get_g1_element(image_element); if (g1 == nullptr) @@ -602,8 +602,8 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 } // 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; + int32_t zoom_level = dpi->zoom_level; + int32_t zoom_mask = 0xFFFFFFFF << zoom_level; if (zoom_level && g1->flags & G1_FLAG_RLE_COMPRESSION){ x -= ~zoom_mask; @@ -611,9 +611,9 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 } // This will be the height of the drawn image - sint32 height = g1->height; + int32_t height = g1->height; // This is the start y coordinate on the destination - sint16 dest_start_y = y + g1->y_offset; + int16_t dest_start_y = y + g1->y_offset; // For whatever reason the RLE version does not use // the zoom mask on the y coordinate but does on x. @@ -624,7 +624,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 dest_start_y = (dest_start_y&zoom_mask) - dpi->y; } //This is the start y coordinate on the source - sint32 source_start_y = 0; + int32_t source_start_y = 0; if (dest_start_y < 0){ // If the destination y is negative reduce the height of the @@ -646,7 +646,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 } } - sint32 dest_end_y = dest_start_y + height; + int32_t dest_end_y = dest_start_y + height; if (dest_end_y > dpi->height){ // If the destination y is outside of the drawing @@ -659,11 +659,11 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 dest_start_y >>= zoom_level; // This will be the width of the drawn image - sint32 width = g1->width; + int32_t width = g1->width; // This is the source start x coordinate - sint32 source_start_x = 0; + int32_t source_start_x = 0; // This is the destination start x coordinate - sint16 dest_start_x = ((x + g1->x_offset + ~zoom_mask)&zoom_mask) - dpi->x; + int16_t dest_start_x = ((x + g1->x_offset + ~zoom_mask)&zoom_mask) - dpi->x; if (dest_start_x < 0){ // If the destination is negative reduce the width @@ -684,7 +684,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 } } - sint32 dest_end_x = dest_start_x + width; + int32_t dest_end_x = dest_start_x + width; if (dest_end_x > dpi->width){ // If the destination x is outside of the drawing area @@ -696,7 +696,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 dest_start_x >>= zoom_level; - uint8* dest_pointer = dpi->bits; + uint8_t* dest_pointer = dpi->bits; // Move the pointer to the start point of the destination dest_pointer += ((dpi->width >> zoom_level) + dpi->pitch) * dest_start_y + dest_start_x; @@ -706,7 +706,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 gfx_rle_sprite_to_buffer(g1->offset, dest_pointer, palette_pointer, dpi, image_type, source_start_y, height, source_start_x, width); return; } - uint8* source_pointer = g1->offset; + uint8_t* source_pointer = g1->offset; // Move the pointer to the start point of the source source_pointer += g1->width*source_start_y + source_start_x; @@ -721,9 +721,9 @@ void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint3 * * rct2: 0x00681DE2 */ -void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 maskImage, sint32 colourImage) +void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t maskImage, int32_t colourImage) { - sint32 left, top, right, bottom, width, height; + int32_t left, top, right, bottom, width, height; auto imgMask = gfx_get_g1_element(maskImage & 0x7FFFF); auto imgColour = gfx_get_g1_element(colourImage & 0x7FFFF); if (imgMask == nullptr || imgColour == nullptr) @@ -750,8 +750,8 @@ void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, sint32 x += imgMask->x_offset; y += imgMask->y_offset; - left = std::max(dpi->x, x); - top = std::max(dpi->y, y); + left = std::max(dpi->x, x); + top = std::max(dpi->y, y); right = std::min(dpi->x + dpi->width, x + width); bottom = std::min(dpi->y + dpi->height, y + height); @@ -760,21 +760,21 @@ void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, sint32 if (width < 0 || height < 0) return; - sint32 skipX = left - x; - sint32 skipY = top - y; + int32_t skipX = left - x; + int32_t skipY = top - y; - uint8 const * maskSrc = imgMask->offset + (skipY * imgMask->width) + skipX; - uint8 const * colourSrc = imgColour->offset + (skipY * imgColour->width) + skipX; - uint8 * dst = dpi->bits + (left - dpi->x) + ((top - dpi->y) * (dpi->width + dpi->pitch)); + uint8_t const * maskSrc = imgMask->offset + (skipY * imgMask->width) + skipX; + uint8_t const * colourSrc = imgColour->offset + (skipY * imgColour->width) + skipX; + uint8_t * dst = dpi->bits + (left - dpi->x) + ((top - dpi->y) * (dpi->width + dpi->pitch)); - sint32 maskWrap = imgMask->width - width; - sint32 colourWrap = imgColour->width - width; - sint32 dstWrap = ((dpi->width + dpi->pitch) - width); + int32_t maskWrap = imgMask->width - width; + int32_t colourWrap = imgColour->width - width; + int32_t dstWrap = ((dpi->width + dpi->pitch) - width); mask_fn(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); } -const rct_g1_element * gfx_get_g1_element(sint32 image_id) +const rct_g1_element * gfx_get_g1_element(int32_t image_id) { openrct2_assert(!gOpenRCT2NoGraphics, "gfx_get_g1_element called on headless instance"); @@ -789,7 +789,7 @@ const rct_g1_element * gfx_get_g1_element(sint32 image_id) } else if (image_id < SPR_G2_BEGIN) { - if (image_id >= (sint32)_g1.elements.size()) + if (image_id >= (int32_t)_g1.elements.size()) { return nullptr; } @@ -797,7 +797,7 @@ const rct_g1_element * gfx_get_g1_element(sint32 image_id) } if (image_id < SPR_CSG_BEGIN) { - const uint32 idx = image_id - SPR_G2_BEGIN; + const uint32_t idx = image_id - SPR_G2_BEGIN; if (idx >= _g2.header.num_entries) { log_warning("Invalid entry in g2.dat requested, idx = %u. You may have to update your g2.dat.", idx); @@ -808,7 +808,7 @@ const rct_g1_element * gfx_get_g1_element(sint32 image_id) if (is_csg_loaded()) { - const uint32 idx = image_id - SPR_CSG_BEGIN; + const uint32_t idx = image_id - SPR_CSG_BEGIN; if (idx >= _csg.header.num_entries) { openrct2_assert(idx < _csg.header.num_entries, @@ -820,7 +820,7 @@ const rct_g1_element * gfx_get_g1_element(sint32 image_id) return nullptr; } -void gfx_set_g1_element(sint32 imageId, const rct_g1_element * g1) +void gfx_set_g1_element(int32_t imageId, const rct_g1_element * g1) { openrct2_assert(!gOpenRCT2NoGraphics, "gfx_set_g1_element called on headless instance"); #ifdef DEBUG @@ -834,7 +834,7 @@ void gfx_set_g1_element(sint32 imageId, const rct_g1_element * g1) } else if (imageId >= 0 && imageId < SPR_G2_BEGIN) { - if (imageId < (sint32)_g1.elements.size()) + if (imageId < (int32_t)_g1.elements.size()) { _g1.elements[imageId] = *g1; } @@ -846,7 +846,7 @@ bool is_csg_loaded() return _csgLoaded; } -rct_size16 FASTCALL gfx_get_sprite_size(uint32 image_id) +rct_size16 FASTCALL gfx_get_sprite_size(uint32_t image_id) { const rct_g1_element * g1 = gfx_get_g1_element(image_id & 0X7FFFF); rct_size16 size = {}; @@ -872,14 +872,14 @@ size_t g1_calculate_data_size(const rct_g1_element * g1) } else { - uint16 * offsets = (uint16 *)g1->offset; - uint8 * ptr = g1->offset + offsets[g1->height - 1]; + uint16_t * offsets = (uint16_t *)g1->offset; + uint8_t * ptr = g1->offset + offsets[g1->height - 1]; bool endOfLine = false; do { - uint8 chunk0 = *ptr++; + uint8_t chunk0 = *ptr++; ptr++; // offset - uint8 chunkSize = chunk0 & 0x7F; + uint8_t chunkSize = chunk0 & 0x7F; ptr += chunkSize; endOfLine = (chunk0 & 0x80) != 0; } while (!endOfLine); diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index fe40f3c8e7..f30323d0f4 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -19,7 +19,7 @@ #include "../util/Util.h" #include "TTF.h" -enum : uint32 +enum : uint32_t { TEXT_DRAW_FLAG_INSET = 1 << 0, TEXT_DRAW_FLAG_OUTLINE = 1 << 1, @@ -30,21 +30,21 @@ enum : uint32 TEXT_DRAW_FLAG_NO_DRAW = 1u << 31 }; -static sint32 ttf_get_string_width(const utf8 *text); +static int32_t ttf_get_string_width(const utf8 *text); /** * * rct2: 0x006C23B1 */ -sint32 gfx_get_string_width_new_lined(utf8 *text) +int32_t gfx_get_string_width_new_lined(utf8 *text) { utf8 *ch = text; utf8 *firstCh = text; utf8 *nextCh; utf8 backup; - sint32 codepoint; + int32_t codepoint; - sint32 maxWidth = 0; + int32_t maxWidth = 0; while ((codepoint = utf8_get_next(ch, (const utf8**)&nextCh)) != 0) { if (codepoint == FORMAT_NEWLINE || codepoint == FORMAT_NEWLINE_SMALLER) { backup = *nextCh; @@ -66,7 +66,7 @@ sint32 gfx_get_string_width_new_lined(utf8 *text) * rct2: 0x006C2321 * buffer (esi) */ -sint32 gfx_get_string_width(const utf8 * buffer) +int32_t gfx_get_string_width(const utf8 * buffer) { return ttf_get_string_width(buffer); } @@ -78,9 +78,9 @@ sint32 gfx_get_string_width(const utf8 * buffer) * buffer (esi) * width (edi) */ -sint32 gfx_clip_string(utf8 *text, sint32 width) +int32_t gfx_clip_string(utf8 *text, int32_t width) { - sint32 clippedWidth; + int32_t clippedWidth; if (width < 6) { *text = 0; @@ -96,7 +96,7 @@ sint32 gfx_clip_string(utf8 *text, sint32 width) utf8 *ch = text; utf8 *nextCh = text; utf8 *clipCh = text; - sint32 codepoint; + int32_t codepoint; while ((codepoint = utf8_get_next(ch, (const utf8**)&nextCh)) != 0) { if (utf8_is_format_code(codepoint)) { ch = nextCh; @@ -104,21 +104,21 @@ sint32 gfx_clip_string(utf8 *text, sint32 width) continue; } - for (sint32 i = 0; i < 4; i++) { backup[i] = nextCh[i]; }; - for (sint32 i = 0; i < 3; i++) { nextCh[i] = '.'; } + for (int32_t i = 0; i < 4; i++) { backup[i] = nextCh[i]; }; + for (int32_t i = 0; i < 3; i++) { nextCh[i] = '.'; } nextCh[3] = 0; - sint32 queryWidth = gfx_get_string_width(text); + int32_t queryWidth = gfx_get_string_width(text); if (queryWidth < width) { clipCh = nextCh; clippedWidth = queryWidth; } else { - for (sint32 i = 0; i < 3; i++) { clipCh[i] = '.'; } + for (int32_t i = 0; i < 3; i++) { clipCh[i] = '.'; } clipCh[3] = 0; return clippedWidth; } - for (sint32 i = 0; i < 4; i++) { nextCh[i] = backup[i]; }; + for (int32_t i = 0; i < 4; i++) { nextCh[i] = backup[i]; }; ch = nextCh; } return gfx_get_string_width(text); @@ -137,23 +137,23 @@ sint32 gfx_clip_string(utf8 *text, sint32 width) * num_lines (edi) - out * font_height (ebx) - out */ -sint32 gfx_wrap_string(utf8 *text, sint32 width, sint32 *outNumLines, sint32 *outFontHeight) +int32_t gfx_wrap_string(utf8 *text, int32_t width, int32_t *outNumLines, int32_t *outFontHeight) { - sint32 lineWidth = 0; - sint32 maxWidth = 0; + int32_t lineWidth = 0; + int32_t maxWidth = 0; *outNumLines = 0; // Pointer to the start of the current word utf8 *currentWord = nullptr; // Width of line up to current word - sint32 currentWidth = 0; + int32_t currentWidth = 0; utf8 *ch = text; utf8 *firstCh = text; utf8 *nextCh; - sint32 codepoint; - sint32 numCharactersOnLine = 0; + int32_t codepoint; + int32_t numCharactersOnLine = 0; while ((codepoint = utf8_get_next(ch, (const utf8**)&nextCh)) != 0) { if (codepoint == ' ') { currentWord = ch; @@ -174,7 +174,7 @@ sint32 gfx_wrap_string(utf8 *text, sint32 width, sint32 *outNumLines, sint32 *ou continue; } - uint8 saveCh = *nextCh; + uint8_t saveCh = *nextCh; *nextCh = 0; lineWidth = gfx_get_string_width(firstCh); *nextCh = saveCh; @@ -211,25 +211,25 @@ sint32 gfx_wrap_string(utf8 *text, sint32 width, sint32 *outNumLines, sint32 *ou /** * Draws text that is left aligned and vertically centred. */ -void gfx_draw_string_left_centred(rct_drawpixelinfo *dpi, rct_string_id format, void *args, sint32 colour, sint32 x, sint32 y) +void gfx_draw_string_left_centred(rct_drawpixelinfo *dpi, rct_string_id format, void *args, int32_t colour, int32_t x, int32_t y) { gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; char *buffer = gCommonStringFormatBuffer; format_string(buffer, 256, format, args); - sint32 height = string_get_height_raw(buffer); + int32_t height = string_get_height_raw(buffer); gfx_draw_string(dpi, buffer, colour, x, y - (height / 2)); } /** * Changes the palette so that the next character changes colour */ -static void colour_char(uint8 colour, const uint16* current_font_flags, uint8* palette_pointer) { +static void colour_char(uint8_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) { - sint32 colour32 = 0; + int32_t colour32 = 0; const rct_g1_element * g1 = gfx_get_g1_element(SPR_TEXT_PALETTE); if (g1 != nullptr) { - colour32 = ((uint32 *)g1->offset)[colour & 0xFF]; + colour32 = ((uint32_t *)g1->offset)[colour & 0xFF]; } if (!(*current_font_flags & 2)) @@ -247,9 +247,9 @@ static void colour_char(uint8 colour, const uint16* current_font_flags, uint8* p * Changes the palette so that the next character changes colour * This is specific to changing to a predefined window related colour */ -static void colour_char_window(uint8 colour, const uint16* current_font_flags,uint8* palette_pointer) { +static void colour_char_window(uint8_t colour, const uint16_t* current_font_flags,uint8_t* palette_pointer) { - sint32 eax; + int32_t eax; colour = NOT_TRANSLUCENT(colour); eax = ColourMapA[colour].colour_11; @@ -273,14 +273,14 @@ static void colour_char_window(uint8 colour, const uint16* current_font_flags,ui * text : esi * dpi : edi */ -void draw_string_centred_raw(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 numLines, char *text) +void draw_string_centred_raw(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t numLines, char *text) { gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; gfx_draw_string(dpi, (char *)"", COLOUR_BLACK, dpi->x, dpi->y); gCurrentFontFlags = 0; - for (sint32 i = 0; i <= numLines; i++) { - sint32 width = gfx_get_string_width(text); + for (int32_t i = 0; i <= numLines; i++) { + int32_t width = gfx_get_string_width(text); gfx_draw_string(dpi, text, TEXT_COLOUR_254, x - (width / 2), y); const utf8 *ch = text; @@ -295,11 +295,11 @@ void draw_string_centred_raw(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 } } -sint32 string_get_height_raw(char *buffer) +int32_t string_get_height_raw(char *buffer) { - uint16 fontBase = gCurrentFontSpriteBase; + uint16_t fontBase = gCurrentFontSpriteBase; - sint32 height = 0; + int32_t height = 0; if (fontBase <= FONT_SPRITE_BASE_MEDIUM) height += 10; else if (fontBase == FONT_SPRITE_BASE_TINY) @@ -371,9 +371,9 @@ sint32 string_get_height_raw(char *buffer) * width : bp * ticks : ebp >> 16 */ -void gfx_draw_string_centred_wrapped_partial(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 width, sint32 colour, rct_string_id format, void *args, sint32 ticks) +void gfx_draw_string_centred_wrapped_partial(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t width, int32_t colour, rct_string_id format, void *args, int32_t ticks) { - sint32 numLines, fontSpriteBase, lineHeight, lineY; + int32_t numLines, fontSpriteBase, lineHeight, lineY; utf8 *buffer = gCommonStringFormatBuffer; gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; @@ -385,17 +385,17 @@ void gfx_draw_string_centred_wrapped_partial(rct_drawpixelinfo *dpi, sint32 x, s gfx_wrap_string(buffer, width, &numLines, &fontSpriteBase); lineHeight = font_get_line_height(fontSpriteBase); - sint32 numCharactersDrawn = 0; - sint32 numCharactersToDraw = ticks; + int32_t numCharactersDrawn = 0; + int32_t numCharactersToDraw = ticks; gCurrentFontFlags = 0; lineY = y - ((numLines * lineHeight) / 2); - for (sint32 line = 0; line <= numLines; line++) { - sint32 halfWidth = gfx_get_string_width(buffer) / 2; + for (int32_t line = 0; line <= numLines; line++) { + int32_t halfWidth = gfx_get_string_width(buffer) / 2; utf8 *ch = buffer; utf8 *nextCh; - sint32 codepoint; + int32_t codepoint; while ((codepoint = utf8_get_next(ch, (const utf8**)&nextCh)) != 0) { if (!utf8_is_format_code(codepoint)) { numCharactersDrawn++; @@ -419,27 +419,27 @@ void gfx_draw_string_centred_wrapped_partial(rct_drawpixelinfo *dpi, sint32 x, s } struct text_draw_info { - sint32 startX; - sint32 startY; - sint32 x; - sint32 y; - sint32 maxX; - sint32 maxY; - sint32 flags; - uint8 palette[8]; - uint16 font_sprite_base; - const sint8 *y_offset; + int32_t startX; + int32_t startY; + int32_t x; + int32_t y; + int32_t maxX; + int32_t maxY; + int32_t flags; + uint8_t palette[8]; + uint16_t font_sprite_base; + const int8_t *y_offset; }; -static void ttf_draw_character_sprite(rct_drawpixelinfo *dpi, sint32 codepoint, text_draw_info *info) +static void ttf_draw_character_sprite(rct_drawpixelinfo *dpi, int32_t codepoint, text_draw_info *info) { - sint32 characterWidth = font_sprite_get_codepoint_width(info->font_sprite_base, codepoint); - sint32 sprite = font_sprite_get_codepoint_sprite(info->font_sprite_base, codepoint); + int32_t characterWidth = font_sprite_get_codepoint_width(info->font_sprite_base, codepoint); + int32_t sprite = font_sprite_get_codepoint_sprite(info->font_sprite_base, codepoint); if (!(info->flags & TEXT_DRAW_FLAG_NO_DRAW)) { - sint32 x = info->x; - sint32 y = info->y; + int32_t x = info->x; + int32_t y = info->y; if (info->flags & TEXT_DRAW_FLAG_Y_OFFSET_EFFECT) { y += *info->y_offset++; } @@ -452,7 +452,7 @@ static void ttf_draw_character_sprite(rct_drawpixelinfo *dpi, sint32 codepoint, static void ttf_draw_string_raw_sprite(rct_drawpixelinfo *dpi, const utf8 *text, text_draw_info *info) { const utf8 *ch = text; - sint32 codepoint; + int32_t codepoint; while (!utf8_is_format_code(codepoint = utf8_get_next(ch, &ch))) { ttf_draw_character_sprite(dpi, codepoint, info); @@ -476,26 +476,26 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo *dpi, const utf8 *text, te info->x += ttf_getwidth_cache_get_or_add(fontDesc->font, text); return; } else { - uint8 colour = info->palette[1]; + uint8_t colour = info->palette[1]; TTFSurface * surface = ttf_surface_cache_get_or_add(fontDesc->font, text); if (surface == nullptr) return; - sint32 drawX = info->x + fontDesc->offset_x; - sint32 drawY = info->y + fontDesc->offset_y; - sint32 width = surface->w; - sint32 height = surface->h; + int32_t drawX = info->x + fontDesc->offset_x; + int32_t drawY = info->y + fontDesc->offset_y; + int32_t width = surface->w; + int32_t height = surface->h; - sint32 overflowX = (dpi->x + dpi->width) - (drawX + width); - sint32 overflowY = (dpi->y + dpi->height) - (drawY + height); + int32_t overflowX = (dpi->x + dpi->width) - (drawX + width); + int32_t overflowY = (dpi->y + dpi->height) - (drawY + height); if (overflowX < 0) width += overflowX; if (overflowY < 0) height += overflowY; - sint32 skipX = drawX - dpi->x; - sint32 skipY = drawY - dpi->y; + int32_t skipX = drawX - dpi->x; + int32_t skipY = drawY - dpi->y; info->x += width; - auto src = (const uint8 *)surface->pixels; - uint8 *dst = dpi->bits; + auto src = (const uint8_t *)surface->pixels; + uint8_t *dst = dpi->bits; if (skipX < 0) { width += skipX; @@ -511,15 +511,15 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo *dpi, const utf8 *text, te dst += skipX; dst += skipY * (dpi->width + dpi->pitch); - sint32 srcScanSkip = surface->pitch - width; - sint32 dstScanSkip = dpi->width + dpi->pitch - width; - uint8 *dst_orig = dst; - const uint8 *src_orig = src; + int32_t srcScanSkip = surface->pitch - width; + int32_t dstScanSkip = dpi->width + dpi->pitch - width; + uint8_t *dst_orig = dst; + const uint8_t *src_orig = src; // Draw shadow/outline if (info->flags & TEXT_DRAW_FLAG_OUTLINE) { - for (sint32 yy = 0; yy < height - 0; yy++) { - for (sint32 xx = 0; xx < width - 0; xx++) { + for (int32_t yy = 0; yy < height - 0; yy++) { + for (int32_t xx = 0; xx < width - 0; xx++) { if (*src != 0) { *(dst + 1) = info->palette[3]; // right *(dst - 1) = info->palette[3]; // left @@ -538,8 +538,8 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo *dpi, const utf8 *text, te dst = dst_orig; src = src_orig; bool use_hinting = gConfigFonts.enable_hinting && fontDesc->hinting_threshold > 0; - for (sint32 yy = 0; yy < height; yy++) { - for (sint32 xx = 0; xx < width; xx++) { + for (int32_t yy = 0; yy < height; yy++) { + for (int32_t xx = 0; xx < width; xx++) { if (*src != 0) { if (info->flags & TEXT_DRAW_FLAG_INSET) { *(dst + width + dstScanSkip + 1) = info->palette[3]; @@ -593,20 +593,20 @@ static void ttf_draw_string_raw(rct_drawpixelinfo *dpi, const utf8 *text, text_d static const utf8 *ttf_process_format_code(rct_drawpixelinfo *dpi, const utf8 *text, text_draw_info *info) { const utf8 *nextCh; - sint32 codepoint; + int32_t codepoint; codepoint = utf8_get_next(text, &nextCh); switch (codepoint) { case FORMAT_MOVE_X: - info->x = info->startX + (uint8)(*nextCh++); + info->x = info->startX + (uint8_t)(*nextCh++); break; case FORMAT_ADJUST_PALETTE: { - uint16 eax = palette_to_g1_offset[(uint8)*nextCh++]; + uint16_t eax = palette_to_g1_offset[(uint8_t)*nextCh++]; const rct_g1_element * g1 = gfx_get_g1_element(eax); if (g1 != nullptr) { - uint32 ebx = g1->offset[249] + 256; + uint32_t ebx = g1->offset[249] + 256; if (!(info->flags & TEXT_DRAW_FLAG_OUTLINE)) { ebx = ebx & 0xFF; } @@ -651,19 +651,19 @@ static const utf8 *ttf_process_format_code(rct_drawpixelinfo *dpi, const utf8 *t break; case FORMAT_WINDOW_COLOUR_1: { - uint16 flags = info->flags; + uint16_t flags = info->flags; colour_char_window(gCurrentWindowColours[0], &flags, info->palette); break; } case FORMAT_WINDOW_COLOUR_2: { - uint16 flags = info->flags; + uint16_t flags = info->flags; colour_char_window(gCurrentWindowColours[1], &flags, info->palette); break; } case FORMAT_WINDOW_COLOUR_3: { - uint16 flags = info->flags; + uint16_t flags = info->flags; colour_char_window(gCurrentWindowColours[2], &flags, info->palette); break; } @@ -671,7 +671,7 @@ static const utf8 *ttf_process_format_code(rct_drawpixelinfo *dpi, const utf8 *t break; case FORMAT_INLINE_SPRITE: { - uint32 imageId = *((uint32*)(nextCh)); + uint32_t imageId = *((uint32_t*)(nextCh)); const rct_g1_element * g1 = gfx_get_g1_element(imageId & 0x7FFFF); if (g1 != nullptr) { @@ -685,7 +685,7 @@ static const utf8 *ttf_process_format_code(rct_drawpixelinfo *dpi, const utf8 *t } default: if (codepoint >= FORMAT_COLOUR_CODE_START && codepoint <= FORMAT_COLOUR_CODE_END) { - uint16 flags = info->flags; + uint16_t flags = info->flags; colour_char(codepoint - FORMAT_COLOUR_CODE_START, &flags, info->palette); } else if (codepoint <= 0x16) { //case 0x11? FORMAT_NEW_LINE_X_Y nextCh += 2; @@ -702,7 +702,7 @@ static const utf8 *ttf_process_glyph_run(rct_drawpixelinfo *dpi, const utf8 *tex utf8 buffer[512]; const utf8 *ch = text; const utf8 *lastCh; - sint32 codepoint; + int32_t codepoint; #ifndef NO_TTF bool isTTF = info->flags & TEXT_DRAW_FLAG_TTF; @@ -731,7 +731,7 @@ static void ttf_process_string(rct_drawpixelinfo *dpi, const utf8 *text, text_dr { const utf8 *ch = text; const utf8 *nextCh; - sint32 codepoint; + int32_t codepoint; #ifndef NO_TTF bool isTTF = info->flags & TEXT_DRAW_FLAG_TTF; @@ -753,13 +753,13 @@ static void ttf_process_string(rct_drawpixelinfo *dpi, const utf8 *text, text_dr } } -static void ttf_process_initial_colour(sint32 colour, text_draw_info *info) +static void ttf_process_initial_colour(int32_t colour, text_draw_info *info) { if (colour != TEXT_COLOUR_254 && colour != TEXT_COLOUR_255) { info->flags &= ~(TEXT_DRAW_FLAG_INSET | TEXT_DRAW_FLAG_OUTLINE | TEXT_DRAW_FLAG_DARK | TEXT_DRAW_FLAG_EXTRA_DARK); - if ((sint16)info->font_sprite_base < 0) { + if ((int16_t)info->font_sprite_base < 0) { info->flags |= TEXT_DRAW_FLAG_DARK; - if ((sint16)info->font_sprite_base == FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK) { + if ((int16_t)info->font_sprite_base == FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK) { info->flags |= TEXT_DRAW_FLAG_EXTRA_DARK; } info->font_sprite_base = FONT_SPRITE_BASE_MEDIUM; @@ -770,14 +770,14 @@ static void ttf_process_initial_colour(sint32 colour, text_draw_info *info) colour &= ~COLOUR_FLAG_OUTLINE; if (!(colour & COLOUR_FLAG_INSET)) { if (!(info->flags & TEXT_DRAW_FLAG_INSET)) { - uint16 flags = info->flags; - colour_char_window(colour, &flags, (uint8*)&info->palette); + uint16_t flags = info->flags; + colour_char_window(colour, &flags, (uint8_t*)&info->palette); } } else { info->flags |= TEXT_DRAW_FLAG_INSET; colour &= ~COLOUR_FLAG_INSET; - uint32 eax; + uint32_t eax; if (info->flags & TEXT_DRAW_FLAG_DARK) { if (info->flags & TEXT_DRAW_FLAG_EXTRA_DARK) { eax = ColourMapA[colour].mid_light; @@ -804,7 +804,7 @@ static void ttf_process_initial_colour(sint32 colour, text_draw_info *info) } } -void ttf_draw_string(rct_drawpixelinfo *dpi, const_utf8string text, sint32 colour, sint32 x, sint32 y) +void ttf_draw_string(rct_drawpixelinfo *dpi, const_utf8string text, int32_t colour, int32_t x, int32_t y) { if (text == nullptr) return; @@ -832,7 +832,7 @@ void ttf_draw_string(rct_drawpixelinfo *dpi, const_utf8string text, sint32 colou gLastDrawStringY = info.y; } -static sint32 ttf_get_string_width(const utf8 *text) +static int32_t ttf_get_string_width(const utf8 *text) { text_draw_info info; info.font_sprite_base = gCurrentFontSpriteBase; @@ -858,7 +858,7 @@ static sint32 ttf_get_string_width(const utf8 *text) * * rct2: 0x00682F28 */ -void gfx_draw_string_with_y_offsets(rct_drawpixelinfo *dpi, const utf8 *text, sint32 colour, sint32 x, sint32 y, const sint8 *yOffsets, bool forceSpriteFont) +void gfx_draw_string_with_y_offsets(rct_drawpixelinfo *dpi, const utf8 *text, int32_t colour, int32_t x, int32_t y, const int8_t *yOffsets, bool forceSpriteFont) { text_draw_info info; info.font_sprite_base = gCurrentFontSpriteBase; @@ -887,7 +887,7 @@ void gfx_draw_string_with_y_offsets(rct_drawpixelinfo *dpi, const utf8 *text, si gLastDrawStringY = info.y; } -void shorten_path(utf8 *buffer, size_t bufferSize, const utf8 *path, sint32 availableWidth) +void shorten_path(utf8 *buffer, size_t bufferSize, const utf8 *path, int32_t availableWidth) { size_t length = strlen(path); @@ -898,7 +898,7 @@ void shorten_path(utf8 *buffer, size_t bufferSize, const utf8 *path, sint32 avai } // Count path separators - sint32 path_separators = 0; + int32_t path_separators = 0; for (size_t x = 0; x < length; x++) { if (path[x] == *PATH_SEPARATOR || path[x] == '/') { path_separators++; @@ -909,8 +909,8 @@ void shorten_path(utf8 *buffer, size_t bufferSize, const utf8 *path, sint32 avai safe_strcpy(buffer, "...", bufferSize); // Abbreviate beginning with xth separator - sint32 begin = -1; - for (sint32 x = 0; x < path_separators; x++){ + int32_t begin = -1; + for (int32_t x = 0; x < path_separators; x++){ do { begin++; } while (path[begin] != *PATH_SEPARATOR && path[begin] != '/'); diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 18f0608f74..4e4f043d95 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -18,18 +18,18 @@ #include "Drawing.h" // HACK These were originally passed back through registers -sint32 gLastDrawStringX; -sint32 gLastDrawStringY; +int32_t gLastDrawStringX; +int32_t gLastDrawStringY; -sint16 gCurrentFontSpriteBase; -uint16 gCurrentFontFlags; +int16_t gCurrentFontSpriteBase; +uint16_t gCurrentFontFlags; -uint8 gGamePalette[256 * 4]; -uint32 gPaletteEffectFrame; +uint8_t gGamePalette[256 * 4]; +uint32_t gPaletteEffectFrame; -uint32 gPickupPeepImage; -sint32 gPickupPeepX; -sint32 gPickupPeepY; +uint32_t gPickupPeepImage; +int32_t gPickupPeepX; +int32_t gPickupPeepY; /** * 12 elements from 0xF3 are the peep top colour, 12 elements from 0xCA are peep trouser colour @@ -37,7 +37,7 @@ sint32 gPickupPeepY; * rct2: 0x0009ABE0C */ // clang-format off -uint8 gPeepPalette[256] = { +uint8_t gPeepPalette[256] = { 0x00, 0xF3, 0xF4, 0xF5, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, @@ -57,7 +57,7 @@ uint8 gPeepPalette[256] = { }; /** rct2: 0x009ABF0C */ -uint8 gOtherPalette[256] = { +uint8_t gOtherPalette[256] = { 0x00, 0xF3, 0xF4, 0xF5, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, @@ -77,7 +77,7 @@ uint8 gOtherPalette[256] = { }; // Originally 0x9ABE04 -uint8 text_palette[0x8] = { +uint8_t text_palette[0x8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -266,7 +266,7 @@ const FILTER_PALETTE_ID GlassPaletteIds[COLOUR_COUNT] = { }; // Previously 0x97FCBC use it to get the correct palette from g1_elements -const uint16 palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = { +const uint16_t palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = { SPR_PALETTE_BLACK, SPR_PALETTE_GREY, SPR_PALETTE_WHITE, @@ -464,8 +464,8 @@ const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT] = { }; // clang-format on -void (*mask_fn)(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap) = nullptr; +void (*mask_fn)(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) = nullptr; void mask_init() { @@ -486,12 +486,12 @@ void mask_init() } } -void gfx_draw_pixel(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 colour) +void gfx_draw_pixel(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t colour) { gfx_fill_rect(dpi, x, y, x, y, colour); } -void gfx_filter_pixel(rct_drawpixelinfo *dpi, sint32 x, sint32 y, FILTER_PALETTE_ID palette) +void gfx_filter_pixel(rct_drawpixelinfo *dpi, int32_t x, int32_t y, FILTER_PALETTE_ID palette) { gfx_filter_rect(dpi, x, y, x, y, palette); } @@ -502,15 +502,15 @@ void gfx_filter_pixel(rct_drawpixelinfo *dpi, sint32 x, sint32 y, FILTER_PALETTE * a1 (ebx) * product (cl) */ -void gfx_transpose_palette(sint32 pal, uint8 product) +void gfx_transpose_palette(int32_t pal, uint8_t product) { const rct_g1_element * g1 = gfx_get_g1_element(pal); if (g1 != nullptr) { - sint32 width = g1->width; - sint32 x = g1->x_offset; - uint8 * dest_pointer = &gGamePalette[x * 4]; - uint8 * source_pointer = g1->offset; + int32_t width = g1->width; + int32_t x = g1->x_offset; + uint8_t * dest_pointer = &gGamePalette[x * 4]; + uint8_t * source_pointer = g1->offset; for (; width > 0; width--) { dest_pointer[0] = (source_pointer[0] * product) >> 8; @@ -535,20 +535,20 @@ void load_palette() auto water_type = (rct_water_type *)object_entry_get_chunk(OBJECT_TYPE_WATER, 0); - uint32 palette = 0x5FC; + uint32_t palette = 0x5FC; if (water_type != nullptr) { - openrct2_assert(water_type->image_id != (uint32)-1, "Failed to load water palette"); + openrct2_assert(water_type->image_id != (uint32_t)-1, "Failed to load water palette"); palette = water_type->image_id; } const rct_g1_element * g1 = gfx_get_g1_element(palette); if (g1 != nullptr) { - sint32 width = g1->width; - sint32 x = g1->x_offset; - uint8 * src = g1->offset; - uint8 * dst = &gGamePalette[x * 4]; + int32_t width = g1->width; + int32_t x = g1->x_offset; + uint8_t * src = g1->offset; + uint8_t * dst = &gGamePalette[x * 4]; for (; width > 0; width--) { dst[0] = src[0]; @@ -580,10 +580,10 @@ void gfx_invalidate_screen() * height (dx) * drawpixelinfo (edi) */ -bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, sint32 x, sint32 y, sint32 width, sint32 height) +bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, int32_t x, int32_t y, int32_t width, int32_t height) { - sint32 right = x + width; - sint32 bottom = y + height; + int32_t right = x + width; + int32_t bottom = y + height; dst->bits = src->bits; dst->x = src->x; @@ -594,28 +594,28 @@ bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, sint32 x dst->zoom_level = 0; if (x > dst->x) { - uint16 clippedFromLeft = x - dst->x; + uint16_t clippedFromLeft = x - dst->x; dst->width -= clippedFromLeft; dst->x = x; dst->pitch += clippedFromLeft; dst->bits += clippedFromLeft; } - sint32 stickOutWidth = dst->x + dst->width - right; + int32_t stickOutWidth = dst->x + dst->width - right; if (stickOutWidth > 0) { dst->width -= stickOutWidth; dst->pitch += stickOutWidth; } if (y > dst->y) { - uint16 clippedFromTop = y - dst->y; + uint16_t clippedFromTop = y - dst->y; dst->height -= clippedFromTop; dst->y = y; - uint32 bitsPlus = (dst->pitch + dst->width) * clippedFromTop; + uint32_t bitsPlus = (dst->pitch + dst->width) * clippedFromTop; dst->bits += bitsPlus; } - sint32 bp = dst->y + dst->height - bottom; + int32_t bp = dst->y + dst->height - bottom; if (bp > 0) { dst->height -= bp; } @@ -631,16 +631,16 @@ bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, sint32 x void gfx_invalidate_pickedup_peep() { - uint32 sprite = gPickupPeepImage; + uint32_t sprite = gPickupPeepImage; if (sprite != UINT32_MAX) { const rct_g1_element * g1 = gfx_get_g1_element(sprite & 0x7FFFF); if (g1 != nullptr) { - sint32 left = gPickupPeepX + g1->x_offset; - sint32 top = gPickupPeepY + g1->y_offset; - sint32 right = left + g1->width; - sint32 bottom = top + g1->height; + int32_t left = gPickupPeepX + g1->x_offset; + int32_t top = gPickupPeepY + g1->y_offset; + int32_t right = left + g1->width; + int32_t bottom = top + g1->height; gfx_set_dirty_blocks(left, top, right, bottom); } } diff --git a/src/openrct2/drawing/Drawing.h b/src/openrct2/drawing/Drawing.h index 3879eb9c3c..ba0df2241d 100644 --- a/src/openrct2/drawing/Drawing.h +++ b/src/openrct2/drawing/Drawing.h @@ -19,33 +19,33 @@ namespace OpenRCT2 } struct rct_g1_element { - uint8* offset; // 0x00 - sint16 width; // 0x04 - sint16 height; // 0x06 - sint16 x_offset; // 0x08 - sint16 y_offset; // 0x0A - uint16 flags; // 0x0C - uint16 zoomed_offset; // 0x0E + uint8_t* offset; // 0x00 + int16_t width; // 0x04 + int16_t height; // 0x06 + int16_t x_offset; // 0x08 + int16_t y_offset; // 0x0A + uint16_t flags; // 0x0C + uint16_t zoomed_offset; // 0x0E }; struct rct_drawpixelinfo { - uint8* bits; // 0x00 - sint16 x; // 0x04 - sint16 y; // 0x06 - sint16 width; // 0x08 - sint16 height; // 0x0A - sint16 pitch; // 0x0C note: this is actually (pitch - width) - uint16 zoom_level; // 0x0E + uint8_t* bits; // 0x00 + int16_t x; // 0x04 + int16_t y; // 0x06 + int16_t width; // 0x08 + int16_t height; // 0x0A + int16_t pitch; // 0x0C note: this is actually (pitch - width) + uint16_t zoom_level; // 0x0E }; struct rct_g1_element_32bit { - uint32 offset; // 0x00 note: uint32 always! - sint16 width; // 0x04 - sint16 height; // 0x06 - sint16 x_offset; // 0x08 - sint16 y_offset; // 0x0A - uint16 flags; // 0x0C - uint16 zoomed_offset; // 0x0E + uint32_t offset; // 0x00 note: uint32_t always! + int16_t width; // 0x04 + int16_t height; // 0x06 + int16_t x_offset; // 0x08 + int16_t y_offset; // 0x0A + uint16_t flags; // 0x0C + uint16_t zoomed_offset; // 0x0E }; assert_struct_size(rct_g1_element_32bit, 0x10); @@ -59,7 +59,7 @@ enum { G1_FLAG_NO_ZOOM_DRAW = (1 << 5), // Does not get drawn at higher zoom levels (only zoom 0) }; -enum : uint32 +enum : uint32_t { IMAGE_TYPE_DEFAULT = 0, IMAGE_TYPE_REMAP = (1 << 29), @@ -196,10 +196,10 @@ struct translucent_window_palette { #pragma pack(push, 1) struct rct_palette_entry { - uint8 blue; - uint8 green; - uint8 red; - uint8 alpha; + uint8_t blue; + uint8_t green; + uint8_t red; + uint8_t alpha; }; assert_struct_size(rct_palette_entry, 4); @@ -211,8 +211,8 @@ struct rct_palette { struct rct_size16 { - sint16 width; - sint16 height; + int16_t width; + int16_t height; }; #define SPRITE_ID_PALETTE_COLOUR_1(colourId) (IMAGE_TYPE_REMAP | ((colourId) << 19)) @@ -227,25 +227,25 @@ struct rct_size16 #define MAX_SCROLLING_TEXT_MODES 38 -extern sint16 gCurrentFontSpriteBase; -extern uint16 gCurrentFontFlags; +extern int16_t gCurrentFontSpriteBase; +extern uint16_t gCurrentFontFlags; extern rct_palette_entry gPalette[256]; -extern uint8 gGamePalette[256 * 4]; -extern uint32 gPaletteEffectFrame; +extern uint8_t gGamePalette[256 * 4]; +extern uint32_t gPaletteEffectFrame; extern const FILTER_PALETTE_ID GlassPaletteIds[COLOUR_COUNT]; -extern const uint16 palette_to_g1_offset[]; -extern uint8 gPeepPalette[256]; -extern uint8 gOtherPalette[256]; -extern uint8 text_palette[]; +extern const uint16_t palette_to_g1_offset[]; +extern uint8_t gPeepPalette[256]; +extern uint8_t gOtherPalette[256]; +extern uint8_t text_palette[]; extern const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT]; -extern sint32 gLastDrawStringX; -extern sint32 gLastDrawStringY; +extern int32_t gLastDrawStringX; +extern int32_t gLastDrawStringY; -extern uint32 gPickupPeepImage; -extern sint32 gPickupPeepX; -extern sint32 gPickupPeepY; +extern uint32_t gPickupPeepImage; +extern int32_t gPickupPeepX; +extern int32_t gPickupPeepY; extern bool gTinyFontAntiAliased; @@ -253,30 +253,30 @@ extern rct_drawpixelinfo gScreenDPI; extern rct_drawpixelinfo gWindowDPI; // -bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, sint32 x, sint32 y, sint32 width, sint32 height); -void gfx_set_dirty_blocks(sint16 left, sint16 top, sint16 right, sint16 bottom); +bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, int32_t x, int32_t y, int32_t width, int32_t height); +void gfx_set_dirty_blocks(int16_t left, int16_t top, int16_t right, int16_t bottom); void gfx_draw_all_dirty_blocks(); void gfx_invalidate_screen(); // palette -void gfx_transpose_palette(sint32 pal, uint8 product); +void gfx_transpose_palette(int32_t pal, uint8_t product); void load_palette(); // other -void gfx_clear(rct_drawpixelinfo *dpi, uint8 paletteIndex); -void gfx_draw_pixel(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 colour); -void gfx_filter_pixel(rct_drawpixelinfo *dpi, sint32 x, sint32 y, FILTER_PALETTE_ID palette); +void gfx_clear(rct_drawpixelinfo *dpi, uint8_t paletteIndex); +void gfx_draw_pixel(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t colour); +void gfx_filter_pixel(rct_drawpixelinfo *dpi, int32_t x, int32_t y, FILTER_PALETTE_ID palette); void gfx_invalidate_pickedup_peep(); void gfx_draw_pickedup_peep(rct_drawpixelinfo *dpi); // line -void gfx_draw_line(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 x2, sint32 y2, sint32 colour); -void gfx_draw_line_software(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 x2, sint32 y2, sint32 colour); +void gfx_draw_line(rct_drawpixelinfo *dpi, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t colour); +void gfx_draw_line_software(rct_drawpixelinfo *dpi, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t colour); // rect -void gfx_fill_rect(rct_drawpixelinfo *dpi, sint32 left, sint32 top, sint32 right, sint32 bottom, sint32 colour); -void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, sint16 left, sint16 top, sint16 right, sint16 bottom, sint32 colour, uint8 flags); -void gfx_filter_rect(rct_drawpixelinfo *dpi, sint32 left, sint32 top, sint32 right, sint32 bottom, FILTER_PALETTE_ID palette); +void gfx_fill_rect(rct_drawpixelinfo *dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t colour); +void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, int16_t left, int16_t top, int16_t right, int16_t bottom, int32_t colour, uint8_t flags); +void gfx_filter_rect(rct_drawpixelinfo *dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FILTER_PALETTE_ID palette); // sprite bool gfx_load_g1(const OpenRCT2::IPlatformEnvironment& env); @@ -285,72 +285,72 @@ bool gfx_load_csg(); void gfx_unload_g1(); void gfx_unload_g2(); void gfx_unload_csg(); -const rct_g1_element * gfx_get_g1_element(sint32 image_id); -void gfx_set_g1_element(sint32 imageId, const rct_g1_element * g1); +const rct_g1_element * gfx_get_g1_element(int32_t image_id); +void gfx_set_g1_element(int32_t imageId, const rct_g1_element * g1); bool is_csg_loaded(); -uint32 gfx_object_allocate_images(const rct_g1_element * images, uint32 count); -void gfx_object_free_images(uint32 baseImageId, uint32 count); +uint32_t gfx_object_allocate_images(const rct_g1_element * images, uint32_t count); +void gfx_object_free_images(uint32_t baseImageId, uint32_t count); void gfx_object_check_all_images_freed(); -void FASTCALL gfx_bmp_sprite_to_buffer(const uint8* palette_pointer, uint8* source_pointer, uint8* dest_pointer, const rct_g1_element* source_image, rct_drawpixelinfo *dest_dpi, sint32 height, sint32 width, sint32 image_type); -void FASTCALL gfx_rle_sprite_to_buffer(const uint8* RESTRICT source_bits_pointer, uint8* RESTRICT dest_bits_pointer, const uint8* RESTRICT palette_pointer, const rct_drawpixelinfo * RESTRICT dpi, sint32 image_type, sint32 source_y_start, sint32 height, sint32 source_x_start, sint32 width); -void FASTCALL gfx_draw_sprite(rct_drawpixelinfo *dpi, sint32 image_id, sint32 x, sint32 y, uint32 tertiary_colour); -void FASTCALL gfx_draw_glpyh(rct_drawpixelinfo *dpi, sint32 image_id, sint32 x, sint32 y, uint8 * palette); -void FASTCALL gfx_draw_sprite_raw_masked(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 maskImage, sint32 colourImage); -void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo * dpi, sint32 image, sint32 x, sint32 y, uint8 colour); +void FASTCALL gfx_bmp_sprite_to_buffer(const uint8_t* palette_pointer, uint8_t* source_pointer, uint8_t* dest_pointer, const rct_g1_element* source_image, rct_drawpixelinfo *dest_dpi, int32_t height, int32_t width, int32_t image_type); +void FASTCALL gfx_rle_sprite_to_buffer(const uint8_t* RESTRICT source_bits_pointer, uint8_t* RESTRICT dest_bits_pointer, const uint8_t* RESTRICT palette_pointer, const rct_drawpixelinfo * RESTRICT dpi, int32_t image_type, int32_t source_y_start, int32_t height, int32_t source_x_start, int32_t width); +void FASTCALL gfx_draw_sprite(rct_drawpixelinfo *dpi, int32_t image_id, int32_t x, int32_t y, uint32_t tertiary_colour); +void FASTCALL gfx_draw_glpyh(rct_drawpixelinfo *dpi, int32_t image_id, int32_t x, int32_t y, uint8_t * palette); +void FASTCALL gfx_draw_sprite_raw_masked(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t maskImage, int32_t colourImage); +void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo * dpi, int32_t image, int32_t x, int32_t y, uint8_t colour); -void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, sint32 image_id, sint32 x, sint32 y, uint32 tertiary_colour); -uint8* FASTCALL gfx_draw_sprite_get_palette(sint32 image_id, uint32 tertiary_colour); -void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, sint32 image_id, sint32 x, sint32 y, uint8* palette_pointer, uint8* unknown_pointer); -void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 maskImage, sint32 colourImage); +void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int32_t image_id, int32_t x, int32_t y, uint32_t tertiary_colour); +uint8_t* FASTCALL gfx_draw_sprite_get_palette(int32_t image_id, uint32_t tertiary_colour); +void FASTCALL gfx_draw_sprite_palette_set_software(rct_drawpixelinfo *dpi, int32_t image_id, int32_t x, int32_t y, uint8_t* palette_pointer, uint8_t* unknown_pointer); +void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t maskImage, int32_t colourImage); // string -void gfx_draw_string(rct_drawpixelinfo *dpi, const_utf8string buffer, uint8 colour, sint32 x, sint32 y); +void gfx_draw_string(rct_drawpixelinfo *dpi, const_utf8string buffer, uint8_t colour, int32_t x, int32_t y); -void gfx_draw_string_left(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y); -void gfx_draw_string_centred(rct_drawpixelinfo *dpi, rct_string_id format, sint32 x, sint32 y, uint8 colour, void *args); -void gfx_draw_string_right(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y); +void gfx_draw_string_left(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y); +void gfx_draw_string_centred(rct_drawpixelinfo *dpi, rct_string_id format, int32_t x, int32_t y, uint8_t colour, void *args); +void gfx_draw_string_right(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y); -void draw_string_left_underline(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y); -void draw_string_centred_underline(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y); -void draw_string_right_underline(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y); +void draw_string_left_underline(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y); +void draw_string_centred_underline(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y); +void draw_string_right_underline(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y); -void gfx_draw_string_left_clipped(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y, sint32 width); -void gfx_draw_string_centred_clipped(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y, sint32 width); -void gfx_draw_string_right_clipped(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8 colour, sint32 x, sint32 y, sint32 width); +void gfx_draw_string_left_clipped(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y, int32_t width); +void gfx_draw_string_centred_clipped(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y, int32_t width); +void gfx_draw_string_right_clipped(rct_drawpixelinfo *dpi, rct_string_id format, void *args, uint8_t colour, int32_t x, int32_t y, int32_t width); -sint32 gfx_draw_string_left_wrapped(rct_drawpixelinfo *dpi, void *args, sint32 x, sint32 y, sint32 width, rct_string_id format, uint8 colour); -sint32 gfx_draw_string_centred_wrapped(rct_drawpixelinfo *dpi, void *args, sint32 x, sint32 y, sint32 width, rct_string_id format, uint8 colour); +int32_t gfx_draw_string_left_wrapped(rct_drawpixelinfo *dpi, void *args, int32_t x, int32_t y, int32_t width, rct_string_id format, uint8_t colour); +int32_t gfx_draw_string_centred_wrapped(rct_drawpixelinfo *dpi, void *args, int32_t x, int32_t y, int32_t width, rct_string_id format, uint8_t colour); -void gfx_draw_string_left_centred(rct_drawpixelinfo *dpi, rct_string_id format, void *args, sint32 colour, sint32 x, sint32 y); -void draw_string_centred_raw(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 numLines, char *text); -void gfx_draw_string_centred_wrapped_partial(rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 width, sint32 colour, rct_string_id format, void *args, sint32 ticks); -void gfx_draw_string_with_y_offsets(rct_drawpixelinfo *dpi, const utf8 *text, sint32 colour, sint32 x, sint32 y, const sint8 *yOffsets, bool forceSpriteFont); +void gfx_draw_string_left_centred(rct_drawpixelinfo *dpi, rct_string_id format, void *args, int32_t colour, int32_t x, int32_t y); +void draw_string_centred_raw(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t numLines, char *text); +void gfx_draw_string_centred_wrapped_partial(rct_drawpixelinfo *dpi, int32_t x, int32_t y, int32_t width, int32_t colour, rct_string_id format, void *args, int32_t ticks); +void gfx_draw_string_with_y_offsets(rct_drawpixelinfo *dpi, const utf8 *text, int32_t colour, int32_t x, int32_t y, const int8_t *yOffsets, bool forceSpriteFont); -sint32 gfx_wrap_string(char* buffer, sint32 width, sint32* num_lines, sint32* font_height); -sint32 gfx_get_string_width(const utf8 * buffer); -sint32 gfx_get_string_width_new_lined(char* buffer); -sint32 string_get_height_raw(char *buffer); -sint32 gfx_clip_string(char* buffer, sint32 width); -void shorten_path(utf8 *buffer, size_t bufferSize, const utf8 *path, sint32 availableWidth); -void ttf_draw_string(rct_drawpixelinfo *dpi, const_utf8string text, sint32 colour, sint32 x, sint32 y); +int32_t gfx_wrap_string(char* buffer, int32_t width, int32_t* num_lines, int32_t* font_height); +int32_t gfx_get_string_width(const utf8 * buffer); +int32_t gfx_get_string_width_new_lined(char* buffer); +int32_t string_get_height_raw(char *buffer); +int32_t gfx_clip_string(char* buffer, int32_t width); +void shorten_path(utf8 *buffer, size_t bufferSize, const utf8 *path, int32_t availableWidth); +void ttf_draw_string(rct_drawpixelinfo *dpi, const_utf8string text, int32_t colour, int32_t x, int32_t y); // scrolling text void scrolling_text_initialise_bitmaps(); -sint32 scrolling_text_setup(struct paint_session * session, rct_string_id stringId, uint16 scroll, uint16 scrollingMode); +int32_t scrolling_text_setup(struct paint_session * session, rct_string_id stringId, uint16_t scroll, uint16_t scrollingMode); -rct_size16 FASTCALL gfx_get_sprite_size(uint32 image_id); +rct_size16 FASTCALL gfx_get_sprite_size(uint32_t image_id); size_t g1_calculate_data_size(const rct_g1_element * g1); -void mask_scalar(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap); -void mask_sse4_1(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap); -void mask_avx2(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap); +void mask_scalar(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); +void mask_sse4_1(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); +void mask_avx2(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); void mask_init(); -extern void (*mask_fn)(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap); +extern void (*mask_fn)(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); #include "NewDrawing.h" diff --git a/src/openrct2/drawing/DrawingFast.cpp b/src/openrct2/drawing/DrawingFast.cpp index 50b81f8391..956ced13b1 100644 --- a/src/openrct2/drawing/DrawingFast.cpp +++ b/src/openrct2/drawing/DrawingFast.cpp @@ -13,22 +13,22 @@ #include "Drawing.h" -template -static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, - uint8* RESTRICT dest_bits_pointer, - const uint8* RESTRICT palette_pointer, +template +static void FASTCALL DrawRLESprite2(const uint8_t* RESTRICT source_bits_pointer, + uint8_t* RESTRICT dest_bits_pointer, + const uint8_t* RESTRICT palette_pointer, const rct_drawpixelinfo *RESTRICT dpi, - sint32 source_y_start, - sint32 height, - sint32 source_x_start, - sint32 width) + int32_t source_y_start, + int32_t height, + int32_t source_x_start, + int32_t width) { // The distance between two samples in the source image. // We draw the image at 1 / (2^zoom_level) scale. - sint32 zoom_amount = 1 << zoom_level; + int32_t zoom_amount = 1 << zoom_level; // Width of one screen line in the dest buffer - sint32 line_width = (dpi->width >> zoom_level) + dpi->pitch; + int32_t line_width = (dpi->width >> zoom_level) + dpi->pitch; // Move up to the first line of the image if source_y_start is negative. Why does this even occur? if (source_y_start < 0) @@ -39,26 +39,26 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, } //For every line in the image - for (sint32 i = 0; i < height; i += zoom_amount) + for (int32_t i = 0; i < height; i += zoom_amount) { - sint32 y = source_y_start + i; + int32_t y = source_y_start + i; //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 *lineData = source_bits_pointer + ((uint16*)source_bits_pointer)[y]; - uint8* loop_dest_pointer = dest_bits_pointer + line_width * (i >> zoom_level); + const uint8_t *lineData = source_bits_pointer + ((uint16_t*)source_bits_pointer)[y]; + uint8_t* loop_dest_pointer = dest_bits_pointer + line_width * (i >> zoom_level); - uint8 isEndOfLine = 0; + uint8_t isEndOfLine = 0; // For every data chunk in the line while (!isEndOfLine) { - const uint8* copySrc = lineData; - //uint8* copyDest = loop_dest_pointer; + const uint8_t* copySrc = lineData; + //uint8_t* copyDest = loop_dest_pointer; // Read chunk metadata - uint8 dataSize = *copySrc++; - uint8 firstPixelX = *copySrc++; + uint8_t dataSize = *copySrc++; + uint8_t firstPixelX = *copySrc++; isEndOfLine = dataSize & 0x80; // If the last bit in dataSize is set, then this is the last line dataSize &= 0x7F; // The rest of the bits are the actual size @@ -66,8 +66,8 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, //Have our next source pointer point to the next data section lineData = copySrc + dataSize; - sint32 x_start = firstPixelX - source_x_start; - sint32 numPixels = dataSize; + int32_t x_start = firstPixelX - source_x_start; + int32_t numPixels = dataSize; if (x_start > 0) { @@ -96,7 +96,7 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, if (x_start + numPixels > width) numPixels = width - x_start; - uint8 *copyDest = loop_dest_pointer + (x_start >> zoom_level); + uint8_t *copyDest = loop_dest_pointer + (x_start >> zoom_level); //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 @@ -106,7 +106,7 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, { if (image_type & IMAGE_TYPE_TRANSPARENT) { - uint16 color = ((*copySrc << 8) | *copyDest) - 0x100; + uint16_t color = ((*copySrc << 8) | *copyDest) - 0x100; *copyDest = palette_pointer[color]; } else @@ -119,7 +119,7 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, { for (int j = 0; j < numPixels; j += zoom_amount, copyDest++) { - uint8 pixel = *copyDest; + uint8_t pixel = *copyDest; pixel = palette_pointer[pixel]; *copyDest = pixel; } @@ -145,17 +145,17 @@ static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, #define DrawRLESpriteHelper2(image_type, zoom_level) \ DrawRLESprite2(source_bits_pointer, dest_bits_pointer, palette_pointer, dpi, source_y_start, height, source_x_start, width) -template -static void FASTCALL DrawRLESprite1(const uint8* source_bits_pointer, - uint8* dest_bits_pointer, - const uint8* palette_pointer, +template +static void FASTCALL DrawRLESprite1(const uint8_t* source_bits_pointer, + uint8_t* dest_bits_pointer, + const uint8_t* palette_pointer, const rct_drawpixelinfo *dpi, - sint32 source_y_start, - sint32 height, - sint32 source_x_start, - sint32 width) + int32_t source_y_start, + int32_t height, + int32_t source_x_start, + int32_t width) { - sint32 zoom_level = dpi->zoom_level; + int32_t zoom_level = dpi->zoom_level; switch (zoom_level) { case 0: DrawRLESpriteHelper2(image_type, 0); break; case 1: DrawRLESpriteHelper2(image_type, 1); break; @@ -173,15 +173,15 @@ static void FASTCALL DrawRLESprite1(const uint8* source_bits_pointer, * This function copies the sprite data onto the screen * rct2: 0x0067AA18 */ -void FASTCALL gfx_rle_sprite_to_buffer(const uint8* RESTRICT source_bits_pointer, - uint8* RESTRICT dest_bits_pointer, - const uint8* RESTRICT palette_pointer, +void FASTCALL gfx_rle_sprite_to_buffer(const uint8_t* RESTRICT source_bits_pointer, + uint8_t* RESTRICT dest_bits_pointer, + const uint8_t* RESTRICT palette_pointer, const rct_drawpixelinfo * RESTRICT dpi, - sint32 image_type, - sint32 source_y_start, - sint32 height, - sint32 source_x_start, - sint32 width) + int32_t image_type, + int32_t source_y_start, + int32_t height, + int32_t source_x_start, + int32_t width) { if (image_type & IMAGE_TYPE_REMAP) { diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index 65f3e7f19d..e8e7a2a6c8 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -16,9 +16,9 @@ #include "Font.h" #include "TTF.h" -static constexpr const sint32 SpriteFontLineHeight[] = { 6, 10, 10, 18 }; +static constexpr const int32_t SpriteFontLineHeight[] = { 6, 10, 10, 18 }; -static uint8 _spriteFontCharacterWidths[896]; +static uint8_t _spriteFontCharacterWidths[896]; #ifndef NO_TTF TTFFontSetDescriptor *gCurrentTTFFontSet; @@ -30,19 +30,19 @@ TTFFontSetDescriptor *gCurrentTTFFontSet; */ void font_sprite_initialise_characters() { - uint8* pCharacterWidth = _spriteFontCharacterWidths; - for (sint32 fontSize = 0; fontSize < FONT_SIZE_COUNT; fontSize++) { - sint32 glyphOffset = fontSize * FONT_SPRITE_GLYPH_COUNT; - for (uint8 glyphIndex = 0; glyphIndex < FONT_SPRITE_GLYPH_COUNT; glyphIndex++) { + uint8_t* pCharacterWidth = _spriteFontCharacterWidths; + for (int32_t fontSize = 0; fontSize < FONT_SIZE_COUNT; fontSize++) { + int32_t glyphOffset = fontSize * FONT_SPRITE_GLYPH_COUNT; + for (uint8_t glyphIndex = 0; glyphIndex < FONT_SPRITE_GLYPH_COUNT; glyphIndex++) { const rct_g1_element * g1 = gfx_get_g1_element(glyphIndex + SPR_CHAR_START + glyphOffset); if (g1 != nullptr) { - sint32 width = g1->width + 2 * g1->x_offset; + int32_t width = g1->width + 2 * g1->x_offset; width += fontSize == FONT_SIZE_BIG ? 1 : -1; if (glyphIndex >= (FORMAT_ARGUMENT_CODE_START - 32) && glyphIndex < (FORMAT_COLOUR_CODE_END - 32)) { width = 0; } - *pCharacterWidth++ = (uint8)width; + *pCharacterWidth++ = (uint8_t)width; } } } @@ -50,7 +50,7 @@ void font_sprite_initialise_characters() scrolling_text_initialise_bitmaps(); } -sint32 font_sprite_get_codepoint_offset(sint32 codepoint) +int32_t font_sprite_get_codepoint_offset(int32_t codepoint) { switch (codepoint) { case FORMAT_ENDQUOTES: return 34 - 32; @@ -117,16 +117,16 @@ sint32 font_sprite_get_codepoint_offset(sint32 codepoint) } } -sint32 font_sprite_get_codepoint_width(uint16 fontSpriteBase, sint32 codepoint) +int32_t font_sprite_get_codepoint_width(uint16_t fontSpriteBase, int32_t codepoint) { - if (fontSpriteBase == (uint16)FONT_SPRITE_BASE_MEDIUM_DARK || - fontSpriteBase == (uint16)FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK) + if (fontSpriteBase == (uint16_t)FONT_SPRITE_BASE_MEDIUM_DARK || + fontSpriteBase == (uint16_t)FONT_SPRITE_BASE_MEDIUM_EXTRA_DARK) { - fontSpriteBase = (uint16)FONT_SPRITE_BASE_MEDIUM; + fontSpriteBase = (uint16_t)FONT_SPRITE_BASE_MEDIUM; } - sint32 spriteFontIdx = fontSpriteBase + font_sprite_get_codepoint_offset(codepoint); - if (spriteFontIdx < 0 || spriteFontIdx >= (sint32)Util::CountOf(_spriteFontCharacterWidths)) + int32_t spriteFontIdx = fontSpriteBase + font_sprite_get_codepoint_offset(codepoint); + if (spriteFontIdx < 0 || spriteFontIdx >= (int32_t)Util::CountOf(_spriteFontCharacterWidths)) { log_warning("Invalid font index %u", spriteFontIdx); spriteFontIdx = 0; @@ -134,12 +134,12 @@ sint32 font_sprite_get_codepoint_width(uint16 fontSpriteBase, sint32 codepoint) return _spriteFontCharacterWidths[spriteFontIdx]; } -sint32 font_sprite_get_codepoint_sprite(sint32 fontSpriteBase, sint32 codepoint) +int32_t font_sprite_get_codepoint_sprite(int32_t fontSpriteBase, int32_t codepoint) { return SPR_CHAR_START + (IMAGE_TYPE_REMAP | (fontSpriteBase + font_sprite_get_codepoint_offset(codepoint))); } -sint32 font_get_size_from_sprite_base(uint16 spriteBase) +int32_t font_get_size_from_sprite_base(uint16_t spriteBase) { switch (spriteBase) { case FONT_SPRITE_BASE_TINY: @@ -154,9 +154,9 @@ sint32 font_get_size_from_sprite_base(uint16 spriteBase) } } -sint32 font_get_line_height(sint32 fontSpriteBase) +int32_t font_get_line_height(int32_t fontSpriteBase) { - sint32 fontSize = font_get_size_from_sprite_base(fontSpriteBase); + int32_t fontSize = font_get_size_from_sprite_base(fontSpriteBase); #ifndef NO_TTF if (LocalisationService_UseTrueTypeFont()) { return gCurrentTTFFontSet->size[fontSize].line_height; @@ -168,7 +168,7 @@ sint32 font_get_line_height(sint32 fontSpriteBase) #endif // NO_TTF } -sint32 font_get_line_height_small(sint32 fontSpriteBase) +int32_t font_get_line_height_small(int32_t fontSpriteBase) { return font_get_line_height(fontSpriteBase) / 2; } @@ -177,7 +177,7 @@ bool font_supports_string_sprite(const utf8 *text) { const utf8 *src = text; - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(src, &src)) != 0) { bool supported = false; switch (codepoint) { @@ -241,7 +241,7 @@ bool font_supports_string_sprite(const utf8 *text) return true; } -bool font_supports_string_ttf(const utf8 *text, sint32 fontSize) +bool font_supports_string_ttf(const utf8 *text, int32_t fontSize) { #ifndef NO_TTF const utf8 *src = text; @@ -250,7 +250,7 @@ bool font_supports_string_ttf(const utf8 *text, sint32 fontSize) return false; } - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(src, &src)) != 0) { bool supported = ttf_provides_glyph(font, codepoint); if (!supported) { @@ -263,7 +263,7 @@ bool font_supports_string_ttf(const utf8 *text, sint32 fontSize) #endif // NO_TTF } -bool font_supports_string(const utf8 *text, sint32 fontSize) +bool font_supports_string(const utf8 *text, int32_t fontSize) { if (LocalisationService_UseTrueTypeFont()) { return font_supports_string_ttf(text, fontSize); diff --git a/src/openrct2/drawing/Font.h b/src/openrct2/drawing/Font.h index 67d054f8cb..90b0f0f32b 100644 --- a/src/openrct2/drawing/Font.h +++ b/src/openrct2/drawing/Font.h @@ -38,11 +38,11 @@ using TTF_Font = _TTF_Font; struct TTFFontDescriptor { const utf8 *filename; const utf8 *font_name; - sint32 ptSize; - sint32 offset_x; - sint32 offset_y; - sint32 line_height; - sint32 hinting_threshold; + int32_t ptSize; + int32_t offset_x; + int32_t offset_y; + int32_t line_height; + int32_t hinting_threshold; TTF_Font * font; }; @@ -55,14 +55,14 @@ extern TTFFontSetDescriptor *gCurrentTTFFontSet; #endif // NO_TTF void font_sprite_initialise_characters(); -sint32 font_sprite_get_codepoint_offset(sint32 codepoint); -sint32 font_sprite_get_codepoint_width(uint16 fontSpriteBase, sint32 codepoint); -sint32 font_sprite_get_codepoint_sprite(sint32 fontSpriteBase, sint32 codepoint); -sint32 font_get_size_from_sprite_base(uint16 spriteBase); -sint32 font_get_line_height(sint32 fontSpriteBase); -sint32 font_get_line_height_small(sint32 fontSpriteBase); +int32_t font_sprite_get_codepoint_offset(int32_t codepoint); +int32_t font_sprite_get_codepoint_width(uint16_t fontSpriteBase, int32_t codepoint); +int32_t font_sprite_get_codepoint_sprite(int32_t fontSpriteBase, int32_t codepoint); +int32_t font_get_size_from_sprite_base(uint16_t spriteBase); +int32_t font_get_line_height(int32_t fontSpriteBase); +int32_t font_get_line_height_small(int32_t fontSpriteBase); bool font_supports_string_sprite(const utf8 *text); -bool font_supports_string_ttf(const utf8 *text, sint32 fontSize); -bool font_supports_string(const utf8 *text, sint32 fontSize); +bool font_supports_string_ttf(const utf8 *text, int32_t fontSize); +bool font_supports_string(const utf8 *text, int32_t fontSize); #endif diff --git a/src/openrct2/drawing/IDrawingContext.h b/src/openrct2/drawing/IDrawingContext.h index 83d3858059..82857c80ff 100644 --- a/src/openrct2/drawing/IDrawingContext.h +++ b/src/openrct2/drawing/IDrawingContext.h @@ -23,13 +23,13 @@ namespace OpenRCT2::Drawing virtual OpenRCT2::Drawing::IDrawingEngine * GetEngine() abstract; - virtual void Clear(uint8 paletteIndex) abstract; - virtual void FillRect(uint32 colour, sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; - virtual void FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; - virtual void DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) abstract; - virtual void DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) abstract; - virtual void DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) abstract; - virtual void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) abstract; - virtual void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) abstract; + virtual void Clear(uint8_t paletteIndex) abstract; + virtual void FillRect(uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; + virtual void FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; + virtual void DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) abstract; + virtual void DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) abstract; + virtual void DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) abstract; + virtual void DrawSpriteSolid(uint32_t image, int32_t x, int32_t y, uint8_t colour) abstract; + virtual void DrawGlyph(uint32_t image, int32_t x, int32_t y, uint8_t * palette) abstract; }; } // namespace OpenRCT2::Drawing diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index eff1e7752d..4edc98d48f 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -49,25 +49,25 @@ namespace OpenRCT2::Drawing virtual ~IDrawingEngine() { } virtual void Initialise() abstract; - virtual void Resize(uint32 width, uint32 height) abstract; + virtual void Resize(uint32_t width, uint32_t height) abstract; virtual void SetPalette(const rct_palette_entry * colours) abstract; virtual void SetVSync(bool vsync) abstract; - virtual void Invalidate(sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; + virtual void Invalidate(int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; virtual void BeginDraw() abstract; virtual void EndDraw() abstract; virtual void PaintWindows() abstract; virtual void PaintRain() abstract; - virtual void CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) abstract; - virtual sint32 Screenshot() abstract; + virtual void CopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) abstract; + virtual int32_t Screenshot() abstract; virtual IDrawingContext * GetDrawingContext(rct_drawpixelinfo * dpi) abstract; virtual rct_drawpixelinfo * GetDrawingPixelInfo() abstract; virtual DRAWING_ENGINE_FLAGS GetFlags() abstract; - virtual void InvalidateImage(uint32 image) abstract; + virtual void InvalidateImage(uint32_t image) abstract; }; interface IDrawingEngineFactory @@ -79,11 +79,11 @@ namespace OpenRCT2::Drawing interface IRainDrawer { virtual ~IRainDrawer() { } - virtual void Draw(sint32 x, - sint32 y, - sint32 width, - sint32 height, - sint32 xStart, - sint32 yStart) abstract; + virtual void Draw(int32_t x, + int32_t y, + int32_t width, + int32_t height, + int32_t xStart, + int32_t yStart) abstract; }; } // namespace OpenRCT2::Drawing diff --git a/src/openrct2/drawing/Image.cpp b/src/openrct2/drawing/Image.cpp index 8265bede26..5b46d8cd53 100644 --- a/src/openrct2/drawing/Image.cpp +++ b/src/openrct2/drawing/Image.cpp @@ -15,19 +15,19 @@ #include "Drawing.h" -constexpr uint32 BASE_IMAGE_ID = 29294; -constexpr uint32 MAX_IMAGES = 262144; -constexpr uint32 INVALID_IMAGE_ID = UINT32_MAX; +constexpr uint32_t BASE_IMAGE_ID = 29294; +constexpr uint32_t MAX_IMAGES = 262144; +constexpr uint32_t INVALID_IMAGE_ID = UINT32_MAX; struct ImageList { - uint32 BaseId; - uint32 Count; + uint32_t BaseId; + uint32_t Count; }; static bool _initialised = false; static std::list _freeLists; -static uint32 _allocatedImageCount; +static uint32_t _allocatedImageCount; #ifdef DEBUG static std::list _allocatedLists; @@ -38,7 +38,7 @@ static std::list _allocatedLists; #pragma warning(push) #pragma warning(disable : 4505) // unreferenced local function has been removed -[[maybe_unused]] static bool AllocatedListContains(uint32 baseImageId, uint32 count) +[[maybe_unused]] static bool AllocatedListContains(uint32_t baseImageId, uint32_t count) { bool contains = std::any_of( _allocatedLists.begin(), @@ -52,7 +52,7 @@ static std::list _allocatedLists; #pragma warning(pop) -static bool AllocatedListRemove(uint32 baseImageId, uint32 count) +static bool AllocatedListRemove(uint32_t baseImageId, uint32_t count) { auto foundItem = std::find_if( _allocatedLists.begin(), @@ -70,7 +70,7 @@ static bool AllocatedListRemove(uint32 baseImageId, uint32 count) } #endif -static uint32 GetNumFreeImagesRemaining() +static uint32_t GetNumFreeImagesRemaining() { return MAX_IMAGES - _allocatedImageCount; } @@ -119,7 +119,7 @@ static void MergeFreeLists() } } -static uint32 TryAllocateImageList(uint32 count) +static uint32_t TryAllocateImageList(uint32_t count) { for (auto it = _freeLists.begin(); it != _freeLists.end(); it++) { @@ -144,7 +144,7 @@ static uint32 TryAllocateImageList(uint32 count) return INVALID_IMAGE_ID; } -static uint32 AllocateImageList(uint32 count) +static uint32_t AllocateImageList(uint32_t count) { Guard::Assert(count != 0, GUARD_LINE); @@ -153,8 +153,8 @@ static uint32 AllocateImageList(uint32 count) InitialiseImageList(); } - uint32 baseImageId = INVALID_IMAGE_ID; - uint32 freeImagesRemaining = GetNumFreeImagesRemaining(); + uint32_t baseImageId = INVALID_IMAGE_ID; + uint32_t freeImagesRemaining = GetNumFreeImagesRemaining(); if (freeImagesRemaining >= count) { baseImageId = TryAllocateImageList(count); @@ -168,7 +168,7 @@ static uint32 AllocateImageList(uint32 count) return baseImageId; } -static void FreeImageList(uint32 baseImageId, uint32 count) +static void FreeImageList(uint32_t baseImageId, uint32_t count) { Guard::Assert(_initialised, GUARD_LINE); Guard::Assert(baseImageId >= BASE_IMAGE_ID, GUARD_LINE); @@ -197,22 +197,22 @@ static void FreeImageList(uint32 baseImageId, uint32 count) _freeLists.push_back({ baseImageId, count }); } -uint32 gfx_object_allocate_images(const rct_g1_element * images, uint32 count) +uint32_t gfx_object_allocate_images(const rct_g1_element * images, uint32_t count) { if (count == 0 || gOpenRCT2NoGraphics) { return INVALID_IMAGE_ID; } - uint32 baseImageId = AllocateImageList(count); + uint32_t baseImageId = AllocateImageList(count); if (baseImageId == INVALID_IMAGE_ID) { log_error("Reached maximum image limit."); return INVALID_IMAGE_ID; } - uint32 imageId = baseImageId; - for (uint32 i = 0; i < count; i++) + uint32_t imageId = baseImageId; + for (uint32_t i = 0; i < count; i++) { gfx_set_g1_element(imageId, &images[i]); drawing_engine_invalidate_image(imageId); @@ -222,15 +222,15 @@ uint32 gfx_object_allocate_images(const rct_g1_element * images, uint32 count) return baseImageId; } -void gfx_object_free_images(uint32 baseImageId, uint32 count) +void gfx_object_free_images(uint32_t baseImageId, uint32_t count) { if (baseImageId != 0 && baseImageId != INVALID_IMAGE_ID) { // Zero the G1 elements so we don't have invalid pointers // and data lying about - for (uint32 i = 0; i < count; i++) + for (uint32_t i = 0; i < count; i++) { - uint32 imageId = baseImageId + i; + uint32_t imageId = baseImageId + i; rct_g1_element g1 = {}; gfx_set_g1_element(imageId, &g1); drawing_engine_invalidate_image(imageId); diff --git a/src/openrct2/drawing/ImageImporter.cpp b/src/openrct2/drawing/ImageImporter.cpp index 610d22c033..c780373136 100644 --- a/src/openrct2/drawing/ImageImporter.cpp +++ b/src/openrct2/drawing/ImageImporter.cpp @@ -16,12 +16,12 @@ using namespace OpenRCT2::Drawing; using ImportResult = ImageImporter::ImportResult; -constexpr sint32 PALETTE_TRANSPARENT = -1; +constexpr int32_t PALETTE_TRANSPARENT = -1; ImportResult ImageImporter::Import( const Image& image, - sint32 offsetX, - sint32 offsetY, + int32_t offsetX, + int32_t offsetY, IMPORT_FLAGS flags, IMPORT_MODE mode) const { @@ -44,7 +44,7 @@ ImportResult ImageImporter::Import( EncodeRaw(pixels.data(), width, height); rct_g1_element outElement; - outElement.offset = (uint8 *)buffer; + outElement.offset = (uint8_t *)buffer; outElement.width = width; outElement.height = height; outElement.flags = (flags & IMPORT_FLAGS::RLE ? G1_FLAG_RLE_COMPRESSION : G1_FLAG_BMP); @@ -59,33 +59,33 @@ ImportResult ImageImporter::Import( return result; } -std::vector ImageImporter::GetPixels(const uint8 * pixels, uint32 width, uint32 height, IMPORT_FLAGS flags, IMPORT_MODE mode) +std::vector ImageImporter::GetPixels(const uint8_t * pixels, uint32_t width, uint32_t height, IMPORT_FLAGS flags, IMPORT_MODE mode) { - std::vector buffer; + std::vector buffer; buffer.reserve(width * height); // A larger range is needed for proper dithering auto palettedSrc = pixels; - std::unique_ptr rgbaSrcBuffer; + std::unique_ptr rgbaSrcBuffer; if (!(flags & IMPORT_FLAGS::KEEP_PALETTE)) { - rgbaSrcBuffer = std::make_unique(height * width * 4); + rgbaSrcBuffer = std::make_unique(height * width * 4); } auto rgbaSrc = rgbaSrcBuffer.get(); if (!(flags & IMPORT_FLAGS::KEEP_PALETTE)) { - for (uint32 x = 0; x < height * width * 4; x++) + for (uint32_t x = 0; x < height * width * 4; x++) { - rgbaSrc[x] = (sint16)pixels[x]; + rgbaSrc[x] = (int16_t)pixels[x]; } } - for (uint32 y = 0; y < height; y++) + for (uint32_t y = 0; y < height; y++) { - for (uint32 x = 0; x < width; x++) + for (uint32_t x = 0; x < width; x++) { - sint32 paletteIndex; + int32_t paletteIndex; if (flags & IMPORT_FLAGS::KEEP_PALETTE) { paletteIndex = *palettedSrc; @@ -110,39 +110,39 @@ std::vector ImageImporter::GetPixels(const uint8 * pixels, uint32 width, return buffer; } -std::tuple ImageImporter::EncodeRaw(const sint32 * pixels, uint32 width, uint32 height) +std::tuple ImageImporter::EncodeRaw(const int32_t * pixels, uint32_t width, uint32_t height) { auto bufferLength = width * height; - auto buffer = (uint8 *)std::malloc(bufferLength); + auto buffer = (uint8_t *)std::malloc(bufferLength); for (size_t i = 0; i < bufferLength; i++) { auto p = pixels[i]; - buffer[i] = (p == PALETTE_TRANSPARENT ? 0 : (uint8)p); + buffer[i] = (p == PALETTE_TRANSPARENT ? 0 : (uint8_t)p); } return std::make_tuple(buffer, bufferLength); } -std::tuple ImageImporter::EncodeRLE(const sint32 * pixels, uint32 width, uint32 height) +std::tuple ImageImporter::EncodeRLE(const int32_t * pixels, uint32_t width, uint32_t height) { struct RLECode { - uint8 NumPixels{}; - uint8 OffsetX{}; + uint8_t NumPixels{}; + uint8_t OffsetX{}; }; auto src = pixels; - auto buffer = (uint8 *)std::malloc((height * 2) + (width * height * 16)); + auto buffer = (uint8_t *)std::malloc((height * 2) + (width * height * 16)); if (buffer == nullptr) { throw std::bad_alloc(); } std::memset(buffer, 0, (height * 2) + (width * height * 16)); - auto yOffsets = (uint16 *)buffer; + auto yOffsets = (uint16_t *)buffer; auto dst = buffer + (height * 2); - for (uint32 y = 0; y < height; y++) + for (uint32_t y = 0; y < height; y++) { - yOffsets[y] = (uint16)(dst - buffer); + yOffsets[y] = (uint16_t)(dst - buffer); auto previousCode = (RLECode *)nullptr; auto currentCode = (RLECode *)dst; @@ -151,9 +151,9 @@ std::tuple ImageImporter::EncodeRLE(const sint32 * pixels, uint3 auto startX = 0; auto npixels = 0; bool pushRun = false; - for (uint32 x = 0; x < width; x++) + for (uint32_t x = 0; x < width; x++) { - sint32 paletteIndex = *src++; + int32_t paletteIndex = *src++; if (paletteIndex == PALETTE_TRANSPARENT) { if (npixels != 0) @@ -171,7 +171,7 @@ std::tuple ImageImporter::EncodeRLE(const sint32 * pixels, uint3 } npixels++; - *dst++ = (uint8)paletteIndex; + *dst++ = (uint8_t)paletteIndex; } if (npixels == 127 || x == width - 1) { @@ -216,7 +216,7 @@ std::tuple ImageImporter::EncodeRLE(const sint32 * pixels, uint3 } auto bufferLength = (size_t)(dst - buffer); - buffer = (uint8 * )realloc(buffer, bufferLength); + buffer = (uint8_t * )realloc(buffer, bufferLength); if (buffer == nullptr) { throw std::bad_alloc(); @@ -224,7 +224,7 @@ std::tuple ImageImporter::EncodeRLE(const sint32 * pixels, uint3 return std::make_tuple(buffer, bufferLength); } -sint32 ImageImporter::CalculatePaletteIndex(IMPORT_MODE mode, sint16 * rgbaSrc, sint32 x, sint32 y, sint32 width, sint32 height) +int32_t ImageImporter::CalculatePaletteIndex(IMPORT_MODE mode, int16_t * rgbaSrc, int32_t x, int32_t y, int32_t width, int32_t height) { auto palette = StandardPalette; auto paletteIndex = GetPaletteIndex(palette, rgbaSrc); @@ -239,9 +239,9 @@ sint32 ImageImporter::CalculatePaletteIndex(IMPORT_MODE mode, sint16 * rgbaSrc, { if (!IsTransparentPixel(rgbaSrc) && IsChangablePixel(GetPaletteIndex(palette, rgbaSrc))) { - auto dr = rgbaSrc[0] - (sint16)(palette[paletteIndex].Red); - auto dg = rgbaSrc[1] - (sint16)(palette[paletteIndex].Green); - auto db = rgbaSrc[2] - (sint16)(palette[paletteIndex].Blue); + auto dr = rgbaSrc[0] - (int16_t)(palette[paletteIndex].Red); + auto dg = rgbaSrc[1] - (int16_t)(palette[paletteIndex].Green); + auto db = rgbaSrc[2] - (int16_t)(palette[paletteIndex].Blue); if (x + 1 < width) { @@ -291,15 +291,15 @@ sint32 ImageImporter::CalculatePaletteIndex(IMPORT_MODE mode, sint16 * rgbaSrc, return paletteIndex; } -sint32 ImageImporter::GetPaletteIndex(const PaletteBGRA * palette, sint16 * colour) +int32_t ImageImporter::GetPaletteIndex(const PaletteBGRA * palette, int16_t * colour) { if (!IsTransparentPixel(colour)) { - for (sint32 i = 0; i < 256; i++) + for (int32_t i = 0; i < 256; i++) { - if ((sint16)(palette[i].Red) == colour[0] && - (sint16)(palette[i].Green) == colour[1] && - (sint16)(palette[i].Blue) == colour[2]) + if ((int16_t)(palette[i].Red) == colour[0] && + (int16_t)(palette[i].Green) == colour[1] && + (int16_t)(palette[i].Blue) == colour[2]) { return i; } @@ -308,7 +308,7 @@ sint32 ImageImporter::GetPaletteIndex(const PaletteBGRA * palette, sint16 * colo return PALETTE_TRANSPARENT; } -bool ImageImporter::IsTransparentPixel(const sint16 * colour) +bool ImageImporter::IsTransparentPixel(const int16_t * colour) { return colour[3] < 128; } @@ -316,7 +316,7 @@ bool ImageImporter::IsTransparentPixel(const sint16 * colour) /** * @returns true if pixel index is an index not used for remapping. */ -bool ImageImporter::IsChangablePixel(sint32 paletteIndex) +bool ImageImporter::IsChangablePixel(int32_t paletteIndex) { if (paletteIndex == PALETTE_TRANSPARENT) return true; @@ -333,20 +333,20 @@ bool ImageImporter::IsChangablePixel(sint32 paletteIndex) return true; } -sint32 ImageImporter::GetClosestPaletteIndex(const PaletteBGRA * palette, const sint16 * colour) +int32_t ImageImporter::GetClosestPaletteIndex(const PaletteBGRA * palette, const int16_t * colour) { - auto smallestError = (uint32)-1; + auto smallestError = (uint32_t)-1; auto bestMatch = PALETTE_TRANSPARENT; - for (sint32 x = 0; x < 256; x++) + for (int32_t x = 0; x < 256; x++) { if (IsChangablePixel(x)) { - uint32 error = - ((sint16)(palette[x].Red) - colour[0]) * ((sint16)(palette[x].Red) - colour[0]) + - ((sint16)(palette[x].Green) - colour[1]) * ((sint16)(palette[x].Green) - colour[1]) + - ((sint16)(palette[x].Blue) - colour[2]) * ((sint16)(palette[x].Blue) - colour[2]); + uint32_t error = + ((int16_t)(palette[x].Red) - colour[0]) * ((int16_t)(palette[x].Red) - colour[0]) + + ((int16_t)(palette[x].Green) - colour[1]) * ((int16_t)(palette[x].Green) - colour[1]) + + ((int16_t)(palette[x].Blue) - colour[2]) * ((int16_t)(palette[x].Blue) - colour[2]); - if (smallestError == (uint32)-1 || smallestError > error) + if (smallestError == (uint32_t)-1 || smallestError > error) { bestMatch = x; smallestError = error; diff --git a/src/openrct2/drawing/ImageImporter.h b/src/openrct2/drawing/ImageImporter.h index ed59dd77fb..9eb30011d7 100644 --- a/src/openrct2/drawing/ImageImporter.h +++ b/src/openrct2/drawing/ImageImporter.h @@ -45,22 +45,22 @@ namespace OpenRCT2::Drawing ImportResult Import( const Image& image, - sint32 offsetX = 0, - sint32 offsetY = 0, + int32_t offsetX = 0, + int32_t offsetY = 0, IMPORT_FLAGS flags = IMPORT_FLAGS::NONE, IMPORT_MODE mode = IMPORT_MODE::DEFAULT) const; private: static const PaletteBGRA StandardPalette[256]; - static std::vector GetPixels(const uint8 * pixels, uint32 width, uint32 height, IMPORT_FLAGS flags, IMPORT_MODE mode); - static std::tuple EncodeRaw(const sint32 * pixels, uint32 width, uint32 height); - static std::tuple EncodeRLE(const sint32 * pixels, uint32 width, uint32 height); + static std::vector GetPixels(const uint8_t * pixels, uint32_t width, uint32_t height, IMPORT_FLAGS flags, IMPORT_MODE mode); + static std::tuple EncodeRaw(const int32_t * pixels, uint32_t width, uint32_t height); + static std::tuple EncodeRLE(const int32_t * pixels, uint32_t width, uint32_t height); - static sint32 CalculatePaletteIndex(IMPORT_MODE mode, sint16 * rgbaSrc, sint32 x, sint32 y, sint32 width, sint32 height); - static sint32 GetPaletteIndex(const PaletteBGRA * palette, sint16 * colour); - static bool IsTransparentPixel(const sint16 * colour); - static bool IsChangablePixel(sint32 paletteIndex); - static sint32 GetClosestPaletteIndex(const PaletteBGRA * palette, const sint16 * colour); + static int32_t CalculatePaletteIndex(IMPORT_MODE mode, int16_t * rgbaSrc, int32_t x, int32_t y, int32_t width, int32_t height); + static int32_t GetPaletteIndex(const PaletteBGRA * palette, int16_t * colour); + static bool IsTransparentPixel(const int16_t * colour); + static bool IsChangablePixel(int32_t paletteIndex); + static int32_t GetClosestPaletteIndex(const PaletteBGRA * palette, const int16_t * colour); }; } diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index e7ec532368..de797f951e 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -25,31 +25,31 @@ #include "Drawing.h" #include "LightFX.h" -static uint8 _bakedLightTexture_lantern_0[32*32]; -static uint8 _bakedLightTexture_lantern_1[64*64]; -static uint8 _bakedLightTexture_lantern_2[128*128]; -static uint8 _bakedLightTexture_lantern_3[256*256]; -static uint8 _bakedLightTexture_spot_0[32 * 32]; -static uint8 _bakedLightTexture_spot_1[64 * 64]; -static uint8 _bakedLightTexture_spot_2[128 * 128]; -static uint8 _bakedLightTexture_spot_3[256 * 256]; +static uint8_t _bakedLightTexture_lantern_0[32*32]; +static uint8_t _bakedLightTexture_lantern_1[64*64]; +static uint8_t _bakedLightTexture_lantern_2[128*128]; +static uint8_t _bakedLightTexture_lantern_3[256*256]; +static uint8_t _bakedLightTexture_spot_0[32 * 32]; +static uint8_t _bakedLightTexture_spot_1[64 * 64]; +static uint8_t _bakedLightTexture_spot_2[128 * 128]; +static uint8_t _bakedLightTexture_spot_3[256 * 256]; static rct_drawpixelinfo _pixelInfo; static bool _lightfxAvailable = false; static void* _light_rendered_buffer_back = nullptr; static void* _light_rendered_buffer_front = nullptr; -static uint32 _lightPolution_back = 0; -static uint32 _lightPolution_front = 0; +static uint32_t _lightPolution_back = 0; +static uint32_t _lightPolution_front = 0; struct lightlist_entry { - sint16 x, y, z; - uint8 lightType; - uint8 lightIntensity; - uint32 lightID; - uint16 lightIDqualifier; - uint8 lightLinger; - uint8 pad[1]; + int16_t x, y, z; + uint8_t lightType; + uint8_t lightIntensity; + uint32_t lightID; + uint16_t lightIDqualifier; + uint8_t lightLinger; + uint8_t pad[1]; }; static lightlist_entry _LightListA[16000]; @@ -58,47 +58,47 @@ static lightlist_entry _LightListB[16000]; static lightlist_entry *_LightListBack; static lightlist_entry *_LightListFront; -static uint32 LightListCurrentCountBack; -static uint32 LightListCurrentCountFront; +static uint32_t LightListCurrentCountBack; +static uint32_t LightListCurrentCountFront; -static sint16 _current_view_x_front = 0; -static sint16 _current_view_y_front = 0; -static uint8 _current_view_rotation_front = 0; -static uint8 _current_view_zoom_front = 0; -static sint16 _current_view_x_back = 0; -static sint16 _current_view_y_back = 0; -static uint8 _current_view_rotation_back = 0; -static uint8 _current_view_zoom_back = 0; -static uint8 _current_view_zoom_back_delay = 0; +static int16_t _current_view_x_front = 0; +static int16_t _current_view_y_front = 0; +static uint8_t _current_view_rotation_front = 0; +static uint8_t _current_view_zoom_front = 0; +static int16_t _current_view_x_back = 0; +static int16_t _current_view_y_back = 0; +static uint8_t _current_view_rotation_back = 0; +static uint8_t _current_view_zoom_back = 0; +static uint8_t _current_view_zoom_back_delay = 0; static rct_palette gPalette_light; -static uint8 calc_light_intensity_lantern(sint32 x, sint32 y) { +static uint8_t calc_light_intensity_lantern(int32_t x, int32_t y) { double distance = (double)(x * x + y * y); double light = 0.03 + std::pow(10.0 / (1.0 + distance / 100.0), 0.55); light *= std::min(1.0, std::max(0.0, 2.0 - std::sqrt(distance) / 64)); light *= 0.1f; - return (uint8)(std::min(255.0, light * 255.0)); + return (uint8_t)(std::min(255.0, light * 255.0)); } -static uint8 calc_light_intensity_spot(sint32 x, sint32 y) { +static uint8_t calc_light_intensity_spot(int32_t x, int32_t y) { double distance = (double)(x * x + y * y); double light = 0.3 + std::pow(10.0 / (1.0 + distance / 100.0), 0.75); light *= std::min(1.0, std::max(0.0, 2.0 - std::sqrt(distance) / 64)); light *= 0.5f; - return (uint8)(std::min(255.0, light * 255.0)) >> 4; + return (uint8_t)(std::min(255.0, light * 255.0)) >> 4; } -static void calc_rescale_light_half( uint8 *target, uint8 *source,uint32 targetWidth, uint32 targetHeight) { - uint8 *parcerRead = source; - uint8 *parcerWrite = target; +static void calc_rescale_light_half( uint8_t *target, uint8_t *source,uint32_t targetWidth, uint32_t targetHeight) { + uint8_t *parcerRead = source; + uint8_t *parcerWrite = target; - for (uint32 y = 0; y < targetHeight; y++) { - for (uint32 x = 0; x < targetWidth; x++) { + for (uint32_t y = 0; y < targetHeight; y++) { + for (uint32_t x = 0; x < targetWidth; x++) { *parcerWrite = (*parcerRead); parcerWrite++; parcerRead += 2; @@ -127,10 +127,10 @@ void lightfx_init() memset(_bakedLightTexture_lantern_2, 0xFF, 128 * 128); memset(_bakedLightTexture_lantern_3, 0xFF, 256 * 256); - uint8 *parcer = _bakedLightTexture_lantern_3; + uint8_t *parcer = _bakedLightTexture_lantern_3; - for (sint32 y = 0; y < 256; y++) { - for (sint32 x = 0; x < 256; x++) { + for (int32_t y = 0; y < 256; y++) { + for (int32_t x = 0; x < 256; x++) { *parcer = calc_light_intensity_lantern(x - 128, y - 128); parcer++; } @@ -138,8 +138,8 @@ void lightfx_init() parcer = _bakedLightTexture_spot_3; - for (sint32 y = 0; y < 256; y++) { - for (sint32 x = 0; x < 256; x++) { + for (int32_t y = 0; y < 256; y++) { + for (int32_t x = 0; x < 256; x++) { *parcer = calc_light_intensity_spot(x - 128, y - 128); parcer++; } @@ -166,7 +166,7 @@ extern void viewport_paint_setup(); void lightfx_prepare_light_list() { - for (uint32 light = 0; light < LightListCurrentCountFront; light++) { + for (uint32_t light = 0; light < LightListCurrentCountFront; light++) { lightlist_entry *entry = &_LightListFront[light]; if (entry->z == 0x7FFF) { @@ -185,8 +185,8 @@ void lightfx_prepare_light_list() entry->x = coord_2d.x;// - (_current_view_x_front); entry->y = coord_2d.y;// - (_current_view_y_front); - sint32 posOnScreenX = entry->x - _current_view_x_front; - sint32 posOnScreenY = entry->y - _current_view_y_front; + int32_t posOnScreenX = entry->x - _current_view_x_front; + int32_t posOnScreenY = entry->y - _current_view_y_front; posOnScreenX >>= _current_view_zoom_front; posOnScreenY >>= _current_view_zoom_front; @@ -203,10 +203,10 @@ void lightfx_prepare_light_list() // entry->x >>= _current_view_zoom_front; // entry->y >>= _current_view_zoom_front; - uint32 lightIntensityOccluded = 0x0; + uint32_t lightIntensityOccluded = 0x0; - sint32 dirVecX = 707; - sint32 dirVecY = 707; + int32_t dirVecX = 707; + int32_t dirVecY = 707; switch (_current_view_rotation_front) { case 0: @@ -232,8 +232,8 @@ void lightfx_prepare_light_list() } #ifdef LIGHTFX_UNKNOWN_PART_1 - sint32 tileOffsetX = 0; - sint32 tileOffsetY = 0; + int32_t tileOffsetX = 0; + int32_t tileOffsetY = 0; switch (_current_view_rotation_front) { case 0: tileOffsetX = 0; @@ -253,28 +253,28 @@ void lightfx_prepare_light_list() break; } - sint32 mapFrontDiv = 1 << _current_view_zoom_front; - static sint16 offsetPattern[26] = { 0, 0, -4, 0, 0, -3, 4, 0, 0, 3, + int32_t mapFrontDiv = 1 << _current_view_zoom_front; + static int16_t offsetPattern[26] = { 0, 0, -4, 0, 0, -3, 4, 0, 0, 3, -2, -1, -1, -1, 2, 1, 1, 1, -3, -2, -3, 2, 3, -2, 3, 2 }; #endif //LIGHTFX_UNKNOWN_PART_1 if (true) { - sint32 totalSamplePoints = 5; - sint32 startSamplePoint = 1; - // sint32 lastSampleCount = 0; + int32_t totalSamplePoints = 5; + int32_t startSamplePoint = 1; + // int32_t lastSampleCount = 0; if ((entry->lightIDqualifier & 0xF) == LIGHTFX_LIGHT_QUALIFIER_MAP) { startSamplePoint = 0; totalSamplePoints = 1; } - for (sint32 pat = startSamplePoint; pat < totalSamplePoints; pat++) { + for (int32_t pat = startSamplePoint; pat < totalSamplePoints; pat++) { LocationXY16 mapCoord = {}; rct_tile_element *tileElement = nullptr; - sint32 interactionType = 0; + int32_t interactionType = 0; rct_window *w = window_get_main(); if (w != nullptr) { @@ -310,12 +310,12 @@ void lightfx_prepare_light_list() //RCT2_GLOBAL(0x9AC148, uint8_t) = 0; //RCT2_GLOBAL(0x9AC138 + 4, int16_t) = screenX; //RCT2_GLOBAL(0x9AC138 + 6, int16_t) = screenY; - //if (screenX >= 0 && screenX < (sint32)myviewport->width && screenY >= 0 && screenY < (sint32)myviewport->height) + //if (screenX >= 0 && screenX < (int32_t)myviewport->width && screenY >= 0 && screenY < (int32_t)myviewport->height) //{ // screenX <<= myviewport->zoom; // screenY <<= myviewport->zoom; - // screenX += (sint32)myviewport->view_x; - // screenY += (sint32)myviewport->view_y; + // screenX += (int32_t)myviewport->view_x; + // screenY += (int32_t)myviewport->view_y; // RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_ZOOM, uint16_t) = myviewport->zoom; // screenX &= (0xFFFF << myviewport->zoom) & 0xFFFF; // screenY &= (0xFFFF << myviewport->zoom) & 0xFFFF; @@ -336,8 +336,8 @@ void lightfx_prepare_light_list() //} } - sint32 minDist = 0; - sint32 baseHeight = -999; + int32_t minDist = 0; + int32_t baseHeight = -999; if (interactionType != VIEWPORT_INTERACTION_ITEM_SPRITE && tileElement) { baseHeight = tileElement->base_height; @@ -345,10 +345,10 @@ void lightfx_prepare_light_list() minDist = ((baseHeight * 8) - coord_3d.z) / 2; - sint32 deltaX = mapCoord.x - coord_3d.x; - sint32 deltaY = mapCoord.y - coord_3d.y; + int32_t deltaX = mapCoord.x - coord_3d.x; + int32_t deltaY = mapCoord.y - coord_3d.y; - sint32 projDot = (dirVecX * deltaX + dirVecY * deltaY) / 1000; + int32_t projDot = (dirVecX * deltaX + dirVecY * deltaY) / 1000; projDot = std::max(minDist, projDot); @@ -382,7 +382,7 @@ void lightfx_prepare_light_list() break; // if (_current_view_zoom_front > 0) // break; - // sint32 newSampleCount = lightIntensityOccluded / 900; + // int32_t newSampleCount = lightIntensityOccluded / 900; // if (abs(newSampleCount - lastSampleCount) < 10) // break; // totalSamplePoints += 4; @@ -402,8 +402,8 @@ void lightfx_prepare_light_list() // log_warning("sample-count: %i, occlusion: %i", totalSamplePoints, lightIntensityOccluded / totalSamplePoints); - entry->lightIntensity = std::min(0xFF, (entry->lightIntensity * lightIntensityOccluded) / (totalSamplePoints * 100)); - entry->lightIntensity = std::max(0x00, entry->lightIntensity - _current_view_zoom_front * 5); + entry->lightIntensity = std::min(0xFF, (entry->lightIntensity * lightIntensityOccluded) / (totalSamplePoints * 100)); + entry->lightIntensity = std::max(0x00, entry->lightIntensity - _current_view_zoom_front * 5); } if (_current_view_zoom_front > 0) { @@ -434,7 +434,7 @@ void lightfx_swap_buffers() LightListCurrentCountFront = LightListCurrentCountBack; LightListCurrentCountBack = 0x0; - uint32 uTmp = _lightPolution_back; + uint32_t uTmp = _lightPolution_back; _lightPolution_back = _lightPolution_front; _lightPolution_front = uTmp; @@ -469,18 +469,18 @@ void lightfx_render_lights_to_frontbuffer() // log_warning("%i lights", LightListCurrentCountFront); - for (uint32 light = 0; light < LightListCurrentCountFront; light++) { - const uint8 *bufReadBase = nullptr; - uint8 *bufWriteBase = (uint8 *)_light_rendered_buffer_front; - uint32 bufReadWidth, bufReadHeight; - sint32 bufWriteX, bufWriteY; - sint32 bufWriteWidth, bufWriteHeight; - uint32 bufReadSkip, bufWriteSkip; + for (uint32_t light = 0; light < LightListCurrentCountFront; light++) { + const uint8_t *bufReadBase = nullptr; + uint8_t *bufWriteBase = (uint8_t *)_light_rendered_buffer_front; + uint32_t bufReadWidth, bufReadHeight; + int32_t bufWriteX, bufWriteY; + int32_t bufWriteWidth, bufWriteHeight; + uint32_t bufReadSkip, bufWriteSkip; lightlist_entry * entry = &_LightListFront[light]; - sint32 inRectCentreX = entry->x; - sint32 inRectCentreY = entry->y; + int32_t inRectCentreX = entry->x; + int32_t inRectCentreY = entry->y; if (entry->z != 0x7FFF) { inRectCentreX -= _current_view_x_front; @@ -563,8 +563,8 @@ void lightfx_render_lights_to_frontbuffer() if (bufWriteHeight <= 0) continue; - sint32 rightEdge = bufWriteX + bufWriteWidth; - sint32 bottomEdge = bufWriteY + bufWriteHeight; + int32_t rightEdge = bufWriteX + bufWriteWidth; + int32_t bottomEdge = bufWriteY + bufWriteHeight; if (rightEdge > _pixelInfo.width) { bufWriteWidth -= rightEdge - _pixelInfo.width; @@ -584,8 +584,8 @@ void lightfx_render_lights_to_frontbuffer() bufWriteSkip = _pixelInfo.width - bufWriteWidth; if (entry->lightIntensity == 0xFF) { - for (sint32 y = 0; y < bufWriteHeight; y++) { - for (sint32 x = 0; x < bufWriteWidth; x++) { + for (int32_t y = 0; y < bufWriteHeight; y++) { + for (int32_t x = 0; x < bufWriteWidth; x++) { *bufWriteBase = std::min(0xFF, *bufWriteBase + *bufReadBase); bufWriteBase++; bufReadBase++; @@ -596,8 +596,8 @@ void lightfx_render_lights_to_frontbuffer() } } else { - for (sint32 y = 0; y < bufWriteHeight; y++) { - for (sint32 x = 0; x < bufWriteWidth; x++) { + for (int32_t y = 0; y < bufWriteHeight; y++) { + for (int32_t x = 0; x < bufWriteWidth; x++) { *bufWriteBase = std::min(0xFF, *bufWriteBase + (((*bufReadBase) * (1 + entry->lightIntensity)) >> 8)); bufWriteBase++; bufReadBase++; @@ -620,7 +620,7 @@ const rct_palette * lightfx_get_palette() return &gPalette_light; } -void lightfx_add_3d_light(uint32 lightID, uint16 lightIDqualifier, sint16 x, sint16 y, uint16 z, uint8 lightType) +void lightfx_add_3d_light(uint32_t lightID, uint16_t lightIDqualifier, int16_t x, int16_t y, uint16_t z, uint8_t lightType) { if (LightListCurrentCountBack == 15999) { return; @@ -628,7 +628,7 @@ void lightfx_add_3d_light(uint32 lightID, uint16 lightIDqualifier, sint16 x, sin // log_warning("%i lights in back", LightListCurrentCountBack); - for (uint32 i = 0; i < LightListCurrentCountBack; i++) { + for (uint32_t i = 0; i < LightListCurrentCountBack; i++) { lightlist_entry *entry = &_LightListBack[i]; if (entry->lightID != lightID) continue; @@ -661,10 +661,10 @@ void lightfx_add_3d_light(uint32 lightID, uint16 lightIDqualifier, sint16 x, sin // log_warning("new 3d light"); } -void lightfx_add_3d_light_magic_from_drawing_tile(LocationXY16 mapPosition, sint16 offsetX, sint16 offsetY, sint16 offsetZ, uint8 lightType) +void lightfx_add_3d_light_magic_from_drawing_tile(LocationXY16 mapPosition, int16_t offsetX, int16_t offsetY, int16_t offsetZ, uint8_t lightType) { - sint16 x = mapPosition.x + offsetX; - sint16 y = mapPosition.y + offsetY; + int16_t x = mapPosition.x + offsetX; + int16_t y = mapPosition.y + offsetY; switch (get_current_rotation()) { case 0: @@ -690,17 +690,17 @@ void lightfx_add_3d_light_magic_from_drawing_tile(LocationXY16 mapPosition, sint lightfx_add_3d_light((x << 16) | y, (offsetZ << 8) | LIGHTFX_LIGHT_QUALIFIER_MAP, x, y, offsetZ, lightType); } -uint32 lightfx_get_light_polution() +uint32_t lightfx_get_light_polution() { return _lightPolution_front; } void lightfx_add_lights_magic_vehicles() { - uint16 spriteIndex = gSpriteListHead[SPRITE_LIST_TRAIN]; + uint16_t spriteIndex = gSpriteListHead[SPRITE_LIST_TRAIN]; while (spriteIndex != SPRITE_INDEX_NULL) { rct_vehicle * vehicle = &(get_sprite(spriteIndex)->vehicle); - uint16 vehicleID = spriteIndex; + uint16_t vehicleID = spriteIndex; spriteIndex = vehicle->next; rct_vehicle *mother_vehicle = vehicle; @@ -709,7 +709,7 @@ void lightfx_add_lights_magic_vehicles() continue; } - for (uint16 q = vehicleID; q != SPRITE_INDEX_NULL; ) { + for (uint16_t q = vehicleID; q != SPRITE_INDEX_NULL; ) { vehicle = GET_VEHICLE(q); vehicleID = q; @@ -717,13 +717,13 @@ void lightfx_add_lights_magic_vehicles() break; q = vehicle->next_vehicle_on_train; - sint16 place_x, place_y, place_z; + int16_t place_x, place_y, place_z; place_x = vehicle->x; place_y = vehicle->y; place_z = vehicle->z; - static constexpr const sint16 offsetLookup[32] = { 10, 10, 9, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -9, -10, -10, -10, -9, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 9, 10 }; + static constexpr const int16_t offsetLookup[32] = { 10, 10, 9, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -9, -10, -10, -10, -9, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 9, 10 }; Ride *ride = get_ride(vehicle->ride); switch (ride->type) { @@ -808,7 +808,7 @@ void lightfx_add_lights_magic_vehicles() } } -void lightfx_apply_palette_filter(uint8 i, uint8 *r, uint8 *g, uint8 *b) +void lightfx_apply_palette_filter(uint8_t i, uint8_t *r, uint8_t *g, uint8_t *b) { float night = (float)(pow(gDayNightCycle, 1.5)); @@ -949,55 +949,55 @@ void lightfx_apply_palette_filter(uint8 i, uint8 *r, uint8 *g, uint8 *b) addLightNatG *= 1.0f - envFog; addLightNatB *= 1.0f - envFog; - *r = (uint8)(std::min(255.0f, std::max(0.0f, (-overExpose + (float)(*r) * reduceColourNat * natLightR + envFog * fogR + addLightNatR)))); - *g = (uint8)(std::min(255.0f, std::max(0.0f, (-overExpose + (float)(*g) * reduceColourNat * natLightG + envFog * fogG + addLightNatG)))); - *b = (uint8)(std::min(255.0f, std::max(0.0f, (-overExpose + (float)(*b) * reduceColourNat * natLightB + envFog * fogB + addLightNatB)))); + *r = (uint8_t)(std::min(255.0f, std::max(0.0f, (-overExpose + (float)(*r) * reduceColourNat * natLightR + envFog * fogR + addLightNatR)))); + *g = (uint8_t)(std::min(255.0f, std::max(0.0f, (-overExpose + (float)(*g) * reduceColourNat * natLightG + envFog * fogG + addLightNatG)))); + *b = (uint8_t)(std::min(255.0f, std::max(0.0f, (-overExpose + (float)(*b) * reduceColourNat * natLightB + envFog * fogB + addLightNatB)))); rct_palette_entry * dstEntry = &gPalette_light.entries[i]; - dstEntry->red = (uint8)(std::min(0xFF, ((float)(*r) * reduceColourLit * boost + lightFog) * elecMultR)); - dstEntry->green = (uint8)(std::min(0xFF, ((float)(*g) * reduceColourLit * boost + lightFog) * elecMultG)); - dstEntry->blue = (uint8)(std::min(0xFF, ((float)(*b) * reduceColourLit * boost + lightFog) * elecMultB)); + dstEntry->red = (uint8_t)(std::min(0xFF, ((float)(*r) * reduceColourLit * boost + lightFog) * elecMultR)); + dstEntry->green = (uint8_t)(std::min(0xFF, ((float)(*g) * reduceColourLit * boost + lightFog) * elecMultG)); + dstEntry->blue = (uint8_t)(std::min(0xFF, ((float)(*b) * reduceColourLit * boost + lightFog) * elecMultB)); } } -static uint8 mix_light(uint32 a, uint32 b, uint32 intensity) +static uint8_t mix_light(uint32_t a, uint32_t b, uint32_t intensity) { intensity = intensity * 6; - uint32 bMul = (b * intensity) >> 8; - uint32 ab = a + bMul; - uint8 result = std::min(255, ab); + uint32_t bMul = (b * intensity) >> 8; + uint32_t ab = a + bMul; + uint8_t result = std::min(255, ab); return result; } void lightfx_render_to_texture( void * dstPixels, - uint32 dstPitch, - uint8 * bits, - uint32 width, - uint32 height, - const uint32 * palette, - const uint32 * lightPalette) + uint32_t dstPitch, + uint8_t * bits, + uint32_t width, + uint32_t height, + const uint32_t * palette, + const uint32_t * lightPalette) { lightfx_update_viewport_settings(); lightfx_swap_buffers(); lightfx_prepare_light_list(); lightfx_render_lights_to_frontbuffer(); - uint8 * lightBits = (uint8 *)lightfx_get_front_buffer(); + uint8_t * lightBits = (uint8_t *)lightfx_get_front_buffer(); if (lightBits == nullptr) { return; } - for (uint32 y = 0; y < height; y++) { + for (uint32_t y = 0; y < height; y++) { uintptr_t dstOffset = (uintptr_t)(y * dstPitch); - uint32 * dst = (uint32 *)((uintptr_t)dstPixels + dstOffset); - for (uint32 x = 0; x < width; x++) { - uint8 * src = &bits[y * width + x]; - uint32 darkColour = palette[*src]; - uint32 lightColour = lightPalette[*src]; - uint8 lightIntensity = lightBits[y * width + x]; + uint32_t * dst = (uint32_t *)((uintptr_t)dstPixels + dstOffset); + for (uint32_t x = 0; x < width; x++) { + uint8_t * src = &bits[y * width + x]; + uint32_t darkColour = palette[*src]; + uint32_t lightColour = lightPalette[*src]; + uint8_t lightIntensity = lightBits[y * width + x]; - uint32 colour = 0; + uint32_t colour = 0; if (lightIntensity == 0) { colour = darkColour; } else { diff --git a/src/openrct2/drawing/LightFX.h b/src/openrct2/drawing/LightFX.h index 3bc4d6c10b..ec46d807bc 100644 --- a/src/openrct2/drawing/LightFX.h +++ b/src/openrct2/drawing/LightFX.h @@ -55,23 +55,23 @@ void lightfx_update_viewport_settings(); void* lightfx_get_front_buffer(); const rct_palette * lightfx_get_palette(); -void lightfx_add_3d_light(uint32 lightID, uint16 lightIDqualifier, sint16 x, sint16 y, uint16 z, uint8 lightType); +void lightfx_add_3d_light(uint32_t lightID, uint16_t lightIDqualifier, int16_t x, int16_t y, uint16_t z, uint8_t lightType); -void lightfx_add_3d_light_magic_from_drawing_tile(LocationXY16 mapPosition, sint16 offsetX, sint16 offsetY, sint16 offsetZ, uint8 lightType); +void lightfx_add_3d_light_magic_from_drawing_tile(LocationXY16 mapPosition, int16_t offsetX, int16_t offsetY, int16_t offsetZ, uint8_t lightType); void lightfx_add_lights_magic_vehicles(); -uint32 lightfx_get_light_polution(); +uint32_t lightfx_get_light_polution(); -void lightfx_apply_palette_filter(uint8 i, uint8 *r, uint8 *g, uint8 *b); +void lightfx_apply_palette_filter(uint8_t i, uint8_t *r, uint8_t *g, uint8_t *b); void lightfx_render_to_texture( void * dstPixels, - uint32 dstPitch, - uint8 * bits, - uint32 width, - uint32 height, - const uint32 * palette, - const uint32 * lightPalette); + uint32_t dstPitch, + uint8_t * bits, + uint32_t width, + uint32_t height, + const uint32_t * palette, + const uint32_t * lightPalette); #endif // __ENABLE_LIGHTFX__ diff --git a/src/openrct2/drawing/Line.cpp b/src/openrct2/drawing/Line.cpp index d010ba9748..0e710486d2 100644 --- a/src/openrct2/drawing/Line.cpp +++ b/src/openrct2/drawing/Line.cpp @@ -16,7 +16,7 @@ * Draws a horizontal line of specified colour to a buffer. * rct2: 0x0068474C */ -static void gfx_draw_line_on_buffer(rct_drawpixelinfo *dpi, char colour, sint32 y, sint32 x, sint32 no_pixels) +static void gfx_draw_line_on_buffer(rct_drawpixelinfo *dpi, char colour, int32_t y, int32_t x, int32_t no_pixels) { y -= dpi->y; @@ -46,7 +46,7 @@ static void gfx_draw_line_on_buffer(rct_drawpixelinfo *dpi, char colour, sint32 } // Get the buffer we are drawing to and move to the first coordinate. - uint8* bits_pointer = dpi->bits + y*(dpi->pitch + dpi->width) + x; + uint8_t* bits_pointer = dpi->bits + y*(dpi->pitch + dpi->width) + x; // Draw the line to the specified colour for (; no_pixels > 0; --no_pixels, ++bits_pointer){ @@ -64,7 +64,7 @@ static void gfx_draw_line_on_buffer(rct_drawpixelinfo *dpi, char colour, sint32 * y2 (dx) * colour (ebp) */ -void gfx_draw_line_software(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 x2, sint32 y2, sint32 colour) +void gfx_draw_line_software(rct_drawpixelinfo *dpi, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t colour) { // Check to make sure the line is within the drawing area if ((x1 < dpi->x) && (x2 < dpi->x)){ @@ -86,10 +86,10 @@ void gfx_draw_line_software(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 // Bresenham's algorithm // If vertical plot points upwards - sint32 steep = std::abs(y2 - y1) > std::abs(x2 - x1); + int32_t steep = std::abs(y2 - y1) > std::abs(x2 - x1); if (steep){ - sint32 temp_y2 = y2; - sint32 temp_x2 = x2; + int32_t temp_y2 = y2; + int32_t temp_x2 = x2; y2 = x1; x2 = y1; y1 = temp_x2; @@ -98,25 +98,25 @@ void gfx_draw_line_software(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 // If line is right to left swap direction if (x1 > x2){ - sint32 temp_y2 = y2; - sint32 temp_x2 = x2; + int32_t temp_y2 = y2; + int32_t temp_x2 = x2; y2 = y1; x2 = x1; y1 = temp_y2; x1 = temp_x2; } - sint32 delta_x = x2 - x1; - sint32 delta_y = std::abs(y2 - y1); - sint32 error = delta_x / 2; - sint32 y_step; - sint32 y = y1; + int32_t delta_x = x2 - x1; + int32_t delta_y = std::abs(y2 - y1); + int32_t error = delta_x / 2; + int32_t y_step; + int32_t y = y1; // Direction of step if (y1 < y2)y_step = 1; else y_step = -1; - for (sint32 x = x1, x_start = x1, no_pixels = 1; x < x2; ++x,++no_pixels){ + for (int32_t x = x1, x_start = x1, no_pixels = 1; x < x2; ++x,++no_pixels){ // Vertical lines are drawn 1 pixel at a time if (steep)gfx_draw_line_on_buffer(dpi, colour, x, y, 1); diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index c33070a39e..ea21bbaf11 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -31,7 +31,7 @@ rct_string_id DrawingEngineStringIds[] = STR_DRAWING_ENGINE_OPENGL, }; -sint32 drawing_engine_get_type() +int32_t drawing_engine_get_type() { auto context = GetContext(); return context->GetDrawingEngineType(); @@ -48,7 +48,7 @@ static IDrawingEngine * GetDrawingEngine() return result; } -bool drawing_engine_requires_new_window(sint32 srcEngine, sint32 dstEngine) +bool drawing_engine_requires_new_window(int32_t srcEngine, int32_t dstEngine) { #ifdef _WIN32 if (srcEngine != DRAWING_ENGINE_OPENGL && dstEngine != DRAWING_ENGINE_OPENGL) @@ -98,7 +98,7 @@ void drawing_engine_set_palette(const rct_palette_entry * colours) } } -void drawing_engine_copy_rect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) +void drawing_engine_copy_rect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) { auto context = GetContext(); if (context != nullptr) @@ -138,7 +138,7 @@ bool drawing_engine_has_dirty_optimisations() return result; } -void drawing_engine_invalidate_image(uint32 image) +void drawing_engine_invalidate_image(uint32_t image) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -156,7 +156,7 @@ void drawing_engine_set_vsync(bool vsync) } } -void gfx_set_dirty_blocks(sint16 left, sint16 top, sint16 right, sint16 bottom) +void gfx_set_dirty_blocks(int16_t left, int16_t top, int16_t right, int16_t bottom) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -169,7 +169,7 @@ void gfx_draw_all_dirty_blocks() { } -void gfx_clear(rct_drawpixelinfo * dpi, uint8 paletteIndex) +void gfx_clear(rct_drawpixelinfo * dpi, uint8_t paletteIndex) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -179,7 +179,7 @@ void gfx_clear(rct_drawpixelinfo * dpi, uint8 paletteIndex) } } -void gfx_fill_rect(rct_drawpixelinfo * dpi, sint32 left, sint32 top, sint32 right, sint32 bottom, sint32 colour) +void gfx_fill_rect(rct_drawpixelinfo * dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t colour) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -189,7 +189,7 @@ void gfx_fill_rect(rct_drawpixelinfo * dpi, sint32 left, sint32 top, sint32 righ } } -void gfx_filter_rect(rct_drawpixelinfo * dpi, sint32 left, sint32 top, sint32 right, sint32 bottom, FILTER_PALETTE_ID palette) +void gfx_filter_rect(rct_drawpixelinfo * dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FILTER_PALETTE_ID palette) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -199,7 +199,7 @@ void gfx_filter_rect(rct_drawpixelinfo * dpi, sint32 left, sint32 top, sint32 ri } } -void gfx_draw_line(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 x2, sint32 y2, sint32 colour) +void gfx_draw_line(rct_drawpixelinfo *dpi, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t colour) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -209,7 +209,7 @@ void gfx_draw_line(rct_drawpixelinfo *dpi, sint32 x1, sint32 y1, sint32 x2, sint } } -void FASTCALL gfx_draw_sprite(rct_drawpixelinfo * dpi, sint32 image, sint32 x, sint32 y, uint32 tertiary_colour) +void FASTCALL gfx_draw_sprite(rct_drawpixelinfo * dpi, int32_t image, int32_t x, int32_t y, uint32_t tertiary_colour) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -219,7 +219,7 @@ void FASTCALL gfx_draw_sprite(rct_drawpixelinfo * dpi, sint32 image, sint32 x, s } } -void FASTCALL gfx_draw_glpyh(rct_drawpixelinfo * dpi, sint32 image, sint32 x, sint32 y, uint8 * palette) +void FASTCALL gfx_draw_glpyh(rct_drawpixelinfo * dpi, int32_t image, int32_t x, int32_t y, uint8_t * palette) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -229,7 +229,7 @@ void FASTCALL gfx_draw_glpyh(rct_drawpixelinfo * dpi, sint32 image, sint32 x, si } } -void FASTCALL gfx_draw_sprite_raw_masked(rct_drawpixelinfo * dpi, sint32 x, sint32 y, sint32 maskImage, sint32 colourImage) +void FASTCALL gfx_draw_sprite_raw_masked(rct_drawpixelinfo * dpi, int32_t x, int32_t y, int32_t maskImage, int32_t colourImage) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -239,7 +239,7 @@ void FASTCALL gfx_draw_sprite_raw_masked(rct_drawpixelinfo * dpi, sint32 x, sint } } -void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo * dpi, sint32 image, sint32 x, sint32 y, uint8 colour) +void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo * dpi, int32_t image, int32_t x, int32_t y, uint8_t colour) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -249,7 +249,7 @@ void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo * dpi, sint32 image, sint3 } } -sint32 screenshot_dump() +int32_t screenshot_dump() { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) diff --git a/src/openrct2/drawing/NewDrawing.h b/src/openrct2/drawing/NewDrawing.h index a146848845..59d44458c3 100644 --- a/src/openrct2/drawing/NewDrawing.h +++ b/src/openrct2/drawing/NewDrawing.h @@ -16,15 +16,15 @@ struct rct_palette_entry; extern rct_string_id DrawingEngineStringIds[3]; -sint32 drawing_engine_get_type(); -bool drawing_engine_requires_new_window(sint32 srcEngine, sint32 dstEngine); +int32_t drawing_engine_get_type(); +bool drawing_engine_requires_new_window(int32_t srcEngine, int32_t dstEngine); void drawing_engine_init(); void drawing_engine_resize(); void drawing_engine_set_palette(const rct_palette_entry * colours); -void drawing_engine_copy_rect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy); +void drawing_engine_copy_rect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy); void drawing_engine_dispose(); rct_drawpixelinfo * drawing_engine_get_dpi(); bool drawing_engine_has_dirty_optimisations(); -void drawing_engine_invalidate_image(uint32 image); +void drawing_engine_invalidate_image(uint32_t image); void drawing_engine_set_vsync(bool vsync); diff --git a/src/openrct2/drawing/Rain.cpp b/src/openrct2/drawing/Rain.cpp index 79c41ea5e7..ea40b0fe63 100644 --- a/src/openrct2/drawing/Rain.cpp +++ b/src/openrct2/drawing/Rain.cpp @@ -20,8 +20,8 @@ using namespace OpenRCT2; using namespace OpenRCT2::Drawing; -static void DrawLightRain(IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height); -static void DrawHeavyRain(IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height); +static void DrawLightRain(IRainDrawer * rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height); +static void DrawHeavyRain(IRainDrawer * rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height); /** * @@ -43,7 +43,7 @@ void DrawRain(rct_drawpixelinfo * dpi, IRainDrawer * rainDrawer) if (gConfigGeneral.render_weather_effects) { // Get rain draw function and draw rain - uint32 rainType = gClimateCurrent.RainLevel; + uint32_t rainType = gClimateCurrent.RainLevel; if (rainType != RAIN_LEVEL_NONE && !gTrackDesignSaveMode && !(gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { auto drawFunc = DrawRainFunctions[rainType]; @@ -57,16 +57,16 @@ void DrawRain(rct_drawpixelinfo * dpi, IRainDrawer * rainDrawer) * * rct2: 0x00684114 */ -static void DrawLightRain(IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height) +static void DrawLightRain(IRainDrawer * rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { - sint32 x_start = -(sint32)gScenarioTicks + 8; - sint32 y_start = (gScenarioTicks * 3) + 7; + int32_t x_start = -(int32_t)gScenarioTicks + 8; + int32_t y_start = (gScenarioTicks * 3) + 7; y_start = -y_start; x_start += left; y_start += top; rainDrawer->Draw(left, top, width, height, x_start, y_start); - x_start = -(sint32)gScenarioTicks + 0x18; + x_start = -(int32_t)gScenarioTicks + 0x18; y_start = (gScenarioTicks * 4) + 0x0D; y_start = -y_start; x_start += left; @@ -78,30 +78,30 @@ static void DrawLightRain(IRainDrawer * rainDrawer, sint32 left, sint32 top, sin * * rct2: 0x0068416D */ -static void DrawHeavyRain(IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height) +static void DrawHeavyRain(IRainDrawer * rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { - sint32 x_start = -(sint32)gScenarioTicks; - sint32 y_start = gScenarioTicks * 5; + int32_t x_start = -(int32_t)gScenarioTicks; + int32_t y_start = gScenarioTicks * 5; y_start = -y_start; x_start += left; y_start += top; rainDrawer->Draw(left, top, width, height, x_start, y_start); - x_start = -(sint32)gScenarioTicks + 0x10; + x_start = -(int32_t)gScenarioTicks + 0x10; y_start = (gScenarioTicks * 6) + 5; y_start = -y_start; x_start += left; y_start += top; rainDrawer->Draw(left, top, width, height, x_start, y_start); - x_start = -(sint32)gScenarioTicks + 8; + x_start = -(int32_t)gScenarioTicks + 8; y_start = (gScenarioTicks * 3) + 7; y_start = -y_start; x_start += left; y_start += top; rainDrawer->Draw(left, top, width, height, x_start, y_start); - x_start = -(sint32)gScenarioTicks + 0x18; + x_start = -(int32_t)gScenarioTicks + 0x18; y_start = (gScenarioTicks * 4) + 0x0D; y_start = -y_start; x_start += left; diff --git a/src/openrct2/drawing/Rect.cpp b/src/openrct2/drawing/Rect.cpp index 1030e845f8..2268cf0158 100644 --- a/src/openrct2/drawing/Rect.cpp +++ b/src/openrct2/drawing/Rect.cpp @@ -23,7 +23,7 @@ * colour (ebp) * flags (si) */ -void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, sint16 left, sint16 top, sint16 right, sint16 bottom, sint32 colour, uint8 flags) +void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, int16_t left, int16_t top, int16_t right, int16_t bottom, int32_t colour, uint8_t flags) { if (colour & (COLOUR_FLAG_TRANSLUCENT | COLOUR_FLAG_8)) { translucent_window_palette palette; @@ -60,7 +60,7 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, sint16 left, sint16 top, sint16 } } } else { - uint8 shadow, fill, hilight; + uint8_t shadow, fill, hilight; if (flags & INSET_RECT_FLAG_FILL_MID_LIGHT) { shadow = ColourMapA[colour].dark; fill = ColourMapA[colour].mid_light; diff --git a/src/openrct2/drawing/SSE41Drawing.cpp b/src/openrct2/drawing/SSE41Drawing.cpp index c1bc463fca..4ec3146573 100644 --- a/src/openrct2/drawing/SSE41Drawing.cpp +++ b/src/openrct2/drawing/SSE41Drawing.cpp @@ -15,17 +15,17 @@ #include -void mask_sse4_1(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap) +void mask_sse4_1(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { if (width == 32) { const __m128i zero128 = {}; - for (sint32 yy = 0; yy < height; yy++) + for (int32_t yy = 0; yy < height; yy++) { - sint32 colourStep = yy * (colourWrap + 32); - sint32 maskStep = yy * (maskWrap + 32); - sint32 dstStep = yy * (dstWrap + 32); + int32_t colourStep = yy * (colourWrap + 32); + int32_t maskStep = yy * (maskWrap + 32); + int32_t dstStep = yy * (dstWrap + 32); // first half const __m128i colour1 = _mm_lddqu_si128((const __m128i *)(colourSrc + colourStep)); @@ -61,8 +61,8 @@ void mask_sse4_1(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, co #error You have to compile this file with SSE4.1 enabled, when targetting x86! #endif -void mask_sse4_1(sint32 width, sint32 height, const uint8 * RESTRICT maskSrc, const uint8 * RESTRICT colourSrc, - uint8 * RESTRICT dst, sint32 maskWrap, sint32 colourWrap, sint32 dstWrap) +void mask_sse4_1(int32_t width, int32_t height, const uint8_t * RESTRICT maskSrc, const uint8_t * RESTRICT colourSrc, + uint8_t * RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { openrct2_assert(false, "SSE 4.1 function called on a CPU that doesn't support SSE 4.1"); } diff --git a/src/openrct2/drawing/ScrollingText.cpp b/src/openrct2/drawing/ScrollingText.cpp index 8d9e1ab7c4..270c336268 100644 --- a/src/openrct2/drawing/ScrollingText.cpp +++ b/src/openrct2/drawing/ScrollingText.cpp @@ -21,12 +21,12 @@ /* size: 0xA12 */ struct rct_draw_scroll_text { rct_string_id string_id; // 0x00 - uint32 string_args_0; // 0x02 - uint32 string_args_1; // 0x06 - uint16 position; // 0x0A - uint16 mode; // 0x0C - uint32 id; // 0x0E - uint8 bitmap[64 * 40]; // 0x12 + uint32_t string_args_0; // 0x02 + uint32_t string_args_1; // 0x06 + uint16_t position; // 0x0A + uint16_t mode; // 0x0C + uint32_t id; // 0x0E + uint8_t bitmap[64 * 40]; // 0x12 }; assert_struct_size(rct_draw_scroll_text, 0xA12); #pragma pack(pop) @@ -34,17 +34,17 @@ assert_struct_size(rct_draw_scroll_text, 0xA12); #define MAX_SCROLLING_TEXT_ENTRIES 32 static rct_draw_scroll_text _drawScrollTextList[MAX_SCROLLING_TEXT_ENTRIES]; -static uint8 _characterBitmaps[FONT_SPRITE_GLYPH_COUNT][8]; -static uint32 _drawSCrollNextIndex = 0; +static uint8_t _characterBitmaps[FONT_SPRITE_GLYPH_COUNT][8]; +static uint32_t _drawSCrollNextIndex = 0; -static void scrolling_text_set_bitmap_for_sprite(utf8 *text, sint32 scroll, uint8 *bitmap, const sint16 *scrollPositionOffsets); -static void scrolling_text_set_bitmap_for_ttf(utf8 *text, sint32 scroll, uint8 *bitmap, const sint16 *scrollPositionOffsets); +static void scrolling_text_set_bitmap_for_sprite(utf8 *text, int32_t scroll, uint8_t *bitmap, const int16_t *scrollPositionOffsets); +static void scrolling_text_set_bitmap_for_ttf(utf8 *text, int32_t scroll, uint8_t *bitmap, const int16_t *scrollPositionOffsets); void scrolling_text_initialise_bitmaps() { - uint8 drawingSurface[64]; + uint8_t drawingSurface[64]; rct_drawpixelinfo dpi = { - /* .bits = */ (uint8 *)&drawingSurface, + /* .bits = */ (uint8_t *)&drawingSurface, /* .x = */ 0, /* .y = */ 0, /* .width = */ 8, @@ -54,15 +54,15 @@ void scrolling_text_initialise_bitmaps() }; - for (sint32 i = 0; i < FONT_SPRITE_GLYPH_COUNT; i++) { + for (int32_t i = 0; i < FONT_SPRITE_GLYPH_COUNT; i++) { memset(drawingSurface, 0, sizeof(drawingSurface)); gfx_draw_sprite_software(&dpi, SPR_CHAR_START + FONT_SPRITE_BASE_TINY + i, -1, 0, 0); - for (sint32 x = 0; x < 8; x++) { - uint8 val = 0; - for (sint32 y = 0; y < 8; y++) { + for (int32_t x = 0; x < 8; x++) { + uint8_t val = 0; + for (int32_t y = 0; y < 8; y++) { val >>= 1; - uint8 pixel = dpi.bits[x + y * 8]; + uint8_t pixel = dpi.bits[x + y * 8]; if (pixel == 1 || (gTinyFontAntiAliased && pixel == 2)) { val |= 0x80; } @@ -71,9 +71,9 @@ void scrolling_text_initialise_bitmaps() } } - for (sint32 i = 0; i < MAX_SCROLLING_TEXT_ENTRIES; i++) + for (int32_t i = 0; i < MAX_SCROLLING_TEXT_ENTRIES; i++) { - sint32 imageId = SPR_SCROLLING_TEXT_START + i; + int32_t imageId = SPR_SCROLLING_TEXT_START + i; const rct_g1_element * g1original = gfx_get_g1_element(imageId); if (g1original != nullptr) { @@ -92,17 +92,17 @@ void scrolling_text_initialise_bitmaps() } } -static uint8 *font_sprite_get_codepoint_bitmap(sint32 codepoint) +static uint8_t *font_sprite_get_codepoint_bitmap(int32_t codepoint) { return _characterBitmaps[font_sprite_get_codepoint_offset(codepoint)]; } -static sint32 scrolling_text_get_matching_or_oldest(rct_string_id stringId, uint16 scroll, uint16 scrollingMode) +static int32_t scrolling_text_get_matching_or_oldest(rct_string_id stringId, uint16_t scroll, uint16_t scrollingMode) { - uint32 oldestId = 0xFFFFFFFF; - sint32 scrollIndex = -1; - for (sint32 i = 0; i < MAX_SCROLLING_TEXT_ENTRIES; i++) { + uint32_t oldestId = 0xFFFFFFFF; + int32_t scrollIndex = -1; + for (int32_t i = 0; i < MAX_SCROLLING_TEXT_ENTRIES; i++) { rct_draw_scroll_text *scrollText = &_drawScrollTextList[i]; if (oldestId >= scrollText->id) { oldestId = scrollText->id; @@ -110,9 +110,9 @@ static sint32 scrolling_text_get_matching_or_oldest(rct_string_id stringId, uint } // If exact match return the matching index - uint32 stringArgs0, stringArgs1; - memcpy(&stringArgs0, gCommonFormatArgs + 0, sizeof(uint32)); - memcpy(&stringArgs1, gCommonFormatArgs + 4, sizeof(uint32)); + uint32_t stringArgs0, stringArgs1; + memcpy(&stringArgs0, gCommonFormatArgs + 0, sizeof(uint32_t)); + memcpy(&stringArgs1, gCommonFormatArgs + 4, sizeof(uint32_t)); if ( scrollText->string_id == stringId && scrollText->string_args_0 == stringArgs0 && @@ -127,9 +127,9 @@ static sint32 scrolling_text_get_matching_or_oldest(rct_string_id stringId, uint return scrollIndex; } -static uint8 scrolling_text_get_colour(uint32 character) +static uint8_t scrolling_text_get_colour(uint32_t character) { - sint32 colour = character & 0x7F; + int32_t colour = character & 0x7F; if (character & COLOUR_FLAG_TRANSLUCENT) { return ColourMapA[colour].light; } else { @@ -151,7 +151,7 @@ extern bool TempForScrollText; #define SCROLL_POS(x, y) (((y) * 64) + (x)) // clang-format off -static constexpr const sint16 _scrollpos0[] = { +static constexpr const int16_t _scrollpos0[] = { SCROLL_POS( 35, 12 ), SCROLL_POS( 36, 12 ), SCROLL_POS( 37, 11 ), @@ -178,7 +178,7 @@ static constexpr const sint16 _scrollpos0[] = { SCROLL_POS( 58, 1 ), -1, }; -static constexpr const sint16 _scrollpos1[] = { +static constexpr const int16_t _scrollpos1[] = { SCROLL_POS( 5, 1 ), SCROLL_POS( 6, 1 ), SCROLL_POS( 7, 2 ), @@ -205,7 +205,7 @@ static constexpr const sint16 _scrollpos1[] = { SCROLL_POS( 28, 12 ), -1, }; -static constexpr const sint16 _scrollpos2[] = { +static constexpr const int16_t _scrollpos2[] = { SCROLL_POS( 12, 1 ), SCROLL_POS( 13, 1 ), SCROLL_POS( 14, 2 ), @@ -247,7 +247,7 @@ static constexpr const sint16 _scrollpos2[] = { SCROLL_POS( 50, 1 ), -1, }; -static constexpr const sint16 _scrollpos3[] = { +static constexpr const int16_t _scrollpos3[] = { SCROLL_POS( 16, 0 ), SCROLL_POS( 17, 1 ), SCROLL_POS( 18, 1 ), @@ -283,7 +283,7 @@ static constexpr const sint16 _scrollpos3[] = { SCROLL_POS( 48, 16 ), -1, }; -static constexpr const sint16 _scrollpos4[] = { +static constexpr const int16_t _scrollpos4[] = { SCROLL_POS( 15, 17 ), SCROLL_POS( 16, 17 ), SCROLL_POS( 17, 16 ), @@ -320,7 +320,7 @@ static constexpr const sint16 _scrollpos4[] = { SCROLL_POS( 48, 0 ), -1, }; -static constexpr const sint16 _scrollpos5[] = { +static constexpr const int16_t _scrollpos5[] = { SCROLL_POS( 4, 12 ), SCROLL_POS( 5, 12 ), SCROLL_POS( 6, 11 ), @@ -347,7 +347,7 @@ static constexpr const sint16 _scrollpos5[] = { SCROLL_POS( 27, 1 ), -1, }; -static constexpr const sint16 _scrollpos6[] = { +static constexpr const int16_t _scrollpos6[] = { SCROLL_POS( 36, 1 ), SCROLL_POS( 37, 1 ), SCROLL_POS( 38, 2 ), @@ -374,7 +374,7 @@ static constexpr const sint16 _scrollpos6[] = { SCROLL_POS( 59, 12 ), -1, }; -static constexpr const sint16 _scrollpos7[] = { +static constexpr const int16_t _scrollpos7[] = { SCROLL_POS( 8, 11 ), SCROLL_POS( 9, 11 ), SCROLL_POS( 10, 10 ), @@ -399,7 +399,7 @@ static constexpr const sint16 _scrollpos7[] = { SCROLL_POS( 29, 1 ), -1, }; -static constexpr const sint16 _scrollpos8[] = { +static constexpr const int16_t _scrollpos8[] = { SCROLL_POS( 36, 2 ), SCROLL_POS( 37, 2 ), SCROLL_POS( 38, 3 ), @@ -422,7 +422,7 @@ static constexpr const sint16 _scrollpos8[] = { SCROLL_POS( 55, 11 ), -1, }; -static constexpr const sint16 _scrollpos9[] = { +static constexpr const int16_t _scrollpos9[] = { SCROLL_POS( 11, 9 ), SCROLL_POS( 12, 9 ), SCROLL_POS( 13, 9 ), @@ -444,7 +444,7 @@ static constexpr const sint16 _scrollpos9[] = { SCROLL_POS( 29, 1 ), -1, }; -static constexpr const sint16 _scrollpos10[] = { +static constexpr const int16_t _scrollpos10[] = { SCROLL_POS( 34, 1 ), SCROLL_POS( 35, 2 ), SCROLL_POS( 36, 3 ), @@ -466,7 +466,7 @@ static constexpr const sint16 _scrollpos10[] = { SCROLL_POS( 52, 9 ), -1, }; -static constexpr const sint16 _scrollpos11[] = { +static constexpr const int16_t _scrollpos11[] = { SCROLL_POS( 14, 10 ), SCROLL_POS( 15, 9 ), SCROLL_POS( 16, 9 ), @@ -490,7 +490,7 @@ static constexpr const sint16 _scrollpos11[] = { SCROLL_POS( 34, 0 ), -1, }; -static constexpr const sint16 _scrollpos12[] = { +static constexpr const int16_t _scrollpos12[] = { SCROLL_POS( 33, 1 ), SCROLL_POS( 34, 2 ), SCROLL_POS( 35, 2 ), @@ -514,7 +514,7 @@ static constexpr const sint16 _scrollpos12[] = { SCROLL_POS( 53, 11 ), -1, }; -static constexpr const sint16 _scrollpos13[] = { +static constexpr const int16_t _scrollpos13[] = { SCROLL_POS( 12, 11 ), SCROLL_POS( 13, 10 ), SCROLL_POS( 14, 10 ), @@ -537,7 +537,7 @@ static constexpr const sint16 _scrollpos13[] = { SCROLL_POS( 31, 1 ), -1, }; -static constexpr const sint16 _scrollpos14[] = { +static constexpr const int16_t _scrollpos14[] = { SCROLL_POS( 33, 1 ), SCROLL_POS( 34, 2 ), SCROLL_POS( 35, 2 ), @@ -561,7 +561,7 @@ static constexpr const sint16 _scrollpos14[] = { SCROLL_POS( 53, 11 ), -1, }; -static constexpr const sint16 _scrollpos15[] = { +static constexpr const int16_t _scrollpos15[] = { SCROLL_POS( 10, 10 ), SCROLL_POS( 11, 10 ), SCROLL_POS( 12, 9 ), @@ -586,7 +586,7 @@ static constexpr const sint16 _scrollpos15[] = { SCROLL_POS( 31, 0 ), -1, }; -static constexpr const sint16 _scrollpos16[] = { +static constexpr const int16_t _scrollpos16[] = { SCROLL_POS( 33, 0 ), SCROLL_POS( 34, 0 ), SCROLL_POS( 35, 1 ), @@ -611,7 +611,7 @@ static constexpr const sint16 _scrollpos16[] = { SCROLL_POS( 54, 10 ), -1, }; -static constexpr const sint16 _scrollpos17[] = { +static constexpr const int16_t _scrollpos17[] = { SCROLL_POS( 6, 11 ), SCROLL_POS( 7, 11 ), SCROLL_POS( 8, 10 ), @@ -638,7 +638,7 @@ static constexpr const sint16 _scrollpos17[] = { SCROLL_POS( 29, 0 ), -1, }; -static constexpr const sint16 _scrollpos18[] = { +static constexpr const int16_t _scrollpos18[] = { SCROLL_POS( 34, 0 ), SCROLL_POS( 35, 0 ), SCROLL_POS( 36, 1 ), @@ -665,7 +665,7 @@ static constexpr const sint16 _scrollpos18[] = { SCROLL_POS( 57, 11 ), -1, }; -static constexpr const sint16 _scrollpos19[] = { +static constexpr const int16_t _scrollpos19[] = { SCROLL_POS( 13, 1 ), SCROLL_POS( 14, 1 ), SCROLL_POS( 15, 2 ), @@ -707,7 +707,7 @@ static constexpr const sint16 _scrollpos19[] = { SCROLL_POS( 51, 1 ), -1, }; -static constexpr const sint16 _scrollpos20[] = { +static constexpr const int16_t _scrollpos20[] = { SCROLL_POS( 12, 1 ), SCROLL_POS( 13, 3 ), SCROLL_POS( 14, 4 ), @@ -748,7 +748,7 @@ static constexpr const sint16 _scrollpos20[] = { SCROLL_POS( 49, 3 ), -1, }; -static constexpr const sint16 _scrollpos21[] = { +static constexpr const int16_t _scrollpos21[] = { SCROLL_POS( 12, 1 ), SCROLL_POS( 13, 1 ), SCROLL_POS( 14, 2 ), @@ -789,7 +789,7 @@ static constexpr const sint16 _scrollpos21[] = { SCROLL_POS( 49, 1 ), -1, }; -static constexpr const sint16 _scrollpos22[] = { +static constexpr const int16_t _scrollpos22[] = { SCROLL_POS( 16, 1 ), SCROLL_POS( 17, 1 ), SCROLL_POS( 18, 2 ), @@ -825,7 +825,7 @@ static constexpr const sint16 _scrollpos22[] = { SCROLL_POS( 48, 1 ), -1, }; -static constexpr const sint16 _scrollpos23[] = { +static constexpr const int16_t _scrollpos23[] = { SCROLL_POS( 15, 1 ), SCROLL_POS( 16, 2 ), SCROLL_POS( 17, 2 ), @@ -862,7 +862,7 @@ static constexpr const sint16 _scrollpos23[] = { SCROLL_POS( 48, 1 ), -1, }; -static constexpr const sint16 _scrollpos24[] = { +static constexpr const int16_t _scrollpos24[] = { SCROLL_POS( 8, 9 ), SCROLL_POS( 9, 9 ), SCROLL_POS( 10, 8 ), @@ -885,7 +885,7 @@ static constexpr const sint16 _scrollpos24[] = { SCROLL_POS( 27, 0 ), -1, }; -static constexpr const sint16 _scrollpos25[] = { +static constexpr const int16_t _scrollpos25[] = { SCROLL_POS( 36, 0 ), SCROLL_POS( 37, 0 ), SCROLL_POS( 38, 1 ), @@ -908,7 +908,7 @@ static constexpr const sint16 _scrollpos25[] = { SCROLL_POS( 55, 9 ), -1, }; -static constexpr const sint16 _scrollpos26[] = { +static constexpr const int16_t _scrollpos26[] = { SCROLL_POS( 4, 13 ), SCROLL_POS( 5, 13 ), SCROLL_POS( 6, 12 ), @@ -939,7 +939,7 @@ static constexpr const sint16 _scrollpos26[] = { SCROLL_POS( 31, 0 ), -1, }; -static constexpr const sint16 _scrollpos27[] = { +static constexpr const int16_t _scrollpos27[] = { SCROLL_POS( 32, 0 ), SCROLL_POS( 33, 0 ), SCROLL_POS( 34, 1 ), @@ -970,7 +970,7 @@ static constexpr const sint16 _scrollpos27[] = { SCROLL_POS( 59, 13 ), -1, }; -static constexpr const sint16 _scrollpos28[] = { +static constexpr const int16_t _scrollpos28[] = { SCROLL_POS( 6, 13 ), SCROLL_POS( 7, 13 ), SCROLL_POS( 8, 12 ), @@ -1001,7 +1001,7 @@ static constexpr const sint16 _scrollpos28[] = { SCROLL_POS( 33, 0 ), -1, }; -static constexpr const sint16 _scrollpos29[] = { +static constexpr const int16_t _scrollpos29[] = { SCROLL_POS( 30, 0 ), SCROLL_POS( 31, 0 ), SCROLL_POS( 32, 1 ), @@ -1032,7 +1032,7 @@ static constexpr const sint16 _scrollpos29[] = { SCROLL_POS( 57, 13 ), -1, }; -static constexpr const sint16 _scrollpos30[] = { +static constexpr const int16_t _scrollpos30[] = { SCROLL_POS( 2, 30 ), SCROLL_POS( 3, 30 ), SCROLL_POS( 4, 29 ), @@ -1096,7 +1096,7 @@ static constexpr const sint16 _scrollpos30[] = { SCROLL_POS( 62, 0 ), -1, }; -static constexpr const sint16 _scrollpos31[] = { +static constexpr const int16_t _scrollpos31[] = { SCROLL_POS( 1, 0 ), SCROLL_POS( 2, 1 ), SCROLL_POS( 3, 1 ), @@ -1160,7 +1160,7 @@ static constexpr const sint16 _scrollpos31[] = { SCROLL_POS( 61, 30 ), -1, }; -static constexpr const sint16 _scrollpos32[] = { +static constexpr const int16_t _scrollpos32[] = { SCROLL_POS( 12, 0 ), SCROLL_POS( 13, 1 ), SCROLL_POS( 14, 1 ), @@ -1202,7 +1202,7 @@ static constexpr const sint16 _scrollpos32[] = { SCROLL_POS( 50, 19 ), -1, }; -static constexpr const sint16 _scrollpos33[] = { +static constexpr const int16_t _scrollpos33[] = { SCROLL_POS( 12, 20 ), SCROLL_POS( 13, 20 ), SCROLL_POS( 14, 19 ), @@ -1245,7 +1245,7 @@ static constexpr const sint16 _scrollpos33[] = { SCROLL_POS( 51, 1 ), -1, }; -static constexpr const sint16 _scrollpos34[] = { +static constexpr const int16_t _scrollpos34[] = { SCROLL_POS( 2, 14 ), SCROLL_POS( 3, 14 ), SCROLL_POS( 4, 13 ), @@ -1277,7 +1277,7 @@ static constexpr const sint16 _scrollpos34[] = { SCROLL_POS( 30, 0 ), -1, }; -static constexpr const sint16 _scrollpos35[] = { +static constexpr const int16_t _scrollpos35[] = { SCROLL_POS( 33, 0 ), SCROLL_POS( 34, 0 ), SCROLL_POS( 35, 1 ), @@ -1309,7 +1309,7 @@ static constexpr const sint16 _scrollpos35[] = { SCROLL_POS( 61, 14 ), -1, }; -static constexpr const sint16 _scrollpos36[] = { +static constexpr const int16_t _scrollpos36[] = { SCROLL_POS( 4, 0 ), SCROLL_POS( 5, 1 ), SCROLL_POS( 6, 2 ), @@ -1339,7 +1339,7 @@ static constexpr const sint16 _scrollpos36[] = { SCROLL_POS( 30, 12 ), -1, }; -static constexpr const sint16 _scrollpos37[] = { +static constexpr const int16_t _scrollpos37[] = { SCROLL_POS( 32, 13 ), SCROLL_POS( 33, 12 ), SCROLL_POS( 34, 12 ), @@ -1370,7 +1370,7 @@ static constexpr const sint16 _scrollpos37[] = { -1, }; -static constexpr const sint16* _scrollPositions[MAX_SCROLLING_TEXT_MODES] = { +static constexpr const int16_t* _scrollPositions[MAX_SCROLLING_TEXT_MODES] = { _scrollpos0, _scrollpos1, _scrollpos2, @@ -1420,7 +1420,7 @@ static constexpr const sint16* _scrollPositions[MAX_SCROLLING_TEXT_MODES] = { * @param scrollingMode (bp) * @returns ebx */ -sint32 scrolling_text_setup(paint_session * session, rct_string_id stringId, uint16 scroll, uint16 scrollingMode) +int32_t scrolling_text_setup(paint_session * session, rct_string_id stringId, uint16_t scroll, uint16_t scrollingMode) { assert(scrollingMode < MAX_SCROLLING_TEXT_MODES); @@ -1430,13 +1430,13 @@ sint32 scrolling_text_setup(paint_session * session, rct_string_id stringId, uin _drawSCrollNextIndex++; - sint32 scrollIndex = scrolling_text_get_matching_or_oldest(stringId, scroll, scrollingMode); + int32_t scrollIndex = scrolling_text_get_matching_or_oldest(stringId, scroll, scrollingMode); if (scrollIndex >= SPR_SCROLLING_TEXT_START) return scrollIndex; // Setup scrolling text - uint32 stringArgs0, stringArgs1; - memcpy(&stringArgs0, gCommonFormatArgs + 0, sizeof(uint32)); - memcpy(&stringArgs1, gCommonFormatArgs + 4, sizeof(uint32)); + uint32_t stringArgs0, stringArgs1; + memcpy(&stringArgs0, gCommonFormatArgs + 0, sizeof(uint32_t)); + memcpy(&stringArgs1, gCommonFormatArgs + 4, sizeof(uint32_t)); rct_draw_scroll_text* scrollText = &_drawScrollTextList[scrollIndex]; scrollText->string_id = stringId; @@ -1450,7 +1450,7 @@ sint32 scrolling_text_setup(paint_session * session, rct_string_id stringId, uin utf8 scrollString[256]; scrolling_text_format(scrollString, 256, scrollText); - const sint16* scrollingModePositions = _scrollPositions[scrollingMode]; + const int16_t* scrollingModePositions = _scrollPositions[scrollingMode]; memset(scrollText->bitmap, 0, 320 * 8); if (LocalisationService_UseTrueTypeFont()) { @@ -1459,18 +1459,18 @@ sint32 scrolling_text_setup(paint_session * session, rct_string_id stringId, uin scrolling_text_set_bitmap_for_sprite(scrollString, scroll, scrollText->bitmap, scrollingModePositions); } - uint32 imageId = SPR_SCROLLING_TEXT_START + scrollIndex; + uint32_t imageId = SPR_SCROLLING_TEXT_START + scrollIndex; drawing_engine_invalidate_image(imageId); return imageId; } -static void scrolling_text_set_bitmap_for_sprite(utf8 *text, sint32 scroll, uint8 *bitmap, const sint16 *scrollPositionOffsets) +static void scrolling_text_set_bitmap_for_sprite(utf8 *text, int32_t scroll, uint8_t *bitmap, const int16_t *scrollPositionOffsets) { - uint8 characterColour = scrolling_text_get_colour(gCommonFormatArgs[7]); + uint8_t characterColour = scrolling_text_get_colour(gCommonFormatArgs[7]); utf8 *ch = text; while (true) { - uint32 codepoint = utf8_get_next(ch, (const utf8**)&ch); + uint32_t codepoint = utf8_get_next(ch, (const utf8**)&ch); // If at the end of the string loop back to the start if (codepoint == 0) { @@ -1492,8 +1492,8 @@ static void scrolling_text_set_bitmap_for_sprite(utf8 *text, sint32 scroll, uint // If another type of control character ignore if (codepoint < 32) continue; - sint32 characterWidth = font_sprite_get_codepoint_width(FONT_SPRITE_BASE_TINY, codepoint); - uint8 *characterBitmap = font_sprite_get_codepoint_bitmap(codepoint); + int32_t characterWidth = font_sprite_get_codepoint_width(FONT_SPRITE_BASE_TINY, codepoint); + uint8_t *characterBitmap = font_sprite_get_codepoint_bitmap(codepoint); for (; characterWidth != 0; characterWidth--, characterBitmap++) { // Skip any non-displayed columns if (scroll != 0) { @@ -1501,11 +1501,11 @@ static void scrolling_text_set_bitmap_for_sprite(utf8 *text, sint32 scroll, uint continue; } - sint16 scrollPosition = *scrollPositionOffsets; + int16_t scrollPosition = *scrollPositionOffsets; if (scrollPosition == -1) return; if (scrollPosition > -1) { - uint8 *dst = &bitmap[scrollPosition]; - for (uint8 char_bitmap = *characterBitmap; char_bitmap != 0; char_bitmap >>= 1){ + uint8_t *dst = &bitmap[scrollPosition]; + for (uint8_t char_bitmap = *characterBitmap; char_bitmap != 0; char_bitmap >>= 1){ if (char_bitmap & 1) *dst = characterColour; // Jump to next row @@ -1517,7 +1517,7 @@ static void scrolling_text_set_bitmap_for_sprite(utf8 *text, sint32 scroll, uint } } -static void scrolling_text_set_bitmap_for_ttf(utf8 *text, sint32 scroll, uint8 *bitmap, const sint16 *scrollPositionOffsets) +static void scrolling_text_set_bitmap_for_ttf(utf8 *text, int32_t scroll, uint8_t *bitmap, const int16_t *scrollPositionOffsets) { #ifndef NO_TTF TTFFontDescriptor *fontDesc = ttf_get_font_from_sprite_base(FONT_SPRITE_BASE_TINY); @@ -1527,15 +1527,15 @@ static void scrolling_text_set_bitmap_for_ttf(utf8 *text, sint32 scroll, uint8 * } // Currently only supports one colour - uint8 colour = 0; + uint8_t colour = 0; utf8 *dstCh = text; utf8 *ch = text; - sint32 codepoint; + int32_t codepoint; while ((codepoint = utf8_get_next(ch, (const utf8**)&ch)) != 0) { if (utf8_is_format_code(codepoint)) { if (codepoint >= FORMAT_COLOUR_CODE_START && codepoint <= FORMAT_COLOUR_CODE_END) { - colour = (uint8)codepoint; + colour = (uint8_t)codepoint; } } else { dstCh = utf8_write_codepoint(dstCh, codepoint); @@ -1558,20 +1558,20 @@ static void scrolling_text_set_bitmap_for_ttf(utf8 *text, sint32 scroll, uint8 * return; } - sint32 pitch = surface->pitch; - sint32 width = surface->w; - auto src = (const uint8 *)surface->pixels; + int32_t pitch = surface->pitch; + int32_t width = surface->w; + auto src = (const uint8_t *)surface->pixels; // Pitch offset src += 2 * pitch; // Line height offset - sint32 min_vpos = -fontDesc->offset_y; - sint32 max_vpos = std::min(surface->h - 2, min_vpos + 7); + int32_t min_vpos = -fontDesc->offset_y; + int32_t max_vpos = std::min(surface->h - 2, min_vpos + 7); bool use_hinting = gConfigFonts.enable_hinting && fontDesc->hinting_threshold > 0; - for (sint32 x = 0; ; x++) + for (int32_t x = 0; ; x++) { if (x >= width) x = 0; @@ -1579,17 +1579,17 @@ static void scrolling_text_set_bitmap_for_ttf(utf8 *text, sint32 scroll, uint8 * // Skip any non-displayed columns if (scroll == 0) { - sint16 scrollPosition = *scrollPositionOffsets; + int16_t scrollPosition = *scrollPositionOffsets; if (scrollPosition == -1) return; if (scrollPosition > -1) { - uint8 *dst = &bitmap[scrollPosition]; + uint8_t *dst = &bitmap[scrollPosition]; - for (sint32 y = min_vpos; y < max_vpos; y++) + for (int32_t y = min_vpos; y < max_vpos; y++) { - uint8 src_pixel = src[y * pitch + x]; + uint8_t src_pixel = src[y * pitch + x]; if ((!use_hinting && src_pixel != 0) || src_pixel > 140) { // Centre of the glyph: use full colour. diff --git a/src/openrct2/drawing/TTF.cpp b/src/openrct2/drawing/TTF.cpp index 08d19966ae..95fc9d7cea 100644 --- a/src/openrct2/drawing/TTF.cpp +++ b/src/openrct2/drawing/TTF.cpp @@ -32,34 +32,34 @@ struct ttf_cache_entry TTFSurface * surface; TTF_Font * font; utf8 * text; - uint32 lastUseTick; + uint32_t lastUseTick; }; struct ttf_getwidth_cache_entry { - uint32 width; + uint32_t width; TTF_Font * font; utf8 * text; - uint32 lastUseTick; + uint32_t lastUseTick; }; static ttf_cache_entry _ttfSurfaceCache[TTF_SURFACE_CACHE_SIZE] = {}; -static sint32 _ttfSurfaceCacheCount = 0; -static sint32 _ttfSurfaceCacheHitCount = 0; -static sint32 _ttfSurfaceCacheMissCount = 0; +static int32_t _ttfSurfaceCacheCount = 0; +static int32_t _ttfSurfaceCacheHitCount = 0; +static int32_t _ttfSurfaceCacheMissCount = 0; static ttf_getwidth_cache_entry _ttfGetWidthCache[TTF_GETWIDTH_CACHE_SIZE] = {}; -static sint32 _ttfGetWidthCacheCount = 0; -static sint32 _ttfGetWidthCacheHitCount = 0; -static sint32 _ttfGetWidthCacheMissCount = 0; +static int32_t _ttfGetWidthCacheCount = 0; +static int32_t _ttfGetWidthCacheHitCount = 0; +static int32_t _ttfGetWidthCacheMissCount = 0; -static TTF_Font * ttf_open_font(const utf8 * fontPath, sint32 ptSize); +static TTF_Font * ttf_open_font(const utf8 * fontPath, int32_t ptSize); static void ttf_close_font(TTF_Font * font); -static uint32 ttf_surface_cache_hash(TTF_Font * font, const utf8 * text); +static uint32_t ttf_surface_cache_hash(TTF_Font * font, const utf8 * text); static void ttf_surface_cache_dispose(ttf_cache_entry * entry); static void ttf_surface_cache_dispose_all(); static void ttf_getwidth_cache_dispose_all(); -static bool ttf_get_size(TTF_Font * font, const utf8 * text, sint32 * width, sint32 * height); +static bool ttf_get_size(TTF_Font * font, const utf8 * text, int32_t * width, int32_t * height); static TTFSurface * ttf_render(TTF_Font * font, const utf8 * text); bool ttf_initialise() @@ -70,7 +70,7 @@ bool ttf_initialise() return false; } - for (sint32 i = 0; i < FONT_SIZE_COUNT; i++) { + for (int32_t i = 0; i < FONT_SIZE_COUNT; i++) { TTFFontDescriptor *fontDesc = &(gCurrentTTFFontSet->size[i]); utf8 fontPath[MAX_PATH]; @@ -100,7 +100,7 @@ void ttf_dispose() ttf_surface_cache_dispose_all(); ttf_getwidth_cache_dispose_all(); - for (sint32 i = 0; i < 4; i++) { + for (int32_t i = 0; i < 4; i++) { TTFFontDescriptor *fontDesc = &(gCurrentTTFFontSet->size[i]); if (fontDesc->font != nullptr) { ttf_close_font(fontDesc->font); @@ -113,7 +113,7 @@ void ttf_dispose() } } -static TTF_Font * ttf_open_font(const utf8 * fontPath, sint32 ptSize) +static TTF_Font * ttf_open_font(const utf8 * fontPath, int32_t ptSize) { return TTF_OpenFont(fontPath, ptSize); } @@ -123,9 +123,9 @@ static void ttf_close_font(TTF_Font * font) TTF_CloseFont(font); } -static uint32 ttf_surface_cache_hash(TTF_Font *font, const utf8 *text) +static uint32_t ttf_surface_cache_hash(TTF_Font *font, const utf8 *text) { - uint32 hash = (uint32)((((uintptr_t)font * 23) ^ 0xAAAAAAAA) & 0xFFFFFFFF); + uint32_t hash = (uint32_t)((((uintptr_t)font * 23) ^ 0xAAAAAAAA) & 0xFFFFFFFF); for (const utf8 *ch = text; *ch != 0; ch++) { hash = ror32(hash, 3) ^ (*ch * 13); } @@ -146,7 +146,7 @@ static void ttf_surface_cache_dispose(ttf_cache_entry *entry) static void ttf_surface_cache_dispose_all() { - for (sint32 i = 0; i < TTF_SURFACE_CACHE_SIZE; i++) { + for (int32_t i = 0; i < TTF_SURFACE_CACHE_SIZE; i++) { ttf_surface_cache_dispose(&_ttfSurfaceCache[i]); _ttfSurfaceCacheCount--; } @@ -159,7 +159,7 @@ void ttf_toggle_hinting() return; } - for (sint32 i = 0; i < FONT_SIZE_COUNT; i++) + for (int32_t i = 0; i < FONT_SIZE_COUNT; i++) { TTFFontDescriptor *fontDesc = &(gCurrentTTFFontSet->size[i]); bool use_hinting = gConfigFonts.enable_hinting && fontDesc->hinting_threshold; @@ -176,9 +176,9 @@ TTFSurface * ttf_surface_cache_get_or_add(TTF_Font * font, const utf8 * text) { ttf_cache_entry *entry; - uint32 hash = ttf_surface_cache_hash(font, text); - sint32 index = hash % TTF_SURFACE_CACHE_SIZE; - for (sint32 i = 0; i < TTF_SURFACE_CACHE_SIZE; i++) { + uint32_t hash = ttf_surface_cache_hash(font, text); + int32_t index = hash % TTF_SURFACE_CACHE_SIZE; + for (int32_t i = 0; i < TTF_SURFACE_CACHE_SIZE; i++) { entry = &_ttfSurfaceCache[index]; // Check if entry is a hit @@ -231,19 +231,19 @@ static void ttf_getwidth_cache_dispose(ttf_getwidth_cache_entry *entry) static void ttf_getwidth_cache_dispose_all() { - for (sint32 i = 0; i < TTF_GETWIDTH_CACHE_SIZE; i++) { + for (int32_t i = 0; i < TTF_GETWIDTH_CACHE_SIZE; i++) { ttf_getwidth_cache_dispose(&_ttfGetWidthCache[i]); _ttfGetWidthCacheCount--; } } -uint32 ttf_getwidth_cache_get_or_add(TTF_Font * font, const utf8 * text) +uint32_t ttf_getwidth_cache_get_or_add(TTF_Font * font, const utf8 * text) { ttf_getwidth_cache_entry *entry; - uint32 hash = ttf_surface_cache_hash(font, text); - sint32 index = hash % TTF_GETWIDTH_CACHE_SIZE; - for (sint32 i = 0; i < TTF_GETWIDTH_CACHE_SIZE; i++) { + uint32_t hash = ttf_surface_cache_hash(font, text); + int32_t index = hash % TTF_GETWIDTH_CACHE_SIZE; + for (int32_t i = 0; i < TTF_GETWIDTH_CACHE_SIZE; i++) { entry = &_ttfGetWidthCache[index]; // Check if entry is a hit @@ -267,7 +267,7 @@ uint32 ttf_getwidth_cache_get_or_add(TTF_Font * font, const utf8 * text) entry = &_ttfGetWidthCache[index]; ttf_getwidth_cache_dispose(entry); - sint32 width, height; + int32_t width, height; ttf_get_size(font, text, &width, &height); _ttfGetWidthCacheMissCount++; @@ -280,7 +280,7 @@ uint32 ttf_getwidth_cache_get_or_add(TTF_Font * font, const utf8 * text) return entry->width; } -TTFFontDescriptor * ttf_get_font_from_sprite_base(uint16 spriteBase) +TTFFontDescriptor * ttf_get_font_from_sprite_base(uint16_t spriteBase) { return &gCurrentTTFFontSet->size[font_get_size_from_sprite_base(spriteBase)]; } @@ -290,7 +290,7 @@ bool ttf_provides_glyph(const TTF_Font * font, codepoint_t codepoint) return TTF_GlyphIsProvided(font, codepoint); } -static bool ttf_get_size(TTF_Font * font, const utf8 * text, sint32 * outWidth, sint32 * outHeight) +static bool ttf_get_size(TTF_Font * font, const utf8 * text, int32_t * outWidth, int32_t * outHeight) { return TTF_SizeUTF8(font, text, outWidth, outHeight); } diff --git a/src/openrct2/drawing/TTF.h b/src/openrct2/drawing/TTF.h index 37ee47e9cf..8e5d4cc25a 100644 --- a/src/openrct2/drawing/TTF.h +++ b/src/openrct2/drawing/TTF.h @@ -18,15 +18,15 @@ void ttf_dispose(); struct TTFSurface { const void * pixels; - sint32 w; - sint32 h; - sint32 pitch; + int32_t w; + int32_t h; + int32_t pitch; }; -TTFFontDescriptor * ttf_get_font_from_sprite_base(uint16 spriteBase); +TTFFontDescriptor * ttf_get_font_from_sprite_base(uint16_t spriteBase); void ttf_toggle_hinting(); TTFSurface * ttf_surface_cache_get_or_add(TTF_Font * font, const utf8 * text); -uint32 ttf_getwidth_cache_get_or_add(TTF_Font * font, const utf8 * text); +uint32_t ttf_getwidth_cache_get_or_add(TTF_Font * font, const utf8 * text); bool ttf_provides_glyph(const TTF_Font * font, codepoint_t codepoint); void ttf_free_surface(TTFSurface * surface); @@ -35,8 +35,8 @@ int TTF_Init(void); TTF_Font * TTF_OpenFont(const char *file, int ptsize); int TTF_GlyphIsProvided(const TTF_Font *font, codepoint_t ch); int TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h); -TTFSurface * TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, uint32 colour); -TTFSurface * TTF_RenderUTF8_Shaded(TTF_Font *font, const char *text, uint32 fg, uint32 bg); +TTFSurface * TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, uint32_t colour); +TTFSurface * TTF_RenderUTF8_Shaded(TTF_Font *font, const char *text, uint32_t fg, uint32_t bg); void TTF_CloseFont(TTF_Font *font); void TTF_SetFontHinting(TTF_Font* font, int hinting); int TTF_GetFontHinting(const TTF_Font* font); diff --git a/src/openrct2/drawing/TTFSDLPort.cpp b/src/openrct2/drawing/TTFSDLPort.cpp index e0e0405527..34b660d270 100644 --- a/src/openrct2/drawing/TTFSDLPort.cpp +++ b/src/openrct2/drawing/TTFSDLPort.cpp @@ -88,7 +88,7 @@ struct c_glyph { int maxy; int yoffset; int advance; - uint16 cached; + uint16_t cached; }; /* The structure used to hold internal font information */ @@ -195,12 +195,12 @@ static int TTF_strikethrough_top_row(TTF_Font *font) return font->height / 2; } -static void TTF_initLineMectrics(const TTF_Font *font, const TTFSurface *textbuf, const int row, uint8 **pdst, int *pheight) +static void TTF_initLineMectrics(const TTF_Font *font, const TTFSurface *textbuf, const int row, uint8_t **pdst, int *pheight) { - uint8 *dst; + uint8_t *dst; int height; - dst = (uint8 *)textbuf->pixels; + dst = (uint8_t *)textbuf->pixels; if (row > 0) { dst += row * textbuf->pitch; } @@ -221,8 +221,8 @@ outline into account. static void TTF_drawLine_Solid(const TTF_Font *font, const TTFSurface *textbuf, const int row) { int line; - uint8 *dst_check = (uint8*)textbuf->pixels + textbuf->pitch * textbuf->h; - uint8 *dst; + uint8_t *dst_check = (uint8_t*)textbuf->pixels + textbuf->pitch * textbuf->h; + uint8_t *dst; int height; TTF_initLineMectrics(font, textbuf, row, &dst, &height); @@ -242,8 +242,8 @@ static void TTF_drawLine_Solid(const TTF_Font *font, const TTFSurface *textbuf, static void TTF_drawLine_Shaded(const TTF_Font *font, const TTFSurface *textbuf, const int row) { int line; - uint8 *dst_check = (uint8*) textbuf->pixels + textbuf->pitch * textbuf->h; - uint8 *dst; + uint8_t *dst_check = (uint8_t*) textbuf->pixels + textbuf->pitch * textbuf->h; + uint8_t *dst; int height; TTF_initLineMectrics(font, textbuf, row, &dst, &height); @@ -339,7 +339,7 @@ static TTF_Font* TTF_OpenFontIndexRW(FILE *src, int freesrc, int ptsize, long in FT_Fixed scale; FT_Stream stream; FT_CharMap found; - sint64 position; + int64_t position; int i; if (!TTF_initialized) { @@ -543,7 +543,7 @@ static void Flush_Cache(TTF_Font* font) } } -static FT_Error Load_Glyph(TTF_Font* font, uint16 ch, c_glyph* cached, int want) +static FT_Error Load_Glyph(TTF_Font* font, uint16_t ch, c_glyph* cached, int want) { FT_Face face; FT_Error error; @@ -832,7 +832,7 @@ static FT_Error Load_Glyph(TTF_Font* font, uint16 ch, c_glyph* cached, int want) int col; int offset; int pixel; - uint8* pixmap; + uint8_t* pixmap; /* The pixmap is a little hard, we have to add and clamp */ for (row = dst->rows - 1; row >= 0; --row) { @@ -847,7 +847,7 @@ static FT_Error Load_Glyph(TTF_Font* font, uint16 ch, c_glyph* cached, int want) if (pixel > NUM_GRAYS - 1) { pixel = NUM_GRAYS - 1; } - pixmap[col] = (uint8)pixel; + pixmap[col] = (uint8_t)pixel; } } } @@ -874,7 +874,7 @@ static FT_Error Load_Glyph(TTF_Font* font, uint16 ch, c_glyph* cached, int want) return 0; } -static FT_Error Find_Glyph(TTF_Font* font, uint16 ch, int want) +static FT_Error Find_Glyph(TTF_Font* font, uint16_t ch, int want) { int retval = 0; int hsize = sizeof(font->cache) / sizeof(font->cache[0]); @@ -910,13 +910,13 @@ void TTF_CloseFont(TTF_Font* font) /* Gets a unicode value from a UTF-8 encoded string and advance the string */ #define UNKNOWN_UNICODE 0xFFFD -static uint32 UTF8_getch(const char **src, size_t *srclen) +static uint32_t UTF8_getch(const char **src, size_t *srclen) { - const uint8 *p = *(const uint8**)src; + const uint8_t *p = *(const uint8_t**)src; size_t left = 0; [[maybe_unused]] bool overlong = false; bool underflow = false; - uint32 ch = UNKNOWN_UNICODE; + uint32_t ch = UNKNOWN_UNICODE; if (*srclen == 0) { return UNKNOWN_UNICODE; @@ -926,7 +926,7 @@ static uint32 UTF8_getch(const char **src, size_t *srclen) if (p[0] == 0xFC && (p[1] & 0xFC) == 0x80) { overlong = true; } - ch = (uint32)(p[0] & 0x01); + ch = (uint32_t)(p[0] & 0x01); left = 5; } } @@ -935,7 +935,7 @@ static uint32 UTF8_getch(const char **src, size_t *srclen) if (p[0] == 0xF8 && (p[1] & 0xF8) == 0x80) { overlong = true; } - ch = (uint32)(p[0] & 0x03); + ch = (uint32_t)(p[0] & 0x03); left = 4; } } @@ -944,7 +944,7 @@ static uint32 UTF8_getch(const char **src, size_t *srclen) if (p[0] == 0xF0 && (p[1] & 0xF0) == 0x80) { overlong = true; } - ch = (uint32)(p[0] & 0x07); + ch = (uint32_t)(p[0] & 0x07); left = 3; } } @@ -953,7 +953,7 @@ static uint32 UTF8_getch(const char **src, size_t *srclen) if (p[0] == 0xE0 && (p[1] & 0xE0) == 0x80) { overlong = true; } - ch = (uint32)(p[0] & 0x0F); + ch = (uint32_t)(p[0] & 0x0F); left = 2; } } @@ -962,13 +962,13 @@ static uint32 UTF8_getch(const char **src, size_t *srclen) if ((p[0] & 0xDE) == 0xC0) { overlong = true; } - ch = (uint32)(p[0] & 0x1F); + ch = (uint32_t)(p[0] & 0x1F); left = 1; } } else { if ((p[0] & 0x80) == 0x00) { - ch = (uint32)p[0]; + ch = (uint32_t)p[0]; } } ++*src; @@ -1040,7 +1040,7 @@ int TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h) textlen = strlen(text); x = 0; while (textlen > 0) { - uint16 c = UTF8_getch(&text, &textlen); + uint16_t c = UTF8_getch(&text, &textlen); if (c == UNICODE_BOM_NATIVE || c == UNICODE_BOM_SWAPPED) { continue; } @@ -1128,16 +1128,16 @@ int TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h) return status; } -TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unused]] uint32 colour) +TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unused]] uint32_t colour) { bool first; int xstart; int width; int height; TTFSurface* textbuf; - uint8* src; - uint8* dst; - uint8 *dst_check; + uint8_t* src; + uint8_t* dst; + uint8_t *dst_check; unsigned int row, col; c_glyph *glyph; @@ -1167,7 +1167,7 @@ TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unuse /* Adding bound checking to avoid all kinds of memory corruption errors that may occur. */ - dst_check = (uint8*)textbuf->pixels + textbuf->pitch * textbuf->h; + dst_check = (uint8_t*)textbuf->pixels + textbuf->pitch * textbuf->h; /* check kerning */ use_kerning = FT_HAS_KERNING(font->face) && font->kerning; @@ -1177,7 +1177,7 @@ TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unuse first = true; xstart = 0; while (textlen > 0) { - uint16 c = UTF8_getch(&text, &textlen); + uint16_t c = UTF8_getch(&text, &textlen); if (c == UNICODE_BOM_NATIVE || c == UNICODE_BOM_SWAPPED) { continue; } @@ -1217,7 +1217,7 @@ TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unuse if ((signed)row + glyph->yoffset >= textbuf->h) { continue; } - dst = (uint8*)textbuf->pixels + + dst = (uint8_t*)textbuf->pixels + (row + glyph->yoffset) * textbuf->pitch + xstart + glyph->minx; src = current->buffer + row * current->pitch; @@ -1248,16 +1248,16 @@ TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unuse return textbuf; } -TTFSurface* TTF_RenderUTF8_Shaded(TTF_Font* font, const char* text, [[maybe_unused]] uint32 fg, [[maybe_unused]] uint32 bg) +TTFSurface* TTF_RenderUTF8_Shaded(TTF_Font* font, const char* text, [[maybe_unused]] uint32_t fg, [[maybe_unused]] uint32_t bg) { bool first; int xstart; int width; int height; TTFSurface* textbuf; - uint8* src; - uint8* dst; - uint8* dst_check; + uint8_t* src; + uint8_t* dst; + uint8_t* dst_check; unsigned int row, col; FT_Bitmap* current; c_glyph *glyph; @@ -1288,7 +1288,7 @@ TTFSurface* TTF_RenderUTF8_Shaded(TTF_Font* font, const char* text, [[maybe_unus /* Adding bound checking to avoid all kinds of memory corruption errors that may occur. */ - dst_check = (uint8*) textbuf->pixels + textbuf->pitch * textbuf->h; + dst_check = (uint8_t*) textbuf->pixels + textbuf->pitch * textbuf->h; /* check kerning */ use_kerning = FT_HAS_KERNING(font->face) && font->kerning; @@ -1299,7 +1299,7 @@ TTFSurface* TTF_RenderUTF8_Shaded(TTF_Font* font, const char* text, [[maybe_unus xstart = 0; while (textlen > 0) { - uint16 c = UTF8_getch(&text, &textlen); + uint16_t c = UTF8_getch(&text, &textlen); if (c == UNICODE_BOM_NATIVE || c == UNICODE_BOM_SWAPPED) { continue; @@ -1352,7 +1352,7 @@ TTFSurface* TTF_RenderUTF8_Shaded(TTF_Font* font, const char* text, [[maybe_unus continue; } - dst = (uint8*) textbuf->pixels + + dst = (uint8_t*) textbuf->pixels + (row+glyph->yoffset) * textbuf->pitch + xstart + glyph->minx; src = current->buffer + row * current->pitch; diff --git a/src/openrct2/drawing/Text.cpp b/src/openrct2/drawing/Text.cpp index 13900aff5b..dcb41a4427 100644 --- a/src/openrct2/drawing/Text.cpp +++ b/src/openrct2/drawing/Text.cpp @@ -14,15 +14,15 @@ static TextPaint _legacyPaint; -static void DrawText(rct_drawpixelinfo * dpi, sint32 x, sint32 y, TextPaint * paint, const_utf8string text); -static void DrawText(rct_drawpixelinfo * dpi, sint32 x, sint32 y, TextPaint * paint, rct_string_id format, void * args); +static void DrawText(rct_drawpixelinfo * dpi, int32_t x, int32_t y, TextPaint * paint, const_utf8string text); +static void DrawText(rct_drawpixelinfo * dpi, int32_t x, int32_t y, TextPaint * paint, rct_string_id format, void * args); -StaticLayout::StaticLayout(utf8string source, TextPaint paint, sint32 width) +StaticLayout::StaticLayout(utf8string source, TextPaint paint, int32_t width) { _buffer = source; _paint = paint; - sint32 fontSpriteBase; + int32_t fontSpriteBase; gCurrentFontSpriteBase = paint.SpriteBase; _maxWidth = gfx_wrap_string(_buffer, width, &_lineCount, &fontSpriteBase); @@ -30,7 +30,7 @@ StaticLayout::StaticLayout(utf8string source, TextPaint paint, sint32 width) _lineHeight = font_get_line_height(fontSpriteBase); } -void StaticLayout::Draw(rct_drawpixelinfo * dpi, sint32 x, sint32 y) +void StaticLayout::Draw(rct_drawpixelinfo * dpi, int32_t x, int32_t y) { gCurrentFontFlags = 0; gCurrentFontSpriteBase = _paint.SpriteBase; @@ -38,8 +38,8 @@ void StaticLayout::Draw(rct_drawpixelinfo * dpi, sint32 x, sint32 y) TextPaint tempPaint = _paint; gCurrentFontFlags = 0; - sint32 lineY = y; - sint32 lineX = x; + int32_t lineY = y; + int32_t lineX = x; switch (_paint.Alignment) { case TextAlignment::LEFT: lineX = x; @@ -52,7 +52,7 @@ void StaticLayout::Draw(rct_drawpixelinfo * dpi, sint32 x, sint32 y) break; } utf8 * buffer = _buffer; - for (sint32 line = 0; line < _lineCount; ++line) + for (int32_t line = 0; line < _lineCount; ++line) { DrawText(dpi, lineX, lineY, &tempPaint, buffer); tempPaint.Colour = TEXT_COLOUR_254; @@ -61,24 +61,24 @@ void StaticLayout::Draw(rct_drawpixelinfo * dpi, sint32 x, sint32 y) } } -sint32 StaticLayout::GetHeight() +int32_t StaticLayout::GetHeight() { return _lineHeight * _lineCount; } -sint32 StaticLayout::GetWidth() +int32_t StaticLayout::GetWidth() { return _maxWidth; } -sint32 StaticLayout::GetLineCount() +int32_t StaticLayout::GetLineCount() { return _lineCount; } -static void DrawText(rct_drawpixelinfo * dpi, sint32 x, sint32 y, TextPaint * paint, const_utf8string text) +static void DrawText(rct_drawpixelinfo * dpi, int32_t x, int32_t y, TextPaint * paint, const_utf8string text) { - sint32 width = gfx_get_string_width(text); + int32_t width = gfx_get_string_width(text); switch (paint->Alignment) { case TextAlignment::LEFT: @@ -103,14 +103,14 @@ static void DrawText(rct_drawpixelinfo * dpi, sint32 x, sint32 y, TextPaint * pa } } -static void DrawText(rct_drawpixelinfo * dpi, sint32 x, sint32 y, TextPaint * paint, rct_string_id format, void * args) +static void DrawText(rct_drawpixelinfo * dpi, int32_t x, int32_t y, TextPaint * paint, rct_string_id format, void * args) { utf8 buffer[256]; format_string(buffer, sizeof(buffer), format, args); DrawText(dpi, x, y, paint, buffer); } -static void DrawTextCompat(rct_drawpixelinfo * dpi, sint32 x, sint32 y, rct_string_id format, void * args, uint8 colour, +static void DrawTextCompat(rct_drawpixelinfo * dpi, int32_t x, int32_t y, rct_string_id format, void * args, uint8_t colour, TextAlignment alignment, bool underline = false) { _legacyPaint.UnderlineText = underline; @@ -121,8 +121,8 @@ static void DrawTextCompat(rct_drawpixelinfo * dpi, sint32 x, sint32 y, rct_stri DrawText(dpi, x, y, &_legacyPaint, format, args); } -static void DrawTextEllipsisedCompat(rct_drawpixelinfo * dpi, sint32 x, sint32 y, sint32 width, rct_string_id format, void * args, - uint8 colour, +static void DrawTextEllipsisedCompat(rct_drawpixelinfo * dpi, int32_t x, int32_t y, int32_t width, rct_string_id format, void * args, + uint8_t colour, TextAlignment alignment, bool underline = false) { _legacyPaint.UnderlineText = underline; @@ -138,7 +138,7 @@ static void DrawTextEllipsisedCompat(rct_drawpixelinfo * dpi, sint32 x, sint32 y DrawText(dpi, x, y, &_legacyPaint, buffer); } -void gfx_draw_string(rct_drawpixelinfo *dpi, const_utf8string buffer, uint8 colour, sint32 x, sint32 y) +void gfx_draw_string(rct_drawpixelinfo *dpi, const_utf8string buffer, uint8_t colour, int32_t x, int32_t y) { _legacyPaint.UnderlineText = false; _legacyPaint.Colour = colour; @@ -148,55 +148,55 @@ void gfx_draw_string(rct_drawpixelinfo *dpi, const_utf8string buffer, uint8 colo } // Basic -void gfx_draw_string_left(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y) +void gfx_draw_string_left(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y) { DrawTextCompat(dpi, x, y, format, args, colour, TextAlignment::LEFT); } -void gfx_draw_string_centred(rct_drawpixelinfo * dpi, rct_string_id format, sint32 x, sint32 y, uint8 colour, void * args) +void gfx_draw_string_centred(rct_drawpixelinfo * dpi, rct_string_id format, int32_t x, int32_t y, uint8_t colour, void * args) { DrawTextCompat(dpi, x, y, format, args, colour, TextAlignment::CENTRE); } -void gfx_draw_string_right(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y) +void gfx_draw_string_right(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y) { DrawTextCompat(dpi, x, y, format, args, colour, TextAlignment::RIGHT); } // Underline -void draw_string_left_underline(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y) +void draw_string_left_underline(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y) { DrawTextCompat(dpi, x, y, format, args, colour, TextAlignment::LEFT, true); } -void draw_string_centred_underline(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y) +void draw_string_centred_underline(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y) { DrawTextCompat(dpi, x, y, format, args, colour, TextAlignment::CENTRE, true); } -void draw_string_right_underline(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y) +void draw_string_right_underline(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y) { DrawTextCompat(dpi, x, y, format, args, colour, TextAlignment::RIGHT, true); } // Ellipsised -void gfx_draw_string_left_clipped(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y, sint32 width) +void gfx_draw_string_left_clipped(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y, int32_t width) { DrawTextEllipsisedCompat(dpi, x, y, width, format, args, colour, TextAlignment::LEFT); } -void gfx_draw_string_centred_clipped(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y, sint32 width) +void gfx_draw_string_centred_clipped(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y, int32_t width) { DrawTextEllipsisedCompat(dpi, x, y, width, format, args, colour, TextAlignment::CENTRE); } -void gfx_draw_string_right_clipped(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8 colour, sint32 x, sint32 y, sint32 width) +void gfx_draw_string_right_clipped(rct_drawpixelinfo * dpi, rct_string_id format, void * args, uint8_t colour, int32_t x, int32_t y, int32_t width) { DrawTextEllipsisedCompat(dpi, x, y, width, format, args, colour, TextAlignment::RIGHT); } // Wrapping -sint32 gfx_draw_string_left_wrapped(rct_drawpixelinfo * dpi, void * args, sint32 x, sint32 y, sint32 width, rct_string_id format, uint8 colour) +int32_t gfx_draw_string_left_wrapped(rct_drawpixelinfo * dpi, void * args, int32_t x, int32_t y, int32_t width, rct_string_id format, uint8_t colour) { utf8 buffer[256]; format_string(buffer, sizeof(buffer), format, args); @@ -214,7 +214,7 @@ sint32 gfx_draw_string_left_wrapped(rct_drawpixelinfo * dpi, void * args, sint32 return layout.GetHeight(); } -sint32 gfx_draw_string_centred_wrapped(rct_drawpixelinfo * dpi, void * args, sint32 x, sint32 y, sint32 width, rct_string_id format, uint8 colour) +int32_t gfx_draw_string_centred_wrapped(rct_drawpixelinfo * dpi, void * args, int32_t x, int32_t y, int32_t width, rct_string_id format, uint8_t colour) { utf8 buffer[256]; format_string(buffer, sizeof(buffer), format, args); @@ -229,9 +229,9 @@ sint32 gfx_draw_string_centred_wrapped(rct_drawpixelinfo * dpi, void * args, sin StaticLayout layout(buffer, _legacyPaint, width); // The original tried to vertically centre the text, but used line count - 1 - sint32 lineCount = layout.GetLineCount(); - sint32 lineHeight = layout.GetHeight() / lineCount; - sint32 yOffset = (lineCount - 1) * lineHeight / 2; + int32_t lineCount = layout.GetLineCount(); + int32_t lineHeight = layout.GetHeight() / lineCount; + int32_t yOffset = (lineCount - 1) * lineHeight / 2; layout.Draw(dpi, x - layout.GetWidth() / 2, y - yOffset); diff --git a/src/openrct2/drawing/Text.h b/src/openrct2/drawing/Text.h index 716a7f3c34..219e66a041 100644 --- a/src/openrct2/drawing/Text.h +++ b/src/openrct2/drawing/Text.h @@ -22,8 +22,8 @@ enum class TextAlignment struct TextPaint { - uint8 Colour = 0; - sint16 SpriteBase = 0; + uint8_t Colour = 0; + int16_t SpriteBase = 0; bool UnderlineText = false; TextAlignment Alignment = TextAlignment::LEFT; }; @@ -33,17 +33,17 @@ class StaticLayout private: utf8string _buffer; TextPaint _paint; - sint32 _lineCount = 0; - sint32 _lineHeight; - sint32 _maxWidth; + int32_t _lineCount = 0; + int32_t _lineHeight; + int32_t _maxWidth; StaticLayout(); StaticLayout(const StaticLayout &); public: - StaticLayout(utf8string source, TextPaint paint, sint32 width); - void Draw(rct_drawpixelinfo * dpi, sint32 x, sint32 y); - sint32 GetHeight(); - sint32 GetWidth(); - sint32 GetLineCount(); + StaticLayout(utf8string source, TextPaint paint, int32_t width); + void Draw(rct_drawpixelinfo * dpi, int32_t x, int32_t y); + int32_t GetHeight(); + int32_t GetWidth(); + int32_t GetLineCount(); }; diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index eb6bd0eb02..f9d58b7c05 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -45,10 +45,10 @@ void X8RainDrawer::SetDPI(rct_drawpixelinfo * dpi) _screenDPI = dpi; } -void X8RainDrawer::Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 xStart, sint32 yStart) +void X8RainDrawer::Draw(int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart) { // clang-format off - static constexpr const uint8 RainPattern[] = + static constexpr const uint8_t RainPattern[] = { 32, 32, 0, 12, 0, 14, 0, 16, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, @@ -57,36 +57,36 @@ void X8RainDrawer::Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 }; // clang-format on - const uint8 * pattern = RainPattern; - uint8 patternXSpace = *pattern++; - uint8 patternYSpace = *pattern++; + const uint8_t * pattern = RainPattern; + uint8_t patternXSpace = *pattern++; + uint8_t patternYSpace = *pattern++; - uint8 patternStartXOffset = xStart % patternXSpace; - uint8 patternStartYOffset = yStart % patternYSpace; + uint8_t patternStartXOffset = xStart % patternXSpace; + uint8_t patternStartYOffset = yStart % patternYSpace; - uint32 pixelOffset = (_screenDPI->pitch + _screenDPI->width) * y + x; - uint8 patternYPos = patternStartYOffset % patternYSpace; + uint32_t pixelOffset = (_screenDPI->pitch + _screenDPI->width) * y + x; + uint8_t patternYPos = patternStartYOffset % patternYSpace; - uint8 * screenBits = _screenDPI->bits; + uint8_t * screenBits = _screenDPI->bits; //Stores the colours of changed pixels RainPixel * newPixels = &_rainPixels[_rainPixelsCount]; for (; height != 0; height--) { - uint8 patternX = pattern[patternYPos * 2]; + uint8_t patternX = pattern[patternYPos * 2]; if (patternX != 0xFF) { - if (_rainPixelsCount < (_rainPixelsCapacity - (uint32)width)) + if (_rainPixelsCount < (_rainPixelsCapacity - (uint32_t)width)) { - uint32 finalPixelOffset = width + pixelOffset; + uint32_t finalPixelOffset = width + pixelOffset; - uint32 xPixelOffset = pixelOffset; - xPixelOffset += ((uint8)(patternX - patternStartXOffset)) % patternXSpace; + uint32_t xPixelOffset = pixelOffset; + xPixelOffset += ((uint8_t)(patternX - patternStartXOffset)) % patternXSpace; - uint8 patternPixel = pattern[patternYPos * 2 + 1]; + uint8_t patternPixel = pattern[patternYPos * 2 + 1]; for (; xPixelOffset < finalPixelOffset; xPixelOffset += patternXSpace) { - uint8 current_pixel = screenBits[xPixelOffset]; + uint8_t current_pixel = screenBits[xPixelOffset]; screenBits[xPixelOffset] = patternPixel; _rainPixelsCount++; @@ -106,9 +106,9 @@ void X8RainDrawer::Restore() { if (_rainPixelsCount > 0) { - uint32 numPixels = (_screenDPI->width + _screenDPI->pitch) * _screenDPI->height; - uint8 * bits = _screenDPI->bits; - for (uint32 i = 0; i < _rainPixelsCount; i++) + uint32_t numPixels = (_screenDPI->width + _screenDPI->pitch) * _screenDPI->height; + uint8_t * bits = _screenDPI->bits; + for (uint32_t i = 0; i < _rainPixelsCount; i++) { RainPixel rainPixel = _rainPixels[i]; if (rainPixel.Position >= numPixels) @@ -148,9 +148,9 @@ void X8DrawingEngine::Initialise() { } -void X8DrawingEngine::Resize(uint32 width, uint32 height) +void X8DrawingEngine::Resize(uint32_t width, uint32_t height) { - uint32 pitch = width; + uint32_t pitch = width; ConfigureBits(width, height, pitch); } @@ -163,12 +163,12 @@ void X8DrawingEngine::SetVSync([[maybe_unused]] bool vsync) // Not applicable for this engine } -void X8DrawingEngine::Invalidate(sint32 left, sint32 top, sint32 right, sint32 bottom) +void X8DrawingEngine::Invalidate(int32_t left, int32_t top, int32_t right, int32_t bottom) { left = std::max(left, 0); top = std::max(top, 0); - right = std::min(right, (sint32)_width); - bottom = std::min(bottom, (sint32)_height); + right = std::min(right, (int32_t)_width); + bottom = std::min(bottom, (int32_t)_height); if (left >= right) return; if (top >= bottom) return; @@ -181,12 +181,12 @@ void X8DrawingEngine::Invalidate(sint32 left, sint32 top, sint32 right, sint32 b top >>= _dirtyGrid.BlockShiftY; bottom >>= _dirtyGrid.BlockShiftY; - uint32 dirtyBlockColumns = _dirtyGrid.BlockColumns; - uint8 * screenDirtyBlocks = _dirtyGrid.Blocks; - for (sint16 y = top; y <= bottom; y++) + uint32_t dirtyBlockColumns = _dirtyGrid.BlockColumns; + uint8_t * screenDirtyBlocks = _dirtyGrid.Blocks; + for (int16_t y = top; y <= bottom; y++) { - uint32 yOffset = y * dirtyBlockColumns; - for (sint16 x = left; x <= right; x++) + uint32_t yOffset = y * dirtyBlockColumns; + for (int16_t x = left; x <= right; x++) { screenDirtyBlocks[yOffset + x] = 0xFF; } @@ -232,7 +232,7 @@ void X8DrawingEngine::PaintRain() DrawRain(&_bitsDPI, &_rainDrawer); } -void X8DrawingEngine::CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) +void X8DrawingEngine::CopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) { if (dx == 0 && dy == 0) return; @@ -241,18 +241,18 @@ void X8DrawingEngine::CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, // NOTE: when zooming, there can be x, y, dx, dy combinations that go off the // screen; hence the checks. This code should ultimately not be called when // zooming because this function is specific to updating the screen on move - sint32 lmargin = std::min(x - dx, 0); - sint32 rmargin = std::min((sint32)_width - (x - dx + width), 0); - sint32 tmargin = std::min(y - dy, 0); - sint32 bmargin = std::min((sint32)_height - (y - dy + height), 0); + int32_t lmargin = std::min(x - dx, 0); + int32_t rmargin = std::min((int32_t)_width - (x - dx + width), 0); + int32_t tmargin = std::min(y - dy, 0); + int32_t bmargin = std::min((int32_t)_height - (y - dy + height), 0); x -= lmargin; y -= tmargin; width += lmargin + rmargin; height += tmargin + bmargin; - sint32 stride = _bitsDPI.width + _bitsDPI.pitch; - uint8 * to = _bitsDPI.bits + y * stride + x; - uint8 * from = _bitsDPI.bits + (y - dy) * stride + x - dx; + int32_t stride = _bitsDPI.width + _bitsDPI.pitch; + uint8_t * to = _bitsDPI.bits + y * stride + x; + uint8_t * from = _bitsDPI.bits + (y - dy) * stride + x - dx; if (dy > 0) { @@ -263,7 +263,7 @@ void X8DrawingEngine::CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, } // Move bytes - for (sint32 i = 0; i < height; i++) + for (int32_t i = 0; i < height; i++) { memmove(to, from, width); to += stride; @@ -271,7 +271,7 @@ void X8DrawingEngine::CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, } } -sint32 X8DrawingEngine::Screenshot() +int32_t X8DrawingEngine::Screenshot() { return screenshot_dump_png(&_bitsDPI); } @@ -292,7 +292,7 @@ DRAWING_ENGINE_FLAGS X8DrawingEngine::GetFlags() return DEF_DIRTY_OPTIMISATIONS; } -void X8DrawingEngine::InvalidateImage([[maybe_unused]] uint32 image) +void X8DrawingEngine::InvalidateImage([[maybe_unused]] uint32_t image) { // Not applicable for this engine } @@ -302,10 +302,10 @@ rct_drawpixelinfo * X8DrawingEngine::GetDPI() return &_bitsDPI; } -void X8DrawingEngine::ConfigureBits(uint32 width, uint32 height, uint32 pitch) +void X8DrawingEngine::ConfigureBits(uint32_t width, uint32_t height, uint32_t pitch) { size_t newBitsSize = pitch * height; - uint8 * newBits = new uint8[newBitsSize]; + uint8_t * newBits = new uint8_t[newBitsSize]; if (_bits == nullptr) { std::fill_n(newBits, newBitsSize, 0); @@ -318,12 +318,12 @@ void X8DrawingEngine::ConfigureBits(uint32 width, uint32 height, uint32 pitch) } else { - uint8 * src = _bits; - uint8 * dst = newBits; + uint8_t * src = _bits; + uint8_t * dst = newBits; - uint32 minWidth = std::min(_width, width); - uint32 minHeight = std::min(_height, height); - for (uint32 y = 0; y < minHeight; y++) + uint32_t minWidth = std::min(_width, width); + uint32_t minHeight = std::min(_height, height); + for (uint32_t y = 0; y < minHeight; y++) { std::copy_n(src, minWidth, dst); if (pitch - minWidth > 0) @@ -362,7 +362,7 @@ void X8DrawingEngine::ConfigureBits(uint32 width, uint32 height, uint32 pitch) } void X8DrawingEngine::OnDrawDirtyBlock( - [[maybe_unused]] uint32 x, [[maybe_unused]] uint32 y, [[maybe_unused]] uint32 columns, [[maybe_unused]] uint32 rows) + [[maybe_unused]] uint32_t x, [[maybe_unused]] uint32_t y, [[maybe_unused]] uint32_t columns, [[maybe_unused]] uint32_t rows) { } @@ -376,27 +376,27 @@ void X8DrawingEngine::ConfigureDirtyGrid() _dirtyGrid.BlockRows = (_height >> _dirtyGrid.BlockShiftY) + 1; delete [] _dirtyGrid.Blocks; - _dirtyGrid.Blocks = new uint8[_dirtyGrid.BlockColumns * _dirtyGrid.BlockRows]; + _dirtyGrid.Blocks = new uint8_t[_dirtyGrid.BlockColumns * _dirtyGrid.BlockRows]; } void X8DrawingEngine::DrawAllDirtyBlocks() { - uint32 dirtyBlockColumns = _dirtyGrid.BlockColumns; - uint32 dirtyBlockRows = _dirtyGrid.BlockRows; - uint8 * dirtyBlocks = _dirtyGrid.Blocks; + uint32_t dirtyBlockColumns = _dirtyGrid.BlockColumns; + uint32_t dirtyBlockRows = _dirtyGrid.BlockRows; + uint8_t * dirtyBlocks = _dirtyGrid.Blocks; - for (uint32 x = 0; x < dirtyBlockColumns; x++) + for (uint32_t x = 0; x < dirtyBlockColumns; x++) { - for (uint32 y = 0; y < dirtyBlockRows; y++) + for (uint32_t y = 0; y < dirtyBlockRows; y++) { - uint32 yOffset = y * dirtyBlockColumns; + uint32_t yOffset = y * dirtyBlockColumns; if (dirtyBlocks[yOffset + x] == 0) { continue; } // Determine columns - uint32 xx; + uint32_t xx; for (xx = x; xx < dirtyBlockColumns; xx++) { if (dirtyBlocks[yOffset + xx] == 0) @@ -404,13 +404,13 @@ void X8DrawingEngine::DrawAllDirtyBlocks() break; } } - uint32 columns = xx - x; + uint32_t columns = xx - x; // Check rows - uint32 yy; + uint32_t yy; for (yy = y; yy < dirtyBlockRows; yy++) { - uint32 yyOffset = yy * dirtyBlockColumns; + uint32_t yyOffset = yy * dirtyBlockColumns; for (xx = x; xx < x + columns; xx++) { if (dirtyBlocks[yyOffset + xx] == 0) @@ -421,32 +421,32 @@ void X8DrawingEngine::DrawAllDirtyBlocks() } endRowCheck: - uint32 rows = yy - y; + uint32_t rows = yy - y; DrawDirtyBlocks(x, y, columns, rows); } } } -void X8DrawingEngine::DrawDirtyBlocks(uint32 x, uint32 y, uint32 columns, uint32 rows) +void X8DrawingEngine::DrawDirtyBlocks(uint32_t x, uint32_t y, uint32_t columns, uint32_t rows) { - uint32 dirtyBlockColumns = _dirtyGrid.BlockColumns; - uint8 * screenDirtyBlocks = _dirtyGrid.Blocks; + uint32_t dirtyBlockColumns = _dirtyGrid.BlockColumns; + uint8_t * screenDirtyBlocks = _dirtyGrid.Blocks; // Unset dirty blocks - for (uint32 top = y; top < y + rows; top++) + for (uint32_t top = y; top < y + rows; top++) { - uint32 topOffset = top * dirtyBlockColumns; - for (uint32 left = x; left < x + columns; left++) + uint32_t topOffset = top * dirtyBlockColumns; + for (uint32_t left = x; left < x + columns; left++) { screenDirtyBlocks[topOffset + left] = 0; } } // Determine region in pixels - uint32 left = std::max(0, x * _dirtyGrid.BlockWidth); - uint32 top = std::max(0, y * _dirtyGrid.BlockHeight); - uint32 right = std::min(_width, left + (columns * _dirtyGrid.BlockWidth)); - uint32 bottom = std::min(_height, top + (rows * _dirtyGrid.BlockHeight)); + uint32_t left = std::max(0, x * _dirtyGrid.BlockWidth); + uint32_t top = std::max(0, y * _dirtyGrid.BlockHeight); + uint32_t right = std::min(_width, left + (columns * _dirtyGrid.BlockWidth)); + uint32_t bottom = std::min(_height, top + (rows * _dirtyGrid.BlockHeight)); if (right <= left || bottom <= top) { return; @@ -471,15 +471,15 @@ IDrawingEngine * X8DrawingContext::GetEngine() return _engine; } -void X8DrawingContext::Clear(uint8 paletteIndex) +void X8DrawingContext::Clear(uint8_t paletteIndex) { rct_drawpixelinfo * dpi = _dpi; - sint32 w = dpi->width >> dpi->zoom_level; - sint32 h = dpi->height >> dpi->zoom_level; - uint8 * ptr = dpi->bits; + int32_t w = dpi->width >> dpi->zoom_level; + int32_t h = dpi->height >> dpi->zoom_level; + uint8_t * ptr = dpi->bits; - for (sint32 y = 0; y < h; y++) + for (int32_t y = 0; y < h; y++) { std::fill_n(ptr, w, paletteIndex); ptr += w + dpi->pitch; @@ -488,7 +488,7 @@ void X8DrawingContext::Clear(uint8 paletteIndex) /** rct2: 0x0097FF04 */ // clang-format off -static constexpr const uint16 Pattern[] = { +static constexpr const uint16_t Pattern[] = { 0b0111111110000000, 0b0011111111000000, 0b0001111111100000, @@ -508,7 +508,7 @@ static constexpr const uint16 Pattern[] = { }; /** rct2: 0x0097FF14 */ -static constexpr const uint16 PatternInverse[] = { +static constexpr const uint16_t PatternInverse[] = { 0b1000000001111111, 0b1100000000111111, 0b1110000000011111, @@ -528,13 +528,13 @@ static constexpr const uint16 PatternInverse[] = { }; /** rct2: 0x0097FEFC */ -static constexpr const uint16 * Patterns[] = { +static constexpr const uint16_t * Patterns[] = { Pattern, PatternInverse }; // clang-format on -void X8DrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint32 right, sint32 bottom) +void X8DrawingContext::FillRect(uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) { rct_drawpixelinfo * dpi = _dpi; @@ -545,45 +545,45 @@ void X8DrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint32 r if (bottom < dpi->y) return; if (top >= dpi->y + dpi->height) return; - uint16 crossPattern = 0; + uint16_t crossPattern = 0; - sint32 startX = left - dpi->x; + int32_t startX = left - dpi->x; if (startX < 0) { crossPattern ^= startX; startX = 0; } - sint32 endX = right - dpi->x + 1; + int32_t endX = right - dpi->x + 1; if (endX > dpi->width) { endX = dpi->width; } - sint32 startY = top - dpi->y; + int32_t startY = top - dpi->y; if (startY < 0) { crossPattern ^= startY; startY = 0; } - sint32 endY = bottom - dpi->y + 1; + int32_t endY = bottom - dpi->y + 1; if (endY > dpi->height) { endY = dpi->height; } - sint32 width = endX - startX; - sint32 height = endY - startY; + int32_t width = endX - startX; + int32_t height = endY - startY; if (colour & 0x1000000) { // Cross hatching - uint8 * dst = (startY * (dpi->width + dpi->pitch)) + startX + dpi->bits; - for (sint32 i = 0; i < height; i++) + uint8_t * dst = (startY * (dpi->width + dpi->pitch)) + startX + dpi->bits; + for (int32_t i = 0; i < height; i++) { - uint8 * nextdst = dst + dpi->width + dpi->pitch; - uint32 p = ror32(crossPattern, 1); + uint8_t * nextdst = dst + dpi->width + dpi->pitch; + uint32_t p = ror32(crossPattern, 1); p = (p & 0xFFFF0000) | width; // Fill every other pixel with the colour @@ -606,25 +606,25 @@ void X8DrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint32 r } else if (colour & 0x4000000) { - uint8 * dst = startY * (dpi->width + dpi->pitch) + startX + dpi->bits; + uint8_t * dst = startY * (dpi->width + dpi->pitch) + startX + dpi->bits; // The pattern loops every 15 lines this is which // part the pattern is on. - sint32 patternY = (startY + dpi->y) % 16; + int32_t patternY = (startY + dpi->y) % 16; // The pattern loops every 15 pixels this is which // part the pattern is on. - sint32 startPatternX = (startX + dpi->x) % 16; - sint32 patternX = startPatternX; + int32_t startPatternX = (startX + dpi->x) % 16; + int32_t patternX = startPatternX; - const uint16 * patternsrc = Patterns[colour >> 28]; // or possibly uint8)[esi*4] ? + const uint16_t * patternsrc = Patterns[colour >> 28]; // or possibly uint8_t)[esi*4] ? - for (sint32 numLines = height; numLines > 0; numLines--) + for (int32_t numLines = height; numLines > 0; numLines--) { - uint8 * nextdst = dst + dpi->width + dpi->pitch; - uint16 pattern = patternsrc[patternY]; + uint8_t * nextdst = dst + dpi->width + dpi->pitch; + uint16_t pattern = patternsrc[patternY]; - for (sint32 numPixels = width; numPixels > 0; numPixels--) + for (int32_t numPixels = width; numPixels > 0; numPixels--) { if (pattern & (1 << patternX)) { @@ -640,8 +640,8 @@ void X8DrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint32 r } else { - uint8 * dst = startY * (dpi->width + dpi->pitch) + startX + dpi->bits; - for (sint32 i = 0; i < height; i++) + uint8_t * dst = startY * (dpi->width + dpi->pitch) + startX + dpi->bits; + for (int32_t i = 0; i < height; i++) { std::fill_n(dst, width, colour & 0xFF); dst += dpi->width + dpi->pitch; @@ -649,7 +649,7 @@ void X8DrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint32 r } } -void X8DrawingContext::FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) +void X8DrawingContext::FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) { rct_drawpixelinfo * dpi = _dpi; @@ -660,53 +660,53 @@ void X8DrawingContext::FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 if (bottom < dpi->y) return; if (top >= dpi->y + dpi->height) return; - sint32 startX = left - dpi->x; + int32_t startX = left - dpi->x; if (startX < 0) { startX = 0; } - sint32 endX = right - dpi->x + 1; + int32_t endX = right - dpi->x + 1; if (endX > dpi->width) { endX = dpi->width; } - sint32 startY = top - dpi->y; + int32_t startY = top - dpi->y; if (startY < 0) { startY = 0; } - sint32 endY = bottom - dpi->y + 1; + int32_t endY = bottom - dpi->y + 1; if (endY > dpi->height) { endY = dpi->height; } - sint32 width = endX - startX; - sint32 height = endY - startY; + int32_t width = endX - startX; + int32_t height = endY - startY; //0x2000000 // 00678B7E 00678C83 // Location in screen buffer? - uint8 * dst = dpi->bits + (uint32)((startY >> (dpi->zoom_level)) * ((dpi->width >> dpi->zoom_level) + dpi->pitch) + (startX >> dpi->zoom_level)); + uint8_t * dst = dpi->bits + (uint32_t)((startY >> (dpi->zoom_level)) * ((dpi->width >> dpi->zoom_level) + dpi->pitch) + (startX >> dpi->zoom_level)); // Find colour in colour table? - uint16 g1Index = palette_to_g1_offset[palette]; + uint16_t g1Index = palette_to_g1_offset[palette]; auto g1Element = gfx_get_g1_element(g1Index); if (g1Element != nullptr) { auto g1Bits = g1Element->offset; - const sint32 scaled_width = width >> dpi->zoom_level; - const sint32 step = ((dpi->width >> dpi->zoom_level) + dpi->pitch); + const int32_t scaled_width = width >> dpi->zoom_level; + const int32_t step = ((dpi->width >> dpi->zoom_level) + dpi->pitch); // Fill the rectangle with the colours from the colour table - for (sint32 i = 0; i < height >> dpi->zoom_level; i++) + for (int32_t i = 0; i < height >> dpi->zoom_level; i++) { - uint8 * nextdst = dst + step * i; - for (sint32 j = 0; j < scaled_width; j++) + uint8_t * nextdst = dst + step * i; + for (int32_t j = 0; j < scaled_width; j++) { *(nextdst + j) = g1Bits[*(nextdst + j)]; } @@ -714,24 +714,24 @@ void X8DrawingContext::FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 } } -void X8DrawingContext::DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) +void X8DrawingContext::DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) { gfx_draw_line_software(_dpi, x1, y1, x2, y2, colour); } -void X8DrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) +void X8DrawingContext::DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) { gfx_draw_sprite_software(_dpi, image, x, y, tertiaryColour); } -void X8DrawingContext::DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) +void X8DrawingContext::DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) { gfx_draw_sprite_raw_masked_software(_dpi, x, y, maskImage, colourImage); } -void X8DrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) +void X8DrawingContext::DrawSpriteSolid(uint32_t image, int32_t x, int32_t y, uint8_t colour) { - uint8 palette[256]; + uint8_t palette[256]; memset(palette, colour, 256); palette[0] = 0; @@ -739,7 +739,7 @@ void X8DrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 c gfx_draw_sprite_palette_set_software(_dpi, image | IMAGE_TYPE_REMAP, x, y, palette, nullptr); } -void X8DrawingContext::DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) +void X8DrawingContext::DrawGlyph(uint32_t image, int32_t x, int32_t y, uint8_t * palette) { gfx_draw_sprite_palette_set_software(_dpi, image, x, y, palette, nullptr); } diff --git a/src/openrct2/drawing/X8DrawingEngine.h b/src/openrct2/drawing/X8DrawingEngine.h index 876764c658..ee0c744b26 100644 --- a/src/openrct2/drawing/X8DrawingEngine.h +++ b/src/openrct2/drawing/X8DrawingEngine.h @@ -26,13 +26,13 @@ namespace OpenRCT2 struct DirtyGrid { - uint32 BlockShiftX; - uint32 BlockShiftY; - uint32 BlockWidth; - uint32 BlockHeight; - uint32 BlockColumns; - uint32 BlockRows; - uint8 * Blocks; + uint32_t BlockShiftX; + uint32_t BlockShiftY; + uint32_t BlockWidth; + uint32_t BlockHeight; + uint32_t BlockColumns; + uint32_t BlockRows; + uint8_t * Blocks; }; class X8RainDrawer final : public IRainDrawer @@ -40,14 +40,14 @@ namespace OpenRCT2 private: struct RainPixel { - uint32 Position; - uint8 Colour; + uint32_t Position; + uint8_t Colour; }; - static constexpr uint32 MaxRainPixels = 0xFFFE; + static constexpr uint32_t MaxRainPixels = 0xFFFE; size_t _rainPixelsCapacity = MaxRainPixels; - uint32 _rainPixelsCount = 0; + uint32_t _rainPixelsCount = 0; RainPixel * _rainPixels = nullptr; rct_drawpixelinfo * _screenDPI = nullptr; @@ -55,7 +55,7 @@ namespace OpenRCT2 X8RainDrawer(); ~X8RainDrawer(); void SetDPI(rct_drawpixelinfo * dpi); - void Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 xStart, sint32 yStart) override; + void Draw(int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart) override; void Restore(); }; @@ -66,11 +66,11 @@ namespace OpenRCT2 class X8DrawingEngine : public IDrawingEngine { protected: - uint32 _width = 0; - uint32 _height = 0; - uint32 _pitch = 0; + uint32_t _width = 0; + uint32_t _height = 0; + uint32_t _pitch = 0; size_t _bitsSize = 0; - uint8 * _bits = nullptr; + uint8_t * _bits = nullptr; DirtyGrid _dirtyGrid = {}; @@ -88,32 +88,32 @@ namespace OpenRCT2 ~X8DrawingEngine() override; void Initialise() override; - void Resize(uint32 width, uint32 height) override; + void Resize(uint32_t width, uint32_t height) override; void SetPalette(const rct_palette_entry * palette) override; void SetVSync(bool vsync) override; - void Invalidate(sint32 left, sint32 top, sint32 right, sint32 bottom) override; + void Invalidate(int32_t left, int32_t top, int32_t right, int32_t bottom) override; void BeginDraw() override; void EndDraw() override; void PaintWindows() override; void PaintRain() override; - void CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) override; - sint32 Screenshot() override; + void CopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) override; + int32_t Screenshot() override; IDrawingContext * GetDrawingContext(rct_drawpixelinfo * dpi) override; rct_drawpixelinfo * GetDrawingPixelInfo() override; DRAWING_ENGINE_FLAGS GetFlags() override; - void InvalidateImage(uint32 image) override; + void InvalidateImage(uint32_t image) override; rct_drawpixelinfo * GetDPI(); protected: - void ConfigureBits(uint32 width, uint32 height, uint32 pitch); - virtual void OnDrawDirtyBlock(uint32 x, uint32 y, uint32 columns, uint32 rows); + void ConfigureBits(uint32_t width, uint32_t height, uint32_t pitch); + virtual void OnDrawDirtyBlock(uint32_t x, uint32_t y, uint32_t columns, uint32_t rows); private: void ConfigureDirtyGrid(); static void ResetWindowVisbilities(); void DrawAllDirtyBlocks(); - void DrawDirtyBlocks(uint32 x, uint32 y, uint32 columns, uint32 rows); + void DrawDirtyBlocks(uint32_t x, uint32_t y, uint32_t columns, uint32_t rows); }; #ifdef __WARN_SUGGEST_FINAL_TYPES__ #pragma GCC diagnostic pop @@ -130,14 +130,14 @@ namespace OpenRCT2 IDrawingEngine * GetEngine() override; - void Clear(uint8 paletteIndex) override; - void FillRect(uint32 colour, sint32 x, sint32 y, sint32 w, sint32 h) override; - void FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) override; - void DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) override; - void DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) override; - void DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) override; - void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) override; - void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) override; + void Clear(uint8_t paletteIndex) override; + void FillRect(uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override; + void FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override; + void DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) override; + void DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) override; + void DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) override; + void DrawSpriteSolid(uint32_t image, int32_t x, int32_t y, uint8_t colour) override; + void DrawGlyph(uint32_t image, int32_t x, int32_t y, uint8_t * palette) override; void SetDPI(rct_drawpixelinfo * dpi); }; diff --git a/src/openrct2/interface/Chat.cpp b/src/openrct2/interface/Chat.cpp index 96d0bf6f2b..69149e3f4d 100644 --- a/src/openrct2/interface/Chat.cpp +++ b/src/openrct2/interface/Chat.cpp @@ -21,19 +21,19 @@ bool gChatOpen = false; static char _chatCurrentLine[CHAT_MAX_MESSAGE_LENGTH]; static char _chatHistory[CHAT_HISTORY_SIZE][CHAT_INPUT_SIZE]; -static uint32 _chatHistoryTime[CHAT_HISTORY_SIZE]; -static uint32 _chatHistoryIndex = 0; -static uint32 _chatCaretTicks = 0; -static sint32 _chatLeft; -static sint32 _chatTop; -static sint32 _chatRight; -static sint32 _chatBottom; -static sint32 _chatWidth; -static sint32 _chatHeight; +static uint32_t _chatHistoryTime[CHAT_HISTORY_SIZE]; +static uint32_t _chatHistoryIndex = 0; +static uint32_t _chatCaretTicks = 0; +static int32_t _chatLeft; +static int32_t _chatTop; +static int32_t _chatRight; +static int32_t _chatBottom; +static int32_t _chatWidth; +static int32_t _chatHeight; static TextInputSession * _chatTextInputSession; -static const char* chat_history_get(uint32 index); -static uint32 chat_history_get_time(uint32 index); +static const char* chat_history_get(uint32_t index); +static uint32_t chat_history_get_time(uint32_t index); static void chat_clear_input(); void chat_open() @@ -69,7 +69,7 @@ void chat_update() _chatCaretTicks = (_chatCaretTicks + 1) % 30; } -void chat_draw(rct_drawpixelinfo * dpi, uint8 chatBackgroundColor) +void chat_draw(rct_drawpixelinfo * dpi, uint8_t chatBackgroundColor) { if (network_get_mode() == NETWORK_MODE_NONE || network_get_status() != NETWORK_STATUS_CONNECTED || network_get_authstatus() != NETWORK_AUTH_OK) { gChatOpen = false; @@ -85,21 +85,21 @@ void chat_draw(rct_drawpixelinfo * dpi, uint8 chatBackgroundColor) char lineBuffer[CHAT_INPUT_SIZE + 10]; char* lineCh = lineBuffer; char* inputLine = _chatCurrentLine; - sint32 inputLineHeight = 10; + int32_t inputLineHeight = 10; // Draw chat window if (gChatOpen) { inputLineHeight = chat_string_wrapped_get_height((void*)&inputLine, _chatWidth - 10); _chatTop -= inputLineHeight; - for (sint32 i = 0; i < CHAT_HISTORY_SIZE; i++) { + for (int32_t i = 0; i < CHAT_HISTORY_SIZE; i++) { if (strlen(chat_history_get(i)) == 0) { continue; } safe_strcpy(lineBuffer, chat_history_get(i), sizeof(lineBuffer)); - sint32 lineHeight = chat_string_wrapped_get_height((void*)&lineCh, _chatWidth - 10); + int32_t lineHeight = chat_string_wrapped_get_height((void*)&lineCh, _chatWidth - 10); _chatTop -= (lineHeight + 5); } @@ -119,13 +119,13 @@ void chat_draw(rct_drawpixelinfo * dpi, uint8 chatBackgroundColor) 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; - sint32 y = _chatBottom - inputLineHeight - 20; - sint32 stringHeight = 0; + int32_t x = _chatLeft + 5; + int32_t y = _chatBottom - inputLineHeight - 20; + int32_t stringHeight = 0; // Draw chat history - for (sint32 i = 0; i < CHAT_HISTORY_SIZE; i++, y -= stringHeight) { - uint32 expireTime = chat_history_get_time(i) + 10000; + for (int32_t i = 0; i < CHAT_HISTORY_SIZE; i++, y -= stringHeight) { + uint32_t expireTime = chat_history_get_time(i) + 10000; if (!gChatOpen && platform_get_ticks() > expireTime) { break; } @@ -156,8 +156,8 @@ void chat_draw(rct_drawpixelinfo * dpi, uint8 chatBackgroundColor) if (_chatCaretTicks < 15 && gfx_get_string_width(lineBuffer) < (_chatWidth - 10)) { memcpy(lineBuffer, _chatCurrentLine, _chatTextInputSession->SelectionStart); lineBuffer[_chatTextInputSession->SelectionStart] = 0; - sint32 caretX = x + gfx_get_string_width(lineBuffer); - sint32 caretY = y + 14; + int32_t caretX = x + gfx_get_string_width(lineBuffer); + int32_t caretY = y + 14; gfx_fill_rect(dpi, caretX, caretY, caretX + 6, caretY + 1, PALETTE_INDEX_56); } @@ -172,7 +172,7 @@ void chat_history_add(const char * src) // Find the start of the text (after format codes) const char * ch = src; const char * nextCh; - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(ch, &nextCh)) != 0) { if (!utf8_is_format_code(codepoint)) { break; @@ -193,7 +193,7 @@ void chat_history_add(const char * src) safe_strcat(buffer, srcText, bufferSize); // Add to history list - sint32 index = _chatHistoryIndex % CHAT_HISTORY_SIZE; + int32_t index = _chatHistoryIndex % CHAT_HISTORY_SIZE; memset(_chatHistory[index], 0, CHAT_INPUT_SIZE); memcpy(_chatHistory[index], buffer, std::min(strlen(buffer), CHAT_INPUT_SIZE - 1)); _chatHistoryTime[index] = platform_get_ticks(); @@ -225,12 +225,12 @@ void chat_input(CHAT_INPUT input) } } -static const char* chat_history_get(uint32 index) +static const char* chat_history_get(uint32_t index) { return _chatHistory[(_chatHistoryIndex + CHAT_HISTORY_SIZE - index - 1) % CHAT_HISTORY_SIZE]; } -static uint32 chat_history_get_time(uint32 index) +static uint32_t chat_history_get_time(uint32_t index) { return _chatHistoryTime[(_chatHistoryIndex + CHAT_HISTORY_SIZE - index - 1) % CHAT_HISTORY_SIZE]; } @@ -242,9 +242,9 @@ static void chat_clear_input() // This method is the same as gfx_draw_string_left_wrapped. // But this adjusts the initial Y coordinate depending of the number of lines. -sint32 chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, sint32 x, sint32 y, sint32 width) +int32_t chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, int32_t x, int32_t y, int32_t width) { - sint32 fontSpriteBase, lineHeight, lineY, numLines; + int32_t fontSpriteBase, lineHeight, lineY, numLines; gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; @@ -258,13 +258,13 @@ sint32 chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, sint32 x, si gCurrentFontFlags = 0; - sint32 expectedY = y - (numLines * lineHeight); + int32_t expectedY = y - (numLines * lineHeight); if (expectedY < 50) { return (numLines * lineHeight); // Skip drawing, return total height. } lineY = y; - for (sint32 line = 0; line <= numLines; ++line) { + for (int32_t line = 0; line <= numLines; ++line) { gfx_draw_string(dpi, buffer, TEXT_COLOUR_254, x, lineY - (numLines * lineHeight)); buffer = get_string_end(buffer) + 1; lineY += lineHeight; @@ -274,9 +274,9 @@ sint32 chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, sint32 x, si // Wrap string without drawing, useful to get the height of a wrapped string. // Almost the same as gfx_draw_string_left_wrapped -sint32 chat_string_wrapped_get_height(void *args, sint32 width) +int32_t chat_string_wrapped_get_height(void *args, int32_t width) { - sint32 fontSpriteBase, lineHeight, lineY, numLines; + int32_t fontSpriteBase, lineHeight, lineY, numLines; gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM; @@ -290,7 +290,7 @@ sint32 chat_string_wrapped_get_height(void *args, sint32 width) gCurrentFontFlags = 0; lineY = 0; - for (sint32 line = 0; line <= numLines; ++line) { + for (int32_t line = 0; line <= numLines; ++line) { buffer = get_string_end(buffer) + 1; lineY += lineHeight; } diff --git a/src/openrct2/interface/Chat.h b/src/openrct2/interface/Chat.h index 59d32bb21c..bec103416a 100644 --- a/src/openrct2/interface/Chat.h +++ b/src/openrct2/interface/Chat.h @@ -34,12 +34,12 @@ void chat_toggle(); void chat_init(); void chat_update(); -void chat_draw(rct_drawpixelinfo * dpi, uint8 chatBackgroundColour); +void chat_draw(rct_drawpixelinfo * dpi, uint8_t chatBackgroundColour); void chat_history_add(const char *src); void chat_input(CHAT_INPUT input); -sint32 chat_string_wrapped_get_height(void *args, sint32 width); -sint32 chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, sint32 x, sint32 y, sint32 width); +int32_t chat_string_wrapped_get_height(void *args, int32_t width); +int32_t chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, int32_t x, int32_t y, int32_t width); #endif diff --git a/src/openrct2/interface/Colour.cpp b/src/openrct2/interface/Colour.cpp index f2e912491c..b19b65df40 100644 --- a/src/openrct2/interface/Colour.cpp +++ b/src/openrct2/interface/Colour.cpp @@ -34,7 +34,7 @@ enum void colours_init_maps() { // Get colour maps from g1 - for (sint32 i = 0; i < COLOUR_COUNT; i++) + for (int32_t i = 0; i < COLOUR_COUNT; i++) { const rct_g1_element * g1 = gfx_get_g1_element(SPR_PALETTE_2_START + i); if (g1 != nullptr) @@ -56,16 +56,16 @@ void colours_init_maps() } #ifndef NO_TTF -static uint8 BlendColourMap[PALETTE_COUNT][PALETTE_COUNT] = {0}; +static uint8_t BlendColourMap[PALETTE_COUNT][PALETTE_COUNT] = {0}; -static uint8 findClosestPaletteIndex(uint8 red, uint8 green, uint8 blue) +static uint8_t findClosestPaletteIndex(uint8_t red, uint8_t green, uint8_t blue) { - sint16 closest = -1; - sint32 closestDistance = INT32_MAX; + int16_t closest = -1; + int32_t closestDistance = INT32_MAX; for (int i = PALETTE_INDEX_0; i < PALETTE_INDEX_230; i++) { - const sint32 distance = + const int32_t distance = std::pow(gPalette[i].red - red, 2) + std::pow(gPalette[i].green - green, 2) + std::pow(gPalette[i].blue - blue, 2); if (distance < closestDistance) @@ -78,19 +78,19 @@ static uint8 findClosestPaletteIndex(uint8 red, uint8 green, uint8 blue) return closest; } -uint8 blendColours(const uint8 paletteIndex1, const uint8 paletteIndex2) +uint8_t blendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2) { - const uint8 cMin = std::min(paletteIndex1, paletteIndex2); - const uint8 cMax = std::max(paletteIndex1, paletteIndex2); + const uint8_t cMin = std::min(paletteIndex1, paletteIndex2); + const uint8_t cMax = std::max(paletteIndex1, paletteIndex2); if (BlendColourMap[cMin][cMax] != 0) { return BlendColourMap[cMin][cMax]; } - uint8 red = (gPalette[cMin].red + gPalette[cMax].red) / 2; - uint8 green = (gPalette[cMin].green + gPalette[cMax].green) / 2; - uint8 blue = (gPalette[cMin].blue + gPalette[cMax].blue) / 2; + uint8_t red = (gPalette[cMin].red + gPalette[cMax].red) / 2; + uint8_t green = (gPalette[cMin].green + gPalette[cMax].green) / 2; + uint8_t blue = (gPalette[cMin].blue + gPalette[cMax].blue) / 2; BlendColourMap[cMin][cMax] = findClosestPaletteIndex(red, green, blue); return BlendColourMap[cMin][cMax]; diff --git a/src/openrct2/interface/Colour.h b/src/openrct2/interface/Colour.h index ec67cc6461..0d407627da 100644 --- a/src/openrct2/interface/Colour.h +++ b/src/openrct2/interface/Colour.h @@ -125,18 +125,18 @@ enum { struct rct_colour_map { - uint8 colour_0; - uint8 colour_1; - uint8 darkest; - uint8 darker; - uint8 dark; - uint8 mid_dark; - uint8 mid_light; - uint8 light; - uint8 lighter; - uint8 lightest; - uint8 colour_10; - uint8 colour_11; + uint8_t colour_0; + uint8_t colour_1; + uint8_t darkest; + uint8_t darker; + uint8_t dark; + uint8_t mid_dark; + uint8_t mid_light; + uint8_t light; + uint8_t lighter; + uint8_t lightest; + uint8_t colour_10; + uint8_t colour_11; }; extern rct_colour_map ColourMapA[COLOUR_COUNT]; @@ -144,7 +144,7 @@ extern rct_colour_map ColourMapA[COLOUR_COUNT]; void colours_init_maps(); #ifndef NO_TTF -uint8 blendColours(const uint8 paletteIndex1, const uint8 paletteIndex2); +uint8_t blendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2); #endif #endif diff --git a/src/openrct2/interface/Cursors.h b/src/openrct2/interface/Cursors.h index 23e4c03085..7439d4976f 100644 --- a/src/openrct2/interface/Cursors.h +++ b/src/openrct2/interface/Cursors.h @@ -52,10 +52,10 @@ namespace OpenRCT2::Ui { struct HotSpot { - sint16 X; - sint16 Y; + int16_t X; + int16_t Y; } HotSpot; - uint8 Data[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; - uint8 Mask[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; + uint8_t Data[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; + uint8_t Mask[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; }; } // namespace OpenRCT2::Ui diff --git a/src/openrct2/interface/Fonts.cpp b/src/openrct2/interface/Fonts.cpp index ed809250c3..8453b1fa8b 100644 --- a/src/openrct2/interface/Fonts.cpp +++ b/src/openrct2/interface/Fonts.cpp @@ -19,9 +19,9 @@ using namespace OpenRCT2::Localisation; #ifndef NO_TTF -uint8 const HINTING_DISABLED = 0; -uint8 const HINTING_THRESHOLD_LOW = 40; -uint8 const HINTING_THRESHOLD_MEDIUM = 60; +uint8_t const HINTING_DISABLED = 0; +uint8_t const HINTING_THRESHOLD_LOW = 40; +uint8_t const HINTING_THRESHOLD_MEDIUM = 60; // clang-format off TTFFontSetDescriptor TTFFontMSGothic = { { diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index f5bc2cf777..f79a28db53 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -53,20 +53,20 @@ #endif static void console_write_all_commands(InteractiveConsole &console); -static sint32 console_parse_int(const utf8 *src, bool *valid); +static int32_t console_parse_int(const utf8 *src, bool *valid); static double console_parse_double(const utf8 *src, bool *valid); -static sint32 cc_variables(InteractiveConsole &console, const utf8 **argv, sint32 argc); -static sint32 cc_windows(InteractiveConsole &console, const utf8 **argv, sint32 argc); -static sint32 cc_help(InteractiveConsole &console, const utf8 **argv, sint32 argc); +static int32_t cc_variables(InteractiveConsole &console, const utf8 **argv, int32_t argc); +static int32_t cc_windows(InteractiveConsole &console, const utf8 **argv, int32_t argc); +static int32_t cc_help(InteractiveConsole &console, const utf8 **argv, int32_t argc); static bool invalidArguments(bool *invalid, bool arguments); #define SET_FLAG(variable, flag, value) {if (value) variable |= flag; else variable &= ~(flag);} -sint32 console_parse_int(const utf8 *src, bool *valid) { +int32_t console_parse_int(const utf8 *src, bool *valid) { utf8 *end; - sint32 value; + int32_t value; value = strtol(src, &end, 10); *valid = (*end == '\0'); return value; } @@ -78,37 +78,37 @@ double console_parse_double(const utf8 *src, bool *valid) { return value; } -static sint32 cc_clear(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_clear(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { console.Clear(); return 0; } -static sint32 cc_close(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_close(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { console.Close(); return 0; } -static sint32 cc_hide(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_hide(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { console.Hide(); return 0; } -static sint32 cc_echo(InteractiveConsole &console, const utf8 **argv, sint32 argc) +static int32_t cc_echo(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) console.WriteLine(argv[0]); return 0; } -static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 argc) +static int32_t cc_rides(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) { if (strcmp(argv[0], "list") == 0) { Ride *ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { char name[128]; format_string(name, 128, ride->name, &ride->name_arguments); @@ -118,7 +118,7 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar if (argc < 4) { if (argc > 1 && strcmp(argv[1], "mode") == 0){ console.WriteFormatLine("Ride modes are specified using integer IDs as given below:"); - for (sint32 i = 0; i < RIDE_MODE_COUNT; i++) { + for (int32_t i = 0; i < RIDE_MODE_COUNT; i++) { char mode_name[128] = { 0 }; rct_string_id mode_string_id = RideModeNames[i]; format_string(mode_name, 128, mode_string_id, nullptr); @@ -137,15 +137,15 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar } if (strcmp(argv[1], "type") == 0) { bool int_valid[2] = { 0 }; - sint32 ride_index = console_parse_int(argv[2], &int_valid[0]); - sint32 type = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); + int32_t type = console_parse_int(argv[3], &int_valid[1]); if (!int_valid[0] || !int_valid[1]) { console.WriteFormatLine("This command expects integer arguments"); } else if (ride_index < 0) { console.WriteFormatLine("Ride index must not be negative"); } else { gGameCommandErrorTitle = STR_CANT_CHANGE_OPERATING_MODE; - sint32 res = game_do_command(0, (type << 8) | 1, 0, (RIDE_SETTING_RIDE_TYPE << 8) | ride_index, GAME_COMMAND_SET_RIDE_SETTING, 0, 0); + int32_t res = game_do_command(0, (type << 8) | 1, 0, (RIDE_SETTING_RIDE_TYPE << 8) | ride_index, GAME_COMMAND_SET_RIDE_SETTING, 0, 0); if (res == MONEY32_UNDEFINED) { console.WriteFormatLine("That didn't work"); } @@ -153,8 +153,8 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar } else if (strcmp(argv[1], "mode") == 0) { bool int_valid[2] = { 0 }; - sint32 ride_index = console_parse_int(argv[2], &int_valid[0]); - sint32 mode = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); + int32_t mode = console_parse_int(argv[3], &int_valid[1]); if (!int_valid[0] || !int_valid[1]) { console.WriteFormatLine("This command expects integer arguments"); } else if (ride_index < 0) { @@ -175,8 +175,8 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar } else if (strcmp(argv[1], "mass") == 0) { bool int_valid[2] = { 0 }; - sint32 ride_index = console_parse_int(argv[2], &int_valid[0]); - sint32 mass = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); + int32_t mass = console_parse_int(argv[3], &int_valid[1]); if (ride_index < 0) { console.WriteFormatLine("Ride index must not be negative"); @@ -193,8 +193,8 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar console.WriteFormatLine("No ride found with index %d", ride_index); } else { - for (sint32 i = 0; i < ride->num_vehicles; i++) { - uint16 vehicle_index = ride->vehicles[i]; + for (int32_t i = 0; i < ride->num_vehicles; i++) { + uint16_t vehicle_index = ride->vehicles[i]; while (vehicle_index != SPRITE_INDEX_NULL) { rct_vehicle *vehicle = GET_VEHICLE(vehicle_index); vehicle->mass = mass; @@ -206,7 +206,7 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar } else if (strcmp(argv[1], "excitement") == 0) { bool int_valid[2] = { 0 }; - sint32 ride_index = console_parse_int(argv[2], &int_valid[0]); + int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); ride_rating excitement = console_parse_int(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -230,7 +230,7 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar } else if (strcmp(argv[1], "intensity") == 0) { bool int_valid[2] = { 0 }; - sint32 ride_index = console_parse_int(argv[2], &int_valid[0]); + int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); ride_rating intensity = console_parse_int(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -254,7 +254,7 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar } else if (strcmp(argv[1], "nausea") == 0) { bool int_valid[2] = { 0 }; - sint32 ride_index = console_parse_int(argv[2], &int_valid[0]); + int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); ride_rating nausea = console_parse_int(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -283,12 +283,12 @@ static sint32 cc_rides(InteractiveConsole &console, const utf8 **argv, sint32 ar return 0; } -static sint32 cc_staff(InteractiveConsole &console, const utf8 **argv, sint32 argc) +static int32_t cc_staff(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) { if (strcmp(argv[0], "list") == 0) { rct_peep *peep; - sint32 i; + int32_t i; FOR_ALL_STAFF(i, peep) { char name[128]; format_string(name, 128, peep->name_string_idx, &peep->id); @@ -298,7 +298,7 @@ static sint32 cc_staff(InteractiveConsole &console, const utf8 **argv, sint32 ar if (argc < 4) { console.WriteFormatLine("staff set energy "); console.WriteFormatLine("staff set costume "); - for (sint32 i = 0; i < ENTERTAINER_COSTUME_COUNT; i++) { + for (int32_t i = 0; i < ENTERTAINER_COSTUME_COUNT; i++) { char costume_name[128] = { 0 }; rct_string_id costume = StaffCostumeNames[i]; format_string(costume_name, 128, STR_DROPDOWN_MENU_LABEL, &costume); @@ -309,7 +309,7 @@ static sint32 cc_staff(InteractiveConsole &console, const utf8 **argv, sint32 ar return 0; } if (strcmp(argv[1], "energy") == 0) { - sint32 int_val[3]; + int32_t int_val[3]; bool int_valid[3] = { 0 }; int_val[0] = console_parse_int(argv[2], &int_valid[0]); int_val[1] = console_parse_int(argv[3], &int_valid[1]); @@ -321,7 +321,7 @@ static sint32 cc_staff(InteractiveConsole &console, const utf8 **argv, sint32 ar peep->energy_target = int_val[1]; } } else if (strcmp(argv[1], "costume") == 0) { - sint32 int_val[2]; + int32_t int_val[2]; bool int_valid[2] = { 0 }; int_val[0] = console_parse_int(argv[2], &int_valid[0]); int_val[1] = console_parse_int(argv[3], &int_valid[1]); @@ -341,7 +341,7 @@ static sint32 cc_staff(InteractiveConsole &console, const utf8 **argv, sint32 ar return 1; } - sint32 costume = int_val[1] | 0x80; + int32_t costume = int_val[1] | 0x80; game_do_command(peep->x, (costume << 8) | 1, peep->y, int_val[0], GAME_COMMAND_SET_STAFF_ORDER, 0, 0); } } @@ -351,7 +351,7 @@ static sint32 cc_staff(InteractiveConsole &console, const utf8 **argv, sint32 ar return 0; } -static sint32 cc_get(InteractiveConsole &console, const utf8 **argv, sint32 argc) +static int32_t cc_get(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) { if (strcmp(argv[0], "park_rating") == 0) { @@ -379,8 +379,8 @@ static sint32 cc_get(InteractiveConsole &console, const utf8 **argv, sint32 argc console.WriteFormatLine("guest_initial_cash %d.%d0", gGuestInitialCash / 10, gGuestInitialCash % 10); } else if (strcmp(argv[0], "guest_initial_happiness") == 0) { - uint32 current_happiness = gGuestInitialHappiness; - for (sint32 i = 15; i <= 99; i++) { + uint32_t current_happiness = gGuestInitialHappiness; + for (int32_t i = 15; i <= 99; i++) { if (i == 99) { console.WriteFormatLine("guest_initial_happiness %d%% (%d)", 15, gGuestInitialHappiness); } @@ -454,7 +454,7 @@ static sint32 cc_get(InteractiveConsole &console, const utf8 **argv, sint32 argc else if (strcmp(argv[0], "location") == 0) { rct_window *w = window_get_main(); if (w != nullptr) { - sint32 interactionType; + int32_t interactionType; rct_tile_element *tileElement; LocationXY16 mapCoord = {}; rct_viewport * viewport = window_get_viewport(w); @@ -500,11 +500,11 @@ static sint32 cc_get(InteractiveConsole &console, const utf8 **argv, sint32 argc } return 0; } -static sint32 cc_set(InteractiveConsole &console, const utf8 **argv, sint32 argc) +static int32_t cc_set(InteractiveConsole &console, const utf8 **argv, int32_t argc) { - sint32 i; + int32_t i; if (argc > 1) { - sint32 int_val[4]; + int32_t int_val[4]; bool int_valid[4]; double double_val[4]; bool double_valid[4]; @@ -522,7 +522,7 @@ static sint32 cc_set(InteractiveConsole &console, const utf8 **argv, sint32 argc } if (strcmp(argv[0], "money") == 0 && invalidArguments(&invalidArgs, double_valid[0])) { - money32 money = MONEY((sint32)double_val[0], ((sint32)(double_val[0] * 100)) % 100); + money32 money = MONEY((int32_t)double_val[0], ((int32_t)(double_val[0] * 100)) % 100); bool run_get_money = true; if (gCash != money) { if (game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SETMONEY, money, GAME_COMMAND_CHEAT, 0, 0) != MONEY32_UNDEFINED) { @@ -554,11 +554,11 @@ static sint32 cc_set(InteractiveConsole &console, const utf8 **argv, sint32 argc console.Execute("get max_loan"); } else if (strcmp(argv[0], "guest_initial_cash") == 0 && invalidArguments(&invalidArgs, double_valid[0])) { - gGuestInitialCash = Math::Clamp(MONEY(0, 0), MONEY((sint32)double_val[0], ((sint32)(double_val[0] * 100)) % 100), MONEY(1000, 0)); + gGuestInitialCash = Math::Clamp(MONEY(0, 0), MONEY((int32_t)double_val[0], ((int32_t)(double_val[0] * 100)) % 100), MONEY(1000, 0)); console.Execute("get guest_initial_cash"); } else if (strcmp(argv[0], "guest_initial_happiness") == 0 && invalidArguments(&invalidArgs, int_valid[0])) { - gGuestInitialHappiness = calculate_guest_initial_happiness((uint8)int_val[0]); + gGuestInitialHappiness = calculate_guest_initial_happiness((uint8_t)int_val[0]); console.Execute("get guest_initial_happiness"); } else if (strcmp(argv[0], "guest_initial_hunger") == 0 && invalidArguments(&invalidArgs, int_valid[0])) { @@ -614,11 +614,11 @@ static sint32 cc_set(InteractiveConsole &console, const utf8 **argv, sint32 argc console.Execute("get park_open"); } else if (strcmp(argv[0], "land_rights_cost") == 0 && invalidArguments(&invalidArgs, double_valid[0])) { - gLandPrice = Math::Clamp(MONEY(0, 0), MONEY((sint32)double_val[0], ((sint32)(double_val[0] * 100)) % 100), MONEY(200, 0)); + gLandPrice = Math::Clamp(MONEY(0, 0), MONEY((int32_t)double_val[0], ((int32_t)(double_val[0] * 100)) % 100), MONEY(200, 0)); console.Execute("get land_rights_cost"); } else if (strcmp(argv[0], "construction_rights_cost") == 0 && invalidArguments(&invalidArgs, double_valid[0])) { - gConstructionRightsPrice = Math::Clamp(MONEY(0, 0), MONEY((sint32)double_val[0], ((sint32)(double_val[0] * 100)) % 100), MONEY(200, 0)); + gConstructionRightsPrice = Math::Clamp(MONEY(0, 0), MONEY((int32_t)double_val[0], ((int32_t)(double_val[0] * 100)) % 100), MONEY(200, 0)); console.Execute("get construction_rights_cost"); } else if (strcmp(argv[0], "climate") == 0) { @@ -661,9 +661,9 @@ static sint32 cc_set(InteractiveConsole &console, const utf8 **argv, sint32 argc else if (strcmp(argv[0], "location") == 0 && invalidArguments(&invalidArgs, int_valid[0] && int_valid[1])) { rct_window *w = window_get_main(); if (w != nullptr) { - sint32 x = (sint16)(int_val[0] * 32 + 16); - sint32 y = (sint16)(int_val[1] * 32 + 16); - sint32 z = tile_element_height(x, y); + int32_t x = (int16_t)(int_val[0] * 32 + 16); + int32_t y = (int16_t)(int_val[1] * 32 + 16); + int32_t z = tile_element_height(x, y); window_set_location(w, x, y, z); viewport_update_position(w); console.Execute("get location"); @@ -754,8 +754,8 @@ static sint32 cc_set(InteractiveConsole &console, const utf8 **argv, sint32 argc return 0; } -static sint32 - cc_twitch([[maybe_unused]] InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t + cc_twitch([[maybe_unused]] InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { #ifdef DISABLE_TWITCH console.WriteLineError("OpenRCT2 build not compiled with Twitch integration."); @@ -767,11 +767,11 @@ static sint32 return 0; } -static sint32 cc_load_object(InteractiveConsole &console, const utf8 **argv, sint32 argc) { +static int32_t cc_load_object(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) { char name[9] = { 0 }; memset(name, ' ', 8); - sint32 i = 0; + int32_t i = 0; for (const char * ch = argv[0]; *ch != '\0' && i < 8; ch++) { name[i++] = *ch; } @@ -794,17 +794,17 @@ static sint32 cc_load_object(InteractiveConsole &console, const utf8 **argv, sin console.WriteLineError("Unable to load object."); return 1; } - sint32 groupIndex = object_manager_get_loaded_object_entry_index(loadedObject); + int32_t groupIndex = object_manager_get_loaded_object_entry_index(loadedObject); - uint8 objectType = object_entry_get_type(entry); + uint8_t objectType = object_entry_get_type(entry); if (objectType == OBJECT_TYPE_RIDE) { // Automatically research the ride so it's supported by the game. rct_ride_entry *rideEntry; - sint32 rideType; + int32_t rideType; rideEntry = get_ride_entry(groupIndex); - for (sint32 j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) { + for (int32_t j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) { rideType = rideEntry->ride_type[j]; if (rideType != RIDE_TYPE_NULL) research_insert(true, RESEARCH_ENTRY_RIDE_MASK | (rideType << 8) | groupIndex, rideEntry->category[0]); @@ -834,12 +834,12 @@ static sint32 cc_load_object(InteractiveConsole &console, const utf8 **argv, sin return 0; } -static sint32 cc_object_count(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_object_count(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { const utf8* object_type_names[] = { "Rides", "Small scenery", "Large scenery", "Walls", "Banners", "Paths", "Path Additions", "Scenery groups", "Park entrances", "Water" }; - for (sint32 i = 0; i < 10; i++) { + for (int32_t i = 0; i < 10; i++) { - sint32 entryGroupIndex = 0; + int32_t entryGroupIndex = 0; for (; entryGroupIndex < object_entry_group_counts[i]; entryGroupIndex++){ if (object_entry_get_chunk(i, entryGroupIndex) == nullptr) { @@ -852,14 +852,14 @@ static sint32 cc_object_count(InteractiveConsole & console, [[maybe_unused]] con return 0; } -static sint32 cc_reset_user_strings( - [[maybe_unused]] InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_reset_user_strings( + [[maybe_unused]] InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { reset_user_strings(); return 0; } -static sint32 cc_open(InteractiveConsole &console, const utf8 **argv, sint32 argc) { +static int32_t cc_open(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) { bool title = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) != 0; bool invalidTitle = false; @@ -886,16 +886,16 @@ static sint32 cc_open(InteractiveConsole &console, const utf8 **argv, sint32 arg return 0; } -static sint32 -cc_remove_unused_objects(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t +cc_remove_unused_objects(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { - sint32 result = editor_remove_unused_objects(); + int32_t result = editor_remove_unused_objects(); console.WriteFormatLine("%d unused object entries have been removed.", result); return 0; } -static sint32 -cc_remove_park_fences(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t +cc_remove_park_fences(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { tile_element_iterator it; tile_element_iterator_begin(&it); @@ -913,13 +913,13 @@ cc_remove_park_fences(InteractiveConsole & console, [[maybe_unused]] const utf8 return 0; } -static sint32 cc_show_limits(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_show_limits(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { map_reorganise_elements(); - sint32 tileElementCount = gNextFreeTileElement - gTileElements - 1; + int32_t tileElementCount = gNextFreeTileElement - gTileElements - 1; - sint32 rideCount = 0; - for (sint32 i = 0; i < MAX_RIDES; ++i) + int32_t rideCount = 0; + for (int32_t i = 0; i < MAX_RIDES; ++i) { Ride * ride = get_ride(i); if (ride->type != RIDE_TYPE_NULL) @@ -928,14 +928,14 @@ static sint32 cc_show_limits(InteractiveConsole & console, [[maybe_unused]] cons } } - sint32 spriteCount = 0; - for (sint32 i = 1; i < NUM_SPRITE_LISTS; ++i) + int32_t spriteCount = 0; + for (int32_t i = 1; i < NUM_SPRITE_LISTS; ++i) { spriteCount += gSpriteListCount[i]; } - sint32 staffCount = 0; - for (sint32 i = 0; i < STAFF_MAX_COUNT; ++i) + int32_t staffCount = 0; + for (int32_t i = 0; i < STAFF_MAX_COUNT; ++i) { if (gStaffModes[i] & 1) { @@ -943,7 +943,7 @@ static sint32 cc_show_limits(InteractiveConsole & console, [[maybe_unused]] cons } } - sint32 bannerCount = 0; + int32_t bannerCount = 0; for (BannerIndex i = 0; i < MAX_BANNERS; ++i) { if (gBanners[i].type != BANNER_NULL) @@ -960,12 +960,12 @@ static sint32 cc_show_limits(InteractiveConsole & console, [[maybe_unused]] cons return 0; } -static sint32 - cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] sint32 argc) +static int32_t + cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const utf8** argv, [[maybe_unused]] int32_t argc) { - sint32 year = 0; - sint32 month = 0; - sint32 day = 0; + int32_t year = 0; + int32_t month = 0; + int32_t day = 0; if (argc < 1 || argc > 3) { return -1; @@ -1017,7 +1017,7 @@ static sint32 return 1; } -using console_command_func = sint32 (*)(InteractiveConsole &console, const utf8 ** argv, sint32 argc); +using console_command_func = int32_t (*)(InteractiveConsole &console, const utf8 ** argv, int32_t argc); struct console_command { const utf8 * command; console_command_func func; @@ -1103,7 +1103,7 @@ static constexpr const console_command console_command_table[] = { }; // clang-format on -static sint32 cc_windows(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_windows(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { for (auto s : console_window_table) { @@ -1112,7 +1112,7 @@ static sint32 cc_windows(InteractiveConsole & console, [[maybe_unused]] const ut return 0; } -static sint32 cc_variables(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] sint32 argc) +static int32_t cc_variables(InteractiveConsole & console, [[maybe_unused]] const utf8 ** argv, [[maybe_unused]] int32_t argc) { for (auto s : console_variable_table) { @@ -1121,7 +1121,7 @@ static sint32 cc_variables(InteractiveConsole & console, [[maybe_unused]] const return 0; } -static sint32 cc_help(InteractiveConsole &console, const utf8 **argv, sint32 argc) +static int32_t cc_help(InteractiveConsole &console, const utf8 **argv, int32_t argc) { if (argc > 0) { @@ -1160,8 +1160,8 @@ static bool invalidArguments(bool *invalid, bool arguments) void InteractiveConsole::Execute(const std::string &s) { - sint32 argc = 0; - sint32 argvCapacity = 8; + int32_t argc = 0; + int32_t argvCapacity = 8; utf8 **argv = (utf8 * *)malloc(argvCapacity * sizeof(utf8*)); const utf8 *start = s.c_str(); const utf8 *end; @@ -1218,7 +1218,7 @@ void InteractiveConsole::Execute(const std::string &s) } } - for (sint32 i = 0; i < argc; i++) + for (int32_t i = 0; i < argc; i++) free(argv[i]); free(argv); diff --git a/src/openrct2/interface/InteractiveConsole.h b/src/openrct2/interface/InteractiveConsole.h index c24322f2b5..f1eaef835c 100644 --- a/src/openrct2/interface/InteractiveConsole.h +++ b/src/openrct2/interface/InteractiveConsole.h @@ -45,7 +45,7 @@ public: virtual void Clear() abstract; virtual void Close() abstract; virtual void Hide() abstract; - virtual void WriteLine(const std::string &s, uint32 colourFormat) abstract; + virtual void WriteLine(const std::string &s, uint32_t colourFormat) abstract; }; class StdInOutConsole final : public InteractiveConsole @@ -61,5 +61,5 @@ public: void Close() override; void Hide() override { } void WriteLine(const std::string &s) { InteractiveConsole::WriteLine(s); } - void WriteLine(const std::string &s, uint32 colourFormat) override; + void WriteLine(const std::string &s, uint32_t colourFormat) override; }; diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 0093d85bb0..18d7448960 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -32,7 +32,7 @@ using namespace OpenRCT2; -uint8 gScreenshotCountdown = 0; +uint8_t gScreenshotCountdown = 0; static bool WriteDpiToFile(const std::string_view& path, const rct_drawpixelinfo * dpi, const rct_palette& palette) { @@ -46,7 +46,7 @@ static bool WriteDpiToFile(const std::string_view& path, const rct_drawpixelinfo image.Depth = 8; image.Stride = dpi->width + dpi->pitch; image.Palette = std::make_unique(palette); - image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); + image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); Imaging::WriteToFile(path, image, IMAGE_FORMAT::PNG); return true; } @@ -63,7 +63,7 @@ static bool WriteDpiToFile(const std::string_view& path, const rct_drawpixelinfo */ void screenshot_check() { - sint32 screenshotIndex; + int32_t screenshotIndex; if (gScreenshotCountdown != 0) { gScreenshotCountdown--; @@ -83,12 +83,12 @@ void screenshot_check() } static void screenshot_get_rendered_palette(rct_palette* palette) { - for (sint32 i = 0; i < 256; i++) { + for (int32_t i = 0; i < 256; i++) { palette->entries[i] = gPalette[i]; } } -static sint32 screenshot_get_next_path(char *path, size_t size) +static int32_t screenshot_get_next_path(char *path, size_t size) { char screenshotPath[MAX_PATH]; @@ -141,9 +141,9 @@ static sint32 screenshot_get_next_path(char *path, size_t size) // might be possible when switching timezones // in the unlikely case that this does happen, // append (%d) to the filename and increment - // this sint32 until it doesn't overwrite any + // this int32_t until it doesn't overwrite any // other file in the directory. - sint32 i; + int32_t i; for (i = 1; i < 1000; i++) { // Glue together path and filename snprintf(fileNameCh, leftBytes, "%s %d-%02d-%02d %02d-%02d-%02d (%d).png", park_name, currentDate.year, currentDate.month, currentDate.day, currentTime.hour, currentTime.minute, currentTime.second, i); @@ -157,10 +157,10 @@ static sint32 screenshot_get_next_path(char *path, size_t size) return -1; } -sint32 screenshot_dump_png(rct_drawpixelinfo *dpi) +int32_t screenshot_dump_png(rct_drawpixelinfo *dpi) { // Get a free screenshot path - sint32 index; + int32_t index; char path[MAX_PATH] = ""; if ((index = screenshot_get_next_path(path, MAX_PATH)) == -1) { return -1; @@ -179,16 +179,16 @@ sint32 screenshot_dump_png(rct_drawpixelinfo *dpi) } } -sint32 screenshot_dump_png_32bpp(sint32 width, sint32 height, const void *pixels) +int32_t screenshot_dump_png_32bpp(int32_t width, int32_t height, const void *pixels) { // Get a free screenshot path - sint32 index; + int32_t index; char path[MAX_PATH] = ""; if ((index = screenshot_get_next_path(path, MAX_PATH)) == -1) { return -1; } - const auto pixels8 = (const uint8 *)pixels; + const auto pixels8 = (const uint8_t *)pixels; const auto pixelsLen = width * 4 * height; try @@ -198,7 +198,7 @@ sint32 screenshot_dump_png_32bpp(sint32 width, sint32 height, const void *pixels image.Height = height; image.Depth = 32; image.Stride = width * 4; - image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); + image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); Imaging::WriteToFile(path, image, IMAGE_FORMAT::PNG_32); return index; } @@ -211,19 +211,19 @@ sint32 screenshot_dump_png_32bpp(sint32 width, sint32 height, const void *pixels void screenshot_giant() { - sint32 originalRotation = get_current_rotation(); - sint32 originalZoom = 0; + int32_t originalRotation = get_current_rotation(); + int32_t originalZoom = 0; rct_window *mainWindow = window_get_main(); rct_viewport * vp = window_get_viewport(mainWindow); if (mainWindow != nullptr && vp != nullptr) originalZoom = vp->zoom; - sint32 rotation = originalRotation; - sint32 zoom = originalZoom; - sint32 mapSize = gMapSize; - sint32 resolutionWidth = (mapSize * 32 * 2) >> zoom; - sint32 resolutionHeight = (mapSize * 32 * 1) >> zoom; + int32_t rotation = originalRotation; + int32_t zoom = originalZoom; + int32_t mapSize = gMapSize; + int32_t resolutionWidth = (mapSize * 32 * 2) >> zoom; + int32_t resolutionHeight = (mapSize * 32 * 1) >> zoom; resolutionWidth += 8; resolutionHeight += 128; @@ -238,11 +238,11 @@ void screenshot_giant() viewport.var_11 = 0; viewport.flags = 0; - sint32 centreX = (mapSize / 2) * 32 + 16; - sint32 centreY = (mapSize / 2) * 32 + 16; + int32_t centreX = (mapSize / 2) * 32 + 16; + int32_t centreY = (mapSize / 2) * 32 + 16; - sint32 x = 0, y = 0; - sint32 z = tile_element_height(centreX, centreY) & 0xFFFF; + int32_t x = 0, y = 0; + int32_t z = tile_element_height(centreX, centreY) & 0xFFFF; switch (rotation) { case 0: x = centreY - centreX; @@ -277,7 +277,7 @@ void screenshot_giant() dpi.height = resolutionHeight; dpi.pitch = 0; dpi.zoom_level = 0; - dpi.bits = (uint8 *)malloc(dpi.width * dpi.height); + dpi.bits = (uint8_t *)malloc(dpi.width * dpi.height); viewport_render(&dpi, &viewport, 0, 0, viewport.width, viewport.height); @@ -302,7 +302,7 @@ void screenshot_giant() context_show_error(STR_SCREENSHOT_SAVED_AS, STR_NONE); } -static void benchgfx_render_screenshots(const char *inputPath, std::unique_ptr& context, uint32 iterationCount) +static void benchgfx_render_screenshots(const char *inputPath, std::unique_ptr& context, uint32_t iterationCount) { if (!context->LoadParkFromFile(inputPath)) { @@ -312,9 +312,9 @@ static void benchgfx_render_screenshots(const char *inputPath, std::unique_ptr []\n"); @@ -380,7 +380,7 @@ sint32 cmdline_for_gfxbench(const char **argv, sint32 argc) } core_init(); - sint32 iterationCount = 40; + int32_t iterationCount = 40; if (argc == 2) { iterationCount = atoi(argv[1]); @@ -403,10 +403,10 @@ sint32 cmdline_for_gfxbench(const char **argv, sint32 argc) return 1; } -sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOptions * options) +int32_t cmdline_for_screenshot(const char * * argv, int32_t argc, ScreenshotOptions * options) { // Don't include options in the count (they have been handled by CommandLine::ParseOptions already) - for (sint32 i = 0; i < argc; i++) + for (int32_t i = 0; i < argc; i++) { if (argv[i][0] == '-') { @@ -427,7 +427,7 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption bool customLocation = false; bool centreMapX = false; bool centreMapY = false; - sint32 resolutionWidth, resolutionHeight, customX = 0, customY = 0, customZoom, customRotation = 0; + int32_t resolutionWidth, resolutionHeight, customX = 0, customY = 0, customZoom, customRotation = 0; const char *inputPath = argv[0]; const char *outputPath = argv[1]; @@ -487,7 +487,7 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption gIntroState = INTRO_STATE_NONE; gScreenFlags = SCREEN_FLAGS_PLAYING; - sint32 mapSize = gMapSize; + int32_t mapSize = gMapSize; if (resolutionWidth == 0 || resolutionHeight == 0) { resolutionWidth = (mapSize * 32 * 2) >> customZoom; resolutionHeight = (mapSize * 32 * 1) >> customZoom; @@ -512,8 +512,8 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption if (centreMapY) customY = (mapSize / 2) * 32 + 16; - sint32 x = 0, y = 0; - sint32 z = tile_element_height(customX, customY) & 0xFFFF; + int32_t x = 0, y = 0; + int32_t z = tile_element_height(customX, customY) & 0xFFFF; switch (customRotation) { case 0: x = customY - customX; @@ -553,7 +553,7 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption return -1; } - uint8 customWeather = options->weather - 1; + uint8_t customWeather = options->weather - 1; climate_force_weather(customWeather); } @@ -567,7 +567,7 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption dpi.height = resolutionHeight; dpi.pitch = 0; dpi.zoom_level = 0; - dpi.bits = (uint8 *)malloc(dpi.width * dpi.height); + dpi.bits = (uint8_t *)malloc(dpi.width * dpi.height); if (options->hide_guests) { diff --git a/src/openrct2/interface/Screenshot.h b/src/openrct2/interface/Screenshot.h index fffe335992..3acee02356 100644 --- a/src/openrct2/interface/Screenshot.h +++ b/src/openrct2/interface/Screenshot.h @@ -13,11 +13,11 @@ struct rct_drawpixelinfo; -extern uint8 gScreenshotCountdown; +extern uint8_t gScreenshotCountdown; struct ScreenshotOptions { - sint32 weather = 0; + int32_t weather = 0; bool hide_guests = false; bool hide_sprites = false; bool clear_grass = false; @@ -29,11 +29,11 @@ struct ScreenshotOptions }; void screenshot_check(); -sint32 screenshot_dump(); -sint32 screenshot_dump_png(rct_drawpixelinfo *dpi); -sint32 screenshot_dump_png_32bpp(sint32 width, sint32 height, const void *pixels); +int32_t screenshot_dump(); +int32_t screenshot_dump_png(rct_drawpixelinfo *dpi); +int32_t screenshot_dump_png_32bpp(int32_t width, int32_t height, const void *pixels); void screenshot_giant(); -sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOptions * options); -sint32 cmdline_for_gfxbench(const char **argv, sint32 argc); +int32_t cmdline_for_screenshot(const char * * argv, int32_t argc, ScreenshotOptions * options); +int32_t cmdline_for_gfxbench(const char **argv, int32_t argc); diff --git a/src/openrct2/interface/StdInOutConsole.cpp b/src/openrct2/interface/StdInOutConsole.cpp index 0ca300dfe1..abcd316081 100644 --- a/src/openrct2/interface/StdInOutConsole.cpp +++ b/src/openrct2/interface/StdInOutConsole.cpp @@ -86,7 +86,7 @@ void StdInOutConsole::Close() openrct2_finish(); } -void StdInOutConsole::WriteLine(const std::string &s, uint32 colourFormat) +void StdInOutConsole::WriteLine(const std::string &s, uint32_t colourFormat) { std::string formatBegin; if (colourFormat != FORMAT_WINDOW_COLOUR_2) diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 65aa63999e..0ca8e5e6e3 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -34,34 +34,34 @@ using namespace OpenRCT2; //#define DEBUG_SHOW_DIRTY_BOX -uint8 gShowGridLinesRefCount; -uint8 gShowLandRightsRefCount; -uint8 gShowConstuctionRightsRefCount; +uint8_t gShowGridLinesRefCount; +uint8_t gShowLandRightsRefCount; +uint8_t gShowConstuctionRightsRefCount; rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT]; rct_viewport *g_music_tracking_viewport; static rct_tile_element *_interaction_element = nullptr; -sint16 gSavedViewX; -sint16 gSavedViewY; -uint8 gSavedViewZoom; -uint8 gSavedViewRotation; +int16_t gSavedViewX; +int16_t gSavedViewY; +uint8_t gSavedViewZoom; +uint8_t gSavedViewRotation; paint_entry *gNextFreePaintStruct; -uint8 gCurrentRotation; -uint32 gCurrentViewportFlags = 0; +uint8_t gCurrentRotation; +uint32_t gCurrentViewportFlags = 0; -static uint32 _currentImageType; +static uint32_t _currentImageType; static rct_drawpixelinfo _viewportDpi1; static rct_drawpixelinfo _viewportDpi2; -static uint8 _interactionSpriteType; -static sint16 _interactionMapX; -static sint16 _interactionMapY; -static uint16 _unk9AC154; +static uint8_t _interactionSpriteType; +static int16_t _interactionMapX; +static int16_t _interactionMapY; +static uint16_t _unk9AC154; -static void viewport_paint_column(rct_drawpixelinfo * dpi, uint32 viewFlags); +static void viewport_paint_column(rct_drawpixelinfo * dpi, uint32_t viewFlags); static void viewport_paint_weather_gloom(rct_drawpixelinfo * dpi); /** @@ -79,7 +79,7 @@ void viewport_init_all() window_init_all(); // Setting up viewports - for (sint32 i = 0; i < MAX_VIEWPORT_COUNT; i++) { + for (int32_t i = 0; i < MAX_VIEWPORT_COUNT; i++) { g_viewport_list[i].width = 0; } @@ -104,13 +104,13 @@ void viewport_init_all() * out_x : ax * out_y : bx */ -void centre_2d_coordinates(sint32 x, sint32 y, sint32 z, sint32 * out_x, sint32 * out_y, rct_viewport * viewport){ - sint32 start_x = x; +void centre_2d_coordinates(int32_t x, int32_t y, int32_t z, int32_t * out_x, int32_t * out_y, rct_viewport * viewport){ + int32_t start_x = x; LocationXYZ16 coord_3d = { - /* .x = */ (sint16)x, - /* .y = */ (sint16)y, - /* .z = */ (sint16)z + /* .x = */ (int16_t)x, + /* .y = */ (int16_t)y, + /* .z = */ (int16_t)z }; LocationXY16 coord_2d = coordinate_3d_to_2d(&coord_3d, get_current_rotation()); @@ -146,10 +146,10 @@ void centre_2d_coordinates(sint32 x, sint32 y, sint32 z, sint32 * out_x, sint32 * flags: edx top most 2 bits 0b_X1 for zoom clear see below for 2nd bit. * w: esi */ -void viewport_create(rct_window *w, sint32 x, sint32 y, sint32 width, sint32 height, sint32 zoom, sint32 centre_x, sint32 centre_y, sint32 centre_z, char flags, sint16 sprite) +void viewport_create(rct_window *w, int32_t x, int32_t y, int32_t width, int32_t height, int32_t zoom, int32_t centre_x, int32_t centre_y, int32_t centre_z, char flags, int16_t sprite) { rct_viewport* viewport = nullptr; - for (sint32 i = 0; i < MAX_VIEWPORT_COUNT; i++) { + for (int32_t i = 0; i < MAX_VIEWPORT_COUNT; i++) { if (g_viewport_list[i].width == 0) { viewport = &g_viewport_list[i]; break; @@ -189,7 +189,7 @@ void viewport_create(rct_window *w, sint32 x, sint32 y, sint32 width, sint32 hei w->viewport_target_sprite = SPRITE_INDEX_NULL; } - sint32 view_x, view_y; + int32_t view_x, view_y; centre_2d_coordinates(centre_x, centre_y, centre_z, &view_x, &view_y, viewport); w->saved_view_x = view_x; @@ -204,24 +204,24 @@ void viewport_create(rct_window *w, sint32 x, sint32 y, sint32 width, sint32 hei * edx is assumed to be (and always is) the current rotation, so it is not * needed as parameter. */ -void viewport_adjust_for_map_height(sint16* x, sint16* y, sint16 *z) +void viewport_adjust_for_map_height(int16_t* x, int16_t* y, int16_t *z) { - sint16 start_x = *x; - sint16 start_y = *y; - sint16 height = 0; + int16_t start_x = *x; + int16_t start_y = *y; + int16_t height = 0; - uint32 rotation = get_current_rotation(); + uint32_t rotation = get_current_rotation(); LocationXY16 pos; - for (sint32 i = 0; i < 6; i++) { + for (int32_t i = 0; i < 6; i++) { pos = viewport_coord_to_map_coord(start_x, start_y, height); height = tile_element_height((0xFFFF) & pos.x, (0xFFFF) & pos.y); // HACK: This is to prevent the x and y values being set to values outside // of the map. This can happen when the height is larger than the map size. - sint16 max = gMapSizeMinus2; + int16_t max = gMapSizeMinus2; if (pos.x > max && pos.y > max) { - sint32 x_corr[] = { -1, 1, 1, -1 }; - sint32 y_corr[] = { -1, -1, 1, 1 }; + int32_t x_corr[] = { -1, 1, 1, -1 }; + int32_t y_corr[] = { -1, -1, 1, 1 }; pos.x += x_corr[rotation] * height; pos.y += y_corr[rotation] * height; } @@ -235,7 +235,7 @@ void viewport_adjust_for_map_height(sint16* x, sint16* y, sint16 *z) /* * rct2: 0x006E7FF3 */ -static void viewport_redraw_after_shift(rct_drawpixelinfo *dpi, rct_window *window, rct_viewport *viewport, sint32 x, sint32 y) +static void viewport_redraw_after_shift(rct_drawpixelinfo *dpi, rct_window *window, rct_viewport *viewport, int32_t x, int32_t y) { // sub-divide by intersecting windows if (window != nullptr) @@ -313,10 +313,10 @@ static void viewport_redraw_after_shift(rct_drawpixelinfo *dpi, rct_window *wind } else { - sint16 left = viewport->x; - sint16 right = viewport->x + viewport->width; - sint16 top = viewport->y; - sint16 bottom = viewport->y + viewport->height; + int16_t left = viewport->x; + int16_t right = viewport->x + viewport->width; + int16_t top = viewport->y; + int16_t bottom = viewport->y + viewport->height; // if moved more than the viewport size if (abs(x) < viewport->width && abs(y) < viewport->height) @@ -327,14 +327,14 @@ static void viewport_redraw_after_shift(rct_drawpixelinfo *dpi, rct_window *wind if (x > 0) { // draw left - sint16 _right = viewport->x + x; + int16_t _right = viewport->x + x; window_draw_all(dpi, left, top, _right, bottom); left += x; } else if (x < 0) { // draw right - sint16 _left = viewport->x + viewport->width + x; + int16_t _left = viewport->x + viewport->width + x; window_draw_all(dpi, _left, top, right, bottom); right += x; } @@ -360,7 +360,7 @@ static void viewport_redraw_after_shift(rct_drawpixelinfo *dpi, rct_window *wind } } -static void viewport_shift_pixels(rct_drawpixelinfo *dpi, rct_window* window, rct_viewport* viewport, sint16 x_diff, sint16 y_diff) +static void viewport_shift_pixels(rct_drawpixelinfo *dpi, rct_window* window, rct_viewport* viewport, int16_t x_diff, int16_t y_diff) { for (auto i = window_get_index(window); i < g_window_list.size(); i++) { @@ -394,15 +394,15 @@ static void viewport_shift_pixels(rct_drawpixelinfo *dpi, rct_window* window, rc viewport_redraw_after_shift(dpi, window, viewport, x_diff, y_diff); } -static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewport) +static void viewport_move(int16_t x, int16_t y, rct_window* w, rct_viewport* viewport) { - uint8 zoom = (1 << viewport->zoom); + uint8_t zoom = (1 << viewport->zoom); // Note: do not do the subtraction and then divide! // Note: Due to arithmetic shift != /zoom a shift will have to be used // hopefully when 0x006E7FF3 is finished this can be converted to /zoom. - sint16 x_diff = (viewport->view_x >> viewport->zoom) - (x >> viewport->zoom); - sint16 y_diff = (viewport->view_y >> viewport->zoom) - (y >> viewport->zoom); + int16_t x_diff = (viewport->view_x >> viewport->zoom) - (x >> viewport->zoom); + int16_t y_diff = (viewport->view_y >> viewport->zoom) - (y >> viewport->zoom); viewport->view_x = x; viewport->view_y = y; @@ -411,10 +411,10 @@ static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewp if ((!x_diff) && (!y_diff))return; if (w->flags & WF_7){ - sint32 left = std::max(viewport->x, 0); - sint32 top = std::max(viewport->y, 0); - sint32 right = std::min(viewport->x + viewport->width, context_get_width()); - sint32 bottom = std::min(viewport->y + viewport->height, context_get_height()); + int32_t left = std::max(viewport->x, 0); + int32_t top = std::max(viewport->y, 0); + int32_t right = std::min(viewport->x + viewport->width, context_get_width()); + int32_t bottom = std::min(viewport->y + viewport->height, context_get_height()); if (left >= right) return; if (top >= bottom) return; @@ -436,7 +436,7 @@ static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewp viewport->x = 0; } - sint32 eax = viewport->x + viewport->width - context_get_width(); + int32_t eax = viewport->x + viewport->width - context_get_width(); if (eax > 0){ viewport->width -= eax; viewport->view_width -= eax * zoom; @@ -474,19 +474,19 @@ static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewp } //rct2: 0x006E7A15 -static void viewport_set_underground_flag(sint32 underground, rct_window* window, rct_viewport* viewport) +static void viewport_set_underground_flag(int32_t underground, rct_window* window, rct_viewport* viewport) { if (window->classification != WC_MAIN_WINDOW) { if (!underground) { - sint32 bit = viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE; + int32_t bit = viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE; viewport->flags &= ~VIEWPORT_FLAG_UNDERGROUND_INSIDE; if (!bit) return; } else { - sint32 bit = viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE; + int32_t bit = viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE; viewport->flags |= VIEWPORT_FLAG_UNDERGROUND_INSIDE; if (bit) return; } @@ -518,14 +518,14 @@ void viewport_update_position(rct_window * window) viewport_set_underground_flag(0, window, viewport); - sint16 x = window->saved_view_x + viewport->view_width / 2; - sint16 y = window->saved_view_y + viewport->view_height / 2; + int16_t x = window->saved_view_x + viewport->view_width / 2; + int16_t y = window->saved_view_y + viewport->view_height / 2; LocationXY16 mapCoord; mapCoord = viewport_coord_to_map_coord(x, y, 0); // Clamp to the map minimum value - sint32 at_map_edge = 0; + int32_t at_map_edge = 0; if (mapCoord.x < MAP_MINIMUM_X_Y) { mapCoord.x = MAP_MINIMUM_X_Y; @@ -551,7 +551,7 @@ void viewport_update_position(rct_window * window) if (at_map_edge) { - sint32 _2d_x, _2d_y; + int32_t _2d_x, _2d_y; centre_2d_coordinates(mapCoord.x, mapCoord.y, 0, &_2d_x, &_2d_y, viewport); window->saved_view_x = _2d_x; @@ -563,7 +563,7 @@ void viewport_update_position(rct_window * window) if (window->flags & WF_SCROLLING_TO_LOCATION) { // Moves the viewport if focusing in on an item - uint8 flags = 0; + uint8_t flags = 0; x -= viewport->view_x; if (x < 0) { @@ -604,12 +604,12 @@ void viewport_update_sprite_follow(rct_window *window) if (window->viewport_target_sprite != SPRITE_INDEX_NULL && window->viewport) { rct_sprite* sprite = get_sprite(window->viewport_target_sprite); - sint32 height = (tile_element_height(0xFFFF & sprite->unknown.x, 0xFFFF & sprite->unknown.y) & 0xFFFF) - 16; - sint32 underground = sprite->unknown.z < height; + int32_t height = (tile_element_height(0xFFFF & sprite->unknown.x, 0xFFFF & sprite->unknown.y) & 0xFFFF) - 16; + int32_t underground = sprite->unknown.z < height; viewport_set_underground_flag(underground, window, window->viewport); - sint32 centre_x, centre_y; + int32_t centre_x, centre_y; centre_2d_coordinates(sprite->unknown.x, sprite->unknown.y, sprite->unknown.z, ¢re_x, ¢re_y, window->viewport); @@ -672,7 +672,7 @@ void viewport_update_smart_guest_follow(rct_window * window, rct_peep * peep) } else { - uint8 final_check = 1; + uint8_t final_check = 1; if (peep->state == PEEP_STATE_ON_RIDE || peep->state == PEEP_STATE_ENTERING_RIDE || (peep->state == PEEP_STATE_LEAVING_RIDE && peep->x == LOCATION_NULL)) @@ -682,7 +682,7 @@ void viewport_update_smart_guest_follow(rct_window * window, rct_peep * peep) if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { rct_vehicle * train = GET_VEHICLE(ride->vehicles[peep->current_train]); - sint32 car = peep->current_car; + int32_t car = peep->current_car; for (; car != 0; car--) { @@ -696,9 +696,9 @@ void viewport_update_smart_guest_follow(rct_window * window, rct_peep * peep) if (peep->x == LOCATION_NULL && final_check) { Ride * ride = get_ride(peep->current_ride); - sint32 x = ride->overall_view.x * 32 + 16; - sint32 y = ride->overall_view.y * 32 + 16; - sint32 height = tile_element_height(x, y); + int32_t x = ride->overall_view.x * 32 + 16; + int32_t y = ride->overall_view.y * 32 + 16; + int32_t height = tile_element_height(x, y); height += 32; focus.coordinate.x = x; focus.coordinate.y = y; @@ -760,7 +760,7 @@ void viewport_update_smart_vehicle_follow(rct_window * window) * edi: dpi * ebp: bottom */ -void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, sint32 left, sint32 top, sint32 right, sint32 bottom) +void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, int32_t left, int32_t top, int32_t right, int32_t bottom) { if (right <= viewport->x) return; if (bottom <= viewport->y) return; @@ -768,13 +768,13 @@ void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, sint32 left if (top >= viewport->y + viewport->height)return; #ifdef DEBUG_SHOW_DIRTY_BOX - sint32 l = left, t = top, r = right, b = bottom; + int32_t l = left, t = top, r = right, b = bottom; #endif - left = std::max(left - viewport->x, 0); - right = std::min(right - viewport->x, viewport->width); - top = std::max(top - viewport->y, 0); - bottom = std::min(bottom - viewport->y, viewport->height); + left = std::max(left - viewport->x, 0); + right = std::min(right - viewport->x, viewport->width); + top = std::max(top - viewport->y, 0); + bottom = std::min(bottom - viewport->y, viewport->height); left <<= viewport->zoom; right <<= viewport->zoom; @@ -806,12 +806,12 @@ void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, sint32 left * edi: dpi * ebp: bottom */ -void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, sint16 left, sint16 top, sint16 right, sint16 bottom) +void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int16_t left, int16_t top, int16_t right, int16_t bottom) { - uint32 viewFlags = viewport->flags; - uint16 width = right - left; - uint16 height = bottom - top; - uint16 bitmask = 0xFFFF & (0xFFFF << viewport->zoom); + uint32_t viewFlags = viewport->flags; + uint16_t width = right - left; + uint16_t height = bottom - top; + uint16_t bitmask = 0xFFFF & (0xFFFF << viewport->zoom); width &= bitmask; height &= bitmask; @@ -820,11 +820,11 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, sint16 left, right = left + width; bottom = top + height; - sint16 x = (sint16)(left - (sint16)(viewport->view_x & bitmask)); + int16_t x = (int16_t)(left - (int16_t)(viewport->view_x & bitmask)); x >>= viewport->zoom; x += viewport->x; - sint16 y = (sint16)(top - (sint16)(viewport->view_y & bitmask)); + int16_t y = (int16_t)(top - (int16_t)(viewport->view_y & bitmask)); y >>= viewport->zoom; y += viewport->y; @@ -837,24 +837,24 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, sint16 left, dpi1.pitch = (dpi->width + dpi->pitch) - (width >> viewport->zoom); dpi1.zoom_level = viewport->zoom; - // make sure, the compare operation is done in sint16 to avoid the loop becoming an infiniteloop. + // make sure, the compare operation is done in int16_t to avoid the loop becoming an infiniteloop. // this as well as the [x += 32] in the loop causes signed integer overflow -> undefined behaviour. - sint16 rightBorder = dpi1.x + dpi1.width; + int16_t rightBorder = dpi1.x + dpi1.width; // Splits the area into 32 pixel columns and renders them for (x = floor2(dpi1.x, 32); x < rightBorder; x += 32) { rct_drawpixelinfo dpi2 = dpi1; if (x >= dpi2.x) { - sint16 leftPitch = x - dpi2.x; + int16_t leftPitch = x - dpi2.x; dpi2.width -= leftPitch; dpi2.bits += leftPitch >> dpi2.zoom_level; dpi2.pitch += leftPitch >> dpi2.zoom_level; dpi2.x = x; } - sint16 paintRight = dpi2.x + dpi2.width; + int16_t paintRight = dpi2.x + dpi2.width; if (paintRight >= x + 32) { - sint16 rightPitch = paintRight - x - 32; + int16_t rightPitch = paintRight - x - 32; paintRight -= rightPitch; dpi2.pitch += rightPitch >> dpi2.zoom_level; } @@ -864,12 +864,12 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, sint16 left, } } -static void viewport_paint_column(rct_drawpixelinfo * dpi, uint32 viewFlags) +static void viewport_paint_column(rct_drawpixelinfo * dpi, uint32_t viewFlags) { gCurrentViewportFlags = viewFlags; if (viewFlags & (VIEWPORT_FLAG_HIDE_VERTICAL | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_CLIP_VIEW)) { - uint8 colour = 10; + uint8_t colour = 10; if (viewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES) { colour = 0; } @@ -914,21 +914,21 @@ static void viewport_paint_weather_gloom(rct_drawpixelinfo * dpi) * * rct2: 0x0068958D */ -void screen_pos_to_map_pos(sint16 *x, sint16 *y, sint32 *direction) +void screen_pos_to_map_pos(int16_t *x, int16_t *y, int32_t *direction) { screen_get_map_xy(*x, *y, x, y, nullptr); if (*x == LOCATION_NULL) return; - sint32 my_direction; - sint32 dist_from_centre_x = abs(*x % 32); - sint32 dist_from_centre_y = abs(*y % 32); + int32_t my_direction; + int32_t dist_from_centre_x = abs(*x % 32); + int32_t dist_from_centre_y = abs(*y % 32); if (dist_from_centre_x > 8 && dist_from_centre_x < 24 && dist_from_centre_y > 8 && dist_from_centre_y < 24) { my_direction = 4; } else { - sint16 mod_x = *x & 0x1F; - sint16 mod_y = *y & 0x1F; + int16_t mod_x = *x & 0x1F; + int16_t mod_y = *y & 0x1F; if (mod_x <= 16) { if (mod_y < 16) { my_direction = 2; @@ -949,7 +949,7 @@ void screen_pos_to_map_pos(sint16 *x, sint16 *y, sint32 *direction) if (direction != nullptr) *direction = my_direction; } -LocationXY16 screen_coord_to_viewport_coord(rct_viewport *viewport, uint16 x, uint16 y) +LocationXY16 screen_coord_to_viewport_coord(rct_viewport *viewport, uint16_t x, uint16_t y) { LocationXY16 ret; ret.x = ((x - viewport->x) << viewport->zoom) + viewport->view_x; @@ -957,7 +957,7 @@ LocationXY16 screen_coord_to_viewport_coord(rct_viewport *viewport, uint16 x, ui return ret; } -LocationXY16 viewport_coord_to_map_coord(sint32 x, sint32 y, sint32 z) +LocationXY16 viewport_coord_to_map_coord(int32_t x, int32_t y, int32_t z) { LocationXY16 ret = {}; switch (get_current_rotation()) { @@ -1093,17 +1093,17 @@ void hide_construction_rights() * * rct2: 0x006CB70A */ -void viewport_set_visibility(uint8 mode) +void viewport_set_visibility(uint8_t mode) { rct_window* window = window_get_main(); if (window != nullptr) { rct_viewport* edi = window->viewport; - uint32 invalidate = 0; + uint32_t invalidate = 0; switch (mode) { case 0: { //Set all these flags to 0, and invalidate if any were active - uint32 mask = VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_SEETHROUGH_RIDES | + uint32_t mask = VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_SEETHROUGH_RIDES | VIEWPORT_FLAG_SEETHROUGH_SCENERY | VIEWPORT_FLAG_SEETHROUGH_PATHS | VIEWPORT_FLAG_INVISIBLE_SUPPORTS | VIEWPORT_FLAG_LAND_HEIGHTS | VIEWPORT_FLAG_TRACK_HEIGHTS | VIEWPORT_FLAG_PATH_HEIGHTS | VIEWPORT_FLAG_INVISIBLE_PEEPS | @@ -1128,7 +1128,7 @@ void viewport_set_visibility(uint8 mode) case 5: //6CB7D8 //Set underground off, invalidate if it was on invalidate += edi->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE; - edi->flags &= ~((uint16)VIEWPORT_FLAG_UNDERGROUND_INSIDE); + edi->flags &= ~((uint16_t)VIEWPORT_FLAG_UNDERGROUND_INSIDE); break; } if (invalidate != 0) @@ -1147,7 +1147,7 @@ static void store_interaction_info(paint_struct *ps) || ps->sprite_type == 11 // 11 as a type seems to not exist, maybe part of the typo mentioned later on. || ps->sprite_type > VIEWPORT_INTERACTION_ITEM_BANNER) return; - uint16 mask; + uint16_t mask; if (ps->sprite_type == VIEWPORT_INTERACTION_ITEM_BANNER) // I think CS made a typo here. Let's replicate the original behaviour. mask = 1 << (ps->sprite_type - 3); @@ -1165,7 +1165,7 @@ static void store_interaction_info(paint_struct *ps) /** * rct2: 0x00679236, 0x00679662, 0x00679B0D, 0x00679FF1 */ -static bool pixel_is_present_bmp(uint32 imageType, const rct_g1_element * g1, const uint8 * index, const uint8 * palette) +static bool pixel_is_present_bmp(uint32_t imageType, const rct_g1_element * g1, const uint8_t * index, const uint8_t * palette) { // Probably used to check for corruption if (!(g1->flags & G1_FLAG_BMP)) { @@ -1186,13 +1186,13 @@ static bool pixel_is_present_bmp(uint32 imageType, const rct_g1_element * g1, co /** * rct2: 0x0067933B, 0x00679788, 0x00679C4A, 0x0067A117 */ -static bool is_pixel_present_rle(const uint8 *esi, sint16 x_start_point, sint16 y_start_point, sint32 round) { - const uint8 *ebx = esi + ((uint16 *) esi)[y_start_point]; +static bool is_pixel_present_rle(const uint8_t *esi, int16_t x_start_point, int16_t y_start_point, int32_t round) { + const uint8_t *ebx = esi + ((uint16_t *) esi)[y_start_point]; - uint8 last_data_line = 0; + uint8_t last_data_line = 0; while (!last_data_line) { - sint32 no_pixels = *ebx++; - uint8 gap_size = *ebx++; + int32_t no_pixels = *ebx++; + uint8_t gap_size = *ebx++; last_data_line = no_pixels & 0x80; @@ -1220,7 +1220,7 @@ static bool is_pixel_present_rle(const uint8 *esi, sint16 x_start_point, sint16 } } - sint32 x_start = gap_size - x_start_point; + int32_t x_start = gap_size - x_start_point; if (x_start <= 0) { no_pixels += x_start; if (no_pixels <= 0) { @@ -1261,7 +1261,7 @@ static bool is_pixel_present_rle(const uint8 *esi, sint16 x_start_point, sint16 * @param y (dx) * @return value originally stored in 0x00141F569 */ -static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 y, const uint8 * palette) +static bool sub_679074(rct_drawpixelinfo *dpi, int32_t imageId, int16_t x, int16_t y, const uint8_t * palette) { const rct_g1_element * g1 = gfx_get_g1_element(imageId & 0x7FFFF); if (g1 == nullptr) @@ -1278,27 +1278,27 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 // TODO: SAR in dpi done with `>> 1`, in coordinates with `/ 2` rct_drawpixelinfo zoomed_dpi = { /* .bits = */ dpi->bits, - /* .x = */ (sint16)(dpi->x >> 1), - /* .y = */ (sint16)(dpi->y >> 1), + /* .x = */ (int16_t)(dpi->x >> 1), + /* .y = */ (int16_t)(dpi->y >> 1), /* .height = */ dpi->height, /* .width = */ dpi->width, /* .pitch = */ dpi->pitch, - /* .zoom_level = */ (uint16)(dpi->zoom_level - 1) + /* .zoom_level = */ (uint16_t)(dpi->zoom_level - 1) }; return sub_679074(&zoomed_dpi, imageId - g1->zoomed_offset, x / 2, y / 2, palette); } } - sint32 round = 1 << dpi->zoom_level; + int32_t round = 1 << dpi->zoom_level; if (g1->flags & G1_FLAG_RLE_COMPRESSION) { y -= (round - 1); } y += g1->y_offset; - sint16 yStartPoint = 0; - sint16 height = g1->height; + int16_t yStartPoint = 0; + int16_t height = g1->height; if (dpi->zoom_level != 0) { if (height % 2) { height--; @@ -1318,7 +1318,7 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 } y = floor2(y, round); - sint16 yEndPoint = height; + int16_t yEndPoint = height; y -= dpi->y; if (y < 0) { yEndPoint += y; @@ -1339,8 +1339,8 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 } } - sint16 xStartPoint = 0; - sint16 xEndPoint = g1->width; + int16_t xStartPoint = 0; + int16_t xEndPoint = g1->width; x += g1->x_offset; x = floor2(x, round); @@ -1368,8 +1368,8 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 return is_pixel_present_rle(g1->offset, xStartPoint, yStartPoint, round); } - uint8 *offset = g1->offset + (yStartPoint * g1->width) + xStartPoint; - uint32 imageType = _currentImageType; + uint8_t *offset = g1->offset + (yStartPoint * g1->width) + xStartPoint; + uint32_t imageType = _currentImageType; if (!(g1->flags & G1_FLAG_1)) { return pixel_is_present_bmp(imageType, g1, offset, palette); @@ -1379,14 +1379,14 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 assert(false); // The code below is untested. - sint32 total_no_pixels = g1->width * g1->height; - uint8 *source_pointer = g1->offset; - uint8 *new_source_pointer_start = (uint8 *)malloc(total_no_pixels); - uint8 *new_source_pointer = (*&new_source_pointer_start);// 0x9E3D28; + int32_t total_no_pixels = g1->width * g1->height; + uint8_t *source_pointer = g1->offset; + uint8_t *new_source_pointer_start = (uint8_t *)malloc(total_no_pixels); + uint8_t *new_source_pointer = (*&new_source_pointer_start);// 0x9E3D28; intptr_t ebx1; - sint32 ecx; + int32_t ecx; while (total_no_pixels > 0) { - sint8 no_pixels = *source_pointer; + int8_t no_pixels = *source_pointer; if (no_pixels >= 0) { source_pointer++; total_no_pixels -= no_pixels; @@ -1398,19 +1398,19 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 ecx = no_pixels; no_pixels &= 0x7; ecx >>= 3;//SAR - uintptr_t eax = ((sint32) no_pixels) << 8; + uintptr_t eax = ((int32_t) no_pixels) << 8; ecx = -ecx;//Odd eax = (eax & 0xFF00) + *(source_pointer + 1); total_no_pixels -= ecx; source_pointer += 2; ebx1 = (uintptr_t) new_source_pointer - eax; eax = (uintptr_t) source_pointer; - source_pointer = (uint8 *) ebx1; + source_pointer = (uint8_t *) ebx1; ebx1 = eax; eax = 0; memcpy((char *) new_source_pointer, (char *) source_pointer, ecx); new_source_pointer += ecx; - source_pointer = (uint8 *) ebx1; + source_pointer = (uint8_t *) ebx1; } bool output = pixel_is_present_bmp(imageType, g1, new_source_pointer_start + (uintptr_t) offset, palette); @@ -1423,17 +1423,17 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 * * rct2: 0x00679023 */ -static bool sub_679023(rct_drawpixelinfo *dpi, sint32 imageId, sint32 x, sint32 y) +static bool sub_679023(rct_drawpixelinfo *dpi, int32_t imageId, int32_t x, int32_t y) { - const uint8 * palette = nullptr; + const uint8_t * palette = nullptr; imageId &= ~IMAGE_TYPE_TRANSPARENT; if (imageId & IMAGE_TYPE_REMAP) { _currentImageType = IMAGE_TYPE_REMAP; - sint32 index = (imageId >> 19) & 0x7F; + int32_t index = (imageId >> 19) & 0x7F; if (imageId & IMAGE_TYPE_REMAP_2_PLUS) { index &= 0x1F; } - sint32 g1Index = palette_to_g1_offset[index]; + int32_t g1Index = palette_to_g1_offset[index]; const rct_g1_element * g1 = gfx_get_g1_element(g1Index); if (g1 != nullptr) { @@ -1489,28 +1489,28 @@ void sub_68862C(rct_drawpixelinfo * dpi, paint_struct * ps) * tileElement: edx * viewport: edi */ -void get_map_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 flags, sint16 *x, sint16 *y, sint32 *interactionType, rct_tile_element **tileElement, rct_viewport **viewport) +void get_map_coordinates_from_pos(int32_t screenX, int32_t screenY, int32_t flags, int16_t *x, int16_t *y, int32_t *interactionType, rct_tile_element **tileElement, rct_viewport **viewport) { rct_window* window = window_find_from_point(screenX, screenY); get_map_coordinates_from_pos_window(window, screenX, screenY, flags, x, y, interactionType, tileElement, viewport); } -void get_map_coordinates_from_pos_window(rct_window * window, sint32 screenX, sint32 screenY, sint32 flags, sint16 * x, sint16 * y, - sint32 * interactionType, rct_tile_element ** tileElement, rct_viewport ** viewport) +void get_map_coordinates_from_pos_window(rct_window * window, int32_t screenX, int32_t screenY, int32_t flags, int16_t * x, int16_t * y, + int32_t * interactionType, rct_tile_element ** tileElement, rct_viewport ** viewport) { _unk9AC154 = flags & 0xFFFF; _interactionSpriteType = 0; if (window != nullptr && window->viewport != nullptr) { rct_viewport* myviewport = window->viewport; - screenX -= (sint32)myviewport->x; - screenY -= (sint32)myviewport->y; - if (screenX >= 0 && screenX < (sint32)myviewport->width && screenY >= 0 && screenY < (sint32)myviewport->height) + screenX -= (int32_t)myviewport->x; + screenY -= (int32_t)myviewport->y; + if (screenX >= 0 && screenX < (int32_t)myviewport->width && screenY >= 0 && screenY < (int32_t)myviewport->height) { screenX <<= myviewport->zoom; screenY <<= myviewport->zoom; - screenX += (sint32)myviewport->view_x; - screenY += (sint32)myviewport->view_y; + screenX += (int32_t)myviewport->view_x; + screenY += (int32_t)myviewport->view_y; _viewportDpi1.zoom_level = myviewport->zoom; screenX &= (0xFFFF << myviewport->zoom) & 0xFFFF; screenY &= (0xFFFF << myviewport->zoom) & 0xFFFF; @@ -1540,7 +1540,7 @@ void get_map_coordinates_from_pos_window(rct_window * window, sint32 screenX, si /** * Left, top, right and bottom represent 2D map coordinates at zoom 0. */ -void viewport_invalidate(rct_viewport *viewport, sint32 left, sint32 top, sint32 right, sint32 bottom) +void viewport_invalidate(rct_viewport *viewport, int32_t left, int32_t top, int32_t right, int32_t bottom) { // if unknown viewport visibility, use the containing window to discover the status if (viewport->visibility == VC_UNKNOWN) @@ -1559,17 +1559,17 @@ void viewport_invalidate(rct_viewport *viewport, sint32 left, sint32 top, sint32 if (viewport->visibility == VC_COVERED) return; - sint32 viewportLeft = viewport->view_x; - sint32 viewportTop = viewport->view_y; - sint32 viewportRight = viewport->view_x + viewport->view_width; - sint32 viewportBottom = viewport->view_y + viewport->view_height; + int32_t viewportLeft = viewport->view_x; + int32_t viewportTop = viewport->view_y; + int32_t viewportRight = viewport->view_x + viewport->view_width; + int32_t viewportBottom = viewport->view_y + viewport->view_height; if (right > viewportLeft && bottom > viewportTop) { left = std::max(left, viewportLeft); top = std::max(top, viewportTop); right = std::min(right, viewportRight); bottom = std::min(bottom, viewportBottom); - uint8 zoom = 1 << viewport->zoom; + uint8_t zoom = 1 << viewport->zoom; left -= viewportLeft; top -= viewportTop; right -= viewportLeft; @@ -1586,7 +1586,7 @@ void viewport_invalidate(rct_viewport *viewport, sint32 left, sint32 top, sint32 } } -static rct_viewport *viewport_find_from_point(sint32 screenX, sint32 screenY) +static rct_viewport *viewport_find_from_point(int32_t screenX, int32_t screenY) { rct_window *w = window_find_from_point(screenX, screenY); if (w == nullptr) @@ -1616,9 +1616,9 @@ static rct_viewport *viewport_find_from_point(sint32 screenX, sint32 screenY) * tile_element: edx ? * viewport: edi */ -void screen_get_map_xy(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, rct_viewport **viewport) { - sint16 my_x, my_y; - sint32 interactionType; +void screen_get_map_xy(int32_t screenX, int32_t screenY, int16_t *x, int16_t *y, rct_viewport **viewport) { + int16_t my_x, my_y; + int32_t interactionType; rct_viewport *myViewport = nullptr; get_map_coordinates_from_pos(screenX, screenY, VIEWPORT_INTERACTION_MASK_TERRAIN, &my_x, &my_y, &interactionType, nullptr, &myViewport); if (interactionType == VIEWPORT_INTERACTION_ITEM_NONE) { @@ -1627,13 +1627,13 @@ void screen_get_map_xy(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, rct } LocationXY16 start_vp_pos = screen_coord_to_viewport_coord(myViewport, screenX, screenY); - LocationXY16 map_pos = { (sint16)(my_x + 16), (sint16)(my_y + 16) }; + LocationXY16 map_pos = { (int16_t)(my_x + 16), (int16_t)(my_y + 16) }; - for (sint32 i = 0; i < 5; i++) { - sint32 z = tile_element_height(map_pos.x, map_pos.y); + for (int32_t i = 0; i < 5; i++) { + int32_t z = tile_element_height(map_pos.x, map_pos.y); map_pos = viewport_coord_to_map_coord(start_vp_pos.x, start_vp_pos.y, z); - map_pos.x = Math::Clamp(map_pos.x, my_x, my_x + 31); - map_pos.y = Math::Clamp(map_pos.y, my_y, my_y + 31); + map_pos.x = Math::Clamp(map_pos.x, my_x, my_x + 31); + map_pos.y = Math::Clamp(map_pos.y, my_y, my_y + 31); } *x = map_pos.x; @@ -1646,7 +1646,7 @@ void screen_get_map_xy(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, rct * * rct2: 0x006894D4 */ -void screen_get_map_xy_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY) +void screen_get_map_xy_with_z(int16_t screenX, int16_t screenY, int16_t z, int16_t *mapX, int16_t *mapY) { rct_viewport *viewport = viewport_find_from_point(screenX, screenY); if (viewport == nullptr) { @@ -1671,7 +1671,7 @@ void screen_get_map_xy_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 * * * rct2: 0x00689604 */ -void screen_get_map_xy_quadrant(sint16 screenX, sint16 screenY, sint16 *mapX, sint16 *mapY, uint8 *quadrant) +void screen_get_map_xy_quadrant(int16_t screenX, int16_t screenY, int16_t *mapX, int16_t *mapY, uint8_t *quadrant) { screen_get_map_xy(screenX, screenY, mapX, mapY, nullptr); if (*mapX == LOCATION_NULL) @@ -1686,7 +1686,7 @@ void screen_get_map_xy_quadrant(sint16 screenX, sint16 screenY, sint16 *mapX, si * * rct2: 0x0068964B */ -void screen_get_map_xy_quadrant_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY, uint8 *quadrant) +void screen_get_map_xy_quadrant_with_z(int16_t screenX, int16_t screenY, int16_t z, int16_t *mapX, int16_t *mapY, uint8_t *quadrant) { screen_get_map_xy_with_z(screenX, screenY, z, mapX, mapY); if (*mapX == LOCATION_NULL) @@ -1701,7 +1701,7 @@ void screen_get_map_xy_quadrant_with_z(sint16 screenX, sint16 screenY, sint16 z, * * rct2: 0x00689692 */ -void screen_get_map_xy_side(sint16 screenX, sint16 screenY, sint16 *mapX, sint16 *mapY, uint8 *side) +void screen_get_map_xy_side(int16_t screenX, int16_t screenY, int16_t *mapX, int16_t *mapY, uint8_t *side) { screen_get_map_xy(screenX, screenY, mapX, mapY, nullptr); if (*mapX == LOCATION_NULL) @@ -1716,7 +1716,7 @@ void screen_get_map_xy_side(sint16 screenX, sint16 screenY, sint16 *mapX, sint16 * * rct2: 0x006896DC */ -void screen_get_map_xy_side_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY, uint8 *side) +void screen_get_map_xy_side_with_z(int16_t screenX, int16_t screenY, int16_t z, int16_t *mapX, int16_t *mapY, uint8_t *side) { screen_get_map_xy_with_z(screenX, screenY, z, mapX, mapY); if (*mapX == LOCATION_NULL) @@ -1735,19 +1735,19 @@ void screen_get_map_xy_side_with_z(sint16 screenX, sint16 screenY, sint16 z, sin * * @returns rotation in range 0-3 (inclusive) */ -uint8 get_current_rotation() +uint8_t get_current_rotation() { - uint8 rotation = gCurrentRotation; - uint8 rotation_masked = rotation & 3; + uint8_t rotation = gCurrentRotation; + uint8_t rotation_masked = rotation & 3; #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (rotation != rotation_masked) { - log_error("Found wrong rotation %d! Will return %d instead.", (uint32)rotation, (uint32)rotation_masked); + log_error("Found wrong rotation %d! Will return %d instead.", (uint32_t)rotation, (uint32_t)rotation_masked); } #endif // DEBUG_LEVEL_1 return rotation_masked; } -sint16 get_height_marker_offset() +int16_t get_height_marker_offset() { // Height labels in units if (gConfigGeneral.show_height_as_units) diff --git a/src/openrct2/interface/Viewport.h b/src/openrct2/interface/Viewport.h index 80ced0adcc..474a1e5223 100644 --- a/src/openrct2/interface/Viewport.h +++ b/src/openrct2/interface/Viewport.h @@ -78,9 +78,9 @@ enum { }; struct viewport_interaction_info { - sint32 type; - sint32 x; - sint32 y; + int32_t type; + int32_t x; + int32_t y; union { rct_tile_element *tileElement; rct_sprite *sprite; @@ -96,39 +96,39 @@ struct viewport_interaction_info { * A reference counter for whether something is forcing the grid lines to show. When the counter * is decremented to 0, the grid lines are hidden. */ -extern uint8 gShowGridLinesRefCount; -extern uint8 gShowLandRightsRefCount; -extern uint8 gShowConstuctionRightsRefCount; +extern uint8_t gShowGridLinesRefCount; +extern uint8_t gShowLandRightsRefCount; +extern uint8_t gShowConstuctionRightsRefCount; // rct2: 0x014234BC extern rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT]; extern rct_viewport *g_music_tracking_viewport; -extern sint16 gSavedViewX; -extern sint16 gSavedViewY; -extern uint8 gSavedViewZoom; -extern uint8 gSavedViewRotation; +extern int16_t gSavedViewX; +extern int16_t gSavedViewY; +extern uint8_t gSavedViewZoom; +extern uint8_t gSavedViewRotation; extern paint_entry *gNextFreePaintStruct; -extern uint8 gCurrentRotation; -extern uint32 gCurrentViewportFlags; +extern uint8_t gCurrentRotation; +extern uint32_t gCurrentViewportFlags; void viewport_init_all(); -void centre_2d_coordinates(sint32 x, sint32 y, sint32 z, sint32 * out_x, sint32 * out_y, rct_viewport * viewport); -void viewport_create(rct_window *w, sint32 x, sint32 y, sint32 width, sint32 height, sint32 zoom, sint32 centre_x, sint32 centre_y, sint32 centre_z, char flags, sint16 sprite); +void centre_2d_coordinates(int32_t x, int32_t y, int32_t z, int32_t * out_x, int32_t * out_y, rct_viewport * viewport); +void viewport_create(rct_window *w, int32_t x, int32_t y, int32_t width, int32_t height, int32_t zoom, int32_t centre_x, int32_t centre_y, int32_t centre_z, char flags, int16_t sprite); void viewport_update_position(rct_window *window); void viewport_update_sprite_follow(rct_window *window); void viewport_update_smart_sprite_follow(rct_window * window); void viewport_update_smart_guest_follow(rct_window * window, rct_peep * peep); void viewport_update_smart_staff_follow(rct_window * window, rct_peep * peep); void viewport_update_smart_vehicle_follow(rct_window * window); -void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, sint32 left, sint32 top, sint32 right, sint32 bottom); -void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, sint16 left, sint16 top, sint16 right, sint16 bottom); +void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, int32_t left, int32_t top, int32_t right, int32_t bottom); +void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int16_t left, int16_t top, int16_t right, int16_t bottom); -void viewport_adjust_for_map_height(sint16* x, sint16* y, sint16 *z); +void viewport_adjust_for_map_height(int16_t* x, int16_t* y, int16_t *z); -LocationXY16 screen_coord_to_viewport_coord(rct_viewport *viewport, uint16 x, uint16 y); -LocationXY16 viewport_coord_to_map_coord(sint32 x, sint32 y, sint32 z); -void screen_pos_to_map_pos(sint16 *x, sint16 *y, sint32 *direction); +LocationXY16 screen_coord_to_viewport_coord(rct_viewport *viewport, uint16_t x, uint16_t y); +LocationXY16 viewport_coord_to_map_coord(int32_t x, int32_t y, int32_t z); +void screen_pos_to_map_pos(int16_t *x, int16_t *y, int32_t *direction); void show_gridlines(); void hide_gridlines(); @@ -136,34 +136,34 @@ void show_land_rights(); void hide_land_rights(); void show_construction_rights(); void hide_construction_rights(); -void viewport_set_visibility(uint8 mode); +void viewport_set_visibility(uint8_t mode); -void get_map_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 flags, sint16 *x, sint16 *y, sint32 *interactionType, rct_tile_element **tileElement, rct_viewport **viewport); -void get_map_coordinates_from_pos_window(rct_window * window, sint32 screenX, sint32 screenY, sint32 flags, sint16 * x, sint16 * y, - sint32 * interactionType, rct_tile_element ** tileElement, rct_viewport ** viewport); +void get_map_coordinates_from_pos(int32_t screenX, int32_t screenY, int32_t flags, int16_t *x, int16_t *y, int32_t *interactionType, rct_tile_element **tileElement, rct_viewport **viewport); +void get_map_coordinates_from_pos_window(rct_window * window, int32_t screenX, int32_t screenY, int32_t flags, int16_t * x, int16_t * y, + int32_t * interactionType, rct_tile_element ** tileElement, rct_viewport ** viewport); -sint32 viewport_interaction_get_item_left(sint32 x, sint32 y, viewport_interaction_info *info); -sint32 viewport_interaction_left_over(sint32 x, sint32 y); -sint32 viewport_interaction_left_click(sint32 x, sint32 y); -sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interaction_info *info); -sint32 viewport_interaction_right_over(sint32 x, sint32 y); -sint32 viewport_interaction_right_click(sint32 x, sint32 y); -void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *direction, rct_tile_element **tileElement); +int32_t viewport_interaction_get_item_left(int32_t x, int32_t y, viewport_interaction_info *info); +int32_t viewport_interaction_left_over(int32_t x, int32_t y); +int32_t viewport_interaction_left_click(int32_t x, int32_t y); +int32_t viewport_interaction_get_item_right(int32_t x, int32_t y, viewport_interaction_info *info); +int32_t viewport_interaction_right_over(int32_t x, int32_t y); +int32_t viewport_interaction_right_click(int32_t x, int32_t y); +void sub_68A15E(int32_t screenX, int32_t screenY, int16_t *x, int16_t *y, int32_t *direction, rct_tile_element **tileElement); -void sub_68B2B7(paint_session * session, sint32 x, sint32 y); +void sub_68B2B7(paint_session * session, int32_t x, int32_t y); void sub_68862C(rct_drawpixelinfo * dpi, paint_struct * ps); -void viewport_invalidate(rct_viewport *viewport, sint32 left, sint32 top, sint32 right, sint32 bottom); +void viewport_invalidate(rct_viewport *viewport, int32_t left, int32_t top, int32_t right, int32_t bottom); -void screen_get_map_xy(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, rct_viewport **viewport); -void screen_get_map_xy_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY); -void screen_get_map_xy_quadrant(sint16 screenX, sint16 screenY, sint16 *mapX, sint16 *mapY, uint8 *quadrant); -void screen_get_map_xy_quadrant_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY, uint8 *quadrant); -void screen_get_map_xy_side(sint16 screenX, sint16 screenY, sint16 *mapX, sint16 *mapY, uint8 *side); -void screen_get_map_xy_side_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY, uint8 *side); +void screen_get_map_xy(int32_t screenX, int32_t screenY, int16_t *x, int16_t *y, rct_viewport **viewport); +void screen_get_map_xy_with_z(int16_t screenX, int16_t screenY, int16_t z, int16_t *mapX, int16_t *mapY); +void screen_get_map_xy_quadrant(int16_t screenX, int16_t screenY, int16_t *mapX, int16_t *mapY, uint8_t *quadrant); +void screen_get_map_xy_quadrant_with_z(int16_t screenX, int16_t screenY, int16_t z, int16_t *mapX, int16_t *mapY, uint8_t *quadrant); +void screen_get_map_xy_side(int16_t screenX, int16_t screenY, int16_t *mapX, int16_t *mapY, uint8_t *side); +void screen_get_map_xy_side_with_z(int16_t screenX, int16_t screenY, int16_t z, int16_t *mapX, int16_t *mapY, uint8_t *side); -uint8 get_current_rotation(); -sint16 get_height_marker_offset(); +uint8_t get_current_rotation(); +int16_t get_height_marker_offset(); void viewport_set_saved_view(); diff --git a/src/openrct2/interface/Widget.h b/src/openrct2/interface/Widget.h index 88ee6327c3..4f2e46de3b 100644 --- a/src/openrct2/interface/Widget.h +++ b/src/openrct2/interface/Widget.h @@ -62,9 +62,9 @@ bool widget_is_disabled(rct_window *w, rct_widgetindex widgetIndex); bool widget_is_pressed(rct_window *w, rct_widgetindex widgetIndex); bool widget_is_highlighted(rct_window *w, rct_widgetindex widgetIndex); bool widget_is_active_tool(rct_window *w, rct_widgetindex widgetIndex); -void widget_scroll_get_part(rct_window *w, rct_widget* widget, sint32 x, sint32 y, sint32 *output_x, sint32 *output_y, sint32 *output_scroll_area, sint32 *scroll_id); +void widget_scroll_get_part(rct_window *w, rct_widget* widget, int32_t x, int32_t y, int32_t *output_x, int32_t *output_y, int32_t *output_scroll_area, int32_t *scroll_id); void widget_set_enabled(rct_window *w, rct_widgetindex widgetIndex, bool enabled); -void widget_set_checkbox_value(rct_window *w, rct_widgetindex widgetIndex, sint32 value); +void widget_set_checkbox_value(rct_window *w, rct_widgetindex widgetIndex, int32_t value); #endif diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index e6e726f9ea..e8497f83ae 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -38,20 +38,20 @@ std::vector> g_window_list; rct_window * gWindowAudioExclusive; -uint16 TextInputDescriptionArgs[4]; +uint16_t TextInputDescriptionArgs[4]; widget_identifier gCurrentTextBox = { { 255, 0 }, 0 }; char gTextBoxInput[TEXT_INPUT_SIZE] = { 0 }; -sint32 gMaxTextBoxInputLength = 0; -sint32 gTextBoxFrameNo = 0; +int32_t gMaxTextBoxInputLength = 0; +int32_t gTextBoxFrameNo = 0; bool gUsingWidgetTextBox = false; TextInputSession * gTextInput; -uint16 gWindowUpdateTicks; -uint16 gWindowMapFlashingFlags; +uint16_t gWindowUpdateTicks; +uint16_t gWindowMapFlashingFlags; colour_t gCurrentWindowColours[4]; -// converted from uint16 values at 0x009A41EC - 0x009A4230 +// converted from uint16_t values at 0x009A41EC - 0x009A4230 // these are percentage coordinates of the viewport to centre to, if a window is obscuring a location, the next is tried static constexpr const float window_scroll_locations[][2] = { {0.5f, 0.5f}, @@ -73,8 +73,8 @@ static constexpr const float window_scroll_locations[][2] = { {0.125f, 0.125f}, }; -static sint32 window_draw_split(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, sint32 right, sint32 bottom); -static void window_draw_single(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, sint32 right, sint32 bottom); +static int32_t window_draw_split(rct_drawpixelinfo *dpi, rct_window *w, int32_t left, int32_t top, int32_t right, int32_t bottom); +static void window_draw_single(rct_drawpixelinfo *dpi, rct_window *w, int32_t left, int32_t top, int32_t right, int32_t bottom); size_t window_get_index(const rct_window* w) { @@ -157,10 +157,10 @@ void window_update_all() windowManager->UpdateMouseWheel(); } -static void window_close_surplus(sint32 cap, sint8 avoid_classification) +static void window_close_surplus(int32_t cap, int8_t avoid_classification) { //find the amount of windows that are currently open - auto count = (sint32)g_window_list.size(); + auto count = (int32_t)g_window_list.size(); //difference between amount open and cap = amount to close auto diff = count - WINDOW_LIMIT_RESERVED - cap; for (auto i = 0; i < diff; i++) @@ -186,10 +186,10 @@ static void window_close_surplus(sint32 cap, sint8 avoid_classification) /* * Changes the maximum amount of windows allowed */ -void window_set_window_limit(sint32 value) +void window_set_window_limit(int32_t value) { - sint32 prev = gConfigGeneral.window_limit; - sint32 val = Math::Clamp(WINDOW_LIMIT_MIN, value, WINDOW_LIMIT_MAX); + int32_t prev = gConfigGeneral.window_limit; + int32_t val = Math::Clamp(WINDOW_LIMIT_MIN, value, WINDOW_LIMIT_MAX); gConfigGeneral.window_limit = val; config_save_default(); // Checks if value decreases and then closes surplus @@ -369,7 +369,7 @@ void window_close_all_except_class(rct_windowclass cls) /** * Closes all windows, save for those having any of the passed flags. */ -void window_close_all_except_flags(uint16 flags) +void window_close_all_except_flags(uint16_t flags) { for (size_t i = g_window_list.size(); i > 0; i--) { @@ -385,7 +385,7 @@ void window_close_all_except_flags(uint16 flags) * * rct2: 0x006EA845 */ -rct_window *window_find_from_point(sint32 x, sint32 y) +rct_window *window_find_from_point(int32_t x, int32_t y) { for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++) { @@ -414,14 +414,14 @@ rct_window *window_find_from_point(sint32 x, sint32 y) * returns widget_index (edx) * EDI NEEDS TO BE SET TO w->widgets[widget_index] AFTER */ -rct_widgetindex window_find_widget_from_point(rct_window *w, sint32 x, sint32 y) +rct_widgetindex window_find_widget_from_point(rct_window *w, int32_t x, int32_t y) { // Invalidate the window window_event_invalidate_call(w); // Find the widget at point x, y rct_widgetindex widget_index = -1; - for (sint32 i = 0;; i++) { + for (int32_t i = 0;; i++) { rct_widget *widget = &w->widgets[i]; if (widget->type == WWT_LAST) { break; @@ -507,7 +507,7 @@ void widget_invalidate(rct_window *w, rct_widgetindex widgetIndex) assert(w != nullptr); #ifdef DEBUG - for (sint32 i = 0; i <= widgetIndex; i++) { + for (int32_t i = 0; i <= widgetIndex; i++) { assert(w->widgets[i].type != WWT_LAST); } #endif @@ -556,7 +556,7 @@ void widget_invalidate_by_number(rct_windowclass cls, rct_windownumber number, r */ void window_update_scroll_widgets(rct_window *w) { - sint32 scrollIndex, width, height, scrollPositionChanged; + int32_t scrollIndex, width, height, scrollPositionChanged; rct_widgetindex widgetIndex; rct_scroll *scroll; rct_widget *widget; @@ -600,9 +600,9 @@ void window_update_scroll_widgets(rct_window *w) } } -sint32 window_get_scroll_data_index(rct_window *w, rct_widgetindex widget_index) +int32_t window_get_scroll_data_index(rct_window *w, rct_widgetindex widget_index) { - sint32 i, result; + int32_t i, result; result = 0; assert(w != nullptr); @@ -644,7 +644,7 @@ rct_window *window_bring_to_front(rct_window *w) if (w->x + w->width < 20) { - sint32 i = 20 - w->x; + int32_t i = 20 - w->x; w->x += i; if (w->viewport != nullptr) w->viewport->x += i; @@ -655,7 +655,7 @@ rct_window *window_bring_to_front(rct_window *w) return w; } -rct_window *window_bring_to_front_by_class_with_flags(rct_windowclass cls, uint16 flags) +rct_window *window_bring_to_front_by_class_with_flags(rct_windowclass cls, uint16_t flags) { rct_window* w; @@ -718,7 +718,7 @@ void window_push_others_right(rct_window* window) window_invalidate(w.get()); if (window->x + window->width + 13 >= context_get_width()) continue; - uint16 push_amount = window->x + window->width - w->x + 3; + uint16_t push_amount = window->x + window->width - w->x + 3; w->x += push_amount; window_invalidate(w.get()); if (w->viewport != nullptr) @@ -732,7 +732,7 @@ void window_push_others_right(rct_window* window) */ void window_push_others_below(rct_window *w1) { - sint32 push_amount; + int32_t push_amount; // Enumerate through all other windows for (auto& w2 : g_window_list) @@ -791,7 +791,7 @@ rct_window *window_get_main() */ void window_scroll_to_viewport(rct_window *w) { - sint32 x, y, z; + int32_t x, y, z; rct_window *mainWindow; assert(w != nullptr); // In original checked to make sure x and y were not -1 as well. @@ -814,7 +814,7 @@ void window_scroll_to_viewport(rct_window *w) window_scroll_to_location(mainWindow, x, y, z); } -void window_set_location(rct_window *w, sint32 x, sint32 y, sint32 z) +void window_set_location(rct_window *w, int32_t x, int32_t y, int32_t z) { window_scroll_to_location(w, x, y, z); w->flags &= ~WF_SCROLLING_TO_LOCATION; @@ -828,12 +828,12 @@ void window_set_location(rct_window *w, sint32 x, sint32 y, sint32 z) * @param y (ecx) * @param z (edx) */ -void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z) +void window_scroll_to_location(rct_window *w, int32_t x, int32_t y, int32_t z) { LocationXYZ16 location_3d = { - /* .x = */ (sint16)x, - /* .y = */ (sint16)y, - /* .z = */ (sint16)z + /* .x = */ (int16_t)x, + /* .y = */ (int16_t)y, + /* .z = */ (int16_t)z }; assert(w != nullptr); @@ -841,7 +841,7 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z) window_unfollow_sprite(w); if (w->viewport) { - sint16 height = tile_element_height(x, y); + int16_t height = tile_element_height(x, y); if (z < height - 16) { if (!(w->viewport->flags & 1 << 0)) { w->viewport->flags |= 1 << 0; @@ -856,14 +856,14 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z) LocationXY16 map_coordinate = coordinate_3d_to_2d(&location_3d, get_current_rotation()); - sint32 i = 0; + int32_t i = 0; if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { bool found = false; while (!found) { - sint16 x2 = w->viewport->x + (sint16)(w->viewport->width * window_scroll_locations[i][0]); - sint16 y2 = w->viewport->y + (sint16)(w->viewport->height * window_scroll_locations[i][1]); + int16_t x2 = w->viewport->x + (int16_t)(w->viewport->width * window_scroll_locations[i][0]); + int16_t y2 = w->viewport->y + (int16_t)(w->viewport->height * window_scroll_locations[i][1]); for (auto w2i = window_get_index(w); w2i <= g_window_list.size(); w2i++) { if (w2i == g_window_list.size()) @@ -873,8 +873,8 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z) } auto& w2 = g_window_list[w2i]; - sint16 x1 = w2->x - 10; - sint16 y1 = w2->y - 10; + int16_t x1 = w2->x - 10; + int16_t y1 = w2->y - 10; if (x2 >= x1 && x2 <= w2->width + x1 + 20) { if (y2 >= y1 && y2 <= w2->height + y1 + 20) @@ -886,7 +886,7 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z) } } } - if (i >= (sint32)Util::CountOf(window_scroll_locations)) + if (i >= (int32_t)Util::CountOf(window_scroll_locations)) { i = 0; found = true; @@ -896,8 +896,8 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z) // rct2: 0x006E7C76 if (w->viewport_target_sprite == SPRITE_INDEX_NULL) { if (!(w->flags & WF_NO_SCROLLING)) { - w->saved_view_x = map_coordinate.x - (sint16)(w->viewport->view_width * window_scroll_locations[i][0]); - w->saved_view_y = map_coordinate.y - (sint16)(w->viewport->view_height * window_scroll_locations[i][1]); + w->saved_view_x = map_coordinate.x - (int16_t)(w->viewport->view_width * window_scroll_locations[i][0]); + w->saved_view_y = map_coordinate.y - (int16_t)(w->viewport->view_height * window_scroll_locations[i][1]); w->flags |= WF_SCROLLING_TO_LOCATION; } } @@ -924,15 +924,15 @@ static void call_event_viewport_rotate_on_all_windows() * 1: clockwise * -1: anti-clockwise */ -void window_rotate_camera(rct_window *w, sint32 direction) +void window_rotate_camera(rct_window *w, int32_t direction) { rct_viewport *viewport = w->viewport; if (viewport == nullptr) return; - sint16 x = (viewport->width >> 1) + viewport->x; - sint16 y = (viewport->height >> 1) + viewport->y; - sint16 z; + int16_t x = (viewport->width >> 1) + viewport->x; + int16_t y = (viewport->height >> 1) + viewport->y; + int16_t z; //has something to do with checking if middle of the viewport is obstructed rct_viewport *other; @@ -952,7 +952,7 @@ void window_rotate_camera(rct_window *w, sint32 direction) gCurrentRotation = (get_current_rotation() + direction) & 3; - sint32 new_x, new_y; + int32_t new_x, new_y; centre_2d_coordinates(x, y, z, &new_x, &new_y, viewport); w->saved_view_x = new_x; @@ -966,22 +966,22 @@ void window_rotate_camera(rct_window *w, sint32 direction) reset_all_sprite_quadrant_placements(); } -void window_viewport_get_map_coords_by_cursor(rct_window *w, sint16 *map_x, sint16 *map_y, sint16 *offset_x, sint16 *offset_y) +void window_viewport_get_map_coords_by_cursor(rct_window *w, int16_t *map_x, int16_t *map_y, int16_t *offset_x, int16_t *offset_y) { // Get mouse position to offset against. - sint32 mouse_x, mouse_y; + int32_t mouse_x, mouse_y; context_get_cursor_position_scaled(&mouse_x, &mouse_y); // Compute map coordinate by mouse position. get_map_coordinates_from_pos(mouse_x, mouse_y, VIEWPORT_INTERACTION_MASK_NONE, map_x, map_y, nullptr, nullptr, nullptr); // Get viewport coordinates centring around the tile. - sint32 base_height = tile_element_height(*map_x, *map_y); - sint32 dest_x, dest_y; + int32_t base_height = tile_element_height(*map_x, *map_y); + int32_t dest_x, dest_y; centre_2d_coordinates(*map_x, *map_y, base_height, &dest_x, &dest_y, w->viewport); // Rebase mouse position onto centre of window, and compensate for zoom level. - sint32 rebased_x = ((w->width >> 1) - mouse_x) * (1 << w->viewport->zoom), + int32_t rebased_x = ((w->width >> 1) - mouse_x) * (1 << w->viewport->zoom), rebased_y = ((w->height >> 1) - mouse_y) * (1 << w->viewport->zoom); // Compute cursor offset relative to tile. @@ -989,19 +989,19 @@ void window_viewport_get_map_coords_by_cursor(rct_window *w, sint16 *map_x, sint *offset_y = (w->saved_view_y - (dest_y + rebased_y)) * (1 << w->viewport->zoom); } -void window_viewport_centre_tile_around_cursor(rct_window *w, sint16 map_x, sint16 map_y, sint16 offset_x, sint16 offset_y) +void window_viewport_centre_tile_around_cursor(rct_window *w, int16_t map_x, int16_t map_y, int16_t offset_x, int16_t offset_y) { // Get viewport coordinates centring around the tile. - sint32 dest_x, dest_y; - sint32 base_height = tile_element_height(map_x, map_y); + int32_t dest_x, dest_y; + int32_t base_height = tile_element_height(map_x, map_y); centre_2d_coordinates(map_x, map_y, base_height, &dest_x, &dest_y, w->viewport); // Get mouse position to offset against. - sint32 mouse_x, mouse_y; + int32_t mouse_x, mouse_y; context_get_cursor_position_scaled(&mouse_x, &mouse_y); // Rebase mouse position onto centre of window, and compensate for zoom level. - sint32 rebased_x = ((w->width >> 1) - mouse_x) * (1 << w->viewport->zoom), + int32_t rebased_x = ((w->width >> 1) - mouse_x) * (1 << w->viewport->zoom), rebased_y = ((w->height >> 1) - mouse_y) * (1 << w->viewport->zoom); // Apply offset to the viewport. @@ -1009,7 +1009,7 @@ void window_viewport_centre_tile_around_cursor(rct_window *w, sint16 map_x, sint w->saved_view_y = dest_y + rebased_y + (offset_y / (1 << w->viewport->zoom)); } -void window_zoom_set(rct_window *w, sint32 zoomLevel, bool atCursor) +void window_zoom_set(rct_window *w, int32_t zoomLevel, bool atCursor) { rct_viewport* v = w->viewport; @@ -1018,10 +1018,10 @@ void window_zoom_set(rct_window *w, sint32 zoomLevel, bool atCursor) return; // Zooming to cursor? Remember where we're pointing at the moment. - sint16 saved_map_x = 0; - sint16 saved_map_y = 0; - sint16 offset_x = 0; - sint16 offset_y = 0; + int16_t saved_map_x = 0; + int16_t saved_map_y = 0; + int16_t offset_x = 0; + int16_t offset_y = 0; if (gConfigGeneral.zoom_to_cursor && atCursor) { window_viewport_get_map_coords_by_cursor(w, &saved_map_x, &saved_map_y, &offset_x, &offset_y); } @@ -1093,7 +1093,7 @@ void main_window_zoom(bool zoomIn, bool atCursor) { * right (dx) * bottom (bp) */ -void window_draw(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, sint32 right, sint32 bottom) +void window_draw(rct_drawpixelinfo *dpi, rct_window *w, int32_t left, int32_t top, int32_t right, int32_t bottom) { if (!window_is_visible(w)) return; @@ -1102,10 +1102,10 @@ void window_draw(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, return; // Clamp region - left = std::max(left, w->x); - top = std::max(top, w->y); - right = std::min(right, w->x + w->width); - bottom = std::min(bottom, w->y + w->height); + left = std::max(left, w->x); + top = std::max(top, w->y); + right = std::min(right, w->x + w->width); + bottom = std::min(bottom, w->y + w->height); if (left >= right) return; if (top >= bottom) return; @@ -1125,7 +1125,7 @@ void window_draw(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, * Splits a drawing of a window into regions that can be seen and are not hidden * by other opaque overlapping windows. */ -static sint32 window_draw_split(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, sint32 right, sint32 bottom) +static int32_t window_draw_split(rct_drawpixelinfo *dpi, rct_window *w, int32_t left, int32_t top, int32_t right, int32_t bottom) { // Divide the draws up for only the visible regions of the window recursively for (auto i = window_get_index(w) + 1; i < g_window_list.size(); i++) @@ -1166,14 +1166,14 @@ static sint32 window_draw_split(rct_drawpixelinfo *dpi, rct_window *w, sint32 le return 0; } -static void window_draw_single(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, sint32 right, sint32 bottom) +static void window_draw_single(rct_drawpixelinfo *dpi, rct_window *w, int32_t left, int32_t top, int32_t right, int32_t bottom) { // Copy dpi so we can crop it rct_drawpixelinfo copy = *dpi; dpi = © // Clamp left to 0 - sint32 overflow = left - dpi->x; + int32_t overflow = left - dpi->x; if (overflow > 0) { dpi->x += overflow; dpi->width -= overflow; @@ -1235,12 +1235,12 @@ void window_draw_viewport(rct_drawpixelinfo *dpi, rct_window *w) viewport_render(dpi, w->viewport, dpi->x, dpi->y, dpi->x + dpi->width, dpi->y + dpi->height); } -void window_set_position(rct_window *w, sint32 x, sint32 y) +void window_set_position(rct_window *w, int32_t x, int32_t y) { window_move_position(w, x - w->x, y - w->y); } -void window_move_position(rct_window *w, sint32 dx, sint32 dy) +void window_move_position(rct_window *w, int32_t dx, int32_t dy) { if (dx == 0 && dy == 0) return; @@ -1260,9 +1260,9 @@ void window_move_position(rct_window *w, sint32 dx, sint32 dy) window_invalidate(w); } -void window_resize(rct_window *w, sint32 dw, sint32 dh) +void window_resize(rct_window *w, int32_t dw, int32_t dh) { - sint32 i; + int32_t i; if (dw == 0 && dh == 0) return; @@ -1270,8 +1270,8 @@ void window_resize(rct_window *w, sint32 dw, sint32 dh) window_invalidate(w); // Clamp new size to minimum and maximum - w->width = Math::Clamp(w->min_width, w->width + dw, w->max_width); - w->height = Math::Clamp(w->min_height, w->height + dh, w->max_height); + w->width = Math::Clamp(w->min_width, w->width + dw, w->max_width); + w->height = Math::Clamp(w->min_height, w->height + dh, w->max_height); window_event_resize_call(w); window_event_invalidate_call(w); @@ -1287,7 +1287,7 @@ void window_resize(rct_window *w, sint32 dw, sint32 dh) window_invalidate(w); } -void window_set_resize(rct_window *w, sint32 minWidth, sint32 minHeight, sint32 maxWidth, sint32 maxHeight) +void window_set_resize(rct_window *w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight) { w->min_width = minWidth; w->min_height = minHeight; @@ -1295,8 +1295,8 @@ void window_set_resize(rct_window *w, sint32 minWidth, sint32 minHeight, sint32 w->max_height = maxHeight; // Clamp width and height to minimum and maximum - sint32 width = Math::Clamp(minWidth, w->width, maxWidth); - sint32 height = Math::Clamp(minHeight, w->height, maxHeight); + int32_t width = Math::Clamp(minWidth, w->width, maxWidth); + int32_t height = Math::Clamp(minHeight, w->height, maxHeight); // Resize window if size has changed if (w->width != width || w->height != height) { @@ -1397,7 +1397,7 @@ void window_event_mouse_down_call(rct_window *w, rct_widgetindex widgetIndex) w->event_handlers->mouse_down(w, widgetIndex, &w->widgets[widgetIndex]); } -void window_event_dropdown_call(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex) +void window_event_dropdown_call(rct_window *w, rct_widgetindex widgetIndex, int32_t dropdownIndex) { if (w->event_handlers->dropdown != nullptr) w->event_handlers->dropdown(w, widgetIndex, dropdownIndex); @@ -1427,25 +1427,25 @@ void window_event_unknown_08_call(rct_window *w) w->event_handlers->unknown_08(w); } -void window_event_tool_update_call(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_event_tool_update_call(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (w->event_handlers->tool_update != nullptr) w->event_handlers->tool_update(w, widgetIndex, x, y); } -void window_event_tool_down_call(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_event_tool_down_call(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (w->event_handlers->tool_down != nullptr) w->event_handlers->tool_down(w, widgetIndex, x, y); } -void window_event_tool_drag_call(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_event_tool_drag_call(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (w->event_handlers->tool_drag != nullptr) w->event_handlers->tool_drag(w, widgetIndex, x, y); } -void window_event_tool_up_call(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +void window_event_tool_up_call(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { if (w->event_handlers->tool_up != nullptr) w->event_handlers->tool_up(w, widgetIndex, x, y); @@ -1463,26 +1463,26 @@ void window_event_unknown_0E_call(rct_window *w) w->event_handlers->unknown_0E(w); } -void window_get_scroll_size(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height) +void window_get_scroll_size(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height) { if (w->event_handlers->get_scroll_size != nullptr) { w->event_handlers->get_scroll_size(w, scrollIndex, width, height); } } -void window_event_scroll_mousedown_call(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_event_scroll_mousedown_call(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { if (w->event_handlers->scroll_mousedown != nullptr) w->event_handlers->scroll_mousedown(w, scrollIndex, x, y); } -void window_event_scroll_mousedrag_call(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_event_scroll_mousedrag_call(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { if (w->event_handlers->scroll_mousedrag != nullptr) w->event_handlers->scroll_mousedrag(w, scrollIndex, x, y); } -void window_event_scroll_mouseover_call(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y) +void window_event_scroll_mouseover_call(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y) { if (w->event_handlers->scroll_mouseover != nullptr) w->event_handlers->scroll_mouseover(w, scrollIndex, x, y); @@ -1500,7 +1500,7 @@ void window_event_viewport_rotate_call(rct_window *w) w->event_handlers->viewport_rotate(w); } -void window_event_unknown_15_call(rct_window *w, sint32 scrollIndex, sint32 scrollAreaType) +void window_event_unknown_15_call(rct_window *w, int32_t scrollIndex, int32_t scrollAreaType) { if (w->event_handlers->unknown_15 != nullptr) w->event_handlers->unknown_15(w, scrollIndex, scrollAreaType); @@ -1514,15 +1514,15 @@ rct_string_id window_event_tooltip_call(rct_window *w, rct_widgetindex widgetInd return result; } -sint32 window_event_cursor_call(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y) +int32_t window_event_cursor_call(rct_window *w, rct_widgetindex widgetIndex, int32_t x, int32_t y) { - sint32 cursorId = CURSOR_ARROW; + int32_t cursorId = CURSOR_ARROW; if (w->event_handlers->cursor != nullptr) w->event_handlers->cursor(w, widgetIndex, x, y, &cursorId); return cursorId; } -void window_event_moved_call(rct_window *w, sint32 x, sint32 y) +void window_event_moved_call(rct_window *w, int32_t x, int32_t y) { if (w->event_handlers->moved != nullptr) w->event_handlers->moved(w, x, y); @@ -1540,7 +1540,7 @@ void window_event_paint_call(rct_window *w, rct_drawpixelinfo *dpi) w->event_handlers->paint(w, dpi); } -void window_event_scroll_paint_call(rct_window *w, rct_drawpixelinfo *dpi, sint32 scrollIndex) +void window_event_scroll_paint_call(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex) { if (w->event_handlers->scroll_paint != nullptr) w->event_handlers->scroll_paint(w, dpi, scrollIndex); @@ -1551,7 +1551,7 @@ void window_event_scroll_paint_call(rct_window *w, rct_drawpixelinfo *dpi, sint3 * the two locations. * rct2: New function not from rct2 */ -void window_bubble_list_item(rct_window* w, sint32 item_position){ +void window_bubble_list_item(rct_window* w, int32_t item_position){ char swap = w->list_item_positions[item_position]; w->list_item_positions[item_position] = w->list_item_positions[item_position + 1]; w->list_item_positions[item_position + 1] = swap; @@ -1563,9 +1563,9 @@ void window_bubble_list_item(rct_window* w, sint32 item_position){ * Called after a window resize to move windows if they * are going to be out of sight. */ -void window_relocate_windows(sint32 width, sint32 height) +void window_relocate_windows(int32_t width, int32_t height) { - sint32 new_location = 8; + int32_t new_location = 8; for (auto& w : g_window_list) { // Work out if the window requires moving @@ -1585,8 +1585,8 @@ void window_relocate_windows(sint32 width, sint32 height) } // Calculate the new locations - sint32 x = w->x; - sint32 y = w->y; + int32_t x = w->x; + int32_t y = w->y; w->x = new_location; w->y = new_location + TOP_TOOLBAR_HEIGHT + 1; @@ -1605,7 +1605,7 @@ void window_relocate_windows(sint32 width, sint32 height) /** * rct2: 0x0066B905 */ -void window_resize_gui(sint32 width, sint32 height) +void window_resize_gui(int32_t width, int32_t height) { if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)){ window_resize_gui_scenario_editor(width, height); @@ -1660,7 +1660,7 @@ void window_resize_gui(sint32 width, sint32 height) /** * rct2: 0x0066F0DD */ -void window_resize_gui_scenario_editor(sint32 width, sint32 height) +void window_resize_gui_scenario_editor(int32_t width, int32_t height) { rct_window* mainWind = window_get_main(); if (mainWind != nullptr) { @@ -1693,8 +1693,8 @@ void window_resize_gui_scenario_editor(sint32 width, sint32 height) /* Based on rct2: 0x6987ED and another version from window_park */ void window_align_tabs(rct_window *w, rct_widgetindex start_tab_id, rct_widgetindex end_tab_id) { - sint32 i, x = w->widgets[start_tab_id].left; - sint32 tab_width = w->widgets[start_tab_id].right - w->widgets[start_tab_id].left; + int32_t i, x = w->widgets[start_tab_id].left; + int32_t tab_width = w->widgets[start_tab_id].right - w->widgets[start_tab_id].left; for (i = start_tab_id; i <= end_tab_id; i++) { if (!(w->disabled_widgets & (1LL << i))) { @@ -1751,7 +1751,7 @@ void window_update_viewport_ride_music() } } -static void window_snap_left(rct_window *w, sint32 proximity) +static void window_snap_left(rct_window *w, int32_t proximity) { auto mainWindow = window_get_main(); auto wBottom = w->y + w->height; @@ -1781,7 +1781,7 @@ static void window_snap_left(rct_window *w, sint32 proximity) w->x = rightMost; } -static void window_snap_top(rct_window *w, sint32 proximity) +static void window_snap_top(rct_window *w, int32_t proximity) { auto mainWindow = window_get_main(); auto wRight = w->x + w->width; @@ -1811,7 +1811,7 @@ static void window_snap_top(rct_window *w, sint32 proximity) w->y = bottomMost; } -static void window_snap_right(rct_window *w, sint32 proximity) +static void window_snap_right(rct_window *w, int32_t proximity) { auto mainWindow = window_get_main(); auto wRight = w->x + w->width; @@ -1830,7 +1830,7 @@ static void window_snap_right(rct_window *w, sint32 proximity) if (w2->x < wLeftProximity || w2->x > wRightProximity) continue; - leftMost = std::min(leftMost, w2->x); + leftMost = std::min(leftMost, w2->x); } auto screenWidth = context_get_width(); @@ -1841,7 +1841,7 @@ static void window_snap_right(rct_window *w, sint32 proximity) w->x = leftMost - w->width; } -static void window_snap_bottom(rct_window *w, sint32 proximity) +static void window_snap_bottom(rct_window *w, int32_t proximity) { auto mainWindow = window_get_main(); auto wRight = w->x + w->width; @@ -1860,7 +1860,7 @@ static void window_snap_bottom(rct_window *w, sint32 proximity) if (w2->y < wTopProximity || w2->y > wBottomProximity) continue; - topMost = std::min(topMost, w2->y); + topMost = std::min(topMost, w2->y); } auto screenHeight = context_get_height(); @@ -1871,11 +1871,11 @@ static void window_snap_bottom(rct_window *w, sint32 proximity) w->y = topMost - w->height; } -void window_move_and_snap(rct_window *w, sint32 newWindowX, sint32 newWindowY, sint32 snapProximity) +void window_move_and_snap(rct_window *w, int32_t newWindowX, int32_t newWindowY, int32_t snapProximity) { - sint32 originalX = w->x; - sint32 originalY = w->y; - sint32 minY = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) ? 1 : TOP_TOOLBAR_HEIGHT + 2; + int32_t originalX = w->x; + int32_t originalY = w->y; + int32_t minY = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) ? 1 : TOP_TOOLBAR_HEIGHT + 2; newWindowY = Math::Clamp(minY, newWindowY, context_get_height() - 34); @@ -1900,7 +1900,7 @@ void window_move_and_snap(rct_window *w, sint32 newWindowX, sint32 newWindowY, s window_set_position(w, newWindowX, newWindowY); } -sint32 window_can_resize(rct_window *w) +int32_t window_can_resize(rct_window *w) { return (w->flags & WF_RESIZABLE) && (w->min_width != w->max_width || w->min_height != w->max_height); } @@ -1914,7 +1914,7 @@ void textinput_cancel() window_close_by_class(WC_TEXTINPUT); } -void window_start_textbox(rct_window *call_w, rct_widgetindex call_widget, rct_string_id existing_text, char * existing_args, sint32 maxLength) +void window_start_textbox(rct_window *call_w, rct_widgetindex call_widget, rct_string_id existing_text, char * existing_args, int32_t maxLength) { if (gUsingWidgetTextBox) window_cancel_textbox(); @@ -2029,7 +2029,7 @@ bool window_is_visible(rct_window* w) * right (dx) * bottom (bp) */ -void window_draw_all(rct_drawpixelinfo *dpi, sint16 left, sint16 top, sint16 right, sint16 bottom) +void window_draw_all(rct_drawpixelinfo *dpi, int16_t left, int16_t top, int16_t right, int16_t bottom) { rct_drawpixelinfo windowDPI; windowDPI.bits = dpi->bits + left + ((dpi->width + dpi->pitch) * top); @@ -2093,7 +2093,7 @@ void window_follow_sprite(rct_window * w, size_t spriteIndex) { if (spriteIndex < MAX_SPRITES || spriteIndex == SPRITE_INDEX_NULL) { - w->viewport_smart_follow_sprite = (uint16)spriteIndex; + w->viewport_smart_follow_sprite = (uint16_t)spriteIndex; } } @@ -2146,10 +2146,10 @@ void widget_scroll_update_thumbs(rct_window *w, rct_widgetindex widget_index) rct_scroll* scroll = &w->scrolls[window_get_scroll_data_index(w, widget_index)]; if (scroll->flags & HSCROLLBAR_VISIBLE) { - sint32 view_size = widget->right - widget->left - 21; + int32_t view_size = widget->right - widget->left - 21; if (scroll->flags & VSCROLLBAR_VISIBLE) view_size -= 11; - sint32 x = scroll->h_left * view_size; + int32_t x = scroll->h_left * view_size; if (scroll->h_right != 0) x /= scroll->h_right; scroll->h_thumb_left = x + 11; @@ -2167,16 +2167,16 @@ void widget_scroll_update_thumbs(rct_window *w, rct_widgetindex widget_index) if(scroll->h_thumb_right - scroll->h_thumb_left < 20) { double barPosition = (scroll->h_thumb_right * 1.0) / view_size; - scroll->h_thumb_left = (uint16)std::lround(scroll->h_thumb_left - (20 * barPosition)); - scroll->h_thumb_right = (uint16)std::lround(scroll->h_thumb_right + (20 * (1 - barPosition))); + scroll->h_thumb_left = (uint16_t)std::lround(scroll->h_thumb_left - (20 * barPosition)); + scroll->h_thumb_right = (uint16_t)std::lround(scroll->h_thumb_right + (20 * (1 - barPosition))); } } if (scroll->flags & VSCROLLBAR_VISIBLE) { - sint32 view_size = widget->bottom - widget->top - 21; + int32_t view_size = widget->bottom - widget->top - 21; if (scroll->flags & HSCROLLBAR_VISIBLE) view_size -= 11; - sint32 y = scroll->v_top * view_size; + int32_t y = scroll->v_top * view_size; if (scroll->v_bottom != 0) y /= scroll->v_bottom; scroll->v_thumb_top = y + 11; @@ -2194,8 +2194,8 @@ void widget_scroll_update_thumbs(rct_window *w, rct_widgetindex widget_index) if(scroll->v_thumb_bottom - scroll->v_thumb_top < 20) { double barPosition = (scroll->v_thumb_bottom * 1.0) / view_size; - scroll->v_thumb_top = (uint16)std::lround(scroll->v_thumb_top - (20 * barPosition)); - scroll->v_thumb_bottom = (uint16)std::lround(scroll->v_thumb_bottom + (20 * (1 - barPosition))); + scroll->v_thumb_top = (uint16_t)std::lround(scroll->v_thumb_top - (20 * barPosition)); + scroll->v_thumb_bottom = (uint16_t)std::lround(scroll->v_thumb_bottom + (20 * (1 - barPosition))); } } diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 659655f193..9fbd2e9a82 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -29,18 +29,18 @@ struct scenario_index_entry; #define TEXT_INPUT_SIZE 1024 #define TOP_TOOLBAR_HEIGHT 27 -extern uint16 TextInputDescriptionArgs[4]; +extern uint16_t TextInputDescriptionArgs[4]; extern char gTextBoxInput[TEXT_INPUT_SIZE]; -extern sint32 gMaxTextBoxInputLength; -extern sint32 gTextBoxFrameNo; +extern int32_t gMaxTextBoxInputLength; +extern int32_t gTextBoxFrameNo; extern bool gUsingWidgetTextBox; extern struct TextInputSession * gTextInput; using wndproc = void(struct rct_window*, union rct_window_event*); -using rct_windowclass = uint8; -using rct_windownumber = uint16; -using rct_widgetindex = sint16; +using rct_windowclass = uint8_t; +using rct_windownumber = uint16_t; +using rct_widgetindex = int16_t; struct window_identifier { rct_windowclass classification; @@ -59,16 +59,16 @@ extern widget_identifier gCurrentTextBox; * size: 0x10 */ struct rct_widget { - uint8 type; // 0x00 - uint8 colour; // 0x01 - sint16 left; // 0x02 - sint16 right; // 0x04 - sint16 top; // 0x06 - sint16 bottom; // 0x08 + uint8_t type; // 0x00 + uint8_t colour; // 0x01 + int16_t left; // 0x02 + int16_t right; // 0x04 + int16_t top; // 0x06 + int16_t bottom; // 0x08 union { // 0x0A - uint32 image; + uint32_t image; rct_string_id text; - uint32 content; + uint32_t content; utf8 * string; }; rct_string_id tooltip; // 0x0E @@ -78,18 +78,18 @@ struct rct_widget { * Viewport structure */ struct rct_viewport { - sint16 width; // 0x00 - sint16 height; // 0x02 - sint16 x; // 0x04 - sint16 y; // 0x06 - sint16 view_x; // 0x08 - sint16 view_y; // 0x0A - sint16 view_width; // 0x0C - sint16 view_height; // 0x0E - uint32 flags; // 0x12 - uint8 zoom; // 0x10 - uint8 var_11; - uint8 visibility; // VISIBILITY_CACHE + int16_t width; // 0x00 + int16_t height; // 0x02 + int16_t x; // 0x04 + int16_t y; // 0x06 + int16_t view_x; // 0x08 + int16_t view_y; // 0x0A + int16_t view_width; // 0x0C + int16_t view_height; // 0x0E + uint32_t flags; // 0x12 + uint8_t zoom; // 0x10 + uint8_t var_11; + uint8_t visibility; // VISIBILITY_CACHE }; /** @@ -97,18 +97,18 @@ struct rct_viewport { * size: 0x12 */ struct rct_scroll { - uint16 flags; // 0x00 - uint16 h_left; // 0x02 - uint16 h_right; // 0x04 - uint16 h_thumb_left; // 0x06 - uint16 h_thumb_right; // 0x08 - uint16 v_top; // 0x0A - uint16 v_bottom; // 0x0C - uint16 v_thumb_top; // 0x0E - uint16 v_thumb_bottom; // 0x10 + uint16_t flags; // 0x00 + uint16_t h_left; // 0x02 + uint16_t h_right; // 0x04 + uint16_t h_thumb_left; // 0x06 + uint16_t h_thumb_right; // 0x08 + uint16_t v_top; // 0x0A + uint16_t v_bottom; // 0x0C + uint16_t v_thumb_top; // 0x0E + uint16_t v_thumb_bottom; // 0x10 }; -constexpr auto WINDOW_SCROLL_UNDEFINED = std::numeric_limits::max(); +constexpr auto WINDOW_SCROLL_UNDEFINED = std::numeric_limits::max(); /** * Viewport focus structure. @@ -116,25 +116,25 @@ constexpr auto WINDOW_SCROLL_UNDEFINED = std::numeric_limits::max(); * Use sprite.type to work out type. */ struct coordinate_focus { - sint16 var_480; - sint16 x; //0x482 - sint16 y; //0x484 & VIEWPORT_FOCUS_Y_MASK - sint16 z; //0x486 - uint8 rotation;//0x488 - uint8 zoom;//0x489 - sint16 width; - sint16 height; + int16_t var_480; + int16_t x; //0x482 + int16_t y; //0x484 & VIEWPORT_FOCUS_Y_MASK + int16_t z; //0x486 + uint8_t rotation;//0x488 + uint8_t zoom;//0x489 + int16_t width; + int16_t height; }; // Type is viewport_target_sprite_id & 0x80000000 != 0 struct sprite_focus { - sint16 var_480; - uint16 sprite_id; //0x482 - uint8 pad_484; - uint8 type; //0x485 & VIEWPORT_FOCUS_TYPE_MASK - uint16 pad_486; - uint8 rotation; //0x488 - uint8 zoom; //0x489 + int16_t var_480; + uint16_t sprite_id; //0x482 + uint8_t pad_484; + uint8_t type; //0x485 & VIEWPORT_FOCUS_TYPE_MASK + uint16_t pad_486; + uint8_t rotation; //0x488 + uint8_t zoom; //0x489 }; #define VIEWPORT_FOCUS_TYPE_MASK 0xC0 @@ -149,72 +149,72 @@ struct rct_window_event_list { void (*mouse_up)(struct rct_window*, rct_widgetindex); void (*resize)(struct rct_window*); void (*mouse_down)(struct rct_window*, rct_widgetindex, rct_widget*); - void (*dropdown)(struct rct_window*, rct_widgetindex, sint32); + void (*dropdown)(struct rct_window*, rct_widgetindex, int32_t); void (*unknown_05)(struct rct_window*); void (*update)(struct rct_window*); void (*unknown_07)(struct rct_window*); void (*unknown_08)(struct rct_window*); - void (*tool_update)(struct rct_window*, rct_widgetindex, sint32, sint32); - void (*tool_down)(struct rct_window*, rct_widgetindex, sint32, sint32); - void (*tool_drag)(struct rct_window*, rct_widgetindex, sint32, sint32); - void (*tool_up)(struct rct_window*, rct_widgetindex, sint32, sint32); + void (*tool_update)(struct rct_window*, rct_widgetindex, int32_t, int32_t); + void (*tool_down)(struct rct_window*, rct_widgetindex, int32_t, int32_t); + void (*tool_drag)(struct rct_window*, rct_widgetindex, int32_t, int32_t); + void (*tool_up)(struct rct_window*, rct_widgetindex, int32_t, int32_t); void (*tool_abort)(struct rct_window*, rct_widgetindex); void (*unknown_0E)(struct rct_window*); - void (*get_scroll_size)(struct rct_window*, sint32, sint32*, sint32*); - void (*scroll_mousedown)(struct rct_window*, sint32, sint32, sint32); - void (*scroll_mousedrag)(struct rct_window*, sint32, sint32, sint32); - void (*scroll_mouseover)(struct rct_window*, sint32, sint32, sint32); + void (*get_scroll_size)(struct rct_window*, int32_t, int32_t*, int32_t*); + void (*scroll_mousedown)(struct rct_window*, int32_t, int32_t, int32_t); + void (*scroll_mousedrag)(struct rct_window*, int32_t, int32_t, int32_t); + void (*scroll_mouseover)(struct rct_window*, int32_t, int32_t, int32_t); void (*text_input)(struct rct_window*, rct_widgetindex, char*); void (*viewport_rotate)(struct rct_window*); - void (*unknown_15)(struct rct_window*, sint32, sint32); + void (*unknown_15)(struct rct_window*, int32_t, int32_t); void (*tooltip)(struct rct_window*, rct_widgetindex, rct_string_id*); - void (*cursor)(struct rct_window*, rct_widgetindex, sint32, sint32, sint32*); - void (*moved)(struct rct_window*, sint32, sint32); + void (*cursor)(struct rct_window*, rct_widgetindex, int32_t, int32_t, int32_t*); + void (*moved)(struct rct_window*, int32_t, int32_t); void (*invalidate)(struct rct_window*); void (*paint)(struct rct_window*, rct_drawpixelinfo*); - void (*scroll_paint)(struct rct_window*, rct_drawpixelinfo*, sint32); + void (*scroll_paint)(struct rct_window*, rct_drawpixelinfo*, int32_t); }; struct campaign_variables { - sint16 campaign_type; - sint16 no_weeks; //0x482 - uint16 ride_id; //0x484 - uint32 pad_486; + int16_t campaign_type; + int16_t no_weeks; //0x482 + uint16_t ride_id; //0x484 + uint32_t pad_486; }; struct new_ride_variables { - sint16 selected_ride_id; //0x480 - sint16 highlighted_ride_id; //0x482 - uint16 pad_484; - uint16 pad_486; - uint16 selected_ride_countdown; //488 + int16_t selected_ride_id; //0x480 + int16_t highlighted_ride_id; //0x482 + uint16_t pad_484; + uint16_t pad_486; + uint16_t selected_ride_countdown; //488 }; struct news_variables { - sint16 var_480; - sint16 var_482; - uint16 var_484; - uint16 var_486; - uint16 var_488; + int16_t var_480; + int16_t var_482; + uint16_t var_484; + uint16_t var_486; + uint16_t var_488; }; struct map_variables { - sint16 rotation; - sint16 var_482; - uint16 var_484; - uint16 var_486; - uint16 var_488; + int16_t rotation; + int16_t var_482; + uint16_t var_484; + uint16_t var_486; + uint16_t var_488; }; struct ride_variables { - sint16 view; - sint32 var_482; - sint32 var_486; + int16_t view; + int32_t var_482; + int32_t var_486; }; struct scenery_variables { - sint16 selected_scenery_id; - sint16 hover_counter; + int16_t selected_scenery_id; + int16_t hover_counter; }; struct track_list_variables { @@ -223,7 +223,7 @@ struct track_list_variables { }; struct error_variables { - uint16 var_480; + uint16_t var_480; }; struct rct_window; @@ -521,7 +521,7 @@ enum TOOL_IDX { TOOL_ENTRANCE_DOWN = 24, }; -using modal_callback = void (*)(sint32 result); +using modal_callback = void (*)(int32_t result); using close_callback = void (*)(); #define WINDOW_LIMIT_MIN 4 @@ -530,8 +530,8 @@ using close_callback = void (*)(); extern rct_window * gWindowAudioExclusive; -extern uint16 gWindowUpdateTicks; -extern uint16 gWindowMapFlashingFlags; +extern uint16_t gWindowUpdateTicks; +extern uint16_t gWindowMapFlashingFlags; extern colour_t gCurrentWindowColours[4]; @@ -542,22 +542,22 @@ void window_dispatch_update_all(); void window_update_all_viewports(); void window_update_all(); -void window_set_window_limit(sint32 value); +void window_set_window_limit(int32_t value); -rct_window *window_create(sint32 x, sint32 y, sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags); -rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags); -rct_window *window_create_centred(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags); +rct_window *window_create(int32_t x, int32_t y, int32_t width, int32_t height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16_t flags); +rct_window *window_create_auto_pos(int32_t width, int32_t height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16_t flags); +rct_window *window_create_centred(int32_t width, int32_t height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16_t flags); void window_close(rct_window *window); void window_close_by_class(rct_windowclass cls); void window_close_by_number(rct_windowclass cls, rct_windownumber number); void window_close_top(); void window_close_all(); void window_close_all_except_class(rct_windowclass cls); -void window_close_all_except_flags(uint16 flags); +void window_close_all_except_flags(uint16_t flags); rct_window *window_find_by_class(rct_windowclass cls); rct_window *window_find_by_number(rct_windowclass cls, rct_windownumber number); -rct_window *window_find_from_point(sint32 x, sint32 y); -rct_widgetindex window_find_widget_from_point(rct_window *w, sint32 x, sint32 y); +rct_window *window_find_from_point(int32_t x, int32_t y); +rct_widgetindex window_find_widget_from_point(rct_window *w, int32_t x, int32_t y); void window_invalidate(rct_window *window); void window_invalidate_by_class(rct_windowclass cls); void window_invalidate_by_number(rct_windowclass cls, rct_windownumber number); @@ -567,11 +567,11 @@ void widget_invalidate_by_class(rct_windowclass cls, rct_widgetindex widgetIndex void widget_invalidate_by_number(rct_windowclass cls, rct_windownumber number, rct_widgetindex widgetIndex); void window_init_scroll_widgets(rct_window *w); void window_update_scroll_widgets(rct_window *w); -sint32 window_get_scroll_data_index(rct_window *w, rct_widgetindex widget_index); +int32_t window_get_scroll_data_index(rct_window *w, rct_widgetindex widget_index); rct_window *window_bring_to_front(rct_window *w); rct_window *window_bring_to_front_by_class(rct_windowclass cls); -rct_window *window_bring_to_front_by_class_with_flags(rct_windowclass cls, uint16 flags); +rct_window *window_bring_to_front_by_class_with_flags(rct_windowclass cls, uint16_t flags); rct_window *window_bring_to_front_by_number(rct_windowclass cls, rct_windownumber number); void window_push_others_right(rct_window *w); @@ -579,28 +579,28 @@ void window_push_others_below(rct_window *w1); rct_window *window_get_main(); -void window_set_location(rct_window *w, sint32 x, sint32 y, sint32 z); +void window_set_location(rct_window *w, int32_t x, int32_t y, int32_t z); void window_scroll_to_viewport(rct_window *w); -void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z); -void window_rotate_camera(rct_window *w, sint32 direction); -void window_viewport_get_map_coords_by_cursor(rct_window *w, sint16 *map_x, sint16 *map_y, sint16 *offset_x, sint16 *offset_y); -void window_viewport_centre_tile_around_cursor(rct_window *w, sint16 map_x, sint16 map_y, sint16 offset_x, sint16 offset_y); -void window_zoom_set(rct_window *w, sint32 zoomLevel, bool atCursor); +void window_scroll_to_location(rct_window *w, int32_t x, int32_t y, int32_t z); +void window_rotate_camera(rct_window *w, int32_t direction); +void window_viewport_get_map_coords_by_cursor(rct_window *w, int16_t *map_x, int16_t *map_y, int16_t *offset_x, int16_t *offset_y); +void window_viewport_centre_tile_around_cursor(rct_window *w, int16_t map_x, int16_t map_y, int16_t offset_x, int16_t offset_y); +void window_zoom_set(rct_window *w, int32_t zoomLevel, bool atCursor); void window_zoom_in(rct_window *w, bool atCursor); void window_zoom_out(rct_window *w, bool atCursor); void main_window_zoom(bool zoomIn, bool atCursor); -void window_show_textinput(rct_window *w, rct_widgetindex widgetIndex, uint16 title, uint16 text, sint32 value); +void window_show_textinput(rct_window *w, rct_widgetindex widgetIndex, uint16_t title, uint16_t text, int32_t value); -void window_draw_all(rct_drawpixelinfo *dpi, sint16 left, sint16 top, sint16 right, sint16 bottom); -void window_draw(rct_drawpixelinfo *dpi, rct_window *w, sint32 left, sint32 top, sint32 right, sint32 bottom); +void window_draw_all(rct_drawpixelinfo *dpi, int16_t left, int16_t top, int16_t right, int16_t bottom); +void window_draw(rct_drawpixelinfo *dpi, rct_window *w, int32_t left, int32_t top, int32_t right, int32_t bottom); void window_draw_widgets(rct_window *w, rct_drawpixelinfo *dpi); void window_draw_viewport(rct_drawpixelinfo *dpi, rct_window *w); -void window_set_position(rct_window *w, sint32 x, sint32 y); -void window_move_position(rct_window *w, sint32 dx, sint32 dy); -void window_resize(rct_window *w, sint32 dw, sint32 dh); -void window_set_resize(rct_window *w, sint32 minWidth, sint32 minHeight, sint32 maxWidth, sint32 maxHeight); +void window_set_position(rct_window *w, int32_t x, int32_t y); +void window_move_position(rct_window *w, int32_t dx, int32_t dy); +void window_resize(rct_window *w, int32_t dw, int32_t dh); +void window_set_resize(rct_window *w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight); bool tool_set(rct_window *w, rct_widgetindex widgetIndex, TOOL_IDX tool); void tool_cancel(); @@ -612,59 +612,59 @@ void window_update_viewport_ride_music(); rct_viewport * window_get_viewport(rct_window * window); // Open window functions -void window_relocate_windows(sint32 width, sint32 height); -void window_resize_gui(sint32 width, sint32 height); -void window_resize_gui_scenario_editor(sint32 width, sint32 height); +void window_relocate_windows(int32_t width, int32_t height); +void window_resize_gui(int32_t width, int32_t height); +void window_resize_gui_scenario_editor(int32_t width, int32_t height); void window_ride_construct(rct_window *w); -void ride_construction_toolupdate_entrance_exit(sint32 screenX, sint32 screenY); -void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY); -void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY); +void ride_construction_toolupdate_entrance_exit(int32_t screenX, int32_t screenY); +void ride_construction_toolupdate_construct(int32_t screenX, int32_t screenY); +void ride_construction_tooldown_construct(int32_t screenX, int32_t screenY); -void window_bubble_list_item(rct_window* w, sint32 item_position); +void window_bubble_list_item(rct_window* w, int32_t item_position); void window_align_tabs( rct_window *w, rct_widgetindex start_tab_id, rct_widgetindex end_tab_id ); void window_staff_list_init_vars(); -void game_command_callback_pickup_guest(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); -void game_command_callback_pickup_staff(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); +void game_command_callback_pickup_guest(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +void game_command_callback_pickup_staff(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); void window_event_close_call(rct_window* w); void window_event_mouse_up_call(rct_window* w, rct_widgetindex widgetIndex); void window_event_resize_call(rct_window* w); void window_event_mouse_down_call(rct_window *w, rct_widgetindex widgetIndex); -void window_event_dropdown_call(rct_window* w, rct_widgetindex widgetIndex, sint32 dropdownIndex); +void window_event_dropdown_call(rct_window* w, rct_widgetindex widgetIndex, int32_t dropdownIndex); void window_event_unknown_05_call(rct_window* w); void window_event_update_call(rct_window *w); void window_event_unknown_07_call(rct_window* w); void window_event_unknown_08_call(rct_window* w); -void window_event_tool_update_call(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -void window_event_tool_down_call(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -void window_event_tool_drag_call(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -void window_event_tool_up_call(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); +void window_event_tool_update_call(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +void window_event_tool_down_call(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +void window_event_tool_drag_call(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +void window_event_tool_up_call(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); void window_event_tool_abort_call(rct_window* w, rct_widgetindex widgetIndex); void window_event_unknown_0E_call(rct_window* w); -void window_get_scroll_size(rct_window *w, sint32 scrollIndex, sint32 *width, sint32 *height); -void window_event_scroll_mousedown_call(rct_window* w, sint32 scrollIndex, sint32 x, sint32 y); -void window_event_scroll_mousedrag_call(rct_window* w, sint32 scrollIndex, sint32 x, sint32 y); -void window_event_scroll_mouseover_call(rct_window* w, sint32 scrollIndex, sint32 x, sint32 y); +void window_get_scroll_size(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); +void window_event_scroll_mousedown_call(rct_window* w, int32_t scrollIndex, int32_t x, int32_t y); +void window_event_scroll_mousedrag_call(rct_window* w, int32_t scrollIndex, int32_t x, int32_t y); +void window_event_scroll_mouseover_call(rct_window* w, int32_t scrollIndex, int32_t x, int32_t y); void window_event_textinput_call(rct_window *w, rct_widgetindex widgetIndex, char *text); void window_event_viewport_rotate_call(rct_window* w); -void window_event_unknown_15_call(rct_window* w, sint32 scrollIndex, sint32 scrollAreaType); +void window_event_unknown_15_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType); rct_string_id window_event_tooltip_call(rct_window* w, rct_widgetindex widgetIndex); -sint32 window_event_cursor_call(rct_window* w, rct_widgetindex widgetIndex, sint32 x, sint32 y); -void window_event_moved_call(rct_window* w, sint32 x, sint32 y); +int32_t window_event_cursor_call(rct_window* w, rct_widgetindex widgetIndex, int32_t x, int32_t y); +void window_event_moved_call(rct_window* w, int32_t x, int32_t y); void window_event_invalidate_call(rct_window* w); void window_event_paint_call(rct_window* w, rct_drawpixelinfo *dpi); -void window_event_scroll_paint_call(rct_window* w, rct_drawpixelinfo *dpi, sint32 scrollIndex); +void window_event_scroll_paint_call(rct_window* w, rct_drawpixelinfo *dpi, int32_t scrollIndex); void invalidate_all_windows_after_input(); void textinput_cancel(); -void window_move_and_snap(rct_window *w, sint32 newWindowX, sint32 newWindowY, sint32 snapProximity); -sint32 window_can_resize(rct_window *w); +void window_move_and_snap(rct_window *w, int32_t newWindowX, int32_t newWindowY, int32_t snapProximity); +int32_t window_can_resize(rct_window *w); -void window_start_textbox(rct_window *call_w, rct_widgetindex call_widget, rct_string_id existing_text, char *existing_args, sint32 maxLength); +void window_start_textbox(rct_window *call_w, rct_widgetindex call_widget, rct_string_id existing_text, char *existing_args, int32_t maxLength); void window_cancel_textbox(); void window_update_textbox_caret(); void window_update_textbox(); @@ -696,11 +696,11 @@ void window_ride_construction_keyboard_shortcut_demolish_current(); void window_follow_sprite(rct_window * w, size_t spriteIndex); void window_unfollow_sprite(rct_window * w); -bool window_ride_construction_update_state(sint32 *trackType, sint32 *trackDirection, sint32 *rideIndex, sint32 *_liftHillAndAlternativeState, sint32 *x, sint32 *y, sint32 *z, sint32 *properties); -money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 liftHillAndAlternativeState, sint32 x, sint32 y, sint32 z); +bool window_ride_construction_update_state(int32_t *trackType, int32_t *trackDirection, int32_t *rideIndex, int32_t *_liftHillAndAlternativeState, int32_t *x, int32_t *y, int32_t *z, int32_t *properties); +money32 place_provisional_track_piece(int32_t rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndAlternativeState, int32_t x, int32_t y, int32_t z); -extern uint64 _enabledRidePieces; -extern uint8 _rideConstructionState2; +extern uint64_t _enabledRidePieces; +extern uint8_t _rideConstructionState2; extern bool _stationConstructed; extern bool _deferClose; diff --git a/src/openrct2/interface/Window_internal.h b/src/openrct2/interface/Window_internal.h index 83e4ed21d0..c92209a017 100644 --- a/src/openrct2/interface/Window_internal.h +++ b/src/openrct2/interface/Window_internal.h @@ -23,28 +23,28 @@ struct rct_object_entry; struct rct_window { rct_window_event_list* event_handlers; // 0x000 rct_viewport* viewport; // 0x004 - uint64 enabled_widgets; // 0x008 - uint64 disabled_widgets; // 0x010 - uint64 pressed_widgets; // 0x018 - uint64 hold_down_widgets; // 0x020 + uint64_t enabled_widgets; // 0x008 + uint64_t disabled_widgets; // 0x010 + uint64_t pressed_widgets; // 0x018 + uint64_t hold_down_widgets; // 0x020 rct_widget* widgets; // 0x028 - sint16 x; // 0x02C - sint16 y; // 0x02E - sint16 width; // 0x030 - sint16 height; // 0x032 - sint16 min_width; // 0x034 - sint16 max_width; // 0x036 - sint16 min_height; // 0x038 - sint16 max_height; // 0x03A + int16_t x; // 0x02C + int16_t y; // 0x02E + int16_t width; // 0x030 + int16_t height; // 0x032 + int16_t min_width; // 0x034 + int16_t max_width; // 0x036 + int16_t min_height; // 0x038 + int16_t max_height; // 0x03A rct_windownumber number; // 0x03C - uint16 flags; // 0x03E + uint16_t flags; // 0x03E rct_scroll scrolls[3]; // 0x040 - uint8 list_item_positions[1024];// 0x076 - uint16 no_list_items; // 0x476 0 for no items - sint16 pad_478; - sint16 selected_list_item; // 0x47A -1 for none selected - sint16 pad_47C; - sint16 pad_47E; + uint8_t list_item_positions[1024];// 0x076 + uint16_t no_list_items; // 0x476 0 for no items + int16_t pad_478; + int16_t selected_list_item; // 0x47A -1 for none selected + int16_t pad_47C; + int16_t pad_47E; union { coordinate_focus viewport_focus_coordinates; sprite_focus viewport_focus_sprite; @@ -57,43 +57,43 @@ struct rct_window { track_list_variables track_list; error_variables error; }; - sint16 page; // 0x48A + int16_t page; // 0x48A union { - sint16 picked_peep_old_x; // 0x48C staff/guest window: peep x gets set to 0x8000 on pickup, this is the old value - sint16 vehicleIndex; // 0x48C Ride window: selected car when setting vehicle colours - sint16 numberOfStaff; // 0x48C Used in park window. - sint16 var_48C; + int16_t picked_peep_old_x; // 0x48C staff/guest window: peep x gets set to 0x8000 on pickup, this is the old value + int16_t vehicleIndex; // 0x48C Ride window: selected car when setting vehicle colours + int16_t numberOfStaff; // 0x48C Used in park window. + int16_t var_48C; }; - uint16 frame_no; // 0x48E updated every tic for motion in windows sprites - uint16 list_information_type; // 0x490 0 for none, Used as current position of marquee in window_peep + uint16_t frame_no; // 0x48E updated every tic for motion in windows sprites + uint16_t list_information_type; // 0x490 0 for none, Used as current position of marquee in window_peep union { - sint16 picked_peep_frame; // 0x492 Animation frame of picked peep in staff window and guest window - sint16 var_492; + int16_t picked_peep_frame; // 0x492 Animation frame of picked peep in staff window and guest window + int16_t var_492; }; union { // 0x494 - uint32 highlighted_item; - uint16 ride_colour; + uint32_t highlighted_item; + uint16_t ride_colour; rct_research_item* research_item; rct_object_entry* object_entry; const scenario_index_entry* highlighted_scenario; struct { - uint16 var_494; - uint16 var_496; + uint16_t var_494; + uint16_t var_496; }; }; - uint8 var_498[0x14]; - sint16 selected_tab; // 0x4AC - sint16 var_4AE; - uint16 viewport_target_sprite; // 0x4B0 viewport target sprite - sint16 saved_view_x; // 0x4B2 - sint16 saved_view_y; // 0x4B4 + uint8_t var_498[0x14]; + int16_t selected_tab; // 0x4AC + int16_t var_4AE; + uint16_t viewport_target_sprite; // 0x4B0 viewport target sprite + int16_t saved_view_x; // 0x4B2 + int16_t saved_view_y; // 0x4B4 rct_windowclass classification; // 0x4B6 - uint8 pad_4B7; - sint8 var_4B8; - sint8 var_4B9; - uint8 colours[6]; // 0x4BA - uint8 visibility; // VISIBILITY_CACHE - uint16 viewport_smart_follow_sprite; // Smart following of sprites. Handles setting viewport target sprite etc + uint8_t pad_4B7; + int8_t var_4B8; + int8_t var_4B9; + uint8_t colours[6]; // 0x4BA + uint8_t visibility; // VISIBILITY_CACHE + uint16_t viewport_smart_follow_sprite; // Smart following of sprites. Handles setting viewport target sprite etc }; // rct2: 0x01420078 diff --git a/src/openrct2/localisation/ConversionTables.cpp b/src/openrct2/localisation/ConversionTables.cpp index a2f71dc3d5..b4e42b4a82 100644 --- a/src/openrct2/localisation/ConversionTables.cpp +++ b/src/openrct2/localisation/ConversionTables.cpp @@ -143,7 +143,7 @@ const encoding_convert_entry RCT2ToUnicodeTable[256] = { 124, FORMAT_INT32 }, { 125, FORMAT_COMMA2DP32 }, { 126, FORMAT_COMMA16 }, - { 127, FORMAT_UINT16 }, + { 127, FORMAT_uint16_t }, { 128, FORMAT_CURRENCY2DP }, { 129, FORMAT_CURRENCY }, { 130, FORMAT_STRINGID }, @@ -274,9 +274,9 @@ const encoding_convert_entry RCT2ToUnicodeTable[256] = { 255, 255 } }; -static sint32 encoding_search_compare(const void *pKey, const void *pEntry) +static int32_t encoding_search_compare(const void *pKey, const void *pEntry) { - uint16 key = *((uint16*)pKey); + uint16_t key = *((uint16_t*)pKey); encoding_convert_entry *entry = (encoding_convert_entry*)pEntry; if (key < entry->code) return -1; if (key > entry->code) return 1; @@ -295,7 +295,7 @@ wchar_t encoding_convert_rct2_to_unicode(wchar_t rct2str) return encoding_convert_x_to_unicode(rct2str, RCT2ToUnicodeTable, Util::CountOf(RCT2ToUnicodeTable)); } -uint32 encoding_convert_unicode_to_rct2(uint32 unicode) +uint32_t encoding_convert_unicode_to_rct2(uint32_t unicode) { // Can't do a binary search as it's sorted by RCT2 code, not unicode for (const auto& entry : RCT2ToUnicodeTable) diff --git a/src/openrct2/localisation/ConversionTables.h b/src/openrct2/localisation/ConversionTables.h index 31dc7f6fe4..daec4de1f1 100644 --- a/src/openrct2/localisation/ConversionTables.h +++ b/src/openrct2/localisation/ConversionTables.h @@ -13,11 +13,11 @@ struct encoding_convert_entry { - uint16 code; - uint32 unicode; + uint16_t code; + uint32_t unicode; }; extern const encoding_convert_entry RCT2ToUnicodeTable[256]; wchar_t encoding_convert_rct2_to_unicode(wchar_t rct2str); -uint32 encoding_convert_unicode_to_rct2(uint32 unicode); +uint32_t encoding_convert_unicode_to_rct2(uint32_t unicode); diff --git a/src/openrct2/localisation/Convert.cpp b/src/openrct2/localisation/Convert.cpp index 4ce9a2a12b..3a21dd0e65 100644 --- a/src/openrct2/localisation/Convert.cpp +++ b/src/openrct2/localisation/Convert.cpp @@ -29,8 +29,8 @@ static std::wstring DecodeToWideChar(const std::string_view& src) if (c == 255) { // Push next two characters - uint8 a = 0; - uint8 b = 0; + uint8_t a = 0; + uint8_t b = 0; if (it != src.end()) { a = *it++; @@ -89,17 +89,17 @@ static std::string Encode(const std::string_view& src) { std::string dst; const utf8 * ch = src.data(); - sint32 codepoint; + int32_t codepoint; while ((codepoint = utf8_get_next(ch, &ch)) != 0) { codepoint = encoding_convert_unicode_to_rct2(codepoint); - if (codepoint <= std::numeric_limits::max()) + if (codepoint <= std::numeric_limits::max()) { dst.push_back(codepoint); } - else if (codepoint <= std::numeric_limits::max()) + else if (codepoint <= std::numeric_limits::max()) { - dst.push_back((char)(uint8)0xFF); + dst.push_back((char)(uint8_t)0xFF); dst.push_back((codepoint >> 8) & 0xFF); dst.push_back(codepoint & 0xFF); } @@ -112,7 +112,7 @@ static std::string Encode(const std::string_view& src) return dst; } -static sint32 GetCodePageForRCT2Language(RCT2LanguageId languageId) +static int32_t GetCodePageForRCT2Language(RCT2LanguageId languageId) { switch (languageId) { diff --git a/src/openrct2/localisation/Currency.h b/src/openrct2/localisation/Currency.h index 74eb89aae3..1c76c88e4a 100644 --- a/src/openrct2/localisation/Currency.h +++ b/src/openrct2/localisation/Currency.h @@ -48,10 +48,10 @@ enum CURRENCY_AFFIX { struct currency_descriptor { char isoCode[4]; // Rate is relative to 0.10 GBP - sint32 rate; - uint8 affix_unicode; + int32_t rate; + uint8_t affix_unicode; utf8 symbol_unicode[CURRENCY_SYMBOL_MAX_SIZE]; - uint8 affix_ascii; + uint8_t affix_ascii; char symbol_ascii[CURRENCY_SYMBOL_MAX_SIZE]; rct_string_id stringId; }; diff --git a/src/openrct2/localisation/Date.h b/src/openrct2/localisation/Date.h index 7c56785467..228945fea9 100644 --- a/src/openrct2/localisation/Date.h +++ b/src/openrct2/localisation/Date.h @@ -33,30 +33,30 @@ enum { }; struct openrct_timeofday { - uint8 second; - uint8 minute; - uint8 hour; + uint8_t second; + uint8_t minute; + uint8_t hour; }; -extern const sint16 days_in_month[MONTH_COUNT]; +extern const int16_t days_in_month[MONTH_COUNT]; extern const rct_string_id DateFormatStringIds[]; extern const rct_string_id DateFormatStringFormatIds[]; -extern uint16 gDateMonthTicks; -extern uint16 gDateMonthsElapsed; +extern uint16_t gDateMonthTicks; +extern uint16_t gDateMonthsElapsed; extern openrct_timeofday gRealTimeOfDay; -sint32 date_get_month(sint32 months); -sint32 date_get_year(sint32 months); -sint32 date_get_total_months(sint32 month, sint32 year); +int32_t date_get_month(int32_t months); +int32_t date_get_year(int32_t months); +int32_t date_get_total_months(int32_t month, int32_t year); void date_reset(); void date_update(); -void date_set(sint32 year, sint32 month, sint32 day); +void date_set(int32_t year, int32_t month, int32_t day); void date_update_real_time_of_day(); -bool date_is_day_start(sint32 monthTicks); -bool date_is_week_start(sint32 monthTicks); -bool date_is_fortnight_start(sint32 monthTicks); -bool date_is_month_start(sint32 monthTicks); +bool date_is_day_start(int32_t monthTicks); +bool date_is_week_start(int32_t monthTicks); +bool date_is_fortnight_start(int32_t monthTicks); +bool date_is_month_start(int32_t monthTicks); #endif diff --git a/src/openrct2/localisation/FormatCodes.cpp b/src/openrct2/localisation/FormatCodes.cpp index 5a2aa9c4ff..9e5b487891 100644 --- a/src/openrct2/localisation/FormatCodes.cpp +++ b/src/openrct2/localisation/FormatCodes.cpp @@ -15,7 +15,7 @@ #pragma region Format codes struct format_code_token { - uint32 code; + uint32_t code; const char *token; }; @@ -41,7 +41,7 @@ static constexpr const format_code_token format_code_tokens[] = { { FORMAT_INT32, "INT32" }, { FORMAT_COMMA2DP32, "COMMA2DP32" }, { FORMAT_COMMA16, "COMMA16" }, - { FORMAT_UINT16, "UINT16" }, + { FORMAT_uint16_t, "uint16_t" }, { FORMAT_CURRENCY2DP, "CURRENCY2DP" }, { FORMAT_CURRENCY, "CURRENCY" }, { FORMAT_STRINGID, "STRINGID" }, @@ -95,9 +95,9 @@ static constexpr const format_code_token format_code_tokens[] = { }; // clang-format on -uint32 format_get_code(const char *token) +uint32_t format_get_code(const char *token) { - for (uint32 i = 0; i < Util::CountOf(format_code_tokens); i++) + for (uint32_t i = 0; i < Util::CountOf(format_code_tokens); i++) { if (_strcmpi(token, format_code_tokens[i].token) == 0) return format_code_tokens[i].code; @@ -105,9 +105,9 @@ uint32 format_get_code(const char *token) return 0; } -const char *format_get_token(uint32 code) +const char *format_get_token(uint32_t code) { - for (uint32 i = 0; i < Util::CountOf(format_code_tokens); i++) + for (uint32_t i = 0; i < Util::CountOf(format_code_tokens); i++) { if (code == format_code_tokens[i].code) return format_code_tokens[i].token; @@ -115,7 +115,7 @@ const char *format_get_token(uint32 code) return nullptr; } -bool utf8_should_use_sprite_for_codepoint(sint32 codepoint) +bool utf8_should_use_sprite_for_codepoint(int32_t codepoint) { switch (codepoint) { case FORMAT_UP: diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index 1fa20e9619..e2f72de70b 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -12,8 +12,8 @@ #include "../common.h" -uint32 format_get_code(const char *token); -const char *format_get_token(uint32 code); +uint32_t format_get_code(const char *token); +const char *format_get_token(uint32_t code); enum { // Font format codes @@ -58,7 +58,7 @@ enum { FORMAT_INT32, FORMAT_COMMA2DP32, FORMAT_COMMA16, - FORMAT_UINT16, + FORMAT_uint16_t, FORMAT_CURRENCY2DP, FORMAT_CURRENCY, FORMAT_STRINGID, diff --git a/src/openrct2/localisation/Language.cpp b/src/openrct2/localisation/Language.cpp index 48458d932e..58f712414a 100644 --- a/src/openrct2/localisation/Language.cpp +++ b/src/openrct2/localisation/Language.cpp @@ -48,18 +48,18 @@ const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = // clang-format on // clang-format off -const utf8 BlackUpArrowString[] = { (utf8)(uint8)0xC2, (utf8)(uint8)0x8E, (utf8)(uint8)0xE2, (utf8)(uint8)0x96, (utf8)(uint8)0xB2, (utf8)(uint8)0x00 }; -const utf8 BlackDownArrowString[] = { (utf8)(uint8)0xC2, (utf8)(uint8)0x8E, (utf8)(uint8)0xE2, (utf8)(uint8)0x96, (utf8)(uint8)0xBC, (utf8)(uint8)0x00 }; -const utf8 BlackLeftArrowString[] = { (utf8)(uint8)0xC2, (utf8)(uint8)0x8E, (utf8)(uint8)0xE2, (utf8)(uint8)0x97, (utf8)(uint8)0x80, (utf8)(uint8)0x00 }; -const utf8 BlackRightArrowString[] = { (utf8)(uint8)0xC2, (utf8)(uint8)0x8E, (utf8)(uint8)0xE2, (utf8)(uint8)0x96, (utf8)(uint8)0xB6, (utf8)(uint8)0x00 }; -const utf8 CheckBoxMarkString[] = { (utf8)(uint8)0xE2, (utf8)(uint8)0x9C, (utf8)(uint8)0x93, (utf8)(uint8)0x00 }; +const utf8 BlackUpArrowString[] = { (utf8)(uint8_t)0xC2, (utf8)(uint8_t)0x8E, (utf8)(uint8_t)0xE2, (utf8)(uint8_t)0x96, (utf8)(uint8_t)0xB2, (utf8)(uint8_t)0x00 }; +const utf8 BlackDownArrowString[] = { (utf8)(uint8_t)0xC2, (utf8)(uint8_t)0x8E, (utf8)(uint8_t)0xE2, (utf8)(uint8_t)0x96, (utf8)(uint8_t)0xBC, (utf8)(uint8_t)0x00 }; +const utf8 BlackLeftArrowString[] = { (utf8)(uint8_t)0xC2, (utf8)(uint8_t)0x8E, (utf8)(uint8_t)0xE2, (utf8)(uint8_t)0x97, (utf8)(uint8_t)0x80, (utf8)(uint8_t)0x00 }; +const utf8 BlackRightArrowString[] = { (utf8)(uint8_t)0xC2, (utf8)(uint8_t)0x8E, (utf8)(uint8_t)0xE2, (utf8)(uint8_t)0x96, (utf8)(uint8_t)0xB6, (utf8)(uint8_t)0x00 }; +const utf8 CheckBoxMarkString[] = { (utf8)(uint8_t)0xE2, (utf8)(uint8_t)0x9C, (utf8)(uint8_t)0x93, (utf8)(uint8_t)0x00 }; // clang-format on void utf8_remove_format_codes(utf8 * text, bool allowcolours) { const utf8 * ch = text; utf8 * dstCh = text; - sint32 codepoint; + int32_t codepoint; while ((codepoint = String::GetNextCodepoint(ch, &ch)) != 0) { if (!utf8_is_format_code(codepoint) || (allowcolours && utf8_is_colour_code(codepoint))) @@ -70,9 +70,9 @@ void utf8_remove_format_codes(utf8 * text, bool allowcolours) *dstCh = 0; } -uint8 language_get_id_from_locale(const char * locale) +uint8_t language_get_id_from_locale(const char * locale) { - uint8 i = 0; + uint8_t i = 0; for (const auto &langDesc : LanguagesDescriptors) { if (String::Equals(locale, langDesc.locale)) @@ -90,7 +90,7 @@ const char * language_get_string(rct_string_id id) return localisationService.GetString(id); } -bool language_open(sint32 id) +bool language_open(int32_t id) { auto context = OpenRCT2::GetContext(); auto& localisationService = context->GetLocalisationService(); @@ -125,7 +125,7 @@ void language_free_object_string(rct_string_id stringId) localisationService.FreeObjectString(stringId); } -rct_string_id language_get_object_override_string_id(const char * identifier, uint8 index) +rct_string_id language_get_object_override_string_id(const char * identifier, uint8_t index) { const auto& localisationService = OpenRCT2::GetContext()->GetLocalisationService(); return localisationService.GetObjectOverrideStringId(identifier, index); diff --git a/src/openrct2/localisation/Language.h b/src/openrct2/localisation/Language.h index e64b2a44fe..aa34f0243d 100644 --- a/src/openrct2/localisation/Language.h +++ b/src/openrct2/localisation/Language.h @@ -85,17 +85,17 @@ extern const utf8 BlackLeftArrowString[]; extern const utf8 BlackRightArrowString[]; extern const utf8 CheckBoxMarkString[]; -uint8 language_get_id_from_locale(const char * locale); +uint8_t language_get_id_from_locale(const char * locale); const char *language_get_string(rct_string_id id); -bool language_open(sint32 id); +bool language_open(int32_t id); -uint32 utf8_get_next(const utf8 *char_ptr, const utf8 **nextchar_ptr); -utf8 *utf8_write_codepoint(utf8 *dst, uint32 codepoint); -sint32 utf8_insert_codepoint(utf8 *dst, uint32 codepoint); +uint32_t utf8_get_next(const utf8 *char_ptr, const utf8 **nextchar_ptr); +utf8 *utf8_write_codepoint(utf8 *dst, uint32_t codepoint); +int32_t utf8_insert_codepoint(utf8 *dst, uint32_t codepoint); bool utf8_is_codepoint_start(const utf8 *text); void utf8_remove_format_codes(utf8 *text, bool allowcolours); -sint32 utf8_get_codepoint_length(sint32 codepoint); -sint32 utf8_length(const utf8 *text); +int32_t utf8_get_codepoint_length(int32_t codepoint); +int32_t utf8_length(const utf8 *text); wchar_t *utf8_to_widechar(const utf8 *src); utf8 *widechar_to_utf8(const wchar_t *src); @@ -103,7 +103,7 @@ std::string rct2_to_utf8(const std::string_view& src, RCT2LanguageId languageId) std::string utf8_to_rct2(const std::string_view& src); bool language_get_localised_scenario_strings(const utf8 *scenarioFilename, rct_string_id *outStringIds); void language_free_object_string(rct_string_id stringId); -rct_string_id language_get_object_override_string_id(const char * identifier, uint8 index); +rct_string_id language_get_object_override_string_id(const char * identifier, uint8_t index); rct_string_id language_allocate_object_string(const std::string &target); #endif diff --git a/src/openrct2/localisation/LanguagePack.cpp b/src/openrct2/localisation/LanguagePack.cpp index f4958339b9..49183186a6 100644 --- a/src/openrct2/localisation/LanguagePack.cpp +++ b/src/openrct2/localisation/LanguagePack.cpp @@ -23,15 +23,15 @@ #include "LanguagePack.h" // Don't try to load more than language files that exceed 64 MiB -constexpr uint64 MAX_LANGUAGE_SIZE = 64 * 1024 * 1024; -constexpr uint64 MAX_OBJECT_OVERRIDES = 4096; -constexpr uint64 MAX_SCENARIO_OVERRIDES = 4096; +constexpr uint64_t MAX_LANGUAGE_SIZE = 64 * 1024 * 1024; +constexpr uint64_t MAX_OBJECT_OVERRIDES = 4096; +constexpr uint64_t MAX_SCENARIO_OVERRIDES = 4096; constexpr rct_string_id ObjectOverrideBase = 0x6000; -constexpr sint32 ObjectOverrideMaxStringCount = 3; +constexpr int32_t ObjectOverrideMaxStringCount = 3; constexpr rct_string_id ScenarioOverrideBase = 0x7000; -constexpr sint32 ScenarioOverrideMaxStringCount = 3; +constexpr int32_t ScenarioOverrideMaxStringCount = 3; struct ObjectOverride { @@ -48,7 +48,7 @@ struct ScenarioOverride class LanguagePack final : public ILanguagePack { private: - uint16 const _id; + uint16_t const _id; std::vector _strings; std::vector _objectOverrides; std::vector _scenarioOverrides; @@ -61,7 +61,7 @@ private: ScenarioOverride * _currentScenarioOverride = nullptr; public: - static LanguagePack * FromFile(uint16 id, const utf8 * path) + static LanguagePack * FromFile(uint16_t id, const utf8 * path) { Guard::ArgumentNotNull(path); @@ -95,12 +95,12 @@ public: return result; } - static LanguagePack * FromText(uint16 id, const utf8 * text) + static LanguagePack * FromText(uint16_t id, const utf8 * text) { return new LanguagePack(id, text); } - LanguagePack(uint16 id, const utf8 * text) + LanguagePack(uint16_t id, const utf8 * text) : _id(id) { Guard::ArgumentNotNull(text); @@ -117,14 +117,14 @@ public: _currentScenarioOverride = nullptr; } - uint16 GetId() const override + uint16_t GetId() const override { return _id; } - uint32 GetCount() const override + uint32_t GetCount() const override { - return (uint32)_strings.size(); + return (uint32_t)_strings.size(); } void RemoveString(rct_string_id stringId) override @@ -147,9 +147,9 @@ public: { if (stringId >= ScenarioOverrideBase) { - sint32 offset = stringId - ScenarioOverrideBase; - sint32 ooIndex = offset / ScenarioOverrideMaxStringCount; - sint32 ooStringIndex = offset % ScenarioOverrideMaxStringCount; + int32_t offset = stringId - ScenarioOverrideBase; + int32_t ooIndex = offset / ScenarioOverrideMaxStringCount; + int32_t ooStringIndex = offset % ScenarioOverrideMaxStringCount; if (_scenarioOverrides.size() > (size_t)ooIndex && !_scenarioOverrides[ooIndex].strings[ooStringIndex].empty()) { @@ -162,9 +162,9 @@ public: } else if (stringId >= ObjectOverrideBase) { - sint32 offset = stringId - ObjectOverrideBase; - sint32 ooIndex = offset / ObjectOverrideMaxStringCount; - sint32 ooStringIndex = offset % ObjectOverrideMaxStringCount; + int32_t offset = stringId - ObjectOverrideBase; + int32_t ooIndex = offset / ObjectOverrideMaxStringCount; + int32_t ooStringIndex = offset % ObjectOverrideMaxStringCount; if (_objectOverrides.size() > (size_t)ooIndex && !_objectOverrides[ooIndex].strings[ooStringIndex].empty()) { @@ -188,12 +188,12 @@ public: } } - rct_string_id GetObjectOverrideStringId(const char * objectIdentifier, uint8 index) override + rct_string_id GetObjectOverrideStringId(const char * objectIdentifier, uint8_t index) override { Guard::ArgumentNotNull(objectIdentifier); Guard::Assert(index < ObjectOverrideMaxStringCount); - sint32 ooIndex = 0; + int32_t ooIndex = 0; for (const ObjectOverride &objectOverride : _objectOverrides) { if (strncmp(objectOverride.name, objectIdentifier, 8) == 0) @@ -210,12 +210,12 @@ public: return STR_NONE; } - rct_string_id GetScenarioOverrideStringId(const utf8 * scenarioFilename, uint8 index) override + rct_string_id GetScenarioOverrideStringId(const utf8 * scenarioFilename, uint8_t index) override { Guard::ArgumentNotNull(scenarioFilename); Guard::Assert(index < ScenarioOverrideMaxStringCount); - sint32 ooIndex = 0; + int32_t ooIndex = 0; for (const ScenarioOverride &scenarioOverride : _scenarioOverrides) { if (String::Equals(scenarioOverride.filename.c_str(), scenarioFilename, true)) @@ -486,7 +486,7 @@ private: // Validate identifier const utf8 * identifier = sb.GetBuffer(); - sint32 stringId; + int32_t stringId; if (_currentGroup.empty()) { if (sscanf(identifier, "STR_%4d", &stringId) != 1) @@ -516,7 +516,7 @@ private: { if (codepoint == '{') { - uint32 token; + uint32_t token; bool isByte; if (ParseToken(reader, &token, &isByte)) { @@ -526,7 +526,7 @@ private: } else { - sb.Append((sint32)token); + sb.Append((int32_t)token); } } else @@ -565,7 +565,7 @@ private: } } - bool ParseToken(IStringReader * reader, uint32 * token, bool * isByte) + bool ParseToken(IStringReader * reader, uint32_t * token, bool * isByte) { auto sb = StringBuilder(); codepoint_t codepoint; @@ -592,7 +592,7 @@ private: // Handle explicit byte values if (*token == 0) { - sint32 number; + int32_t number; if (sscanf(tokenName, "%d", &number) == 1) { *token = Math::Clamp(0, number, 255); @@ -606,13 +606,13 @@ private: namespace LanguagePackFactory { - ILanguagePack * FromFile(uint16 id, const utf8 * path) + ILanguagePack * FromFile(uint16_t id, const utf8 * path) { auto languagePack = LanguagePack::FromFile(id, path); return languagePack; } - ILanguagePack * FromText(uint16 id, const utf8 * text) + ILanguagePack * FromText(uint16_t id, const utf8 * text) { auto languagePack = LanguagePack::FromText(id, text); return languagePack; diff --git a/src/openrct2/localisation/LanguagePack.h b/src/openrct2/localisation/LanguagePack.h index 6c11e9e30b..3aa51e2589 100644 --- a/src/openrct2/localisation/LanguagePack.h +++ b/src/openrct2/localisation/LanguagePack.h @@ -16,18 +16,18 @@ interface ILanguagePack { virtual ~ILanguagePack() = default; - virtual uint16 GetId() const abstract; - virtual uint32 GetCount() const abstract; + virtual uint16_t GetId() const abstract; + virtual uint32_t GetCount() const abstract; virtual void RemoveString(rct_string_id stringId) abstract; virtual void SetString(rct_string_id stringId, const std::string &str) abstract; virtual const utf8 * GetString(rct_string_id stringId) const abstract; - virtual rct_string_id GetObjectOverrideStringId(const char * objectIdentifier, uint8 index) abstract; - virtual rct_string_id GetScenarioOverrideStringId(const utf8 * scenarioFilename, uint8 index) abstract; + virtual rct_string_id GetObjectOverrideStringId(const char * objectIdentifier, uint8_t index) abstract; + virtual rct_string_id GetScenarioOverrideStringId(const utf8 * scenarioFilename, uint8_t index) abstract; }; namespace LanguagePackFactory { - ILanguagePack * FromFile(uint16 id, const utf8 * path); - ILanguagePack * FromText(uint16 id, const utf8 * text); + ILanguagePack * FromFile(uint16_t id, const utf8 * path); + ILanguagePack * FromText(uint16_t id, const utf8 * text); } diff --git a/src/openrct2/localisation/Localisation.Date.cpp b/src/openrct2/localisation/Localisation.Date.cpp index a9da26f915..9df60d68a9 100644 --- a/src/openrct2/localisation/Localisation.Date.cpp +++ b/src/openrct2/localisation/Localisation.Date.cpp @@ -13,11 +13,11 @@ #include "Date.h" #include "StringIds.h" -uint16 gDateMonthTicks; -uint16 gDateMonthsElapsed; +uint16_t gDateMonthTicks; +uint16_t gDateMonthsElapsed; // rct2: 0x00993988 -const sint16 days_in_month[MONTH_COUNT] = { 31, 30, 31, 30, 31, 31, 30, 31 }; +const int16_t days_in_month[MONTH_COUNT] = { 31, 30, 31, 30, 31, 31, 30, 31 }; // clang-format off const rct_string_id DateFormatStringIds[] = { @@ -37,17 +37,17 @@ const rct_string_id DateFormatStringFormatIds[] = { openrct_timeofday gRealTimeOfDay; -sint32 date_get_month(sint32 months) +int32_t date_get_month(int32_t months) { return months % MONTH_COUNT; } -sint32 date_get_year(sint32 months) +int32_t date_get_year(int32_t months) { return months / MONTH_COUNT; } -sint32 date_get_total_months(sint32 month, sint32 year) +int32_t date_get_total_months(int32_t month, int32_t year) { return (year - 1) * MONTH_COUNT + month; } @@ -63,7 +63,7 @@ void date_reset() gCurrentTicks = 0; } -void date_set(sint32 year, sint32 month, sint32 day) +void date_set(int32_t year, int32_t month, int32_t day) { year = Math::Clamp(1, year, 8192); month = Math::Clamp(1, month, (int)MONTH_COUNT); @@ -74,7 +74,7 @@ void date_set(sint32 year, sint32 month, sint32 day) void date_update() { - sint32 monthTicks = gDateMonthTicks + 4; + int32_t monthTicks = gDateMonthTicks + 4; if (monthTicks >= 0x10000) { gDateMonthTicks = 0; @@ -82,7 +82,7 @@ void date_update() } else { - gDateMonthTicks = floor2((uint16)monthTicks, 4); + gDateMonthTicks = floor2((uint16_t)monthTicks, 4); } } @@ -96,29 +96,29 @@ void date_update_real_time_of_day() gRealTimeOfDay.hour = now->tm_hour; } -bool date_is_day_start(sint32 monthTicks) +bool date_is_day_start(int32_t monthTicks) { if (monthTicks < 4) { return false; } - sint32 prevMonthTick = monthTicks - 4; - sint32 currentMonth = date_get_month(gDateMonthsElapsed); - sint32 currentDaysInMonth = days_in_month[currentMonth]; + int32_t prevMonthTick = monthTicks - 4; + int32_t currentMonth = date_get_month(gDateMonthsElapsed); + int32_t currentDaysInMonth = days_in_month[currentMonth]; return ((currentDaysInMonth * monthTicks) >> 16 != (currentDaysInMonth * prevMonthTick) >> 16); } -bool date_is_week_start(sint32 monthTicks) +bool date_is_week_start(int32_t monthTicks) { return (monthTicks & 0x3FFF) == 0; } -bool date_is_fortnight_start(sint32 monthTicks) +bool date_is_fortnight_start(int32_t monthTicks) { return (monthTicks & 0x7FFF) == 0; } -bool date_is_month_start(sint32 monthTicks) +bool date_is_month_start(int32_t monthTicks) { return (monthTicks == 0); } diff --git a/src/openrct2/localisation/Localisation.cpp b/src/openrct2/localisation/Localisation.cpp index 83a76c535b..d5670fbb83 100644 --- a/src/openrct2/localisation/Localisation.cpp +++ b/src/openrct2/localisation/Localisation.cpp @@ -36,8 +36,8 @@ #include "../util/Util.h" char gCommonStringFormatBuffer[256]; -uint8 gCommonFormatArgs[80]; -uint8 gMapTooltipFormatArgs[40]; +uint8_t gCommonFormatArgs[80]; +uint8_t gMapTooltipFormatArgs[40]; #ifdef DEBUG // Set to true before a string format call to see details of the formatting. @@ -370,9 +370,9 @@ static void format_append_string_n(char **dest, size_t *size, const utf8 *string } } -static void format_integer(char **dest, size_t *size, sint64 value) +static void format_integer(char **dest, size_t *size, int64_t value) { - sint32 digit; + int32_t digit; char *nbegin, *nend, *ncur; char tmp; @@ -426,9 +426,9 @@ static void format_integer(char **dest, size_t *size, sint64 value) } } -static void format_comma_separated_integer(char **dest, size_t *size, sint64 value) +static void format_comma_separated_integer(char **dest, size_t *size, int64_t value) { - sint32 digit, groupIndex; + int32_t digit, groupIndex; char *nbegin, *nend, *ncur; char tmp; const char *commaMark = language_get_string(STR_LOCALE_THOUSANDS_SEPARATOR); @@ -509,15 +509,15 @@ static void format_comma_separated_integer(char **dest, size_t *size, sint64 val } } -static void format_comma_separated_fixed_1dp(char **dest, size_t *size, sint64 value) +static void format_comma_separated_fixed_1dp(char **dest, size_t *size, int64_t value) { - sint32 digit, groupIndex; + int32_t digit, groupIndex; char *nbegin, *nend, *ncur; char tmp; const char *commaMark = language_get_string(STR_LOCALE_THOUSANDS_SEPARATOR); const char *decimalMark = language_get_string(STR_LOCALE_DECIMAL_POINT); const char *ch = nullptr; - sint32 zeroNeeded = 1; + int32_t zeroNeeded = 1; if ((*size) == 0) return; @@ -602,15 +602,15 @@ static void format_comma_separated_fixed_1dp(char **dest, size_t *size, sint64 v } } -static void format_comma_separated_fixed_2dp(char **dest, size_t *size, sint64 value) +static void format_comma_separated_fixed_2dp(char **dest, size_t *size, int64_t value) { - sint32 digit, groupIndex; + int32_t digit, groupIndex; char *nbegin, *nend, *ncur; char tmp; const char *commaMark = language_get_string(STR_LOCALE_THOUSANDS_SEPARATOR); const char *decimalMark = language_get_string(STR_LOCALE_DECIMAL_POINT); const char *ch = nullptr; - sint32 zeroNeeded = 1; + int32_t zeroNeeded = 1; if ((*size) == 0) return; @@ -701,7 +701,7 @@ static void format_comma_separated_fixed_2dp(char **dest, size_t *size, sint64 v } } -static void format_currency(char **dest, size_t *size, sint64 value) +static void format_currency(char **dest, size_t *size, int64_t value) { if ((*size) == 0) return; @@ -720,7 +720,7 @@ static void format_currency(char **dest, size_t *size, sint64 value) // Currency symbol const utf8 *symbol = currencyDesc->symbol_unicode; - uint8 affix = currencyDesc->affix_unicode; + uint8_t affix = currencyDesc->affix_unicode; if (!font_supports_string(symbol, FONT_SIZE_MEDIUM)) { symbol = currencyDesc->symbol_ascii; affix = currencyDesc->affix_ascii; @@ -739,13 +739,13 @@ static void format_currency(char **dest, size_t *size, sint64 value) format_append_string(dest, size, symbol); } -static void format_currency_2dp(char **dest, size_t *size, sint64 value) +static void format_currency_2dp(char **dest, size_t *size, int64_t value) { if ((*size) == 0) return; const currency_descriptor *currencyDesc = &CurrencyDescriptors[gConfigGeneral.currency_format]; - sint32 rate = currencyDesc->rate; + int32_t rate = currencyDesc->rate; value *= rate; // Negative sign @@ -756,7 +756,7 @@ static void format_currency_2dp(char **dest, size_t *size, sint64 value) // Currency symbol const utf8 *symbol = currencyDesc->symbol_unicode; - uint8 affix = currencyDesc->affix_unicode; + uint8_t affix = currencyDesc->affix_unicode; if (!font_supports_string(symbol, FONT_SIZE_MEDIUM)) { symbol = currencyDesc->symbol_ascii; affix = currencyDesc->affix_ascii; @@ -780,14 +780,14 @@ static void format_currency_2dp(char **dest, size_t *size, sint64 value) format_append_string(dest, size, symbol); } -static void format_date(char **dest, size_t *size, uint16 value) +static void format_date(char **dest, size_t *size, uint16_t value) { - uint16 args[] = { static_cast(date_get_month(value)), static_cast(date_get_year(value) + 1) }; - uint16 *argsRef = args; + uint16_t args[] = { static_cast(date_get_month(value)), static_cast(date_get_year(value) + 1) }; + uint16_t *argsRef = args; format_string_part(dest, size, STR_DATE_FORMAT_MY, (char**)&argsRef); } -static void format_length(char **dest, size_t *size, sint16 value) +static void format_length(char **dest, size_t *size, int16_t value) { rct_string_id stringId = STR_UNIT_SUFFIX_METRES; @@ -796,11 +796,11 @@ static void format_length(char **dest, size_t *size, sint16 value) stringId = STR_UNIT_SUFFIX_FEET; } - sint16 *argRef = &value; + int16_t *argRef = &value; format_string_part(dest, size, stringId, (char**)&argRef); } -static void format_velocity(char **dest, size_t *size, uint16 value) +static void format_velocity(char **dest, size_t *size, uint16_t value) { rct_string_id stringId; @@ -818,7 +818,7 @@ static void format_velocity(char **dest, size_t *size, uint16 value) break; } - uint16 *argRef = &value; + uint16_t *argRef = &value; format_string_part(dest, size, stringId, (char**)&argRef); } @@ -828,14 +828,14 @@ static constexpr const rct_string_id DurationFormats[][2] = { {STR_DURATION_MINS_SEC, STR_DURATION_MINS_SECS}, }; -static void format_duration(char **dest, size_t *size, uint16 value) +static void format_duration(char **dest, size_t *size, uint16_t value) { - uint16 minutes = value / 60; - uint16 seconds = value % 60; - uint16 args[] = { minutes, seconds }; - uint16 *argsRef = &args[1]; + uint16_t minutes = value / 60; + uint16_t seconds = value % 60; + uint16_t args[] = { minutes, seconds }; + uint16_t *argsRef = &args[1]; - sint32 minuteIndex = 0; + int32_t minuteIndex = 0; if (minutes > 0) { minuteIndex = 1; if (minutes != 1) { @@ -845,7 +845,7 @@ static void format_duration(char **dest, size_t *size, uint16 value) argsRef--; } - sint32 secondsIndex = 0; + int32_t secondsIndex = 0; if (seconds != 1) { secondsIndex = 1; } @@ -861,14 +861,14 @@ static constexpr const rct_string_id RealtimeFormats[][2] = { {STR_REALTIME_HOURS_MIN, STR_REALTIME_HOURS_MINS}, }; -static void format_realtime(char **dest, size_t *size, uint16 value) +static void format_realtime(char **dest, size_t *size, uint16_t value) { - uint16 hours = value / 60; - uint16 minutes = value % 60; - uint16 args[] = { hours, minutes }; - uint16 *argsRef = &args[1]; + uint16_t hours = value / 60; + uint16_t minutes = value % 60; + uint16_t args[] = { hours, minutes }; + uint16_t *argsRef = &args[1]; - sint32 hourIndex = 0; + int32_t hourIndex = 0; if (hours > 0) { hourIndex = 1; if (hours != 1) { @@ -878,7 +878,7 @@ static void format_realtime(char **dest, size_t *size, uint16 value) argsRef--; } - sint32 minuteIndex = 0; + int32_t minuteIndex = 0; if (minutes != 1) { minuteIndex = 1; } @@ -888,7 +888,7 @@ static void format_realtime(char **dest, size_t *size, uint16 value) format_string_part(dest, size, stringId, (char**)&argsRef); } -static void format_string_code(uint32 format_code, char **dest, size_t *size, char **args) +static void format_string_code(uint32_t format_code, char **dest, size_t *size, char **args) { intptr_t value; @@ -903,56 +903,56 @@ static void format_string_code(uint32 format_code, char **dest, size_t *size, ch switch (format_code) { case FORMAT_COMMA32: // Pop argument - value = *((sint32*)*args); + value = *((int32_t*)*args); *args += 4; format_comma_separated_integer(dest, size, value); break; case FORMAT_INT32: // Pop argument - value = *((sint32*)*args); + value = *((int32_t*)*args); *args += 4; format_integer(dest, size, value); break; case FORMAT_COMMA2DP32: // Pop argument - value = *((sint32*)*args); + value = *((int32_t*)*args); *args += 4; format_comma_separated_fixed_2dp(dest, size, value); break; case FORMAT_COMMA1DP16: // Pop argument - value = *((sint16*)*args); + value = *((int16_t*)*args); *args += 2; format_comma_separated_fixed_1dp(dest, size, value); break; case FORMAT_COMMA16: // Pop argument - value = *((sint16*)*args); + value = *((int16_t*)*args); *args += 2; format_comma_separated_integer(dest, size, value); break; - case FORMAT_UINT16: + case FORMAT_uint16_t: // Pop argument - value = *((uint16*)*args); + value = *((uint16_t*)*args); *args += 2; format_integer(dest, size, value); break; case FORMAT_CURRENCY2DP: // Pop argument - value = *((sint32*)*args); + value = *((int32_t*)*args); *args += 4; format_currency_2dp(dest, size, value); break; case FORMAT_CURRENCY: // Pop argument - value = *((sint32*)*args); + value = *((int32_t*)*args); *args += 4; format_currency(dest, size, value); @@ -960,7 +960,7 @@ static void format_string_code(uint32 format_code, char **dest, size_t *size, ch case FORMAT_STRINGID: case FORMAT_STRINGID2: // Pop argument - value = *((uint16*)*args); + value = *((uint16_t*)*args); *args += 2; format_string_part(dest, size, (rct_string_id)value, args); @@ -975,24 +975,24 @@ static void format_string_code(uint32 format_code, char **dest, size_t *size, ch break; case FORMAT_MONTHYEAR: // Pop argument - value = *((uint16*)*args); + value = *((uint16_t*)*args); *args += 2; - format_date(dest, size, (uint16)value); + format_date(dest, size, (uint16_t)value); break; case FORMAT_MONTH: // Pop argument - value = *((uint16*)*args); + value = *((uint16_t*)*args); *args += 2; - format_append_string(dest, size, language_get_string(DateGameMonthNames[date_get_month((sint32)value)])); + format_append_string(dest, size, language_get_string(DateGameMonthNames[date_get_month((int32_t)value)])); break; case FORMAT_VELOCITY: // Pop argument - value = *((sint16*)*args); + value = *((int16_t*)*args); *args += 2; - format_velocity(dest, size, (uint16)value); + format_velocity(dest, size, (uint16_t)value); break; case FORMAT_POP16: *args += 2; @@ -1002,36 +1002,36 @@ static void format_string_code(uint32 format_code, char **dest, size_t *size, ch break; case FORMAT_DURATION: // Pop argument - value = *((uint16*)*args); + value = *((uint16_t*)*args); *args += 2; - format_duration(dest, size, (uint16)value); + format_duration(dest, size, (uint16_t)value); break; case FORMAT_REALTIME: // Pop argument - value = *((uint16*)*args); + value = *((uint16_t*)*args); *args += 2; - format_realtime(dest, size, (uint16)value); + format_realtime(dest, size, (uint16_t)value); break; case FORMAT_LENGTH: // Pop argument - value = *((sint16*)*args); + value = *((int16_t*)*args); *args += 2; - format_length(dest, size, (sint16)value); + format_length(dest, size, (int16_t)value); break; case FORMAT_SPRITE: // Pop argument - value = *((uint32*)*args); + value = *((uint32_t*)*args); *args += 4; - format_handle_overflow(1 + sizeof(uint32)); + format_handle_overflow(1 + sizeof(uint32_t)); format_push_char_safe('\x17'); - *((uint32*)(*dest)) = (uint32)value; - (*dest) += sizeof(uint32); - (*size) -= sizeof(uint32); + *((uint32_t*)(*dest)) = (uint32_t)value; + (*dest) += sizeof(uint32_t); + (*size) -= sizeof(uint32_t); break; } } @@ -1045,7 +1045,7 @@ static void format_string_part_from_raw(utf8 **dest, size_t *size, const utf8 *s #endif while (*size > 1) { - uint32 code = utf8_get_next(src, &src); + uint32_t code = utf8_get_next(src, &src); if (code < ' ') { if (code == 0) { break; @@ -1231,7 +1231,7 @@ money32 string_to_money(const char* string_to_monetise) Guard::Assert(strlen(string_to_monetise) < sizeof(processedString)); - uint32 numNumbers = 0; + uint32_t numNumbers = 0; bool hasMinus = false; bool hasDecSep = false; const char* src_ptr = string_to_monetise; @@ -1281,7 +1281,7 @@ money32 string_to_money(const char* string_to_monetise) if (numNumbers == 0) return MONEY32_UNDEFINED; - sint32 sign = 1; + int32_t sign = 1; if (hasMinus) { // If there is a minus sign, it has to be at position 0 in order to be valid. @@ -1302,8 +1302,8 @@ money32 string_to_money(const char* string_to_monetise) auto number = std::stod(processedString, nullptr); number /= (currencyDesc->rate / 10.0); - auto whole = static_cast(number); - auto fraction = static_cast((number - whole) * 100); + auto whole = static_cast(number); + auto fraction = static_cast((number - whole) * 100); money32 result = MONEY(whole, fraction); // Check if MONEY resulted in overflow diff --git a/src/openrct2/localisation/Localisation.h b/src/openrct2/localisation/Localisation.h index 2499744751..217388818f 100644 --- a/src/openrct2/localisation/Localisation.h +++ b/src/openrct2/localisation/Localisation.h @@ -19,10 +19,10 @@ #include "StringIds.h" #include "../management/Marketing.h" -bool utf8_is_format_code(sint32 codepoint); -bool utf8_is_colour_code(sint32 codepoint); -bool utf8_should_use_sprite_for_codepoint(sint32 codepoint); -sint32 utf8_get_format_code_arg_length(sint32 codepoint); +bool utf8_is_format_code(int32_t codepoint); +bool utf8_is_colour_code(int32_t codepoint); +bool utf8_should_use_sprite_for_codepoint(int32_t codepoint); +int32_t utf8_get_format_code_arg_length(int32_t codepoint); void utf8_remove_formatting(utf8* string, bool allowColours); void format_string(char *dest, size_t size, rct_string_id format, void *args); @@ -31,7 +31,7 @@ void format_string_to_upper(char *dest, size_t size, rct_string_id format, void void generate_string_file(); utf8 *get_string_end(const utf8 *text); size_t get_string_size(const utf8 *text); -sint32 get_string_length(const utf8 *text); +int32_t get_string_length(const utf8 *text); // The maximum number of characters allowed for string/money conversions (anything above will risk integer overflow issues) #define MONEY_STRING_MAXLENGTH 14 @@ -39,7 +39,7 @@ money32 string_to_money(const char* string_to_monetise); void money_to_string(money32 amount, char * buffer_to_put_value_to, size_t buffer_len, bool forceDecimals); void user_string_clear_all(); -rct_string_id user_string_allocate(sint32 base, const utf8 *text); +rct_string_id user_string_allocate(int32_t base, const utf8 *text); void user_string_free(rct_string_id id); bool is_user_string_id(rct_string_id stringId); @@ -63,8 +63,8 @@ extern const char *real_names[1024]; extern utf8 gUserStrings[MAX_USER_STRINGS][USER_STRING_MAX_LENGTH]; extern char gCommonStringFormatBuffer[256]; -extern uint8 gCommonFormatArgs[80]; -extern uint8 gMapTooltipFormatArgs[40]; +extern uint8_t gCommonFormatArgs[80]; +extern uint8_t gMapTooltipFormatArgs[40]; extern bool gDebugStringFormatting; extern const rct_string_id SpeedNames[5]; @@ -77,7 +77,7 @@ extern const rct_string_id DateDayNames[31]; extern const rct_string_id DateGameMonthNames[MONTH_COUNT]; extern const rct_string_id DateGameShortMonthNames[MONTH_COUNT]; -[[maybe_unused]] static inline void set_format_arg_body(uint8 *args, size_t offset, uintptr_t value, size_t size) +[[maybe_unused]] static inline void set_format_arg_body(uint8_t *args, size_t offset, uintptr_t value, size_t size) { memcpy(args + offset, &value, size); } diff --git a/src/openrct2/localisation/LocalisationService.cpp b/src/openrct2/localisation/LocalisationService.cpp index 0847caf2f3..691caa7fa5 100644 --- a/src/openrct2/localisation/LocalisationService.cpp +++ b/src/openrct2/localisation/LocalisationService.cpp @@ -22,7 +22,7 @@ using namespace OpenRCT2; using namespace OpenRCT2::Localisation; static constexpr rct_string_id NONSTEX_BASE_STRING_ID = 3463; -static constexpr uint16 MAX_OBJECT_CACHED_STRINGS = 2048; +static constexpr uint16_t MAX_OBJECT_CACHED_STRINGS = 2048; LocalisationService::LocalisationService(const std::shared_ptr& env) : _env(env) @@ -63,7 +63,7 @@ const char * LocalisationService::GetString(rct_string_id id) const return result; } -std::string LocalisationService::GetLanguagePath(uint32 languageId) const +std::string LocalisationService::GetLanguagePath(uint32_t languageId) const { auto locale = std::string(LanguagesDescriptors[languageId].locale); auto languageDirectory = _env->GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::LANGUAGE); @@ -71,7 +71,7 @@ std::string LocalisationService::GetLanguagePath(uint32 languageId) const return languagePath; } -void LocalisationService::OpenLanguage(sint32 id, IObjectManager& objectManager) +void LocalisationService::OpenLanguage(int32_t id, IObjectManager& objectManager) { CloseLanguages(); if (id == LANGUAGE_UNDEFINED) @@ -117,7 +117,7 @@ std::tuple LocalisationService::Get return std::make_tuple(result0, result1, result2); } -rct_string_id LocalisationService::GetObjectOverrideStringId(const char * identifier, uint8 index) const +rct_string_id LocalisationService::GetObjectOverrideStringId(const char * identifier, uint8_t index) const { if (_languageCurrent == nullptr) { @@ -146,7 +146,7 @@ void LocalisationService::FreeObjectString(rct_string_id stringId) } } -sint32 LocalisationService_GetCurrentLanguage() +int32_t LocalisationService_GetCurrentLanguage() { const auto& localisationService = GetContext()->GetLocalisationService(); return localisationService.GetCurrentLanguage(); diff --git a/src/openrct2/localisation/LocalisationService.h b/src/openrct2/localisation/LocalisationService.h index 31c4709089..3d2094b458 100644 --- a/src/openrct2/localisation/LocalisationService.h +++ b/src/openrct2/localisation/LocalisationService.h @@ -29,14 +29,14 @@ namespace OpenRCT2::Localisation { private: const std::shared_ptr _env; - sint32 _currentLanguage{}; + int32_t _currentLanguage{}; bool _useTrueTypeFont{}; std::unique_ptr _languageFallback; std::unique_ptr _languageCurrent; std::stack _availableObjectStringIds; public: - sint32 GetCurrentLanguage() const { return _currentLanguage; } + int32_t GetCurrentLanguage() const { return _currentLanguage; } bool UseTrueTypeFont() const { return _useTrueTypeFont; } void UseTrueTypeFont(bool value) { _useTrueTypeFont = value; } @@ -45,10 +45,10 @@ namespace OpenRCT2::Localisation const char * GetString(rct_string_id id) const; std::tuple GetLocalisedScenarioStrings(const std::string& scenarioFilename) const; - rct_string_id GetObjectOverrideStringId(const char * identifier, uint8 index) const; - std::string GetLanguagePath(uint32 languageId) const; + rct_string_id GetObjectOverrideStringId(const char * identifier, uint8_t index) const; + std::string GetLanguagePath(uint32_t languageId) const; - void OpenLanguage(sint32 id, IObjectManager& objectManager); + void OpenLanguage(int32_t id, IObjectManager& objectManager); void CloseLanguages(); rct_string_id AllocateObjectString(const std::string& target); void FreeObjectString(rct_string_id stringId); @@ -57,5 +57,5 @@ namespace OpenRCT2::Localisation // Legacy getters // TODO Remove usages of these and instead call via shared reference -sint32 LocalisationService_GetCurrentLanguage(); +int32_t LocalisationService_GetCurrentLanguage(); bool LocalisationService_UseTrueTypeFont(); diff --git a/src/openrct2/localisation/UTF8.cpp b/src/openrct2/localisation/UTF8.cpp index ef5e454323..a3748bcc17 100644 --- a/src/openrct2/localisation/UTF8.cpp +++ b/src/openrct2/localisation/UTF8.cpp @@ -10,10 +10,10 @@ #include "Localisation.h" #include -uint32 utf8_get_next(const utf8 *char_ptr, const utf8 **nextchar_ptr) +uint32_t utf8_get_next(const utf8 *char_ptr, const utf8 **nextchar_ptr) { - sint32 result; - sint32 numBytes; + int32_t result; + int32_t numBytes; if (!(char_ptr[0] & 0x80)) { result = char_ptr[0]; @@ -38,7 +38,7 @@ uint32 utf8_get_next(const utf8 *char_ptr, const utf8 **nextchar_ptr) return result; } -utf8 *utf8_write_codepoint(utf8 *dst, uint32 codepoint) +utf8 *utf8_write_codepoint(utf8 *dst, uint32_t codepoint) { if (codepoint <= 0x7F) { dst[0] = (utf8)codepoint; @@ -65,9 +65,9 @@ utf8 *utf8_write_codepoint(utf8 *dst, uint32 codepoint) * Inserts the given codepoint at the given address, shifting all characters after along. * @returns the size of the inserted codepoint. */ -sint32 utf8_insert_codepoint(utf8 *dst, uint32 codepoint) +int32_t utf8_insert_codepoint(utf8 *dst, uint32_t codepoint) { - sint32 shift = utf8_get_codepoint_length(codepoint); + int32_t shift = utf8_get_codepoint_length(codepoint); utf8 *endPoint = get_string_end(dst); memmove(dst + shift, dst, endPoint - dst + 1); utf8_write_codepoint(dst, codepoint); @@ -81,7 +81,7 @@ bool utf8_is_codepoint_start(const utf8 *text) return false; } -sint32 utf8_get_codepoint_length(sint32 codepoint) +int32_t utf8_get_codepoint_length(int32_t codepoint) { if (codepoint <= 0x7F) { return 1; @@ -98,11 +98,11 @@ sint32 utf8_get_codepoint_length(sint32 codepoint) * Gets the number of characters / codepoints in a UTF-8 string (not necessarily 1:1 with bytes and not including null * terminator). */ -sint32 utf8_length(const utf8 *text) +int32_t utf8_length(const utf8 *text) { const utf8 *ch = text; - sint32 count = 0; + int32_t count = 0; while (utf8_get_next(ch, &ch) != 0) { count++; } @@ -115,9 +115,9 @@ wchar_t *utf8_to_widechar(const utf8 *src) wchar_t *dst = result; const utf8 *ch = src; - sint32 codepoint; + int32_t codepoint; while ((codepoint = utf8_get_next(ch, &ch)) != 0) { - if ((uint32)codepoint > 0xFFFF) { + if ((uint32_t)codepoint > 0xFFFF) { *dst++ = '?'; } else { *dst++ = codepoint; @@ -148,11 +148,11 @@ utf8 *widechar_to_utf8(const wchar_t *src) */ utf8 *get_string_end(const utf8 *text) { - sint32 codepoint; + int32_t codepoint; const utf8 *ch = text; while ((codepoint = utf8_get_next(ch, &ch)) != 0) { - sint32 argLength = utf8_get_format_code_arg_length(codepoint); + int32_t argLength = utf8_get_format_code_arg_length(codepoint); ch += argLength; } return (utf8*)(ch - 1); @@ -169,12 +169,12 @@ size_t get_string_size(const utf8 *text) /** * Return the number of visible characters (excludes format codes) in the given UTF-8 string. */ -sint32 get_string_length(const utf8 *text) +int32_t get_string_length(const utf8 *text) { - sint32 codepoint; + int32_t codepoint; const utf8 *ch = text; - sint32 count = 0; + int32_t count = 0; while ((codepoint = utf8_get_next(ch, &ch)) != 0) { if (utf8_is_format_code(codepoint)) { ch += utf8_get_format_code_arg_length(codepoint); @@ -185,7 +185,7 @@ sint32 get_string_length(const utf8 *text) return count; } -sint32 utf8_get_format_code_arg_length(sint32 codepoint) +int32_t utf8_get_format_code_arg_length(int32_t codepoint) { switch (codepoint) { case FORMAT_MOVE_X: @@ -207,7 +207,7 @@ void utf8_remove_formatting(utf8* string, bool allowColours) { utf8* writePtr = string; while (true) { - uint32 code = utf8_get_next(readPtr, (const utf8**)&readPtr); + uint32_t code = utf8_get_next(readPtr, (const utf8**)&readPtr); if (code == 0) { *writePtr = 0; @@ -218,7 +218,7 @@ void utf8_remove_formatting(utf8* string, bool allowColours) { } } -bool utf8_is_format_code(sint32 codepoint) +bool utf8_is_format_code(int32_t codepoint) { if (codepoint < 32) return true; if (codepoint >= FORMAT_ARGUMENT_CODE_START && codepoint <= FORMAT_ARGUMENT_CODE_END) return true; @@ -227,7 +227,7 @@ bool utf8_is_format_code(sint32 codepoint) return false; } -bool utf8_is_colour_code(sint32 codepoint) +bool utf8_is_colour_code(int32_t codepoint) { if (codepoint >= FORMAT_COLOUR_CODE_START && codepoint <= FORMAT_COLOUR_CODE_END) return true; return false; diff --git a/src/openrct2/localisation/User.cpp b/src/openrct2/localisation/User.cpp index 5bb90026fe..9fc9cfa1c0 100644 --- a/src/openrct2/localisation/User.cpp +++ b/src/openrct2/localisation/User.cpp @@ -30,9 +30,9 @@ void user_string_clear_all() * * rct2: 0x006C421D */ -rct_string_id user_string_allocate(sint32 base, const utf8 *text) +rct_string_id user_string_allocate(int32_t base, const utf8 *text) { - sint32 highBits = (base & 0x7F) << 9; + int32_t highBits = (base & 0x7F) << 9; bool allowDuplicates = base & USER_STRING_DUPLICATION_PERMITTED; if (!allowDuplicates && user_string_exists(text)) { @@ -40,7 +40,7 @@ rct_string_id user_string_allocate(sint32 base, const utf8 *text) return 0; } - for (sint32 i = 0; i < MAX_USER_STRINGS; i++) + for (int32_t i = 0; i < MAX_USER_STRINGS; i++) { char * userString = gUserStrings[i]; @@ -70,7 +70,7 @@ void user_string_free(rct_string_id id) static bool user_string_exists(const utf8 *text) { char * userString; - for (sint32 i = 0; i < MAX_USER_STRINGS; i++) + for (int32_t i = 0; i < MAX_USER_STRINGS; i++) { userString = gUserStrings[i]; if (userString[0] == 0) @@ -89,7 +89,7 @@ bool is_user_string_id(rct_string_id stringId) void reset_user_strings() { - for (sint32 i = 0; i < MAX_USER_STRINGS; i++) + for (int32_t i = 0; i < MAX_USER_STRINGS; i++) { gUserStrings[i][0] = 0; } diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index 3ca5b22f78..acadfafb6d 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -21,7 +21,7 @@ #define NEGATIVE 0 #define POSITIVE 1 -static constexpr const uint8 AwardPositiveMap[] = +static constexpr const uint8_t AwardPositiveMap[] = { NEGATIVE, // PARK_AWARD_MOST_UNTIDY POSITIVE, // PARK_AWARD_MOST_TIDY @@ -65,7 +65,7 @@ static constexpr const rct_string_id AwardNewsStrings[] = Award gCurrentAwards[MAX_AWARDS]; -bool award_is_positive(sint32 type) +bool award_is_positive(int32_t type) { return AwardPositiveMap[type]; } @@ -73,11 +73,11 @@ bool award_is_positive(sint32 type) #pragma region Award checks /** More than 1/16 of the total guests must be thinking untidy thoughts. */ -static bool award_is_deserved_most_untidy(sint32 activeAwardTypes) +static bool award_is_deserved_most_untidy(int32_t activeAwardTypes) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; - sint32 negativeCount; + int32_t negativeCount; if (activeAwardTypes & (1 << PARK_AWARD_MOST_BEAUTIFUL)) return false; @@ -107,12 +107,12 @@ static bool award_is_deserved_most_untidy(sint32 activeAwardTypes) } /** More than 1/64 of the total guests must be thinking tidy thoughts and less than 6 guests thinking untidy thoughts. */ -static bool award_is_deserved_most_tidy(sint32 activeAwardTypes) +static bool award_is_deserved_most_tidy(int32_t activeAwardTypes) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; - sint32 positiveCount; - sint32 negativeCount; + int32_t positiveCount; + int32_t negativeCount; if (activeAwardTypes & (1 << PARK_AWARD_MOST_UNTIDY)) return false; @@ -145,9 +145,9 @@ static bool award_is_deserved_most_tidy(sint32 activeAwardTypes) } /** At least 6 open roller coasters. */ -static bool award_is_deserved_best_rollercoasters([[maybe_unused]] sint32 activeAwardTypes) +static bool award_is_deserved_best_rollercoasters([[maybe_unused]] int32_t activeAwardTypes) { - sint32 i, rollerCoasters; + int32_t i, rollerCoasters; Ride * ride; rct_ride_entry * rideEntry; @@ -177,7 +177,7 @@ static bool award_is_deserved_best_rollercoasters([[maybe_unused]] sint32 active } /** Entrance fee is 0.10 less than half of the total ride value. */ -static bool award_is_deserved_best_value(sint32 activeAwardTypes) +static bool award_is_deserved_best_value(int32_t activeAwardTypes) { if (activeAwardTypes & (1 << PARK_AWARD_WORST_VALUE)) return false; @@ -198,12 +198,12 @@ static bool award_is_deserved_best_value(sint32 activeAwardTypes) } /** More than 1/128 of the total guests must be thinking scenic thoughts and fewer than 16 untidy thoughts. */ -static bool award_is_deserved_most_beautiful(sint32 activeAwardTypes) +static bool award_is_deserved_most_beautiful(int32_t activeAwardTypes) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; - sint32 positiveCount; - sint32 negativeCount; + int32_t positiveCount; + int32_t negativeCount; if (activeAwardTypes & (1 << PARK_AWARD_MOST_UNTIDY)) return false; @@ -235,7 +235,7 @@ static bool award_is_deserved_most_beautiful(sint32 activeAwardTypes) } /** Entrance fee is more than total ride value. */ -static bool award_is_deserved_worst_value(sint32 activeAwardTypes) +static bool award_is_deserved_worst_value(int32_t activeAwardTypes) { if (activeAwardTypes & (1 << PARK_AWARD_BEST_VALUE)) return false; @@ -251,10 +251,10 @@ static bool award_is_deserved_worst_value(sint32 activeAwardTypes) } /** No more than 2 people who think the vandalism is bad and no crashes. */ -static bool award_is_deserved_safest([[maybe_unused]] sint32 activeAwardTypes) +static bool award_is_deserved_safest([[maybe_unused]] int32_t activeAwardTypes) { - sint32 i, peepsWhoDislikeVandalism; - uint16 spriteIndex; + int32_t i, peepsWhoDislikeVandalism; + uint16_t spriteIndex; rct_peep * peep; Ride * ride; @@ -281,12 +281,12 @@ static bool award_is_deserved_safest([[maybe_unused]] sint32 activeAwardTypes) } /** All staff types, at least 20 staff, one staff per 32 peeps. */ -static bool award_is_deserved_best_staff(sint32 activeAwardTypes) +static bool award_is_deserved_best_staff(int32_t activeAwardTypes) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; - sint32 peepCount, staffCount; - sint32 staffTypeFlags; + int32_t peepCount, staffCount; + int32_t staffTypeFlags; if (activeAwardTypes & (1 << PARK_AWARD_MOST_UNTIDY)) return false; @@ -312,13 +312,13 @@ static bool award_is_deserved_best_staff(sint32 activeAwardTypes) } /** At least 7 shops, 4 unique, one shop per 128 guests and no more than 12 hungry guests. */ -static bool award_is_deserved_best_food(sint32 activeAwardTypes) +static bool award_is_deserved_best_food(int32_t activeAwardTypes) { - sint32 i, hungryPeeps, shops, uniqueShops; - uint64 shopTypes; + int32_t i, hungryPeeps, shops, uniqueShops; + uint64_t shopTypes; Ride * ride; rct_ride_entry * rideEntry; - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; if (activeAwardTypes & (1 << PARK_AWARD_WORST_FOOD)) @@ -365,13 +365,13 @@ static bool award_is_deserved_best_food(sint32 activeAwardTypes) } /** No more than 2 unique shops, less than one shop per 256 guests and more than 15 hungry guests. */ -static bool award_is_deserved_worst_food(sint32 activeAwardTypes) +static bool award_is_deserved_worst_food(int32_t activeAwardTypes) { - sint32 i, hungryPeeps, shops, uniqueShops; - uint64 shopTypes; + int32_t i, hungryPeeps, shops, uniqueShops; + uint64_t shopTypes; Ride * ride; rct_ride_entry * rideEntry; - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; if (activeAwardTypes & (1 << PARK_AWARD_BEST_FOOD)) @@ -418,11 +418,11 @@ static bool award_is_deserved_worst_food(sint32 activeAwardTypes) } /** At least 4 restrooms, 1 restroom per 128 guests and no more than 16 guests who think they need the restroom. */ -static bool award_is_deserved_best_restrooms([[maybe_unused]] sint32 activeAwardTypes) +static bool award_is_deserved_best_restrooms([[maybe_unused]] int32_t activeAwardTypes) { - uint32 i, numRestrooms, guestsWhoNeedRestroom; + uint32_t i, numRestrooms, guestsWhoNeedRestroom; Ride * ride; - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; // Count open restrooms @@ -456,9 +456,9 @@ static bool award_is_deserved_best_restrooms([[maybe_unused]] sint32 activeAward } /** More than half of the rides have satisfaction <= 6 and park rating <= 650. */ -static bool award_is_deserved_most_disappointing(sint32 activeAwardTypes) +static bool award_is_deserved_most_disappointing(int32_t activeAwardTypes) { - uint32 i, countedRides, disappointingRides; + uint32_t i, countedRides, disappointingRides; Ride * ride; if (activeAwardTypes & (1 << PARK_AWARD_BEST_VALUE)) @@ -487,9 +487,9 @@ static bool award_is_deserved_most_disappointing(sint32 activeAwardTypes) } /** At least 6 open water rides. */ -static bool award_is_deserved_best_water_rides([[maybe_unused]] sint32 activeAwardTypes) +static bool award_is_deserved_best_water_rides([[maybe_unused]] int32_t activeAwardTypes) { - sint32 i, waterRides; + int32_t i, waterRides; Ride * ride; rct_ride_entry * rideEntry; @@ -519,9 +519,9 @@ static bool award_is_deserved_best_water_rides([[maybe_unused]] sint32 activeAwa } /** At least 6 custom designed rides. */ -static bool award_is_deserved_best_custom_designed_rides(sint32 activeAwardTypes) +static bool award_is_deserved_best_custom_designed_rides(int32_t activeAwardTypes) { - sint32 i, customDesignedRides; + int32_t i, customDesignedRides; Ride * ride; if (activeAwardTypes & (1 << PARK_AWARD_MOST_DISAPPOINTING)) @@ -546,13 +546,13 @@ static bool award_is_deserved_best_custom_designed_rides(sint32 activeAwardTypes } /** At least 5 colourful rides and more than half of the rides are colourful. */ -static constexpr const uint8 dazzling_ride_colours[] = {COLOUR_BRIGHT_PURPLE, COLOUR_BRIGHT_GREEN, COLOUR_LIGHT_ORANGE, COLOUR_BRIGHT_PINK}; +static constexpr const uint8_t dazzling_ride_colours[] = {COLOUR_BRIGHT_PURPLE, COLOUR_BRIGHT_GREEN, COLOUR_LIGHT_ORANGE, COLOUR_BRIGHT_PINK}; -static bool award_is_deserved_most_dazzling_ride_colours(sint32 activeAwardTypes) +static bool award_is_deserved_most_dazzling_ride_colours(int32_t activeAwardTypes) { - sint32 i, countedRides, colourfulRides; + int32_t i, countedRides, colourfulRides; Ride * ride; - uint8 mainTrackColour; + uint8_t mainTrackColour; if (activeAwardTypes & (1 << PARK_AWARD_MOST_DISAPPOINTING)) return false; @@ -581,10 +581,10 @@ static bool award_is_deserved_most_dazzling_ride_colours(sint32 activeAwardTypes } /** At least 10 peeps and more than 1/64 of total guests are lost or can't find something. */ -static bool award_is_deserved_most_confusing_layout([[maybe_unused]] sint32 activeAwardTypes) +static bool award_is_deserved_most_confusing_layout([[maybe_unused]] int32_t activeAwardTypes) { - uint32 peepsCounted, peepsLost; - uint16 spriteIndex; + uint32_t peepsCounted, peepsLost; + uint16_t spriteIndex; rct_peep * peep; peepsCounted = 0; @@ -603,9 +603,9 @@ static bool award_is_deserved_most_confusing_layout([[maybe_unused]] sint32 acti } /** At least 10 open gentle rides. */ -static bool award_is_deserved_best_gentle_rides([[maybe_unused]] sint32 activeAwardTypes) +static bool award_is_deserved_best_gentle_rides([[maybe_unused]] int32_t activeAwardTypes) { - sint32 i, gentleRides; + int32_t i, gentleRides; Ride * ride; rct_ride_entry * rideEntry; @@ -634,7 +634,7 @@ static bool award_is_deserved_best_gentle_rides([[maybe_unused]] sint32 activeAw return (gentleRides >= 10); } -using award_deserved_check = bool (*)(sint32); +using award_deserved_check = bool (*)(int32_t); static constexpr const award_deserved_check _awardChecks[] = { @@ -657,7 +657,7 @@ static constexpr const award_deserved_check _awardChecks[] = award_is_deserved_best_gentle_rides }; -static bool award_is_deserved(sint32 awardType, sint32 activeAwardTypes) +static bool award_is_deserved(int32_t awardType, int32_t activeAwardTypes) { return _awardChecks[awardType](activeAwardTypes); } @@ -683,9 +683,9 @@ void award_update_all() if (gParkFlags & PARK_FLAGS_PARK_OPEN) { // Set active award types as flags - sint32 activeAwardTypes = 0; - sint32 freeAwardEntryIndex = -1; - for (sint32 i = 0; i < MAX_AWARDS; i++) + int32_t activeAwardTypes = 0; + int32_t freeAwardEntryIndex = -1; + for (int32_t i = 0; i < MAX_AWARDS; i++) { if (gCurrentAwards[i].Time != 0) activeAwardTypes |= (1 << gCurrentAwards[i].Type); @@ -697,7 +697,7 @@ void award_update_all() if (freeAwardEntryIndex != -1) { // Get a random award type not already active - sint32 awardType; + int32_t awardType; do { awardType = (((scenario_rand() & 0xFF) * 17) >> 8) & 0xFF; diff --git a/src/openrct2/management/Award.h b/src/openrct2/management/Award.h index 85b84d7827..a9ca3725a0 100644 --- a/src/openrct2/management/Award.h +++ b/src/openrct2/management/Award.h @@ -13,8 +13,8 @@ struct Award { - uint16 Time; - uint16 Type; + uint16_t Time; + uint16_t Type; }; enum PARK_AWARD @@ -43,6 +43,6 @@ enum PARK_AWARD extern Award gCurrentAwards[MAX_AWARDS]; -bool award_is_positive(sint32 type); +bool award_is_positive(int32_t type); void award_reset(); void award_update_all(); diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index c8c52d330d..ae688bfd62 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -44,24 +44,24 @@ const money32 research_cost_table[RESEARCH_FUNDING_COUNT] = MONEY(400, 00) // Maximum funding }; -static constexpr const sint32 dword_988E60[RCT_EXPENDITURE_TYPE_COUNT] = {1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0}; +static constexpr const int32_t dword_988E60[RCT_EXPENDITURE_TYPE_COUNT] = {1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0}; money32 gInitialCash; money32 gCash; money32 gBankLoan; -uint8 gBankLoanInterestRate; +uint8_t gBankLoanInterestRate; money32 gMaxBankLoan; money32 gCurrentExpenditure; money32 gCurrentProfit; money32 gHistoricalProfit; money32 gWeeklyProfitAverageDividend; -uint16 gWeeklyProfitAverageDivisor; +uint16_t gWeeklyProfitAverageDivisor; money32 gCashHistory[FINANCE_GRAPH_SIZE]; money32 gWeeklyProfitHistory[FINANCE_GRAPH_SIZE]; money32 gParkValueHistory[FINANCE_GRAPH_SIZE]; money32 gExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT][RCT_EXPENDITURE_TYPE_COUNT]; -uint8 gCommandExpenditureType; +uint8_t gCommandExpenditureType; /** * Pay an amount of money. @@ -92,7 +92,7 @@ void finance_payment(money32 amount, rct_expenditure_type type) void finance_pay_wages() { rct_peep * peep; - uint16 spriteIndex; + uint16_t spriteIndex; if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -111,7 +111,7 @@ void finance_pay_wages() **/ void finance_pay_research() { - uint8 level; + uint8_t level; if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -131,7 +131,7 @@ void finance_pay_interest() // This variable uses the 64-bit type as the computation below can involve multiplying very large numbers // that will overflow money32 if the loan is greater than (1 << 31) / (5 * current_interest_rate) money64 current_loan = gBankLoan; - uint8 current_interest_rate = gBankLoanInterestRate; + uint8_t current_interest_rate = gBankLoanInterestRate; money32 interest_to_pay; if (gParkFlags & PARK_FLAGS_NO_MONEY) @@ -150,7 +150,7 @@ void finance_pay_interest() */ void finance_pay_ride_upkeep() { - sint32 i; + int32_t i; Ride * ride; FOR_ALL_RIDES(i, ride) @@ -162,7 +162,7 @@ void finance_pay_ride_upkeep() if (ride->status != RIDE_STATUS_CLOSED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { - sint16 upkeep = ride->upkeep_cost; + int16_t upkeep = ride->upkeep_cost; if (upkeep != -1) { ride->total_profit -= upkeep; @@ -180,7 +180,7 @@ void finance_pay_ride_upkeep() void finance_reset_history() { - for (sint32 i = 0; i < FINANCE_GRAPH_SIZE; i++) + for (int32_t i = 0; i < FINANCE_GRAPH_SIZE; i++) { gCashHistory[i] = MONEY32_UNDEFINED; gWeeklyProfitHistory[i] = MONEY32_UNDEFINED; @@ -195,7 +195,7 @@ void finance_reset_history() void finance_init() { // It only initialises the first month - for (uint32 i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) + for (uint32_t i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) { gExpenditureTable[0][i] = 0; } @@ -237,7 +237,7 @@ void finance_update_daily_profit() if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { // Staff costs - uint16 sprite_index; + uint16_t sprite_index; rct_peep * peep; FOR_ALL_STAFF(sprite_index, peep) @@ -246,7 +246,7 @@ void finance_update_daily_profit() } // Research costs - uint8 level = gResearchFundingLevel; + uint8_t level = gResearchFundingLevel; current_profit -= research_cost_table[level]; // Loan costs @@ -255,7 +255,7 @@ void finance_update_daily_profit() // Ride costs Ride * ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride->status != RIDE_STATUS_CLOSED && ride->upkeep_cost != MONEY16_UNDEFINED) @@ -308,7 +308,7 @@ void finance_shift_expenditure_table() if (gDateMonthsElapsed >= EXPENDITURE_TABLE_MONTH_COUNT) { money32 sum = 0; - for (uint32 i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) + for (uint32_t i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) { sum += gExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT - 1][i]; } @@ -325,7 +325,7 @@ void finance_shift_expenditure_table() } // Zero the beginning of the table, which is the new month - for (uint32 i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) + for (uint32_t i = 0; i < RCT_EXPENDITURE_TYPE_COUNT; i++) { gExpenditureTable[0][i] = 0; } diff --git a/src/openrct2/management/Finance.h b/src/openrct2/management/Finance.h index 5779969d83..58fdf87683 100644 --- a/src/openrct2/management/Finance.h +++ b/src/openrct2/management/Finance.h @@ -13,7 +13,7 @@ #include "../peep/Staff.h" #include "Research.h" -using rct_expenditure_type = sint32; +using rct_expenditure_type = int32_t; enum { RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION, @@ -42,7 +42,7 @@ extern const money32 research_cost_table[RESEARCH_FUNDING_COUNT]; extern money32 gInitialCash; extern money32 gCash; extern money32 gBankLoan; -extern uint8 gBankLoanInterestRate; +extern uint8_t gBankLoanInterestRate; extern money32 gMaxBankLoan; extern money32 gCurrentExpenditure; extern money32 gCurrentProfit; @@ -54,13 +54,13 @@ extern money32 gCurrentProfit; extern money32 gHistoricalProfit; extern money32 gWeeklyProfitAverageDividend; -extern uint16 gWeeklyProfitAverageDivisor; +extern uint16_t gWeeklyProfitAverageDivisor; extern money32 gCashHistory[FINANCE_GRAPH_SIZE]; extern money32 gWeeklyProfitHistory[FINANCE_GRAPH_SIZE]; extern money32 gParkValueHistory[FINANCE_GRAPH_SIZE]; extern money32 gExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT][RCT_EXPENDITURE_TYPE_COUNT]; -extern uint8 gCommandExpenditureType; +extern uint8_t gCommandExpenditureType; void finance_payment(money32 amount, rct_expenditure_type type); void finance_pay_wages(); diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index f942f328aa..1b8f306b46 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -31,14 +31,14 @@ const money16 AdvertisingCampaignPricePerWeek[] = MONEY(200, 00) // RIDE }; -static constexpr const sint32 AdvertisingCampaignGuestGenerationProbabilities[] = {400, 300, 200, 200, 250, 200}; +static constexpr const int32_t AdvertisingCampaignGuestGenerationProbabilities[] = {400, 300, 200, 200, 250, 200}; -uint8 gMarketingCampaignDaysLeft[20]; -uint8 gMarketingCampaignRideIndex[22]; +uint8_t gMarketingCampaignDaysLeft[20]; +uint8_t gMarketingCampaignRideIndex[22]; -sint32 marketing_get_campaign_guest_generation_probability(sint32 campaign) +int32_t marketing_get_campaign_guest_generation_probability(int32_t campaign) { - sint32 probability = AdvertisingCampaignGuestGenerationProbabilities[campaign]; + int32_t probability = AdvertisingCampaignGuestGenerationProbabilities[campaign]; Ride * ride; // Lower probability of guest generation if price was already low @@ -68,12 +68,12 @@ sint32 marketing_get_campaign_guest_generation_probability(sint32 campaign) */ void marketing_update() { - for (sint32 campaign = 0; campaign < ADVERTISING_CAMPAIGN_COUNT; campaign++) + for (int32_t campaign = 0; campaign < ADVERTISING_CAMPAIGN_COUNT; campaign++) { if (gCheatsNeverendingMarketing) continue; - sint32 active = (gMarketingCampaignDaysLeft[campaign] & CAMPAIGN_ACTIVE_FLAG) != 0; + int32_t active = (gMarketingCampaignDaysLeft[campaign] & CAMPAIGN_ACTIVE_FLAG) != 0; if (gMarketingCampaignDaysLeft[campaign] == 0) continue; @@ -88,14 +88,14 @@ void marketing_update() if (--gMarketingCampaignDaysLeft[campaign] != 0) continue; - sint32 campaignItem = gMarketingCampaignRideIndex[campaign]; + int32_t campaignItem = gMarketingCampaignRideIndex[campaign]; // This sets the string parameters for the marketing types that have an argument. if (campaign == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign == ADVERTISING_CAMPAIGN_RIDE) { Ride * ride = get_ride(campaignItem); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); } else if (campaign == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) { @@ -109,7 +109,7 @@ void marketing_update() } } -void marketing_set_guest_campaign(rct_peep * peep, sint32 campaign) +void marketing_set_guest_campaign(rct_peep * peep, int32_t campaign) { switch (campaign) { @@ -142,9 +142,9 @@ void marketing_set_guest_campaign(rct_peep * peep, sint32 campaign) } } -bool marketing_is_campaign_type_applicable(sint32 campaignType) +bool marketing_is_campaign_type_applicable(int32_t campaignType) { - sint32 i; + int32_t i; Ride * ride; rct_ride_entry * rideEntry; diff --git a/src/openrct2/management/Marketing.h b/src/openrct2/management/Marketing.h index 9d2a6b3d7f..19ff5b5bc0 100644 --- a/src/openrct2/management/Marketing.h +++ b/src/openrct2/management/Marketing.h @@ -35,10 +35,10 @@ enum { }; extern const money16 AdvertisingCampaignPricePerWeek[ADVERTISING_CAMPAIGN_COUNT]; -extern uint8 gMarketingCampaignDaysLeft[20]; -extern uint8 gMarketingCampaignRideIndex[22]; +extern uint8_t gMarketingCampaignDaysLeft[20]; +extern uint8_t gMarketingCampaignRideIndex[22]; -sint32 marketing_get_campaign_guest_generation_probability(sint32 campaign); +int32_t marketing_get_campaign_guest_generation_probability(int32_t campaign); void marketing_update(); -void marketing_set_guest_campaign(rct_peep *peep, sint32 campaign); -bool marketing_is_campaign_type_applicable(sint32 campaignType); +void marketing_set_guest_campaign(rct_peep *peep, int32_t campaign); +bool marketing_is_campaign_type_applicable(int32_t campaignType); diff --git a/src/openrct2/management/NewsItem.cpp b/src/openrct2/management/NewsItem.cpp index 059adc8192..898f3e62cc 100644 --- a/src/openrct2/management/NewsItem.cpp +++ b/src/openrct2/management/NewsItem.cpp @@ -25,7 +25,7 @@ NewsItem gNewsItems[MAX_NEWS_ITEMS]; /** rct2: 0x0097BE7C */ -const uint8 news_type_properties[] = +const uint8_t news_type_properties[] = { 0, // NEWS_ITEM_NULL NEWS_TYPE_HAS_LOCATION | NEWS_TYPE_HAS_SUBJECT, // NEWS_ITEM_RIDE @@ -39,9 +39,9 @@ const uint8 news_type_properties[] = NEWS_TYPE_HAS_SUBJECT, // NEWS_ITEM_GRAPH }; -static sint32 news_item_get_new_history_slot(); +static int32_t news_item_get_new_history_slot(); -bool news_item_is_valid_idx(sint32 index) +bool news_item_is_valid_idx(int32_t index) { if (index >= MAX_NEWS_ITEMS) { @@ -51,7 +51,7 @@ bool news_item_is_valid_idx(sint32 index) return true; } -NewsItem * news_item_get(sint32 index) +NewsItem * news_item_get(int32_t index) { if (news_item_is_valid_idx(index)) { @@ -63,7 +63,7 @@ NewsItem * news_item_get(sint32 index) } } -bool news_item_is_empty(sint32 index) +bool news_item_is_empty(int32_t index) { NewsItem * news = news_item_get(index); return news != nullptr && news->Type == NEWS_ITEM_NULL; @@ -95,7 +95,7 @@ void news_item_init_queue() static void news_item_tick_current() { - sint32 ticks; + int32_t ticks; ticks = ++news_item_get(0)->Ticks; // Only play news item sound when in normal playing mode if (ticks == 1 && (gScreenFlags == SCREEN_FLAGS_PLAYING)) @@ -107,7 +107,7 @@ static void news_item_tick_current() static bool news_item_is_current_old() { - sint32 remove_time = 320; + int32_t remove_time = 320; if (!news_item_is_empty(5) && !news_item_is_empty(4) && !news_item_is_empty(3) && @@ -146,7 +146,7 @@ void news_item_update_current() */ void news_item_close_current() { - sint32 i; + int32_t i; NewsItem * newsItems = gNewsItems; // Check if there is a current message @@ -180,7 +180,7 @@ void news_item_close_current() static void news_item_shift_history_up() { - const sint32 history_idx = 11; + const int32_t history_idx = 11; NewsItem * history_start = news_item_get(history_idx); const size_t count = sizeof(NewsItem) * (MAX_NEWS_ITEMS - 1 - history_idx); memmove(history_start, history_start + 1, count); @@ -191,10 +191,10 @@ static void news_item_shift_history_up() * Finds a spare history slot or replaces an existing one if there are no spare * slots available. */ -static sint32 news_item_get_new_history_slot() +static int32_t news_item_get_new_history_slot() { // Find an available history news item slot - for (sint32 i = 11; i < MAX_NEWS_ITEMS; i++) + for (int32_t i = 11; i < MAX_NEWS_ITEMS; i++) { if (news_item_is_empty(i)) return i; @@ -211,7 +211,7 @@ static sint32 news_item_get_new_history_slot() * * rct2: 0x0066BA74 */ -void news_item_get_subject_location(sint32 type, sint32 subject, sint32 * x, sint32 * y, sint32 * z) +void news_item_get_subject_location(int32_t type, int32_t subject, int32_t * x, int32_t * y, int32_t * z) { Ride * ride; rct_peep * peep; @@ -255,7 +255,7 @@ void news_item_get_subject_location(sint32 type, sint32 subject, sint32 * x, sin // Find the first car of the train peep is on vehicle = &(get_sprite(ride->vehicles[peep->current_train])->vehicle); // Find the actual car peep is on - for (sint32 i = 0; i < peep->current_car; i++) + for (int32_t i = 0; i < peep->current_car; i++) { vehicle = &(get_sprite(vehicle->next_vehicle_on_train)->vehicle); } @@ -285,7 +285,7 @@ void news_item_get_subject_location(sint32 type, sint32 subject, sint32 * x, sin * * rct2: 0x0066DF55 */ -void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc) +void news_item_add_to_queue(uint8_t type, rct_string_id string_id, uint32_t assoc) { utf8 buffer[256]; void * args = gCommonFormatArgs; @@ -295,7 +295,7 @@ void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc) news_item_add_to_queue_raw(type, buffer, assoc); } -void news_item_add_to_queue_raw(uint8 type, const utf8 * text, uint32 assoc) +void news_item_add_to_queue_raw(uint8_t type, const utf8 * text, uint32_t assoc) { NewsItem * newsItem = gNewsItems; @@ -329,7 +329,7 @@ void news_item_add_to_queue_raw(uint8 type, const utf8 * text, uint32 assoc) * rct2: 0x0066EBE6 * */ -void news_item_open_subject(sint32 type, sint32 subject) +void news_item_open_subject(int32_t type, int32_t subject) { rct_peep * peep; rct_window * window; @@ -408,10 +408,10 @@ void news_item_open_subject(sint32 type, sint32 subject) * * rct2: 0x0066E407 */ -void news_item_disable_news(uint8 type, uint32 assoc) +void news_item_disable_news(uint8_t type, uint32_t assoc) { // TODO: write test invalidating windows - for (sint32 i = 0; i < 11; i++) + for (int32_t i = 0; i < 11; i++) { if (!news_item_is_empty(i)) { @@ -432,7 +432,7 @@ void news_item_disable_news(uint8 type, uint32 assoc) } } - for (sint32 i = 11; i < MAX_NEWS_ITEMS; i++) + for (int32_t i = 11; i < MAX_NEWS_ITEMS; i++) { if (!news_item_is_empty(i)) { diff --git a/src/openrct2/management/NewsItem.h b/src/openrct2/management/NewsItem.h index 7fe7a8a2c0..4d59c2eadd 100644 --- a/src/openrct2/management/NewsItem.h +++ b/src/openrct2/management/NewsItem.h @@ -41,18 +41,18 @@ enum */ struct NewsItem { - uint8 Type; - uint8 Flags; - uint32 Assoc; - uint16 Ticks; - uint16 MonthYear; - uint8 Day; + uint8_t Type; + uint8_t Flags; + uint32_t Assoc; + uint16_t Ticks; + uint16_t MonthYear; + uint8_t Day; utf8 Text[256]; }; #define MAX_NEWS_ITEMS 61 -extern const uint8 news_type_properties[10]; +extern const uint8_t news_type_properties[10]; extern NewsItem gNewsItems[MAX_NEWS_ITEMS]; @@ -61,21 +61,21 @@ void news_item_init_queue(); void news_item_update_current(); void news_item_close_current(); -void news_item_get_subject_location(sint32 type, sint32 subject, sint32 * x, sint32 * y, sint32 * z); +void news_item_get_subject_location(int32_t type, int32_t subject, int32_t * x, int32_t * y, int32_t * z); -void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc); -void news_item_add_to_queue_raw(uint8 type, const utf8 * text, uint32 assoc); +void news_item_add_to_queue(uint8_t type, rct_string_id string_id, uint32_t assoc); +void news_item_add_to_queue_raw(uint8_t type, const utf8 * text, uint32_t assoc); -void news_item_open_subject(sint32 type, sint32 subject); +void news_item_open_subject(int32_t type, int32_t subject); -void news_item_disable_news(uint8 type, uint32 assoc); +void news_item_disable_news(uint8_t type, uint32_t assoc); -NewsItem * news_item_get(sint32 index); +NewsItem * news_item_get(int32_t index); -bool news_item_is_empty(sint32 index); +bool news_item_is_empty(int32_t index); bool news_item_is_queue_empty(); -bool news_item_is_valid_idx(sint32 index); +bool news_item_is_valid_idx(int32_t index); void news_item_add_to_queue_custom(NewsItem * newNewsItem); diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 9a6ce67667..79af09d35a 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -33,22 +33,22 @@ #include "../core/Memory.hpp" #include "../util/Util.h" -static constexpr const sint32 _researchRate[] = {0, 160, 250, 400}; +static constexpr const int32_t _researchRate[] = {0, 160, 250, 400}; -uint8 gResearchFundingLevel; -uint8 gResearchPriorities; -uint16 gResearchProgress; -uint8 gResearchProgressStage; +uint8_t gResearchFundingLevel; +uint8_t gResearchPriorities; +uint16_t gResearchProgress; +uint8_t gResearchProgressStage; rct_research_item gResearchLastItem; -uint8 gResearchExpectedMonth; -uint8 gResearchExpectedDay; +uint8_t gResearchExpectedMonth; +uint8_t gResearchExpectedDay; rct_research_item gResearchNextItem; // 0x01358844[500] rct_research_item gResearchItems[MAX_RESEARCH_ITEMS]; // 0x00EE787C -uint8 gResearchUncompletedCategories; +uint8_t gResearchUncompletedCategories; static bool _researchedRideTypes[RIDE_TYPE_COUNT]; static bool _researchedRideEntries[MAX_RIDE_OBJECTS]; @@ -75,7 +75,7 @@ void research_reset_items() */ void research_update_uncompleted_types() { - sint32 uncompletedResearchTypes = 0; + int32_t uncompletedResearchTypes = 0; rct_research_item * researchItem = gResearchItems; while (researchItem++->rawValue != RESEARCHED_ITEMS_SEPARATOR); @@ -99,15 +99,15 @@ static void research_calculate_expected_date() } else { - sint32 progressRemaining = gResearchProgressStage == RESEARCH_STAGE_COMPLETING_DESIGN ? 0x10000 : 0x20000; + int32_t progressRemaining = gResearchProgressStage == RESEARCH_STAGE_COMPLETING_DESIGN ? 0x10000 : 0x20000; progressRemaining -= gResearchProgress; - sint32 daysRemaining = (progressRemaining / _researchRate[gResearchFundingLevel]) * 128; + int32_t daysRemaining = (progressRemaining / _researchRate[gResearchFundingLevel]) * 128; - sint32 expectedDay = gDateMonthTicks + (daysRemaining & 0xFFFF); - sint32 dayQuotient = expectedDay / 0x10000; - sint32 dayRemainder = expectedDay % 0x10000; + int32_t expectedDay = gDateMonthTicks + (daysRemaining & 0xFFFF); + int32_t dayQuotient = expectedDay / 0x10000; + int32_t dayRemainder = expectedDay % 0x10000; - sint32 expectedMonth = date_get_month(gDateMonthsElapsed + dayQuotient + (daysRemaining >> 16)); + int32_t expectedMonth = date_get_month(gDateMonthsElapsed + dayQuotient + (daysRemaining >> 16)); expectedDay = (dayRemainder * days_in_month[expectedMonth]) >> 16; gResearchExpectedDay = expectedDay; @@ -128,7 +128,7 @@ static void research_invalidate_related_windows() static void research_next_design() { rct_research_item * firstUnresearchedItem, * researchItem, tmp; - sint32 ignoreActiveResearchTypes; + int32_t ignoreActiveResearchTypes; // Skip already researched items firstUnresearchedItem = gResearchItems; @@ -196,8 +196,8 @@ void research_finish_item(rct_research_item * researchItem) if (researchItem->type == RESEARCH_ENTRY_TYPE_RIDE) { // Ride - uint32 base_ride_type = researchItem->baseRideType; - sint32 rideEntryIndex = researchItem->entryIndex; + uint32_t base_ride_type = researchItem->baseRideType; + int32_t rideEntryIndex = researchItem->entryIndex; rct_ride_entry * rideEntry = get_ride_entry(rideEntryIndex); if (rideEntry != nullptr && base_ride_type != RIDE_TYPE_NULL) @@ -231,21 +231,21 @@ void research_finish_item(rct_research_item * researchItem) if (researchItem2->rawValue != RESEARCHED_ITEMS_SEPARATOR && researchItem2->type == RESEARCH_ENTRY_TYPE_RIDE) { - uint8 index = researchItem2->entryIndex; + uint8_t index = researchItem2->entryIndex; seenRideEntry[index] = true; } } // RCT2 made non-separated vehicles available at once, by removing all but one from research. // To ensure old files keep working, look for ride entries not in research, and make them available as well. - for (sint32 i = 0; i < MAX_RIDE_OBJECTS; i++) + for (int32_t i = 0; i < MAX_RIDE_OBJECTS; i++) { if (!seenRideEntry[i]) { rct_ride_entry * rideEntry2 = get_ride_entry(i); if (rideEntry2 != nullptr) { - for (uint8 j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) + for (uint8_t j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) { if (rideEntry2->ride_type[j] == base_ride_type) { @@ -323,7 +323,7 @@ void research_finish_item(rct_research_item * researchItem) */ void research_update() { - sint32 editorScreenFlags, researchLevel, currentResearchProgress; + int32_t editorScreenFlags, researchLevel, currentResearchProgress; editorScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER; if (gScreenFlags & editorScreenFlags) @@ -410,7 +410,7 @@ void research_process_random_items() assert(ebp != nullptr); ebp->rawValue = (research + 1)->rawValue; - uint8 cat = edx->category; + uint8_t cat = edx->category; edx->category = ebp->category; ebp->category = cat; } @@ -446,7 +446,7 @@ void research_reset_current_item() * * rct2: 0x006857FA */ -static void research_insert_unresearched(sint32 rawValue, sint32 category) +static void research_insert_unresearched(int32_t rawValue, int32_t category) { rct_research_item * researchItem, * researchItem2; @@ -476,7 +476,7 @@ static void research_insert_unresearched(sint32 rawValue, sint32 category) * * rct2: 0x00685826 */ -static void research_insert_researched(sint32 rawValue, uint8 category) +static void research_insert_researched(int32_t rawValue, uint8_t category) { rct_research_item * researchItem, * researchItem2; @@ -532,7 +532,7 @@ void research_remove(rct_research_item * researchItem) } } -void research_insert(sint32 researched, sint32 rawValue, uint8 category) +void research_insert(int32_t researched, int32_t rawValue, uint8_t category) { if (researched) { @@ -553,7 +553,7 @@ void research_populate_list_random() research_reset_items(); // Rides - for (sint32 i = 0; i < MAX_RIDE_OBJECTS; i++) + for (int32_t i = 0; i < MAX_RIDE_OBJECTS; i++) { rct_ride_entry * rideEntry = get_ride_entry(i); if (rideEntry == nullptr) @@ -561,7 +561,7 @@ void research_populate_list_random() continue; } - sint32 researched = (scenario_rand() & 0xFF) > 128; + int32_t researched = (scenario_rand() & 0xFF) > 128; for (auto rideType : rideEntry->ride_type) { if (rideType != RIDE_TYPE_NULL) @@ -572,7 +572,7 @@ void research_populate_list_random() } // Scenery - for (sint32 i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) + for (int32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { rct_scenery_group_entry * sceneryGroupEntry = get_scenery_group_entry(i); if (sceneryGroupEntry == nullptr) @@ -580,7 +580,7 @@ void research_populate_list_random() continue; } - sint32 researched = (scenario_rand() & 0xFF) > 85; + int32_t researched = (scenario_rand() & 0xFF) > 85; research_insert(researched, i, RESEARCH_CATEGORY_SCENERY_GROUP); } } @@ -588,7 +588,7 @@ void research_populate_list_random() void research_populate_list_researched() { // Rides - for (sint32 i = 0; i < MAX_RIDE_OBJECTS; i++) + for (int32_t i = 0; i < MAX_RIDE_OBJECTS; i++) { rct_ride_entry * rideEntry = get_ride_entry(i); if (rideEntry == nullptr) @@ -606,7 +606,7 @@ void research_populate_list_researched() } // Scenery - for (sint32 i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) + for (int32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { rct_scenery_group_entry * sceneryGroupEntry = get_scenery_group_entry(i); if (sceneryGroupEntry == nullptr) @@ -618,10 +618,10 @@ void research_populate_list_researched() } } -void research_insert_ride_entry(uint8 entryIndex, bool researched) +void research_insert_ride_entry(uint8_t entryIndex, bool researched) { rct_ride_entry * rideEntry = get_ride_entry(entryIndex); - uint8 category = rideEntry->category[0]; + uint8_t category = rideEntry->category[0]; for (auto rideType : rideEntry->ride_type) { if (rideType != RIDE_TYPE_NULL) @@ -631,54 +631,54 @@ void research_insert_ride_entry(uint8 entryIndex, bool researched) } } -void research_insert_scenery_group_entry(uint8 entryIndex, bool researched) +void research_insert_scenery_group_entry(uint8_t entryIndex, bool researched) { research_insert(researched, entryIndex, RESEARCH_CATEGORY_SCENERY_GROUP); } -bool ride_type_is_invented(uint32 rideType) +bool ride_type_is_invented(uint32_t rideType) { Guard::Assert(rideType < Util::CountOf(_researchedRideTypes), GUARD_LINE); return _researchedRideTypes[rideType]; } -bool ride_entry_is_invented(sint32 rideEntryIndex) +bool ride_entry_is_invented(int32_t rideEntryIndex) { return _researchedRideEntries[rideEntryIndex]; } -bool track_piece_is_available_for_ride_type(uint8 rideType, sint32 trackType) +bool track_piece_is_available_for_ride_type(uint8_t rideType, int32_t trackType) { return RideTypePossibleTrackConfigurations[rideType] & (1ULL << trackType); } -void ride_type_set_invented(uint32 rideType) +void ride_type_set_invented(uint32_t rideType) { Guard::Assert(rideType < Util::CountOf(_researchedRideTypes), GUARD_LINE); _researchedRideTypes[rideType] = true; } -void ride_entry_set_invented(sint32 rideEntryIndex) +void ride_entry_set_invented(int32_t rideEntryIndex) { _researchedRideEntries[rideEntryIndex] = true; } -bool scenery_is_invented(uint16 sceneryItem) +bool scenery_is_invented(uint16_t sceneryItem) { return _researchedSceneryItems[sceneryItem]; } -void scenery_set_invented(uint16 sceneryItem) +void scenery_set_invented(uint16_t sceneryItem) { _researchedSceneryItems[sceneryItem] = true; } -void scenery_set_not_invented(uint16 sceneryItem) +void scenery_set_not_invented(uint16_t sceneryItem) { _researchedSceneryItems[sceneryItem] = false; } -bool scenery_group_is_invented(sint32 sgIndex) +bool scenery_group_is_invented(int32_t sgIndex) { auto invented = false; const auto sgEntry = get_scenery_group_entry(sgIndex); @@ -704,7 +704,7 @@ bool scenery_group_is_invented(sint32 sgIndex) return invented; } -void scenery_group_set_invented(sint32 sgIndex) +void scenery_group_set_invented(int32_t sgIndex) { const auto sgEntry = get_scenery_group_entry(sgIndex); if (sgEntry != nullptr && sgEntry->entry_count > 0) @@ -719,7 +719,7 @@ void scenery_group_set_invented(sint32 sgIndex) void set_all_scenery_groups_not_invented() { - for (sint32 i = 0; i < MAX_SCENERY_GROUP_OBJECTS; ++i) + for (int32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; ++i) { rct_scenery_group_entry * scenery_set = get_scenery_group_entry(i); if (scenery_set == nullptr) @@ -727,7 +727,7 @@ void set_all_scenery_groups_not_invented() continue; } - for (sint32 j = 0; j < scenery_set->entry_count; ++j) + for (int32_t j = 0; j < scenery_set->entry_count; ++j) { scenery_set_not_invented(scenery_set->scenery_entries[j]); } @@ -818,7 +818,7 @@ rct_string_id research_item_get_name(const rct_research_item * researchItem) /** * This will return the name of the base ride type or ride group, as seen in the research window. */ -rct_string_id research_get_friendly_base_ride_type_name(uint8 trackType, rct_ride_entry * rideEntry) +rct_string_id research_get_friendly_base_ride_type_name(uint8_t trackType, rct_ride_entry * rideEntry) { if (RideGroupManager::RideTypeHasRideGroups(trackType)) { @@ -851,7 +851,7 @@ void research_remove_flags() void research_fix() { // Fix invalid research items - for (sint32 i = 0; i < MAX_RESEARCH_ITEMS; i++) + for (int32_t i = 0; i < MAX_RESEARCH_ITEMS; i++) { rct_research_item * researchItem = &gResearchItems[i]; if (researchItem->rawValue == RESEARCHED_ITEMS_SEPARATOR) @@ -896,7 +896,7 @@ void research_fix() // For good measure, also include scenery groups. if (gResearchProgressStage == RESEARCH_STAGE_FINISHED_ALL) { - for (uint8 i = 0; i < MAX_RIDE_OBJECTS; i++) + for (uint8_t i = 0; i < MAX_RIDE_OBJECTS; i++) { const rct_ride_entry * rideEntry = get_ride_entry(i); @@ -905,9 +905,9 @@ void research_fix() research_insert_ride_entry(i, true); ride_entry_set_invented(i); - for (uint8 j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) + for (uint8_t j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) { - uint32 rideType = rideEntry->ride_type[j]; + uint32_t rideType = rideEntry->ride_type[j]; if (rideType != RIDE_TYPE_NULL) { ride_type_set_invented(rideEntry->ride_type[j]); @@ -916,7 +916,7 @@ void research_fix() } } - for (uint8 i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) + for (uint8_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { const rct_scenery_group_entry * groupEntry = get_scenery_group_entry(i); @@ -930,7 +930,7 @@ void research_items_make_all_unresearched() { rct_research_item * researchItem, * nextResearchItem, researchItemTemp; - sint32 sorted; + int32_t sorted; do { sorted = 1; for (researchItem = gResearchItems; researchItem->rawValue != RESEARCHED_ITEMS_SEPARATOR; researchItem++) @@ -979,7 +979,7 @@ void research_items_make_all_researched() void research_items_shuffle() { rct_research_item * researchItem, * researchOrderBase, researchItemTemp; - sint32 i, numNonResearchedItems; + int32_t i, numNonResearchedItems; // Skip pre-researched items for (researchItem = gResearchItems; researchItem->rawValue != RESEARCHED_ITEMS_SEPARATOR; researchItem++) {} @@ -994,7 +994,7 @@ void research_items_shuffle() // Shuffle list for (i = 0; i < numNonResearchedItems; i++) { - sint32 ri = util_rand() % numNonResearchedItems; + int32_t ri = util_rand() % numNonResearchedItems; if (ri == i) continue; diff --git a/src/openrct2/management/Research.h b/src/openrct2/management/Research.h index 51133765b1..b308ba57bf 100644 --- a/src/openrct2/management/Research.h +++ b/src/openrct2/management/Research.h @@ -21,16 +21,16 @@ struct rct_research_item // Bit 16 (0: scenery entry, 1: ride entry) union { - sint32 rawValue; + int32_t rawValue; struct { - uint8 entryIndex; - uint8 baseRideType; - uint8 type; // 0: scenery entry, 1: ride entry - uint8 flags; + uint8_t entryIndex; + uint8_t baseRideType; + uint8_t type; // 0: scenery entry, 1: ride entry + uint8_t flags; }; }; - uint8 category; + uint8_t category; bool IsInventedEndMarker() const; bool IsRandomEndMarker() const; @@ -91,17 +91,17 @@ enum { RESEARCH_CATEGORY_SCENERY_GROUP }; -extern uint8 gResearchFundingLevel; -extern uint8 gResearchPriorities; -extern uint16 gResearchProgress; -extern uint8 gResearchProgressStage; -extern uint8 gResearchExpectedMonth; -extern uint8 gResearchExpectedDay; +extern uint8_t gResearchFundingLevel; +extern uint8_t gResearchPriorities; +extern uint16_t gResearchProgress; +extern uint8_t gResearchProgressStage; +extern uint8_t gResearchExpectedMonth; +extern uint8_t gResearchExpectedDay; extern rct_research_item gResearchLastItem; extern rct_research_item gResearchNextItem; extern rct_research_item gResearchItems[MAX_RESEARCH_ITEMS]; -extern uint8 gResearchUncompletedCategories; +extern uint8_t gResearchUncompletedCategories; extern bool gSilentResearch; void research_reset_items(); @@ -113,22 +113,22 @@ void research_populate_list_researched(); void research_process_random_items(); void research_finish_item(rct_research_item * researchItem); -void research_insert(sint32 researched, sint32 rawValue, uint8 category); +void research_insert(int32_t researched, int32_t rawValue, uint8_t category); void research_remove(rct_research_item * researchItem); -void research_insert_ride_entry(uint8 entryIndex, bool researched); -void research_insert_scenery_group_entry(uint8 entryIndex, bool researched); +void research_insert_ride_entry(uint8_t entryIndex, bool researched); +void research_insert_scenery_group_entry(uint8_t entryIndex, bool researched); -void ride_type_set_invented(uint32 rideType); -void ride_entry_set_invented(sint32 rideEntryIndex); -void scenery_set_invented(uint16 sceneryItem); -void scenery_set_not_invented(uint16 sceneryItem); -bool ride_type_is_invented(uint32 rideType); -bool ride_entry_is_invented(sint32 rideEntryIndex); -bool track_piece_is_available_for_ride_type(uint8 rideType, sint32 trackType); -bool scenery_group_is_invented(sint32 sgIndex); -void scenery_group_set_invented(sint32 sgIndex); -bool scenery_is_invented(uint16 sceneryItem); +void ride_type_set_invented(uint32_t rideType); +void ride_entry_set_invented(int32_t rideEntryIndex); +void scenery_set_invented(uint16_t sceneryItem); +void scenery_set_not_invented(uint16_t sceneryItem); +bool ride_type_is_invented(uint32_t rideType); +bool ride_entry_is_invented(int32_t rideEntryIndex); +bool track_piece_is_available_for_ride_type(uint8_t rideType, int32_t trackType); +bool scenery_group_is_invented(int32_t sgIndex); +void scenery_group_set_invented(int32_t sgIndex); +bool scenery_is_invented(uint16_t sceneryItem); void set_all_scenery_items_invented(); void set_all_scenery_items_not_invented(); void set_all_scenery_groups_not_invented(); @@ -137,7 +137,7 @@ void set_every_ride_type_not_invented(); void set_every_ride_entry_invented(); void set_every_ride_entry_not_invented(); rct_string_id research_item_get_name(const rct_research_item * researchItem); -rct_string_id research_get_friendly_base_ride_type_name(uint8 trackType, rct_ride_entry * rideEntry); +rct_string_id research_get_friendly_base_ride_type_name(uint8_t trackType, rct_ride_entry * rideEntry); void research_remove_flags(); void research_fix(); diff --git a/src/openrct2/network/DiscordService.cpp b/src/openrct2/network/DiscordService.cpp index 3a729f5f2c..813cdcc351 100644 --- a/src/openrct2/network/DiscordService.cpp +++ b/src/openrct2/network/DiscordService.cpp @@ -21,7 +21,7 @@ constexpr const char * APPLICATION_ID = "378612438200877056"; constexpr const char * STEAM_APP_ID = nullptr; -constexpr const uint32 REFRESH_INTERVAL = 5 * GAME_UPDATE_FPS; // 5 seconds +constexpr const uint32_t REFRESH_INTERVAL = 5 * GAME_UPDATE_FPS; // 5 seconds static void OnReady([[maybe_unused]] const DiscordUser* request) { diff --git a/src/openrct2/network/DiscordService.h b/src/openrct2/network/DiscordService.h index 7248901d23..5aa43591c3 100644 --- a/src/openrct2/network/DiscordService.h +++ b/src/openrct2/network/DiscordService.h @@ -17,7 +17,7 @@ class DiscordService final { private: - uint32 _ticksSinceLastRefresh = std::numeric_limits::max(); + uint32_t _ticksSinceLastRefresh = std::numeric_limits::max(); public: DiscordService(); diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index 25ad338bdb..7fe12096ca 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -31,7 +31,7 @@ #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static rct_peep* _pickup_peep = nullptr; -static sint32 _pickup_peep_old_x = LOCATION_NULL; +static int32_t _pickup_peep_old_x = LOCATION_NULL; #ifndef DISABLE_NETWORK @@ -212,7 +212,7 @@ void Network::CloseConnection() DisposeWSA(); } -bool Network::BeginClient(const char* host, uint16 port) +bool Network::BeginClient(const char* host, uint16_t port) { if (GetMode() != NETWORK_MODE_NONE) { return false; @@ -299,7 +299,7 @@ bool Network::BeginClient(const char* host, uint16 port) return true; } -bool Network::BeginServer(uint16 port, const char* address) +bool Network::BeginServer(uint16_t port, const char* address) { Close(); if (!Init()) @@ -370,17 +370,17 @@ bool Network::BeginServer(uint16 port, const char* address) return true; } -sint32 Network::GetMode() +int32_t Network::GetMode() { return mode; } -sint32 Network::GetStatus() +int32_t Network::GetStatus() { return status; } -sint32 Network::GetAuthStatus() +int32_t Network::GetAuthStatus() { if (GetMode() == NETWORK_MODE_CLIENT) { return server_connection->AuthStatus; @@ -391,12 +391,12 @@ sint32 Network::GetAuthStatus() return NETWORK_AUTH_NONE; } -uint32 Network::GetServerTick() +uint32_t Network::GetServerTick() { return server_tick; } -uint8 Network::GetPlayerID() +uint8_t Network::GetPlayerID() { return player_id; } @@ -448,7 +448,7 @@ void Network::UpdateServer() } } - uint32 ticks = platform_get_ticks(); + uint32_t ticks = platform_get_ticks(); if (ticks > last_ping_sent_time + 3000) { Server_Send_PING(); Server_Send_PINGLIST(); @@ -567,7 +567,7 @@ void Network::UpdateClient() } } -std::vector>::iterator Network::GetPlayerIteratorByID(uint8 id) +std::vector>::iterator Network::GetPlayerIteratorByID(uint8_t id) { auto it = std::find_if(player_list.begin(), player_list.end(), [&id](std::unique_ptr const& player) { return player->Id == id; }); if (it != player_list.end()) { @@ -576,7 +576,7 @@ std::vector>::iterator Network::GetPlayerIterator return player_list.end(); } -NetworkPlayer* Network::GetPlayerByID(uint8 id) +NetworkPlayer* Network::GetPlayerByID(uint8_t id) { auto it = GetPlayerIteratorByID(id); if (it != player_list.end()) { @@ -585,7 +585,7 @@ NetworkPlayer* Network::GetPlayerByID(uint8 id) return nullptr; } -std::vector>::iterator Network::GetGroupIteratorByID(uint8 id) +std::vector>::iterator Network::GetGroupIteratorByID(uint8_t id) { auto it = std::find_if(group_list.begin(), group_list.end(), [&id](std::unique_ptr const& group) { return group->Id == id; }); if (it != group_list.end()) { @@ -594,7 +594,7 @@ std::vector>::iterator Network::GetGroupIteratorBy return group_list.end(); } -NetworkGroup* Network::GetGroupByID(uint8 id) +NetworkGroup* Network::GetGroupByID(uint8_t id) { auto it = GetGroupIteratorByID(id); if (it != group_list.end()) { @@ -638,7 +638,7 @@ void Network::SendPacketToClients(NetworkPacket& packet, bool front, bool gameCm } } -bool Network::CheckSRAND(uint32 tick, uint32 srand0) +bool Network::CheckSRAND(uint32_t tick, uint32_t srand0) { if (server_srand0_tick == 0) return true; @@ -690,7 +690,7 @@ void Network::CheckDesynchronizaton() } } -void Network::KickPlayer(sint32 playerId) +void Network::KickPlayer(int32_t playerId) { for (auto &client_connection : client_connection_list) { if (client_connection->Player->Id == playerId) { @@ -722,8 +722,8 @@ std::string Network::GenerateAdvertiseKey() // Generate a string of 16 random hex characters (64-integer key as a hex formatted string) static char hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; char key[17]; - for (sint32 i = 0; i < 16; i++) { - sint32 hexCharIndex = util_rand() % Util::CountOf(hexChars); + for (int32_t i = 0; i < 16; i++) { + int32_t hexCharIndex = util_rand() % Util::CountOf(hexChars); key[i] = hexChars[hexCharIndex]; } key[Util::CountOf(key) - 1] = 0; @@ -743,9 +743,9 @@ const char *Network::GetMasterServerUrl() NetworkGroup* Network::AddGroup() { NetworkGroup* addedgroup = nullptr; - sint32 newid = -1; + int32_t newid = -1; // Find first unused group id - for (sint32 id = 0; id < 255; id++) { + for (int32_t id = 0; id < 255; id++) { if (std::find_if(group_list.begin(), group_list.end(), [&id](std::unique_ptr const& group) { return group->Id == id; }) == group_list.end()) { @@ -763,7 +763,7 @@ NetworkGroup* Network::AddGroup() return addedgroup; } -void Network::RemoveGroup(uint8 id) +void Network::RemoveGroup(uint8_t id) { auto group = GetGroupIteratorByID(id); if (group != group_list.end()) { @@ -776,13 +776,13 @@ void Network::RemoveGroup(uint8 id) } } -uint8 Network::GetGroupIDByHash(const std::string &keyhash) +uint8_t Network::GetGroupIDByHash(const std::string &keyhash) { const NetworkUser * networkUser = _userManager.GetUserByHash(keyhash); - uint8 groupId = GetDefaultGroup(); + uint8_t groupId = GetDefaultGroup(); if (networkUser != nullptr && networkUser->GroupId.HasValue()) { - const uint8 assignedGroup = networkUser->GroupId.GetValue(); + const uint8_t assignedGroup = networkUser->GroupId.GetValue(); if (GetGroupByID(assignedGroup) != nullptr) { groupId = assignedGroup; } else { @@ -793,12 +793,12 @@ uint8 Network::GetGroupIDByHash(const std::string &keyhash) return groupId; } -uint8 Network::GetDefaultGroup() +uint8_t Network::GetDefaultGroup() { return default_group; } -void Network::SetDefaultGroup(uint8 id) +void Network::SetDefaultGroup(uint8_t id) { if (GetGroupByID(id)) { default_group = id; @@ -890,7 +890,7 @@ void Network::LoadGroups() group_list.push_back(std::move(newgroup)); } json_t * jsonDefaultGroup = json_object_get(json, "default_group"); - default_group = (uint8)json_integer_value(jsonDefaultGroup); + default_group = (uint8_t)json_integer_value(jsonDefaultGroup); if (GetGroupByID(default_group) == nullptr) { default_group = 0; } @@ -1016,7 +1016,7 @@ void Network::Client_Send_TOKEN() { log_verbose("requesting token"); std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_TOKEN; + *packet << (uint32_t)NETWORK_COMMAND_TOKEN; server_connection->AuthStatus = NETWORK_AUTH_REQUESTED; server_connection->QueuePacket(std::move(packet)); } @@ -1024,27 +1024,27 @@ void Network::Client_Send_TOKEN() void Network::Client_Send_AUTH(const char* name, const char* password, const char* pubkey, const char *sig, size_t sigsize) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_AUTH; + *packet << (uint32_t)NETWORK_COMMAND_AUTH; packet->WriteString(network_get_version().c_str()); packet->WriteString(name); packet->WriteString(password); packet->WriteString(pubkey); assert(sigsize <= (size_t)UINT32_MAX); - *packet << (uint32)sigsize; - packet->Write((const uint8 *)sig, sigsize); + *packet << (uint32_t)sigsize; + packet->Write((const uint8_t *)sig, sigsize); server_connection->AuthStatus = NETWORK_AUTH_REQUESTED; server_connection->QueuePacket(std::move(packet)); } void Network::Client_Send_OBJECTS(const std::vector &objects) { - log_verbose("client requests %u objects", uint32(objects.size())); + log_verbose("client requests %u objects", uint32_t(objects.size())); std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_OBJECTS << (uint32)objects.size(); + *packet << (uint32_t)NETWORK_COMMAND_OBJECTS << (uint32_t)objects.size(); for (const auto &object : objects) { log_verbose("client requests object %s", object.c_str()); - packet->Write((const uint8 *) object.c_str(), 8); + packet->Write((const uint8_t *) object.c_str(), 8); } server_connection->QueuePacket(std::move(packet)); } @@ -1052,7 +1052,7 @@ void Network::Client_Send_OBJECTS(const std::vector &objects) void Network::Server_Send_TOKEN(NetworkConnection& connection) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_TOKEN << (uint32)connection.Challenge.size(); + *packet << (uint32_t)NETWORK_COMMAND_TOKEN << (uint32_t)connection.Challenge.size(); packet->Write(connection.Challenge.data(), connection.Challenge.size()); connection.QueuePacket(std::move(packet)); } @@ -1061,10 +1061,10 @@ void Network::Server_Send_OBJECTS(NetworkConnection& connection, const std::vect { log_verbose("Server sends objects list with %u items", objects.size()); std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_OBJECTS << (uint32)objects.size(); + *packet << (uint32_t)NETWORK_COMMAND_OBJECTS << (uint32_t)objects.size(); for (auto object : objects) { log_verbose("Object %.8s (checksum %x)", object->ObjectEntry.name, object->ObjectEntry.checksum); - packet->Write((const uint8 *) object->ObjectEntry.name, 8); + packet->Write((const uint8_t *) object->ObjectEntry.name, 8); *packet << object->ObjectEntry.checksum << object->ObjectEntry.flags; } connection.QueuePacket(std::move(packet)); @@ -1072,12 +1072,12 @@ void Network::Server_Send_OBJECTS(NetworkConnection& connection, const std::vect void Network::Server_Send_AUTH(NetworkConnection& connection) { - uint8 new_playerid = 0; + uint8_t new_playerid = 0; if (connection.Player) { new_playerid = connection.Player->Id; } std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_AUTH << (uint32)connection.AuthStatus << new_playerid; + *packet << (uint32_t)NETWORK_COMMAND_AUTH << (uint32_t)connection.AuthStatus << new_playerid; if (connection.AuthStatus == NETWORK_AUTH_BADVERSION) { packet->WriteString(network_get_version().c_str()); } @@ -1102,7 +1102,7 @@ void Network::Server_Send_MAP(NetworkConnection* connection) } size_t out_size; - uint8 * header = save_for_network(out_size, objects); + uint8_t * header = save_for_network(out_size, objects); if (header == nullptr) { if (connection) { connection->SetLastDisconnectReason(STR_MULTIPLAYER_CONNECTION_CLOSED); @@ -1114,7 +1114,7 @@ void Network::Server_Send_MAP(NetworkConnection* connection) for (size_t i = 0; i < out_size; i += chunksize) { size_t datasize = std::min(chunksize, out_size - i); std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_MAP << (uint32)out_size << (uint32)i; + *packet << (uint32_t)NETWORK_COMMAND_MAP << (uint32_t)out_size << (uint32_t)i; packet->Write(&header[i], datasize); if (connection) { connection->QueuePacket(std::move(packet)); @@ -1125,9 +1125,9 @@ void Network::Server_Send_MAP(NetworkConnection* connection) free(header); } -uint8 * Network::save_for_network(size_t &out_size, const std::vector &objects) const +uint8_t * Network::save_for_network(size_t &out_size, const std::vector &objects) const { - uint8 * header = nullptr; + uint8_t * header = nullptr; out_size = 0; bool RLEState = gUseRLE; gUseRLE = false; @@ -1140,14 +1140,14 @@ uint8 * Network::save_for_network(size_t &out_size, const std::vector packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_CHAT; + *packet << (uint32_t)NETWORK_COMMAND_CHAT; packet->WriteString(text); server_connection->QueuePacket(std::move(packet)); } @@ -1180,23 +1180,23 @@ void Network::Client_Send_CHAT(const char* text) void Network::Server_Send_CHAT(const char* text) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_CHAT; + *packet << (uint32_t)NETWORK_COMMAND_CHAT; packet->WriteString(text); SendPacketToClients(*packet); } -void Network::Client_Send_GAMECMD(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 callback) +void Network::Client_Send_GAMECMD(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t callback) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GAMECMD << gCurrentTicks << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) + *packet << (uint32_t)NETWORK_COMMAND_GAMECMD << gCurrentTicks << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) << ecx << edx << esi << edi << ebp << callback; server_connection->QueuePacket(std::move(packet)); } -void Network::Server_Send_GAMECMD(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 playerid, uint8 callback) +void Network::Server_Send_GAMECMD(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t playerid, uint8_t callback) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GAMECMD << gCurrentTicks << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) + *packet << (uint32_t)NETWORK_COMMAND_GAMECMD << gCurrentTicks << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) << ecx << edx << esi << edi << ebp << playerid << callback; SendPacketToClients(*packet, false, true); } @@ -1218,7 +1218,7 @@ void Network::Client_Send_GAME_ACTION(const GameAction *action) DataSerialiser stream(true); action->Serialise(stream); - *packet << (uint32)NETWORK_COMMAND_GAME_ACTION << gCurrentTicks << action->GetType() << stream; + *packet << (uint32_t)NETWORK_COMMAND_GAME_ACTION << gCurrentTicks << action->GetType() << stream; server_connection->QueuePacket(std::move(packet)); } @@ -1230,14 +1230,14 @@ void Network::Server_Send_GAME_ACTION(const GameAction *action) DataSerialiser stream(true); action->Serialise(stream); - *packet << (uint32)NETWORK_COMMAND_GAME_ACTION << gCurrentTicks << action->GetType() << stream; + *packet << (uint32_t)NETWORK_COMMAND_GAME_ACTION << gCurrentTicks << action->GetType() << stream; SendPacketToClients(*packet); } void Network::Server_Send_TICK() { - uint32 ticks = platform_get_ticks(); + uint32_t ticks = platform_get_ticks(); if (ticks < last_tick_sent_time + 25) { return; @@ -1246,12 +1246,12 @@ void Network::Server_Send_TICK() last_tick_sent_time = ticks; std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_TICK << gCurrentTicks << gScenarioSrand0; - uint32 flags = 0; + *packet << (uint32_t)NETWORK_COMMAND_TICK << gCurrentTicks << gScenarioSrand0; + uint32_t flags = 0; // Simple counter which limits how often a sprite checksum gets sent. // This can get somewhat expensive, so we don't want to push it every tick in release, // but debug version can check more often. - static sint32 checksum_counter = 0; + static int32_t checksum_counter = 0; checksum_counter++; if (checksum_counter >= 100) { checksum_counter = 0; @@ -1269,7 +1269,7 @@ void Network::Server_Send_TICK() void Network::Server_Send_PLAYERLIST() { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_PLAYERLIST << (uint8)player_list.size(); + *packet << (uint32_t)NETWORK_COMMAND_PLAYERLIST << (uint8_t)player_list.size(); for (auto &player : player_list) { player->Write(*packet); } @@ -1279,7 +1279,7 @@ void Network::Server_Send_PLAYERLIST() void Network::Client_Send_PING() { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_PING; + *packet << (uint32_t)NETWORK_COMMAND_PING; server_connection->QueuePacket(std::move(packet)); } @@ -1287,7 +1287,7 @@ void Network::Server_Send_PING() { last_ping_sent_time = platform_get_ticks(); std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_PING; + *packet << (uint32_t)NETWORK_COMMAND_PING; for (auto &client_connection : client_connection_list) { client_connection->PingTime = platform_get_ticks(); } @@ -1297,7 +1297,7 @@ void Network::Server_Send_PING() void Network::Server_Send_PINGLIST() { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_PINGLIST << (uint8)player_list.size(); + *packet << (uint32_t)NETWORK_COMMAND_PINGLIST << (uint8_t)player_list.size(); for (auto &player : player_list) { *packet << player->Id << player->Ping; } @@ -1307,7 +1307,7 @@ void Network::Server_Send_PINGLIST() void Network::Server_Send_SETDISCONNECTMSG(NetworkConnection& connection, const char* msg) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_SETDISCONNECTMSG; + *packet << (uint32_t)NETWORK_COMMAND_SETDISCONNECTMSG; packet->WriteString(msg); connection.QueuePacket(std::move(packet)); connection.SendQueuedPackets(); @@ -1316,7 +1316,7 @@ void Network::Server_Send_SETDISCONNECTMSG(NetworkConnection& connection, const void Network::Server_Send_GAMEINFO(NetworkConnection& connection) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GAMEINFO; + *packet << (uint32_t)NETWORK_COMMAND_GAMEINFO; #ifndef DISABLE_HTTP json_t* obj = json_object(); json_object_set_new(obj, "name", json_string(gConfigNetwork.server_name)); @@ -1344,14 +1344,14 @@ void Network::Server_Send_GAMEINFO(NetworkConnection& connection) void Network::Server_Send_SHOWERROR(NetworkConnection& connection, rct_string_id title, rct_string_id message) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_SHOWERROR << title << message; + *packet << (uint32_t)NETWORK_COMMAND_SHOWERROR << title << message; connection.QueuePacket(std::move(packet)); } void Network::Server_Send_GROUPLIST(NetworkConnection& connection) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GROUPLIST << (uint8)group_list.size() << default_group; + *packet << (uint32_t)NETWORK_COMMAND_GROUPLIST << (uint8_t)group_list.size() << default_group; for (auto &group : group_list) { group->Write(*packet); } @@ -1361,8 +1361,8 @@ void Network::Server_Send_GROUPLIST(NetworkConnection& connection) void Network::Server_Send_EVENT_PLAYER_JOINED(const char *playerName) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_EVENT; - *packet << (uint16)SERVER_EVENT_PLAYER_JOINED; + *packet << (uint32_t)NETWORK_COMMAND_EVENT; + *packet << (uint16_t)SERVER_EVENT_PLAYER_JOINED; packet->WriteString(playerName); SendPacketToClients(*packet); } @@ -1370,8 +1370,8 @@ void Network::Server_Send_EVENT_PLAYER_JOINED(const char *playerName) void Network::Server_Send_EVENT_PLAYER_DISCONNECTED(const char *playerName, const char *reason) { std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_EVENT; - *packet << (uint16)SERVER_EVENT_PLAYER_DISCONNECTED; + *packet << (uint32_t)NETWORK_COMMAND_EVENT; + *packet << (uint16_t)SERVER_EVENT_PLAYER_DISCONNECTED; packet->WriteString(playerName); packet->WriteString(reason); SendPacketToClients(*packet); @@ -1379,7 +1379,7 @@ void Network::Server_Send_EVENT_PLAYER_DISCONNECTED(const char *playerName, cons bool Network::ProcessConnection(NetworkConnection& connection) { - sint32 packetStatus; + int32_t packetStatus; do { packetStatus = connection.ReadPacket(); switch(packetStatus) { @@ -1416,7 +1416,7 @@ bool Network::ProcessConnection(NetworkConnection& connection) void Network::ProcessPacket(NetworkConnection& connection, NetworkPacket& packet) { - uint32 command; + uint32_t command; packet >> command; if (command < NETWORK_COMMAND_MAX) { switch (gNetwork.GetMode()) { @@ -1486,8 +1486,8 @@ void Network::ProcessGameCommandQueue() game_command_playerid = gc.playerid; - sint32 command = gc.esi; - sint32 flags = gc.ebx; + int32_t command = gc.esi; + int32_t flags = gc.ebx; if (mode == NETWORK_MODE_SERVER) flags |= GAME_COMMAND_FLAG_NETWORKED; @@ -1591,10 +1591,10 @@ void Network::RemoveClient(std::unique_ptr& connection) NetworkPlayer* Network::AddPlayer(const utf8 *name, const std::string &keyhash) { NetworkPlayer* addedplayer = nullptr; - sint32 newid = -1; + int32_t newid = -1; if (GetMode() == NETWORK_MODE_SERVER) { // Find first unused player id - for (sint32 id = 0; id < 255; id++) { + for (int32_t id = 0; id < 255; id++) { if (std::find_if(player_list.begin(), player_list.end(), [&id](std::unique_ptr const& player) { return player->Id == id; }) == player_list.end()) { @@ -1645,7 +1645,7 @@ std::string Network::MakePlayerNameUnique(const std::string &name) // Note: Player names are case-insensitive std::string new_name = name.substr(0, 31); - sint32 counter = 1; + int32_t counter = 1; bool unique; do { unique = true; @@ -1699,7 +1699,7 @@ void Network::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& return; } - uint32 challenge_size; + uint32_t challenge_size; packet >> challenge_size; const char *challenge = (const char *)packet.Read(challenge_size); size_t sigsize; @@ -1728,8 +1728,8 @@ void Network::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& void Network::Client_Handle_AUTH(NetworkConnection& connection, NetworkPacket& packet) { - uint32 auth_status; - packet >> auth_status >> (uint8&)player_id; + uint32_t auth_status; + packet >> auth_status >> (uint8_t&)player_id; connection.AuthStatus = (NETWORK_AUTH)auth_status; switch(connection.AuthStatus) { case NETWORK_AUTH_OK: @@ -1794,10 +1794,10 @@ void Network::Server_Client_Joined(const char* name, const std::string &keyhash, void Network::Server_Handle_TOKEN(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) { - uint8 token_size = 10 + (rand() & 0x7f); + uint8_t token_size = 10 + (rand() & 0x7f); connection.Challenge.resize(token_size); - for (sint32 i = 0; i < token_size; i++) { - connection.Challenge[i] = (uint8)(rand() & 0xff); + for (int32_t i = 0; i < token_size; i++) { + connection.Challenge[i] = (uint8_t)(rand() & 0xff); } Server_Send_TOKEN(connection); } @@ -1805,7 +1805,7 @@ void Network::Server_Handle_TOKEN(NetworkConnection& connection, [[maybe_unused] void Network::Client_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket& packet) { auto repo = GetContext()->GetObjectRepository(); - uint32 size; + uint32_t size; packet >> size; log_verbose("client received object list, it has %u entries", size); if (size > OBJECT_ENTRY_COUNT) @@ -1816,12 +1816,12 @@ void Network::Client_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket return; } std::vector requested_objects; - for (uint32 i = 0; i < size; i++) + for (uint32_t i = 0; i < size; i++) { const char * name = (const char *)packet.Read(8); // Required, as packet has no null terminators. std::string s(name, name + 8); - uint32 checksum, flags; + uint32_t checksum, flags; packet >> checksum >> flags; const ObjectRepositoryItem * ori = repo->FindObject(s.c_str()); // This could potentially request the object if checksums don't match, but since client @@ -1840,7 +1840,7 @@ void Network::Client_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket void Network::Server_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket& packet) { - uint32 size; + uint32_t size; packet >> size; if (size > OBJECT_ENTRY_COUNT) { @@ -1858,7 +1858,7 @@ void Network::Server_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket } log_verbose("Client requested %u objects", size); auto repo = GetContext()->GetObjectRepository(); - for (uint32 i = 0; i < size; i++) + for (uint32_t i = 0; i < size; i++) { const char * name = (const char *)packet.Read(8); // This is required, as packet does not have null terminator @@ -1886,7 +1886,7 @@ void Network::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacket& p const char* name = packet.ReadString(); const char* password = packet.ReadString(); const char *pubkey = packet.ReadString(); - uint32 sigsize; + uint32_t sigsize; packet >> sigsize; if (pubkey == nullptr) { connection.AuthStatus = NETWORK_AUTH_VERIFICATIONFAILURE; @@ -1970,9 +1970,9 @@ void Network::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacket& p void Network::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { - uint32 size, offset; + uint32_t size, offset; packet >> size >> offset; - sint32 chunksize = (sint32)(packet.Size - packet.BytesRead); + int32_t chunksize = (int32_t)(packet.Size - packet.BytesRead); if (chunksize <= 0) { return; } @@ -1980,7 +1980,7 @@ void Network::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connection, chunk_buffer.resize(size); } char str_downloading_map[256]; - uint32 downloading_map_args[2] = {(offset + chunksize) / 1024, size / 1024}; + uint32_t downloading_map_args[2] = {(offset + chunksize) / 1024, size / 1024}; format_string(str_downloading_map, 256, STR_MULTIPLAYER_DOWNLOADING_MAP, downloading_map_args); auto intent = Intent(WC_NETWORK_STATUS); @@ -1994,7 +1994,7 @@ void Network::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connection, if (offset + chunksize == size) { context_force_close_window_by_class(WC_NETWORK_STATUS); bool has_to_free = false; - uint8 *data = &chunk_buffer[0]; + uint8_t *data = &chunk_buffer[0]; size_t data_size = size; // zlib-compressed if (strcmp("open2_sv6_zlib", (char *)&chunk_buffer[0]) == 0) @@ -2057,34 +2057,34 @@ bool Network::LoadMap(IStream * stream) sprite_position_tween_reset(); // Read checksum - [[maybe_unused]] uint32 checksum = stream->ReadValue(); + [[maybe_unused]] uint32_t checksum = stream->ReadValue(); // Read other data not in normal save files - stream->Read(gSpriteSpatialIndex, 0x10001 * sizeof(uint16)); - gGamePaused = stream->ReadValue(); - _guestGenerationProbability = stream->ReadValue(); - _suggestedGuestMaximum = stream->ReadValue(); - gCheatsSandboxMode = stream->ReadValue() != 0; - gCheatsDisableClearanceChecks = stream->ReadValue() != 0; - gCheatsDisableSupportLimits = stream->ReadValue() != 0; - gCheatsDisableTrainLengthLimit = stream->ReadValue() != 0; - gCheatsEnableChainLiftOnAllTrack = stream->ReadValue() != 0; - gCheatsShowAllOperatingModes = stream->ReadValue() != 0; - gCheatsShowVehiclesFromOtherTrackTypes = stream->ReadValue() != 0; - gCheatsFastLiftHill = stream->ReadValue() != 0; - gCheatsDisableBrakesFailure = stream->ReadValue() != 0; - gCheatsDisableAllBreakdowns = stream->ReadValue() != 0; - gCheatsBuildInPauseMode = stream->ReadValue() != 0; - gCheatsIgnoreRideIntensity = stream->ReadValue() != 0; - gCheatsDisableVandalism = stream->ReadValue() != 0; - gCheatsDisableLittering = stream->ReadValue() != 0; - gCheatsNeverendingMarketing = stream->ReadValue() != 0; - gCheatsFreezeClimate = stream->ReadValue() != 0; - gCheatsDisablePlantAging = stream->ReadValue() != 0; - gCheatsAllowArbitraryRideTypeChanges = stream->ReadValue() != 0; - gCheatsDisableRideValueAging = stream->ReadValue() != 0; - gConfigGeneral.show_real_names_of_guests = stream->ReadValue() != 0; - gCheatsIgnoreResearchStatus = stream->ReadValue() != 0; + stream->Read(gSpriteSpatialIndex, 0x10001 * sizeof(uint16_t)); + gGamePaused = stream->ReadValue(); + _guestGenerationProbability = stream->ReadValue(); + _suggestedGuestMaximum = stream->ReadValue(); + gCheatsSandboxMode = stream->ReadValue() != 0; + gCheatsDisableClearanceChecks = stream->ReadValue() != 0; + gCheatsDisableSupportLimits = stream->ReadValue() != 0; + gCheatsDisableTrainLengthLimit = stream->ReadValue() != 0; + gCheatsEnableChainLiftOnAllTrack = stream->ReadValue() != 0; + gCheatsShowAllOperatingModes = stream->ReadValue() != 0; + gCheatsShowVehiclesFromOtherTrackTypes = stream->ReadValue() != 0; + gCheatsFastLiftHill = stream->ReadValue() != 0; + gCheatsDisableBrakesFailure = stream->ReadValue() != 0; + gCheatsDisableAllBreakdowns = stream->ReadValue() != 0; + gCheatsBuildInPauseMode = stream->ReadValue() != 0; + gCheatsIgnoreRideIntensity = stream->ReadValue() != 0; + gCheatsDisableVandalism = stream->ReadValue() != 0; + gCheatsDisableLittering = stream->ReadValue() != 0; + gCheatsNeverendingMarketing = stream->ReadValue() != 0; + gCheatsFreezeClimate = stream->ReadValue() != 0; + gCheatsDisablePlantAging = stream->ReadValue() != 0; + gCheatsAllowArbitraryRideTypeChanges = stream->ReadValue() != 0; + gCheatsDisableRideValueAging = stream->ReadValue() != 0; + gConfigGeneral.show_real_names_of_guests = stream->ReadValue() != 0; + gCheatsIgnoreResearchStatus = stream->ReadValue() != 0; gLastAutoSaveUpdate = AUTOSAVE_PAUSE; result = true; @@ -2107,31 +2107,31 @@ bool Network::SaveMap(IStream * stream, const std::vectorSaveGame(stream); // Write other data not in normal save files - stream->Write(gSpriteSpatialIndex, 0x10001 * sizeof(uint16)); - stream->WriteValue(gGamePaused); - stream->WriteValue(_guestGenerationProbability); - stream->WriteValue(_suggestedGuestMaximum); - stream->WriteValue(gCheatsSandboxMode); - stream->WriteValue(gCheatsDisableClearanceChecks); - stream->WriteValue(gCheatsDisableSupportLimits); - stream->WriteValue(gCheatsDisableTrainLengthLimit); - stream->WriteValue(gCheatsEnableChainLiftOnAllTrack); - stream->WriteValue(gCheatsShowAllOperatingModes); - stream->WriteValue(gCheatsShowVehiclesFromOtherTrackTypes); - stream->WriteValue(gCheatsFastLiftHill); - stream->WriteValue(gCheatsDisableBrakesFailure); - stream->WriteValue(gCheatsDisableAllBreakdowns); - stream->WriteValue(gCheatsBuildInPauseMode); - stream->WriteValue(gCheatsIgnoreRideIntensity); - stream->WriteValue(gCheatsDisableVandalism); - stream->WriteValue(gCheatsDisableLittering); - stream->WriteValue(gCheatsNeverendingMarketing); - stream->WriteValue(gCheatsFreezeClimate); - stream->WriteValue(gCheatsDisablePlantAging); - stream->WriteValue(gCheatsAllowArbitraryRideTypeChanges); - stream->WriteValue(gCheatsDisableRideValueAging); - stream->WriteValue(gConfigGeneral.show_real_names_of_guests); - stream->WriteValue(gCheatsIgnoreResearchStatus); + stream->Write(gSpriteSpatialIndex, 0x10001 * sizeof(uint16_t)); + stream->WriteValue(gGamePaused); + stream->WriteValue(_guestGenerationProbability); + stream->WriteValue(_suggestedGuestMaximum); + stream->WriteValue(gCheatsSandboxMode); + stream->WriteValue(gCheatsDisableClearanceChecks); + stream->WriteValue(gCheatsDisableSupportLimits); + stream->WriteValue(gCheatsDisableTrainLengthLimit); + stream->WriteValue(gCheatsEnableChainLiftOnAllTrack); + stream->WriteValue(gCheatsShowAllOperatingModes); + stream->WriteValue(gCheatsShowVehiclesFromOtherTrackTypes); + stream->WriteValue(gCheatsFastLiftHill); + stream->WriteValue(gCheatsDisableBrakesFailure); + stream->WriteValue(gCheatsDisableAllBreakdowns); + stream->WriteValue(gCheatsBuildInPauseMode); + stream->WriteValue(gCheatsIgnoreRideIntensity); + stream->WriteValue(gCheatsDisableVandalism); + stream->WriteValue(gCheatsDisableLittering); + stream->WriteValue(gCheatsNeverendingMarketing); + stream->WriteValue(gCheatsFreezeClimate); + stream->WriteValue(gCheatsDisablePlantAging); + stream->WriteValue(gCheatsAllowArbitraryRideTypeChanges); + stream->WriteValue(gCheatsDisableRideValueAging); + stream->WriteValue(gConfigGeneral.show_real_names_of_guests); + stream->WriteValue(gCheatsIgnoreResearchStatus); result = true; } @@ -2167,10 +2167,10 @@ void Network::Server_Handle_CHAT(NetworkConnection& connection, NetworkPacket& p void Network::Client_Handle_GAMECMD([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { - uint32 tick; - uint32 args[7]; - uint8 playerid; - uint8 callback; + uint32_t tick; + uint32_t args[7]; + uint8_t playerid; + uint8_t callback; packet >> tick >> args[0] >> args[1] >> args[2] >> args[3] >> args[4] >> args[5] >> args[6] >> playerid >> callback; game_command_queue.emplace(tick, args, playerid, callback, _commandId++); @@ -2178,8 +2178,8 @@ void Network::Client_Handle_GAMECMD([[maybe_unused]] NetworkConnection& connecti void Network::Client_Handle_GAME_ACTION([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { - uint32 tick; - uint32 type; + uint32_t tick; + uint32_t type; packet >> tick >> type; MemoryStream stream; @@ -2214,8 +2214,8 @@ void Network::Client_Handle_GAME_ACTION([[maybe_unused]] NetworkConnection& conn void Network::Server_Handle_GAME_ACTION(NetworkConnection& connection, NetworkPacket& packet) { - uint32 tick; - uint32 type; + uint32_t tick; + uint32_t type; if (!connection.Player) { return; @@ -2225,7 +2225,7 @@ void Network::Server_Handle_GAME_ACTION(NetworkConnection& connection, NetworkPa //tick count is different by time last_action_time is set, keep same value // Check if player's group permission allows command to run - uint32 ticks = platform_get_ticks(); + uint32_t ticks = platform_get_ticks(); NetworkGroup* group = GetGroupByID(connection.Player->Group); if (!group || !group->CanPerformCommand(type)) { Server_Send_SHOWERROR(connection, STR_CANT_DO_THIS, STR_PERMISSION_DENIED); @@ -2287,10 +2287,10 @@ void Network::Server_Handle_GAME_ACTION(NetworkConnection& connection, NetworkPa void Network::Server_Handle_GAMECMD(NetworkConnection& connection, NetworkPacket& packet) { - uint32 tick; - uint32 args[7]; - uint8 playerid; - uint8 callback; + uint32_t tick; + uint32_t args[7]; + uint8_t playerid; + uint8_t callback; if (!connection.Player) { return; @@ -2300,9 +2300,9 @@ void Network::Server_Handle_GAMECMD(NetworkConnection& connection, NetworkPacket packet >> tick >> args[0] >> args[1] >> args[2] >> args[3] >> args[4] >> args[5] >> args[6] >> callback; - sint32 commandCommand = args[4]; + int32_t commandCommand = args[4]; - uint32 ticks = platform_get_ticks(); //tick count is different by time last_action_time is set, keep same value. + uint32_t ticks = platform_get_ticks(); //tick count is different by time last_action_time is set, keep same value. // Check if player's group permission allows command to run NetworkGroup* group = GetGroupByID(connection.Player->Group); @@ -2350,8 +2350,8 @@ void Network::Server_Handle_GAMECMD(NetworkConnection& connection, NetworkPacket void Network::Client_Handle_TICK([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { - uint32 srand0; - uint32 flags; + uint32_t srand0; + uint32_t flags; // Note: older server version may not advertise flags at all. // NetworkPacket will return 0, if trying to read past end of buffer, // so flags == 0 is expected in such cases. @@ -2376,10 +2376,10 @@ void Network::Client_Handle_TICK([[maybe_unused]] NetworkConnection& connection, void Network::Client_Handle_PLAYERLIST([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { - uint8 size; + uint8_t size; packet >> size; - std::vector ids; - for (uint32 i = 0; i < size; i++) { + std::vector ids; + for (uint32_t i = 0; i < size; i++) { NetworkPlayer tempplayer; tempplayer.Read(packet); ids.push_back(tempplayer.Id); @@ -2411,7 +2411,7 @@ void Network::Client_Handle_PING([[maybe_unused]] NetworkConnection& connection, void Network::Server_Handle_PING(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) { - sint32 ping = platform_get_ticks() - connection.PingTime; + int32_t ping = platform_get_ticks() - connection.PingTime; if (ping < 0) { ping = 0; } @@ -2423,11 +2423,11 @@ void Network::Server_Handle_PING(NetworkConnection& connection, [[maybe_unused]] void Network::Client_Handle_PINGLIST([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { - uint8 size; + uint8_t size; packet >> size; - for (uint32 i = 0; i < size; i++) { - uint8 id; - uint16 ping; + for (uint32_t i = 0; i < size; i++) { + uint8_t id; + uint16_t ping; packet >> id >> ping; NetworkPlayer* player = GetPlayerByID(id); if (player) { @@ -2462,9 +2462,9 @@ void Network::Client_Handle_SHOWERROR([[maybe_unused]] NetworkConnection& connec void Network::Client_Handle_GROUPLIST([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { group_list.clear(); - uint8 size; + uint8_t size; packet >> size >> default_group; - for (uint32 i = 0; i < size; i++) { + for (uint32_t i = 0; i < size; i++) { NetworkGroup group; group.Read(packet); auto newgroup = std::make_unique(group); @@ -2475,7 +2475,7 @@ void Network::Client_Handle_GROUPLIST([[maybe_unused]] NetworkConnection& connec void Network::Client_Handle_EVENT([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) { char text[256]; - uint16 eventType; + uint16_t eventType; packet >> eventType; switch (eventType) { case SERVER_EVENT_PLAYER_JOINED: @@ -2505,7 +2505,7 @@ void Network::Client_Send_GAMEINFO() { log_verbose("requesting gameinfo"); std::unique_ptr packet(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GAMEINFO; + *packet << (uint32_t)NETWORK_COMMAND_GAMEINFO; server_connection->QueuePacket(std::move(packet)); } @@ -2552,12 +2552,12 @@ void network_shutdown_client() gNetwork.ShutdownClient(); } -sint32 network_begin_client(const char *host, sint32 port) +int32_t network_begin_client(const char *host, int32_t port) { return gNetwork.BeginClient(host, port); } -sint32 network_begin_server(sint32 port, const char* address) +int32_t network_begin_server(int32_t port, const char* address) { return gNetwork.BeginServer(port, address); } @@ -2577,12 +2577,12 @@ void network_flush() gNetwork.Flush(); } -sint32 network_get_mode() +int32_t network_get_mode() { return gNetwork.GetMode(); } -sint32 network_get_status() +int32_t network_get_status() { return gNetwork.GetStatus(); } @@ -2597,57 +2597,57 @@ void network_send_tick() gNetwork.Server_Send_TICK(); } -sint32 network_get_authstatus() +int32_t network_get_authstatus() { return gNetwork.GetAuthStatus(); } -uint32 network_get_server_tick() +uint32_t network_get_server_tick() { return gNetwork.GetServerTick(); } -uint8 network_get_current_player_id() +uint8_t network_get_current_player_id() { return gNetwork.GetPlayerID(); } -sint32 network_get_num_players() +int32_t network_get_num_players() { - return (sint32)gNetwork.player_list.size(); + return (int32_t)gNetwork.player_list.size(); } -const char* network_get_player_name(uint32 index) +const char* network_get_player_name(uint32_t index) { return (const char*)gNetwork.player_list[index]->Name.c_str(); } -uint32 network_get_player_flags(uint32 index) +uint32_t network_get_player_flags(uint32_t index) { return gNetwork.player_list[index]->Flags; } -sint32 network_get_player_ping(uint32 index) +int32_t network_get_player_ping(uint32_t index) { return gNetwork.player_list[index]->Ping; } -sint32 network_get_player_id(uint32 index) +int32_t network_get_player_id(uint32_t index) { return gNetwork.player_list[index]->Id; } -money32 network_get_player_money_spent(uint32 index) +money32 network_get_player_money_spent(uint32_t index) { return gNetwork.player_list[index]->MoneySpent; } -void network_add_player_money_spent(uint32 index, money32 cost) +void network_add_player_money_spent(uint32_t index, money32 cost) { gNetwork.player_list[index]->AddMoneySpent(cost); } -sint32 network_get_player_last_action(uint32 index, sint32 time) +int32_t network_get_player_last_action(uint32_t index, int32_t time) { if (time && platform_get_ticks() > gNetwork.player_list[index]->LastActionTime + time) { return -999; @@ -2655,68 +2655,68 @@ sint32 network_get_player_last_action(uint32 index, sint32 time) return gNetwork.player_list[index]->LastAction; } -void network_set_player_last_action(uint32 index, sint32 command) +void network_set_player_last_action(uint32_t index, int32_t command) { gNetwork.player_list[index]->LastAction = NetworkActions::FindCommand(command); gNetwork.player_list[index]->LastActionTime = platform_get_ticks(); } -LocationXYZ16 network_get_player_last_action_coord(uint32 index) +LocationXYZ16 network_get_player_last_action_coord(uint32_t index) { return gNetwork.player_list[index]->LastActionCoord; } -void network_set_player_last_action_coord(uint32 index, LocationXYZ16 coord) +void network_set_player_last_action_coord(uint32_t index, LocationXYZ16 coord) { if (index < gNetwork.player_list.size()) { gNetwork.player_list[index]->LastActionCoord = coord; } } -uint32 network_get_player_commands_ran(uint32 index) +uint32_t network_get_player_commands_ran(uint32_t index) { return gNetwork.player_list[index]->CommandsRan; } -sint32 network_get_player_index(uint8 id) +int32_t network_get_player_index(uint8_t id) { auto it = gNetwork.GetPlayerIteratorByID(id); if(it == gNetwork.player_list.end()){ return -1; } - return (sint32)(gNetwork.GetPlayerIteratorByID(id) - gNetwork.player_list.begin()); + return (int32_t)(gNetwork.GetPlayerIteratorByID(id) - gNetwork.player_list.begin()); } -uint8 network_get_player_group(uint32 index) +uint8_t network_get_player_group(uint32_t index) { return gNetwork.player_list[index]->Group; } -void network_set_player_group(uint32 index, uint32 groupindex) +void network_set_player_group(uint32_t index, uint32_t groupindex) { gNetwork.player_list[index]->Group = gNetwork.group_list[groupindex]->Id; } -sint32 network_get_group_index(uint8 id) +int32_t network_get_group_index(uint8_t id) { auto it = gNetwork.GetGroupIteratorByID(id); if(it == gNetwork.group_list.end()){ return -1; } - return (sint32)(gNetwork.GetGroupIteratorByID(id) - gNetwork.group_list.begin()); + return (int32_t)(gNetwork.GetGroupIteratorByID(id) - gNetwork.group_list.begin()); } -uint8 network_get_group_id(uint32 index) +uint8_t network_get_group_id(uint32_t index) { return gNetwork.group_list[index]->Id; } -sint32 network_get_num_groups() +int32_t network_get_num_groups() { - return (sint32)gNetwork.group_list.size(); + return (int32_t)gNetwork.group_list.size(); } -const char* network_get_group_name(uint32 index) +const char* network_get_group_name(uint32_t index) { return gNetwork.group_list[index]->GetName().c_str(); } @@ -2754,16 +2754,16 @@ void network_chat_show_server_greeting() } void game_command_set_player_group( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - uint8 playerid = (uint8)*ecx; - uint8 groupid = (uint8)*edx; + uint8_t playerid = (uint8_t)*ecx; + uint8_t groupid = (uint8_t)*edx; NetworkPlayer* player = gNetwork.GetPlayerByID(playerid); NetworkGroup* fromgroup = gNetwork.GetGroupByID(game_command_playerid); if (!player) { @@ -2820,11 +2820,11 @@ void game_command_set_player_group( } void game_command_modify_groups( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { - uint8 action = (uint8)*eax; - uint8 groupid = (uint8)(*eax >> 8); - uint8 nameChunkIndex = (uint8)(*eax >> 16); + uint8_t action = (uint8_t)*eax; + uint8_t groupid = (uint8_t)(*eax >> 8); + uint8_t nameChunkIndex = (uint8_t)(*eax >> 16); switch (action) { @@ -2885,7 +2885,7 @@ void game_command_modify_groups( } }break; case 2:{ // set permissions - sint32 index = *ecx; + int32_t index = *ecx; bool all = *edx & 1; bool allvalue = (*edx >> 1) & 1; if (groupid == 0) { // cant change admin group permissions @@ -2941,9 +2941,9 @@ void game_command_modify_groups( nameChunkOffset = 2; nameChunkOffset *= 12; nameChunkOffset = (std::min)(nameChunkOffset, Util::CountOf(newName) - 12); - memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 0), edx, sizeof(uint32)); - memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 4), ebp, sizeof(uint32)); - memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 8), edi, sizeof(uint32)); + memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 0), edx, sizeof(uint32_t)); + memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 4), ebp, sizeof(uint32_t)); + memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 8), edi, sizeof(uint32_t)); if (nameChunkIndex != 0) { *ebx = 0; @@ -3009,15 +3009,15 @@ void game_command_modify_groups( } void game_command_kick_player( - sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - uint8 playerid = (uint8)*eax; + uint8_t playerid = (uint8_t)*eax; NetworkPlayer* player = gNetwork.GetPlayerByID(playerid); NetworkPlayer* kicker = gNetwork.GetPlayerByID(game_command_playerid); if (player == nullptr) { @@ -3056,17 +3056,17 @@ void game_command_kick_player( *ebx = 0; } -uint8 network_get_default_group() +uint8_t network_get_default_group() { return gNetwork.GetDefaultGroup(); } -sint32 network_get_num_actions() +int32_t network_get_num_actions() { - return (sint32)NetworkActions::Actions.size(); + return (int32_t)NetworkActions::Actions.size(); } -rct_string_id network_get_action_name_string_id(uint32 index) +rct_string_id network_get_action_name_string_id(uint32_t index) { if (index < NetworkActions::Actions.size()) { @@ -3076,17 +3076,17 @@ rct_string_id network_get_action_name_string_id(uint32 index) } } -sint32 network_can_perform_action(uint32 groupindex, uint32 index) +int32_t network_can_perform_action(uint32_t groupindex, uint32_t index) { return gNetwork.group_list[groupindex]->CanPerformAction(index); } -sint32 network_can_perform_command(uint32 groupindex, sint32 index) +int32_t network_can_perform_command(uint32_t groupindex, int32_t index) { return gNetwork.group_list[groupindex]->CanPerformCommand(index); } -void network_set_pickup_peep(uint8 playerid, rct_peep* peep) +void network_set_pickup_peep(uint8_t playerid, rct_peep* peep) { if (gNetwork.GetMode() == NETWORK_MODE_NONE) { _pickup_peep = peep; @@ -3098,7 +3098,7 @@ void network_set_pickup_peep(uint8 playerid, rct_peep* peep) } } -rct_peep* network_get_pickup_peep(uint8 playerid) +rct_peep* network_get_pickup_peep(uint8_t playerid) { if (gNetwork.GetMode() == NETWORK_MODE_NONE) { return _pickup_peep; @@ -3111,7 +3111,7 @@ rct_peep* network_get_pickup_peep(uint8 playerid) } } -void network_set_pickup_peep_old_x(uint8 playerid, sint32 x) +void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x) { if (gNetwork.GetMode() == NETWORK_MODE_NONE) { _pickup_peep_old_x = x; @@ -3123,7 +3123,7 @@ void network_set_pickup_peep_old_x(uint8 playerid, sint32 x) } } -sint32 network_get_pickup_peep_old_x(uint8 playerid) +int32_t network_get_pickup_peep_old_x(uint8_t playerid) { if (gNetwork.GetMode() == NETWORK_MODE_NONE) { return _pickup_peep_old_x; @@ -3136,7 +3136,7 @@ sint32 network_get_pickup_peep_old_x(uint8 playerid) } } -sint32 network_get_current_player_group_index() +int32_t network_get_current_player_group_index() { NetworkPlayer* player = gNetwork.GetPlayerByID(gNetwork.GetPlayerID()); if (player) { @@ -3180,7 +3180,7 @@ void network_enqueue_game_action(const GameAction *action) gNetwork.EnqueueGameAction(action); } -void network_send_gamecmd(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 callback) +void network_send_gamecmd(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t callback) { switch (gNetwork.GetMode()) { case NETWORK_MODE_SERVER: @@ -3270,60 +3270,60 @@ std::string network_get_version() } #else -sint32 network_get_mode() { return NETWORK_MODE_NONE; } -sint32 network_get_status() { return NETWORK_STATUS_NONE; } -sint32 network_get_authstatus() { return NETWORK_AUTH_NONE; } -uint32 network_get_server_tick() { return gCurrentTicks; } +int32_t network_get_mode() { return NETWORK_MODE_NONE; } +int32_t network_get_status() { return NETWORK_STATUS_NONE; } +int32_t network_get_authstatus() { return NETWORK_AUTH_NONE; } +uint32_t network_get_server_tick() { return gCurrentTicks; } void network_flush() {} void network_send_tick() {} void network_check_desynchronization() {} void network_enqueue_game_action(const GameAction *action) {} -void network_send_gamecmd(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 callback) {} +void network_send_gamecmd(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t callback) {} void network_send_game_action(const GameAction *action) {} void network_send_map() {} void network_update() {} void network_process_game_commands() {} -sint32 network_begin_client(const char *host, sint32 port) { return 1; } -sint32 network_begin_server(sint32 port, const char * address) { return 1; } -sint32 network_get_num_players() { return 1; } -const char* network_get_player_name(uint32 index) { return "local (OpenRCT2 compiled without MP)"; } -uint32 network_get_player_flags(uint32 index) { return 0; } -sint32 network_get_player_ping(uint32 index) { return 0; } -sint32 network_get_player_id(uint32 index) { return 0; } -money32 network_get_player_money_spent(uint32 index) { return MONEY(0, 0); } -void network_add_player_money_spent(uint32 index, money32 cost) { } -sint32 network_get_player_last_action(uint32 index, sint32 time) { return -999; } -void network_set_player_last_action(uint32 index, sint32 command) { } -LocationXYZ16 network_get_player_last_action_coord(uint32 index) { return {0, 0, 0}; } -void network_set_player_last_action_coord(uint32 index, LocationXYZ16 coord) { } -uint32 network_get_player_commands_ran(uint32 index) { return 0; } -sint32 network_get_player_index(uint8 id) { return -1; } -uint8 network_get_player_group(uint32 index) { return 0; } -void network_set_player_group(uint32 index, uint32 groupindex) { } -sint32 network_get_group_index(uint8 id) { return -1; } -uint8 network_get_group_id(uint32 index) { return 0; } -sint32 network_get_num_groups() { return 0; } -const char* network_get_group_name(uint32 index) { return ""; }; -void game_command_set_player_group(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp) { } -void game_command_modify_groups(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp) { } -void game_command_kick_player(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp) { } -uint8 network_get_default_group() { return 0; } -sint32 network_get_num_actions() { return 0; } -rct_string_id network_get_action_name_string_id(uint32 index) { return -1; } -sint32 network_can_perform_action(uint32 groupindex, uint32 index) { return 0; } -sint32 network_can_perform_command(uint32 groupindex, sint32 index) { return 0; } -void network_set_pickup_peep(uint8 playerid, rct_peep* peep) { _pickup_peep = peep; } -rct_peep* network_get_pickup_peep(uint8 playerid) { return _pickup_peep; } -void network_set_pickup_peep_old_x(uint8 playerid, sint32 x) { _pickup_peep_old_x = x; } -sint32 network_get_pickup_peep_old_x(uint8 playerid) { return _pickup_peep_old_x; } +int32_t network_begin_client(const char *host, int32_t port) { return 1; } +int32_t network_begin_server(int32_t port, const char * address) { return 1; } +int32_t network_get_num_players() { return 1; } +const char* network_get_player_name(uint32_t index) { return "local (OpenRCT2 compiled without MP)"; } +uint32_t network_get_player_flags(uint32_t index) { return 0; } +int32_t network_get_player_ping(uint32_t index) { return 0; } +int32_t network_get_player_id(uint32_t index) { return 0; } +money32 network_get_player_money_spent(uint32_t index) { return MONEY(0, 0); } +void network_add_player_money_spent(uint32_t index, money32 cost) { } +int32_t network_get_player_last_action(uint32_t index, int32_t time) { return -999; } +void network_set_player_last_action(uint32_t index, int32_t command) { } +LocationXYZ16 network_get_player_last_action_coord(uint32_t index) { return {0, 0, 0}; } +void network_set_player_last_action_coord(uint32_t index, LocationXYZ16 coord) { } +uint32_t network_get_player_commands_ran(uint32_t index) { return 0; } +int32_t network_get_player_index(uint8_t id) { return -1; } +uint8_t network_get_player_group(uint32_t index) { return 0; } +void network_set_player_group(uint32_t index, uint32_t groupindex) { } +int32_t network_get_group_index(uint8_t id) { return -1; } +uint8_t network_get_group_id(uint32_t index) { return 0; } +int32_t network_get_num_groups() { return 0; } +const char* network_get_group_name(uint32_t index) { return ""; }; +void game_command_set_player_group(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp) { } +void game_command_modify_groups(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp) { } +void game_command_kick_player(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp) { } +uint8_t network_get_default_group() { return 0; } +int32_t network_get_num_actions() { return 0; } +rct_string_id network_get_action_name_string_id(uint32_t index) { return -1; } +int32_t network_can_perform_action(uint32_t groupindex, uint32_t index) { return 0; } +int32_t network_can_perform_command(uint32_t groupindex, int32_t index) { return 0; } +void network_set_pickup_peep(uint8_t playerid, rct_peep* peep) { _pickup_peep = peep; } +rct_peep* network_get_pickup_peep(uint8_t playerid) { return _pickup_peep; } +void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x) { _pickup_peep_old_x = x; } +int32_t network_get_pickup_peep_old_x(uint8_t playerid) { return _pickup_peep_old_x; } void network_send_chat(const char* text) {} void network_send_password(const char* password) {} void network_close() {} void network_set_env(const std::shared_ptr&) {} void network_shutdown_client() {} void network_set_password(const char* password) {} -uint8 network_get_current_player_id() { return 0; } -sint32 network_get_current_player_group_index() { return 0; } +uint8_t network_get_current_player_id() { return 0; } +int32_t network_get_current_player_group_index() { return 0; } void network_append_chat_log(const utf8 *text) { } void network_append_server_log(const utf8 *text) { } const utf8 * network_get_server_name() { return nullptr; } diff --git a/src/openrct2/network/NetworkAction.cpp b/src/openrct2/network/NetworkAction.cpp index 8010fd0cbf..d8eb1a437e 100644 --- a/src/openrct2/network/NetworkAction.cpp +++ b/src/openrct2/network/NetworkAction.cpp @@ -15,7 +15,7 @@ #include "../Game.h" #include "../localisation/StringIds.h" -sint32 NetworkActions::FindCommand(sint32 command) +int32_t NetworkActions::FindCommand(int32_t command) { auto it = std::find_if(Actions.begin(), Actions.end(), [&command](NetworkAction const &action) { @@ -30,12 +30,12 @@ sint32 NetworkActions::FindCommand(sint32 command) }); if (it != Actions.end()) { - return (sint32)(it - Actions.begin()); + return (int32_t)(it - Actions.begin()); } return -1; } -sint32 NetworkActions::FindCommandByPermissionName(const std::string &permission_name) +int32_t NetworkActions::FindCommandByPermissionName(const std::string &permission_name) { auto it = std::find_if(Actions.begin(), Actions.end(), [&permission_name](NetworkAction const &action) { @@ -43,7 +43,7 @@ sint32 NetworkActions::FindCommandByPermissionName(const std::string &permission }); if (it != Actions.end()) { - return (sint32)(it - Actions.begin()); + return (int32_t)(it - Actions.begin()); } return -1; } diff --git a/src/openrct2/network/NetworkAction.h b/src/openrct2/network/NetworkAction.h index 402a51f453..4a27bbbbc1 100644 --- a/src/openrct2/network/NetworkAction.h +++ b/src/openrct2/network/NetworkAction.h @@ -25,7 +25,7 @@ class NetworkAction final public: rct_string_id Name; std::string PermissionName; - std::vector Commands; + std::vector Commands; }; class NetworkActions final @@ -33,6 +33,6 @@ class NetworkActions final public: static const std::vector Actions; - static sint32 FindCommand(sint32 command); - static sint32 FindCommandByPermissionName(const std::string &permission_name); + static int32_t FindCommand(int32_t command); + static int32_t FindCommandByPermissionName(const std::string &permission_name); }; diff --git a/src/openrct2/network/NetworkConnection.cpp b/src/openrct2/network/NetworkConnection.cpp index b79f752d34..91efb2b98e 100644 --- a/src/openrct2/network/NetworkConnection.cpp +++ b/src/openrct2/network/NetworkConnection.cpp @@ -29,7 +29,7 @@ NetworkConnection::~NetworkConnection() delete[] _lastDisconnectReason; } -sint32 NetworkConnection::ReadPacket() +int32_t NetworkConnection::ReadPacket() { if (InboundPacket.BytesTransferred < sizeof(InboundPacket.Size)) { @@ -81,10 +81,10 @@ sint32 NetworkConnection::ReadPacket() bool NetworkConnection::SendPacket(NetworkPacket& packet) { - uint16 sizen = Convert::HostToNetwork(packet.Size); - std::vector tosend; + uint16_t sizen = Convert::HostToNetwork(packet.Size); + std::vector tosend; tosend.reserve(sizeof(sizen) + packet.Size); - tosend.insert(tosend.end(), (uint8*)&sizen, (uint8*)&sizen + sizeof(sizen)); + tosend.insert(tosend.end(), (uint8_t*)&sizen, (uint8_t*)&sizen + sizeof(sizen)); tosend.insert(tosend.end(), packet.Data->begin(), packet.Data->end()); const void * buffer = &tosend[packet.BytesTransferred]; @@ -101,7 +101,7 @@ void NetworkConnection::QueuePacket(std::unique_ptr packet, bool { if (AuthStatus == NETWORK_AUTH_OK || !packet->CommandRequiresAuth()) { - packet->Size = (uint16)packet->Data->size(); + packet->Size = (uint16_t)packet->Data->size(); if (front) { // If the first packet was already partially sent add new packet to second position diff --git a/src/openrct2/network/NetworkConnection.h b/src/openrct2/network/NetworkConnection.h index fdf35f45ee..60e8b44dfa 100644 --- a/src/openrct2/network/NetworkConnection.h +++ b/src/openrct2/network/NetworkConnection.h @@ -31,15 +31,15 @@ public: NetworkPacket InboundPacket; NETWORK_AUTH AuthStatus = NETWORK_AUTH_NONE; NetworkPlayer * Player = nullptr; - uint32 PingTime = 0; + uint32_t PingTime = 0; NetworkKey Key; - std::vector Challenge; + std::vector Challenge; std::vector RequestedObjects; NetworkConnection(); ~NetworkConnection(); - sint32 ReadPacket(); + int32_t ReadPacket(); void QueuePacket(std::unique_ptr packet, bool front = false); void SendQueuedPackets(); void ResetLastPacketTime(); @@ -51,7 +51,7 @@ public: private: std::list> _outboundPackets; - uint32 _lastPacketTime = 0; + uint32_t _lastPacketTime = 0; utf8 * _lastDisconnectReason = nullptr; bool SendPacket(NetworkPacket &packet); diff --git a/src/openrct2/network/NetworkGroup.cpp b/src/openrct2/network/NetworkGroup.cpp index e1a7a03798..2213f9979d 100644 --- a/src/openrct2/network/NetworkGroup.cpp +++ b/src/openrct2/network/NetworkGroup.cpp @@ -25,7 +25,7 @@ NetworkGroup NetworkGroup::FromJson(const json_t * json) throw std::runtime_error("Missing group data"); } - group.Id = (uint8)json_integer_value(jsonId); + group.Id = (uint8_t)json_integer_value(jsonId); group._name = std::string(json_string_value(jsonName)); std::fill(group.ActionsAllowed.begin(), group.ActionsAllowed.end(), 0); @@ -36,7 +36,7 @@ NetworkGroup NetworkGroup::FromJson(const json_t * json) if (perm_name == nullptr) { continue; } - sint32 action_id = NetworkActions::FindCommandByPermissionName(perm_name); + int32_t action_id = NetworkActions::FindCommandByPermissionName(perm_name); if (action_id != -1) { group.ToggleActionPermission(action_id); } @@ -114,9 +114,9 @@ bool NetworkGroup::CanPerformAction(size_t index) const return (ActionsAllowed[byte] & (1 << bit)) != 0; } -bool NetworkGroup::CanPerformCommand(sint32 command) const +bool NetworkGroup::CanPerformCommand(int32_t command) const { - sint32 action = NetworkActions::FindCommand(command); + int32_t action = NetworkActions::FindCommand(command); if (action != -1) { return CanPerformAction(action); diff --git a/src/openrct2/network/NetworkGroup.h b/src/openrct2/network/NetworkGroup.h index 70c54a6f02..c98a1894d7 100644 --- a/src/openrct2/network/NetworkGroup.h +++ b/src/openrct2/network/NetworkGroup.h @@ -18,8 +18,8 @@ class NetworkGroup final { public: - std::array ActionsAllowed{}; - uint8 Id = 0; + std::array ActionsAllowed{}; + uint8_t Id = 0; static NetworkGroup FromJson(const json_t * json); @@ -30,7 +30,7 @@ public: void Write(NetworkPacket &packet); void ToggleActionPermission(size_t index); bool CanPerformAction(size_t index) const; - bool CanPerformCommand(sint32 command) const; + bool CanPerformCommand(int32_t command) const; json_t * ToJson() const; diff --git a/src/openrct2/network/NetworkKey.cpp b/src/openrct2/network/NetworkKey.cpp index 851f14d52b..b8c3dbf675 100644 --- a/src/openrct2/network/NetworkKey.cpp +++ b/src/openrct2/network/NetworkKey.cpp @@ -188,7 +188,7 @@ std::string NetworkKey::PublicKeyHash() return nullptr; } -bool NetworkKey::Sign(const uint8 * md, const size_t len, char ** signature, size_t * out_size) +bool NetworkKey::Sign(const uint8_t * md, const size_t len, char ** signature, size_t * out_size) { try { @@ -208,7 +208,7 @@ bool NetworkKey::Sign(const uint8 * md, const size_t len, char ** signature, siz } } -bool NetworkKey::Verify(const uint8 * md, const size_t len, const char * sig, const size_t siglen) +bool NetworkKey::Verify(const uint8_t * md, const size_t len, const char * sig, const size_t siglen) { try { diff --git a/src/openrct2/network/NetworkKey.h b/src/openrct2/network/NetworkKey.h index 1023759544..56d7b77a6c 100644 --- a/src/openrct2/network/NetworkKey.h +++ b/src/openrct2/network/NetworkKey.h @@ -36,8 +36,8 @@ public: std::string PublicKeyString(); std::string PublicKeyHash(); void Unload(); - bool Sign(const uint8 * md, const size_t len, char ** signature, size_t * out_size); - bool Verify(const uint8 * md, const size_t len, const char * sig, const size_t siglen); + bool Sign(const uint8_t * md, const size_t len, char ** signature, size_t * out_size); + bool Verify(const uint8_t * md, const size_t len, const char * sig, const size_t siglen); private: NetworkKey (const NetworkKey &) = delete; std::unique_ptr _key; diff --git a/src/openrct2/network/NetworkPacket.cpp b/src/openrct2/network/NetworkPacket.cpp index c77b71efdf..7fd8e54be4 100644 --- a/src/openrct2/network/NetworkPacket.cpp +++ b/src/openrct2/network/NetworkPacket.cpp @@ -24,16 +24,16 @@ std::unique_ptr NetworkPacket::Duplicate(NetworkPacket &packet) return std::make_unique(packet); } -uint8 * NetworkPacket::GetData() +uint8_t * NetworkPacket::GetData() { return &(*Data)[0]; } -sint32 NetworkPacket::GetCommand() +int32_t NetworkPacket::GetCommand() { - if (Data->size() >= sizeof(uint32)) + if (Data->size() >= sizeof(uint32_t)) { - return ByteSwapBE(*(uint32 *)(&(*Data)[0])); + return ByteSwapBE(*(uint32_t *)(&(*Data)[0])); } else { @@ -62,17 +62,17 @@ bool NetworkPacket::CommandRequiresAuth() } } -void NetworkPacket::Write(const uint8 * bytes, size_t size) +void NetworkPacket::Write(const uint8_t * bytes, size_t size) { Data->insert(Data->end(), bytes, bytes + size); } void NetworkPacket::WriteString(const utf8 * string) { - Write((uint8 *)string, strlen(string) + 1); + Write((uint8_t *)string, strlen(string) + 1); } -const uint8 * NetworkPacket::Read(size_t size) +const uint8_t * NetworkPacket::Read(size_t size) { if (BytesRead + size > NetworkPacket::Size) { @@ -80,7 +80,7 @@ const uint8 * NetworkPacket::Read(size_t size) } else { - uint8 * data = &GetData()[BytesRead]; + uint8_t * data = &GetData()[BytesRead]; BytesRead += size; return data; } diff --git a/src/openrct2/network/NetworkPacket.h b/src/openrct2/network/NetworkPacket.h index 2f0ef24e99..b191784f11 100644 --- a/src/openrct2/network/NetworkPacket.h +++ b/src/openrct2/network/NetworkPacket.h @@ -18,24 +18,24 @@ class NetworkPacket final { public: - uint16 Size = 0; - std::shared_ptr> Data = std::make_shared>(); + uint16_t Size = 0; + std::shared_ptr> Data = std::make_shared>(); size_t BytesTransferred = 0; size_t BytesRead = 0; static std::unique_ptr Allocate(); static std::unique_ptr Duplicate(NetworkPacket& packet); - uint8 * GetData(); - sint32 GetCommand(); + uint8_t * GetData(); + int32_t GetCommand(); void Clear(); bool CommandRequiresAuth(); - const uint8 * Read(size_t size); + const uint8_t * Read(size_t size); const utf8 * ReadString(); - void Write(const uint8 * bytes, size_t size); + void Write(const uint8_t * bytes, size_t size); void WriteString(const utf8 * string); template @@ -56,7 +56,7 @@ public: template NetworkPacket & operator <<(T value) { T swapped = ByteSwapBE(value); - uint8 * bytes = (uint8 *)&swapped; + uint8_t * bytes = (uint8_t *)&swapped; Data->insert(Data->end(), bytes, bytes + sizeof(value)); return *this; } diff --git a/src/openrct2/network/NetworkPlayer.h b/src/openrct2/network/NetworkPlayer.h index 413b97577b..ef8a98fdba 100644 --- a/src/openrct2/network/NetworkPlayer.h +++ b/src/openrct2/network/NetworkPlayer.h @@ -21,21 +21,21 @@ class NetworkPacket; class NetworkPlayer final { public: - uint8 Id = 0; + uint8_t Id = 0; std::string Name; - uint16 Ping = 0; - uint8 Flags = 0; - uint8 Group = 0; + uint16_t Ping = 0; + uint8_t Flags = 0; + uint8_t Group = 0; money32 MoneySpent = MONEY(0, 0); - uint32 CommandsRan = 0; - sint32 LastAction = -999; - uint32 LastActionTime = 0; + uint32_t CommandsRan = 0; + int32_t LastAction = -999; + uint32_t LastActionTime = 0; LocationXYZ16 LastActionCoord = {}; rct_peep* PickupPeep = nullptr; - sint32 PickupPeepOldX = LOCATION_NULL; + int32_t PickupPeepOldX = LOCATION_NULL; std::string KeyHash; - uint32 LastDemolishRideTime = 0; - uint32 LastPlaceSceneryTime = 0; + uint32_t LastDemolishRideTime = 0; + uint32_t LastPlaceSceneryTime = 0; NetworkPlayer() = default; diff --git a/src/openrct2/network/NetworkServerAdvertiser.cpp b/src/openrct2/network/NetworkServerAdvertiser.cpp index b09c4c17ae..410c386e9e 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.cpp +++ b/src/openrct2/network/NetworkServerAdvertiser.cpp @@ -38,17 +38,17 @@ enum MASTER_SERVER_STATUS MASTER_SERVER_STATUS_INTERNAL_ERROR = 500 }; -constexpr sint32 MASTER_SERVER_REGISTER_TIME = 120 * 1000; // 2 minutes -constexpr sint32 MASTER_SERVER_HEARTBEAT_TIME = 60 * 1000; // 1 minute +constexpr int32_t MASTER_SERVER_REGISTER_TIME = 120 * 1000; // 2 minutes +constexpr int32_t MASTER_SERVER_HEARTBEAT_TIME = 60 * 1000; // 1 minute class NetworkServerAdvertiser final : public INetworkServerAdvertiser { private: - uint16 _port; + uint16_t _port; ADVERTISE_STATUS _status = ADVERTISE_STATUS::UNREGISTERED; - uint32 _lastAdvertiseTime = 0; - uint32 _lastHeartbeatTime = 0; + uint32_t _lastAdvertiseTime = 0; + uint32_t _lastHeartbeatTime = 0; // Our unique token for this server std::string _token; @@ -60,7 +60,7 @@ private: bool _forceIPv4 = false; public: - explicit NetworkServerAdvertiser(uint16 port) + explicit NetworkServerAdvertiser(uint16_t port) { _port = port; _key = GenerateAdvertiseKey(); @@ -153,7 +153,7 @@ private: json_t *jsonStatus = json_object_get(jsonRoot, "status"); if (json_is_integer(jsonStatus)) { - sint32 status = (sint32)json_integer_value(jsonStatus); + int32_t status = (int32_t)json_integer_value(jsonStatus); if (status == MASTER_SERVER_STATUS_OK) { json_t * jsonToken = json_object_get(jsonRoot, "token"); @@ -190,7 +190,7 @@ private: json_t *jsonStatus = json_object_get(jsonRoot, "status"); if (json_is_integer(jsonStatus)) { - sint32 status = (sint32)json_integer_value(jsonStatus); + int32_t status = (int32_t)json_integer_value(jsonStatus); if (status == MASTER_SERVER_STATUS_OK) { // Master server has successfully updated our server status @@ -205,7 +205,7 @@ private: json_t * GetHeartbeatJson() { - uint32 numPlayers = network_get_num_players(); + uint32_t numPlayers = network_get_num_players(); json_t * root = json_object(); json_object_set_new(root, "token", json_string(_token.c_str())); @@ -231,9 +231,9 @@ private: // Generate a string of 16 random hex characters (64-integer key as a hex formatted string) static constexpr const char hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; char key[17]; - for (sint32 i = 0; i < 16; i++) + for (int32_t i = 0; i < 16; i++) { - sint32 hexCharIndex = util_rand() % Util::CountOf(hexChars); + int32_t hexCharIndex = util_rand() % Util::CountOf(hexChars); key[i] = hexChars[hexCharIndex]; } key[Util::CountOf(key) - 1] = 0; @@ -251,7 +251,7 @@ private: } }; -INetworkServerAdvertiser * CreateServerAdvertiser(uint16 port) +INetworkServerAdvertiser * CreateServerAdvertiser(uint16_t port) { return new NetworkServerAdvertiser(port); } @@ -265,7 +265,7 @@ public: virtual void Update() override {}; }; -INetworkServerAdvertiser * CreateServerAdvertiser(uint16 port) +INetworkServerAdvertiser * CreateServerAdvertiser(uint16_t port) { return new DummyNetworkServerAdvertiser(); } diff --git a/src/openrct2/network/NetworkServerAdvertiser.h b/src/openrct2/network/NetworkServerAdvertiser.h index 92cce5d754..2bf82916f9 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.h +++ b/src/openrct2/network/NetworkServerAdvertiser.h @@ -26,4 +26,4 @@ interface INetworkServerAdvertiser virtual void Update() abstract; }; -INetworkServerAdvertiser * CreateServerAdvertiser(uint16 port); +INetworkServerAdvertiser * CreateServerAdvertiser(uint16_t port); diff --git a/src/openrct2/network/NetworkUser.cpp b/src/openrct2/network/NetworkUser.cpp index bb9aabcc30..3fb9e0e6fd 100644 --- a/src/openrct2/network/NetworkUser.cpp +++ b/src/openrct2/network/NetworkUser.cpp @@ -33,7 +33,7 @@ NetworkUser * NetworkUser::FromJson(json_t * json) user->Hash = std::string(hash); user->Name = std::string(name); if (!json_is_null(jsonGroupId)) { - user->GroupId = (uint8)json_integer_value(jsonGroupId); + user->GroupId = (uint8_t)json_integer_value(jsonGroupId); } user->Remove = false; return user; @@ -171,7 +171,7 @@ void NetworkUserManager::Save() json_decref(jsonUsers); } -void NetworkUserManager::UnsetUsersOfGroup(uint8 groupId) +void NetworkUserManager::UnsetUsersOfGroup(uint8_t groupId) { for (const auto &kvp : _usersByHash) { diff --git a/src/openrct2/network/NetworkUser.h b/src/openrct2/network/NetworkUser.h index fd132d2ab0..541ac47292 100644 --- a/src/openrct2/network/NetworkUser.h +++ b/src/openrct2/network/NetworkUser.h @@ -21,7 +21,7 @@ class NetworkUser final public: std::string Hash; std::string Name; - Nullable GroupId; + Nullable GroupId; bool Remove; static NetworkUser * FromJson(json_t * json); @@ -45,7 +45,7 @@ public: */ void Save(); - void UnsetUsersOfGroup(uint8 groupId); + void UnsetUsersOfGroup(uint8_t groupId); void RemoveUser(const std::string &hash); NetworkUser * GetUserByHash(const std::string &hash); diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index 6a7deba4db..1f5cdbe1a1 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -27,7 +27,7 @@ std::vector server_list_read() auto env = GetContext()->GetPlatformEnvironment(); auto path = env->GetFilePath(PATHID::NETWORK_SERVERS); auto fs = FileStream(path, FILE_MODE_OPEN); - auto numEntries = fs.ReadValue(); + auto numEntries = fs.ReadValue(); for (size_t i = 0; i < numEntries; i++) { server_entry serverInfo; @@ -61,7 +61,7 @@ bool server_list_write(const std::vector &entries) try { auto fs = FileStream(path, FILE_MODE_WRITE); - fs.WriteValue((uint32)entries.size()); + fs.WriteValue((uint32_t)entries.size()); for (const auto &entry : entries) { fs.WriteString(entry.address); diff --git a/src/openrct2/network/ServerList.h b/src/openrct2/network/ServerList.h index dac4fa1fa8..c68c6b7266 100644 --- a/src/openrct2/network/ServerList.h +++ b/src/openrct2/network/ServerList.h @@ -21,8 +21,8 @@ struct server_entry std::string version; bool requiresPassword = false; bool favourite = false; - uint8 players = 0; - uint8 maxplayers = 0; + uint8_t players = 0; + uint8_t maxplayers = 0; }; std::vector server_list_read(); diff --git a/src/openrct2/network/TcpSocket.cpp b/src/openrct2/network/TcpSocket.cpp index 74e4146e79..c5f3496f19 100644 --- a/src/openrct2/network/TcpSocket.cpp +++ b/src/openrct2/network/TcpSocket.cpp @@ -44,7 +44,7 @@ #include #include #include "../common.h" - using SOCKET = sint32; + using SOCKET = int32_t; #define SOCKET_ERROR -1 #define INVALID_SOCKET -1 #define LAST_SOCKET_ERROR() errno @@ -78,7 +78,7 @@ class TcpSocket final : public ITcpSocket { private: SOCKET_STATUS _status = SOCKET_STATUS_CLOSED; - uint16 _listeningPort = 0; + uint16_t _listeningPort = 0; SOCKET _socket = INVALID_SOCKET; std::string _hostName; @@ -107,12 +107,12 @@ public: return _error.empty() ? nullptr : _error.c_str(); } - void Listen(uint16 port) override + void Listen(uint16_t port) override { Listen(nullptr, port); } - void Listen(const char * address, uint16 port) override + void Listen(const char * address, uint16_t port) override { if (_status != SOCKET_STATUS_CLOSED) { @@ -120,7 +120,7 @@ public: } sockaddr_storage ss { }; - sint32 ss_len; + int32_t ss_len; if (!ResolveAddress(address, port, &ss, &ss_len)) { throw SocketException("Unable to resolve address."); @@ -134,7 +134,7 @@ public: } // Turn off IPV6_V6ONLY so we can accept both v4 and v6 connections - sint32 value = 0; + int32_t value = 0; if (setsockopt(_socket, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&value, sizeof(value)) != 0) { log_error("IPV6_V6ONLY failed. %d", LAST_SOCKET_ERROR()); @@ -201,7 +201,7 @@ public: else { char hostName[NI_MAXHOST]; - sint32 rc = getnameinfo( + int32_t rc = getnameinfo( (struct sockaddr *)&client_addr, client_len, hostName, @@ -220,7 +220,7 @@ public: return tcpSocket; } - void Connect(const char * address, uint16 port) override + void Connect(const char * address, uint16_t port) override { if (_status != SOCKET_STATUS_CLOSED) { @@ -233,7 +233,7 @@ public: _status = SOCKET_STATUS_RESOLVING; sockaddr_storage ss { }; - sint32 ss_len; + int32_t ss_len; if (!ResolveAddress(address, port, &ss, &ss_len)) { throw SocketException("Unable to resolve address."); @@ -253,7 +253,7 @@ public: } // Connect - sint32 connectResult = connect(_socket, (sockaddr *)&ss, ss_len); + int32_t connectResult = connect(_socket, (sockaddr *)&ss, ss_len); if (connectResult != SOCKET_ERROR || (LAST_SOCKET_ERROR() != EINPROGRESS && LAST_SOCKET_ERROR() != EWOULDBLOCK)) { @@ -262,7 +262,7 @@ public: auto connectStartTime = std::chrono::system_clock::now(); - sint32 error = 0; + int32_t error = 0; socklen_t len = sizeof(error); if (getsockopt(_socket, SOL_SOCKET, SO_ERROR, (char *)&error, &len) != 0) { @@ -287,7 +287,7 @@ public: timeval timeout { }; timeout.tv_sec = 0; timeout.tv_usec = 0; - if (select((sint32)(_socket + 1), nullptr, &writeFD, nullptr, &timeout) > 0) + if (select((int32_t)(_socket + 1), nullptr, &writeFD, nullptr, &timeout) > 0) { error = 0; len = sizeof(error); @@ -313,7 +313,7 @@ public: } } - void ConnectAsync(const char * address, uint16 port) override + void ConnectAsync(const char * address, uint16_t port) override { if (_status != SOCKET_STATUS_CLOSED) { @@ -358,7 +358,7 @@ public: { const char * bufferStart = (const char *)buffer + totalSent; size_t remainingSize = size - totalSent; - sint32 sentBytes = send(_socket, bufferStart, (sint32)remainingSize, FLAG_NO_PIPE); + int32_t sentBytes = send(_socket, bufferStart, (int32_t)remainingSize, FLAG_NO_PIPE); if (sentBytes == SOCKET_ERROR) { return totalSent; @@ -375,7 +375,7 @@ public: throw std::runtime_error("Socket not connected."); } - sint32 readBytes = recv(_socket, (char *)buffer, (sint32)size, 0); + int32_t readBytes = recv(_socket, (char *)buffer, (int32_t)size, 0); if (readBytes == 0) { *sizeReceived = 0; @@ -441,7 +441,7 @@ private: _status = SOCKET_STATUS_CLOSED; } - bool ResolveAddress(const char * address, uint16 port, sockaddr_storage * ss, sint32 * ss_len) + bool ResolveAddress(const char * address, uint16_t port, sockaddr_storage * ss, int32_t * ss_len) { std::string serviceName = std::to_string(port); @@ -467,7 +467,7 @@ private: else { memcpy(ss, result->ai_addr, result->ai_addrlen); - *ss_len = (sint32)result->ai_addrlen; + *ss_len = (int32_t)result->ai_addrlen; freeaddrinfo(result); return true; } @@ -479,7 +479,7 @@ private: u_long nonBlocking = on; return ioctlsocket(socket, FIONBIO, &nonBlocking) == 0; #else - sint32 flags = fcntl(socket, F_GETFL, 0); + int32_t flags = fcntl(socket, F_GETFL, 0); return fcntl(socket, F_SETFL, on ? (flags | O_NONBLOCK) : (flags & ~O_NONBLOCK)) == 0; #endif } @@ -528,12 +528,12 @@ void DisposeWSA() namespace Convert { - uint16 HostToNetwork(uint16 value) + uint16_t HostToNetwork(uint16_t value) { return htons(value); } - uint16 NetworkToHost(uint16 value) + uint16_t NetworkToHost(uint16_t value) { return ntohs(value); } diff --git a/src/openrct2/network/TcpSocket.h b/src/openrct2/network/TcpSocket.h index 4d893b977b..51f948ab5a 100644 --- a/src/openrct2/network/TcpSocket.h +++ b/src/openrct2/network/TcpSocket.h @@ -40,12 +40,12 @@ public: virtual const char * GetError() abstract; virtual const char * GetHostName() const abstract; - virtual void Listen(uint16 port) abstract; - virtual void Listen(const char * address, uint16 port) abstract; + virtual void Listen(uint16_t port) abstract; + virtual void Listen(const char * address, uint16_t port) abstract; virtual ITcpSocket * Accept() abstract; - virtual void Connect(const char * address, uint16 port) abstract; - virtual void ConnectAsync(const char * address, uint16 port) abstract; + virtual void Connect(const char * address, uint16_t port) abstract; + virtual void ConnectAsync(const char * address, uint16_t port) abstract; virtual size_t SendData(const void * buffer, size_t size) abstract; virtual NETWORK_READPACKET ReceiveData(void * buffer, size_t size, size_t * sizeReceived) abstract; @@ -61,6 +61,6 @@ void DisposeWSA(); namespace Convert { - uint16 HostToNetwork(uint16 value); - uint16 NetworkToHost(uint16 value); + uint16_t HostToNetwork(uint16_t value); + uint16_t NetworkToHost(uint16_t value); } diff --git a/src/openrct2/network/Twitch.cpp b/src/openrct2/network/Twitch.cpp index 90117daffb..a0fea2f9e1 100644 --- a/src/openrct2/network/Twitch.cpp +++ b/src/openrct2/network/Twitch.cpp @@ -100,12 +100,12 @@ namespace Twitch * TODO Ideally, the chat message pulse should be more frequent than the followers / chat members so that news messages etc. * have a lower latency. */ - constexpr uint32 PulseTime = 10 * 1000; + constexpr uint32_t PulseTime = 10 * 1000; - static sint32 _twitchState = TWITCH_STATE_LEFT; + static int32_t _twitchState = TWITCH_STATE_LEFT; static bool _twitchIdle = true; - static uint32 _twitchLastPulseTick = 0; - static sint32 _twitchLastPulseOperation = 1; + static uint32_t _twitchLastPulseTick = 0; + static int32_t _twitchLastPulseOperation = 1; static Http::Response _twitchJsonResponse; static void Join(); @@ -137,8 +137,8 @@ namespace Twitch switch (_twitchState) { case TWITCH_STATE_LEFT: { - uint32 currentTime = platform_get_ticks(); - uint32 timeSinceLastPulse = currentTime - _twitchLastPulseTick; + uint32_t currentTime = platform_get_ticks(); + uint32_t timeSinceLastPulse = currentTime - _twitchLastPulseTick; if (_twitchLastPulseTick == 0 || timeSinceLastPulse > PulseTime) { _twitchLastPulseTick = currentTime; @@ -148,8 +148,8 @@ namespace Twitch } case TWITCH_STATE_JOINED: { - uint32 currentTime = platform_get_ticks(); - uint32 timeSinceLastPulse = currentTime - _twitchLastPulseTick; + uint32_t currentTime = platform_get_ticks(); + uint32_t timeSinceLastPulse = currentTime - _twitchLastPulseTick; if (_twitchLastPulseTick == 0 || timeSinceLastPulse > PulseTime) { _twitchLastPulseTick = currentTime; _twitchLastPulseOperation = (_twitchLastPulseOperation + 1) % 2; @@ -407,7 +407,7 @@ namespace Twitch static void ManageGuestNames(std::vector &members) { // Check what followers are already in the park - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep *peep; FOR_ALL_GUESTS(spriteIndex, peep) { @@ -541,7 +541,7 @@ namespace Twitch if (gConfigTwitch.enable_news) { utf8 buffer[256]; - buffer[0] = (utf8)(uint8)FORMAT_TOPAZ; + buffer[0] = (utf8)(uint8_t)FORMAT_TOPAZ; safe_strcpy(buffer + 1, message, sizeof(buffer) - 1); utf8_remove_formatting(buffer, false); diff --git a/src/openrct2/network/network.h b/src/openrct2/network/network.h index 8b53d3d90a..f1bdc15042 100644 --- a/src/openrct2/network/network.h +++ b/src/openrct2/network/network.h @@ -84,33 +84,33 @@ public: void SetEnvironment(const std::shared_ptr& env); bool Init(); void Close(); - bool BeginClient(const char* host, uint16 port); - bool BeginServer(uint16 port, const char* address); - sint32 GetMode(); - sint32 GetStatus(); - sint32 GetAuthStatus(); - uint32 GetServerTick(); - uint8 GetPlayerID(); + bool BeginClient(const char* host, uint16_t port); + bool BeginServer(uint16_t port, const char* address); + int32_t GetMode(); + int32_t GetStatus(); + int32_t GetAuthStatus(); + uint32_t GetServerTick(); + uint8_t GetPlayerID(); void Update(); void Flush(); void ProcessGameCommandQueue(); void EnqueueGameAction(const GameAction *action); - std::vector>::iterator GetPlayerIteratorByID(uint8 id); - NetworkPlayer* GetPlayerByID(uint8 id); - std::vector>::iterator GetGroupIteratorByID(uint8 id); - NetworkGroup* GetGroupByID(uint8 id); + std::vector>::iterator GetPlayerIteratorByID(uint8_t id); + NetworkPlayer* GetPlayerByID(uint8_t id); + std::vector>::iterator GetGroupIteratorByID(uint8_t id); + NetworkGroup* GetGroupByID(uint8_t id); static const char* FormatChat(NetworkPlayer* fromplayer, const char* text); void SendPacketToClients(NetworkPacket& packet, bool front = false, bool gameCmd = false); - bool CheckSRAND(uint32 tick, uint32 srand0); + bool CheckSRAND(uint32_t tick, uint32_t srand0); void CheckDesynchronizaton(); - void KickPlayer(sint32 playerId); + void KickPlayer(int32_t playerId); void SetPassword(const char* password); void ShutdownClient(); NetworkGroup* AddGroup(); - void RemoveGroup(uint8 id); - uint8 GetDefaultGroup(); - uint8 GetGroupIDByHash(const std::string &keyhash); - void SetDefaultGroup(uint8 id); + void RemoveGroup(uint8_t id); + uint8_t GetDefaultGroup(); + uint8_t GetGroupIDByHash(const std::string &keyhash); + void SetDefaultGroup(uint8_t id); void SaveGroups(); void LoadGroups(); @@ -132,8 +132,8 @@ public: void Server_Send_MAP(NetworkConnection* connection = nullptr); void Client_Send_CHAT(const char* text); void Server_Send_CHAT(const char* text); - void Client_Send_GAMECMD(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 callback); - void Server_Send_GAMECMD(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 playerid, uint8 callback); + void Client_Send_GAMECMD(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t callback); + void Server_Send_GAMECMD(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t playerid, uint8_t callback); void Client_Send_GAME_ACTION(const GameAction *action); void Server_Send_GAME_ACTION(const GameAction *action); void Server_Send_TICK(); @@ -154,8 +154,8 @@ public: std::vector> player_list; std::vector> group_list; NetworkKey _key; - std::vector _challenge; - std::map _gameActionCallbacks; + std::vector _challenge; + std::map _gameActionCallbacks; NetworkUserManager _userManager; std::string ServerName; @@ -184,14 +184,14 @@ private: struct GameCommand { - GameCommand(uint32 t, uint32* args, uint8 p, uint8 cb, uint32 id) { + GameCommand(uint32_t t, uint32_t* args, uint8_t p, uint8_t cb, uint32_t id) { tick = t; eax = args[0]; ebx = args[1]; ecx = args[2]; edx = args[3]; esi = args[4]; edi = args[5]; ebp = args[6]; playerid = p; callback = cb; action = nullptr; commandIndex = id; } - GameCommand(uint32 t, std::unique_ptr&& ga, uint32 id) + GameCommand(uint32_t t, std::unique_ptr&& ga, uint32_t id) { tick = t; action = std::move(ga); @@ -202,12 +202,12 @@ private: { } - uint32 tick = 0; - uint32 eax = 0, ebx = 0, ecx = 0, edx = 0, esi = 0, edi = 0, ebp = 0; + uint32_t tick = 0; + uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0, esi = 0, edi = 0, ebp = 0; GameAction::Ptr action; - uint8 playerid = 0; - uint8 callback = 0; - uint32 commandIndex = 0; + uint8_t playerid = 0; + uint8_t callback = 0; + uint32_t commandIndex = 0; bool operator<(const GameCommand& comp) const { // First sort by tick if (tick < comp.tick) @@ -220,33 +220,33 @@ private: } }; - sint32 mode = NETWORK_MODE_NONE; - sint32 status = NETWORK_STATUS_NONE; + int32_t mode = NETWORK_MODE_NONE; + int32_t status = NETWORK_STATUS_NONE; bool _closeLock = false; bool _requireClose = false; bool wsa_initialized = false; ITcpSocket * listening_socket = nullptr; - uint16 listening_port = 0; + uint16_t listening_port = 0; NetworkConnection * server_connection = nullptr; SOCKET_STATUS _lastConnectStatus = SOCKET_STATUS_CLOSED; - uint32 last_tick_sent_time = 0; - uint32 last_ping_sent_time = 0; - uint32 server_tick = 0; - uint32 server_srand0 = 0; - uint32 server_srand0_tick = 0; + uint32_t last_tick_sent_time = 0; + uint32_t last_ping_sent_time = 0; + uint32_t server_tick = 0; + uint32_t server_srand0 = 0; + uint32_t server_srand0_tick = 0; std::string server_sprite_hash; - uint8 player_id = 0; + uint8_t player_id = 0; std::list> client_connection_list; std::multiset game_command_queue; - std::vector chunk_buffer; + std::vector chunk_buffer; std::string _password; bool _desynchronised = false; INetworkServerAdvertiser * _advertiser = nullptr; - uint32 server_connect_time = 0; - uint8 default_group = 0; - uint32 game_commands_processed_this_tick = 0; - uint32 _commandId; - uint32 _actionId; + uint32_t server_connect_time = 0; + uint8_t default_group = 0; + uint32_t game_commands_processed_this_tick = 0; + uint32_t _commandId; + uint32_t _actionId; std::string _chatLogPath; std::string _chatLogFilenameFormat = "%Y%m%d-%H%M%S.txt"; std::string _serverLogPath; @@ -285,7 +285,7 @@ private: void Client_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket& packet); void Server_Handle_OBJECTS(NetworkConnection& connection, NetworkPacket& packet); - uint8 * save_for_network(size_t &out_size, const std::vector &objects) const; + uint8_t * save_for_network(size_t &out_size, const std::vector &objects) const; std::ofstream _chat_log_fs; std::ofstream _server_log_fs; @@ -296,56 +296,56 @@ private: void network_set_env(const std::shared_ptr& env); void network_close(); void network_shutdown_client(); -sint32 network_begin_client(const char *host, sint32 port); -sint32 network_begin_server(sint32 port, const char* address); +int32_t network_begin_client(const char *host, int32_t port); +int32_t network_begin_server(int32_t port, const char* address); -sint32 network_get_mode(); -sint32 network_get_status(); +int32_t network_get_mode(); +int32_t network_get_status(); void network_check_desynchronization(); void network_send_tick(); void network_update(); void network_process_game_commands(); void network_flush(); -sint32 network_get_authstatus(); -uint32 network_get_server_tick(); -uint8 network_get_current_player_id(); -sint32 network_get_num_players(); -const char* network_get_player_name(uint32 index); -uint32 network_get_player_flags(uint32 index); -sint32 network_get_player_ping(uint32 index); -sint32 network_get_player_id(uint32 index); -money32 network_get_player_money_spent(uint32 index); -void network_add_player_money_spent(uint32 index, money32 cost); -sint32 network_get_player_last_action(uint32 index, sint32 time); -void network_set_player_last_action(uint32 index, sint32 command); -LocationXYZ16 network_get_player_last_action_coord(uint32 index); -void network_set_player_last_action_coord(uint32 index, LocationXYZ16 coord); -uint32 network_get_player_commands_ran(uint32 index); -sint32 network_get_player_index(uint8 id); -uint8 network_get_player_group(uint32 index); -void network_set_player_group(uint32 index, uint32 groupindex); -sint32 network_get_group_index(uint8 id); -sint32 network_get_current_player_group_index(); -uint8 network_get_group_id(uint32 index); -sint32 network_get_num_groups(); -const char* network_get_group_name(uint32 index); -void game_command_set_player_group(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_modify_groups(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_kick_player(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -uint8 network_get_default_group(); -sint32 network_get_num_actions(); -rct_string_id network_get_action_name_string_id(uint32 index); -sint32 network_can_perform_action(uint32 groupindex, uint32 index); -sint32 network_can_perform_command(uint32 groupindex, sint32 index); -void network_set_pickup_peep(uint8 playerid, rct_peep* peep); -rct_peep* network_get_pickup_peep(uint8 playerid); -void network_set_pickup_peep_old_x(uint8 playerid, sint32 x); -sint32 network_get_pickup_peep_old_x(uint8 playerid); +int32_t network_get_authstatus(); +uint32_t network_get_server_tick(); +uint8_t network_get_current_player_id(); +int32_t network_get_num_players(); +const char* network_get_player_name(uint32_t index); +uint32_t network_get_player_flags(uint32_t index); +int32_t network_get_player_ping(uint32_t index); +int32_t network_get_player_id(uint32_t index); +money32 network_get_player_money_spent(uint32_t index); +void network_add_player_money_spent(uint32_t index, money32 cost); +int32_t network_get_player_last_action(uint32_t index, int32_t time); +void network_set_player_last_action(uint32_t index, int32_t command); +LocationXYZ16 network_get_player_last_action_coord(uint32_t index); +void network_set_player_last_action_coord(uint32_t index, LocationXYZ16 coord); +uint32_t network_get_player_commands_ran(uint32_t index); +int32_t network_get_player_index(uint8_t id); +uint8_t network_get_player_group(uint32_t index); +void network_set_player_group(uint32_t index, uint32_t groupindex); +int32_t network_get_group_index(uint8_t id); +int32_t network_get_current_player_group_index(); +uint8_t network_get_group_id(uint32_t index); +int32_t network_get_num_groups(); +const char* network_get_group_name(uint32_t index); +void game_command_set_player_group(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_modify_groups(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_kick_player(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +uint8_t network_get_default_group(); +int32_t network_get_num_actions(); +rct_string_id network_get_action_name_string_id(uint32_t index); +int32_t network_can_perform_action(uint32_t groupindex, uint32_t index); +int32_t network_can_perform_command(uint32_t groupindex, int32_t index); +void network_set_pickup_peep(uint8_t playerid, rct_peep* peep); +rct_peep* network_get_pickup_peep(uint8_t playerid); +void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x); +int32_t network_get_pickup_peep_old_x(uint8_t playerid); void network_send_map(); void network_send_chat(const char* text); -void network_send_gamecmd(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 callback); +void network_send_gamecmd(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx, uint32_t esi, uint32_t edi, uint32_t ebp, uint8_t callback); void network_send_game_action(const GameAction *action); void network_enqueue_game_action(const GameAction *action); void network_send_password(const char* password); diff --git a/src/openrct2/object/BannerObject.cpp b/src/openrct2/object/BannerObject.cpp index f5a3d92139..508e04fe9b 100644 --- a/src/openrct2/object/BannerObject.cpp +++ b/src/openrct2/object/BannerObject.cpp @@ -19,10 +19,10 @@ void BannerObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.banner.scrolling_mode = stream->ReadValue(); - _legacyType.banner.flags = stream->ReadValue(); - _legacyType.banner.price = stream->ReadValue(); - _legacyType.banner.scenery_tab_id = stream->ReadValue(); + _legacyType.banner.scrolling_mode = stream->ReadValue(); + _legacyType.banner.flags = stream->ReadValue(); + _legacyType.banner.price = stream->ReadValue(); + _legacyType.banner.scenery_tab_id = stream->ReadValue(); stream->Seek(1, STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); @@ -73,12 +73,12 @@ void BannerObject::Unload() _legacyType.image = 0; } -void BannerObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void BannerObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; - uint32 imageId = 0x20D00000 | _legacyType.image; + uint32_t imageId = 0x20D00000 | _legacyType.image; gfx_draw_sprite(dpi, imageId + 0, x - 12, y + 8, 0); gfx_draw_sprite(dpi, imageId + 1, x - 12, y + 8, 0); } @@ -89,7 +89,7 @@ void BannerObject::ReadJson(IReadObjectContext * context, const json_t * root) _legacyType.banner.scrolling_mode = json_integer_value(json_object_get(properties, "scrollingMode")); _legacyType.banner.price = json_integer_value(json_object_get(properties, "price")); - _legacyType.banner.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.banner.flags = ObjectJsonHelpers::GetFlags(properties, { { "hasPrimaryColour", BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR }}); SetPrimarySceneryGroup(ObjectJsonHelpers::GetString(json_object_get(properties, "sceneryGroup"))); diff --git a/src/openrct2/object/BannerObject.h b/src/openrct2/object/BannerObject.h index dfc80fecda..62e631b10b 100644 --- a/src/openrct2/object/BannerObject.h +++ b/src/openrct2/object/BannerObject.h @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/EntranceObject.cpp b/src/openrct2/object/EntranceObject.cpp index 87d91007e5..ecbd7ec344 100644 --- a/src/openrct2/object/EntranceObject.cpp +++ b/src/openrct2/object/EntranceObject.cpp @@ -17,8 +17,8 @@ void EntranceObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.scrolling_mode = stream->ReadValue(); - _legacyType.text_height = stream->ReadValue(); + _legacyType.scrolling_mode = stream->ReadValue(); + _legacyType.text_height = stream->ReadValue(); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); GetImageTable().Read(context, stream); @@ -48,12 +48,12 @@ void EntranceObject::Unload() _legacyType.image_id = 0; } -void EntranceObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void EntranceObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; - uint32 imageId = _legacyType.image_id; + uint32_t imageId = _legacyType.image_id; gfx_draw_sprite(dpi, imageId + 1, x - 32, y + 14, 0); gfx_draw_sprite(dpi, imageId + 0, x + 0, y + 28, 0); gfx_draw_sprite(dpi, imageId + 2, x + 32, y + 44, 0); diff --git a/src/openrct2/object/EntranceObject.h b/src/openrct2/object/EntranceObject.h index 93516c71f6..789f9a04d9 100644 --- a/src/openrct2/object/EntranceObject.h +++ b/src/openrct2/object/EntranceObject.h @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/FootpathItemObject.cpp b/src/openrct2/object/FootpathItemObject.cpp index 955b324ca6..8dffbaf861 100644 --- a/src/openrct2/object/FootpathItemObject.cpp +++ b/src/openrct2/object/FootpathItemObject.cpp @@ -21,11 +21,11 @@ void FootpathItemObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.path_bit.flags = stream->ReadValue(); - _legacyType.path_bit.draw_type = stream->ReadValue(); - _legacyType.path_bit.tool_id = stream->ReadValue(); - _legacyType.path_bit.price = stream->ReadValue(); - _legacyType.path_bit.scenery_tab_id = stream->ReadValue(); + _legacyType.path_bit.flags = stream->ReadValue(); + _legacyType.path_bit.draw_type = stream->ReadValue(); + _legacyType.path_bit.tool_id = stream->ReadValue(); + _legacyType.path_bit.price = stream->ReadValue(); + _legacyType.path_bit.scenery_tab_id = stream->ReadValue(); stream->Seek(1, STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); @@ -78,14 +78,14 @@ void FootpathItemObject::Unload() _legacyType.image = 0; } -void FootpathItemObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void FootpathItemObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; gfx_draw_sprite(dpi, _legacyType.image, x - 22, y - 24, 0); } -static uint8 ParseDrawType(const std::string &s) +static uint8_t ParseDrawType(const std::string &s) { if (s == "lamp") return PATH_BIT_DRAW_TYPE_LIGHTS; if (s == "bin") return PATH_BIT_DRAW_TYPE_BINS; @@ -104,7 +104,7 @@ void FootpathItemObject::ReadJson(IReadObjectContext * context, const json_t * r SetPrimarySceneryGroup(ObjectJsonHelpers::GetString(json_object_get(properties, "sceneryGroup"))); // Flags - _legacyType.path_bit.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.path_bit.flags = ObjectJsonHelpers::GetFlags(properties, { { "isBin", PATH_BIT_FLAG_IS_BIN }, { "isBench", PATH_BIT_FLAG_IS_BENCH }, { "isBreakable", PATH_BIT_FLAG_BREAKABLE }, diff --git a/src/openrct2/object/FootpathItemObject.h b/src/openrct2/object/FootpathItemObject.h index f2a6e4a2db..249e05e7c8 100644 --- a/src/openrct2/object/FootpathItemObject.h +++ b/src/openrct2/object/FootpathItemObject.h @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/FootpathObject.cpp b/src/openrct2/object/FootpathObject.cpp index 961b4e2e08..c6c98db6e2 100644 --- a/src/openrct2/object/FootpathObject.cpp +++ b/src/openrct2/object/FootpathObject.cpp @@ -17,9 +17,9 @@ void FootpathObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(10, STREAM_SEEK_CURRENT); - _legacyType.support_type = stream->ReadValue(); - _legacyType.flags = stream->ReadValue(); - _legacyType.scrolling_mode = stream->ReadValue(); + _legacyType.support_type = stream->ReadValue(); + _legacyType.flags = stream->ReadValue(); + _legacyType.scrolling_mode = stream->ReadValue(); stream->Seek(1, STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); @@ -49,15 +49,15 @@ void FootpathObject::Unload() _legacyType.image = 0; } -void FootpathObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void FootpathObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; gfx_draw_sprite(dpi, _legacyType.image + 71, x - 49, y - 17, 0); gfx_draw_sprite(dpi, _legacyType.image + 72, x + 4, y - 17, 0); } -static uint8 ParseSupportType(const std::string &s) +static uint8_t ParseSupportType(const std::string &s) { if (s == "pole") return FOOTPATH_ENTRY_SUPPORT_TYPE_POLE; else /* if (s == "box") */ return FOOTPATH_ENTRY_SUPPORT_TYPE_BOX; @@ -70,7 +70,7 @@ void FootpathObject::ReadJson(IReadObjectContext * context, const json_t * root) _legacyType.scrolling_mode = json_integer_value(json_object_get(properties, "scrollingMode")); // Flags - _legacyType.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.flags = ObjectJsonHelpers::GetFlags(properties, { { "hasSupportImages", FOOTPATH_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE }, { "hasElevatedPathImages", FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE }, { "editorOnly", FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR } }); diff --git a/src/openrct2/object/FootpathObject.h b/src/openrct2/object/FootpathObject.h index b16903fdc3..c4f5ba2f08 100644 --- a/src/openrct2/object/FootpathObject.h +++ b/src/openrct2/object/FootpathObject.h @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/ImageTable.cpp b/src/openrct2/object/ImageTable.cpp index cc57f91ee3..8fe9b7a99a 100644 --- a/src/openrct2/object/ImageTable.cpp +++ b/src/openrct2/object/ImageTable.cpp @@ -35,19 +35,19 @@ void ImageTable::Read(IReadObjectContext * context, IStream * stream) try { - uint32 numImages = stream->ReadValue(); - uint32 imageDataSize = stream->ReadValue(); + uint32_t numImages = stream->ReadValue(); + uint32_t imageDataSize = stream->ReadValue(); - uint64 headerTableSize = numImages * 16; - uint64 remainingBytes = stream->GetLength() - stream->GetPosition() - headerTableSize; + uint64_t headerTableSize = numImages * 16; + uint64_t remainingBytes = stream->GetLength() - stream->GetPosition() - headerTableSize; if (remainingBytes > imageDataSize) { context->LogWarning(OBJECT_ERROR_BAD_IMAGE_TABLE, "Image table size longer than expected."); - imageDataSize = (uint32)remainingBytes; + imageDataSize = (uint32_t)remainingBytes; } auto dataSize = (size_t)imageDataSize; - auto data = std::make_unique(dataSize); + auto data = std::make_unique(dataSize); if (data == nullptr) { context->LogError(OBJECT_ERROR_BAD_IMAGE_TABLE, "Image table too large."); @@ -57,19 +57,19 @@ void ImageTable::Read(IReadObjectContext * context, IStream * stream) // Read g1 element headers uintptr_t imageDataBase = (uintptr_t)data.get(); std::vector newEntries; - for (uint32 i = 0; i < numImages; i++) + for (uint32_t i = 0; i < numImages; i++) { rct_g1_element g1Element; - uintptr_t imageDataOffset = (uintptr_t)stream->ReadValue(); - g1Element.offset = (uint8*)(imageDataBase + imageDataOffset); + uintptr_t imageDataOffset = (uintptr_t)stream->ReadValue(); + g1Element.offset = (uint8_t*)(imageDataBase + imageDataOffset); - g1Element.width = stream->ReadValue(); - g1Element.height = stream->ReadValue(); - g1Element.x_offset = stream->ReadValue(); - g1Element.y_offset = stream->ReadValue(); - g1Element.flags = stream->ReadValue(); - g1Element.zoomed_offset = stream->ReadValue(); + g1Element.width = stream->ReadValue(); + g1Element.height = stream->ReadValue(); + g1Element.x_offset = stream->ReadValue(); + g1Element.y_offset = stream->ReadValue(); + g1Element.flags = stream->ReadValue(); + g1Element.zoomed_offset = stream->ReadValue(); newEntries.push_back(g1Element); } @@ -105,7 +105,7 @@ void ImageTable::AddImage(const rct_g1_element * g1) } else { - newg1.offset = new uint8[length]; + newg1.offset = new uint8_t[length]; std::copy_n(g1->offset, length, newg1.offset); } _entries.push_back(newg1); diff --git a/src/openrct2/object/ImageTable.h b/src/openrct2/object/ImageTable.h index 69849e4305..4168a3c6a6 100644 --- a/src/openrct2/object/ImageTable.h +++ b/src/openrct2/object/ImageTable.h @@ -20,7 +20,7 @@ interface IStream; class ImageTable { private: - std::unique_ptr _data; + std::unique_ptr _data; std::vector _entries; public: @@ -31,6 +31,6 @@ public: void Read(IReadObjectContext * context, IStream * stream); const rct_g1_element * GetImages() const { return _entries.data(); } - uint32 GetCount() const { return (uint32)_entries.size(); } + uint32_t GetCount() const { return (uint32_t)_entries.size(); } void AddImage(const rct_g1_element * g1); }; diff --git a/src/openrct2/object/LargeSceneryObject.cpp b/src/openrct2/object/LargeSceneryObject.cpp index 00fed5c939..1e226f8030 100644 --- a/src/openrct2/object/LargeSceneryObject.cpp +++ b/src/openrct2/object/LargeSceneryObject.cpp @@ -23,13 +23,13 @@ void LargeSceneryObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.large_scenery.tool_id = stream->ReadValue(); - _legacyType.large_scenery.flags = stream->ReadValue(); - _legacyType.large_scenery.price = stream->ReadValue(); - _legacyType.large_scenery.removal_price = stream->ReadValue(); + _legacyType.large_scenery.tool_id = stream->ReadValue(); + _legacyType.large_scenery.flags = stream->ReadValue(); + _legacyType.large_scenery.price = stream->ReadValue(); + _legacyType.large_scenery.removal_price = stream->ReadValue(); stream->Seek(5, STREAM_SEEK_CURRENT); _legacyType.large_scenery.scenery_tab_id = 0xFF; - _legacyType.large_scenery.scrolling_mode = stream->ReadValue(); + _legacyType.large_scenery.scrolling_mode = stream->ReadValue(); stream->Seek(4, STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); @@ -97,19 +97,19 @@ void LargeSceneryObject::Unload() _legacyType.image = 0; } -void LargeSceneryObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void LargeSceneryObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = (height / 2) - 39; + int32_t x = width / 2; + int32_t y = (height / 2) - 39; - uint32 imageId = 0xB2D00000 | _legacyType.image; + uint32_t imageId = 0xB2D00000 | _legacyType.image; gfx_draw_sprite(dpi, imageId, x, y, 0); } std::vector LargeSceneryObject::ReadTiles(IStream * stream) { auto tiles = std::vector(); - while (stream->ReadValue() != 0xFFFF) + while (stream->ReadValue() != 0xFFFF) { stream->Seek(-2, STREAM_SEEK_CURRENT); auto tile = stream->ReadValue(); @@ -133,7 +133,7 @@ void LargeSceneryObject::ReadJson(IReadObjectContext * context, const json_t * r -1; // Flags - _legacyType.large_scenery.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.large_scenery.flags = ObjectJsonHelpers::GetFlags(properties, { { "hasPrimaryColour", LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR }, { "hasSecondaryColour", LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR }, { "isAnimated", LARGE_SCENERY_FLAG_ANIMATED }, @@ -217,7 +217,7 @@ std::unique_ptr LargeSceneryObject::ReadJson3dFont(const font->max_width = json_integer_value(json_object_get(j3dFont, "maxWidth")); font->num_images = json_integer_value(json_object_get(j3dFont, "numImages")); - font->flags = ObjectJsonHelpers::GetFlags(j3dFont, { + font->flags = ObjectJsonHelpers::GetFlags(j3dFont, { { "isVertical", LARGE_SCENERY_TEXT_FLAG_VERTICAL }, { "isTwoLine", LARGE_SCENERY_TEXT_FLAG_TWO_LINE } }); diff --git a/src/openrct2/object/LargeSceneryObject.h b/src/openrct2/object/LargeSceneryObject.h index bca30f388d..df20d4f6e6 100644 --- a/src/openrct2/object/LargeSceneryObject.h +++ b/src/openrct2/object/LargeSceneryObject.h @@ -19,7 +19,7 @@ class LargeSceneryObject final : public SceneryObject { private: rct_scenery_entry _legacyType = {}; - uint32 _baseImageId = 0; + uint32_t _baseImageId = 0; std::vector _tiles; std::unique_ptr _3dFont; @@ -33,7 +33,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; private: static std::vector ReadTiles(IStream * stream); diff --git a/src/openrct2/object/Object.cpp b/src/openrct2/object/Object.cpp index a8ab57d0b4..8ad3ef6af5 100644 --- a/src/openrct2/object/Object.cpp +++ b/src/openrct2/object/Object.cpp @@ -46,7 +46,7 @@ Object::~Object() Memory::Free(_identifier); } -std::string Object::GetOverrideString(uint8 index) const +std::string Object::GetOverrideString(uint8_t index) const { const char * identifier = GetIdentifier(); rct_string_id stringId = language_get_object_override_string_id(identifier, index); @@ -59,7 +59,7 @@ std::string Object::GetOverrideString(uint8 index) const return String::ToStd(result); } -std::string Object::GetString(uint8 index) const +std::string Object::GetString(uint8_t index) const { auto sz = GetOverrideString(index); if (sz.empty()) @@ -69,7 +69,7 @@ std::string Object::GetString(uint8 index) const return sz; } -std::string Object::GetString(sint32 language, uint8 index) const +std::string Object::GetString(int32_t language, uint8_t index) const { return GetStringTable().GetString(language, index); } @@ -84,7 +84,7 @@ rct_object_entry Object::GetScgPathXHeader() return Object::CreateHeader("SCGPATHX", 207140231, 890227440); } -rct_object_entry Object::CreateHeader(const char name[DAT_NAME_LENGTH + 1], uint32 flags, uint32 checksum) +rct_object_entry Object::CreateHeader(const char name[DAT_NAME_LENGTH + 1], uint32_t flags, uint32_t checksum) { rct_object_entry header = {}; header.flags = flags; @@ -93,7 +93,7 @@ rct_object_entry Object::CreateHeader(const char name[DAT_NAME_LENGTH + 1], uint return header; } -void Object::SetSourceGame(const uint8 sourceGame) +void Object::SetSourceGame(const uint8_t sourceGame) { // FIXME: Temporary disabled because it breaks exporting to vanilla. /*_objectEntry.flags &= 0x0F; @@ -709,7 +709,7 @@ std::string Object::GetName() const return GetString(OBJ_STRING_ID_NAME); } -std::string Object::GetName(sint32 language) const +std::string Object::GetName(int32_t language) const { return GetString(language, OBJ_STRING_ID_NAME); } diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 83203a795e..1920cbf6d8 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -70,14 +70,14 @@ enum OBJECT_SOURCE_GAME */ struct rct_object_entry { union { - uint8 end_flag; // needed not to read past allocated buffer. - uint32 flags; + uint8_t end_flag; // needed not to read past allocated buffer. + uint32_t flags; }; union { char nameWOC[12]; struct { char name[8]; - uint32 checksum; + uint32_t checksum; }; }; @@ -106,8 +106,8 @@ assert_struct_size(rct_object_entry_group, 8); #endif struct rct_ride_filters { - uint8 category[2]; - uint8 ride_type; + uint8_t category[2]; + uint8_t ride_type; }; assert_struct_size(rct_ride_filters, 3); @@ -130,10 +130,10 @@ interface IReadObjectContext virtual IObjectRepository& GetObjectRepository() abstract; virtual bool ShouldLoadImages() abstract; - virtual std::vector GetData(const std::string_view& path) abstract; + virtual std::vector GetData(const std::string_view& path) abstract; - virtual void LogWarning(uint32 code, const utf8 * text) abstract; - virtual void LogError(uint32 code, const utf8 * text) abstract; + virtual void LogWarning(uint32_t code, const utf8 * text) abstract; + virtual void LogError(uint32_t code, const utf8 * text) abstract; }; #ifdef __WARN_SUGGEST_FINAL_TYPES__ @@ -154,11 +154,11 @@ protected: const StringTable & GetStringTable() const { return _stringTable; } ImageTable & GetImageTable() { return _imageTable; } - std::string GetOverrideString(uint8 index) const; - std::string GetString(uint8 index) const; - std::string GetString(sint32 language, uint8 index) const; + std::string GetOverrideString(uint8_t index) const; + std::string GetString(uint8_t index) const; + std::string GetString(int32_t language, uint8_t index) const; - void SetSourceGame(const uint8 sourceGame); + void SetSourceGame(const uint8_t sourceGame); bool IsRCT1Object(); bool IsAAObject(); bool IsLLObject(); @@ -178,11 +178,11 @@ public: virtual void Load() abstract; virtual void Unload() abstract; - virtual void DrawPreview(rct_drawpixelinfo * /*dpi*/, sint32 /*width*/, sint32 /*height*/) const { } + virtual void DrawPreview(rct_drawpixelinfo * /*dpi*/, int32_t /*width*/, int32_t /*height*/) const { } - virtual uint8 GetObjectType() const final { return _objectEntry.flags & 0x0F; } + virtual uint8_t GetObjectType() const final { return _objectEntry.flags & 0x0F; } virtual std::string GetName() const; - virtual std::string GetName(sint32 language) const; + virtual std::string GetName(int32_t language) const; virtual void SetRepositoryItem(ObjectRepositoryItem * /*item*/) const { } @@ -190,14 +190,14 @@ public: rct_object_entry GetScgWallsHeader(); rct_object_entry GetScgPathXHeader(); - rct_object_entry CreateHeader(const char name[9], uint32 flags, uint32 checksum); + rct_object_entry CreateHeader(const char name[9], uint32_t flags, uint32_t checksum); }; #ifdef __WARN_SUGGEST_FINAL_TYPES__ #pragma GCC diagnostic pop #endif -enum OBJECT_ERROR : uint32 +enum OBJECT_ERROR : uint32_t { OBJECT_ERROR_OK, OBJECT_ERROR_UNKNOWN, @@ -208,20 +208,20 @@ enum OBJECT_ERROR : uint32 OBJECT_ERROR_UNEXPECTED_EOF, }; -extern sint32 object_entry_group_counts[]; -extern sint32 object_entry_group_encoding[]; +extern int32_t object_entry_group_counts[]; +extern int32_t object_entry_group_encoding[]; void object_list_load(); bool object_entry_is_empty(const rct_object_entry *entry); bool object_entry_compare(const rct_object_entry *a, const rct_object_entry *b); -sint32 object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength); -bool find_object_in_entry_group(const rct_object_entry* entry, uint8* entry_type, uint8* entry_index); +int32_t object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength); +bool find_object_in_entry_group(const rct_object_entry* entry, uint8_t* entry_type, uint8_t* entry_index); void object_create_identifier_name(char* string_buffer, size_t size, const rct_object_entry* object); const rct_object_entry * object_list_find(rct_object_entry *entry); void object_entry_get_name_fixed(utf8 * buffer, size_t bufferSize, const rct_object_entry * entry); -void * object_entry_get_chunk(sint32 objectType, size_t index); -const rct_object_entry * object_entry_get_entry(sint32 objectType, size_t index); +void * object_entry_get_chunk(int32_t objectType, size_t index); +const rct_object_entry * object_entry_get_entry(int32_t objectType, size_t index); diff --git a/src/openrct2/object/ObjectFactory.cpp b/src/openrct2/object/ObjectFactory.cpp index 36766ea8f0..63647a17c1 100644 --- a/src/openrct2/object/ObjectFactory.cpp +++ b/src/openrct2/object/ObjectFactory.cpp @@ -37,7 +37,7 @@ interface IFileDataRetriever { virtual ~IFileDataRetriever() = default; - virtual std::vector GetData(const std::string_view& path) const abstract; + virtual std::vector GetData(const std::string_view& path) const abstract; }; class FileSystemDataRetriever : public IFileDataRetriever @@ -51,7 +51,7 @@ public: { } - std::vector GetData(const std::string_view& path) const override + std::vector GetData(const std::string_view& path) const override { auto absolutePath = Path::Combine(_basePath, path.data()); return File::ReadAllBytes(absolutePath); @@ -69,7 +69,7 @@ public: { } - std::vector GetData(const std::string_view& path) const override + std::vector GetData(const std::string_view& path) const override { return _zipArchive.GetFileData(path); } @@ -113,7 +113,7 @@ public: return _loadImages; } - std::vector GetData(const std::string_view& path) override + std::vector GetData(const std::string_view& path) override { if (_fileDataRetriever != nullptr) { @@ -122,7 +122,7 @@ public: return {}; } - void LogWarning(uint32 code, const utf8* text) override + void LogWarning(uint32_t code, const utf8* text) override { _wasWarning = true; @@ -132,7 +132,7 @@ public: } } - void LogError(uint32 code, const utf8* text) override + void LogError(uint32_t code, const utf8* text) override { _wasError = true; @@ -227,7 +227,7 @@ namespace ObjectFactory Object * CreateObject(const rct_object_entry &entry) { Object * result; - uint8 objectType = object_entry_get_type(&entry); + uint8_t objectType = object_entry_get_type(&entry); switch (objectType) { case OBJECT_TYPE_RIDE: result = new RideObject(entry); @@ -268,7 +268,7 @@ namespace ObjectFactory return result; } - static uint8 ParseObjectType(const std::string &s) + static uint8_t ParseObjectType(const std::string &s) { if (s == "ride") return OBJECT_TYPE_RIDE; if (s == "footpath") return OBJECT_TYPE_PATHS; diff --git a/src/openrct2/object/ObjectJsonHelpers.cpp b/src/openrct2/object/ObjectJsonHelpers.cpp index 73fc3a487d..2f39248cda 100644 --- a/src/openrct2/object/ObjectJsonHelpers.cpp +++ b/src/openrct2/object/ObjectJsonHelpers.cpp @@ -56,16 +56,16 @@ namespace ObjectJsonHelpers defaultValue; } - sint32 GetInteger(const json_t * obj, const std::string &name, const sint32 &defaultValue) + int32_t GetInteger(const json_t * obj, const std::string &name, const int32_t &defaultValue) { auto value = json_object_get(obj, name.c_str()); if (json_is_integer(value)) { - sint64 val = json_integer_value(value); - if (val >= std::numeric_limits::min() && - val <= std::numeric_limits::max()) + int64_t val = json_integer_value(value); + if (val >= std::numeric_limits::min() && + val <= std::numeric_limits::max()) { - return static_cast(val); + return static_cast(val); } } return defaultValue; @@ -99,9 +99,9 @@ namespace ObjectJsonHelpers return result; } - std::vector GetJsonIntegerArray(const json_t * arr) + std::vector GetJsonIntegerArray(const json_t * arr) { - std::vector result; + std::vector result; if (json_is_array(arr)) { auto count = json_array_size(arr); @@ -119,9 +119,9 @@ namespace ObjectJsonHelpers return result; } - uint8 ParseCursor(const std::string &s, uint8 defaultValue) + uint8_t ParseCursor(const std::string &s, uint8_t defaultValue) { - static const std::unordered_map LookupTable + static const std::unordered_map LookupTable { { "CURSOR_BLANK", CURSOR_BLANK }, { "CURSOR_UP_ARROW", CURSOR_UP_ARROW }, @@ -167,10 +167,10 @@ namespace ObjectJsonHelpers return entry; } - static std::vector ParseRange(std::string s) + static std::vector ParseRange(std::string s) { // Currently only supports [###] or [###..###] - std::vector result = { }; + std::vector result = { }; if (s.length() >= 3 && s[0] == '[' && s[s.length() - 1] == ']') { s = s.substr(1, s.length() - 2); @@ -225,7 +225,7 @@ namespace ObjectJsonHelpers return objectPath; } - static std::vector LoadObjectImages(IReadObjectContext * context, const std::string &name, const std::vector &range) + static std::vector LoadObjectImages(IReadObjectContext * context, const std::string &name, const std::vector &range) { std::vector result; auto objectPath = FindLegacyObject(name); @@ -233,7 +233,7 @@ namespace ObjectJsonHelpers if (obj != nullptr) { auto &imgTable = static_cast(obj)->GetImageTable(); - auto numImages = (sint32)imgTable.GetCount(); + auto numImages = (int32_t)imgTable.GetCount(); auto images = imgTable.GetImages(); size_t placeHoldersAdded = 0; for (auto i : range) @@ -243,7 +243,7 @@ namespace ObjectJsonHelpers auto &objg1 = images[i]; auto length = g1_calculate_data_size(&objg1); auto g1 = objg1; - g1.offset = (uint8 *)std::malloc(length); + g1.offset = (uint8_t *)std::malloc(length); std::memcpy(g1.offset, objg1.offset, length); result.push_back(g1); } @@ -292,7 +292,7 @@ namespace ObjectJsonHelpers auto &csg1 = *gfx_get_g1_element(SPR_CSG_BEGIN + i); auto length = g1_calculate_data_size(&csg1); auto g1 = csg1; - g1.offset = (uint8 *)std::malloc(length); + g1.offset = (uint8_t *)std::malloc(length); std::memcpy(g1.offset, csg1.offset, length); result.push_back(g1); } @@ -316,7 +316,7 @@ namespace ObjectJsonHelpers { auto length = g1_calculate_data_size(og1); auto g1 = *og1; - g1.offset = (uint8 *)std::malloc(length); + g1.offset = (uint8_t *)std::malloc(length); std::memcpy(g1.offset, og1->offset, length); result.push_back(g1); } @@ -395,7 +395,7 @@ namespace ObjectJsonHelpers return result; } - static uint8 ParseStringId(const std::string &s) + static uint8_t ParseStringId(const std::string &s) { if (s == "name") return OBJ_STRING_ID_NAME; if (s == "description") return OBJ_STRING_ID_DESCRIPTION; diff --git a/src/openrct2/object/ObjectJsonHelpers.h b/src/openrct2/object/ObjectJsonHelpers.h index cc78905403..4e32edc155 100644 --- a/src/openrct2/object/ObjectJsonHelpers.h +++ b/src/openrct2/object/ObjectJsonHelpers.h @@ -25,11 +25,11 @@ namespace ObjectJsonHelpers bool GetBoolean(const json_t * obj, const std::string &name, bool defaultValue = false); std::string GetString(const json_t * value); std::string GetString(const json_t * obj, const std::string &name, const std::string &defaultValue = ""); - sint32 GetInteger(const json_t * obj, const std::string &name, const sint32 &defaultValue = 0); + int32_t GetInteger(const json_t * obj, const std::string &name, const int32_t &defaultValue = 0); float GetFloat(const json_t * obj, const std::string &name, const float &defaultValue = 0); std::vector GetJsonStringArray(const json_t * arr); - std::vector GetJsonIntegerArray(const json_t * arr); - uint8 ParseCursor(const std::string &s, uint8 defaultValue); + std::vector GetJsonIntegerArray(const json_t * arr); + uint8_t ParseCursor(const std::string &s, uint8_t defaultValue); rct_object_entry ParseObjectEntry(const std::string & s); void LoadStrings(const json_t * root, StringTable &stringTable); void LoadImages(IReadObjectContext * context, const json_t * root, ImageTable &imageTable); diff --git a/src/openrct2/object/ObjectList.cpp b/src/openrct2/object/ObjectList.cpp index db6fa93eca..f078c72de4 100644 --- a/src/openrct2/object/ObjectList.cpp +++ b/src/openrct2/object/ObjectList.cpp @@ -22,7 +22,7 @@ // 98DA00 // clang-format off -sint32 object_entry_group_counts[] = { +int32_t object_entry_group_counts[] = { MAX_RIDE_OBJECTS, // rides MAX_SMALL_SCENERY_OBJECTS, // small scenery MAX_LARGE_SCENERY_OBJECTS, // large scenery @@ -37,7 +37,7 @@ sint32 object_entry_group_counts[] = { }; // 98DA2C -sint32 object_entry_group_encoding[] = { +int32_t object_entry_group_encoding[] = { CHUNK_ENCODING_RLE, CHUNK_ENCODING_RLE, CHUNK_ENCODING_RLE, @@ -54,21 +54,21 @@ sint32 object_entry_group_encoding[] = { bool object_entry_is_empty(const rct_object_entry *entry) { - uint64 a, b; - memcpy(&a, (uint8 *)entry, 8); - memcpy(&b, (uint8 *)entry + 8, 8); + uint64_t a, b; + memcpy(&a, (uint8_t *)entry, 8); + memcpy(&b, (uint8_t *)entry + 8, 8); if (a == 0xFFFFFFFFFFFFFFFF && b == 0xFFFFFFFFFFFFFFFF) return true; if (a == 0 && b == 0) return true; return false; } -uint8 object_entry_get_type(const rct_object_entry * objectEntry) +uint8_t object_entry_get_type(const rct_object_entry * objectEntry) { return (objectEntry->flags & 0x0F); } -uint8 object_entry_get_source_game(const rct_object_entry * objectEntry) +uint8_t object_entry_get_source_game(const rct_object_entry * objectEntry) { return (objectEntry->flags & 0xF0) >> 4; } @@ -88,16 +88,16 @@ void object_create_identifier_name(char* string_buffer, size_t size, const rct_o * bl = entry_index * ecx = entry_type */ -bool find_object_in_entry_group(const rct_object_entry * entry, uint8 * entry_type, uint8 * entry_index) +bool find_object_in_entry_group(const rct_object_entry * entry, uint8_t * entry_type, uint8_t * entry_index) { - sint32 objectType = object_entry_get_type(entry); + int32_t objectType = object_entry_get_type(entry); if (objectType >= OBJECT_TYPE_COUNT) { return false; } auto maxObjects = object_entry_group_counts[objectType]; - for (sint32 i = 0; i < maxObjects; i++) + for (int32_t i = 0; i < maxObjects; i++) { if (object_entry_get_chunk(objectType, i) != nullptr) { @@ -113,9 +113,9 @@ bool find_object_in_entry_group(const rct_object_entry * entry, uint8 * entry_ty return false; } -void get_type_entry_index(size_t index, uint8 * outObjectType, uint8 * outEntryIndex) +void get_type_entry_index(size_t index, uint8_t * outObjectType, uint8_t * outEntryIndex) { - uint8 objectType = OBJECT_TYPE_RIDE; + uint8_t objectType = OBJECT_TYPE_RIDE; for (size_t groupCount : object_entry_group_counts) { if (index >= groupCount) { @@ -127,12 +127,12 @@ void get_type_entry_index(size_t index, uint8 * outObjectType, uint8 * outEntryI } if (outObjectType != nullptr) *outObjectType = objectType; - if (outEntryIndex != nullptr) *outEntryIndex = (uint8)index; + if (outEntryIndex != nullptr) *outEntryIndex = (uint8_t)index; } const rct_object_entry * get_loaded_object_entry(size_t index) { - uint8 objectType, entryIndex; + uint8_t objectType, entryIndex; get_type_entry_index(index, &objectType, &entryIndex); return object_entry_get_entry(objectType, entryIndex); @@ -140,7 +140,7 @@ const rct_object_entry * get_loaded_object_entry(size_t index) void * get_loaded_object_chunk(size_t index) { - uint8 objectType, entryIndex; + uint8_t objectType, entryIndex; get_type_entry_index(index, &objectType, &entryIndex); return object_entry_get_chunk(objectType, entryIndex); } @@ -152,10 +152,10 @@ void object_entry_get_name_fixed(utf8 * buffer, size_t bufferSize, const rct_obj buffer[bufferSize - 1] = 0; } -void * object_entry_get_chunk(sint32 objectType, size_t index) +void * object_entry_get_chunk(int32_t objectType, size_t index) { size_t objectIndex = index; - for (sint32 i = 0; i < objectType; i++) + for (int32_t i = 0; i < objectType; i++) { objectIndex += object_entry_group_counts[i]; } @@ -170,7 +170,7 @@ void * object_entry_get_chunk(sint32 objectType, size_t index) return result; } -const rct_object_entry * object_entry_get_entry(sint32 objectType, size_t index) +const rct_object_entry * object_entry_get_entry(int32_t objectType, size_t index) { const rct_object_entry * result = nullptr; auto objectMgr = OpenRCT2::GetContext()->GetObjectManager(); diff --git a/src/openrct2/object/ObjectList.h b/src/openrct2/object/ObjectList.h index a20addd997..38ee365e22 100644 --- a/src/openrct2/object/ObjectList.h +++ b/src/openrct2/object/ObjectList.h @@ -17,8 +17,8 @@ #include "../world/Water.h" #include "ObjectLimits.h" -void get_type_entry_index(size_t index, uint8 * outObjectType, uint8 * outEntryIndex); +void get_type_entry_index(size_t index, uint8_t * outObjectType, uint8_t * outEntryIndex); const rct_object_entry * get_loaded_object_entry(size_t index); void * get_loaded_object_chunk(size_t index); -uint8 object_entry_get_type(const rct_object_entry * objectEntry); -uint8 object_entry_get_source_game(const rct_object_entry * objectEntry); +uint8_t object_entry_get_type(const rct_object_entry * objectEntry); +uint8_t object_entry_get_source_game(const rct_object_entry * objectEntry); diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index 2f9ca797d6..eff7fa1e20 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -61,7 +61,7 @@ public: return _loadedObjects[index]; } - Object * GetLoadedObject(sint32 objectType, size_t index) override + Object * GetLoadedObject(int32_t objectType, size_t index) override { if (index >= (size_t)object_entry_group_counts[objectType]) { @@ -86,9 +86,9 @@ public: return loadedObject; } - uint8 GetLoadedObjectEntryIndex(const Object * object) override + uint8_t GetLoadedObjectEntryIndex(const Object * object) override { - uint8 result = UINT8_MAX; + uint8_t result = UINT8_MAX; size_t index = GetLoadedObjectIndex(object); if (index != SIZE_MAX) { @@ -106,8 +106,8 @@ public: loadedObject = ori->LoadedObject; if (loadedObject == nullptr) { - uint8 objectType = object_entry_get_type(&ori->ObjectEntry); - sint32 slot = FindSpareSlot(objectType); + uint8_t objectType = object_entry_get_type(&ori->ObjectEntry); + int32_t slot = FindSpareSlot(objectType); if (slot != -1) { loadedObject = GetOrLoadObject(ori); @@ -250,7 +250,7 @@ private: return LoadObject(&entry); } - sint32 FindSpareSlot(uint8 objectType) + int32_t FindSpareSlot(uint8_t objectType) { size_t firstIndex = GetIndexFromTypeEntry(objectType, 0); size_t endIndex = firstIndex + object_entry_group_counts[objectType]; @@ -259,11 +259,11 @@ private: if (_loadedObjects.size() <= i) { _loadedObjects.resize(i + 1); - return (sint32)i; + return (int32_t)i; } else if (_loadedObjects[i] == nullptr) { - return (sint32)i; + return (int32_t)i; } } return -1; @@ -393,13 +393,13 @@ private: window_close_by_class(WC_SCENERY); } - uint8 GetPrimarySceneryGroupEntryIndex(Object * loadedObject) + uint8_t GetPrimarySceneryGroupEntryIndex(Object * loadedObject) { auto sceneryObject = dynamic_cast(loadedObject); const rct_object_entry * primarySGEntry = sceneryObject->GetPrimarySceneryGroup(); Object * sgObject = GetLoadedObject(primarySGEntry); - uint8 entryIndex = 255; + uint8_t entryIndex = 255; if (sgObject != nullptr) { entryIndex = GetLoadedObjectEntryIndex(sgObject); @@ -420,7 +420,7 @@ private: { std::vector invalidEntries; invalidEntries.reserve(OBJECT_ENTRY_COUNT); - for (sint32 i = 0; i < OBJECT_ENTRY_COUNT; i++) + for (int32_t i = 0; i < OBJECT_ENTRY_COUNT; i++) { auto entry = entries[i]; const ObjectRepositoryItem * ori = nullptr; @@ -620,14 +620,14 @@ private: Console::Error::WriteLine("[%s] Object could not be loaded.", objName); } - static sint32 GetIndexFromTypeEntry(sint32 objectType, size_t entryIndex) + static int32_t GetIndexFromTypeEntry(int32_t objectType, size_t entryIndex) { - sint32 result = 0; - for (sint32 i = 0; i < objectType; i++) + int32_t result = 0; + for (int32_t i = 0; i < objectType; i++) { result += object_entry_group_counts[i]; } - result += (sint32)entryIndex; + result += (int32_t)entryIndex; return result; } }; @@ -651,11 +651,11 @@ void * object_manager_get_loaded_object(const rct_object_entry * entry) return (void *)loadedObject; } -uint8 object_manager_get_loaded_object_entry_index(const void * loadedObject) +uint8_t object_manager_get_loaded_object_entry_index(const void * loadedObject) { auto objectManager = OpenRCT2::GetContext()->GetObjectManager(); const Object * object = static_cast(loadedObject); - uint8 entryIndex = objectManager->GetLoadedObjectEntryIndex(object); + uint8_t entryIndex = objectManager->GetLoadedObjectEntryIndex(object); return entryIndex; } diff --git a/src/openrct2/object/ObjectManager.h b/src/openrct2/object/ObjectManager.h index 7ed0e55f96..112d4707b1 100644 --- a/src/openrct2/object/ObjectManager.h +++ b/src/openrct2/object/ObjectManager.h @@ -22,9 +22,9 @@ interface IObjectManager virtual ~IObjectManager() { } virtual Object * GetLoadedObject(size_t index) abstract; - virtual Object * GetLoadedObject(sint32 objectType, size_t index) abstract; + virtual Object * GetLoadedObject(int32_t objectType, size_t index) abstract; virtual Object * GetLoadedObject(const rct_object_entry * entry) abstract; - virtual uint8 GetLoadedObjectEntryIndex(const Object * object) abstract; + virtual uint8_t GetLoadedObjectEntryIndex(const Object * object) abstract; virtual std::vector GetInvalidObjects(const rct_object_entry * entries) abstract; virtual Object * LoadObject(const rct_object_entry * entry) abstract; @@ -42,7 +42,7 @@ std::unique_ptr CreateObjectManager(std::shared_ptr { private: - static constexpr uint32 MAGIC_NUMBER = 0x5844494F; // OIDX - static constexpr uint16 VERSION = 17; + static constexpr uint32_t MAGIC_NUMBER = 0x5844494F; // OIDX + static constexpr uint16_t VERSION = 17; static constexpr auto PATTERN = "*.dat;*.pob;*.json;*.parkobj"; IObjectRepository& _objectRepository; @@ -92,7 +92,7 @@ public: } public: - std::tuple Create([[maybe_unused]] sint32 language, const std::string& path) const override + std::tuple Create([[maybe_unused]] int32_t language, const std::string& path) const override { Object * object = nullptr; auto extension = Path::GetExtension(path); @@ -130,19 +130,19 @@ protected: switch (object_entry_get_type(&item.ObjectEntry)) { case OBJECT_TYPE_RIDE: - stream->WriteValue(item.RideInfo.RideFlags); - for (sint32 i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) + stream->WriteValue(item.RideInfo.RideFlags); + for (int32_t i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) { - stream->WriteValue(item.RideInfo.RideCategory[i]); + stream->WriteValue(item.RideInfo.RideCategory[i]); } - for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) + for (int32_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { - stream->WriteValue(item.RideInfo.RideType[i]); + stream->WriteValue(item.RideInfo.RideType[i]); } - stream->WriteValue(item.RideInfo.RideGroupIndex); + stream->WriteValue(item.RideInfo.RideGroupIndex); break; case OBJECT_TYPE_SCENERY_GROUP: - stream->WriteValue((uint16)item.SceneryGroupInfo.Entries.size()); + stream->WriteValue((uint16_t)item.SceneryGroupInfo.Entries.size()); for (const auto& entry : item.SceneryGroupInfo.Entries) { stream->WriteValue(entry); @@ -161,20 +161,20 @@ protected: switch (object_entry_get_type(&item.ObjectEntry)) { case OBJECT_TYPE_RIDE: - item.RideInfo.RideFlags = stream->ReadValue(); - for (sint32 i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) + item.RideInfo.RideFlags = stream->ReadValue(); + for (int32_t i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) { - item.RideInfo.RideCategory[i] = stream->ReadValue(); + item.RideInfo.RideCategory[i] = stream->ReadValue(); } - for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) + for (int32_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { - item.RideInfo.RideType[i] = stream->ReadValue(); + item.RideInfo.RideType[i] = stream->ReadValue(); } - item.RideInfo.RideGroupIndex = stream->ReadValue(); + item.RideInfo.RideGroupIndex = stream->ReadValue(); break; case OBJECT_TYPE_SCENERY_GROUP: { - auto numEntries = stream->ReadValue(); + auto numEntries = stream->ReadValue(); item.SceneryGroupInfo.Entries = std::vector(numEntries); for (size_t i = 0; i < numEntries; i++) { @@ -214,7 +214,7 @@ public: ClearItems(); } - void LoadOrConstruct(sint32 language) override + void LoadOrConstruct(int32_t language) override { ClearItems(); auto items = _fileIndex.LoadOrBuild(language); @@ -222,7 +222,7 @@ public: SortItems(); } - void Construct(sint32 language) override + void Construct(int32_t language) override { auto items = _fileIndex.Rebuild(language); AddItems(items); @@ -450,7 +450,7 @@ private: { if (fixChecksum) { - uint32 realChecksum = object_calculate_checksum(entry, data, dataSize); + uint32_t realChecksum = object_calculate_checksum(entry, data, dataSize); if (realChecksum != entry->checksum) { char objectName[9]; @@ -464,14 +464,14 @@ private: // Create new data blob with appended bytes size_t newDataSize = dataSize + extraBytesCount; - uint8 * newData = Memory::Allocate(newDataSize); - uint8 * newDataSaltOffset = newData + dataSize; - std::copy_n((const uint8 *)data, dataSize, newData); - std::copy_n((const uint8 *)extraBytes, extraBytesCount, newDataSaltOffset); + uint8_t * newData = Memory::Allocate(newDataSize); + uint8_t * newDataSaltOffset = newData + dataSize; + std::copy_n((const uint8_t *)data, dataSize, newData); + std::copy_n((const uint8_t *)extraBytes, extraBytesCount, newDataSaltOffset); try { - uint32 newRealChecksum = object_calculate_checksum(entry, newData, newDataSize); + uint32_t newRealChecksum = object_calculate_checksum(entry, newData, newDataSize); if (newRealChecksum != entry->checksum) { Console::Error::WriteLine("CalculateExtraBytesToFixChecksum failed to fix checksum."); @@ -498,12 +498,12 @@ private: } // Encode data - uint8 objectType = object_entry_get_type(entry); + uint8_t objectType = object_entry_get_type(entry); sawyercoding_chunk_header chunkHeader; chunkHeader.encoding = object_entry_group_encoding[objectType]; - chunkHeader.length = (uint32)dataSize; - uint8 * encodedDataBuffer = Memory::Allocate(0x600000); - size_t encodedDataSize = sawyercoding_write_chunk_buffer(encodedDataBuffer, (uint8 *)data, chunkHeader); + chunkHeader.length = (uint32_t)dataSize; + uint8_t * encodedDataBuffer = Memory::Allocate(0x600000); + size_t encodedDataSize = sawyercoding_write_chunk_buffer(encodedDataBuffer, (uint8_t *)data, chunkHeader); // Save to file try @@ -521,15 +521,15 @@ private: } } - static void * CalculateExtraBytesToFixChecksum(sint32 currentChecksum, sint32 targetChecksum, size_t * outSize) + static void * CalculateExtraBytesToFixChecksum(int32_t currentChecksum, int32_t targetChecksum, size_t * outSize) { // Allocate 11 extra bytes to manipulate the checksum - uint8 * salt = Memory::Allocate(11); + uint8_t * salt = Memory::Allocate(11); if (outSize != nullptr) *outSize = 11; // Next work out which bits need to be flipped to make the current checksum match the one in the file // The bitwise rotation compensates for the rotation performed during the checksum calculation*/ - sint32 bitsToFlip = targetChecksum ^ ((currentChecksum << 25) | (currentChecksum >> 7)); + int32_t bitsToFlip = targetChecksum ^ ((currentChecksum << 25) | (currentChecksum >> 7)); // Each set bit encountered during encoding flips one bit of the resulting checksum (so each bit of the checksum is an // XOR of bits from the file). Here, we take each bit that should be flipped in the checksum and set one of the bits in @@ -553,7 +553,7 @@ private: void GetPathForNewObject(utf8 * buffer, size_t bufferSize, const char * name) { char normalisedName[9] = { 0 }; - for (sint32 i = 0; i < 8; i++) + for (int32_t i = 0; i < 8; i++) { if (name[i] != ' ') { @@ -572,7 +572,7 @@ private: Path::Append(buffer, bufferSize, normalisedName); String::Append(buffer, bufferSize, ".DAT"); - uint32 counter = 2; + uint32_t counter = 2; for (; platform_file_exists(buffer);) { utf8 counterString[8]; @@ -737,7 +737,7 @@ void object_delete(void * object) } } -void object_draw_preview(const void * object, rct_drawpixelinfo * dpi, sint32 width, sint32 height) +void object_draw_preview(const void * object, rct_drawpixelinfo * dpi, int32_t width, int32_t height) { const Object * baseObject = static_cast(object); baseObject->DrawPreview(dpi, width, height); @@ -752,7 +752,7 @@ bool object_entry_compare(const rct_object_entry * a, const rct_object_entry * b { return false; } - sint32 match = memcmp(a->name, b->name, 8); + int32_t match = memcmp(a->name, b->name, 8); if (match) { return false; @@ -764,7 +764,7 @@ bool object_entry_compare(const rct_object_entry * a, const rct_object_entry * b { return false; } - sint32 match = memcmp(a->name, b->name, 8); + int32_t match = memcmp(a->name, b->name, 8); if (match) { return false; @@ -777,20 +777,20 @@ bool object_entry_compare(const rct_object_entry * a, const rct_object_entry * b return true; } -sint32 object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength) +int32_t object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength) { - const uint8 * entryBytePtr = (uint8 *)entry; + const uint8_t * entryBytePtr = (uint8_t *)entry; - uint32 checksum = 0xF369A75B; + uint32_t checksum = 0xF369A75B; checksum ^= entryBytePtr[0]; checksum = rol32(checksum, 11); - for (sint32 i = 4; i < 12; i++) + for (int32_t i = 4; i < 12; i++) { checksum ^= entryBytePtr[i]; checksum = rol32(checksum, 11); } - uint8 * dataBytes = (uint8 *)data; + uint8_t * dataBytes = (uint8_t *)data; const size_t dataLength32 = dataLength - (dataLength & 31); for (size_t i = 0; i < 32; i++) { @@ -806,5 +806,5 @@ sint32 object_calculate_checksum(const rct_object_entry * entry, const void * da checksum = rol32(checksum, 11); } - return (sint32)checksum; + return (int32_t)checksum; } diff --git a/src/openrct2/object/ObjectRepository.h b/src/openrct2/object/ObjectRepository.h index f9cd893f14..2e71d7b970 100644 --- a/src/openrct2/object/ObjectRepository.h +++ b/src/openrct2/object/ObjectRepository.h @@ -38,10 +38,10 @@ struct ObjectRepositoryItem Object * LoadedObject{}; struct { - uint8 RideFlags; - uint8 RideCategory[MAX_CATEGORIES_PER_RIDE]; - uint8 RideType[MAX_RIDE_TYPES_PER_RIDE_ENTRY]; - uint8 RideGroupIndex; + uint8_t RideFlags; + uint8_t RideCategory[MAX_CATEGORIES_PER_RIDE]; + uint8_t RideType[MAX_RIDE_TYPES_PER_RIDE_ENTRY]; + uint8_t RideGroupIndex; } RideInfo; struct { @@ -53,8 +53,8 @@ interface IObjectRepository { virtual ~IObjectRepository() = default; - virtual void LoadOrConstruct(sint32 language) abstract; - virtual void Construct(sint32 language) abstract; + virtual void LoadOrConstruct(int32_t language) abstract; + virtual void Construct(int32_t language) abstract; virtual size_t GetNumObjects() const abstract; virtual const ObjectRepositoryItem * GetObjects() const abstract; virtual const ObjectRepositoryItem * FindObject(const utf8 * name) const abstract; @@ -83,4 +83,4 @@ const ObjectRepositoryItem * object_repository_find_object_by_name(const char void * object_repository_load_object(const rct_object_entry * objectEntry); void object_delete(void * object); -void object_draw_preview(const void * object, rct_drawpixelinfo * dpi, sint32 width, sint32 height); +void object_draw_preview(const void * object, rct_drawpixelinfo * dpi, int32_t width, int32_t height); diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index f0831faaa4..f47a5f56c4 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -33,45 +33,45 @@ using namespace OpenRCT2; void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(8, STREAM_SEEK_CURRENT); - _legacyType.flags = stream->ReadValue(); + _legacyType.flags = stream->ReadValue(); for (auto &rideType : _legacyType.ride_type) { - rideType = stream->ReadValue(); + rideType = stream->ReadValue(); } - _legacyType.min_cars_in_train = stream->ReadValue(); - _legacyType.max_cars_in_train = stream->ReadValue(); - _legacyType.cars_per_flat_ride = stream->ReadValue(); - _legacyType.zero_cars = stream->ReadValue(); - _legacyType.tab_vehicle = stream->ReadValue(); - _legacyType.default_vehicle = stream->ReadValue(); - _legacyType.front_vehicle = stream->ReadValue(); - _legacyType.second_vehicle = stream->ReadValue(); - _legacyType.rear_vehicle = stream->ReadValue(); - _legacyType.third_vehicle = stream->ReadValue(); - _legacyType.pad_019 = stream->ReadValue(); + _legacyType.min_cars_in_train = stream->ReadValue(); + _legacyType.max_cars_in_train = stream->ReadValue(); + _legacyType.cars_per_flat_ride = stream->ReadValue(); + _legacyType.zero_cars = stream->ReadValue(); + _legacyType.tab_vehicle = stream->ReadValue(); + _legacyType.default_vehicle = stream->ReadValue(); + _legacyType.front_vehicle = stream->ReadValue(); + _legacyType.second_vehicle = stream->ReadValue(); + _legacyType.rear_vehicle = stream->ReadValue(); + _legacyType.third_vehicle = stream->ReadValue(); + _legacyType.pad_019 = stream->ReadValue(); for (auto &vehicleEntry : _legacyType.vehicles) { ReadLegacyVehicle(context, stream, &vehicleEntry); } stream->Seek(4, STREAM_SEEK_CURRENT); - _legacyType.excitement_multiplier = stream->ReadValue(); - _legacyType.intensity_multiplier = stream->ReadValue(); - _legacyType.nausea_multiplier = stream->ReadValue(); - _legacyType.max_height = stream->ReadValue(); - _legacyType.enabledTrackPieces = stream->ReadValue(); - _legacyType.category[0] = stream->ReadValue(); - _legacyType.category[1] = stream->ReadValue(); - _legacyType.shop_item = stream->ReadValue(); - _legacyType.shop_item_secondary = stream->ReadValue(); + _legacyType.excitement_multiplier = stream->ReadValue(); + _legacyType.intensity_multiplier = stream->ReadValue(); + _legacyType.nausea_multiplier = stream->ReadValue(); + _legacyType.max_height = stream->ReadValue(); + _legacyType.enabledTrackPieces = stream->ReadValue(); + _legacyType.category[0] = stream->ReadValue(); + _legacyType.category[1] = stream->ReadValue(); + _legacyType.shop_item = stream->ReadValue(); + _legacyType.shop_item_secondary = stream->ReadValue(); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); GetStringTable().Read(context, stream, OBJ_STRING_ID_DESCRIPTION); GetStringTable().Read(context, stream, OBJ_STRING_ID_CAPACITY); // Read preset colours, by default there are 32 - _presetColours.count = stream->ReadValue(); + _presetColours.count = stream->ReadValue(); - sint32 coloursCount = _presetColours.count; + int32_t coloursCount = _presetColours.count; // To indicate a ride has different colours each train the count // is set to 255. There are only actually 32 colours though. if (coloursCount == 255) @@ -79,26 +79,26 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream) coloursCount = 32; } - for (uint8 i = 0; i < coloursCount; i++) + for (uint8_t i = 0; i < coloursCount; i++) { _presetColours.list[i] = stream->ReadValue(); } // Read peep loading positions - for (sint32 i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE_ENTRY; i++) + for (int32_t i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE_ENTRY; i++) { _peepLoadingWaypoints[i].clear(); _peepLoadingPositions[i].clear(); - uint16 numPeepLoadingPositions = stream->ReadValue(); + uint16_t numPeepLoadingPositions = stream->ReadValue(); if (numPeepLoadingPositions == 255) { - numPeepLoadingPositions = stream->ReadValue(); + numPeepLoadingPositions = stream->ReadValue(); } if (_legacyType.vehicles[i].flags & VEHICLE_ENTRY_FLAG_LOADING_WAYPOINTS) { - _legacyType.vehicles[i].peep_loading_waypoint_segments = stream->ReadValue() == 0 ? 0 : 4; + _legacyType.vehicles[i].peep_loading_waypoint_segments = stream->ReadValue() == 0 ? 0 : 4; if (_legacyType.ride_type[0] == RIDE_TYPE_ENTERPRISE) { _legacyType.vehicles[i].peep_loading_waypoint_segments = 8; @@ -106,16 +106,16 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream) Guard::Assert(((numPeepLoadingPositions - 1) % 8) == 0, "Malformed peep loading positions"); - for (sint32 j = 1; j < numPeepLoadingPositions; j += 4 * 2) + for (int32_t j = 1; j < numPeepLoadingPositions; j += 4 * 2) { std::array entry; - entry[0].x = stream->ReadValue(); - entry[0].y = stream->ReadValue(); - entry[1].x = stream->ReadValue(); - entry[1].y = stream->ReadValue(); - entry[2].x = stream->ReadValue(); - entry[2].y = stream->ReadValue(); - stream->ReadValue(); // Skip blanks + entry[0].x = stream->ReadValue(); + entry[0].y = stream->ReadValue(); + entry[1].x = stream->ReadValue(); + entry[1].y = stream->ReadValue(); + entry[2].x = stream->ReadValue(); + entry[2].y = stream->ReadValue(); + stream->ReadValue(); // Skip blanks _peepLoadingWaypoints[i].push_back(entry); } @@ -124,8 +124,8 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { _legacyType.vehicles[i].peep_loading_waypoint_segments = 0; - auto data = stream->ReadArray(numPeepLoadingPositions); - _peepLoadingPositions[i] = std::vector(data, data + numPeepLoadingPositions); + auto data = stream->ReadArray(numPeepLoadingPositions); + _peepLoadingPositions[i] = std::vector(data, data + numPeepLoadingPositions); Memory::Free(data); } } @@ -158,8 +158,8 @@ void RideObject::Load() _legacyType.images_offset = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.vehicle_preset_list = &_presetColours; - sint32 cur_vehicle_images_offset = _legacyType.images_offset + MAX_RIDE_TYPES_PER_RIDE_ENTRY; - for (sint32 i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE_ENTRY; i++) + int32_t cur_vehicle_images_offset = _legacyType.images_offset + MAX_RIDE_TYPES_PER_RIDE_ENTRY; + for (int32_t i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE_ENTRY; i++) { rct_ride_entry_vehicle * vehicleEntry = &_legacyType.vehicles[i]; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT) @@ -171,11 +171,11 @@ void RideObject::Load() // 0x6DE946 vehicleEntry->base_num_frames = CalculateNumVerticalFrames(vehicleEntry) * CalculateNumHorizontalFrames(vehicleEntry); vehicleEntry->base_image_id = cur_vehicle_images_offset; - sint32 image_index = vehicleEntry->base_image_id; + int32_t image_index = vehicleEntry->base_image_id; if (vehicleEntry->car_visual != VEHICLE_VISUAL_RIVER_RAPIDS) { - sint32 b = vehicleEntry->base_num_frames * 32; + int32_t b = vehicleEntry->base_num_frames * 32; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_11) b /= 2; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_15) b /= 8; @@ -299,7 +299,7 @@ void RideObject::Load() if (!(vehicleEntry->flags & VEHICLE_ENTRY_FLAG_10)) { - sint32 num_images = cur_vehicle_images_offset - vehicleEntry->base_image_id; + int32_t num_images = cur_vehicle_images_offset - vehicleEntry->base_image_id; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_13) { num_images *= 2; @@ -336,9 +336,9 @@ void RideObject::Unload() _legacyType.images_offset = 0; } -void RideObject::DrawPreview(rct_drawpixelinfo* dpi, [[maybe_unused]] sint32 width, [[maybe_unused]] sint32 height) const +void RideObject::DrawPreview(rct_drawpixelinfo* dpi, [[maybe_unused]] int32_t width, [[maybe_unused]] int32_t height) const { - uint32 imageId = _legacyType.images_offset; + uint32_t imageId = _legacyType.images_offset; for (auto rideType : _legacyType.ride_type) { @@ -363,30 +363,30 @@ std::string RideObject::GetCapacity() const void RideObject::SetRepositoryItem(ObjectRepositoryItem * item) const { - for (sint32 i = 0; i < RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) + for (int32_t i = 0; i < RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { item->RideInfo.RideType[i] = _legacyType.ride_type[i]; } - for (sint32 i = 0; i < RCT2_MAX_CATEGORIES_PER_RIDE; i++) + for (int32_t i = 0; i < RCT2_MAX_CATEGORIES_PER_RIDE; i++) { item->RideInfo.RideCategory[i] = _legacyType.category[i]; } - uint8 flags = 0; + uint8_t flags = 0; item->RideInfo.RideFlags = flags; // Find the first non-null ride type, to be used when checking the ride group - uint8 rideTypeIdx = ride_entry_get_first_non_null_ride_type(&_legacyType); + uint8_t rideTypeIdx = ride_entry_get_first_non_null_ride_type(&_legacyType); // Determines the ride group. Will fall back to 0 if there is none found. - uint8 rideGroupIndex = 0; + uint8_t rideGroupIndex = 0; const RideGroup * rideGroup = RideGroupManager::GetRideGroup(rideTypeIdx, &_legacyType); // If the ride group is nullptr, the track type does not have ride groups. if (rideGroup != nullptr) { - for (uint8 i = rideGroupIndex + 1; i < MAX_RIDE_GROUPS_PER_RIDE_TYPE; i++) + for (uint8_t i = rideGroupIndex + 1; i < MAX_RIDE_GROUPS_PER_RIDE_TYPE; i++) { const RideGroup * irg = RideGroupManager::RideGroupFind(rideTypeIdx, i); @@ -407,40 +407,40 @@ void RideObject::SetRepositoryItem(ObjectRepositoryItem * item) const void RideObject::ReadLegacyVehicle( [[maybe_unused]] IReadObjectContext* context, IStream* stream, rct_ride_entry_vehicle* vehicle) { - vehicle->rotation_frame_mask = stream->ReadValue(); + vehicle->rotation_frame_mask = stream->ReadValue(); stream->Seek(2 * 1, STREAM_SEEK_CURRENT); - vehicle->spacing = stream->ReadValue(); - vehicle->car_mass = stream->ReadValue(); - vehicle->tab_height = stream->ReadValue(); - vehicle->num_seats = stream->ReadValue(); - vehicle->sprite_flags = stream->ReadValue(); - vehicle->sprite_width = stream->ReadValue(); - vehicle->sprite_height_negative = stream->ReadValue(); - vehicle->sprite_height_positive = stream->ReadValue(); - vehicle->animation = stream->ReadValue(); - vehicle->flags = stream->ReadValue(); - vehicle->base_num_frames = stream->ReadValue(); + vehicle->spacing = stream->ReadValue(); + vehicle->car_mass = stream->ReadValue(); + vehicle->tab_height = stream->ReadValue(); + vehicle->num_seats = stream->ReadValue(); + vehicle->sprite_flags = stream->ReadValue(); + vehicle->sprite_width = stream->ReadValue(); + vehicle->sprite_height_negative = stream->ReadValue(); + vehicle->sprite_height_positive = stream->ReadValue(); + vehicle->animation = stream->ReadValue(); + vehicle->flags = stream->ReadValue(); + vehicle->base_num_frames = stream->ReadValue(); stream->Seek(15 * 4, STREAM_SEEK_CURRENT); - vehicle->no_seating_rows = stream->ReadValue(); - vehicle->spinning_inertia = stream->ReadValue(); - vehicle->spinning_friction = stream->ReadValue(); - vehicle->friction_sound_id = stream->ReadValue(); - vehicle->log_flume_reverser_vehicle_type = stream->ReadValue(); - vehicle->sound_range = stream->ReadValue(); - vehicle->double_sound_frequency = stream->ReadValue(); - vehicle->powered_acceleration = stream->ReadValue(); - vehicle->powered_max_speed = stream->ReadValue(); - vehicle->car_visual = stream->ReadValue(); - vehicle->effect_visual = stream->ReadValue(); - vehicle->draw_order = stream->ReadValue(); - vehicle->num_vertical_frames_override = stream->ReadValue(); + vehicle->no_seating_rows = stream->ReadValue(); + vehicle->spinning_inertia = stream->ReadValue(); + vehicle->spinning_friction = stream->ReadValue(); + vehicle->friction_sound_id = stream->ReadValue(); + vehicle->log_flume_reverser_vehicle_type = stream->ReadValue(); + vehicle->sound_range = stream->ReadValue(); + vehicle->double_sound_frequency = stream->ReadValue(); + vehicle->powered_acceleration = stream->ReadValue(); + vehicle->powered_max_speed = stream->ReadValue(); + vehicle->car_visual = stream->ReadValue(); + vehicle->effect_visual = stream->ReadValue(); + vehicle->draw_order = stream->ReadValue(); + vehicle->num_vertical_frames_override = stream->ReadValue(); stream->Seek(4, STREAM_SEEK_CURRENT); } -uint8 RideObject::CalculateNumVerticalFrames(const rct_ride_entry_vehicle * vehicleEntry) +uint8_t RideObject::CalculateNumVerticalFrames(const rct_ride_entry_vehicle * vehicleEntry) { // 0x6DE90B - uint8 numVerticalFrames; + uint8_t numVerticalFrames; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES) { numVerticalFrames = vehicleEntry->num_vertical_frames_override; @@ -474,9 +474,9 @@ uint8 RideObject::CalculateNumVerticalFrames(const rct_ride_entry_vehicle * vehi return numVerticalFrames; } -uint8 RideObject::CalculateNumHorizontalFrames(const rct_ride_entry_vehicle * vehicleEntry) +uint8_t RideObject::CalculateNumHorizontalFrames(const rct_ride_entry_vehicle * vehicleEntry) { - uint8 numHorizontalFrames; + uint8_t numHorizontalFrames; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SWINGING) { if (!(vehicleEntry->flags & VEHICLE_ENTRY_FLAG_21) && !(vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SLIDE_SWING)) @@ -514,7 +514,7 @@ void RideObject::ReadJson(IReadObjectContext * context, const json_t * root) auto rideTypes = ObjectJsonHelpers::GetJsonStringArray(json_object_get(properties, "type")); for (size_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { - uint8 rideType = RIDE_TYPE_NULL; + uint8_t rideType = RIDE_TYPE_NULL; if (i < rideTypes.size()) { rideType = ParseRideType(rideTypes[i]); @@ -620,7 +620,7 @@ void RideObject::ReadJson(IReadObjectContext * context, const json_t * root) _presetColours = ReadJsonCarColours(json_object_get(properties, "carColours")); } - _legacyType.flags |= ObjectJsonHelpers::GetFlags(properties, { + _legacyType.flags |= ObjectJsonHelpers::GetFlags(properties, { { "noInversions", RIDE_ENTRY_FLAG_NO_INVERSIONS }, { "noBanking", RIDE_ENTRY_FLAG_NO_BANKED_TRACK }, { "playDepartSound", RIDE_ENTRY_FLAG_PLAY_DEPART_SOUND }, @@ -785,8 +785,8 @@ rct_ride_entry_vehicle RideObject::ReadJsonCar(const json_t * jCar) { if (json_is_array(waypoint) && json_array_size(waypoint) >= 2) { - auto x = (sint8)json_integer_value(json_array_get(waypoint, 0)); - auto y = (sint8)json_integer_value(json_array_get(waypoint, 1)); + auto x = (int8_t)json_integer_value(json_array_get(waypoint, 0)); + auto y = (int8_t)json_integer_value(json_array_get(waypoint, 1)); entry[j] = { x, y }; } } @@ -797,7 +797,7 @@ rct_ride_entry_vehicle RideObject::ReadJsonCar(const json_t * jCar) } auto jFrames = json_object_get(jCar, "frames"); - car.sprite_flags = ObjectJsonHelpers::GetFlags(jFrames, { + car.sprite_flags = ObjectJsonHelpers::GetFlags(jFrames, { { "flat", VEHICLE_SPRITE_FLAG_FLAT }, { "gentleSlopes", VEHICLE_SPRITE_FLAG_GENTLE_SLOPES }, { "steepSlopes", VEHICLE_SPRITE_FLAG_STEEP_SLOPES }, @@ -815,7 +815,7 @@ rct_ride_entry_vehicle RideObject::ReadJsonCar(const json_t * jCar) { "curvedLiftHill", VEHICLE_SPRITE_FLAG_CURVED_LIFT_HILL }, { "VEHICLE_SPRITE_FLAG_15", VEHICLE_SPRITE_FLAG_15 } }); - car.flags |= ObjectJsonHelpers::GetFlags(jCar, { + car.flags |= ObjectJsonHelpers::GetFlags(jCar, { { "VEHICLE_ENTRY_FLAG_POWERED_RIDE_UNRESTRICTED_GRAVITY", VEHICLE_ENTRY_FLAG_POWERED_RIDE_UNRESTRICTED_GRAVITY }, { "VEHICLE_ENTRY_FLAG_NO_UPSTOP_WHEELS", VEHICLE_ENTRY_FLAG_NO_UPSTOP_WHEELS }, { "VEHICLE_ENTRY_FLAG_NO_UPSTOP_BOBSLEIGH", VEHICLE_ENTRY_FLAG_NO_UPSTOP_BOBSLEIGH }, @@ -920,7 +920,7 @@ std::vector RideObject::ReadJsonColourConfiguration(const json_t return config; } -bool RideObject::IsRideTypeShopOrFacility(uint8 rideType) +bool RideObject::IsRideTypeShopOrFacility(uint8_t rideType) { switch (rideType) { @@ -937,9 +937,9 @@ bool RideObject::IsRideTypeShopOrFacility(uint8 rideType) } } -uint8 RideObject::ParseRideType(const std::string &s) +uint8_t RideObject::ParseRideType(const std::string &s) { - static const std::unordered_map LookupTable + static const std::unordered_map LookupTable { { "spiral_rc", RIDE_TYPE_SPIRAL_ROLLER_COASTER }, { "stand_up_rc", RIDE_TYPE_STAND_UP_ROLLER_COASTER }, @@ -1027,9 +1027,9 @@ uint8 RideObject::ParseRideType(const std::string &s) RIDE_TYPE_NULL; } -uint8 RideObject::ParseRideCategory(const std::string &s) +uint8_t RideObject::ParseRideCategory(const std::string &s) { - static const std::unordered_map LookupTable + static const std::unordered_map LookupTable { { "transport", RIDE_CATEGORY_TRANSPORT }, { "gentle", RIDE_CATEGORY_GENTLE }, @@ -1044,9 +1044,9 @@ uint8 RideObject::ParseRideCategory(const std::string &s) RIDE_CATEGORY_TRANSPORT; } -uint8 RideObject::ParseShopItem(const std::string &s) +uint8_t RideObject::ParseShopItem(const std::string &s) { - static const std::unordered_map LookupTable + static const std::unordered_map LookupTable { { "burger", SHOP_ITEM_BURGER }, { "chips", SHOP_ITEM_CHIPS }, diff --git a/src/openrct2/object/RideObject.h b/src/openrct2/object/RideObject.h index d3ebacc4d5..840039717d 100644 --- a/src/openrct2/object/RideObject.h +++ b/src/openrct2/object/RideObject.h @@ -18,7 +18,7 @@ class RideObject final : public Object private: rct_ride_entry _legacyType = {}; vehicle_colour_preset_list _presetColours = {}; - std::vector _peepLoadingPositions[MAX_VEHICLES_PER_RIDE_ENTRY]; + std::vector _peepLoadingPositions[MAX_VEHICLES_PER_RIDE_ENTRY]; std::vector > _peepLoadingWaypoints[MAX_VEHICLES_PER_RIDE_ENTRY]; public: @@ -31,7 +31,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; std::string GetDescription() const; std::string GetCapacity() const; @@ -47,12 +47,12 @@ private: vehicle_colour_preset_list ReadJsonCarColours(const json_t * jCarColours); std::vector ReadJsonColourConfiguration(const json_t * jColourConfig); - static uint8 CalculateNumVerticalFrames(const rct_ride_entry_vehicle * vehicleEntry); - static uint8 CalculateNumHorizontalFrames(const rct_ride_entry_vehicle * vehicleEntry); + static uint8_t CalculateNumVerticalFrames(const rct_ride_entry_vehicle * vehicleEntry); + static uint8_t CalculateNumHorizontalFrames(const rct_ride_entry_vehicle * vehicleEntry); - static bool IsRideTypeShopOrFacility(uint8 rideType); - static uint8 ParseRideType(const std::string &s); - static uint8 ParseRideCategory(const std::string &s); - static uint8 ParseShopItem(const std::string &s); + static bool IsRideTypeShopOrFacility(uint8_t rideType); + static uint8_t ParseRideType(const std::string &s); + static uint8_t ParseRideCategory(const std::string &s); + static uint8_t ParseShopItem(const std::string &s); static colour_t ParseColour(const std::string &s); }; diff --git a/src/openrct2/object/SceneryGroupObject.cpp b/src/openrct2/object/SceneryGroupObject.cpp index 0bc8f07131..821e04ecfa 100644 --- a/src/openrct2/object/SceneryGroupObject.cpp +++ b/src/openrct2/object/SceneryGroupObject.cpp @@ -28,11 +28,11 @@ void SceneryGroupObject::ReadLegacy(IReadObjectContext * context, IStream * stre { stream->Seek(6, STREAM_SEEK_CURRENT); stream->Seek(0x80 * 2, STREAM_SEEK_CURRENT); - _legacyType.entry_count = stream->ReadValue(); - _legacyType.pad_107 = stream->ReadValue(); - _legacyType.priority = stream->ReadValue(); - _legacyType.pad_109 = stream->ReadValue(); - _legacyType.entertainer_costumes = stream->ReadValue(); + _legacyType.entry_count = stream->ReadValue(); + _legacyType.pad_107 = stream->ReadValue(); + _legacyType.priority = stream->ReadValue(); + _legacyType.pad_109 = stream->ReadValue(); + _legacyType.entertainer_costumes = stream->ReadValue(); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); _items = ReadItems(stream); @@ -56,12 +56,12 @@ void SceneryGroupObject::Unload() _legacyType.image = 0; } -void SceneryGroupObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void SceneryGroupObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; - uint32 imageId = _legacyType.image + 0x20600001; + uint32_t imageId = _legacyType.image + 0x20600001; gfx_draw_sprite(dpi, imageId, x - 15, y - 14, 0); } @@ -78,7 +78,7 @@ void SceneryGroupObject::UpdateEntryIndexes() if (ori == nullptr) continue; if (ori->LoadedObject == nullptr) continue; - uint16 sceneryEntry = objectManager->GetLoadedObjectEntryIndex(ori->LoadedObject); + uint16_t sceneryEntry = objectManager->GetLoadedObjectEntryIndex(ori->LoadedObject); Guard::Assert(sceneryEntry != UINT8_MAX, GUARD_LINE); auto objectType = ori->ObjectEntry.flags & 0x0F; @@ -106,7 +106,7 @@ void SceneryGroupObject::SetRepositoryItem(ObjectRepositoryItem * item) const std::vector SceneryGroupObject::ReadItems(IStream * stream) { auto items = std::vector(); - while (stream->ReadValue() != 0xFF) + while (stream->ReadValue() != 0xFF) { stream->Seek(-1, STREAM_SEEK_CURRENT); auto entry = stream->ReadValue(); @@ -137,9 +137,9 @@ void SceneryGroupObject::ReadJson(IReadObjectContext * context, const json_t * r ObjectJsonHelpers::LoadImages(context, root, GetImageTable()); } -uint32 SceneryGroupObject::ReadJsonEntertainerCostumes(const json_t * jCostumes) +uint32_t SceneryGroupObject::ReadJsonEntertainerCostumes(const json_t * jCostumes) { - uint32 costumes = 0; + uint32_t costumes = 0; auto szCostumes = ObjectJsonHelpers::GetJsonStringArray(jCostumes); for (const auto& szCostume : szCostumes) { @@ -152,7 +152,7 @@ uint32 SceneryGroupObject::ReadJsonEntertainerCostumes(const json_t * jCostumes) return costumes; } -uint32 SceneryGroupObject::ParseEntertainerCostume(const std::string &s) +uint32_t SceneryGroupObject::ParseEntertainerCostume(const std::string &s) { if (s == "panda") return ENTERTAINER_COSTUME_PANDA; if (s == "tiger") return ENTERTAINER_COSTUME_TIGER; diff --git a/src/openrct2/object/SceneryGroupObject.h b/src/openrct2/object/SceneryGroupObject.h index c331405a00..2053bd5a13 100644 --- a/src/openrct2/object/SceneryGroupObject.h +++ b/src/openrct2/object/SceneryGroupObject.h @@ -32,13 +32,13 @@ public: void Unload() override; void UpdateEntryIndexes(); - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; void SetRepositoryItem(ObjectRepositoryItem * item) const override; private: static std::vector ReadItems(IStream * stream); - static uint32 ReadJsonEntertainerCostumes(const json_t * jCostumes); - static uint32 ParseEntertainerCostume(const std::string &s); + static uint32_t ReadJsonEntertainerCostumes(const json_t * jCostumes); + static uint32_t ParseEntertainerCostume(const std::string &s); static std::vector ReadJsonEntries(const json_t * jEntries); }; diff --git a/src/openrct2/object/SmallSceneryObject.cpp b/src/openrct2/object/SmallSceneryObject.cpp index 0cfb8791f6..f2ac456a91 100644 --- a/src/openrct2/object/SmallSceneryObject.cpp +++ b/src/openrct2/object/SmallSceneryObject.cpp @@ -24,15 +24,15 @@ void SmallSceneryObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.small_scenery.flags = stream->ReadValue(); - _legacyType.small_scenery.height = stream->ReadValue(); - _legacyType.small_scenery.tool_id = stream->ReadValue(); - _legacyType.small_scenery.price = stream->ReadValue(); - _legacyType.small_scenery.removal_price = stream->ReadValue(); + _legacyType.small_scenery.flags = stream->ReadValue(); + _legacyType.small_scenery.height = stream->ReadValue(); + _legacyType.small_scenery.tool_id = stream->ReadValue(); + _legacyType.small_scenery.price = stream->ReadValue(); + _legacyType.small_scenery.removal_price = stream->ReadValue(); stream->Seek(4, STREAM_SEEK_CURRENT); - _legacyType.small_scenery.animation_delay = stream->ReadValue(); - _legacyType.small_scenery.animation_mask = stream->ReadValue(); - _legacyType.small_scenery.num_frames = stream->ReadValue(); + _legacyType.small_scenery.animation_delay = stream->ReadValue(); + _legacyType.small_scenery.animation_mask = stream->ReadValue(); + _legacyType.small_scenery.num_frames = stream->ReadValue(); _legacyType.small_scenery.scenery_tab_id = 0xFF; GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); @@ -88,9 +88,9 @@ void SmallSceneryObject::Unload() _legacyType.image = 0; } -void SmallSceneryObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void SmallSceneryObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - uint32 imageId = _legacyType.image; + uint32_t imageId = _legacyType.image; if (scenery_small_entry_has_flag(&_legacyType, SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) { imageId |= 0x20D00000; @@ -100,8 +100,8 @@ void SmallSceneryObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint } } - sint32 x = width / 2; - sint32 y = (height / 2) + (_legacyType.small_scenery.height / 2); + int32_t x = width / 2; + int32_t y = (height / 2) + (_legacyType.small_scenery.height / 2); y = std::min(y, height - 16); if ((scenery_small_entry_has_flag(&_legacyType, SMALL_SCENERY_FLAG_FULL_TILE)) && @@ -133,12 +133,12 @@ void SmallSceneryObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint } } -std::vector SmallSceneryObject::ReadFrameOffsets(IStream * stream) +std::vector SmallSceneryObject::ReadFrameOffsets(IStream * stream) { - uint8 frameOffset; - auto data = std::vector(); - data.push_back(stream->ReadValue()); - while ((frameOffset = stream->ReadValue()) != 0xFF) + uint8_t frameOffset; + auto data = std::vector(); + data.push_back(stream->ReadValue()); + while ((frameOffset = stream->ReadValue()) != 0xFF) { data.push_back(frameOffset); } @@ -241,7 +241,7 @@ void SmallSceneryObject::ReadJson(IReadObjectContext * context, const json_t * r _legacyType.small_scenery.num_frames = json_integer_value(json_object_get(properties, "numFrames")); // Flags - _legacyType.small_scenery.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.small_scenery.flags = ObjectJsonHelpers::GetFlags(properties, { { "SMALL_SCENERY_FLAG_VOFFSET_CENTRE", SMALL_SCENERY_FLAG_VOFFSET_CENTRE }, { "requiresFlatSurface", SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE }, { "isRotatable", SMALL_SCENERY_FLAG_ROTATABLE }, @@ -305,9 +305,9 @@ void SmallSceneryObject::ReadJson(IReadObjectContext * context, const json_t * r ObjectJsonHelpers::LoadImages(context, root, GetImageTable()); } -std::vector SmallSceneryObject::ReadJsonFrameOffsets(const json_t * jFrameOffsets) +std::vector SmallSceneryObject::ReadJsonFrameOffsets(const json_t * jFrameOffsets) { - std::vector offsets; + std::vector offsets; size_t index; const json_t * jOffset; json_array_foreach(jFrameOffsets, index, jOffset) diff --git a/src/openrct2/object/SmallSceneryObject.h b/src/openrct2/object/SmallSceneryObject.h index 04a0967515..76f85ef6bf 100644 --- a/src/openrct2/object/SmallSceneryObject.h +++ b/src/openrct2/object/SmallSceneryObject.h @@ -17,7 +17,7 @@ class SmallSceneryObject final : public SceneryObject { private: rct_scenery_entry _legacyType = {}; - std::vector _frameOffsets; + std::vector _frameOffsets; public: explicit SmallSceneryObject(const rct_object_entry &entry) : SceneryObject(entry) { } @@ -29,11 +29,11 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; private: - static std::vector ReadFrameOffsets(IStream * stream); - static std::vector ReadJsonFrameOffsets(const json_t * jFrameOffsets); + static std::vector ReadFrameOffsets(IStream * stream); + static std::vector ReadJsonFrameOffsets(const json_t * jFrameOffsets); void PerformFixes(); rct_object_entry GetScgPiratHeader(); rct_object_entry GetScgMineHeader(); diff --git a/src/openrct2/object/StexObject.cpp b/src/openrct2/object/StexObject.cpp index e9e53d5fa7..eed68c3d44 100644 --- a/src/openrct2/object/StexObject.cpp +++ b/src/openrct2/object/StexObject.cpp @@ -15,7 +15,7 @@ void StexObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.var_06 = stream->ReadValue(); + _legacyType.var_06 = stream->ReadValue(); stream->Seek(1, STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, OBJ_STRING_ID_SCENARIO_NAME); @@ -42,11 +42,11 @@ void StexObject::Unload() _legacyType.details = 0; } -void StexObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void StexObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { // Write (no image) - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; gfx_draw_string_centred(dpi, STR_WINDOW_NO_IMAGE, x, y, COLOUR_BLACK, nullptr); } diff --git a/src/openrct2/object/StexObject.h b/src/openrct2/object/StexObject.h index e0643faa25..7af70a66d7 100644 --- a/src/openrct2/object/StexObject.h +++ b/src/openrct2/object/StexObject.h @@ -27,7 +27,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; std::string GetName() const override; diff --git a/src/openrct2/object/StringTable.cpp b/src/openrct2/object/StringTable.cpp index 86d3106ac7..febc967e6a 100644 --- a/src/openrct2/object/StringTable.cpp +++ b/src/openrct2/object/StringTable.cpp @@ -16,7 +16,7 @@ #include "Object.h" #include "StringTable.h" -static constexpr const uint8 RCT2ToOpenRCT2LanguageId[] = +static constexpr const uint8_t RCT2ToOpenRCT2LanguageId[] = { LANGUAGE_ENGLISH_UK, LANGUAGE_ENGLISH_US, @@ -38,7 +38,7 @@ static bool StringIsBlank(const utf8 * str) { for (auto ch = str; *ch != '\0'; ch++) { - if (!isblank((uint8)*ch)) + if (!isblank((uint8_t)*ch)) { return false; } @@ -46,14 +46,14 @@ static bool StringIsBlank(const utf8 * str) return true; } -void StringTable::Read(IReadObjectContext * context, IStream * stream, uint8 id) +void StringTable::Read(IReadObjectContext * context, IStream * stream, uint8_t id) { try { RCT2LanguageId rct2LanguageId; - while ((rct2LanguageId = (RCT2LanguageId)stream->ReadValue()) != RCT2_LANGUAGE_ID_END) + while ((rct2LanguageId = (RCT2LanguageId)stream->ReadValue()) != RCT2_LANGUAGE_ID_END) { - uint8 languageId = + uint8_t languageId = (rct2LanguageId <= RCT2_LANGUAGE_ID_PORTUGUESE) ? RCT2ToOpenRCT2LanguageId[rct2LanguageId] : LANGUAGE_UNDEFINED; @@ -82,7 +82,7 @@ void StringTable::Read(IReadObjectContext * context, IStream * stream, uint8 id) Sort(); } -std::string StringTable::GetString(uint8 id) const +std::string StringTable::GetString(uint8_t id) const { for (auto &string : _strings) { @@ -94,7 +94,7 @@ std::string StringTable::GetString(uint8 id) const return std::string(); } -std::string StringTable::GetString(uint8 language, uint8 id) const +std::string StringTable::GetString(uint8_t language, uint8_t id) const { for (auto &string : _strings) { @@ -106,7 +106,7 @@ std::string StringTable::GetString(uint8 language, uint8 id) const return std::string(); } -void StringTable::SetString(uint8 id, uint8 language, const std::string &text) +void StringTable::SetString(uint8_t id, uint8_t language, const std::string &text) { StringTableEntry entry; entry.Id = id; diff --git a/src/openrct2/object/StringTable.h b/src/openrct2/object/StringTable.h index b48f0f3717..bbe8be4df9 100644 --- a/src/openrct2/object/StringTable.h +++ b/src/openrct2/object/StringTable.h @@ -17,7 +17,7 @@ interface IReadObjectContext; interface IStream; -enum OBJ_STRING_ID : uint8 +enum OBJ_STRING_ID : uint8_t { OBJ_STRING_ID_UNKNOWN = 255, OBJ_STRING_ID_NAME = 0, @@ -31,8 +31,8 @@ enum OBJ_STRING_ID : uint8 struct StringTableEntry { - uint8 Id = OBJ_STRING_ID_UNKNOWN; - uint8 LanguageId = LANGUAGE_UNDEFINED; + uint8_t Id = OBJ_STRING_ID_UNKNOWN; + uint8_t LanguageId = LANGUAGE_UNDEFINED; std::string Text; }; @@ -46,9 +46,9 @@ public: StringTable(const StringTable &) = delete; StringTable & operator=(const StringTable &) = delete; - void Read(IReadObjectContext * context, IStream * stream, uint8 id); + void Read(IReadObjectContext * context, IStream * stream, uint8_t id); void Sort(); - std::string GetString(uint8 id) const; - std::string GetString(uint8 language, uint8 id) const; - void SetString(uint8 id, uint8 language, const std::string &text); + std::string GetString(uint8_t id) const; + std::string GetString(uint8_t language, uint8_t id) const; + void SetString(uint8_t id, uint8_t language, const std::string &text); }; diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index 889ab3bbb6..0b4ba1e135 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -17,13 +17,13 @@ void WallObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(6, STREAM_SEEK_CURRENT); - _legacyType.wall.tool_id = stream->ReadValue(); - _legacyType.wall.flags = stream->ReadValue(); - _legacyType.wall.height = stream->ReadValue(); - _legacyType.wall.flags2 = stream->ReadValue(); - _legacyType.wall.price = stream->ReadValue(); - _legacyType.wall.scenery_tab_id = stream->ReadValue(); - _legacyType.wall.scrolling_mode = stream->ReadValue(); + _legacyType.wall.tool_id = stream->ReadValue(); + _legacyType.wall.flags = stream->ReadValue(); + _legacyType.wall.height = stream->ReadValue(); + _legacyType.wall.flags2 = stream->ReadValue(); + _legacyType.wall.price = stream->ReadValue(); + _legacyType.wall.scenery_tab_id = stream->ReadValue(); + _legacyType.wall.scrolling_mode = stream->ReadValue(); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); @@ -55,15 +55,15 @@ void WallObject::Unload() _legacyType.image = 0; } -void WallObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void WallObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; x += 14; y += (_legacyType.wall.height * 2) + 16; - uint32 imageId = 0x20D00000 | _legacyType.image; + uint32_t imageId = 0x20D00000 | _legacyType.image; if (_legacyType.wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) { imageId |= 0x92000000; @@ -99,7 +99,7 @@ void WallObject::ReadJson(IReadObjectContext * context, const json_t * root) SetPrimarySceneryGroup(ObjectJsonHelpers::GetString(json_object_get(properties, "sceneryGroup"))); // Flags - _legacyType.wall.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.wall.flags = ObjectJsonHelpers::GetFlags(properties, { { "hasPrimaryColour", WALL_SCENERY_HAS_PRIMARY_COLOUR }, { "hasSecondaryColour", WALL_SCENERY_HAS_SECONDARY_COLOUR }, { "hasTernaryColour", WALL_SCENERY_HAS_TERNARY_COLOUR }, @@ -107,7 +107,7 @@ void WallObject::ReadJson(IReadObjectContext * context, const json_t * root) { "isBanner", WALL_SCENERY_IS_BANNER }, { "isDoor", WALL_SCENERY_IS_DOOR }, { "isLongDoorAnimation", WALL_SCENERY_LONG_DOOR_ANIMATION }}); - _legacyType.wall.flags2 = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.wall.flags2 = ObjectJsonHelpers::GetFlags(properties, { { "isOpaque", WALL_SCENERY_2_IS_OPAQUE }, { "isAnimated", WALL_SCENERY_2_ANIMATED }}); diff --git a/src/openrct2/object/WallObject.h b/src/openrct2/object/WallObject.h index 3c4a794f2d..4a42e44aa3 100644 --- a/src/openrct2/object/WallObject.h +++ b/src/openrct2/object/WallObject.h @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/WaterObject.cpp b/src/openrct2/object/WaterObject.cpp index 9a6826415f..b936277996 100644 --- a/src/openrct2/object/WaterObject.cpp +++ b/src/openrct2/object/WaterObject.cpp @@ -20,7 +20,7 @@ void WaterObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { stream->Seek(14, STREAM_SEEK_CURRENT); - _legacyType.flags = stream->ReadValue(); + _legacyType.flags = stream->ReadValue(); GetStringTable().Read(context, stream, OBJ_STRING_ID_NAME); GetImageTable().Read(context, stream); @@ -45,18 +45,18 @@ void WaterObject::Unload() _legacyType.string_idx = 0; } -void WaterObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const +void WaterObject::DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const { // Write (no image) - sint32 x = width / 2; - sint32 y = height / 2; + int32_t x = width / 2; + int32_t y = height / 2; gfx_draw_string_centred(dpi, STR_WINDOW_NO_IMAGE, x, y, COLOUR_BLACK, nullptr); } void WaterObject::ReadJson([[maybe_unused]] IReadObjectContext* context, const json_t* root) { auto properties = json_object_get(root, "properties"); - _legacyType.flags = ObjectJsonHelpers::GetFlags(properties, { + _legacyType.flags = ObjectJsonHelpers::GetFlags(properties, { { "allowDucks", WATER_FLAGS_ALLOW_DUCKS }}); ObjectJsonHelpers::LoadStrings(root, GetStringTable()); @@ -92,7 +92,7 @@ void WaterObject::ReadJsonPalette(const json_t * jPalette) auto jColours = json_object_get(jPalette, "colours"); auto numColours = json_array_size(jColours); - auto data = std::make_unique(numColours * 3); + auto data = std::make_unique(numColours * 3); size_t dataIndex = 0; size_t index; @@ -112,19 +112,19 @@ void WaterObject::ReadJsonPalette(const json_t * jPalette) rct_g1_element g1 = {}; g1.offset = data.get(); - g1.width = (sint16)numColours; - g1.x_offset = (sint16)paletteStartIndex; + g1.width = (int16_t)numColours; + g1.x_offset = (int16_t)paletteStartIndex; g1.flags = G1_FLAG_PALETTE; auto &imageTable = GetImageTable(); imageTable.AddImage(&g1); } -uint32 WaterObject::ParseColour(const std::string &s) const +uint32_t WaterObject::ParseColour(const std::string &s) const { - uint8 r = 0; - uint8 g = 0; - uint8 b = 0; + uint8_t r = 0; + uint8_t g = 0; + uint8_t b = 0; if (s[0] == '#' && s.size() == 7) { // Expect #RRGGBB diff --git a/src/openrct2/object/WaterObject.h b/src/openrct2/object/WaterObject.h index 6487c83a79..92f8f7f6bb 100644 --- a/src/openrct2/object/WaterObject.h +++ b/src/openrct2/object/WaterObject.h @@ -28,9 +28,9 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const override; + void DrawPreview(rct_drawpixelinfo * dpi, int32_t width, int32_t height) const override; private: void ReadJsonPalette(const json_t * jPalette); - uint32 ParseColour(const std::string &s) const; + uint32_t ParseColour(const std::string &s) const; }; diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 988dbdeb43..f2a6f57e64 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -19,14 +19,14 @@ #include "tile_element/Paint.TileElement.h" // Globals for paint clipping -uint8 gClipHeight = 128; // Default to middle value +uint8_t gClipHeight = 128; // Default to middle value LocationXY8 gClipSelectionA = { 0, 0 }; LocationXY8 gClipSelectionB = { MAXIMUM_MAP_SIZE_TECHNICAL - 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1 }; paint_session gPaintSession; static bool _paintSessionInUse; -static constexpr const uint8 BoundBoxDebugColours[] = +static constexpr const uint8_t BoundBoxDebugColours[] = { 0, // NONE 102, // TERRAIN @@ -48,10 +48,10 @@ bool gPaintBoundingBoxes; bool gPaintBlockedTiles; static void paint_session_init(paint_session * session, rct_drawpixelinfo * dpi); -static void paint_attached_ps(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 viewFlags); -static void paint_ps_image_with_bounding_boxes(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 imageId, sint16 x, sint16 y); -static void paint_ps_image(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 imageId, sint16 x, sint16 y); -static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 viewFlags); +static void paint_attached_ps(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t viewFlags); +static void paint_ps_image_with_bounding_boxes(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t imageId, int16_t x, int16_t y); +static void paint_ps_image(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t imageId, int16_t x, int16_t y); +static uint32_t paint_ps_colourify_image(uint32_t imageId, uint8_t spriteType, uint32_t viewFlags); static void paint_session_init(paint_session * session, rct_drawpixelinfo * dpi) { @@ -64,7 +64,7 @@ static void paint_session_init(paint_session * session, rct_drawpixelinfo * dpi) { quadrant = nullptr; } - session->QuadrantBackIndex = std::numeric_limits::max(); + session->QuadrantBackIndex = std::numeric_limits::max(); session->QuadrantFrontIndex = 0; session->PSStringHead = nullptr; session->LastPSString = nullptr; @@ -73,9 +73,9 @@ static void paint_session_init(paint_session * session, rct_drawpixelinfo * dpi) session->SurfaceElement = nullptr; } -static void paint_session_add_ps_to_quadrant(paint_session * session, paint_struct * ps, sint32 positionHash) +static void paint_session_add_ps_to_quadrant(paint_session * session, paint_struct * ps, int32_t positionHash) { - uint32 paintQuadrantIndex = Math::Clamp(0, positionHash / 32, MAX_PAINT_QUADRANTS - 1); + uint32_t paintQuadrantIndex = Math::Clamp(0, positionHash / 32, MAX_PAINT_QUADRANTS - 1); ps->quadrant_index = paintQuadrantIndex; ps->next_quadrant_ps = session->Quadrants[paintQuadrantIndex]; session->Quadrants[paintQuadrantIndex] = ps; @@ -88,7 +88,7 @@ static void paint_session_add_ps_to_quadrant(paint_session * session, paint_stru * Extracted from 0x0098196c, 0x0098197c, 0x0098198c, 0x0098199c */ static paint_struct * sub_9819_c( - paint_session * session, uint32 image_id, LocationXYZ16 offset, LocationXYZ16 boundBoxSize, LocationXYZ16 boundBoxOffset) + paint_session * session, uint32_t image_id, LocationXYZ16 offset, LocationXYZ16 boundBoxSize, LocationXYZ16 boundBoxOffset) { if (session->NextFreePaintStruct >= session->EndOfPaintStructArray) return nullptr; auto g1 = gfx_get_g1_element(image_id & 0x7FFFF); @@ -123,11 +123,11 @@ static paint_struct * sub_9819_c( ps->x = map.x; ps->y = map.y; - sint32 left = map.x + g1->x_offset; - sint32 bottom = map.y + g1->y_offset; + int32_t left = map.x + g1->x_offset; + int32_t bottom = map.y + g1->y_offset; - sint32 right = left + g1->width; - sint32 top = bottom + g1->height; + int32_t right = left + g1->width; + int32_t top = bottom + g1->height; rct_drawpixelinfo * dpi = session->DPI; @@ -189,12 +189,12 @@ void paint_session_generate(paint_session * session) rct_drawpixelinfo * dpi = session->DPI; LocationXY16 mapTile = { - (sint16)(dpi->x & 0xFFE0), - (sint16)((dpi->y - 16) & 0xFFE0) + (int16_t)(dpi->x & 0xFFE0), + (int16_t)((dpi->y - 16) & 0xFFE0) }; - sint16 half_x = mapTile.x >> 1; - uint16 num_vertical_quadrants = (dpi->height + 2128) >> 5; + int16_t half_x = mapTile.x >> 1; + uint16_t num_vertical_quadrants = (dpi->height + 2128) >> 5; session->CurrentRotation = get_current_rotation(); switch (get_current_rotation()) @@ -343,8 +343,8 @@ template<> bool check_bounding_box<3>(const paint_struct_bound_box& initialBBox, return false; } -template -static paint_struct * paint_arrange_structs_helper_rotation(paint_struct * ps_next, uint16 quadrantIndex, uint8 flag) +template +static paint_struct * paint_arrange_structs_helper_rotation(paint_struct * ps_next, uint16_t quadrantIndex, uint8_t flag) { paint_struct * ps; paint_struct * ps_temp; @@ -420,7 +420,7 @@ static paint_struct * paint_arrange_structs_helper_rotation(paint_struct * ps_ne } } -paint_struct * paint_arrange_structs_helper(paint_struct * ps_next, uint16 quadrantIndex, uint8 flag, uint8 rotation) +paint_struct * paint_arrange_structs_helper(paint_struct * ps_next, uint16_t quadrantIndex, uint8_t flag, uint8_t rotation) { switch (rotation) { @@ -445,8 +445,8 @@ paint_struct paint_session_arrange(paint_session * session) paint_struct psHead = {}; paint_struct * ps = &psHead; ps->next_quadrant_ps = nullptr; - uint32 quadrantIndex = session->QuadrantBackIndex; - const uint8 rotation = get_current_rotation(); + uint32_t quadrantIndex = session->QuadrantBackIndex; + const uint8_t rotation = get_current_rotation(); if (quadrantIndex != UINT32_MAX) { do @@ -480,13 +480,13 @@ paint_struct paint_session_arrange(paint_session * session) * * rct2: 0x00688485 */ -void paint_draw_structs(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 viewFlags) +void paint_draw_structs(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t viewFlags) { paint_struct* previous_ps = ps->next_quadrant_ps; for (ps = ps->next_quadrant_ps; ps;) { - sint16 x = ps->x; - sint16 y = ps->y; + int16_t x = ps->x; + int16_t y = ps->y; if (ps->sprite_type == VIEWPORT_INTERACTION_ITEM_SPRITE) { if (dpi->zoom_level >= 1) @@ -501,7 +501,7 @@ void paint_draw_structs(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 viewF } } - uint32 imageId = paint_ps_colourify_image(ps->image_id, ps->sprite_type, viewFlags); + uint32_t imageId = paint_ps_colourify_image(ps->image_id, ps->sprite_type, viewFlags); if (gPaintBoundingBoxes && dpi->zoom_level == 0) { paint_ps_image_with_bounding_boxes(dpi, ps, imageId, x, y); @@ -530,15 +530,15 @@ void paint_draw_structs(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 viewF * rct2: 0x00688596 * Part of 0x688485 */ -static void paint_attached_ps(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 viewFlags) +static void paint_attached_ps(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t viewFlags) { attached_paint_struct * attached_ps = ps->attached_ps; for (; attached_ps; attached_ps = attached_ps->next) { - sint16 x = attached_ps->x + ps->x; - sint16 y = attached_ps->y + ps->y; + int16_t x = attached_ps->x + ps->x; + int16_t y = attached_ps->y + ps->y; - uint32 imageId = paint_ps_colourify_image(attached_ps->image_id, ps->sprite_type, viewFlags); + uint32_t imageId = paint_ps_colourify_image(attached_ps->image_id, ps->sprite_type, viewFlags); if (attached_ps->flags & PAINT_STRUCT_FLAG_IS_MASKED) { gfx_draw_sprite_raw_masked(dpi, x, y, imageId, attached_ps->colour_image_id); @@ -550,72 +550,72 @@ static void paint_attached_ps(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 } } -static void paint_ps_image_with_bounding_boxes(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 imageId, sint16 x, sint16 y) +static void paint_ps_image_with_bounding_boxes(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t imageId, int16_t x, int16_t y) { - const uint8 colour = BoundBoxDebugColours[ps->sprite_type]; - const uint8 rotation = get_current_rotation(); + const uint8_t colour = BoundBoxDebugColours[ps->sprite_type]; + const uint8_t rotation = get_current_rotation(); const LocationXYZ16 frontTop = { - (sint16)ps->bounds.x_end, - (sint16)ps->bounds.y_end, - (sint16)ps->bounds.z_end + (int16_t)ps->bounds.x_end, + (int16_t)ps->bounds.y_end, + (int16_t)ps->bounds.z_end }; const LocationXY16 screenCoordFrontTop = coordinate_3d_to_2d(&frontTop, rotation); const LocationXYZ16 frontBottom = { - (sint16)ps->bounds.x_end, - (sint16)ps->bounds.y_end, - (sint16)ps->bounds.z + (int16_t)ps->bounds.x_end, + (int16_t)ps->bounds.y_end, + (int16_t)ps->bounds.z }; const LocationXY16 screenCoordFrontBottom = coordinate_3d_to_2d(&frontBottom, rotation); const LocationXYZ16 leftTop = { - (sint16)ps->bounds.x, - (sint16)ps->bounds.y_end, - (sint16)ps->bounds.z_end + (int16_t)ps->bounds.x, + (int16_t)ps->bounds.y_end, + (int16_t)ps->bounds.z_end }; const LocationXY16 screenCoordLeftTop = coordinate_3d_to_2d(&leftTop, rotation); const LocationXYZ16 leftBottom = { - (sint16)ps->bounds.x, - (sint16)ps->bounds.y_end, - (sint16)ps->bounds.z + (int16_t)ps->bounds.x, + (int16_t)ps->bounds.y_end, + (int16_t)ps->bounds.z }; const LocationXY16 screenCoordLeftBottom = coordinate_3d_to_2d(&leftBottom, rotation); const LocationXYZ16 rightTop = { - (sint16)ps->bounds.x_end, - (sint16)ps->bounds.y, - (sint16)ps->bounds.z_end + (int16_t)ps->bounds.x_end, + (int16_t)ps->bounds.y, + (int16_t)ps->bounds.z_end }; const LocationXY16 screenCoordRightTop = coordinate_3d_to_2d(&rightTop, rotation); const LocationXYZ16 rightBottom = { - (sint16)ps->bounds.x_end, - (sint16)ps->bounds.y, - (sint16)ps->bounds.z + (int16_t)ps->bounds.x_end, + (int16_t)ps->bounds.y, + (int16_t)ps->bounds.z }; const LocationXY16 screenCoordRightBottom = coordinate_3d_to_2d(&rightBottom, rotation); const LocationXYZ16 backTop = { - (sint16)ps->bounds.x, - (sint16)ps->bounds.y, - (sint16)ps->bounds.z_end + (int16_t)ps->bounds.x, + (int16_t)ps->bounds.y, + (int16_t)ps->bounds.z_end }; const LocationXY16 screenCoordBackTop = coordinate_3d_to_2d(&backTop, rotation); const LocationXYZ16 backBottom = { - (sint16)ps->bounds.x, - (sint16)ps->bounds.y, - (sint16)ps->bounds.z + (int16_t)ps->bounds.x, + (int16_t)ps->bounds.y, + (int16_t)ps->bounds.z }; const LocationXY16 screenCoordBackBottom = coordinate_3d_to_2d(&backBottom, rotation); @@ -644,7 +644,7 @@ static void paint_ps_image_with_bounding_boxes(rct_drawpixelinfo * dpi, paint_st gfx_draw_line(dpi, screenCoordFrontTop.x, screenCoordFrontTop.y, screenCoordRightTop.x, screenCoordRightTop.y, colour); } -static void paint_ps_image(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 imageId, sint16 x, sint16 y) +static void paint_ps_image(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t imageId, int16_t x, int16_t y) { if (ps->flags & PAINT_STRUCT_FLAG_IS_MASKED) { @@ -654,11 +654,11 @@ static void paint_ps_image(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 im gfx_draw_sprite(dpi, imageId, x, y, ps->tertiary_colour); } -static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 viewFlags) +static uint32_t paint_ps_colourify_image(uint32_t imageId, uint8_t spriteType, uint32_t viewFlags) { - constexpr uint32 primaryColour = COLOUR_BRIGHT_YELLOW; - constexpr uint32 secondaryColour = COLOUR_GREY; - constexpr uint32 seeThoughFlags = IMAGE_TYPE_TRANSPARENT | (primaryColour << 19) | (secondaryColour << 24); + constexpr uint32_t primaryColour = COLOUR_BRIGHT_YELLOW; + constexpr uint32_t secondaryColour = COLOUR_GREY; + constexpr uint32_t seeThoughFlags = IMAGE_TYPE_TRANSPARENT | (primaryColour << 19) | (secondaryColour << 24); if (viewFlags & VIEWPORT_FLAG_SEETHROUGH_RIDES) { @@ -705,7 +705,7 @@ static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 static void draw_pixel_info_crop_by_zoom(rct_drawpixelinfo *dpi) { - sint32 zoom = dpi->zoom_level; + int32_t zoom = dpi->zoom_level; dpi->zoom_level = 0; dpi->x >>= zoom; dpi->y >>= zoom; @@ -743,16 +743,16 @@ void paint_session_free([[maybe_unused]] paint_session* session) */ paint_struct * sub_98196C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset) + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset) { - assert((uint16)bound_box_length_x == (sint16)bound_box_length_x); - assert((uint16)bound_box_length_y == (sint16)bound_box_length_y); + assert((uint16_t)bound_box_length_x == (int16_t)bound_box_length_x); + assert((uint16_t)bound_box_length_y == (int16_t)bound_box_length_y); session->UnkF1AD28 = nullptr; session->UnkF1AD2C = nullptr; @@ -830,11 +830,11 @@ paint_struct * sub_98196C( ps->x = map.x; ps->y = map.y; - sint16 left = map.x + g1Element->x_offset; - sint16 bottom = map.y + g1Element->y_offset; + int16_t left = map.x + g1Element->x_offset; + int16_t bottom = map.y + g1Element->y_offset; - sint16 right = left + g1Element->width; - sint16 top = bottom + g1Element->height; + int16_t right = left + g1Element->width; + int16_t top = bottom + g1Element->height; rct_drawpixelinfo *dpi = session->DPI; @@ -856,7 +856,7 @@ paint_struct * sub_98196C( session->UnkF1AD28 = ps; - sint32 positionHash = 0; + int32_t positionHash = 0; switch (session->CurrentRotation) { case 0: @@ -897,16 +897,16 @@ paint_struct * sub_98196C( // Track Pieces, Shops. paint_struct * sub_98197C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, - sint16 bound_box_offset_y, - sint16 bound_box_offset_z) + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, + int16_t bound_box_offset_y, + int16_t bound_box_offset_z) { session->UnkF1AD28 = nullptr; session->UnkF1AD2C = nullptr; @@ -924,8 +924,8 @@ paint_struct * sub_98197C( LocationXY16 attach = { - (sint16)ps->bounds.x, - (sint16)ps->bounds.y + (int16_t)ps->bounds.x, + (int16_t)ps->bounds.y }; rotate_map_coordinates(&attach.x, &attach.y, session->CurrentRotation); @@ -942,7 +942,7 @@ paint_struct * sub_98197C( break; } - sint32 positionHash = attach.x + attach.y; + int32_t positionHash = attach.x + attach.y; paint_session_add_ps_to_quadrant(session, ps, positionHash); session->NextFreePaintStruct++; @@ -967,19 +967,19 @@ paint_struct * sub_98197C( */ paint_struct * sub_98198C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, - sint16 bound_box_offset_y, - sint16 bound_box_offset_z) + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, + int16_t bound_box_offset_y, + int16_t bound_box_offset_z) { - assert((uint16)bound_box_length_x == bound_box_length_x); - assert((uint16)bound_box_length_y == bound_box_length_y); + assert((uint16_t)bound_box_length_x == bound_box_length_x); + assert((uint16_t)bound_box_length_y == bound_box_length_y); session->UnkF1AD28 = nullptr; session->UnkF1AD2C = nullptr; @@ -1016,19 +1016,19 @@ paint_struct * sub_98198C( */ paint_struct * sub_98199C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, - sint16 bound_box_offset_y, - sint16 bound_box_offset_z) + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, + int16_t bound_box_offset_y, + int16_t bound_box_offset_z) { - assert((uint16)bound_box_length_x == (sint16)bound_box_length_x); - assert((uint16)bound_box_length_y == (sint16)bound_box_length_y); + assert((uint16_t)bound_box_length_x == (int16_t)bound_box_length_x); + assert((uint16_t)bound_box_length_y == (int16_t)bound_box_length_y); if (session->UnkF1AD28 == nullptr) { @@ -1063,7 +1063,7 @@ paint_struct * sub_98199C( * @param y (cx) * @return (!CF) success */ -bool paint_attach_to_previous_attach(paint_session * session, uint32 image_id, uint16 x, uint16 y) +bool paint_attach_to_previous_attach(paint_session * session, uint32_t image_id, uint16_t x, uint16_t y) { if (session->UnkF1AD2C == nullptr) { @@ -1100,7 +1100,7 @@ bool paint_attach_to_previous_attach(paint_session * session, uint32 image_id, u * @param y (cx) * @return (!CF) success */ -bool paint_attach_to_previous_ps(paint_session * session, uint32 image_id, uint16 x, uint16 y) +bool paint_attach_to_previous_ps(paint_session * session, uint32_t image_id, uint16_t x, uint16_t y) { if (session->NextFreePaintStruct >= session->EndOfPaintStructArray) { @@ -1141,7 +1141,7 @@ bool paint_attach_to_previous_ps(paint_session * session, uint32 image_id, uint1 * @param y_offsets (di) * @param rotation (ebp) */ -void paint_floating_money_effect(paint_session * session, money32 amount, rct_string_id string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation) +void paint_floating_money_effect(paint_session * session, money32 amount, rct_string_id string_id, int16_t y, int16_t z, int8_t y_offsets[], int16_t offset_x, uint32_t rotation) { if (session->NextFreePaintStruct >= session->EndOfPaintStructArray) { @@ -1155,7 +1155,7 @@ void paint_floating_money_effect(paint_session * session, money32 amount, rct_st ps->args[1] = y; ps->args[2] = 0; ps->args[3] = 0; - ps->y_offsets = (uint8 *)y_offsets; + ps->y_offsets = (uint8_t *)y_offsets; const LocationXYZ16 position = { @@ -1204,6 +1204,6 @@ void paint_draw_money_structs(rct_drawpixelinfo * dpi, paint_string_struct * ps) forceSpriteFont = true; } - gfx_draw_string_with_y_offsets(&dpi2, buffer, COLOUR_BLACK, ps->x, ps->y, (sint8 *)ps->y_offsets, forceSpriteFont); + gfx_draw_string_with_y_offsets(&dpi2, buffer, COLOUR_BLACK, ps->x, ps->y, (int8_t *)ps->y_offsets, forceSpriteFont); } while ((ps = ps->next) != nullptr); } diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index 10f09904e7..f8850814e2 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -19,16 +19,16 @@ struct rct_tile_element; #pragma pack(push, 1) /* size 0x12 */ struct attached_paint_struct { - uint32 image_id; // 0x00 + uint32_t image_id; // 0x00 union { - uint32 tertiary_colour; + uint32_t tertiary_colour; // If masked image_id is masked_id - uint32 colour_image_id; + uint32_t colour_image_id; }; - uint16 x; // 0x08 - uint16 y; // 0x0A - uint8 flags; // 0x0C - uint8 pad_0D; + uint16_t x; // 0x08 + uint16_t y; // 0x0A + uint8_t flags; // 0x0C + uint8_t pad_0D; attached_paint_struct* next; //0x0E }; #ifdef PLATFORM_32BIT @@ -43,36 +43,36 @@ enum PAINT_QUADRANT_FLAGS { }; struct paint_struct_bound_box { - uint16 x; - uint16 y; - uint16 z; - uint16 x_end; - uint16 y_end; - uint16 z_end; + uint16_t x; + uint16_t y; + uint16_t z; + uint16_t x_end; + uint16_t y_end; + uint16_t z_end; }; /* size 0x34 */ struct paint_struct { - uint32 image_id; // 0x00 + uint32_t image_id; // 0x00 union { - uint32 tertiary_colour; // 0x04 + uint32_t tertiary_colour; // 0x04 // If masked image_id is masked_id - uint32 colour_image_id; // 0x04 + uint32_t colour_image_id; // 0x04 }; paint_struct_bound_box bounds; // 0x08 - uint16 x; // 0x14 - uint16 y; // 0x16 - uint16 quadrant_index; - uint8 flags; - uint8 quadrant_flags; + uint16_t x; // 0x14 + uint16_t y; // 0x16 + uint16_t quadrant_index; + uint8_t flags; + uint8_t quadrant_flags; attached_paint_struct* attached_ps; //0x1C paint_struct* var_20; paint_struct* next_quadrant_ps; // 0x24 - uint8 sprite_type; //0x28 - uint8 var_29; - uint16 pad_2A; - uint16 map_x; // 0x2C - uint16 map_y; // 0x2E + uint8_t sprite_type; //0x28 + uint8_t var_29; + uint16_t pad_2A; + uint16_t map_x; // 0x2C + uint16_t map_y; // 0x2E rct_tile_element *tileElement; // 0x30 (or sprite pointer) }; #ifdef PLATFORM_32BIT @@ -84,10 +84,10 @@ assert_struct_size(paint_struct, 0x34); struct paint_string_struct { rct_string_id string_id; // 0x00 paint_string_struct *next; // 0x02 - uint16 x; // 0x06 - uint16 y; // 0x08 - uint32 args[4]; // 0x0A - uint8 *y_offsets; // 0x1A + uint16_t x; // 0x06 + uint16_t y; // 0x08 + uint32_t args[4]; // 0x0A + uint8_t *y_offsets; // 0x1A }; #ifdef PLATFORM_32BIT assert_struct_size(paint_string_struct, 0x1e); @@ -101,7 +101,7 @@ union paint_entry { }; struct sprite_bb { - uint32 sprite_id; + uint32_t sprite_id; LocationXYZ16 offset; LocationXYZ16 bb_offset; LocationXYZ16 bb_size; @@ -112,14 +112,14 @@ enum PAINT_STRUCT_FLAGS { }; struct support_height { - uint16 height; - uint8 slope; - uint8 pad; + uint16_t height; + uint8_t slope; + uint8_t pad; }; struct tunnel_entry { - uint8 height; - uint8 type; + uint8_t height; + uint8_t type; }; #define MAX_PAINT_QUADRANTS 512 @@ -130,8 +130,8 @@ struct paint_session rct_drawpixelinfo * DPI; paint_entry PaintStructs[4000]; paint_struct * Quadrants[MAX_PAINT_QUADRANTS]; - uint32 QuadrantBackIndex; - uint32 QuadrantFrontIndex; + uint32_t QuadrantBackIndex; + uint32_t QuadrantFrontIndex; const void * CurrentlyDrawnItem; paint_entry * EndOfPaintStructArray; paint_entry * NextFreePaintStruct; @@ -139,8 +139,8 @@ struct paint_session paint_struct UnkF1A4CC; paint_struct * UnkF1AD28; attached_paint_struct * UnkF1AD2C; - uint8 InteractionType; - uint8 CurrentRotation; + uint8_t InteractionType; + uint8_t CurrentRotation; support_height SupportSegments[9]; support_height Support; paint_string_struct * PSStringHead; @@ -148,23 +148,23 @@ struct paint_session paint_struct * WoodenSupportsPrependTo; LocationXY16 MapPosition; tunnel_entry LeftTunnels[TUNNEL_MAX_COUNT]; - uint8 LeftTunnelCount; + uint8_t LeftTunnelCount; tunnel_entry RightTunnels[TUNNEL_MAX_COUNT]; - uint8 RightTunnelCount; - uint8 VerticalTunnelHeight; + uint8_t RightTunnelCount; + uint8_t VerticalTunnelHeight; const rct_tile_element * SurfaceElement; rct_tile_element * PathElementOnSameHeight; rct_tile_element * TrackElementOnSameHeight; bool DidPassSurface; - uint8 Unk141E9DB; - uint16 WaterHeight; - uint32 TrackColours[4]; + uint8_t Unk141E9DB; + uint16_t WaterHeight; + uint32_t TrackColours[4]; }; extern paint_session gPaintSession; // Globals for paint clipping -extern uint8 gClipHeight; +extern uint8_t gClipHeight; extern LocationXY8 gClipSelectionA; extern LocationXY8 gClipSelectionB; @@ -177,74 +177,74 @@ extern bool gPaintWidePathsAsGhost; paint_struct * sub_98196C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset); + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset); paint_struct * sub_98197C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, - sint16 bound_box_offset_y, - sint16 bound_box_offset_z); + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, + int16_t bound_box_offset_y, + int16_t bound_box_offset_z); paint_struct * sub_98198C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, - sint16 bound_box_offset_y, - sint16 bound_box_offset_z); + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, + int16_t bound_box_offset_y, + int16_t bound_box_offset_z); paint_struct * sub_98199C( paint_session * session, - uint32 image_id, - sint8 x_offset, - sint8 y_offset, - sint16 bound_box_length_x, - sint16 bound_box_length_y, - sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, - sint16 bound_box_offset_y, - sint16 bound_box_offset_z); + uint32_t image_id, + int8_t x_offset, + int8_t y_offset, + int16_t bound_box_length_x, + int16_t bound_box_length_y, + int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, + int16_t bound_box_offset_y, + int16_t bound_box_offset_z); -paint_struct * sub_98196C_rotated(paint_session * session, uint8 direction, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset); -paint_struct * sub_98197C_rotated(paint_session * session, uint8 direction, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset, sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z); -paint_struct * sub_98199C_rotated(paint_session * session, uint8 direction, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset, sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z); +paint_struct * sub_98196C_rotated(paint_session * session, uint8_t direction, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset); +paint_struct * sub_98197C_rotated(paint_session * session, uint8_t direction, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z); +paint_struct * sub_98199C_rotated(paint_session * session, uint8_t direction, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z); -void paint_util_push_tunnel_rotated(paint_session * session, uint8 direction, uint16 height, uint8 type); +void paint_util_push_tunnel_rotated(paint_session * session, uint8_t direction, uint16_t height, uint8_t type); -bool paint_attach_to_previous_attach(paint_session * session, uint32 image_id, uint16 x, uint16 y); -bool paint_attach_to_previous_ps(paint_session * session, uint32 image_id, uint16 x, uint16 y); -void paint_floating_money_effect(paint_session * session, money32 amount, rct_string_id string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation); +bool paint_attach_to_previous_attach(paint_session * session, uint32_t image_id, uint16_t x, uint16_t y); +bool paint_attach_to_previous_ps(paint_session * session, uint32_t image_id, uint16_t x, uint16_t y); +void paint_floating_money_effect(paint_session * session, money32 amount, rct_string_id string_id, int16_t y, int16_t z, int8_t y_offsets[], int16_t offset_x, uint32_t rotation); paint_session * paint_session_alloc(rct_drawpixelinfo * dpi); void paint_session_free(paint_session *); void paint_session_generate(paint_session * session); paint_struct paint_session_arrange(paint_session * session); -paint_struct * paint_arrange_structs_helper(paint_struct * ps_next, uint16 quadrantIndex, uint8 flag, uint8 rotation); -void paint_draw_structs(rct_drawpixelinfo * dpi, paint_struct * ps, uint32 viewFlags); +paint_struct * paint_arrange_structs_helper(paint_struct * ps_next, uint16_t quadrantIndex, uint8_t flag, uint8_t rotation); +void paint_draw_structs(rct_drawpixelinfo * dpi, paint_struct * ps, uint32_t viewFlags); void paint_draw_money_structs(rct_drawpixelinfo * dpi, paint_string_struct * ps); // TESTING #ifdef __TESTPAINT__ void testpaint_clear_ignore(); - void testpaint_ignore(uint8 direction, uint8 trackSequence); + void testpaint_ignore(uint8_t direction, uint8_t trackSequence); void testpaint_ignore_all(); - bool testpaint_is_ignored(uint8 direction, uint8 trackSequence); + bool testpaint_is_ignored(uint8_t direction, uint8_t trackSequence); #define TESTPAINT_IGNORE(direction, trackSequence) testpaint_ignore(direction, trackSequence) #define TESTPAINT_IGNORE_ALL() testpaint_ignore_all() diff --git a/src/openrct2/paint/PaintHelpers.cpp b/src/openrct2/paint/PaintHelpers.cpp index bdc4edbeaf..e2d7a796a3 100644 --- a/src/openrct2/paint/PaintHelpers.cpp +++ b/src/openrct2/paint/PaintHelpers.cpp @@ -13,11 +13,11 @@ paint_struct * sub_98196C_rotated( paint_session * session, - uint8 direction, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset) + uint8_t direction, + uint32_t image_id, + int8_t x_offset, int8_t y_offset, + int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, + int16_t z_offset) { if (direction & 1) { return sub_98196C( @@ -30,12 +30,12 @@ paint_struct * sub_98196C_rotated( paint_struct * sub_98197C_rotated( paint_session * session, - uint8 direction, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z) + uint8_t direction, + uint32_t image_id, + int8_t x_offset, int8_t y_offset, + int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z) { if (direction & 1) { return sub_98197C( @@ -50,12 +50,12 @@ paint_struct * sub_98197C_rotated( paint_struct * sub_98199C_rotated( paint_session * session, - uint8 direction, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z) + uint8_t direction, + uint32_t image_id, + int8_t x_offset, int8_t y_offset, + int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z) { if (direction & 1) { return sub_98199C( @@ -68,7 +68,7 @@ paint_struct * sub_98199C_rotated( } } -void paint_util_push_tunnel_rotated(paint_session * session, uint8 direction, uint16 height, uint8 type) +void paint_util_push_tunnel_rotated(paint_session * session, uint8_t direction, uint16_t height, uint8_t type) { if (direction & 1) { paint_util_push_tunnel_right(session, height, type); diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 40342bb0e1..49bb49def3 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -66,8 +66,8 @@ void Painter::Paint(IDrawingEngine& de) void Painter::PaintFPS(rct_drawpixelinfo * dpi) { - sint32 x = _uiContext->GetWidth() / 2; - sint32 y = 2; + int32_t x = _uiContext->GetWidth() / 2; + int32_t y = 2; // Measure FPS MeasureFPS(); @@ -82,7 +82,7 @@ void Painter::PaintFPS(rct_drawpixelinfo * dpi) snprintf(ch, 64 - (ch - buffer), "%d", _currentFPS); // Draw Text - sint32 stringWidth = gfx_get_string_width(buffer); + int32_t stringWidth = gfx_get_string_width(buffer); x = x - (stringWidth / 2); gfx_draw_string(dpi, buffer, 0, x, y); diff --git a/src/openrct2/paint/Painter.h b/src/openrct2/paint/Painter.h index 0cc5f9962d..f4afee5f5f 100644 --- a/src/openrct2/paint/Painter.h +++ b/src/openrct2/paint/Painter.h @@ -35,8 +35,8 @@ namespace OpenRCT2 std::shared_ptr const _uiContext; time_t _lastSecond = 0; - sint32 _currentFPS = 0; - sint32 _frames = 0; + int32_t _currentFPS = 0; + int32_t _frames = 0; public: explicit Painter(const std::shared_ptr& uiContext); diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index b49aff6909..28e22d8605 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -28,7 +28,7 @@ static constexpr const LocationXY8 loc_97AF20[] = { }; /** rct2: 0x0097AF32 */ -static constexpr const uint8 _97AF32[] = { +static constexpr const uint8_t _97AF32[] = { 5, 2, 5, 2, 5, 2, 5, 2, 7, 1, 7, 1, 7, 1, 7, 1, 6, 3, 6, 3, 6, 3, 6, 3, @@ -95,7 +95,7 @@ static constexpr const LocationXY8 _97B062[] = { }; /** rct2: 0x0097B072 */ -static constexpr const uint32 _metalSupportTypeToCrossbeamImages[][8] = { +static constexpr const uint32_t _metalSupportTypeToCrossbeamImages[][8] = { { 3370, 3371, 3370, 3371, 3372, 3373, 3372, 3373 }, // METAL_SUPPORTS_TUBES { 3374, 3375, 3374, 3375, 3376, 3377, 3376, 3377 }, // METAL_SUPPORTS_FORK { 3374, 3375, 3374, 3375, 3376, 3377, 3376, 3377 }, // METAL_SUPPORTS_FORK_ALT @@ -112,7 +112,7 @@ static constexpr const uint32 _metalSupportTypeToCrossbeamImages[][8] = { }; /** rct2: 0x0097B142 */ -static constexpr const uint8 supportTypeToHeight[] = { +static constexpr const uint8_t supportTypeToHeight[] = { 6, 3, 3, @@ -129,8 +129,8 @@ static constexpr const uint8 supportTypeToHeight[] = { }; struct metal_supports_images { - uint16 base_id; - uint16 beam_id; + uint16_t base_id; + uint16_t beam_id; }; /** rct2: 0x0097B15C */ @@ -168,16 +168,16 @@ static constexpr const metal_supports_images _97B190[] = { }; /** rct2: 0x0097B404 */ -static constexpr const uint8 metal_supports_slope_image_map[] = { +static constexpr const uint8_t metal_supports_slope_image_map[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, 0, 17, 18, 0, }; struct supports_id_desc { - uint16 full; - uint16 half; - uint16 flat; - uint16 slope; + uint16_t full; + uint16_t half; + uint16_t flat; + uint16_t slope; }; /* 0x0097B1C4 */ @@ -197,7 +197,7 @@ static constexpr const supports_id_desc WoodenSupportImageIds[] = { }; /* 0x0097B224 */ -static constexpr const uint16 WoodenCurveSupportImageIds[] = { +static constexpr const uint16_t WoodenCurveSupportImageIds[] = { 3465, 3465, 0, @@ -214,17 +214,17 @@ static constexpr const uint16 WoodenCurveSupportImageIds[] = { struct unk_supports_desc_bound_box { struct { - uint8 x, y, z; + uint8_t x, y, z; } offset; struct { - uint8 x, y, z; + uint8_t x, y, z; } length; }; struct unk_supports_desc { unk_supports_desc_bound_box bounding_box; - uint8 var_6; - uint8 var_7; + uint8_t var_6; + uint8_t var_7; }; /* 0x0097B23C */ @@ -289,7 +289,7 @@ static constexpr const unk_supports_desc byte_98D8D4[] = { }; /* 0x0097B3C4 */ -static constexpr const uint16 word_97B3C4[] = { +static constexpr const uint16_t word_97B3C4[] = { 0, 0, 1, @@ -335,7 +335,7 @@ static constexpr const uint16 word_97B3C4[] = { * @param[out] underground (Carry flag) true if underground. * @returns (al) true if any supports have been drawn, otherwise false. */ -bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, bool* underground) +bool wooden_a_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, bool* underground) { if (underground != nullptr){ *underground = false; @@ -349,7 +349,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, return false; } - sint32 z = floor2(session->Support.height + 15, 16); + int32_t z = floor2(session->Support.height + 15, 16); height -= z; if (height < 0) { if (underground != nullptr) { @@ -363,7 +363,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, bool drawFlatPiece = false; // Draw base support (usually shaped to the slope) - sint32 slope = session->Support.slope; + int32_t slope = session->Support.slope; if (slope & (1 << 5)) { // Above scenery (just put a base piece above it) drawFlatPiece = true; @@ -377,7 +377,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, return false; } - sint32 imageId = WoodenSupportImageIds[supportType].slope; + int32_t imageId = WoodenSupportImageIds[supportType].slope; if (imageId == 0) { drawFlatPiece = true; } else { @@ -400,7 +400,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, return false; } - sint32 imageId = WoodenSupportImageIds[supportType].slope; + int32_t imageId = WoodenSupportImageIds[supportType].slope; if (imageId == 0) { drawFlatPiece = true; } else { @@ -415,7 +415,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, // Draw flat base support if (drawFlatPiece) { - sint32 imageId = WoodenSupportImageIds[supportType].flat | imageColourFlags; + int32_t imageId = WoodenSupportImageIds[supportType].flat | imageColourFlags; sub_98196C(session, imageId, 0, 0, 32, 32, 0, z - 2); hasSupports = true; } @@ -424,16 +424,16 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, while (height != 0) { if ((z & 16) == 0 && height >= 2 && z + 16 != session->WaterHeight) { // Full support - sint32 imageId = WoodenSupportImageIds[supportType].full | imageColourFlags; - uint8 ah = height == 2 ? 23 : 28; + int32_t imageId = WoodenSupportImageIds[supportType].full | imageColourFlags; + uint8_t ah = height == 2 ? 23 : 28; sub_98196C(session, imageId, 0, 0, 32, 32, ah, z); hasSupports = true; z += 32; height -= 2; } else { // Half support - sint32 imageId = WoodenSupportImageIds[supportType].half | imageColourFlags; - uint8 ah = height == 1 ? 7 : 12; + int32_t imageId = WoodenSupportImageIds[supportType].half | imageColourFlags; + uint8_t ah = height == 1 ? 7 : 12; sub_98196C(session, imageId, 0, 0, 32, 32, ah, z); hasSupports = true; z += 16; @@ -445,7 +445,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, if (special != 0) { special = (special - 1) & 0xFFFF; - sint32 imageId = WoodenCurveSupportImageIds[supportType]; + int32_t imageId = WoodenCurveSupportImageIds[supportType]; if (imageId != 0 && byte_97B23C[special].var_7 != 0) { imageId += special; imageId |= imageColourFlags; @@ -485,7 +485,7 @@ bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, * * @return (al) whether supports have been drawn */ -bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, bool * underground) +bool wooden_b_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, bool * underground) { bool _9E32B1 = false; @@ -499,15 +499,15 @@ bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, return false; } - uint16 baseHeight = ceil2(session->Support.height, 16); - sint16 supportLength = height - baseHeight; + uint16_t baseHeight = ceil2(session->Support.height, 16); + int16_t supportLength = height - baseHeight; if (supportLength < 0) { if (underground != nullptr) *underground = true; // STC return false; } - sint16 heightSteps = supportLength / 16; + int16_t heightSteps = supportLength / 16; bool goTo662E8B = false; @@ -520,7 +520,7 @@ bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, return false; } - uint32 imageId = WoodenSupportImageIds[supportType].slope; + uint32_t imageId = WoodenSupportImageIds[supportType].slope; if (imageId == 0) { baseHeight += 32; goTo662E8B = true; @@ -542,7 +542,7 @@ bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, return false; } - uint32 imageId = WoodenSupportImageIds[supportType].slope; + uint32_t imageId = WoodenSupportImageIds[supportType].slope; if (imageId == 0) { baseHeight += 16; goTo662E8B = true; @@ -587,9 +587,9 @@ bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, } if (special != 0) { - uint16 specialIndex = (special - 1) & 0xFFFF; + uint16_t specialIndex = (special - 1) & 0xFFFF; - uint32 imageId = WoodenCurveSupportImageIds[supportType]; + uint32_t imageId = WoodenCurveSupportImageIds[supportType]; unk_supports_desc supportsDesc = byte_97B23C[specialIndex]; if (imageId != 0 && supportsDesc.var_7 != 0) { // byte_97B23C[special].var_7 is never 0 @@ -627,7 +627,7 @@ bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, * @param imageColourFlags (ebp) * rct2: 0x00663105 */ -bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, uint8 segment, sint32 special, sint32 height, uint32 imageColourFlags) +bool metal_a_supports_paint_setup(paint_session * session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags) { support_height * supportSegments = session->SupportSegments; @@ -639,11 +639,11 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui return false; } - sint16 originalHeight = height; - sint32 originalSegment = segment; + int16_t originalHeight = height; + int32_t originalSegment = segment; - const uint8 rotation = session->CurrentRotation; - sint16 unk9E3294 = -1; + const uint8_t rotation = session->CurrentRotation; + int16_t unk9E3294 = -1; if (height < supportSegments[segment].height){ unk9E3294 = height; @@ -651,9 +651,9 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui if (height < 0) return false; - const uint8* esi = &(_97AF32[rotation * 2]); + const uint8_t* esi = &(_97AF32[rotation * 2]); - uint8 newSegment = esi[segment * 8]; + uint8_t newSegment = esi[segment * 8]; if (height <= supportSegments[newSegment].height) { esi += 72; newSegment = esi[segment * 8]; @@ -670,23 +670,23 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui } } - uint8 ebp = esi[segment * 8 + 1]; + uint8_t ebp = esi[segment * 8 + 1]; - sint8 xOffset = loc_97AF20[segment].x; - sint8 yOffset = loc_97AF20[segment].y; + int8_t xOffset = loc_97AF20[segment].x; + int8_t yOffset = loc_97AF20[segment].y; xOffset += loc_97B052[ebp].x; yOffset += loc_97B052[ebp].y; - sint16 boundBoxLengthX = _97B062[ebp].x; - sint16 boundBoxLengthY = _97B062[ebp].y; + int16_t boundBoxLengthX = _97B062[ebp].x; + int16_t boundBoxLengthY = _97B062[ebp].y; - uint32 image_id = _metalSupportTypeToCrossbeamImages[supportType][ebp]; + uint32_t image_id = _metalSupportTypeToCrossbeamImages[supportType][ebp]; image_id |= imageColourFlags; sub_98196C(session, image_id, xOffset, yOffset, boundBoxLengthX, boundBoxLengthY, 1, height); segment = newSegment; } - sint16 si = height; + int16_t si = height; if (supportSegments[segment].slope & (1 << 5) || height - supportSegments[segment].height < 6 || _97B15C[supportType].base_id == 0 @@ -694,10 +694,10 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui height = supportSegments[segment].height; }else{ - sint8 xOffset = loc_97AF20[segment].x; - sint8 yOffset = loc_97AF20[segment].y; + int8_t xOffset = loc_97AF20[segment].x; + int8_t yOffset = loc_97AF20[segment].y; - uint32 image_id = _97B15C[supportType].base_id; + uint32_t image_id = _97B15C[supportType].base_id; image_id += metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; image_id |= imageColourFlags; @@ -709,7 +709,7 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui // Work out if a small support segment required to bring support to normal // size (aka floor2(x, 16)) - sint16 heightDiff = floor2(height + 16, 16); + int16_t heightDiff = floor2(height + 16, 16); if (heightDiff > si) { heightDiff = si; } @@ -717,10 +717,10 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui heightDiff -= height; if (heightDiff > 0) { - sint8 xOffset = loc_97AF20[segment].x; - sint8 yOffset = loc_97AF20[segment].y; + int8_t xOffset = loc_97AF20[segment].x; + int8_t yOffset = loc_97AF20[segment].y; - uint32 image_id = _97B15C[supportType].beam_id; + uint32_t image_id = _97B15C[supportType].beam_id; image_id += heightDiff - 1; image_id |= imageColourFlags; @@ -730,11 +730,11 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui height += heightDiff; //6632e6 - for (uint8 count = 0; ;count++) { + for (uint8_t count = 0; ;count++) { if (count >= 4) count = 0; - sint16 z = height + 16; + int16_t z = height + 16; if (z > si) { z = si; } @@ -743,10 +743,10 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui if (z <= 0) break; - sint8 xOffset = loc_97AF20[segment].x; - sint8 yOffset = loc_97AF20[segment].y; + int8_t xOffset = loc_97AF20[segment].x; + int8_t yOffset = loc_97AF20[segment].y; - uint32 image_id = _97B15C[supportType].beam_id; + uint32_t image_id = _97B15C[supportType].beam_id; image_id += z - 1; image_id |= imageColourFlags; @@ -771,13 +771,13 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui height--; } - sint16 boundBoxOffsetX = loc_97AF20[segment].x; - sint16 boundBoxOffsetY = loc_97AF20[segment].y; - sint16 boundBoxOffsetZ = height; + int16_t boundBoxOffsetX = loc_97AF20[segment].x; + int16_t boundBoxOffsetY = loc_97AF20[segment].y; + int16_t boundBoxOffsetZ = height; si = height + special; while (1) { - sint16 z = height + 16; + int16_t z = height + 16; if (z > si) { z = si; } @@ -786,10 +786,10 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui if (z <= 0) break; - sint8 xOffset = loc_97AF20[segment].x; - sint8 yOffset = loc_97AF20[segment].y; + int8_t xOffset = loc_97AF20[segment].x; + int8_t yOffset = loc_97AF20[segment].y; - uint32 image_id = _97B190[supportType].beam_id; + uint32_t image_id = _97B190[supportType].beam_id; image_id += z - 1; image_id |= imageColourFlags; @@ -800,7 +800,7 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui return true; - //sint32 eax = special, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags; + //int32_t eax = special, ebx = 0, ecx = 0, edx = height, esi = 0, _edi = supportType, ebp = imageColourFlags; //RCT2_CALLFUNC_X(0x00663105, &eax, &ebx, &ecx, &edx, &esi, &_edi, &ebp); //return eax & 0xFF; } @@ -817,10 +817,10 @@ bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, ui * * @return (Carry Flag) */ -bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, uint8 segment, sint32 special, sint32 height, uint32 imageColourFlags) +bool metal_b_supports_paint_setup(paint_session * session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags) { support_height * supportSegments = session->SupportSegments; - uint8 originalSegment = segment; + uint8_t originalSegment = segment; if (gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS) { return false; // AND @@ -830,8 +830,8 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui return false; // AND } - uint16 _9E3294 = 0xFFFF; - sint32 baseHeight = height; + uint16_t _9E3294 = 0xFFFF; + int32_t baseHeight = height; if (height < supportSegments[segment].height) { _9E3294 = height; @@ -841,18 +841,18 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui return false; // AND } - uint16 baseIndex = session->CurrentRotation * 2; + uint16_t baseIndex = session->CurrentRotation * 2; - uint8 ebp = _97AF32[baseIndex + segment * 8]; + uint8_t ebp = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp].height) { baseIndex += 9 * 4 * 2; // 9 segments, 4 directions, 2 values - uint8 ebp2 = _97AF32[baseIndex + segment * 8]; + uint8_t ebp2 = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp2].height) { baseIndex += 9 * 4 * 2; - uint8 ebp3 = _97AF32[baseIndex + segment * 8]; + uint8_t ebp3 = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp3].height) { baseIndex += 9 * 4 * 2; - uint8 ebp4 = _97AF32[baseIndex + segment * 8]; + uint8_t ebp4 = _97AF32[baseIndex + segment * 8]; if (baseHeight <= supportSegments[ebp4].height) { return true; // STC } @@ -872,15 +872,15 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui _97B062[ebp].x, _97B062[ebp].y, 1, baseHeight); } - sint32 si = baseHeight; + int32_t si = baseHeight; if ((supportSegments[segment].slope & 0x20) || (baseHeight - supportSegments[segment].height < 6) || (_97B15C[supportType].base_id == 0)) { baseHeight = supportSegments[segment].height; } else { - uint32 imageOffset = metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; - uint32 imageId = _97B15C[supportType].base_id + imageOffset; + uint32_t imageOffset = metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; + uint32_t imageId = _97B15C[supportType].base_id + imageOffset; sub_98196C( session, imageId | imageColourFlags, loc_97AF20[segment].x, loc_97AF20[segment].y, 0, 0, 5, @@ -889,7 +889,7 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui baseHeight = supportSegments[segment].height + 6; } - sint16 heightDiff = floor2(baseHeight + 16, 16); + int16_t heightDiff = floor2(baseHeight + 16, 16); if (heightDiff > si) { heightDiff = si; } @@ -904,23 +904,23 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui baseHeight += heightDiff; - sint16 endHeight; + int16_t endHeight; - sint32 i = 1; + int32_t i = 1; while (true) { endHeight = baseHeight + 16; if (endHeight > si) { endHeight = si; } - sint16 beamLength = endHeight - baseHeight; + int16_t beamLength = endHeight - baseHeight; if (beamLength <= 0) { break; } - uint32 imageId = _97B15C[supportType].beam_id + (beamLength - 1); + uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1); if (i % 4 == 0) { // Each fourth run, draw a special image @@ -949,12 +949,12 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui endHeight = si; } - sint16 beamLength = endHeight - baseHeight; + int16_t beamLength = endHeight - baseHeight; if (beamLength <= 0) { break; } - uint32 imageId = _97B15C[supportType].beam_id + (beamLength - 1); + uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1); sub_98197C( session, imageId | imageColourFlags, loc_97AF20[originalSegment].x, loc_97AF20[originalSegment].y, 0, 0, 0, baseHeight, loc_97AF20[originalSegment].x, loc_97AF20[originalSegment].y, height); @@ -977,7 +977,7 @@ bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, ui * * @return Whether supports were drawn */ -bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, +bool path_a_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, rct_footpath_entry * pathEntry, bool * underground) { if (underground != nullptr) { @@ -992,8 +992,8 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si return false; } - uint16 baseHeight = ceil2(session->Support.height, 16); - sint32 supportLength = height - baseHeight; + uint16_t baseHeight = ceil2(session->Support.height, 16); + int32_t supportLength = height - baseHeight; if (supportLength < 0) { if (underground != nullptr) *underground = true; // STC return false; @@ -1001,7 +1001,7 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si bool hasSupports = false; - sint16 heightSteps = supportLength / 16; + int16_t heightSteps = supportLength / 16; if (session->Support.slope & 0x20) { //save dx2 @@ -1014,7 +1014,7 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si return false; } - uint32 imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK] + pathEntry->bridge_image; + uint32_t imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK] + pathEntry->bridge_image; sub_98197C(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2); baseHeight += 16; @@ -1031,7 +1031,7 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si return false; } - uint32 ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK] + pathEntry->bridge_image; + uint32_t ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK] + pathEntry->bridge_image; sub_98197C(session, ebx | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2); @@ -1042,14 +1042,14 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si while (heightSteps > 0) { if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session->WaterHeight) { - uint32 imageId = (supportType * 24) + pathEntry->bridge_image + 23; + uint32_t imageId = (supportType * 24) + pathEntry->bridge_image + 23; sub_98196C(session, imageId | imageColourFlags, 0, 0, 32, 32, ((heightSteps == 1) ? 7 : 12), baseHeight); heightSteps -= 1; baseHeight += 16; hasSupports = true; } else { - uint32 imageId = (supportType * 24) + pathEntry->bridge_image + 22; + uint32_t imageId = (supportType * 24) + pathEntry->bridge_image + 22; sub_98196C(session, imageId | imageColourFlags, 0, 0, 32, 32, ((heightSteps == 2) ? 23 : 28), baseHeight); heightSteps -= 2; @@ -1059,9 +1059,9 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si } if (special != 0) { - uint16 specialIndex = (special - 1) & 0xFFFF; + uint16_t specialIndex = (special - 1) & 0xFFFF; - uint32 imageId = pathEntry->bridge_image + 55 + specialIndex; + uint32_t imageId = pathEntry->bridge_image + 55 + specialIndex; unk_supports_desc supportsDesc = byte_98D8D4[specialIndex]; unk_supports_desc_bound_box boundBox = supportsDesc.bounding_box; @@ -1099,7 +1099,7 @@ bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, si * * @return Whether supports were drawn */ -bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 special, sint32 height, uint32 imageColourFlags, +bool path_b_supports_paint_setup(paint_session * session, int32_t segment, int32_t special, int32_t height, uint32_t imageColourFlags, rct_footpath_entry * pathEntry) { support_height * supportSegments = session->SupportSegments; @@ -1116,14 +1116,14 @@ bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 return true; // STC } - uint16 baseHeight; + uint16_t baseHeight; if ((supportSegments[segment].slope & 0x20) || (height - supportSegments[segment].height < 6) || !(pathEntry->flags & FOOTPATH_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE)) { baseHeight = supportSegments[segment].height; } else { - uint8 imageOffset = metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; + uint8_t imageOffset = metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; baseHeight = supportSegments[segment].height; sub_98196C( @@ -1135,7 +1135,7 @@ bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 // si = height // dx = baseHeight - sint16 heightDiff = floor2(baseHeight + 16, 16); + int16_t heightDiff = floor2(baseHeight + 16, 16); if (heightDiff > height) { heightDiff = height; } @@ -1152,9 +1152,9 @@ bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 bool keepGoing = true; while (keepGoing) { - sint16 z; + int16_t z; - for (sint32 i = 0; i < 4; ++i) { + for (int32_t i = 0; i < 4; ++i) { z = baseHeight + 16; if (z > height) { z = height; @@ -1182,7 +1182,7 @@ bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 break; } - uint32 imageId = pathEntry->bridge_image + 20 + (z - 1); + uint32_t imageId = pathEntry->bridge_image + 20 + (z - 1); if (z == 16) { imageId += 1; } @@ -1198,10 +1198,10 @@ bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 supportSegments[segment].slope = 0x20; if (special != 0) { - sint16 si = special + baseHeight; + int16_t si = special + baseHeight; while (true) { - sint16 z = baseHeight + 16; + int16_t z = baseHeight + 16; if (z > si) { z = si; } @@ -1211,7 +1211,7 @@ bool path_b_supports_paint_setup(paint_session * session, sint32 segment, sint32 break; } - uint32 imageId = pathEntry->bridge_image + 20 + (z - 1); + uint32_t imageId = pathEntry->bridge_image + 20 + (z - 1); sub_98197C( session, imageId | imageColourFlags, loc_97AF20[segment].x, loc_97AF20[segment].y, 0, 0, 0, baseHeight, loc_97AF20[segment].x, loc_97AF20[segment].y, baseHeight); diff --git a/src/openrct2/paint/Supports.h b/src/openrct2/paint/Supports.h index fa93d68ac3..e038410cb9 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -13,12 +13,12 @@ #include "../common.h" #include "../world/Footpath.h" -bool wooden_a_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, bool* underground); -bool wooden_b_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, bool* underground); -bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, uint8 segment, sint32 special, sint32 height, uint32 imageColourFlags); -bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, uint8 segment, sint32 special, sint32 height, uint32 imageColourFlags); -bool path_a_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, rct_footpath_entry * pathEntry, bool * underground); -bool path_b_supports_paint_setup(paint_session * session, sint32 supportType, sint32 special, sint32 height, uint32 imageColourFlags, rct_footpath_entry * pathEntry); +bool wooden_a_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, bool* underground); +bool wooden_b_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, bool* underground); +bool metal_a_supports_paint_setup(paint_session * session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags); +bool metal_b_supports_paint_setup(paint_session * session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags); +bool path_a_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, rct_footpath_entry * pathEntry, bool * underground); +bool path_b_supports_paint_setup(paint_session * session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags, rct_footpath_entry * pathEntry); // There are 13 types of metal supports. A graphic showing all of them is available here: https://cloud.githubusercontent.com/assets/737603/19420485/7eaba28e-93ec-11e6-83cb-03190accc094.png enum { diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 9748c52e6b..5e9034ccf4 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -19,11 +19,11 @@ #include #include -static uint16 _virtualFloorBaseSize = 5 * 32; -static uint16 _virtualFloorHeight = 0; +static uint16_t _virtualFloorBaseSize = 5 * 32; +static uint16_t _virtualFloorHeight = 0; static LocationXYZ16 _virtualFloorLastMinPos; static LocationXYZ16 _virtualFloorLastMaxPos; -static uint32 _virtualFloorFlags = 0; +static uint32_t _virtualFloorFlags = 0; enum VirtualFloorFlags { @@ -37,7 +37,7 @@ bool virtual_floor_is_enabled() return (_virtualFloorFlags & VIRTUAL_FLOOR_FLAG_ENABLED) != 0; } -void virtual_floor_set_height(sint16 height) +void virtual_floor_set_height(int16_t height) { if (!virtual_floor_is_enabled()) { @@ -53,10 +53,10 @@ void virtual_floor_set_height(sint16 height) static void virtual_floor_reset() { - _virtualFloorLastMinPos.x = std::numeric_limits::max(); - _virtualFloorLastMinPos.y = std::numeric_limits::max(); - _virtualFloorLastMaxPos.x = std::numeric_limits::lowest(); - _virtualFloorLastMaxPos.y = std::numeric_limits::lowest(); + _virtualFloorLastMinPos.x = std::numeric_limits::max(); + _virtualFloorLastMinPos.y = std::numeric_limits::max(); + _virtualFloorLastMaxPos.x = std::numeric_limits::lowest(); + _virtualFloorLastMaxPos.y = std::numeric_limits::lowest(); _virtualFloorHeight = 0; } @@ -91,8 +91,8 @@ void virtual_floor_disable() void virtual_floor_invalidate() { // First, let's figure out how big our selection is. - LocationXY16 min_position = { std::numeric_limits::max(), std::numeric_limits::max() }; - LocationXY16 max_position = { std::numeric_limits::lowest(), std::numeric_limits::lowest() }; + LocationXY16 min_position = { std::numeric_limits::max(), std::numeric_limits::max() }; + LocationXY16 max_position = { std::numeric_limits::lowest(), std::numeric_limits::lowest() }; if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) { @@ -118,10 +118,10 @@ void virtual_floor_invalidate() max_position.y += _virtualFloorBaseSize + 16; // Invalidate previous region if appropriate. - if (_virtualFloorLastMinPos.x != std::numeric_limits::max() && - _virtualFloorLastMinPos.y != std::numeric_limits::max() && - _virtualFloorLastMaxPos.x != std::numeric_limits::lowest() && - _virtualFloorLastMaxPos.y != std::numeric_limits::lowest()) + if (_virtualFloorLastMinPos.x != std::numeric_limits::max() && + _virtualFloorLastMinPos.y != std::numeric_limits::max() && + _virtualFloorLastMaxPos.x != std::numeric_limits::lowest() && + _virtualFloorLastMaxPos.y != std::numeric_limits::lowest()) { LocationXY16 prevMins = { _virtualFloorLastMinPos.x, _virtualFloorLastMinPos.y }; LocationXY16 prevMaxs = { _virtualFloorLastMaxPos.x, _virtualFloorLastMaxPos.y }; @@ -154,10 +154,10 @@ void virtual_floor_invalidate() log_verbose("Min: %d %d, Max: %d %d\n", min_position.x, min_position.y, max_position.x, max_position.y); // Invalidate new region if coordinates are set. - if (min_position.x != std::numeric_limits::max() && - min_position.y != std::numeric_limits::max() && - max_position.x != std::numeric_limits::lowest() && - max_position.y != std::numeric_limits::lowest()) + if (min_position.x != std::numeric_limits::max() && + min_position.y != std::numeric_limits::max() && + max_position.x != std::numeric_limits::lowest() && + max_position.y != std::numeric_limits::lowest()) { map_invalidate_region(min_position, max_position); @@ -172,7 +172,7 @@ void virtual_floor_invalidate() } } -bool virtual_floor_tile_is_floor(sint16 x, sint16 y) +bool virtual_floor_tile_is_floor(int16_t x, int16_t y) { if (!virtual_floor_is_enabled()) { @@ -207,7 +207,7 @@ bool virtual_floor_tile_is_floor(sint16 x, sint16 y) return false; } -static void virtual_floor_get_tile_properties(sint16 x, sint16 y, sint16 height, bool * outOccupied, uint8 * outOccupiedEdges, bool * outBelowGround, bool * outLit) +static void virtual_floor_get_tile_properties(int16_t x, int16_t y, int16_t height, bool * outOccupied, uint8_t * outOccupiedEdges, bool * outBelowGround, bool * outLit) { *outOccupied = false; *outOccupiedEdges = 0; @@ -247,7 +247,7 @@ static void virtual_floor_get_tile_properties(sint16 x, sint16 y, sint16 height, rct_tile_element * tileElement = map_get_first_element_at(x >> 5, y >> 5); do { - sint32 elementType = tileElement->GetType(); + int32_t elementType = tileElement->GetType(); if (elementType == TILE_ELEMENT_TYPE_SURFACE) { @@ -273,7 +273,7 @@ static void virtual_floor_get_tile_properties(sint16 x, sint16 y, sint16 height, if (elementType == TILE_ELEMENT_TYPE_WALL || elementType == TILE_ELEMENT_TYPE_BANNER) { - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); *outOccupiedEdges |= 1 << direction; continue; } @@ -302,19 +302,19 @@ void virtual_floor_paint(paint_session * session) if (_virtualFloorHeight < MINIMUM_LAND_HEIGHT) return; - uint8 direction = session->CurrentRotation; + uint8_t direction = session->CurrentRotation; // This is a virtual floor, so no interactions session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - sint16 virtualFloorClipHeight = _virtualFloorHeight / 8; + int16_t virtualFloorClipHeight = _virtualFloorHeight / 8; // Check for occupation and walls bool weAreOccupied; - uint8 occupiedEdges; + uint8_t occupiedEdges; bool weAreBelowGround; bool weAreLit; - uint8 litEdges = 0; + uint8_t litEdges = 0; virtual_floor_get_tile_properties(session->MapPosition.x, session->MapPosition.y, virtualFloorClipHeight, &weAreOccupied, &occupiedEdges, &weAreBelowGround, &weAreLit); @@ -325,14 +325,14 @@ void virtual_floor_paint(paint_session * session) // Try the four tiles next to us for the same parameters as above, // if our parameters differ we set an edge towards that tile - for (uint8 i = 0; i < 4; i++) + for (uint8_t i = 0; i < 4; i++) { - uint8 effectiveRotation = (4 + i - direction) % 4; - sint16 theirLocationX = session->MapPosition.x + scenery_half_tile_offsets[effectiveRotation].x; - sint16 theirLocationY = session->MapPosition.y + scenery_half_tile_offsets[effectiveRotation].y; + uint8_t effectiveRotation = (4 + i - direction) % 4; + int16_t theirLocationX = session->MapPosition.x + scenery_half_tile_offsets[effectiveRotation].x; + int16_t theirLocationY = session->MapPosition.y + scenery_half_tile_offsets[effectiveRotation].y; bool theyAreOccupied; - uint8 theirOccupiedEdges; + uint8_t theirOccupiedEdges; bool theyAreBelowGround; bool theyAreLit; @@ -353,14 +353,14 @@ void virtual_floor_paint(paint_session * session) } } - uint32 remap_base = COLOUR_DARK_PURPLE << 19 | IMAGE_TYPE_REMAP; - uint32 remap_edge = COLOUR_WHITE << 19 | IMAGE_TYPE_REMAP; - uint32 remap_lit = COLOUR_DARK_BROWN << 19 | IMAGE_TYPE_REMAP; + uint32_t remap_base = COLOUR_DARK_PURPLE << 19 | IMAGE_TYPE_REMAP; + uint32_t remap_edge = COLOUR_WHITE << 19 | IMAGE_TYPE_REMAP; + uint32_t remap_lit = COLOUR_DARK_BROWN << 19 | IMAGE_TYPE_REMAP; // Edges which are internal to objects (i.e., the tile on both sides // is occupied/lit) are not rendered to provide visual clarity. - uint8 dullEdges = 0xF & ~occupiedEdges & ~litEdges; - uint8 paintEdges = (weAreOccupied || weAreLit)? ~dullEdges : 0xF; + uint8_t dullEdges = 0xF & ~occupiedEdges & ~litEdges; + uint8_t paintEdges = (weAreOccupied || weAreLit)? ~dullEdges : 0xF; if (paintEdges & 0x1) { @@ -396,12 +396,12 @@ void virtual_floor_paint(paint_session * session) if (!weAreOccupied && !weAreLit) { - sint32 imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; + int32_t imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; sub_98197C(session, imageColourFlats, 0, 0, 30, 30, 0, _virtualFloorHeight, 2, 2, _virtualFloorHeight - 3); } } -uint16 virtual_floor_get_height() +uint16_t virtual_floor_get_height() { return _virtualFloorHeight; } diff --git a/src/openrct2/paint/VirtualFloor.h b/src/openrct2/paint/VirtualFloor.h index 1dcecd32f4..abee31eb30 100644 --- a/src/openrct2/paint/VirtualFloor.h +++ b/src/openrct2/paint/VirtualFloor.h @@ -21,16 +21,16 @@ enum VirtualFloorStyles struct paint_session; -uint16 virtual_floor_get_height(); +uint16_t virtual_floor_get_height(); bool virtual_floor_is_enabled(); -void virtual_floor_set_height(sint16 height); +void virtual_floor_set_height(int16_t height); void virtual_floor_enable(); void virtual_floor_disable(); void virtual_floor_invalidate(); -bool virtual_floor_tile_is_floor(sint16 x, sint16 y); +bool virtual_floor_tile_is_floor(int16_t x, int16_t y); void virtual_floor_paint(paint_session * session); diff --git a/src/openrct2/paint/sprite/Paint.Litter.cpp b/src/openrct2/paint/sprite/Paint.Litter.cpp index 88b3489981..404f030f37 100644 --- a/src/openrct2/paint/sprite/Paint.Litter.cpp +++ b/src/openrct2/paint/sprite/Paint.Litter.cpp @@ -39,8 +39,8 @@ enum { }; struct litter_sprite { - uint16 base_id; - uint8 direction_mask; + uint16_t base_id; + uint8_t direction_mask; }; /** rct2: 0x0097EF6C */ @@ -63,7 +63,7 @@ static constexpr const litter_sprite litter_sprites[] = { * Litter Paint Setup * rct2: 0x006736FC */ -void litter_paint(paint_session * session, const rct_litter *litter, sint32 imageDirection) +void litter_paint(paint_session * session, const rct_litter *litter, int32_t imageDirection) { rct_drawpixelinfo *dpi; @@ -76,7 +76,7 @@ void litter_paint(paint_session * session, const rct_litter *litter, sint32 imag // anything that isn't required. imageDirection &= litter_sprites[litter->type].direction_mask; - uint32 image_id = imageDirection + litter_sprites[litter->type].base_id; + uint32_t image_id = imageDirection + litter_sprites[litter->type].base_id; // In the following call to sub_98197C, we add 4 (instead of 2) to the // bound_box_offset_z to make sure litter is drawn on top of railways diff --git a/src/openrct2/paint/sprite/Paint.Misc.cpp b/src/openrct2/paint/sprite/Paint.Misc.cpp index 317b62d5a4..01906f4e6b 100644 --- a/src/openrct2/paint/sprite/Paint.Misc.cpp +++ b/src/openrct2/paint/sprite/Paint.Misc.cpp @@ -15,27 +15,27 @@ #include "../../localisation/StringIds.h" /** rct2: 0x0097EDA4 */ -static constexpr const sint8 money_wave[] = { +static constexpr const int8_t money_wave[] = { 0, 1, 2, 2, 3, 3, 3, 3, 2, 2, 1, 0, -1, -2, -2, -3, -3, -3, -3, -2, -2, -1, 0, 1, 2, 2, 3, 3, 3, 3, 2, 2, 1, 0, -1, -2, -2, -3, -3, -3, -3, -2, -2, -1 }; /** rct2: 0x0097ED90 */ -const uint32 vehicle_particle_base_sprites[] = { +const uint32_t vehicle_particle_base_sprites[] = { 22577, 22589, 22601, 22613, 22625 }; /** * rct2: 0x00672AC9 */ -void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDirection) +void misc_paint(paint_session * session, const rct_sprite *misc, int32_t imageDirection) { rct_drawpixelinfo * dpi = session->DPI; switch (misc->steam_particle.misc_identifier) { case SPRITE_MISC_STEAM_PARTICLE: // 0 { - uint32 imageId = 22637 + (misc->steam_particle.frame / 256); + uint32_t imageId = 22637 + (misc->steam_particle.frame / 256); sub_98196C(session, imageId, 0, 0, 1, 1, 0, misc->unknown.z); break; } @@ -50,7 +50,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir money32 value; rct_string_id stringId = money_effect_get_string_id(moneyEffect, &value); paint_floating_money_effect( - session, value, stringId, moneyEffect->y, moneyEffect->z, (sint8 *)&money_wave[moneyEffect->wiggle % 22], + session, value, stringId, moneyEffect->y, moneyEffect->z, (int8_t *)&money_wave[moneyEffect->wiggle % 22], moneyEffect->offset_x, session->CurrentRotation); break; } @@ -62,7 +62,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir } rct_crashed_vehicle_particle particle = misc->crashed_vehicle_particle; - uint32 imageId = vehicle_particle_base_sprites[particle.crashed_sprite_base] + particle.frame / 256; + uint32_t imageId = vehicle_particle_base_sprites[particle.crashed_sprite_base] + particle.frame / 256; imageId = imageId | (particle.colour[0] << 19) | (particle.colour[1] << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; sub_98196C(session, imageId, 0, 0, 1, 1, 0, misc->unknown.z); break; @@ -70,7 +70,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir case SPRITE_MISC_EXPLOSION_CLOUD: // 3 { - uint32 imageId = 22878 + (misc->unknown.frame / 256); + uint32_t imageId = 22878 + (misc->unknown.frame / 256); sub_98196C(session, imageId, 0, 0, 1, 1, 0, misc->unknown.z); break; } @@ -78,7 +78,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir case SPRITE_MISC_CRASH_SPLASH: // 4 { rct_crash_splash crashSplash = misc->crash_splash; - uint32 imageId = 22927 + (crashSplash.frame / 256); + uint32_t imageId = 22927 + (crashSplash.frame / 256); sub_98196C(session, imageId, 0, 0, 1, 1, 0, crashSplash.z); break; } @@ -86,7 +86,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir case SPRITE_MISC_EXPLOSION_FLARE: // 5 { // Like a flare - uint32 imageId = 22896 + (misc->unknown.frame / 256); + uint32_t imageId = 22896 + (misc->unknown.frame / 256); sub_98196C(session, imageId, 0, 0, 1, 1, 0, misc->unknown.z); break; } @@ -100,11 +100,11 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir rct_jumping_fountain jumpingFountain = misc->jumping_fountain; - uint16 height = jumpingFountain.z + 6; - sint32 ebx = imageDirection / 8; + uint16_t height = jumpingFountain.z + 6; + int32_t ebx = imageDirection / 8; - uint8 al = (jumpingFountain.fountain_flags / 128) & 1; - uint8 ah = (jumpingFountain.sprite_direction / 16) & 1; + uint8_t al = (jumpingFountain.fountain_flags / 128) & 1; + uint8_t ah = (jumpingFountain.sprite_direction / 16) & 1; if (al == ah) { al = ebx / 2; @@ -113,8 +113,8 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir al = al ^ 1; } - uint32 baseImageId = (jumpingFountain.misc_identifier == SPRITE_MISC_JUMPING_FOUNTAIN_SNOW) ? 23037 : 22973; - uint32 imageId = baseImageId + ebx * 16 + jumpingFountain.frame; + uint32_t baseImageId = (jumpingFountain.misc_identifier == SPRITE_MISC_JUMPING_FOUNTAIN_SNOW) ? 23037 : 22973; + uint32_t imageId = baseImageId + ebx * 16 + jumpingFountain.frame; if (al & 1) { switch (ebx) { case 0: @@ -159,7 +159,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir { rct_balloon balloon = misc->balloon; - uint32 imageId = 22651 + (balloon.frame & 7); + uint32_t imageId = 22651 + (balloon.frame & 7); if (balloon.popped != 0) { imageId += 8; } @@ -172,7 +172,7 @@ void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDir case SPRITE_MISC_DUCK: if (dpi->zoom_level == 0) { const rct_duck * duck = &misc->duck; - uint32 imageId = duck_get_frame_image(&misc->duck, imageDirection); + uint32_t imageId = duck_get_frame_image(&misc->duck, imageDirection); if (imageId != 0) { sub_98196C(session, imageId, 0, 0, 1, 1, 0, duck->z); } diff --git a/src/openrct2/paint/sprite/Paint.Peep.cpp b/src/openrct2/paint/sprite/Paint.Peep.cpp index d46511f452..d4373c7ff8 100644 --- a/src/openrct2/paint/sprite/Paint.Peep.cpp +++ b/src/openrct2/paint/sprite/Paint.Peep.cpp @@ -19,12 +19,12 @@ * * rct2: 0x0068F0FB */ -void peep_paint(paint_session * session, const rct_peep * peep, sint32 imageDirection) +void peep_paint(paint_session * session, const rct_peep * peep, int32_t imageDirection) { #ifdef __ENABLE_LIGHTFX__ if (lightfx_is_available()) { if (peep->type == PEEP_TYPE_STAFF) { - sint16 peep_x, peep_y, peep_z; + int16_t peep_x, peep_y, peep_z; peep_x = peep->x; peep_y = peep->y; @@ -63,8 +63,8 @@ void peep_paint(paint_session * session, const rct_peep * peep, sint32 imageDire rct_peep_animation_entry sprite = g_peep_animation_entries[peep->sprite_type]; - uint8 spriteType = peep->action_sprite_type; - uint8 imageOffset = peep->action_sprite_image_offset; + uint8_t spriteType = peep->action_sprite_type; + uint8_t imageOffset = peep->action_sprite_image_offset; if (peep->action == PEEP_ACTION_NONE_1) { spriteType = peep->next_action_sprite_type; @@ -73,8 +73,8 @@ void peep_paint(paint_session * session, const rct_peep * peep, sint32 imageDire // In the following 4 calls to sub_98197C/sub_98199C, we add 5 (instead of 3) to the // bound_box_offset_z to make sure peeps are drawn on top of railways - uint32 baseImageId = (imageDirection >> 3) + sprite.sprite_animation[spriteType].base_image + imageOffset * 4; - uint32 imageId = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; + uint32_t baseImageId = (imageDirection >> 3) + sprite.sprite_animation[spriteType].base_image + imageOffset * 4; + uint32_t imageId = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; sub_98197C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); if (baseImageId >= 10717 && baseImageId < 10749) { diff --git a/src/openrct2/paint/sprite/Paint.Sprite.cpp b/src/openrct2/paint/sprite/Paint.Sprite.cpp index fd83ed7c13..0692e5170a 100644 --- a/src/openrct2/paint/sprite/Paint.Sprite.cpp +++ b/src/openrct2/paint/sprite/Paint.Sprite.cpp @@ -21,7 +21,7 @@ * Paint Quadrant * rct2: 0x0069E8B0 */ -void sprite_paint_setup(paint_session * session, const uint16 x, const uint16 y) +void sprite_paint_setup(paint_session * session, const uint16_t x, const uint16_t y) { if ((x & 0xe000) | (y & 0xe000)) { @@ -33,7 +33,7 @@ void sprite_paint_setup(paint_session * session, const uint16 x, const uint16 y) return; } - uint16 sprite_idx = sprite_get_first_in_quadrant(x, y); + uint16_t sprite_idx = sprite_get_first_in_quadrant(x, y); if (sprite_idx == SPRITE_INDEX_NULL) { return; @@ -95,7 +95,7 @@ void sprite_paint_setup(paint_session * session, const uint16 x, const uint16 y) continue; } - sint32 image_direction = session->CurrentRotation; + int32_t image_direction = session->CurrentRotation; image_direction <<= 3; image_direction += spr->unknown.sprite_direction; image_direction &= 0x1F; diff --git a/src/openrct2/paint/sprite/Paint.Sprite.h b/src/openrct2/paint/sprite/Paint.Sprite.h index 8ce6782613..085fee2092 100644 --- a/src/openrct2/paint/sprite/Paint.Sprite.h +++ b/src/openrct2/paint/sprite/Paint.Sprite.h @@ -15,12 +15,12 @@ struct paint_session; -void sprite_paint_setup(paint_session * session, const uint16 x, const uint16 y); +void sprite_paint_setup(paint_session * session, const uint16_t x, const uint16_t y); -void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDirection); -void litter_paint(paint_session * session, const rct_litter *litter, sint32 imageDirection); -void peep_paint(paint_session * session, const rct_peep *peep, sint32 imageDirection); +void misc_paint(paint_session * session, const rct_sprite *misc, int32_t imageDirection); +void litter_paint(paint_session * session, const rct_litter *litter, int32_t imageDirection); +void peep_paint(paint_session * session, const rct_peep *peep, int32_t imageDirection); -extern const uint32 vehicle_particle_base_sprites[5]; +extern const uint32_t vehicle_particle_base_sprites[5]; #endif diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 12955add4b..0ea7d7127e 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -31,9 +31,9 @@ const LocationXY16 BannerBoundBoxes[][2] = { * * rct2: 0x006B9CC4 */ -void banner_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element) +void banner_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element) { - uint16 boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ; + uint16_t boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ; rct_drawpixelinfo* dpi = session->DPI; session->InteractionType = VIEWPORT_INTERACTION_ITEM_BANNER; @@ -55,8 +55,8 @@ void banner_paint(paint_session * session, uint8 direction, sint32 height, const boundBoxOffsetY = BannerBoundBoxes[direction][0].y; boundBoxOffsetZ = height + 2; - uint32 base_id = (direction << 1) + banner_scenery->image; - uint32 image_id = base_id; + uint32_t base_id = (direction << 1) + banner_scenery->image; + uint32_t image_id = base_id; if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST) // if being placed { @@ -82,15 +82,15 @@ void banner_paint(paint_session * session, uint8 direction, sint32 height, const // If text not showing / ghost if (direction >= 2 || (tile_element->flags & TILE_ELEMENT_FLAG_GHOST)) return; - uint16 scrollingMode = banner_scenery->banner.scrolling_mode; + uint16_t scrollingMode = banner_scenery->banner.scrolling_mode; if (scrollingMode >= MAX_SCROLLING_TEXT_MODES) { return; } scrollingMode += direction; - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); rct_string_id string_id = STR_NO_ENTRY; if (!(gBanners[tile_element->properties.banner.index].flags & BANNER_FLAG_NO_ENTRY)) @@ -106,8 +106,8 @@ void banner_paint(paint_session * session, uint8 direction, sint32 height, const gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY; - uint16 string_width = gfx_get_string_width(gCommonStringFormatBuffer); - uint16 scroll = (gCurrentTicks / 2) % string_width; + uint16_t string_width = gfx_get_string_width(gCommonStringFormatBuffer); + uint16_t scroll = (gCurrentTicks / 2) % string_width; sub_98199C( session, scrolling_text_setup(session, string_id, scroll, scrollingMode), 0, 0, 1, 1, 0x15, height + 22, diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index 0e67a48169..e82aa18aa3 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -21,16 +21,16 @@ #include "Paint.TileElement.h" #include "../../drawing/LightFX.h" -static uint32 _unk9E32BC; +static uint32_t _unk9E32BC; /** * * rct2: 0x0066508C, 0x00665540 */ -static void ride_entrance_exit_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element) +static void ride_entrance_exit_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element) { - uint8 is_exit = tile_element->properties.entrance.type == ENTRANCE_TYPE_RIDE_EXIT; + uint8_t is_exit = tile_element->properties.entrance.type == ENTRANCE_TYPE_RIDE_EXIT; if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { if (tile_element->properties.entrance.ride_index != gTrackDesignSaveRideIndex) @@ -65,8 +65,8 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s const rct_ride_entrance_definition *style = &RideEntranceDefinitions[ride->entrance_style]; - uint8 colour_1, colour_2; - uint32 transparant_image_id = 0, image_id = 0; + uint8_t colour_1, colour_2; + uint32_t transparant_image_id = 0, image_id = 0; if (style->base_image_id & IMAGE_TYPE_TRANSPARENT) { colour_1 = GlassPaletteIds[ride->track_colour_main[0]]; transparant_image_id = (colour_1 << 19) | IMAGE_TYPE_TRANSPARENT; @@ -99,10 +99,10 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s // Each entrance is split into 2 images for drawing // Certain entrance styles have another 2 images to draw for coloured windows - sint8 ah = is_exit ? 0x23 : 0x33; + int8_t ah = is_exit ? 0x23 : 0x33; - sint16 lengthY = (direction & 1) ? 28 : 2; - sint16 lengthX = (direction & 1) ? 2 : 28; + int16_t lengthY = (direction & 1) ? 28 : 2; + int16_t lengthX = (direction & 1) ? 2 : 28; sub_98197C(session, image_id, 0, 0, lengthX, lengthY, ah, height, 2, 2, height); @@ -139,8 +139,8 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s !(tile_element->flags & TILE_ELEMENT_FLAG_GHOST) && tile_element->properties.entrance.ride_index != 0xFF){ - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); rct_string_id string_id = STR_RIDE_ENTRANCE_CLOSED; @@ -148,7 +148,7 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)){ set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); string_id = STR_RIDE_ENTRANCE_NAME; } @@ -162,8 +162,8 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY; - uint16 string_width = gfx_get_string_width(entrance_string); - uint16 scroll = (gCurrentTicks / 2) % string_width; + uint16_t string_width = gfx_get_string_width(entrance_string); + uint16_t scroll = (gCurrentTicks / 2) % string_width; sub_98199C( session, scrolling_text_setup(session, string_id, scroll, style->scrolling_mode), 0, 0, 0x1C, 0x1C, 0x33, @@ -186,7 +186,7 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s * * rct2: 0x006658ED */ -static void park_entrance_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element) +static void park_entrance_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element) { if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) return; @@ -199,7 +199,7 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 session->InteractionType = VIEWPORT_INTERACTION_ITEM_PARK; _unk9E32BC = 0; - uint32 image_id, ghost_id = 0; + uint32_t image_id, ghost_id = 0; if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST){ session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; ghost_id = CONSTRUCTION_MARKER; @@ -208,7 +208,7 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 // Index to which part of the entrance // Middle, left, right - uint8 part_index = tile_element->properties.entrance.index & 0xF; + uint8_t part_index = tile_element->properties.entrance.index & 0xF; rct_footpath_entry * path_entry = nullptr; // The left and right of the park entrance often have this set to 127. @@ -218,7 +218,7 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 rct_entrance_type* entrance; - uint8 di = ((direction / 2 + part_index / 2) & 1) ? 0x1A : 0x20; + uint8_t di = ((direction / 2 + part_index / 2) & 1) ? 0x1A : 0x20; switch (part_index){ case 0: @@ -242,12 +242,12 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 { rct_string_id park_text_id = STR_BANNER_TEXT_CLOSED; - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); if (gParkFlags & PARK_FLAGS_PARK_OPEN){ set_format_arg(0, rct_string_id, gParkName); - set_format_arg(2, uint32, gParkNameArgs); + set_format_arg(2, uint32_t, gParkNameArgs); park_text_id = STR_BANNER_TEXT_FORMAT; } @@ -261,14 +261,14 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY; - uint16 string_width = gfx_get_string_width(park_name); - uint16 scroll = (gCurrentTicks / 2) % string_width; + uint16_t string_width = gfx_get_string_width(park_name); + uint16_t scroll = (gCurrentTicks / 2) % string_width; if (entrance->scrolling_mode == 0xFF) break; - sint32 stsetup = scrolling_text_setup(session, park_text_id, scroll, entrance->scrolling_mode + direction / 2); - sint32 text_height = height + entrance->text_height; + int32_t stsetup = scrolling_text_setup(session, park_text_id, scroll, entrance->scrolling_mode + direction / 2); + int32_t text_height = height + entrance->text_height; sub_98199C(session, stsetup, 0, 0, 0x1C, 0x1C, 0x2F, text_height, 2, 2, text_height); } break; @@ -298,7 +298,7 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 * * rct2: 0x00664FD4 */ -void entrance_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element) +void entrance_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_LABEL; @@ -309,8 +309,8 @@ void entrance_paint(paint_session * session, uint8 direction, sint32 height, con if (entrance_get_directions(tile_element) & 0xF){ - sint32 z = tile_element->base_height * 8 + 3; - uint32 image_id = 0x20101689 + get_height_marker_offset() + (z / 16); + int32_t z = tile_element->base_height * 8 + 3; + uint32_t image_id = 0x20101689 + get_height_marker_offset() + (z / 16); image_id -= gMapBaseZ; sub_98197C(session, image_id, 16, 16, 1, 1, 0, height, 31, 31, z + 64); diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index aea28eb701..feef67816a 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -26,25 +26,25 @@ // 6B8172: static void large_scenery_paint_supports( paint_session * session, - uint8 direction, - uint16 height, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, - uint32 dword_F4387C, + uint32_t dword_F4387C, rct_large_scenery_tile * tile) { if (tile->flags & LARGE_SCENERY_TILE_FLAG_NO_SUPPORTS) { return; } - sint32 ax = 0; - sint32 supportHeight = height; + int32_t ax = 0; + int32_t supportHeight = height; if (supportHeight & 0xF) { supportHeight &= 0xFFFFFFF0; ax = 49; } - sint32 supportImageColourFlags = IMAGE_TYPE_REMAP; + int32_t supportImageColourFlags = IMAGE_TYPE_REMAP; if (dword_F4387C) { supportImageColourFlags = dword_F4387C; @@ -52,7 +52,7 @@ static void large_scenery_paint_supports( wooden_b_supports_paint_setup(session, (direction & 1), ax, supportHeight, supportImageColourFlags, nullptr); - sint32 clearanceHeight = ceil2(tileElement->clearance_height * 8 + 15, 16); + int32_t clearanceHeight = ceil2(tileElement->clearance_height * 8 + 15, 16); if (tile->flags & LARGE_SCENERY_TILE_FLAG_ALLOW_SUPPORTS_ABOVE) { paint_util_set_segment_support_height(session, SEGMENTS_ALL, clearanceHeight, 0x20); @@ -63,7 +63,7 @@ static void large_scenery_paint_supports( paint_util_set_general_support_height(session, clearanceHeight, 0x20); } -static rct_large_scenery_text_glyph *large_scenery_sign_get_glyph(rct_large_scenery_text *text, uint32 codepoint) +static rct_large_scenery_text_glyph *large_scenery_sign_get_glyph(rct_large_scenery_text *text, uint32_t codepoint) { if (codepoint >= Util::CountOf(text->glyphs)) { return &text->glyphs[(size_t)'?']; @@ -71,20 +71,20 @@ static rct_large_scenery_text_glyph *large_scenery_sign_get_glyph(rct_large_scen return &text->glyphs[codepoint]; } -static sint32 large_scenery_sign_text_width(const utf8 *str, rct_large_scenery_text *text) +static int32_t large_scenery_sign_text_width(const utf8 *str, rct_large_scenery_text *text) { - sint32 width = 0; - uint32 codepoint; + int32_t width = 0; + uint32_t codepoint; while ((codepoint = utf8_get_next(str, &str)) != 0) { width += large_scenery_sign_get_glyph(text, codepoint)->width; } return width; } -static sint32 large_scenery_sign_text_height(const utf8 *str, rct_large_scenery_text *text) +static int32_t large_scenery_sign_text_height(const utf8 *str, rct_large_scenery_text *text) { - sint32 height = 0; - uint32 codepoint; + int32_t height = 0; + uint32_t codepoint; while ((codepoint = utf8_get_next(str, &str)) != 0) { height += large_scenery_sign_get_glyph(text, codepoint)->height; } @@ -96,8 +96,8 @@ static const utf8 *large_scenery_sign_fit_text(const utf8 *str, rct_large_scener static utf8 fitStr[32]; utf8 *fitStrEnd = fitStr; safe_strcpy(fitStr, str, sizeof(fitStr)); - sint32 w = 0; - uint32 codepoint; + int32_t w = 0; + uint32_t codepoint; while (w <= text->max_width && (codepoint = utf8_get_next(fitStrEnd, (const utf8**)&fitStrEnd)) != 0) { if (height) { w += large_scenery_sign_get_glyph(text, codepoint)->height; @@ -109,25 +109,25 @@ static const utf8 *large_scenery_sign_fit_text(const utf8 *str, rct_large_scener return fitStr; } -static sint32 div_to_minus_infinity(sint32 a, sint32 b) { +static int32_t div_to_minus_infinity(int32_t a, int32_t b) { return (a / b) - (a % b < 0); } -static void large_scenery_sign_paint_line(paint_session * session, const utf8 *str, rct_large_scenery_text *text, sint32 textImage, sint32 textColour, uint8 direction, sint32 y_offset) +static void large_scenery_sign_paint_line(paint_session * session, const utf8 *str, rct_large_scenery_text *text, int32_t textImage, int32_t textColour, uint8_t direction, int32_t y_offset) { const utf8 *fitStr = large_scenery_sign_fit_text(str, text, false); - sint32 width = large_scenery_sign_text_width(fitStr, text); - sint32 x_offset = text->offset[(direction & 1)].x; - sint32 acc = y_offset * ((direction & 1) ? -1 : 1); + int32_t width = large_scenery_sign_text_width(fitStr, text); + int32_t x_offset = text->offset[(direction & 1)].x; + int32_t acc = y_offset * ((direction & 1) ? -1 : 1); if (!(text->flags & LARGE_SCENERY_TEXT_FLAG_VERTICAL)) { // sign is horizontal, centre text: x_offset -= (width / 2); acc -= (width / 2); } - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(fitStr, &fitStr)) != 0) { - sint32 glyph_offset = large_scenery_sign_get_glyph(text, codepoint)->image_offset; - uint8 glyph_type = direction & 1; + int32_t glyph_offset = large_scenery_sign_get_glyph(text, codepoint)->image_offset; + uint8_t glyph_type = direction & 1; if (text->flags & LARGE_SCENERY_TEXT_FLAG_VERTICAL) { // vertical sign glyph_offset *= 2; } else { @@ -143,7 +143,7 @@ static void large_scenery_sign_paint_line(paint_session * session, const utf8 *s } } } - sint32 image_id = (textImage + glyph_offset + glyph_type) | textColour; + int32_t image_id = (textImage + glyph_offset + glyph_type) | textColour; if (direction == 3) { paint_attach_to_previous_ps(session, image_id, x_offset, -div_to_minus_infinity(acc, 2)); } else { @@ -187,21 +187,21 @@ static constexpr const boundbox s98E3C4[] = { * * rct2: 0x006B7F0C */ -void large_scenery_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement) +void large_scenery_paint(paint_session * session, uint8_t direction, uint16_t height, const rct_tile_element * tileElement) { if (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) { return; } session->InteractionType = VIEWPORT_INTERACTION_ITEM_LARGE_SCENERY; - uint32 sequenceNum = scenery_large_get_sequence(tileElement); + uint32_t sequenceNum = scenery_large_get_sequence(tileElement); rct_scenery_entry *entry = get_large_scenery_entry(scenery_large_get_type(tileElement)); if (entry == nullptr) return; - uint32 image_id = (sequenceNum << 2) + entry->image + 4 + direction; + uint32_t image_id = (sequenceNum << 2) + entry->image + 4 + direction; rct_large_scenery_tile *tile = &entry->large_scenery.tiles[sequenceNum]; - uint32 dword_F4387C = 0; + uint32_t dword_F4387C = 0; image_id |= SPRITE_ID_PALETTE_COLOUR_2(scenery_large_get_primary_colour(tileElement), scenery_large_get_secondary_colour(tileElement)); LocationXYZ16 boxlength; LocationXYZ16 boxoffset; @@ -220,13 +220,13 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height dword_F4387C = sequenceNum; image_id |= dword_F4387C; } - sint32 ah = tile->z_clearance; + int32_t ah = tile->z_clearance; if (ah > 0x80) { ah = 0x80; } ah -= 3; - uint16 edi = tile->flags; - sint32 esi = 16; + uint16_t edi = tile->flags; + int32_t esi = 16; if (edi & 0xF00) { edi &= 0xF000; edi = rol16(edi, direction); @@ -244,8 +244,8 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height return; } if (entry->large_scenery.flags & LARGE_SCENERY_FLAG_3D_TEXT) { - if (entry->large_scenery.tiles[1].x_offset != (sint16)(uint16)0xFFFF) { - sint32 sequenceDirection = (scenery_large_get_sequence(tileElement) - 1) & 3; + if (entry->large_scenery.tiles[1].x_offset != (int16_t)(uint16_t)0xFFFF) { + int32_t sequenceDirection = (scenery_large_get_sequence(tileElement) - 1) & 3; if (sequenceDirection != direction) { large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile); return; @@ -258,9 +258,9 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height } // 6B8331: // Draw sign text: - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); - sint32 textColour = scenery_large_get_secondary_colour(tileElement); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); + int32_t textColour = scenery_large_get_secondary_colour(tileElement); if (dword_F4387C) { textColour = COLOUR_GREY; } @@ -272,20 +272,20 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height { Ride * ride = get_ride(banner->ride_index); stringId = ride->name; - set_format_arg(0, uint32, ride->name_arguments); + set_format_arg(0, uint32_t, ride->name_arguments); } utf8 signString[256]; format_string(signString, sizeof(signString), stringId, gCommonFormatArgs); rct_large_scenery_text *text = entry->large_scenery.text; - sint32 y_offset = (text->offset[(direction & 1)].y * 2); + int32_t y_offset = (text->offset[(direction & 1)].y * 2); if (text->flags & LARGE_SCENERY_TEXT_FLAG_VERTICAL) { // Draw vertical sign: y_offset += 1; utf8 fitStr[32]; const utf8 *fitStrPtr = fitStr; safe_strcpy(fitStr, large_scenery_sign_fit_text(signString, text, true), sizeof(fitStr)); - sint32 height2 = large_scenery_sign_text_height(fitStr, text); - uint32 codepoint; + int32_t height2 = large_scenery_sign_text_height(fitStr, text); + uint32_t codepoint; while ((codepoint = utf8_get_next(fitStrPtr, &fitStrPtr)) != 0) { utf8 str[5] = {0}; utf8_write_codepoint(str, codepoint); @@ -296,18 +296,18 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height y_offset -= (direction & 1); if (text->flags & LARGE_SCENERY_TEXT_FLAG_TWO_LINE) { // Draw two-line sign: - sint32 width = large_scenery_sign_text_width(signString, text); + int32_t width = large_scenery_sign_text_width(signString, text); if (width > text->max_width) { y_offset -= large_scenery_sign_get_glyph(text, 'A')->height + 1; utf8 *src = signString; - for (sint32 i = 0; i < 2; i++) { + for (int32_t i = 0; i < 2; i++) { utf8 str1[64] = {0}; utf8 *dst = str1; utf8 *srcold = src; utf8 *spacesrc = nullptr; utf8 *spacedst = nullptr; - sint32 w = 0; - uint32 codepoint = utf8_get_next(src, (const utf8**)&src); + int32_t w = 0; + uint32_t codepoint = utf8_get_next(src, (const utf8**)&src); do { w += large_scenery_sign_get_glyph(text, codepoint)->width; if (codepoint == ' ') { @@ -338,15 +338,15 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile); return; } - uint8 sequenceDirection2 = (scenery_large_get_sequence(tileElement) - 1) & 3; + uint8_t sequenceDirection2 = (scenery_large_get_sequence(tileElement) - 1) & 3; if (sequenceDirection2 != direction) { large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile); return; } // Draw scrolling text: - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); - uint8 textColour = scenery_large_get_secondary_colour(tileElement); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); + uint8_t textColour = scenery_large_get_secondary_colour(tileElement); if (dword_F4387C) { textColour = COLOUR_GREY; } @@ -354,16 +354,16 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height textColour |= (1 << 7); } // 6B809A: - set_format_arg(7, uint8, textColour); + set_format_arg(7, uint8_t, textColour); BannerIndex bannerIndex = scenery_large_get_banner_id(tileElement); - uint16 scrollMode = entry->large_scenery.scrolling_mode + ((direction + 1) & 0x3); + uint16_t scrollMode = entry->large_scenery.scrolling_mode + ((direction + 1) & 0x3); rct_banner *banner = &gBanners[bannerIndex]; set_format_arg(0, rct_string_id, banner->string_idx); if (banner->flags & BANNER_FLAG_LINKED_TO_RIDE) { Ride * ride = get_ride(banner->ride_index); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); } utf8 signString[256]; rct_string_id stringId = STR_SCROLLING_SIGN_TEXT; @@ -375,8 +375,8 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY; - uint16 string_width = gfx_get_string_width(signString); - uint16 scroll = (gCurrentTicks / 2) % string_width; + uint16_t string_width = gfx_get_string_width(signString); + uint16_t scroll = (gCurrentTicks / 2) % string_width; sub_98199C( session, scrolling_text_setup(session, stringId, scroll, scrollMode), 0, 0, 1, 1, 21, height + 25, boxoffset.x, boxoffset.y, boxoffset.z); diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 74b25c6007..5fd214ae02 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -30,11 +30,11 @@ bool gPaintWidePathsAsGhost = false; // clang-format off -const uint8 byte_98D800[] = { +const uint8_t byte_98D800[] = { 12, 9, 3, 6 }; -static constexpr const uint8 byte_98D6E0[] = { +static constexpr const uint8_t byte_98D6E0[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 20, 4, 5, 6, 22, 8, 9, 10, 26, 12, 13, 14, 36, 0, 1, 2, 3, 4, 5, 21, 23, 8, 9, 10, 11, 12, 13, 33, 37, @@ -53,7 +53,7 @@ static constexpr const uint8 byte_98D6E0[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 50 }; -static constexpr const sint16 stru_98D804[][4] = { +static constexpr const int16_t stru_98D804[][4] = { {3, 3, 26, 26}, {0, 3, 29, 26}, {3, 3, 26, 29}, @@ -72,7 +72,7 @@ static constexpr const sint16 stru_98D804[][4] = { {0, 0, 32, 32}, }; -static constexpr const uint8 byte_98D8A4[] = { +static constexpr const uint8_t byte_98D8A4[] = { 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0 }; // clang-format on @@ -80,33 +80,33 @@ static constexpr const uint8 byte_98D8A4[] = { void path_paint_box_support( paint_session * session, const rct_tile_element * tileElement, - sint32 height, + int32_t height, rct_footpath_entry * footpathEntry, bool hasFences, - uint32 imageFlags, - uint32 sceneryImageFlags); + uint32_t imageFlags, + uint32_t sceneryImageFlags); void path_paint_pole_support( paint_session * session, const rct_tile_element * tileElement, - sint16 height, + int16_t height, rct_footpath_entry * footpathEntry, bool hasFences, - uint32 imageFlags, - uint32 sceneryImageFlags); + uint32_t imageFlags, + uint32_t sceneryImageFlags); /* rct2: 0x006A5AE5 */ static void path_bit_lights_paint( paint_session * session, rct_scenery_entry * pathBitEntry, const rct_tile_element * tileElement, - sint32 height, - uint8 edges, - uint32 pathBitImageFlags) + int32_t height, + uint8_t edges, + uint32_t pathBitImageFlags) { if (footpath_element_is_sloped(tileElement)) height += 8; - uint32 imageId; + uint32_t imageId; if (!(edges & EDGE_NE)) { imageId = pathBitEntry->image + 1; @@ -157,14 +157,14 @@ static void path_bit_bins_paint( paint_session * session, rct_scenery_entry * pathBitEntry, const rct_tile_element * tileElement, - sint32 height, - uint8 edges, - uint32 pathBitImageFlags) + int32_t height, + uint8_t edges, + uint32_t pathBitImageFlags) { if (footpath_element_is_sloped(tileElement)) height += 8; - uint32 imageId; + uint32_t imageId; bool binsAreVandalised = tileElement->flags & TILE_ELEMENT_FLAG_BROKEN; if (!(edges & EDGE_NE)) { @@ -252,11 +252,11 @@ static void path_bit_benches_paint( paint_session * session, rct_scenery_entry * pathBitEntry, const rct_tile_element * tileElement, - sint32 height, - uint8 edges, - uint32 pathBitImageFlags) + int32_t height, + uint8_t edges, + uint32_t pathBitImageFlags) { - uint32 imageId; + uint32_t imageId; if (!(edges & EDGE_NE)) { imageId = pathBitEntry->image + 1; @@ -306,14 +306,14 @@ static void path_bit_benches_paint( static void path_bit_jumping_fountains_paint( paint_session * session, rct_scenery_entry * pathBitEntry, - sint32 height, - uint32 pathBitImageFlags, + int32_t height, + uint32_t pathBitImageFlags, rct_drawpixelinfo * dpi) { if (dpi->zoom_level != 0) return; - uint32 imageId = pathBitEntry->image; + uint32_t imageId = pathBitEntry->image; imageId |= pathBitImageFlags; sub_98197C(session, imageId + 1, 0, 0, 1, 1, 2, height, 3, 3, height + 2); @@ -329,15 +329,15 @@ static void path_bit_jumping_fountains_paint( static void sub_6A4101( paint_session * session, const rct_tile_element * tile_element, - uint16 height, - uint32 ebp, + uint16_t height, + uint32_t ebp, bool word_F3F038, rct_footpath_entry * footpathEntry, - uint32 base_image_id, - uint32 imageFlags) + uint32_t base_image_id, + uint32_t imageFlags) { if (footpath_element_is_queue(tile_element)) { - uint8 local_ebp = ebp & 0x0F; + uint8_t local_ebp = ebp & 0x0F; if (footpath_element_is_sloped(tile_element)) { switch ((footpath_element_get_slope_direction(tile_element) + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) @@ -419,7 +419,7 @@ static void sub_6A4101( return; } - uint8 direction = footpath_element_get_direction(tile_element); + uint8_t direction = footpath_element_get_direction(tile_element); // Draw ride sign session->InteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; if (footpath_element_is_sloped(tile_element)) { @@ -432,10 +432,10 @@ static void sub_6A4101( LocationXYZ16 boundBoxOffsets = { BannerBoundBoxes[direction][0].x, BannerBoundBoxes[direction][0].y, - static_cast(height + 2) + static_cast(height + 2) }; - uint32 imageId = (direction << 1) + base_image_id + 101; + uint32_t imageId = (direction << 1) + base_image_id + 101; // Draw pole in the back sub_98197C(session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z); @@ -449,17 +449,17 @@ static void sub_6A4101( direction--; // If text shown if (direction < 2 && tile_element->properties.path.ride_index != RIDE_ID_NULL && imageFlags == 0) { - uint16 scrollingMode = footpathEntry->scrolling_mode; + uint16_t scrollingMode = footpathEntry->scrolling_mode; scrollingMode += direction; - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); Ride* ride = get_ride(tile_element->properties.path.ride_index); rct_string_id string_id = STR_RIDE_ENTRANCE_CLOSED; if (ride->status == RIDE_STATUS_OPEN && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)){ set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); string_id = STR_RIDE_ENTRANCE_NAME; } if (gConfigGeneral.upper_case_banners) { @@ -470,8 +470,8 @@ static void sub_6A4101( gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY; - uint16 string_width = gfx_get_string_width(gCommonStringFormatBuffer); - uint16 scroll = (gCurrentTicks / 2) % string_width; + uint16_t string_width = gfx_get_string_width(gCommonStringFormatBuffer); + uint16_t scroll = (gCurrentTicks / 2) % string_width; sub_98199C( session, scrolling_text_setup(session, string_id, scroll, scrollingMode), 0, 0, 1, 1, 21, height + 7, @@ -487,7 +487,7 @@ static void sub_6A4101( // save ecx, ebp, esi - uint32 dword_F3EF80 = ebp; + uint32_t dword_F3EF80 = ebp; if (!(footpathEntry->flags & FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE)) { dword_F3EF80 &= 0x0F; } @@ -518,7 +518,7 @@ static void sub_6A4101( return; } - uint8 local_ebp = ebp & 0x0F; + uint8_t local_ebp = ebp & 0x0F; switch (local_ebp) { case 0: // purposely left empty @@ -651,11 +651,11 @@ static void sub_6A4101( static void sub_6A3F61( paint_session * session, const rct_tile_element * tile_element, - uint16 connectedEdges, - uint16 height, + uint16_t connectedEdges, + uint16_t height, rct_footpath_entry * footpathEntry, - uint32 imageFlags, - uint32 sceneryImageFlags, + uint32_t imageFlags, + uint32_t sceneryImageFlags, bool word_F3F038) { // eax -- @@ -691,13 +691,13 @@ static void sub_6A3F61( switch (sceneryEntry->path_bit.draw_type) { case PATH_BIT_DRAW_TYPE_LIGHTS: - path_bit_lights_paint(session, sceneryEntry, tile_element, height, (uint8)connectedEdges, sceneryImageFlags); + path_bit_lights_paint(session, sceneryEntry, tile_element, height, (uint8_t)connectedEdges, sceneryImageFlags); break; case PATH_BIT_DRAW_TYPE_BINS: - path_bit_bins_paint(session, sceneryEntry, tile_element, height, (uint8)connectedEdges, sceneryImageFlags); + path_bit_bins_paint(session, sceneryEntry, tile_element, height, (uint8_t)connectedEdges, sceneryImageFlags); break; case PATH_BIT_DRAW_TYPE_BENCHES: - path_bit_benches_paint(session, sceneryEntry, tile_element, height, (uint8)connectedEdges, sceneryImageFlags); + path_bit_benches_paint(session, sceneryEntry, tile_element, height, (uint8_t)connectedEdges, sceneryImageFlags); break; case PATH_BIT_DRAW_TYPE_JUMPING_FOUNTAINS: path_bit_jumping_fountains_paint(session, sceneryEntry, height, sceneryImageFlags, dpi); @@ -718,7 +718,7 @@ static void sub_6A3F61( } // This is about tunnel drawing - uint8 direction = (footpath_element_get_slope_direction(tile_element) + session->CurrentRotation) & + uint8_t direction = (footpath_element_get_slope_direction(tile_element) + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK; bool sloped = footpath_element_is_sloped(tile_element); @@ -756,14 +756,14 @@ static void sub_6A3F61( /** * rct2: 0x0006A3590 */ -void path_paint(paint_session * session, uint16 height, const rct_tile_element * tile_element) +void path_paint(paint_session * session, uint16_t height, const rct_tile_element * tile_element) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_FOOTPATH; bool word_F3F038 = false; - uint32 sceneryImageFlags = 0; - uint32 imageFlags = 0; + uint32_t sceneryImageFlags = 0; + uint32_t imageFlags = 0; if (gTrackDesignSaveMode) { if (footpath_element_is_queue(tile_element)) { @@ -804,11 +804,11 @@ void path_paint(paint_session * session, uint16 height, const rct_tile_element * imageFlags |= CONSTRUCTION_MARKER; } - sint16 x = session->MapPosition.x, y = session->MapPosition.y; + int16_t x = session->MapPosition.x, y = session->MapPosition.y; rct_tile_element * surface = map_get_surface_element_at({session->MapPosition.x, session->MapPosition.y}); - uint16 bl = height / 8; + uint16_t bl = height / 8; if (surface == nullptr) { word_F3F038 = true; } else if (surface->base_height != bl) { @@ -828,13 +828,13 @@ void path_paint(paint_session * session, uint16 height, const rct_tile_element * } if (gStaffDrawPatrolAreas != 0xFFFF) { - sint32 staffIndex = gStaffDrawPatrolAreas; - uint8 staffType = staffIndex & 0x7FFF; + int32_t staffIndex = gStaffDrawPatrolAreas; + uint8_t staffType = staffIndex & 0x7FFF; bool is_staff_list = staffIndex & 0x8000; x = session->MapPosition.x; y = session->MapPosition.y; - uint8 patrolColour = COLOUR_LIGHT_BLUE; + uint8_t patrolColour = COLOUR_LIGHT_BLUE; if (!is_staff_list) { rct_peep * staff = GET_PEEP(staffIndex); @@ -845,8 +845,8 @@ void path_paint(paint_session * session, uint16 height, const rct_tile_element * } if (staff_is_patrol_area_set(200 + staffType, x, y)) { - uint32 imageId = 2618; - sint32 height2 = tile_element->base_height * 8; + uint32_t imageId = 2618; + int32_t height2 = tile_element->base_height * 8; if (footpath_element_is_sloped(tile_element)) { imageId = 2619 + ((footpath_element_get_slope_direction(tile_element) + session->CurrentRotation) & 3); height2 += 16; @@ -858,17 +858,17 @@ void path_paint(paint_session * session, uint16 height, const rct_tile_element * if (gCurrentViewportFlags & VIEWPORT_FLAG_PATH_HEIGHTS) { - uint16 height2 = 3 + tile_element->base_height * 8; + uint16_t height2 = 3 + tile_element->base_height * 8; if (footpath_element_is_sloped(tile_element)) { height2 += 8; } - uint32 imageId = (SPR_HEIGHT_MARKER_BASE + height2 / 16) | COLOUR_GREY << 19 | IMAGE_TYPE_REMAP; + uint32_t imageId = (SPR_HEIGHT_MARKER_BASE + height2 / 16) | COLOUR_GREY << 19 | IMAGE_TYPE_REMAP; imageId += get_height_marker_offset(); imageId -= gMapBaseZ; sub_98196C(session, imageId, 16, 16, 1, 1, 0, height2); } - uint8 pathType = footpath_element_get_type(tile_element); + uint8_t pathType = footpath_element_get_type(tile_element); rct_footpath_entry * footpathEntry = get_footpath_entry(pathType); if (footpathEntry != nullptr) { @@ -906,25 +906,25 @@ void path_paint(paint_session * session, uint16 height, const rct_tile_element * void path_paint_box_support( paint_session * session, const rct_tile_element * tileElement, - sint32 height, + int32_t height, rct_footpath_entry * footpathEntry, bool hasFences, - uint32 imageFlags, - uint32 sceneryImageFlags) + uint32_t imageFlags, + uint32_t sceneryImageFlags) { // Rol edges around rotation - uint8 edges = ((tileElement->properties.path.edges << session->CurrentRotation) & 0xF) | + uint8_t edges = ((tileElement->properties.path.edges << session->CurrentRotation) & 0xF) | (((tileElement->properties.path.edges & 0xF) << session->CurrentRotation) >> 4); - uint8 corners = (((tileElement->properties.path.edges >> 4) << session->CurrentRotation) & 0xF) | + uint8_t corners = (((tileElement->properties.path.edges >> 4) << session->CurrentRotation) & 0xF) | (((tileElement->properties.path.edges >> 4) << session->CurrentRotation) >> 4); LocationXY16 boundBoxOffset = {stru_98D804[edges][0], stru_98D804[edges][1]}; LocationXY16 boundBoxSize = {stru_98D804[edges][2], stru_98D804[edges][3]}; - uint16 edi = edges | (corners << 4); + uint16_t edi = edges | (corners << 4); - uint32 imageId; + uint32_t imageId; if (footpath_element_is_sloped(tileElement)) { imageId = ((footpath_element_get_slope_direction(tileElement) + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) + @@ -946,7 +946,7 @@ void path_paint_box_support( } // By default, add 1 to the z bounding box to always clip above the surface - uint8 boundingBoxZOffset = 1; + uint8_t boundingBoxZOffset = 1; // If we are on the same tile as a straight track, add the offset 2 so we // can clip above gravel part of the track sprite @@ -963,7 +963,7 @@ void path_paint_box_support( session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + boundingBoxZOffset); } else { - uint32 image_id; + uint32_t image_id; if (footpath_element_is_sloped(tileElement)) { image_id = ((footpath_element_get_slope_direction(tileElement) + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) + @@ -988,7 +988,7 @@ void path_paint_box_support( sub_6A3F61(session, tileElement, edi, height, footpathEntry, imageFlags, sceneryImageFlags, hasFences); - uint16 ax = 0; + uint16_t ax = 0; if (footpath_element_is_sloped(tileElement)) { ax = ((footpath_element_get_slope_direction(tileElement) + session->CurrentRotation) & 0x3) + 1; } @@ -1040,14 +1040,14 @@ void path_paint_box_support( void path_paint_pole_support( paint_session * session, const rct_tile_element * tileElement, - sint16 height, + int16_t height, rct_footpath_entry * footpathEntry, bool hasFences, - uint32 imageFlags, - uint32 sceneryImageFlags) + uint32_t imageFlags, + uint32_t sceneryImageFlags) { // Rol edges around rotation - uint8 edges = ((tileElement->properties.path.edges << session->CurrentRotation) & 0xF) | + uint8_t edges = ((tileElement->properties.path.edges << session->CurrentRotation) & 0xF) | (((tileElement->properties.path.edges & 0xF) << session->CurrentRotation) >> 4); LocationXY16 boundBoxOffset = { @@ -1060,12 +1060,12 @@ void path_paint_pole_support( stru_98D804[edges][3] }; - uint8 corners = (((tileElement->properties.path.edges >> 4) << session->CurrentRotation) & 0xF) | + uint8_t corners = (((tileElement->properties.path.edges >> 4) << session->CurrentRotation) & 0xF) | (((tileElement->properties.path.edges >> 4) << session->CurrentRotation) >> 4); - uint16 edi = edges | (corners << 4); + uint16_t edi = edges | (corners << 4); - uint32 imageId; + uint32_t imageId; if (footpath_element_is_sloped(tileElement)) { imageId = ((footpath_element_get_slope_direction(tileElement) + session->CurrentRotation) & 3) + 16; } @@ -1088,7 +1088,7 @@ void path_paint_pole_support( } // By default, add 1 to the z bounding box to always clip above the surface - uint8 boundingBoxZOffset = 1; + uint8_t boundingBoxZOffset = 1; // If we are on the same tile as a straight track, add the offset 2 so we // can clip above gravel part of the track sprite @@ -1106,7 +1106,7 @@ void path_paint_pole_support( height + boundingBoxZOffset); } else { - uint32 bridgeImage; + uint32_t bridgeImage; if (footpath_element_is_sloped(tileElement)) { bridgeImage = ((footpath_element_get_slope_direction(tileElement) + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) + @@ -1130,19 +1130,19 @@ void path_paint_pole_support( sub_6A3F61(session, tileElement, edi, height, footpathEntry, imageFlags, sceneryImageFlags, hasFences); // TODO: arguments - uint16 ax = 0; + uint16_t ax = 0; if (footpath_element_is_sloped(tileElement)) { ax = 8; } - uint8 supports[] = { + uint8_t supports[] = { 6, 8, 7, 5 }; - for (sint8 i = 3; i > -1; --i) { + for (int8_t i = 3; i > -1; --i) { if (!(edges & (1 << i))) { path_b_supports_paint_setup(session, supports[i], ax, height, imageFlags, footpathEntry); } diff --git a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp index d316435bbc..1936db6c8e 100644 --- a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp @@ -30,21 +30,21 @@ static constexpr const LocationXY16 lengths[] = { * * rct2: 0x006DFF47 */ -void scenery_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement) +void scenery_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement) { if (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) { return; } - //RCT2_CALLPROC_X(0x6DFF47, 0, 0, direction, height, (sint32)tileElement, 0, 0); return; + //RCT2_CALLPROC_X(0x6DFF47, 0, 0, direction, height, (int32_t)tileElement, 0, 0); return; session->InteractionType = VIEWPORT_INTERACTION_ITEM_SCENERY; LocationXYZ16 boxlength; LocationXYZ16 boxoffset; boxoffset.x = 0; boxoffset.y = 0; boxoffset.z = height; - sint32 baseImageid = 0; - const sint32 rotation = session->CurrentRotation; + int32_t baseImageid = 0; + const int32_t rotation = session->CurrentRotation; if (gTrackDesignSaveMode) { if (!track_design_save_contains_tile_element(tileElement)) { baseImageid = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); @@ -54,7 +54,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; baseImageid = CONSTRUCTION_MARKER; } - uint32 dword_F64EB0 = baseImageid; + uint32_t dword_F64EB0 = baseImageid; rct_scenery_entry *entry = get_small_scenery_entry(tileElement->properties.scenery.type); @@ -66,8 +66,8 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons baseImageid = entry->image + direction; boxlength.x = 2; boxlength.y = 2; - sint8 x_offset = 0; - sint8 y_offset = 0; + int8_t x_offset = 0; + int8_t y_offset = 0; if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_FULL_TILE)) { if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_HALF_SPACE)) { @@ -104,7 +104,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons } } else { // 6DFFC2: - uint8 ecx = (tileElement->GetSceneryQuadrant() + rotation) & 3; + uint8_t ecx = (tileElement->GetSceneryQuadrant() + rotation) & 3; x_offset = ScenerySubTileOffsets[ecx].x; y_offset = ScenerySubTileOffsets[ecx].y; boxoffset.x = x_offset; @@ -149,7 +149,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons if (dword_F64EB0 == 0) { // Draw translucent overlay: // TODO: Name palette entries - sint32 image_id = (baseImageid & 0x7FFFF) + (GlassPaletteIds[scenery_small_get_primary_colour(tileElement)] << 19) + 0x40000004; + int32_t image_id = (baseImageid & 0x7FFFF) + (GlassPaletteIds[scenery_small_get_primary_colour(tileElement)] << 19) + 0x40000004; sub_98199C( session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x, boxoffset.y, boxoffset.z); @@ -162,7 +162,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons // 6E01A9: if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1)) { // 6E0512: - sint32 image_id = ((gCurrentTicks / 2) & 0xF) + entry->image + 4; + int32_t image_id = ((gCurrentTicks / 2) & 0xF) + entry->image + 4; if (dword_F64EB0 != 0) { image_id = (image_id & 0x7FFFF) | dword_F64EB0; } @@ -172,7 +172,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons } else if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_4)) { // 6E043B: - sint32 image_id = ((gCurrentTicks / 2) & 0xF) + entry->image + 8; + int32_t image_id = ((gCurrentTicks / 2) & 0xF) + entry->image + 8; if (dword_F64EB0 != 0) { image_id = (image_id & 0x7FFFF) | dword_F64EB0; } @@ -198,8 +198,8 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons } else if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_IS_CLOCK)) { // 6E035C: - sint32 minuteImageOffset = ((gRealTimeOfDay.minute + 6) * 17) / 256; - sint32 timeImageBase = gRealTimeOfDay.hour; + int32_t minuteImageOffset = ((gRealTimeOfDay.minute + 6) * 17) / 256; + int32_t timeImageBase = gRealTimeOfDay.hour; while (timeImageBase >= 12) { timeImageBase -= 12; } @@ -207,7 +207,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons if (timeImageBase >= 48) { timeImageBase -= 48; } - sint32 image_id = timeImageBase + (direction * 12); + int32_t image_id = timeImageBase + (direction * 12); if (image_id >= 48) { image_id -= 48; } @@ -234,7 +234,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons } else if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_SWAMP_GOO)) { // 6E02F6: - sint32 image_id = gCurrentTicks; + int32_t image_id = gCurrentTicks; image_id += session->SpritePosition.x / 4; image_id += session->SpritePosition.y / 4; image_id = (image_id / 4) & 15; @@ -248,17 +248,17 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons } else if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_HAS_FRAME_OFFSETS)) { - sint32 frame = gCurrentTicks; + int32_t frame = gCurrentTicks; if (!(scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_COG))) { // 6E01F8: frame += ((session->SpritePosition.x / 4) + (session->SpritePosition.y / 4)); frame += (tileElement->type & 0xC0) / 16; } // 6E0222: - uint16 delay = entry->small_scenery.animation_delay & 0xFF; + uint16_t delay = entry->small_scenery.animation_delay & 0xFF; frame >>= delay; frame &= entry->small_scenery.animation_mask; - sint32 image_id = 0; + int32_t image_id = 0; if (frame < entry->small_scenery.num_frames) { image_id = entry->small_scenery.frame_offsets[frame]; } @@ -296,13 +296,13 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons // 6E0556: Draw supports: if (scenery_small_get_supports_needed(tileElement)) { if (!(scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_NO_SUPPORTS))) { - sint32 ax = 0; - sint32 supportHeight = height; + int32_t ax = 0; + int32_t supportHeight = height; if (supportHeight & 0xF) { supportHeight &= 0xFFFFFFF0; ax = 49; } - uint32 supportImageColourFlags = IMAGE_TYPE_REMAP; + uint32_t supportImageColourFlags = IMAGE_TYPE_REMAP; if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_PAINT_SUPPORTS)) { supportImageColourFlags = SPRITE_ID_PALETTE_COLOUR_1(scenery_small_get_primary_colour(tileElement)); diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 662984cc80..aa155351eb 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -28,7 +28,7 @@ #include "Paint.TileElement.h" // clang-format off -static constexpr const uint8 byte_97B444[] = +static constexpr const uint8_t byte_97B444[] = { 0, 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 0, 0, 0, 0, @@ -74,10 +74,10 @@ enum struct corner_height { - uint8 top; - uint8 right; - uint8 bottom; - uint8 left; + uint8_t top; + uint8_t right; + uint8_t bottom; + uint8_t left; }; /** @@ -120,30 +120,30 @@ static constexpr const corner_height corner_heights[] = { }; // bottom left tint -static constexpr const uint8 byte_97B524[] = { +static constexpr const uint8_t byte_97B524[] = { 2, 5, 1, 4, 2, 5, 1, 2, 2, 4, 1, 2, 1, 3, 0, 3, 1, 5, 0 }; // top left tint -static constexpr const uint32 byte_97B537[] = { +static constexpr const uint32_t byte_97B537[] = { 2, 5, 2, 4, 2, 5, 1, 1, 3, 4, 3, 2, 1, 2, 0, 3, 1, 5, 0 }; // top right tint -static constexpr const uint8 byte_97B54A[] = { +static constexpr const uint8_t byte_97B54A[] = { 2, 2, 2, 4, 0, 0, 1, 1, 3, 4, 3, 5, 1, 2, 2, 3, 1, 5, 0 }; // bottom right tint -static constexpr const uint8 byte_97B55D[] = { +static constexpr const uint8_t byte_97B55D[] = { 2, 2, 1, 4, 0, 0, 1, 2, 2, 4, 1, 5, 1, 3, 2, 3, 1, 5, 0 }; -static constexpr const uint8 _tunnelHeights[TUNNEL_TYPE_COUNT][2] = { +static constexpr const uint8_t _tunnelHeights[TUNNEL_TYPE_COUNT][2] = { { 2, 2 }, { 3, 3 }, { 3, 5 }, @@ -169,7 +169,7 @@ static constexpr const uint8 _tunnelHeights[TUNNEL_TYPE_COUNT][2] = { { 2, 2 }, }; -static constexpr const sint16 _boundBoxZOffsets[TUNNEL_TYPE_COUNT] = { +static constexpr const int16_t _boundBoxZOffsets[TUNNEL_TYPE_COUNT] = { 0, 0, -32, @@ -196,7 +196,7 @@ static constexpr const sint16 _boundBoxZOffsets[TUNNEL_TYPE_COUNT] = { }; // tunnel offset -static constexpr const uint8 byte_97B5B0[TUNNEL_TYPE_COUNT] = { +static constexpr const uint8_t byte_97B5B0[TUNNEL_TYPE_COUNT] = { 0, 0, 0, 3, 3, 3, 6, 6, 6, 6, 10, 11, 12, 13, 14, 14, 16, 17, 18, 19, 20, 21, 22 @@ -262,7 +262,7 @@ static constexpr const uint8 byte_97B5B0[TUNNEL_TYPE_COUNT] = { (base) + 100, \ } -static constexpr const uint32 _terrainEdgeSpriteIds[][EDGE_SPRITE_TYPE_COUNT] = +static constexpr const uint32_t _terrainEdgeSpriteIds[][EDGE_SPRITE_TYPE_COUNT] = { DEFINE_EDGE_SPRITES(SPR_EDGE_ROCK_BASE), DEFINE_EDGE_SPRITES(SPR_EDGE_WOOD_RED_BASE), @@ -281,7 +281,7 @@ static constexpr const uint32 _terrainEdgeSpriteIds[][EDGE_SPRITE_TYPE_COUNT] = DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_SKYSCRAPER_B_BASE), }; -static constexpr const uint32 _terrainEdgeTunnelSpriteIds[][TUNNEL_TYPE_COUNT] = +static constexpr const uint32_t _terrainEdgeTunnelSpriteIds[][TUNNEL_TYPE_COUNT] = { DEFINE_EDGE_TUNNEL_SPRITES(SPR_EDGE_ROCK_BASE), DEFINE_EDGE_TUNNEL_SPRITES(SPR_EDGE_WOOD_RED_BASE), @@ -300,13 +300,13 @@ static constexpr const uint32 _terrainEdgeTunnelSpriteIds[][TUNNEL_TYPE_COUNT] = DEFINE_EDGE_TUNNEL_SPRITES_WITH_DOORS(SPR_CSG_EDGE_SKYSCRAPER_B_BASE), }; -static constexpr const uint8 byte_97B740[] = +static constexpr const uint8_t byte_97B740[] = { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 1, 4, 0 }; -static constexpr const uint32 dword_97B750[][2] = +static constexpr const uint32_t dword_97B750[][2] = { { SPR_TERRAIN_GRASS, SPR_TERRAIN_GRASS_GRID }, { SPR_TERRAIN_SAND_YELLOW, SPR_TERRAIN_SAND_YELLOW_GRID }, @@ -325,7 +325,7 @@ static constexpr const uint32 dword_97B750[][2] = { SPR_TERRAIN_CHECKERBOARD_INVERTED, SPR_TERRAIN_CHECKERBOARD_INVERTED_GRID }, }; -static constexpr const uint32 dword_97B7C8[] = +static constexpr const uint32_t dword_97B7C8[] = { SPR_TERRAIN_GRASS_UNDERGROUND, SPR_TERRAIN_SAND_YELLOW_UNDERGROUND, @@ -344,7 +344,7 @@ static constexpr const uint32 dword_97B7C8[] = SPR_TERRAIN_CHECKERBOARD_INVERTED_UNDERGROUND, }; -static constexpr const uint32 dword_97B804[] = +static constexpr const uint32_t dword_97B804[] = { SPR_TERRAIN_PATTERN_GRASS, SPR_TERRAIN_PATTERN_SAND_YELLOW, @@ -368,7 +368,7 @@ enum FLAG_DONT_SMOOTHEN_SELF = (1 << 1), }; -static constexpr const uint8 byte_97B83C[] = +static constexpr const uint8_t byte_97B83C[] = { 0, 0, @@ -386,13 +386,13 @@ static constexpr const uint8 byte_97B83C[] = 0 }; -static constexpr const uint8 byte_97B84A[] = +static constexpr const uint8_t byte_97B84A[] = { 0, 1, 2, 3, 4, 14, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint32 dword_97B858[][2] = +static constexpr const uint32_t dword_97B858[][2] = { { SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_1, SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_1_GRID }, { SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_2, SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_2_GRID }, @@ -400,7 +400,7 @@ static constexpr const uint32 dword_97B858[][2] = { SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_4, SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_4_GRID }, }; -static constexpr const uint32 dword_97B878[][2] = +static constexpr const uint32_t dword_97B878[][2] = { { SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_1, SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_1_GRID }, { SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_2, SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_2_GRID }, @@ -408,7 +408,7 @@ static constexpr const uint32 dword_97B878[][2] = { SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_4, SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_4_GRID }, }; -static constexpr const uint32 dword_97B898[][2] = +static constexpr const uint32_t dword_97B898[][2] = { { SPR_TERRAIN_GRASS_MOWED_90, SPR_TERRAIN_GRASS_MOWED_90_GRID }, { SPR_TERRAIN_GRASS_MOWED, SPR_TERRAIN_GRASS_MOWED_GRID }, @@ -420,18 +420,18 @@ struct tile_descriptor { TileCoordsXY tile_coords; const rct_tile_element * tile_element; - uint8 terrain; - uint8 slope; + uint8_t terrain; + uint8_t slope; corner_height corner_heights; }; struct tile_surface_boundary_data { - sint32 bit_1; - sint32 bit_8; - sint32 bit_4; - sint32 bit_2; - uint32 image[5]; + int32_t bit_1; + int32_t bit_8; + int32_t bit_4; + int32_t bit_2; + uint32_t image[5]; LocationXY8 offset; LocationXY16 box_offset; LocationXY16 box_size; @@ -494,21 +494,21 @@ static constexpr const tile_surface_boundary_data _tileSurfaceBoundaries[4] = }; // clang-format on -static uint32 get_edge_image(uint8 index, uint8 type) +static uint32_t get_edge_image(uint8_t index, uint8_t type) { return _terrainEdgeSpriteIds[index][type]; } -static uint32 get_tunnel_image(uint8 index, uint8 type) +static uint32_t get_tunnel_image(uint8_t index, uint8_t type) { return _terrainEdgeTunnelSpriteIds[index][type]; } -static uint8 viewport_surface_paint_setup_get_relative_slope(const rct_tile_element * tileElement, sint32 rotation) +static uint8_t viewport_surface_paint_setup_get_relative_slope(const rct_tile_element * tileElement, int32_t rotation) { - const uint8 slope = tileElement->properties.surface.slope; - const uint8 slopeHeight = slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT; - uint16 slopeCorners = (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) << rotation; + const uint8_t slope = tileElement->properties.surface.slope; + const uint8_t slopeHeight = slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT; + uint16_t slopeCorners = (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) << rotation; slopeCorners = ((slopeCorners >> 4) | slopeCorners) & 0x0F; return slopeHeight | slopeCorners; } @@ -521,9 +521,9 @@ static void viewport_surface_smoothen_edge(paint_session * session, enum edge_t if (neighbour.tile_element == nullptr) return; - uint32 maskImageBase = 0; - uint8 neighbourCorners[2] = { 0 }; - uint8 ownCorners[2] = { 0 }; + uint32_t maskImageBase = 0; + uint8_t neighbourCorners[2] = { 0 }; + uint8_t ownCorners[2] = { 0 }; switch (edge) { @@ -564,7 +564,7 @@ static void viewport_surface_smoothen_edge(paint_session * session, enum edge_t return; } - uint8 dh = 0, cl = 0; + uint8_t dh = 0, cl = 0; switch (edge) { case EDGE_BOTTOMLEFT: @@ -606,7 +606,7 @@ static void viewport_surface_smoothen_edge(paint_session * session, enum edge_t return; } - const uint32 image_id = maskImageBase + byte_97B444[self.slope]; + const uint32_t image_id = maskImageBase + byte_97B444[self.slope]; if (paint_attach_to_previous_ps(session, image_id, 0, 0)) { @@ -631,9 +631,9 @@ static bool tile_is_inside_clip_view(const tile_descriptor& tile) return true; } -static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum edge_t edge, uint8 height, uint8 edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour, bool isWater) +static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum edge_t edge, uint8_t height, uint8_t edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour, bool isWater) { - sint16 cornerHeight1, neighbourCornerHeight1, cornerHeight2, neighbourCornerHeight2; + int16_t cornerHeight1, neighbourCornerHeight1, cornerHeight2, neighbourCornerHeight2; LocationXY8 offset = { 0, 0 }; LocationXY8 bounds = { 0, 0 }; @@ -688,7 +688,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum if (isWater) { - uint8 waterHeight = surface_get_water_height(neighbour.tile_element); + uint8_t waterHeight = surface_get_water_height(neighbour.tile_element); if (waterHeight == height && !neighbourIsClippedAway) { // Don't draw the edge when the neighbour's water level is the same @@ -708,7 +708,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum if (!is_csg_loaded() && edgeStyle >= TERRAIN_EDGE_RCT2_COUNT) edgeStyle = TERRAIN_EDGE_ROCK; - uint32 base_image_id = get_edge_image(edgeStyle, 0); + uint32_t base_image_id = get_edge_image(edgeStyle, 0); if (gCurrentViewportFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) { base_image_id = get_edge_image(edgeStyle, 1); @@ -719,11 +719,11 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum base_image_id += 5; } - uint8 curHeight = std::min(neighbourCornerHeight1, neighbourCornerHeight2); + uint8_t curHeight = std::min(neighbourCornerHeight1, neighbourCornerHeight2); if (neighbourCornerHeight2 != neighbourCornerHeight1) { // If bottom part of edge isn't straight, add a filler - uint32 image_offset = 3; + uint32_t image_offset = 3; if (neighbourCornerHeight2 >= neighbourCornerHeight1) { @@ -732,7 +732,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum if (curHeight != cornerHeight1 && curHeight != cornerHeight2) { - uint32 image_id = base_image_id + image_offset; + uint32_t image_id = base_image_id + image_offset; sub_98196C(session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * 16); curHeight++; } @@ -740,12 +740,12 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum neighbourCornerHeight1 = cornerHeight2; - for(uint32 tunnelIndex = 0; tunnelIndex < TUNNEL_MAX_COUNT;) + for(uint32_t tunnelIndex = 0; tunnelIndex < TUNNEL_MAX_COUNT;) { if (curHeight >= cornerHeight1 || curHeight >= cornerHeight2) { // If top of edge isn't straight, add a filler - uint32 image_offset = 1; + uint32_t image_offset = 1; if (curHeight >= cornerHeight1) { image_offset = 2; @@ -756,7 +756,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum } } - const uint32 image_id = base_image_id + image_offset; + const uint32_t image_id = base_image_id + image_offset; sub_98196C(session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * 16); return; @@ -780,9 +780,9 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum } // Tunnels - uint8 tunnelType = tunnelArray[tunnelIndex].type; - uint8 tunnelHeight = _tunnelHeights[tunnelType][0]; - sint16 zOffset = curHeight; + uint8_t tunnelType = tunnelArray[tunnelIndex].type; + uint8_t tunnelHeight = _tunnelHeights[tunnelType][0]; + int16_t zOffset = curHeight; if ((zOffset + tunnelHeight) > neighbourCornerHeight1 || (zOffset + tunnelHeight) > cornerHeight1) { @@ -791,15 +791,15 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum zOffset *= 16; - sint16 boundBoxOffsetZ = zOffset + _boundBoxZOffsets[tunnelType]; - sint8 boundBoxLength = _tunnelHeights[tunnelType][1] * 16; + int16_t boundBoxOffsetZ = zOffset + _boundBoxZOffsets[tunnelType]; + int8_t boundBoxLength = _tunnelHeights[tunnelType][1] * 16; if (boundBoxOffsetZ < 16) { boundBoxOffsetZ += 16; boundBoxLength -= 16; } - uint32 image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0); + uint32_t image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0); sub_98197C(session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1, zOffset, 0, 0, boundBoxOffsetZ); boundBoxOffsetZ = curHeight * 16; @@ -822,7 +822,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum /** * rct2: 0x0065EB7D, 0x0065F0D8 */ -static void viewport_surface_draw_land_side_bottom(paint_session * session, enum edge_t edge, uint8 height, uint8 edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour) +static void viewport_surface_draw_land_side_bottom(paint_session * session, enum edge_t edge, uint8_t height, uint8_t edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour) { viewport_surface_draw_tile_side_bottom(session, edge, height, edgeStyle, self, neighbour, false); } @@ -830,17 +830,17 @@ static void viewport_surface_draw_land_side_bottom(paint_session * session, enum /** * rct2: 0x0065F8B9, 0x0065FE26 */ -static void viewport_surface_draw_water_side_bottom(paint_session * session, enum edge_t edge, uint8 height, uint8 edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour) +static void viewport_surface_draw_water_side_bottom(paint_session * session, enum edge_t edge, uint8_t height, uint8_t edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour) { viewport_surface_draw_tile_side_bottom(session, edge, height, edgeStyle, self, neighbour, true); } -static void viewport_surface_draw_tile_side_top(paint_session * session, enum edge_t edge, uint8 height, uint8 terrain, struct tile_descriptor self, struct tile_descriptor neighbour, bool isWater) +static void viewport_surface_draw_tile_side_top(paint_session * session, enum edge_t edge, uint8_t height, uint8_t terrain, struct tile_descriptor self, struct tile_descriptor neighbour, bool isWater) { if (!is_csg_loaded() && terrain >= TERRAIN_EDGE_RCT2_COUNT) terrain = TERRAIN_EDGE_ROCK; - sint16 al, ah, cl, ch, dl = 0, dh; + int16_t al, ah, cl, ch, dl = 0, dh; sLocationXY8 offset = { 0, 0 }; sLocationXY8 bounds = { 0, 0 }; @@ -903,7 +903,7 @@ static void viewport_surface_draw_tile_side_top(paint_session * session, enum ed return; } - uint32 base_image_id; + uint32_t base_image_id; if (isWater) { @@ -918,20 +918,20 @@ static void viewport_surface_draw_tile_side_top(paint_session * session, enum ed { if (!(gCurrentViewportFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)) { - const uint8 incline = (cl - al) + 1; - const uint32 image_id = get_edge_image(terrain, 3) + (edge == EDGE_TOPLEFT ? 3 : 0) + incline; // var_c; - const sint16 y = (dl - al) * 16; + const uint8_t incline = (cl - al) + 1; + const uint32_t image_id = get_edge_image(terrain, 3) + (edge == EDGE_TOPLEFT ? 3 : 0) + incline; // var_c; + const int16_t y = (dl - al) * 16; paint_attach_to_previous_ps(session, image_id, 0, y); return; } base_image_id = get_edge_image(terrain, 1) + (edge == EDGE_TOPLEFT ? 5 : 0); // var_04 } - uint8 cur_height = std::min(ch, ah); + uint8_t cur_height = std::min(ch, ah); if (ch != ah) { // neighbour tile corners aren't level - uint32 image_offset = 3; + uint32_t image_offset = 3; if (ch > ah) { image_offset = 4; @@ -939,7 +939,7 @@ static void viewport_surface_draw_tile_side_top(paint_session * session, enum ed if (cur_height != al && cur_height != cl) { - const uint32 image_id = base_image_id + image_offset; + const uint32_t image_id = base_image_id + image_offset; sub_98196C(session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, cur_height * 16); cur_height++; } @@ -959,7 +959,7 @@ static void viewport_surface_draw_tile_side_top(paint_session * session, enum ed cur_height++; } - uint32 image_offset = 1; + uint32_t image_offset = 1; if (cur_height >= al) { image_offset = 2; @@ -970,14 +970,14 @@ static void viewport_surface_draw_tile_side_top(paint_session * session, enum ed } } - const uint32 image_id = base_image_id + image_offset; + const uint32_t image_id = base_image_id + image_offset; sub_98196C(session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, cur_height * 16); } /** * rct2: 0x0065F63B, 0x0065F77D */ -static void viewport_surface_draw_land_side_top(paint_session * session, enum edge_t edge, uint8 height, uint8 terrain, struct tile_descriptor self, struct tile_descriptor neighbour) +static void viewport_surface_draw_land_side_top(paint_session * session, enum edge_t edge, uint8_t height, uint8_t terrain, struct tile_descriptor self, struct tile_descriptor neighbour) { viewport_surface_draw_tile_side_top(session, edge, height, terrain, self, neighbour, false); } @@ -985,7 +985,7 @@ static void viewport_surface_draw_land_side_top(paint_session * session, enum ed /** * rct2: 0x0066039B, 0x006604F1 */ -static void viewport_surface_draw_water_side_top(paint_session * session, enum edge_t edge, uint8 height, uint8 terrain, struct tile_descriptor self, struct tile_descriptor neighbour) +static void viewport_surface_draw_water_side_top(paint_session * session, enum edge_t edge, uint8_t height, uint8_t terrain, struct tile_descriptor self, struct tile_descriptor neighbour) { viewport_surface_draw_tile_side_top(session, edge, height, terrain, self, neighbour, true); } @@ -993,17 +993,17 @@ static void viewport_surface_draw_water_side_top(paint_session * session, enum e /** * rct2: 0x0066062C */ -void surface_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement) +void surface_paint(paint_session * session, uint8_t direction, uint16_t height, const rct_tile_element * tileElement) { rct_drawpixelinfo * dpi = session->DPI; session->InteractionType = VIEWPORT_INTERACTION_ITEM_TERRAIN; session->DidPassSurface = true; session->SurfaceElement = tileElement; - const uint16 zoomLevel = dpi->zoom_level; - const uint8 rotation = session->CurrentRotation; - const uint32 terrain_type = surface_get_terrain(tileElement); - const uint8 surfaceShape = viewport_surface_paint_setup_get_relative_slope(tileElement, rotation); + const uint16_t zoomLevel = dpi->zoom_level; + const uint8_t rotation = session->CurrentRotation; + const uint32_t terrain_type = surface_get_terrain(tileElement); + const uint8_t surfaceShape = viewport_surface_paint_setup_get_relative_slope(tileElement, rotation); const LocationXY16& base = session->SpritePosition; const corner_height& cornerHeights = corner_heights[surfaceShape]; @@ -1011,26 +1011,26 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons { { base.x / 32, base.y / 32 }, tileElement, - (uint8)terrain_type, + (uint8_t)terrain_type, surfaceShape, { - (uint8)(height / 16 + cornerHeights.top), - (uint8)(height / 16 + cornerHeights.right), - (uint8)(height / 16 + cornerHeights.bottom), - (uint8)(height / 16 + cornerHeights.left), + (uint8_t)(height / 16 + cornerHeights.top), + (uint8_t)(height / 16 + cornerHeights.right), + (uint8_t)(height / 16 + cornerHeights.bottom), + (uint8_t)(height / 16 + cornerHeights.left), } }; tile_descriptor tileDescriptors[5]; tileDescriptors[0] = selfDescriptor; - for (sint32 i = 0; i < 4; i++) + for (int32_t i = 0; i < 4; i++) { const LocationXY16& offset = viewport_surface_paint_data[i][rotation]; const CoordsXY position = { - (sint32)(base.x + offset.x), - (sint32)(base.y + offset.y) + (int32_t)(base.x + offset.x), + (int32_t)(base.y + offset.y) }; tile_descriptor& descriptor = tileDescriptors[i + 1]; @@ -1047,8 +1047,8 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons continue; } - const uint32 surfaceSlope = viewport_surface_paint_setup_get_relative_slope(surfaceElement, rotation); - const uint8 baseHeight = surfaceElement->base_height / 2; + const uint32_t surfaceSlope = viewport_surface_paint_setup_get_relative_slope(surfaceElement, rotation); + const uint8_t baseHeight = surfaceElement->base_height / 2; const corner_height& ch = corner_heights[surfaceSlope]; descriptor.tile_coords = { position.x / 32, position.y / 32 }; @@ -1064,13 +1064,13 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons if ((gCurrentViewportFlags & VIEWPORT_FLAG_LAND_HEIGHTS) && (zoomLevel == 0)) { - const sint16 x = session->MapPosition.x; - const sint16 y = session->MapPosition.y; + const int16_t x = session->MapPosition.x; + const int16_t y = session->MapPosition.y; - sint32 dx = tile_element_height(x + 16, y + 16) & 0xFFFF; + int32_t dx = tile_element_height(x + 16, y + 16) & 0xFFFF; dx += 3; - sint32 image_id = (SPR_HEIGHT_MARKER_BASE + dx / 16) | 0x20780000; + int32_t image_id = (SPR_HEIGHT_MARKER_BASE + dx / 16) | 0x20780000; image_id += get_height_marker_offset(); image_id -= gMapBaseZ; @@ -1090,7 +1090,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons { const bool showGridlines = (gCurrentViewportFlags & VIEWPORT_FLAG_GRIDLINES); - sint32 branch = -1; + int32_t branch = -1; if ((tileElement->properties.surface.terrain & 0xE0) == 0) { if (tile_element_get_direction(tileElement) == 0) @@ -1106,9 +1106,9 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons } assert(surfaceShape < Util::CountOf(byte_97B444)); - const uint8 image_offset = byte_97B444[surfaceShape]; - sint32 image_id; - uint32 ebp = terrain_type; + const uint8_t image_offset = byte_97B444[surfaceShape]; + int32_t image_id; + uint32_t ebp = terrain_type; switch (branch) { @@ -1148,9 +1148,9 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons case 6: // loc_660C6A { - const sint16 x = session->MapPosition.x & 0x20; - const sint16 y = session->MapPosition.y & 0x20; - const sint32 index = (y | (x << 1)) >> 5; + const int16_t x = session->MapPosition.x & 0x20; + const int16_t y = session->MapPosition.y & 0x20; + const int32_t index = (y | (x << 1)) >> 5; if (branch == 6) { @@ -1172,13 +1172,13 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons // loc_660D02 if (gStaffDrawPatrolAreas != SPRITE_INDEX_NULL) { - const sint32 staffIndex = gStaffDrawPatrolAreas; + const int32_t staffIndex = gStaffDrawPatrolAreas; const bool is_staff_list = staffIndex & 0x8000; - const sint16 x = session->MapPosition.x, y = session->MapPosition.y; + const int16_t x = session->MapPosition.x, y = session->MapPosition.y; - uint8 staffType = staffIndex & 0x7FFF; - uint32 image_id = IMAGE_TYPE_REMAP; - uint8 patrolColour = COLOUR_LIGHT_BLUE; + uint8_t staffType = staffIndex & 0x7FFF; + uint32_t image_id = IMAGE_TYPE_REMAP; + uint8_t patrolColour = COLOUR_LIGHT_BLUE; if (!is_staff_list) { @@ -1211,8 +1211,8 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons { sub_98196C(session, SPR_TERRAIN_SELECTION_SQUARE_SIMPLE, 0, 0, 32, 32, 16, spawn.z); - const sint32 offset = ((spawn.direction ^ 2) + rotation) & 3; - const uint32 image_id = (PEEP_SPAWN_ARROW_0 + offset) | 0x20380000; + const int32_t offset = ((spawn.direction ^ 2) + rotation) & 3; + const uint32_t image_id = (PEEP_SPAWN_ARROW_0 + offset) | 0x20380000; sub_98196C(session, image_id, 0, 0, 32, 32, 19, spawn.z); } } @@ -1229,7 +1229,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons else if (tileElement->properties.surface.ownership & OWNERSHIP_AVAILABLE) { const LocationXY16& pos = session->MapPosition; - const sint32 height2 = (tile_element_height(pos.x + 16, pos.y + 16) & 0xFFFF) + 3; + const int32_t height2 = (tile_element_height(pos.x + 16, pos.y + 16) & 0xFFFF) + 3; paint_struct * backup = session->UnkF1AD28; sub_98196C(session, SPR_LAND_OWNERSHIP_AVAILABLE, 16, 16, 1, 1, 0, height2); session->UnkF1AD28 = backup; @@ -1247,7 +1247,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons else if (tileElement->properties.surface.ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) { const LocationXY16& pos = session->MapPosition; - const sint32 height2 = tile_element_height(pos.x + 16, pos.y + 16) & 0xFFFF; + const int32_t height2 = tile_element_height(pos.x + 16, pos.y + 16) & 0xFFFF; paint_struct * backup = session->UnkF1AD28; sub_98196C(session, SPR_LAND_CONSTRUCTION_RIGHTS_AVAILABLE, 16, 16, 1, 1, 0, height2 + 3); session->UnkF1AD28 = backup; @@ -1267,44 +1267,44 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons pos.y >= gMapSelectPositionA.y && pos.y <= gMapSelectPositionB.y) { - const uint16 mapSelectionType = gMapSelectType; + const uint16_t mapSelectionType = gMapSelectType; if (mapSelectionType >= MAP_SELECT_TYPE_EDGE_0) { // Walls // loc_661089: - const uint32 eax = ((((mapSelectionType - 9) + rotation) & 3) + 0x21) << 19; - const uint32 image_id = (SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; + const uint32_t eax = ((((mapSelectionType - 9) + rotation) & 3) + 0x21) << 19; + const uint32_t image_id = (SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(session, image_id, 0, 0); } else if (mapSelectionType >= MAP_SELECT_TYPE_QUARTER_0) { // loc_661051:(no jump) // Selection split into four quarter segments - const uint32 eax = ((((mapSelectionType - MAP_SELECT_TYPE_QUARTER_0) + rotation) & 3) + 0x27) << 19; - const uint32 image_id = (SPR_TERRAIN_SELECTION_QUARTER + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; + const uint32_t eax = ((((mapSelectionType - MAP_SELECT_TYPE_QUARTER_0) + rotation) & 3) + 0x27) << 19; + const uint32_t image_id = (SPR_TERRAIN_SELECTION_QUARTER + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(session, image_id, 0, 0); } else if (mapSelectionType <= MAP_SELECT_TYPE_FULL) { // Corners - uint32 eax = mapSelectionType; + uint32_t eax = mapSelectionType; if (mapSelectionType != MAP_SELECT_TYPE_FULL) { eax = (mapSelectionType + rotation) & 3; } eax = (eax + 0x21) << 19; - const uint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; + const uint32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(session, image_id, 0, 0); } else { - sint32 local_surfaceShape = surfaceShape; - sint32 local_height = height; + int32_t local_surfaceShape = surfaceShape; + int32_t local_height = height; // Water tool if (surface_get_water_height(tileElement) > 0) { - sint32 waterHeight = surface_get_water_height(tileElement) * 16; + int32_t waterHeight = surface_get_water_height(tileElement) * 16; if (waterHeight > height) { local_height += 16; @@ -1317,7 +1317,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons } else { - sint16 bl, bh; + int16_t bl, bh; bl = (surfaceShape ^ 0xF) << 2; bh = bl >> 4; @@ -1326,7 +1326,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons } } - const sint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape]) | 0x21300000; + const int32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape]) | 0x21300000; paint_struct * backup = session->UnkF1AD28; sub_98196C(session, image_id, 0, 0, 32, 32, 1, local_height); @@ -1346,13 +1346,13 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons continue; } - uint32 colours = COLOUR_GREY << 24 | COLOUR_BRIGHT_PURPLE << 19; + uint32_t colours = COLOUR_GREY << 24 | COLOUR_BRIGHT_PURPLE << 19; if (gMapSelectFlags & MAP_SELECT_FLAG_GREEN) { colours = COLOUR_GREY << 24 | COLOUR_SATURATED_GREEN << 19; } - const uint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | colours | IMAGE_TYPE_REMAP; + const uint32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | colours | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(session, image_id, 0, 0); break; } @@ -1375,22 +1375,22 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons !(gCurrentViewportFlags & VIEWPORT_FLAG_HIDE_BASE) && !(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - const uint8 image_offset = byte_97B444[surfaceShape]; - uint32 base_image = terrain_type; + const uint8_t image_offset = byte_97B444[surfaceShape]; + uint32_t base_image = terrain_type; if (rotation & 1) { base_image = byte_97B84A[terrain_type]; } - const uint32 image_id = dword_97B7C8[base_image] + image_offset; + const uint32_t image_id = dword_97B7C8[base_image] + image_offset; paint_attach_to_previous_ps(session, image_id, 0, 0); } if (!(gCurrentViewportFlags & VIEWPORT_FLAG_HIDE_VERTICAL)) { // loc_66122C: - const uint8 al_edgeStyle = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; - const uint8 di_type = tileElement->type & 0x80; + const uint8_t al_edgeStyle = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; + const uint8_t di_type = tileElement->type & 0x80; - const uint32 eax = al_edgeStyle + di_type * 2; + const uint32_t eax = al_edgeStyle + di_type * 2; if (eax != 32 && eax != 0 && eax != 96 && eax != 64) { log_verbose("eax: %d", eax); @@ -1416,28 +1416,28 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons // loc_6615A9: (water height) session->InteractionType = VIEWPORT_INTERACTION_ITEM_WATER; - const uint16 localHeight = height + 16; - const uint16 waterHeight = surface_get_water_height(tileElement) * 16; + const uint16_t localHeight = height + 16; + const uint16_t waterHeight = surface_get_water_height(tileElement) * 16; if (!gTrackDesignSaveMode) { session->WaterHeight = waterHeight; - sint32 image_offset = 0; + int32_t image_offset = 0; if (waterHeight <= localHeight) { image_offset = byte_97B740[surfaceShape & 0xF]; } - const sint32 image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; + const int32_t image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; sub_98196C(session, image_id, 0, 0, 32, 32, -1, waterHeight); paint_attach_to_previous_ps(session, SPR_WATER_OVERLAY + image_offset, 0, 0); // This wasn't in the original, but the code depended on globals that were only set in a different conditional - const uint8 al_edgeStyle = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; - const uint8 di_type = tileElement->type & 0x80; - const uint32 eax = al_edgeStyle + di_type * 2; + const uint8_t al_edgeStyle = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; + const uint8_t di_type = tileElement->type & 0x80; + const uint32_t eax = al_edgeStyle + di_type * 2; assert(eax % 32 == 0); // end new code @@ -1458,18 +1458,18 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons regs.ax = regs.ax << rotation; regs.ah = regs.al >> 4; - uint8 al = regs.al | regs.ah; + uint8_t al = regs.al | regs.ah; for (const auto& fenceData : _tileSurfaceBoundaries) { - const sint32 bit = al & 1; + const int32_t bit = al & 1; al >>= 1; if (bit == 0) continue; - sint32 local_height = height; - sint32 image_id = 0; + int32_t local_height = height; + int32_t image_id = 0; if (!(surfaceShape & fenceData.bit_1)) { // first diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index cab9d4147c..efcf01c3c4 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -31,19 +31,19 @@ #include "Paint.TileElement.h" #ifdef __TESTPAINT__ -uint16 testPaintVerticalTunnelHeight; +uint16_t testPaintVerticalTunnelHeight; #endif -static void blank_tiles_paint(paint_session * session, sint32 x, sint32 y); -static void sub_68B3FB(paint_session * session, sint32 x, sint32 y); +static void blank_tiles_paint(paint_session * session, int32_t x, int32_t y); +static void sub_68B3FB(paint_session * session, int32_t x, int32_t y); -const sint32 SEGMENTS_ALL = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; +const int32_t SEGMENTS_ALL = SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4; /** * * rct2: 0x0068B35F */ -void tile_element_paint_setup(paint_session * session, sint32 x, sint32 y) +void tile_element_paint_setup(paint_session * session, int32_t x, int32_t y) { if ( x < gMapSizeUnits && @@ -66,7 +66,7 @@ void tile_element_paint_setup(paint_session * session, sint32 x, sint32 y) * * rct2: 0x0068B2B7 */ -void sub_68B2B7(paint_session * session, sint32 x, sint32 y) +void sub_68B2B7(paint_session * session, int32_t x, int32_t y) { if ( x < gMapSizeUnits && @@ -89,9 +89,9 @@ void sub_68B2B7(paint_session * session, sint32 x, sint32 y) * * rct2: 0x0068B60E */ -static void blank_tiles_paint(paint_session * session, sint32 x, sint32 y) +static void blank_tiles_paint(paint_session * session, int32_t x, int32_t y) { - sint32 dx = 0; + int32_t dx = 0; switch (session->CurrentRotation) { case 0: @@ -113,7 +113,7 @@ static void blank_tiles_paint(paint_session * session, sint32 x, sint32 y) } dx /= 2; dx -= 16; - sint32 bx = dx + 32; + int32_t bx = dx + 32; rct_drawpixelinfo * dpi = session->DPI; if (bx <= dpi->y) return; @@ -133,7 +133,7 @@ bool gShowSupportSegmentHeights = false; * * rct2: 0x0068B3FB */ -static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) +static void sub_68B3FB(paint_session * session, int32_t x, int32_t y) { rct_drawpixelinfo *dpi = session->DPI; @@ -154,7 +154,7 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) session->MapPosition.y = y; rct_tile_element* tile_element = map_get_first_element_at(x >> 5, y >> 5); - uint8 rotation = session->CurrentRotation; + uint8_t rotation = session->CurrentRotation; bool partOfVirtualFloor = false; #ifndef __TESTPAINT__ @@ -164,7 +164,7 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) } #endif // __TESTPAINT__ - sint32 dx = 0; + int32_t dx = 0; switch (rotation) { case 0: dx = x + y; @@ -189,15 +189,15 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) session->MapPosition.x == gMapSelectArrowPosition.x && session->MapPosition.y == gMapSelectArrowPosition.y ) { - uint8 arrowRotation = + uint8_t arrowRotation = (rotation + (gMapSelectArrowDirection & 3)) & 3; - uint32 imageId = + uint32_t imageId = arrowRotation + (gMapSelectArrowDirection & 0xFC) + 0x20900C27; - sint32 arrowZ = gMapSelectArrowPosition.z; + int32_t arrowZ = gMapSelectArrowPosition.z; session->SpritePosition.x = x; session->SpritePosition.y = y; @@ -205,16 +205,16 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) sub_98197C(session, imageId, 0, 0, 32, 32, -1, arrowZ, 0, 0, arrowZ + 18); } - sint32 bx = dx + 52; + int32_t bx = dx + 52; if (bx <= dpi->y) return; const rct_tile_element* element = tile_element;//push tile_element - uint16 max_height = 0; + uint16_t max_height = 0; do{ - max_height = std::max(max_height, (uint16)element->clearance_height); + max_height = std::max(max_height, (uint16_t)element->clearance_height); } while (!(element++)->IsLastForTile()); element--; @@ -245,14 +245,14 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) session->SpritePosition.x = x; session->SpritePosition.y = y; session->DidPassSurface = false; - sint32 previousHeight = 0; + int32_t previousHeight = 0; do { // Only paint tile_elements below the clip height. if ((gCurrentViewportFlags & VIEWPORT_FLAG_CLIP_VIEW) && (tile_element->base_height > gClipHeight)) continue; - sint32 direction = tile_element_get_direction_with_offset(tile_element, rotation); - sint32 height = tile_element->base_height * 8; + int32_t direction = tile_element_get_direction_with_offset(tile_element, rotation); + int32_t height = tile_element->base_height * 8; // If we are on a new height level, look through elements on the // same height and store any types might be relevant to others @@ -346,16 +346,16 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) return; } - static constexpr const sint32 segmentPositions[][3] = { + static constexpr const int32_t segmentPositions[][3] = { {0, 6, 2}, {5, 4, 8}, {1, 7, 3}, }; - for (sint32 sy = 0; sy < 3; sy++) { - for (sint32 sx = 0; sx < 3; sx++) { - uint16 segmentHeight = session->SupportSegments[segmentPositions[sy][sx]].height; - sint32 imageColourFlats = 0b101111 << 19 | IMAGE_TYPE_TRANSPARENT; + for (int32_t sy = 0; sy < 3; sy++) { + for (int32_t sx = 0; sx < 3; sx++) { + uint16_t segmentHeight = session->SupportSegments[segmentPositions[sy][sx]].height; + int32_t imageColourFlats = 0b101111 << 19 | IMAGE_TYPE_TRANSPARENT; if (segmentHeight == 0xFFFF) { segmentHeight = session->Support.height; // white: 0b101101 @@ -365,8 +365,8 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) // Only draw supports below the clipping height. if ((gCurrentViewportFlags & VIEWPORT_FLAG_CLIP_VIEW) && (segmentHeight > gClipHeight)) continue; - sint32 xOffset = sy * 10; - sint32 yOffset = -22 + sx * 10; + int32_t xOffset = sy * 10; + int32_t yOffset = -22 + sx * 10; paint_struct * ps = sub_98197C( session, 5504 | imageColourFlats, xOffset, yOffset, 10, 10, 1, segmentHeight, xOffset + 1, yOffset + 16, segmentHeight); @@ -379,25 +379,25 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) } } -void paint_util_push_tunnel_left(paint_session * session, uint16 height, uint8 type) +void paint_util_push_tunnel_left(paint_session * session, uint16_t height, uint8_t type) { - session->LeftTunnels[session->LeftTunnelCount] = {static_cast((height / 16)), type}; + session->LeftTunnels[session->LeftTunnelCount] = {static_cast((height / 16)), type}; if (session->LeftTunnelCount < TUNNEL_MAX_COUNT - 1) { session->LeftTunnels[session->LeftTunnelCount + 1] = {0xFF, 0xFF}; session->LeftTunnelCount++; } } -void paint_util_push_tunnel_right(paint_session * session, uint16 height, uint8 type) +void paint_util_push_tunnel_right(paint_session * session, uint16_t height, uint8_t type) { - session->RightTunnels[session->RightTunnelCount] = {static_cast((height / 16)), type}; + session->RightTunnels[session->RightTunnelCount] = {static_cast((height / 16)), type}; if (session->RightTunnelCount < TUNNEL_MAX_COUNT - 1) { session->RightTunnels[session->RightTunnelCount + 1] = {0xFF, 0xFF}; session->RightTunnelCount++; } } -void paint_util_set_vertical_tunnel(paint_session * session, uint16 height) +void paint_util_set_vertical_tunnel(paint_session * session, uint16_t height) { #ifdef __TESTPAINT__ testPaintVerticalTunnelHeight = height; @@ -405,7 +405,7 @@ void paint_util_set_vertical_tunnel(paint_session * session, uint16 height) session->VerticalTunnelHeight = height / 16; } -void paint_util_set_general_support_height(paint_session * session, sint16 height, uint8 slope) +void paint_util_set_general_support_height(paint_session * session, int16_t height, uint8_t slope) { if (session->Support.height >= height) { return; @@ -414,13 +414,13 @@ void paint_util_set_general_support_height(paint_session * session, sint16 heigh paint_util_force_set_general_support_height(session, height, slope); } -void paint_util_force_set_general_support_height(paint_session * session, sint16 height, uint8 slope) +void paint_util_force_set_general_support_height(paint_session * session, int16_t height, uint8_t slope) { session->Support.height = height; session->Support.slope = slope; } -const uint16 segment_offsets[9] = { +const uint16_t segment_offsets[9] = { SEGMENT_B4, SEGMENT_B8, SEGMENT_BC, @@ -432,10 +432,10 @@ const uint16 segment_offsets[9] = { SEGMENT_D4 }; -void paint_util_set_segment_support_height(paint_session * session, sint32 segments, uint16 height, uint8 slope) +void paint_util_set_segment_support_height(paint_session * session, int32_t segments, uint16_t height, uint8_t slope) { support_height * supportSegments = session->SupportSegments; - for (sint32 s = 0; s < 9; s++) { + for (int32_t s = 0; s < 9; s++) { if (segments & segment_offsets[s]) { supportSegments[s].height = height; if (height != 0xFFFF) { @@ -445,9 +445,9 @@ void paint_util_set_segment_support_height(paint_session * session, sint32 segme } } -uint16 paint_util_rotate_segments(uint16 segments, uint8 rotation) +uint16_t paint_util_rotate_segments(uint16_t segments, uint8_t rotation) { - uint8 temp = segments & 0xFF; + uint8_t temp = segments & 0xFF; temp = rol8(temp, rotation * 2); return (segments & 0xFF00) | temp; diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.h b/src/openrct2/paint/tile_element/Paint.TileElement.h index 42511ebc67..44d2dc13ef 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.h +++ b/src/openrct2/paint/tile_element/Paint.TileElement.h @@ -77,36 +77,36 @@ enum }; #ifdef __TESTPAINT__ -extern uint16 testPaintVerticalTunnelHeight; +extern uint16_t testPaintVerticalTunnelHeight; #endif -extern const sint32 SEGMENTS_ALL; -extern const uint16 segment_offsets[9]; +extern const int32_t SEGMENTS_ALL; +extern const uint16_t segment_offsets[9]; extern bool gShowSupportSegmentHeights; extern const LocationXY16 BannerBoundBoxes[][2]; -extern const uint8 byte_98D800[4]; +extern const uint8_t byte_98D800[4]; -void paint_util_push_tunnel_left(paint_session * session, uint16 height, uint8 type); -void paint_util_push_tunnel_right(paint_session * session, uint16 height, uint8 type); -void paint_util_set_vertical_tunnel(paint_session * session, uint16 height); +void paint_util_push_tunnel_left(paint_session * session, uint16_t height, uint8_t type); +void paint_util_push_tunnel_right(paint_session * session, uint16_t height, uint8_t type); +void paint_util_set_vertical_tunnel(paint_session * session, uint16_t height); -void paint_util_set_general_support_height(paint_session * session, sint16 height, uint8 slope); -void paint_util_force_set_general_support_height(paint_session * session, sint16 height, uint8 slope); -void paint_util_set_segment_support_height(paint_session * session, sint32 segments, uint16 height, uint8 slope); -uint16 paint_util_rotate_segments(uint16 segments, uint8 rotation); +void paint_util_set_general_support_height(paint_session * session, int16_t height, uint8_t slope); +void paint_util_force_set_general_support_height(paint_session * session, int16_t height, uint8_t slope); +void paint_util_set_segment_support_height(paint_session * session, int32_t segments, uint16_t height, uint8_t slope); +uint16_t paint_util_rotate_segments(uint16_t segments, uint8_t rotation); -void tile_element_paint_setup(paint_session * session, sint32 x, sint32 y); +void tile_element_paint_setup(paint_session * session, int32_t x, int32_t y); -void entrance_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element); -void banner_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element); -void surface_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement); -void path_paint(paint_session * session, uint16 height, const rct_tile_element * tileElement); -void scenery_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement); -void fence_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement); -void large_scenery_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement); -void track_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement); +void entrance_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element); +void banner_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element); +void surface_paint(paint_session * session, uint8_t direction, uint16_t height, const rct_tile_element * tileElement); +void path_paint(paint_session * session, uint16_t height, const rct_tile_element * tileElement); +void scenery_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement); +void fence_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement); +void large_scenery_paint(paint_session * session, uint8_t direction, uint16_t height, const rct_tile_element * tileElement); +void track_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement); #endif diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index 91a96890af..3541ce9a0e 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -23,29 +23,29 @@ #include "../Paint.h" #include "Paint.TileElement.h" -static constexpr const uint8 byte_9A406C[] = { +static constexpr const uint8_t byte_9A406C[] = { 2, 2, 22, 26, 30, 34, 34, 34, 34, 34, 30, 26, 22, 2, 6, 2, 2, 2, 6, 10, 14, 18, 18, 18, 18, 18, 14, 10, 6, 2, 22, 2 }; -static constexpr const uint8 byte_9A408C[] = { +static constexpr const uint8_t byte_9A408C[] = { 0, 0, 4, 8, 12, 16, 16, 16, 16, 16, 12, 8, 4, 0, 20, 0, 0, 0, 20, 24, 28, 32, 32, 32, 32, 32, 28, 24, 20, 0, 4, 0 }; -static constexpr const uint8 byte_9A40AC[] = { +static constexpr const uint8_t byte_9A40AC[] = { 2, 2, 6, 10, 14, 18, 18, 18, 18, 18, 14, 10, 6, 2, 22, 2, 2, 2, 22, 26, 30, 34, 34, 34, 34, 34, 30, 26, 22, 2, 6, 2 }; -static constexpr const uint8 byte_9A40CC[] = { +static constexpr const uint8_t byte_9A40CC[] = { 0, 0, 20, 24, 28, 32, 32, 32, 32, 32, 28, 24, 20, 0, 4, 0, 0, 0, 4, 8, 12, 16, 16, 16, 16, 16, 12, 8, 4, 0, 20, 0 }; -static void fence_paint_door(paint_session * session, uint32 imageId, +static void fence_paint_door(paint_session * session, uint32_t imageId, rct_scenery_entry * sceneryEntry, - uint32 imageColourFlags, uint32 tertiaryColour, uint32 dword_141F710, + uint32_t imageColourFlags, uint32_t tertiaryColour, uint32_t dword_141F710, LocationXYZ16 offset, LocationXYZ16 boundsR1, LocationXYZ16 boundsR1_, LocationXYZ16 boundsR2, LocationXYZ16 boundsR2_, @@ -63,14 +63,14 @@ static void fence_paint_door(paint_session * session, uint32 imageId, paint_struct * ps; ps = sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsR1.x, boundsR1.y, (sint8)boundsR1.z, offset.z, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsR1.x, boundsR1.y, (int8_t)boundsR1.z, offset.z, boundsR1_.x, boundsR1_.y, boundsR1_.z); if (ps != nullptr) { ps->tertiary_colour = tertiaryColour; } ps = sub_98197C( - session, imageId + 1, (sint8)offset.x, (sint8)offset.y, boundsR2.x, boundsR2.y, (sint8)boundsR2.z, offset.z, + session, imageId + 1, (int8_t)offset.x, (int8_t)offset.y, boundsR2.x, boundsR2.y, (int8_t)boundsR2.z, offset.z, boundsR2_.x, boundsR2_.y, boundsR2_.z); if (ps != nullptr) { ps->tertiary_colour = tertiaryColour; @@ -79,14 +79,14 @@ static void fence_paint_door(paint_session * session, uint32 imageId, paint_struct * ps; ps = sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsL1.x, boundsL1.y, (sint8)boundsL1.z, offset.z, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsL1.x, boundsL1.y, (int8_t)boundsL1.z, offset.z, boundsL1_.x, boundsL1_.y, boundsL1_.z); if (ps != nullptr) { ps->tertiary_colour = tertiaryColour; } ps = sub_98199C( - session, imageId + 1, (sint8)offset.x, (sint8)offset.y, boundsL1.x, boundsL1.y, (sint8)boundsL1.z, offset.z, + session, imageId + 1, (int8_t)offset.x, (int8_t)offset.y, boundsL1.x, boundsL1.y, (int8_t)boundsL1.z, offset.z, boundsL1_.x, boundsL1_.y, boundsL1_.z); if (ps != nullptr) { ps->tertiary_colour = tertiaryColour; @@ -94,10 +94,10 @@ static void fence_paint_door(paint_session * session, uint32 imageId, } } -static void fence_paint_wall(paint_session * session, uint32 frameNum, const rct_scenery_entry * sceneryEntry, uint32 dword_141F710, uint32 imageColourFlags, uint32 dword_141F718, uint32 tertiaryColour, uint32 imageOffset, LocationXYZ16 offset, LocationXYZ16 bounds, LocationXYZ16 boundsOffset) +static void fence_paint_wall(paint_session * session, uint32_t frameNum, const rct_scenery_entry * sceneryEntry, uint32_t dword_141F710, uint32_t imageColourFlags, uint32_t dword_141F718, uint32_t tertiaryColour, uint32_t imageOffset, LocationXYZ16 offset, LocationXYZ16 bounds, LocationXYZ16 boundsOffset) { - uint32 baseImageId = sceneryEntry->image + imageOffset + frameNum; - uint32 imageId = baseImageId; + uint32_t baseImageId = sceneryEntry->image + imageOffset + frameNum; + uint32_t imageId = baseImageId; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_GLASS) { @@ -110,12 +110,12 @@ static void fence_paint_wall(paint_session * session, uint32 frameNum, const rct } sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, (int8_t)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z); if (dword_141F710 == 0) { imageId = baseImageId + dword_141F718; sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, (int8_t)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z); } } else { @@ -128,7 +128,7 @@ static void fence_paint_wall(paint_session * session, uint32 frameNum, const rct } paint_struct * paint = sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, (int8_t)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z); if (paint != nullptr) { paint->tertiary_colour = tertiaryColour; @@ -141,7 +141,7 @@ static void fence_paint_wall(paint_session * session, uint32 frameNum, const rct * @param height (dx) * @param tile_element (esi) */ -void fence_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element) +void fence_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tile_element) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_WALL; @@ -149,23 +149,23 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const if (sceneryEntry == nullptr) { return; } - uint32 frameNum = 0; + uint32_t frameNum = 0; if (sceneryEntry->wall.flags2 & WALL_SCENERY_2_ANIMATED) { frameNum = (gCurrentTicks & 7) * 2; } - sint32 primaryColour = wall_get_primary_colour(tile_element); - uint32 imageColourFlags = primaryColour << 19 | IMAGE_TYPE_REMAP; - uint32 dword_141F718 = imageColourFlags + 0x23800006; + int32_t primaryColour = wall_get_primary_colour(tile_element); + uint32_t imageColourFlags = primaryColour << 19 | IMAGE_TYPE_REMAP; + uint32_t dword_141F718 = imageColourFlags + 0x23800006; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) { - uint8 secondaryColour = wall_get_secondary_colour(tile_element); + uint8_t secondaryColour = wall_get_secondary_colour(tile_element); imageColourFlags |= secondaryColour << 24 | IMAGE_TYPE_REMAP_2_PLUS; } - uint32 tertiaryColour = 0; + uint32_t tertiaryColour = 0; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR) { tertiaryColour = wall_get_tertiary_colour(tile_element); imageColourFlags &= 0x0DFFFFFFF; @@ -173,7 +173,7 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const paint_util_set_general_support_height(session, height, 0x20); - uint32 dword_141F710 = 0; + uint32_t dword_141F710 = 0; if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { if (!track_design_save_contains_tile_element(tile_element)) { dword_141F710 = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); @@ -187,29 +187,29 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const // Save tile_element - uint8 ah = sceneryEntry->wall.height * 8 - 2; + uint8_t ah = sceneryEntry->wall.height * 8 - 2; if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOOR) { LocationXYZ16 offset; LocationXYZ16 boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_; - uint8 animationFrame = wall_get_animation_frame(tile_element); + uint8_t animationFrame = wall_get_animation_frame(tile_element); // Add the direction as well animationFrame |= (tile_element->properties.wall.animation & WALL_ANIMATION_FLAG_DIRECTION_BACKWARD) >> 3; - uint32 imageId; + uint32_t imageId; switch (direction) { case 0: imageId = sceneryEntry->image + byte_9A406C[animationFrame]; - boundsR1 = {1, 3, static_cast(ah - 5)}; - boundsR1_ = {1, 1, static_cast(height + 1)}; + boundsR1 = {1, 3, static_cast(ah - 5)}; + boundsR1_ = {1, 1, static_cast(height + 1)}; boundsR2 = {1, 28, 3}; - boundsR2_ = {1, 1, static_cast(height + ah - 9)}; + boundsR2_ = {1, 1, static_cast(height + ah - 9)}; boundsL1 = {1, 28, ah}; - boundsL1_ = {1, 1, static_cast(height + 1)}; + boundsL1_ = {1, 1, static_cast(height + 1)}; - offset = {0, 0, static_cast(height)}; + offset = {0, 0, static_cast(height)}; fence_paint_door(session, imageId, sceneryEntry, imageColourFlags, tertiaryColour, dword_141F710, offset, boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_); break; @@ -217,15 +217,15 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const case 1: imageId = sceneryEntry->image + byte_9A408C[animationFrame]; - boundsR1 = {3, 3, static_cast(ah - 5)}; - boundsR1_ = {1, 30, static_cast(height + 1)}; + boundsR1 = {3, 3, static_cast(ah - 5)}; + boundsR1_ = {1, 30, static_cast(height + 1)}; boundsR2 = {29, 3, 2}; - boundsR2_ = {1, 30, static_cast(height + ah - 8)}; + boundsR2_ = {1, 30, static_cast(height + ah - 8)}; boundsL1 = {29, 1, ah}; - boundsL1_ = {2, 30, static_cast(height + 1)}; + boundsL1_ = {2, 30, static_cast(height + 1)}; - offset = {1, 31, static_cast(height)}; + offset = {1, 31, static_cast(height)}; fence_paint_door(session, imageId, sceneryEntry, imageColourFlags, tertiaryColour, dword_141F710, offset, boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_); break; @@ -233,15 +233,15 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const case 2: imageId = sceneryEntry->image + byte_9A40AC[animationFrame]; - boundsR1 = {3, 3, static_cast(ah - 5)}; - boundsR1_ = {30, 1, static_cast(height + 1)}; + boundsR1 = {3, 3, static_cast(ah - 5)}; + boundsR1_ = {30, 1, static_cast(height + 1)}; boundsR2 = {3, 29, 2}; - boundsR2_ = {30, 1, static_cast(height + ah - 8)}; + boundsR2_ = {30, 1, static_cast(height + ah - 8)}; boundsL1 = {1, 29, ah}; - boundsL1_ = {30, 2, static_cast(height + 1)}; + boundsL1_ = {30, 2, static_cast(height + 1)}; - offset = {31, 0, static_cast(height)}; + offset = {31, 0, static_cast(height)}; fence_paint_door(session, imageId, sceneryEntry, imageColourFlags, tertiaryColour, dword_141F710, offset, boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_); break; @@ -249,15 +249,15 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const case 3: imageId = sceneryEntry->image + byte_9A40CC[animationFrame]; - boundsR1 = {3, 1, static_cast(ah - 5)}; - boundsR1_ = {1, 1, static_cast(height + 1)}; + boundsR1 = {3, 1, static_cast(ah - 5)}; + boundsR1_ = {1, 1, static_cast(height + 1)}; boundsR2 = {28, 1, 3}; - boundsR2_ = {1, 1, static_cast(height + ah - 9)}; + boundsR2_ = {1, 1, static_cast(height + ah - 9)}; boundsL1 = {28, 1, ah}; - boundsL1_ = {1, 1, static_cast(height + 1)}; + boundsL1_ = {1, 1, static_cast(height + 1)}; - offset = {2, 1, static_cast(height)}; + offset = {2, 1, static_cast(height)}; fence_paint_door(session, imageId, sceneryEntry, imageColourFlags, tertiaryColour, dword_141F710, offset, boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_); break; @@ -267,7 +267,7 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const } - uint32 imageOffset = 0; + uint32_t imageOffset = 0; LocationXYZ16 offset = { 0, 0, 0 }, bounds = { 0, 0, 0 }, boundsOffset = { 0, 0, 0 }; switch (direction) { @@ -280,9 +280,9 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const imageOffset = 1; } - offset = {0, 0, static_cast(height)}; + offset = {0, 0, static_cast(height)}; bounds = {1, 28, ah}; - boundsOffset = {1, 1, static_cast(height + 1)}; + boundsOffset = {1, 1, static_cast(height + 1)}; break; case 1: @@ -304,9 +304,9 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const } } - offset = {1, 31, static_cast(height)}; + offset = {1, 31, static_cast(height)}; bounds = {29, 1, ah}; - boundsOffset = {2, 30, static_cast(height + 1)}; + boundsOffset = {2, 30, static_cast(height + 1)}; break; case 2: @@ -322,9 +322,9 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const imageOffset += 6; } - offset = {31, 0, static_cast(height)}; + offset = {31, 0, static_cast(height)}; bounds = {1, 29, ah}; - boundsOffset = {30, 2, static_cast(height + 1)}; + boundsOffset = {30, 2, static_cast(height + 1)}; break; case 3: @@ -336,9 +336,9 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const imageOffset = 0; } - offset = {2, 1, static_cast(height)}; + offset = {2, 1, static_cast(height)}; bounds = {28, 1, ah}; - boundsOffset = {1, 1, static_cast(height + 1)}; + boundsOffset = {1, 1, static_cast(height + 1)}; break; } @@ -353,10 +353,10 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const return; } - set_format_arg(0, uint32, 0); - set_format_arg(4, uint32, 0); + set_format_arg(0, uint32_t, 0); + set_format_arg(4, uint32_t, 0); - uint8 secondaryColour = wall_get_secondary_colour(tile_element); + uint8_t secondaryColour = wall_get_secondary_colour(tile_element); if (dword_141F710 != 0) { secondaryColour = COLOUR_GREY; @@ -366,11 +366,11 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const secondaryColour |= 0x80; } - set_format_arg(7, uint8, secondaryColour); + set_format_arg(7, uint8_t, secondaryColour); - uint16 scrollingMode = sceneryEntry->wall.scrolling_mode + ((direction + 1) & 0x3); + uint16_t scrollingMode = sceneryEntry->wall.scrolling_mode + ((direction + 1) & 0x3); - uint8 bannerIndex = tile_element->properties.wall.banner_index; + uint8_t bannerIndex = tile_element->properties.wall.banner_index; rct_banner * banner = &gBanners[bannerIndex]; set_format_arg(0, rct_string_id, banner->string_idx); @@ -378,7 +378,7 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const { Ride * ride = get_ride(banner->ride_index); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); } utf8 signString[256]; @@ -391,8 +391,8 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, const gCurrentFontSpriteBase = FONT_SPRITE_BASE_TINY; - uint16 string_width = gfx_get_string_width(signString); - uint16 scroll = (gCurrentTicks / 2) % string_width; + uint16_t string_width = gfx_get_string_width(signString); + uint16_t scroll = (gCurrentTicks / 2) % string_width; sub_98199C( session, scrolling_text_setup(session, stringId, scroll, scrollingMode), 0, 0, 1, 1, 13, height + 8, boundsOffset.x, diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 19de36c5e2..8caacdd925 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -149,7 +149,7 @@ static constexpr const ride_rating NauseaMaximumThresholds[] = { }; /** rct2: 0x0097EFCC */ -static constexpr const uint8 item_standard_litter[32] = { +static constexpr const uint8_t item_standard_litter[32] = { LITTER_TYPE_RUBBISH, // PEEP_ITEM_BALLOON LITTER_TYPE_RUBBISH, // PEEP_ITEM_TOY LITTER_TYPE_RUBBISH, // PEEP_ITEM_MAP @@ -181,7 +181,7 @@ static constexpr const uint8 item_standard_litter[32] = { }; /** rct2: 0x0097EFE8 */ -static constexpr const uint8 item_extra_litter[32] = { +static constexpr const uint8_t item_extra_litter[32] = { LITTER_TYPE_RUBBISH, // PEEP_ITEM_PHOTO2 LITTER_TYPE_RUBBISH, // PEEP_ITEM_PHOTO3 LITTER_TYPE_RUBBISH, // PEEP_ITEM_PHOTO4 @@ -207,7 +207,7 @@ static constexpr const uint8 item_extra_litter[32] = { }; /** rct2: 0x009822F4, 0x00982310 */ -static constexpr const uint8 item_consumption_time[] = { +static constexpr const uint8_t item_consumption_time[] = { 0, // SHOP_ITEM_BALLOON 0, // SHOP_ITEM_TOY 0, // SHOP_ITEM_MAP @@ -265,7 +265,7 @@ static constexpr const uint8 item_consumption_time[] = { }; /** rct2: 009823AC */ -static constexpr const uint8 crowded_thoughts[] = { +static constexpr const uint8_t crowded_thoughts[] = { PEEP_THOUGHT_TYPE_LOST, PEEP_THOUGHT_TYPE_TIRED, PEEP_THOUGHT_TYPE_BAD_LITTER, @@ -285,7 +285,7 @@ static constexpr const uint8 crowded_thoughts[] = { }; /** rct2: 0x00982326 */ -static constexpr const uint8 peep_item_containers[] = { +static constexpr const uint8_t peep_item_containers[] = { 0xFF, // PEEP_ITEM_BALLOON 0xFF, // PEEP_ITEM_TOY 0xFF, // PEEP_ITEM_MAP @@ -317,7 +317,7 @@ static constexpr const uint8 peep_item_containers[] = { }; /** rct2: 0x00982342 */ -static constexpr const uint8 peep_extra_item_containers[] = { +static constexpr const uint8_t peep_extra_item_containers[] = { 0xFF, // PEEP_ITEM_PHOTO2 0xFF, // PEEP_ITEM_PHOTO3 0xFF, // PEEP_ITEM_PHOTO4 @@ -348,29 +348,29 @@ static constexpr const ride_rating NauseaMinimumThresholds[] = { }; // clang-format on -static bool peep_has_voucher_for_free_ride(rct_peep * peep, sint32 rideIndex); -static void peep_ride_is_too_intense(rct_peep * peep, sint32 rideIndex, bool peepAtRide); +static bool peep_has_voucher_for_free_ride(rct_peep * peep, int32_t rideIndex); +static void peep_ride_is_too_intense(rct_peep * peep, int32_t rideIndex, bool peepAtRide); static void peep_reset_ride_heading(rct_peep * peep); -static void peep_tried_to_enter_full_queue(rct_peep * peep, sint32 rideIndex); -static sint16 peep_calculate_ride_satisfaction(rct_peep * peep, Ride * ride); +static void peep_tried_to_enter_full_queue(rct_peep * peep, int32_t rideIndex); +static int16_t peep_calculate_ride_satisfaction(rct_peep * peep, Ride * ride); static void peep_update_favourite_ride(rct_peep * peep, Ride * ride); -static sint16 peep_calculate_ride_value_satisfaction(rct_peep * peep, Ride * ride); -static sint16 peep_calculate_ride_intensity_nausea_satisfaction(rct_peep * peep, Ride * ride); +static int16_t peep_calculate_ride_value_satisfaction(rct_peep * peep, Ride * ride); +static int16_t peep_calculate_ride_intensity_nausea_satisfaction(rct_peep * peep, Ride * ride); static void peep_update_ride_nausea_growth(rct_peep * peep, Ride * ride); static bool peep_should_go_on_ride_again(rct_peep * peep, Ride * ride); static bool peep_should_preferred_intensity_increase(rct_peep * peep); static bool peep_really_liked_ride(rct_peep * peep, Ride * ride); -static uint8 peep_assess_surroundings(sint16 centre_x, sint16 centre_y, sint16 centre_z); +static uint8_t peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z); static void peep_update_hunger(rct_peep * peep); static void peep_decide_whether_to_leave_park(rct_peep * peep); static void peep_leave_park(rct_peep * peep); -static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType); -static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTypeFlags); -bool loc_690FD0(rct_peep * peep, uint8 * rideToView, uint8 * rideSeatToView, rct_tile_element * tileElement); +static void peep_head_for_nearest_ride_type(rct_peep * peep, int32_t rideType); +static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, int32_t rideTypeFlags); +bool loc_690FD0(rct_peep * peep, uint8_t * rideToView, uint8_t * rideSeatToView, rct_tile_element * tileElement); -void rct_peep::Tick128UpdateGuest(sint32 index) +void rct_peep::Tick128UpdateGuest(int32_t index) { - if ((uint32)(index & 0x1FF) == (gCurrentTicks & 0x1FF)) + if ((uint32_t)(index & 0x1FF) == (gCurrentTicks & 0x1FF)) { /* Effect of masking with 0x1FF here vs mask 0x7F, * which is the condition for calling this function, is @@ -378,7 +378,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) * is executed to once every four calls. */ if (peep_flags & PEEP_FLAGS_CROWDED) { - uint8 thought_type = crowded_thoughts[scenario_rand() & 0xF]; + uint8_t thought_type = crowded_thoughts[scenario_rand() & 0xF]; if (thought_type != PEEP_THOUGHT_TYPE_NONE) { peep_insert_new_thought(this, thought_type, PEEP_THOUGHT_ITEM_NONE); @@ -439,7 +439,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) if (x != LOCATION_NULL) { - uint8 thought_type = peep_assess_surroundings(x & 0xFFE0, y & 0xFFE0, z); + uint8_t thought_type = peep_assess_surroundings(x & 0xFFE0, y & 0xFFE0, z); if (thought_type != PEEP_THOUGHT_TYPE_NONE) { @@ -469,7 +469,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) { Ride * ride = get_ride(current_ride); - uint8 thought_type = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? PEEP_THOUGHT_TYPE_GET_OUT + uint8_t thought_type = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? PEEP_THOUGHT_TYPE_GET_OUT : PEEP_THOUGHT_TYPE_GET_OFF; peep_insert_new_thought(this, thought_type, current_ride); @@ -481,7 +481,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) no_of_rides == 0 && guest_heading_to_ride_id == 0xFF) { - uint32 time_duration = gScenarioTicks - time_in_park; + uint32_t time_duration = gScenarioTicks - time_in_park; time_duration /= 2048; if (time_duration >= 5) @@ -503,7 +503,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) PickRideToGoOn(); } - if ((uint32)(index & 0x3FF) == (gCurrentTicks & 0x3FF)) + if ((uint32_t)(index & 0x3FF) == (gCurrentTicks & 0x3FF)) { /* Effect of masking with 0x3FF here vs mask 0x1FF, * which is used in the encompassing conditional, is @@ -514,8 +514,8 @@ void rct_peep::Tick128UpdateGuest(sint32 index) if (outside_of_park == 0 && (state == PEEP_STATE_WALKING || state == PEEP_STATE_SITTING)) { - uint8 num_thoughts = 0; - uint8 possible_thoughts[5] = { 0 }; + uint8_t num_thoughts = 0; + uint8_t possible_thoughts[5] = { 0 }; if (peep_flags & PEEP_FLAGS_LEAVING_PARK) { @@ -559,7 +559,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) if (num_thoughts != 0) { - uint8 chosen_thought = possible_thoughts[scenario_rand() % num_thoughts]; + uint8_t chosen_thought = possible_thoughts[scenario_rand() % num_thoughts]; peep_insert_new_thought(this, chosen_thought, PEEP_THOUGHT_ITEM_NONE); @@ -589,7 +589,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) * the alternate time to the true branch). */ if (nausea >= 140) { - uint8 thought_type = PEEP_THOUGHT_TYPE_SICK; + uint8_t thought_type = PEEP_THOUGHT_TYPE_SICK; if (nausea >= 200) { thought_type = PEEP_THOUGHT_TYPE_VERY_SICK; @@ -644,7 +644,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) // Check if the footpath has a queue line TV monitor on it if (footpath_element_has_path_scenery(tileElement) && !footpath_element_path_scenery_is_ghost(tileElement)) { - uint8 pathSceneryIndex = footpath_element_get_path_scenery_index(tileElement); + uint8_t pathSceneryIndex = footpath_element_get_path_scenery_index(tileElement); rct_scenery_entry * sceneryEntry = get_footpath_item_entry(pathSceneryIndex); if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_IS_QUEUE_SCREEN) { @@ -716,7 +716,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) if (state == PEEP_STATE_WALKING && nausea_target >= 128) { - if ((scenario_rand() & 0xFF) <= (uint8)((nausea - 128) / 2)) + if ((scenario_rand() & 0xFF) <= (uint8_t)((nausea - 128) / 2)) { if (action >= PEEP_ACTION_NONE_1) { @@ -756,12 +756,12 @@ void rct_peep::Tick128UpdateGuest(sint32 index) if (time_to_consume == 0) { - sint32 chosen_food = bitscanforward(HasFoodStandardFlag()); + int32_t chosen_food = bitscanforward(HasFoodStandardFlag()); if (chosen_food != -1) { item_standard_flags &= ~(1 << chosen_food); - uint8 discard_container = peep_item_containers[chosen_food]; + uint8_t discard_container = peep_item_containers[chosen_food]; if (discard_container != 0xFF) { item_standard_flags |= (1 << discard_container); @@ -776,7 +776,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) if (chosen_food != -1) { item_extra_flags &= ~(1 << chosen_food); - uint8 discard_container = peep_extra_item_containers[chosen_food]; + uint8_t discard_container = peep_extra_item_containers[chosen_food]; if (discard_container != 0xFF) { if (discard_container >= 32) @@ -792,8 +792,8 @@ void rct_peep::Tick128UpdateGuest(sint32 index) } } - uint8 newEnergy = energy; - uint8 newTargetEnergy = energy_target; + uint8_t newEnergy = energy; + uint8_t newTargetEnergy = energy_target; if (newEnergy >= newTargetEnergy) { newEnergy -= 2; @@ -811,7 +811,7 @@ void rct_peep::Tick128UpdateGuest(sint32 index) newEnergy = PEEP_MIN_ENERGY; /* Previous code here suggested maximum energy is 128. */ - newEnergy = std::min(static_cast(PEEP_MAX_ENERGY), newEnergy); + newEnergy = std::min(static_cast(PEEP_MAX_ENERGY), newEnergy); if (newEnergy != energy) { @@ -819,8 +819,8 @@ void rct_peep::Tick128UpdateGuest(sint32 index) window_invalidate_flags |= PEEP_INVALIDATE_PEEP_2; } - uint8 newHappiness = happiness; - uint8 newHappinessGrowth = happiness_target; + uint8_t newHappiness = happiness; + uint8_t newHappinessGrowth = happiness_target; if (newHappiness >= newHappinessGrowth) { newHappiness = std::max(newHappiness - 4, 0); @@ -840,8 +840,8 @@ void rct_peep::Tick128UpdateGuest(sint32 index) window_invalidate_flags |= PEEP_INVALIDATE_PEEP_2; } - uint8 newNausea = nausea; - uint8 newNauseaGrowth = nausea_target; + uint8_t newNausea = nausea; + uint8_t newNauseaGrowth = nausea_target; if (newNausea >= newNauseaGrowth) { newNausea = std::max(newNausea - 4, 0); @@ -897,15 +897,15 @@ void rct_peep::UpdateSitting() return; // 691541 - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; LocationXYZ16 loc = { - (sint16)((x & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].x), - (sint16)((y & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].y), + (int16_t)((x & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].x), + (int16_t)((y & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].y), z }; @@ -969,7 +969,7 @@ void rct_peep::UpdateSitting() return; } - sint32 rand = scenario_rand(); + int32_t rand = scenario_rand(); if ((rand & 0xFFFF) > 131) { TryGetUpFromSitting(); @@ -1007,7 +1007,7 @@ void rct_peep::RemoveFromQueue() { Ride * ride = get_ride(current_ride); - uint8 cur_station = current_ride_station; + uint8_t cur_station = current_ride_station; // Make sure we don't underflow, building while paused might reset it to 0 where peeps have // not yet left the queue. if (ride->queue_length[cur_station] > 0) @@ -1021,7 +1021,7 @@ void rct_peep::RemoveFromQueue() return; } - uint16 spriteId = ride->last_peep_in_queue[cur_station]; + uint16_t spriteId = ride->last_peep_in_queue[cur_station]; while (spriteId != SPRITE_INDEX_NULL) { rct_peep * other_peep = GET_PEEP(spriteId); @@ -1034,7 +1034,7 @@ void rct_peep::RemoveFromQueue() } } -bool rct_peep::HasItem(sint32 peepItem) const +bool rct_peep::HasItem(int32_t peepItem) const { if (peepItem < 32) { @@ -1046,7 +1046,7 @@ bool rct_peep::HasItem(sint32 peepItem) const } } -sint32 rct_peep::HasFoodStandardFlag() const +int32_t rct_peep::HasFoodStandardFlag() const { return item_standard_flags & (PEEP_ITEM_DRINK | PEEP_ITEM_BURGER | PEEP_ITEM_CHIPS | PEEP_ITEM_ICE_CREAM | PEEP_ITEM_CANDYFLOSS | @@ -1054,7 +1054,7 @@ sint32 rct_peep::HasFoodStandardFlag() const PEEP_ITEM_DOUGHNUT | PEEP_ITEM_COFFEE | PEEP_ITEM_CHICKEN | PEEP_ITEM_LEMONADE); } -sint32 rct_peep::HasFoodExtraFlag() const +int32_t rct_peep::HasFoodExtraFlag() const { return item_extra_flags & (PEEP_ITEM_PRETZEL | PEEP_ITEM_CHOCOLATE | PEEP_ITEM_ICED_TEA | PEEP_ITEM_FUNNEL_CAKE | PEEP_ITEM_BEEF_NOODLES | PEEP_ITEM_FRIED_RICE_NOODLES | PEEP_ITEM_WONTON_SOUP | @@ -1082,13 +1082,13 @@ bool rct_peep::HasDrink() const return HasDrinkStandardFlag() || HasDrinkExtraFlag(); } -sint32 rct_peep::HasEmptyContainerStandardFlag() const +int32_t rct_peep::HasEmptyContainerStandardFlag() const { return item_standard_flags & (PEEP_ITEM_EMPTY_CAN | PEEP_ITEM_EMPTY_BURGER_BOX | PEEP_ITEM_EMPTY_CUP | PEEP_ITEM_RUBBISH | PEEP_ITEM_EMPTY_BOX | PEEP_ITEM_EMPTY_BOTTLE); } -sint32 rct_peep::HasEmptyContainerExtraFlag() const +int32_t rct_peep::HasEmptyContainerExtraFlag() const { return item_extra_flags & (PEEP_ITEM_EMPTY_BOWL_RED | PEEP_ITEM_EMPTY_DRINK_CARTON | PEEP_ITEM_EMPTY_JUICE_CUP | PEEP_ITEM_EMPTY_BOWL_BLUE); @@ -1191,7 +1191,7 @@ void rct_peep::CheckCantFindExit() * * rct2: 0x0069AF1E */ -bool rct_peep::DecideAndBuyItem(uint8 rideIndex, sint32 shopItem, money32 price) +bool rct_peep::DecideAndBuyItem(uint8_t rideIndex, int32_t shopItem, money32 price) { Ride * ride = get_ride(rideIndex); money32 itemValue; @@ -1212,7 +1212,7 @@ bool rct_peep::DecideAndBuyItem(uint8 rideIndex, sint32 shopItem, money32 price) if (shop_item_is_food_or_drink(shopItem)) { - sint32 food = -1; + int32_t food = -1; if ((food = HasFoodStandardFlag()) != 0) { peep_insert_new_thought(this, PEEP_THOUGHT_TYPE_HAVENT_FINISHED, bitscanforward(food)); @@ -1306,7 +1306,7 @@ loc_69B119: if (itemValue > ((money16)(scenario_rand() & 0x07))) { // "I'm not paying that much for x" - uint8 thought_type = + uint8_t thought_type = (shopItem >= 32 ? (PEEP_THOUGHT_TYPE_PHOTO2_MUCH + (shopItem - 32)) : (PEEP_THOUGHT_TYPE_BALLOON_MUCH + shopItem)); peep_insert_new_thought(this, thought_type, rideIndex); @@ -1323,14 +1323,14 @@ loc_69B119: if (itemValue >= (money32)(scenario_rand() & 0x07)) { // "This x is a really good value" - uint8 thought_item = + uint8_t thought_item = (shopItem >= 32 ? (PEEP_THOUGHT_TYPE_PHOTO2 + (shopItem - 32)) : (PEEP_THOUGHT_TYPE_BALLOON + shopItem)); peep_insert_new_thought(this, thought_item, rideIndex); } } - sint32 happinessGrowth = itemValue * 4; + int32_t happinessGrowth = itemValue * 4; happiness_target = std::min((happiness_target + happinessGrowth), PEEP_MAX_HAPPINESS); happiness = std::min((happiness + happinessGrowth), PEEP_MAX_HAPPINESS); } @@ -1347,7 +1347,7 @@ loc_69B221: itemValue = get_shop_base_value(shopItem); itemValue -= price; - uint8 satisfaction = 0; + uint8_t satisfaction = 0; if (itemValue > -8) { satisfaction++; @@ -1384,7 +1384,7 @@ loc_69B221: if (shopItem == SHOP_ITEM_MAP) peep_reset_pathfind_goal(this); - uint16 consumptionTime = item_consumption_time[shopItem]; + uint16_t consumptionTime = item_consumption_time[shopItem]; time_to_consume = std::min((time_to_consume + consumptionTime), 255); if (shopItem == SHOP_ITEM_PHOTO) @@ -1404,7 +1404,7 @@ loc_69B221: if (peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, name_string_idx); - set_format_arg(2, uint32, id); + set_format_arg(2, uint32_t, id); set_format_arg(6, rct_string_id, ShopItemStringIds[shopItem].indefinite); if (gConfigNotifications.guest_bought_item) { @@ -1464,15 +1464,15 @@ loc_69B221: * ride's satisfaction value. * rct2: 0x0069545B */ -void rct_peep::OnEnterRide(uint8 rideIndex) +void rct_peep::OnEnterRide(uint8_t rideIndex) { Ride * ride = get_ride(rideIndex); // Calculate how satisfying the ride is for the peep. Can range from -140 to +105. - sint16 satisfaction = peep_calculate_ride_satisfaction(this, ride); + int16_t satisfaction = peep_calculate_ride_satisfaction(this, ride); // Update the satisfaction stat of the ride. - uint8 rideSatisfaction = 0; + uint8_t rideSatisfaction = 0; if (satisfaction >= 40) rideSatisfaction = 3; else if (satisfaction >= 20) @@ -1496,7 +1496,7 @@ void rct_peep::OnEnterRide(uint8 rideIndex) * * rct2: 0x0069576E */ -void rct_peep::OnExitRide(uint8 rideIndex) +void rct_peep::OnExitRide(uint8_t rideIndex) { Ride * ride = get_ride(rideIndex); @@ -1540,7 +1540,7 @@ void rct_peep::OnExitRide(uint8 rideIndex) { peep_insert_new_thought(this, PEEP_THOUGHT_TYPE_WAS_GREAT, rideIndex); - sint32 laugh = scenario_rand() & 7; + int32_t laugh = scenario_rand() & 7; if (laugh < 3) { audio_play_sound_at_location(SOUND_LAUGH_1 + laugh, x, y, z); @@ -1592,7 +1592,7 @@ void rct_peep::PickRideToGoOn() if (x == LOCATION_NULL) return; - uint32 rideConsideration[8]{}; + uint32_t rideConsideration[8]{}; // FIX Originally checked for a toy, likely a mistake and should be a map, // but then again this seems to only allow the peep to go on @@ -1600,7 +1600,7 @@ void rct_peep::PickRideToGoOn() if (item_standard_flags & PEEP_ITEM_MAP) { // Consider rides that peep hasn't been on yet - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (!HasRidden(i)) @@ -1612,11 +1612,11 @@ void rct_peep::PickRideToGoOn() else { // Take nearby rides into consideration - sint32 cx = floor2(x, 32); - sint32 cy = floor2(y, 32); - for (sint32 tileX = cx - 320; tileX <= cx + 320; tileX += 32) + int32_t cx = floor2(x, 32); + int32_t cy = floor2(y, 32); + for (int32_t tileX = cx - 320; tileX <= cx + 320; tileX += 32) { - for (sint32 tileY = cy - 320; tileY <= cy + 320; tileY += 32) + for (int32_t tileY = cy - 320; tileY <= cy + 320; tileY += 32) { if (tileX >= 0 && tileY >= 0 && tileX < (256 * 32) && tileY < (256 * 32)) { @@ -1626,7 +1626,7 @@ void rct_peep::PickRideToGoOn() if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); rideConsideration[rideIndex >> 5] |= (1u << (rideIndex & 0x1F)); } while (!(tileElement++)->IsLastForTile()); } @@ -1634,7 +1634,7 @@ void rct_peep::PickRideToGoOn() } // Always take the tall rides into consideration (realistic as you can usually see them from anywhere in the park) - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride->status != RIDE_STATUS_OPEN) @@ -1649,10 +1649,10 @@ void rct_peep::PickRideToGoOn() } // Filter the considered rides - uint8 potentialRides[256]; - uint8 * nextPotentialRide = &potentialRides[0]; - sint32 numPotentialRides = 0; - for (sint32 i = 0; i < MAX_RIDES; i++) + uint8_t potentialRides[256]; + uint8_t * nextPotentialRide = &potentialRides[0]; + int32_t numPotentialRides = 0; + for (int32_t i = 0; i < MAX_RIDES; i++) { if (!(rideConsideration[i >> 5] & (1u << (i & 0x1F)))) continue; @@ -1669,9 +1669,9 @@ void rct_peep::PickRideToGoOn() } // Pick the most exciting ride - sint32 mostExcitingRideIndex = -1; + int32_t mostExcitingRideIndex = -1; ride_rating mostExcitingRideRating = 0; - for (sint32 i = 0; i < numPotentialRides; i++) + for (int32_t i = 0; i < numPotentialRides; i++) { ride = get_ride(potentialRides[i]); if (!ride_has_ratings(ride)) @@ -1711,7 +1711,7 @@ void rct_peep::PickRideToGoOn() * ride/shop, or they may just be thinking about it. * rct2: 0x006960AB */ -bool rct_peep::ShouldGoOnRide(sint32 rideIndex, sint32 entranceNum, bool atQueue, bool thinking) +bool rct_peep::ShouldGoOnRide(int32_t rideIndex, int32_t entranceNum, bool atQueue, bool thinking) { Ride * ride = get_ride(rideIndex); @@ -1765,9 +1765,9 @@ bool rct_peep::ShouldGoOnRide(sint32 rideIndex, sint32 entranceNum, bool atQueue rct_peep * lastPeepInQueue = GET_PEEP(ride->last_peep_in_queue[entranceNum]); if (abs(lastPeepInQueue->z - z) <= 6) { - sint32 dx = abs(lastPeepInQueue->x - x); - sint32 dy = abs(lastPeepInQueue->y - y); - sint32 maxD = std::max(dx, dy); + int32_t dx = abs(lastPeepInQueue->x - x); + int32_t dy = abs(lastPeepInQueue->y - y); + int32_t maxD = std::max(dx, dy); // Unlike normal paths, peeps cannot overlap when queueing for a ride. // This check enforces a minimum distance between peeps entering the queue. @@ -1942,7 +1942,7 @@ bool rct_peep::ShouldGoOnRide(sint32 rideIndex, sint32 entranceNum, bool atQueue } } - uint32 value = ride->value; + uint32_t value = ride->value; // If the value of the ride hasn't yet been calculated, peeps will be willing to pay any amount for the ride. if (value != 0xFFFF && !peep_has_voucher_for_free_ride(this, rideIndex) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) @@ -2002,7 +2002,7 @@ bool rct_peep::ShouldGoOnRide(sint32 rideIndex, sint32 entranceNum, bool atQueue return false; } -bool rct_peep::ShouldGoToShop(sint32 rideIndex, bool peepAtShop) +bool rct_peep::ShouldGoToShop(int32_t rideIndex, bool peepAtShop) { Ride * ride = get_ride(rideIndex); @@ -2116,29 +2116,29 @@ void rct_peep::SpendMoney(money16 & peep_expend_type, money32 amount) audio_play_sound_at_location(SOUND_PURCHASE, x, y, z); } -void rct_peep::SetHasRidden(sint32 rideIndex) +void rct_peep::SetHasRidden(int32_t rideIndex) { rides_been_on[rideIndex / 8] |= 1 << (rideIndex % 8); Ride * ride = get_ride(rideIndex); SetHasRiddenRideType(ride->type); } -bool rct_peep::HasRidden(sint32 rideIndex) const +bool rct_peep::HasRidden(int32_t rideIndex) const { return rides_been_on[rideIndex / 8] & (1 << (rideIndex % 8)); } -void rct_peep::SetHasRiddenRideType(sint32 rideType) +void rct_peep::SetHasRiddenRideType(int32_t rideType) { ride_types_been_on[rideType / 8] |= 1 << (rideType % 8); } -bool rct_peep::HasRiddenRideType(sint32 rideType) const +bool rct_peep::HasRiddenRideType(int32_t rideType) const { return ride_types_been_on[rideType / 8] & (1 << (rideType % 8)); } -void rct_peep::ChoseNotToGoOnRide(sint32 rideIndex, bool peepAtRide, bool updateLastRide) +void rct_peep::ChoseNotToGoOnRide(int32_t rideIndex, bool peepAtRide, bool updateLastRide) { if (peepAtRide && updateLastRide) { @@ -2164,7 +2164,7 @@ void rct_peep::ReadMap() } } -static bool peep_has_voucher_for_free_ride(rct_peep * peep, sint32 rideIndex) +static bool peep_has_voucher_for_free_ride(rct_peep * peep, int32_t rideIndex) { return peep->item_standard_flags & PEEP_ITEM_VOUCHER && peep->voucher_type == VOUCHER_TYPE_RIDE_FREE && peep->voucher_arguments == rideIndex; @@ -2175,7 +2175,7 @@ static bool peep_has_voucher_for_free_ride(rct_peep * peep, sint32 rideIndex) * Does not effect peeps that walk up to the queue entrance. * This flag is reset the next time a peep successfully joins the queue. */ -static void peep_tried_to_enter_full_queue(rct_peep * peep, sint32 rideIndex) +static void peep_tried_to_enter_full_queue(rct_peep * peep, int32_t rideIndex) { Ride * ride = get_ride(rideIndex); @@ -2202,7 +2202,7 @@ static void peep_reset_ride_heading(rct_peep * peep) } } -static void peep_ride_is_too_intense(rct_peep * peep, sint32 rideIndex, bool peepAtRide) +static void peep_ride_is_too_intense(rct_peep * peep, int32_t rideIndex, bool peepAtRide) { Ride * ride = get_ride(rideIndex); @@ -2222,23 +2222,23 @@ static void peep_ride_is_too_intense(rct_peep * peep, sint32 rideIndex, bool pee * * rct2: 0x00691C6E */ -static rct_vehicle * peep_choose_car_from_ride(rct_peep * peep, Ride * ride, std::vector &car_array) +static rct_vehicle * peep_choose_car_from_ride(rct_peep * peep, Ride * ride, std::vector &car_array) { - uint8 chosen_car = scenario_rand(); + uint8_t chosen_car = scenario_rand(); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_G_FORCES) && ((chosen_car & 0xC) != 0xC)) { - chosen_car = (scenario_rand() & 1) ? 0 : (uint8)car_array.size() - 1; + chosen_car = (scenario_rand() & 1) ? 0 : (uint8_t)car_array.size() - 1; } else { - chosen_car = (chosen_car * (uint16)car_array.size()) >> 8; + chosen_car = (chosen_car * (uint16_t)car_array.size()) >> 8; } peep->current_car = car_array[chosen_car]; rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[peep->current_train]); - for (sint32 i = peep->current_car; i > 0; --i) + for (int32_t i = peep->current_car; i > 0; --i) { vehicle = GET_VEHICLE(vehicle->next_vehicle_on_train); } @@ -2252,7 +2252,7 @@ static rct_vehicle * peep_choose_car_from_ride(rct_peep * peep, Ride * ride, std */ static void peep_choose_seat_from_car(rct_peep * peep, Ride * ride, rct_vehicle * vehicle) { - uint8 chosen_seat = vehicle->next_free_seat; + uint8_t chosen_seat = vehicle->next_free_seat; if (ride->mode == RIDE_MODE_FORWARD_ROTATION || ride->mode == RIDE_MODE_BACKWARD_ROTATION) { @@ -2278,20 +2278,20 @@ static void peep_go_to_ride_entrance(rct_peep * peep, Ride * ride) { TileCoordsXYZD location = ride_get_entrance_location(peep->current_ride, peep->current_ride_station); Guard::Assert(!location.isNull()); - sint32 x = location.x; - sint32 y = location.y; + int32_t x = location.x; + int32_t y = location.y; - uint8 direction = location.direction; + uint8_t direction = location.direction; x *= 32; y *= 32; x += 16; y += 16; - sint16 x_shift = word_981D6C[direction].x; - sint16 y_shift = word_981D6C[direction].y; + int16_t x_shift = word_981D6C[direction].x; + int16_t y_shift = word_981D6C[direction].y; - uint8 shift_multiplier = 21; + uint8_t shift_multiplier = 21; rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); if (rideEntry != nullptr) { @@ -2321,16 +2321,16 @@ static void peep_go_to_ride_entrance(rct_peep * peep, Ride * ride) peep->RemoveFromQueue(); } -static bool peep_find_vehicle_to_enter(rct_peep * peep, Ride * ride, std::vector &car_array) +static bool peep_find_vehicle_to_enter(rct_peep * peep, Ride * ride, std::vector &car_array) { - uint8 chosen_train = 0xFF; + uint8_t chosen_train = 0xFF; if (ride->mode == RIDE_MODE_BUMPERCAR || ride->mode == RIDE_MODE_RACE) { if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) return false; - for (sint32 i = 0; i < ride->num_vehicles; ++i) + for (int32_t i = 0; i < ride->num_vehicles; ++i) { rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[i]); @@ -2354,16 +2354,16 @@ static bool peep_find_vehicle_to_enter(rct_peep * peep, Ride * ride, std::vector peep->current_train = chosen_train; - sint32 i = 0; + int32_t i = 0; - uint16 vehicle_id = ride->vehicles[chosen_train]; + uint16_t vehicle_id = ride->vehicles[chosen_train]; rct_vehicle * vehicle = GET_VEHICLE(vehicle_id); for (; vehicle_id != SPRITE_INDEX_NULL; vehicle_id = vehicle->next_vehicle_on_train, i++) { vehicle = GET_VEHICLE(vehicle_id); - uint8 num_seats = vehicle->num_seats; + uint8_t num_seats = vehicle->num_seats; if (vehicle_is_used_in_pairs(vehicle)) { num_seats &= VEHICLE_SEAT_NUM_MASK; @@ -2380,7 +2380,7 @@ static bool peep_find_vehicle_to_enter(rct_peep * peep, Ride * ride, std::vector if (ride->mode == RIDE_MODE_FORWARD_ROTATION || ride->mode == RIDE_MODE_BACKWARD_ROTATION) { - uint8 position = (((~vehicle->vehicle_sprite_type + 1) >> 3) & 0xF) * 2; + uint8_t position = (((~vehicle->vehicle_sprite_type + 1) >> 3) & 0xF) * 2; if (vehicle->peep[position] != SPRITE_INDEX_NULL) continue; } @@ -2422,7 +2422,7 @@ static bool peep_check_ride_price_at_entrance(rct_peep * peep, Ride * ride, mone return false; } - uint16 value = ride->value; + uint16_t value = ride->value; if (value != RIDE_VALUE_UNDEFINED) { if (value * 2 < ridePrice) @@ -2443,9 +2443,9 @@ static bool peep_check_ride_price_at_entrance(rct_peep * peep, Ride * ride, mone * - How long the peep was waiting in the queue * - If the peep has been on the ride before, or on another ride of the same type */ -static sint16 peep_calculate_ride_satisfaction(rct_peep * peep, Ride * ride) +static int16_t peep_calculate_ride_satisfaction(rct_peep * peep, Ride * ride) { - sint16 satisfaction = peep_calculate_ride_value_satisfaction(peep, ride); + int16_t satisfaction = peep_calculate_ride_value_satisfaction(peep, ride); satisfaction += peep_calculate_ride_intensity_nausea_satisfaction(peep, ride); // Calculate satisfaction based on how long the peep has been in the queue for. @@ -2482,7 +2482,7 @@ static sint16 peep_calculate_ride_satisfaction(rct_peep * peep, Ride * ride) static void peep_update_favourite_ride(rct_peep * peep, Ride * ride) { peep->peep_flags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE; - uint8 peepRideRating = Math::Clamp(0, (ride->excitement / 4) + peep->happiness, PEEP_MAX_HAPPINESS); + uint8_t peepRideRating = Math::Clamp(0, (ride->excitement / 4) + peep->happiness, PEEP_MAX_HAPPINESS); if (peepRideRating >= peep->favourite_ride_rating) { if (peep->happiness >= 160 && peep->happiness_target >= 160) @@ -2494,7 +2494,7 @@ static void peep_update_favourite_ride(rct_peep * peep, Ride * ride) } /* rct2: 0x00695555 */ -static sint16 peep_calculate_ride_value_satisfaction(rct_peep * peep, Ride * ride) +static int16_t peep_calculate_ride_value_satisfaction(rct_peep * peep, Ride * ride) { if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -2526,15 +2526,15 @@ static sint16 peep_calculate_ride_value_satisfaction(rct_peep * peep, Ride * rid * of the ride fall exactly within the peep's preferences, but lower scores can still be achieved * if the peep's happiness is enough to offset it. */ -static sint16 peep_calculate_ride_intensity_nausea_satisfaction(rct_peep * peep, Ride * ride) +static int16_t peep_calculate_ride_intensity_nausea_satisfaction(rct_peep * peep, Ride * ride) { if (!ride_has_ratings(ride)) { return 70; } - uint8 intensitySatisfaction = 3; - uint8 nauseaSatisfaction = 3; + uint8_t intensitySatisfaction = 3; + uint8_t nauseaSatisfaction = 3; ride_rating maxIntensity = (peep->intensity >> 4) * 100; ride_rating minIntensity = (peep->intensity & 0xF) * 100; if (minIntensity <= ride->intensity && maxIntensity >= ride->intensity) @@ -2575,8 +2575,8 @@ static sint16 peep_calculate_ride_intensity_nausea_satisfaction(rct_peep * peep, nauseaSatisfaction--; } - uint8 highestSatisfaction = std::max(intensitySatisfaction, nauseaSatisfaction); - uint8 lowestSatisfaction = std::min(intensitySatisfaction, nauseaSatisfaction); + uint8_t highestSatisfaction = std::max(intensitySatisfaction, nauseaSatisfaction); + uint8_t lowestSatisfaction = std::min(intensitySatisfaction, nauseaSatisfaction); switch (highestSatisfaction) { @@ -2628,11 +2628,11 @@ static sint16 peep_calculate_ride_intensity_nausea_satisfaction(rct_peep * peep, */ static void peep_update_ride_nausea_growth(rct_peep * peep, Ride * ride) { - uint32 nauseaMultiplier = Math::Clamp(64, 256 - peep->happiness_target, 200); - uint32 nauseaGrowthRateChange = (ride->nausea * nauseaMultiplier) / 512; - nauseaGrowthRateChange *= std::max(static_cast(128), peep->hunger) / 64; + uint32_t nauseaMultiplier = Math::Clamp(64, 256 - peep->happiness_target, 200); + uint32_t nauseaGrowthRateChange = (ride->nausea * nauseaMultiplier) / 512; + nauseaGrowthRateChange *= std::max(static_cast(128), peep->hunger) / 64; nauseaGrowthRateChange >>= (peep->nausea_tolerance & 3); - peep->nausea_target = (uint8)std::min(peep->nausea_target + nauseaGrowthRateChange, 255u); + peep->nausea_target = (uint8_t)std::min(peep->nausea_target + nauseaGrowthRateChange, 255u); } static bool peep_should_go_on_ride_again(rct_peep * peep, Ride * ride) @@ -2656,7 +2656,7 @@ static bool peep_should_go_on_ride_again(rct_peep * peep, Ride * ride) if (peep->toilet > 170) return false; - uint8 r = (scenario_rand() & 0xFF); + uint8_t r = (scenario_rand() & 0xFF); if (r <= 128) { if (peep->no_of_rides > 7) @@ -2695,24 +2695,24 @@ static bool peep_really_liked_ride(rct_peep * peep, Ride * ride) * * rct2: 0x0069BC9A */ -static uint8 peep_assess_surroundings(sint16 centre_x, sint16 centre_y, sint16 centre_z) +static uint8_t peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z) { if ((tile_element_height(centre_x, centre_y) & 0xFFFF) > centre_z) return PEEP_THOUGHT_TYPE_NONE; - uint16 num_scenery = 0; - uint16 num_fountains = 0; - uint16 nearby_music = 0; - uint16 num_rubbish = 0; + uint16_t num_scenery = 0; + uint16_t num_fountains = 0; + uint16_t nearby_music = 0; + uint16_t num_rubbish = 0; - sint16 initial_x = std::max(centre_x - 160, 0); - sint16 initial_y = std::max(centre_y - 160, 0); - sint16 final_x = std::min(centre_x + 160, 8192); - sint16 final_y = std::min(centre_y + 160, 8192); + int16_t initial_x = std::max(centre_x - 160, 0); + int16_t initial_y = std::max(centre_y - 160, 0); + int16_t final_x = std::min(centre_x + 160, 8192); + int16_t final_y = std::min(centre_y + 160, 8192); - for (sint16 x = initial_x; x < final_x; x += 32) + for (int16_t x = initial_x; x < final_x; x += 32) { - for (sint16 y = initial_y; y < final_y; y += 32) + for (int16_t y = initial_y; y < final_y; y += 32) { rct_tile_element * tileElement = map_get_first_element_at(x / 32, y / 32); @@ -2780,12 +2780,12 @@ static uint8 peep_assess_surroundings(sint16 centre_x, sint16 centre_y, sint16 c } rct_litter * litter; - for (uint16 sprite_idx = gSpriteListHead[SPRITE_LIST_LITTER]; sprite_idx != SPRITE_INDEX_NULL; sprite_idx = litter->next) + for (uint16_t sprite_idx = gSpriteListHead[SPRITE_LIST_LITTER]; sprite_idx != SPRITE_INDEX_NULL; sprite_idx = litter->next) { litter = &(get_sprite(sprite_idx)->litter); - sint16 dist_x = abs(litter->x - centre_x); - sint16 dist_y = abs(litter->y - centre_y); + int16_t dist_x = abs(litter->x - centre_x); + int16_t dist_y = abs(litter->y - centre_y); if (std::max(dist_x, dist_y) <= 160) { num_rubbish++; @@ -2910,7 +2910,7 @@ static void peep_leave_park(rct_peep * peep) * * rct2: 0x00695B70 */ -static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) +static void peep_head_for_nearest_ride_type(rct_peep * peep, int32_t rideType) { Ride * ride; @@ -2931,13 +2931,13 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) } } - uint32 rideConsideration[8]{}; + uint32_t rideConsideration[8]{}; // FIX Originally checked for a toy,.likely a mistake and should be a map if ((peep->item_standard_flags & PEEP_ITEM_MAP) && rideType != RIDE_TYPE_FIRST_AID) { // Consider all rides in the park - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride->type == rideType) @@ -2949,11 +2949,11 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) else { // Take nearby rides into consideration - sint32 cx = floor2(peep->x, 32); - sint32 cy = floor2(peep->y, 32); - for (sint32 x = cx - 320; x <= cx + 320; x += 32) + int32_t cx = floor2(peep->x, 32); + int32_t cy = floor2(peep->y, 32); + for (int32_t x = cx - 320; x <= cx + 320; x += 32) { - for (sint32 y = cy - 320; y <= cy + 320; y += 32) + for (int32_t y = cy - 320; y <= cy + 320; y += 32) { if (x >= 0 && y >= 0 && x < (256 * 32) && y < (256 * 32)) { @@ -2963,7 +2963,7 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); ride = get_ride(rideIndex); if (ride->type == rideType) { @@ -2976,10 +2976,10 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) } // Filter the considered rides - uint8 potentialRides[256]; - uint8 * nextPotentialRide = &potentialRides[0]; - sint32 numPotentialRides = 0; - for (sint32 i = 0; i < MAX_RIDES; i++) + uint8_t potentialRides[256]; + uint8_t * nextPotentialRide = &potentialRides[0]; + int32_t numPotentialRides = 0; + for (int32_t i = 0; i < MAX_RIDES; i++) { if (!(rideConsideration[i >> 5] & (1u << (i & 0x1F)))) continue; @@ -2996,14 +2996,14 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) } // Pick the closest ride - sint32 closestRideIndex = -1; - sint32 closestRideDistance = std::numeric_limits::max(); - for (sint32 i = 0; i < numPotentialRides; i++) + int32_t closestRideIndex = -1; + int32_t closestRideDistance = std::numeric_limits::max(); + for (int32_t i = 0; i < numPotentialRides; i++) { ride = get_ride(potentialRides[i]); - sint32 rideX = ride->station_starts[0].x * 32; - sint32 rideY = ride->station_starts[0].y * 32; - sint32 distance = abs(rideX - peep->x) + abs(rideY - peep->y); + int32_t rideX = ride->station_starts[0].x * 32; + int32_t rideY = ride->station_starts[0].y * 32; + int32_t distance = abs(rideX - peep->x) + abs(rideY - peep->y); if (distance < closestRideDistance) { closestRideIndex = potentialRides[i]; @@ -3033,7 +3033,7 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType) * * rct2: 0x006958D0 */ -static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTypeFlags) +static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, int32_t rideTypeFlags) { Ride * ride; @@ -3060,13 +3060,13 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy return; } - uint32 rideConsideration[8]{}; + uint32_t rideConsideration[8]{}; // FIX Originally checked for a toy,.likely a mistake and should be a map if (peep->item_standard_flags & PEEP_ITEM_MAP) { // Consider all rides in the park - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride_type_has_flag(ride->type, rideTypeFlags)) @@ -3078,11 +3078,11 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy else { // Take nearby rides into consideration - sint32 cx = floor2(peep->x, 32); - sint32 cy = floor2(peep->y, 32); - for (sint32 x = cx - 320; x <= cx + 320; x += 32) + int32_t cx = floor2(peep->x, 32); + int32_t cy = floor2(peep->y, 32); + for (int32_t x = cx - 320; x <= cx + 320; x += 32) { - for (sint32 y = cy - 320; y <= cy + 320; y += 32) + for (int32_t y = cy - 320; y <= cy + 320; y += 32) { if (x >= 0 && y >= 0 && x < (256 * 32) && y < (256 * 32)) { @@ -3092,7 +3092,7 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); ride = get_ride(rideIndex); if (ride_type_has_flag(ride->type, rideTypeFlags)) { @@ -3105,10 +3105,10 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy } // Filter the considered rides - uint8 potentialRides[256]; - uint8 * nextPotentialRide = &potentialRides[0]; - sint32 numPotentialRides = 0; - for (sint32 i = 0; i < MAX_RIDES; i++) + uint8_t potentialRides[256]; + uint8_t * nextPotentialRide = &potentialRides[0]; + int32_t numPotentialRides = 0; + for (int32_t i = 0; i < MAX_RIDES; i++) { if (!(rideConsideration[i >> 5] & (1u << (i & 0x1F)))) continue; @@ -3125,14 +3125,14 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy } // Pick the closest ride - sint32 closestRideIndex = -1; - sint32 closestRideDistance = std::numeric_limits::max(); - for (sint32 i = 0; i < numPotentialRides; i++) + int32_t closestRideIndex = -1; + int32_t closestRideDistance = std::numeric_limits::max(); + for (int32_t i = 0; i < numPotentialRides; i++) { ride = get_ride(potentialRides[i]); - sint32 rideX = ride->station_starts[0].x * 32; - sint32 rideY = ride->station_starts[0].y * 32; - sint32 distance = abs(rideX - peep->x) + abs(rideY - peep->y); + int32_t rideX = ride->station_starts[0].x * 32; + int32_t rideY = ride->station_starts[0].y * 32; + int32_t distance = abs(rideX - peep->x) + abs(rideY - peep->y); if (distance < closestRideDistance) { closestRideIndex = potentialRides[i]; @@ -3165,10 +3165,10 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy * such as "I'm hungry" after visiting a food shop. * Works for Thirst/Hungry/Low Money/Bathroom */ -void rct_peep::StopPurchaseThought(uint8 ride_type) +void rct_peep::StopPurchaseThought(uint8_t ride_type) { - uint8 thoughtType = PEEP_THOUGHT_TYPE_HUNGRY; + uint8_t thoughtType = PEEP_THOUGHT_TYPE_HUNGRY; if (!ride_type_has_flag(ride_type, RIDE_TYPE_FLAG_SELLS_FOOD)) { @@ -3188,7 +3188,7 @@ void rct_peep::StopPurchaseThought(uint8 ride_type) } // Remove the related thought - for (sint32 i = 0; i < PEEP_MAX_THOUGHTS; ++i) + for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; ++i) { rct_peep_thought * thought = &thoughts[i]; @@ -3214,7 +3214,7 @@ void rct_peep::StopPurchaseThought(uint8 ride_type) * * rct2: 0x0069AEB7 */ -static bool peep_should_use_cash_machine(rct_peep * peep, sint32 rideIndex) +static bool peep_should_use_cash_machine(rct_peep * peep, int32_t rideIndex) { if (gParkFlags & PARK_FLAGS_NO_MONEY) return false; @@ -3255,9 +3255,9 @@ void rct_peep::UpdateBuying() { if (action != 0xFF) { - sint16 actionX; - sint16 actionY; - sint16 xy_distance; + int16_t actionX; + int16_t actionY; + int16_t xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); return; } @@ -3365,11 +3365,11 @@ void rct_peep::UpdateRideAtEntrance() { Invalidate(); - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { - sint16 actionZ = z; + int16_t actionZ = z; if (xy_distance < 16) { auto entrance = ride_get_entrance_location(ride, current_ride_station); @@ -3385,7 +3385,7 @@ void rct_peep::UpdateRideAtEntrance() } } - std::vector carArray; + std::vector carArray; if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_NO_VEHICLES)) { @@ -3439,7 +3439,7 @@ static void peep_update_ride_leave_entrance_maze(rct_peep * peep, Ride * ride, T entrance_loc.x += CoordsDirectionDelta[entrance_loc.direction].x; entrance_loc.y += CoordsDirectionDelta[entrance_loc.direction].y; - uint8 direction = entrance_loc.direction * 4 + 11; + uint8_t direction = entrance_loc.direction * 4 + 11; if (scenario_rand() & 0x40) { direction += 4; @@ -3470,7 +3470,7 @@ static void peep_update_ride_leave_entrance_spiral_slide(rct_peep * peep, Ride * rct_tile_element * tile_element = ride_get_station_start_track_element(ride, peep->current_ride_station); - uint8 direction_track = (tile_element == nullptr ? 0 : tile_element_get_direction(tile_element)); + uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element_get_direction(tile_element)); peep->var_37 = (entrance_loc.direction << 2) | (direction_track << 4); @@ -3488,13 +3488,13 @@ static void peep_update_ride_leave_entrance_spiral_slide(rct_peep * peep, Ride * peep->sub_state = PEEP_RIDE_APPROACH_SPIRAL_SLIDE; } -static uint8 peep_get_waypointed_seat_location(rct_peep * peep, Ride * ride, rct_ride_entry_vehicle * vehicle_type, uint8 track_direction) +static uint8_t peep_get_waypointed_seat_location(rct_peep * peep, Ride * ride, rct_ride_entry_vehicle * vehicle_type, uint8_t track_direction) { // The seatlocation can be split into segments around the ride base // to decide the segment first split off the segmentable seat location // from the fixed section - uint8 seatLocationSegment = peep->current_seat & 0x7; - uint8 seatLocationFixed = peep->current_seat & 0xF8; + uint8_t seatLocationSegment = peep->current_seat & 0x7; + uint8_t seatLocationFixed = peep->current_seat & 0xF8; // Enterprise has more segments (8) compared to the normal (4) if (ride->type != RIDE_TYPE_ENTERPRISE) @@ -3517,7 +3517,7 @@ static void peep_update_ride_leave_entrance_waypoints(rct_peep * peep, Ride * ri { TileCoordsXYZD entranceLocation = ride_get_entrance_location(peep->current_ride, peep->current_ride_station); Guard::Assert(!entranceLocation.isNull()); - uint8 direction_entrance = entranceLocation.direction; + uint8_t direction_entrance = entranceLocation.direction; LocationXY16 waypoint; waypoint.x = ride->station_starts[peep->current_ride_station].x * 32 + 16; @@ -3525,7 +3525,7 @@ static void peep_update_ride_leave_entrance_waypoints(rct_peep * peep, Ride * ri rct_tile_element * tile_element = ride_get_station_start_track_element(ride, peep->current_ride_station); - uint8 direction_track = (tile_element == nullptr ? 0 : tile_element_get_direction(tile_element)); + uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element_get_direction(tile_element)); auto vehicle = GET_VEHICLE(ride->vehicles[peep->current_train]); auto ride_entry = get_ride_entry(vehicle->ride_subtype); @@ -3554,17 +3554,17 @@ static void peep_update_ride_leave_entrance_waypoints(rct_peep * peep, Ride * ri */ void rct_peep::UpdateRideAdvanceThroughEntrance() { - sint16 actionX, actionY, actionZ, xy_distance; + int16_t actionX, actionY, actionZ, xy_distance; Ride * ride = get_ride(current_ride); rct_ride_entry * ride_entry = get_ride_entry(ride->subtype); if (UpdateAction(&actionX, &actionY, &xy_distance)) { - uint16 distanceThreshold = 16; + uint16_t distanceThreshold = 16; if (ride_entry != nullptr) { - uint8 vehicle = ride_entry->default_vehicle; + uint8_t vehicle = ride_entry->default_vehicle; if (ride_entry->vehicles[vehicle].flags & VEHICLE_ENTRY_FLAG_MINI_GOLF || ride_entry->vehicles[vehicle].flags & (VEHICLE_ENTRY_FLAG_CHAIRLIFT | VEHICLE_ENTRY_FLAG_GO_KART)) { @@ -3610,7 +3610,7 @@ void rct_peep::UpdateRideAdvanceThroughEntrance() } rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[current_train]); - for (sint32 i = current_car; i != 0; --i) + for (int32_t i = current_car; i != 0; --i) { vehicle = GET_VEHICLE(vehicle->next_vehicle_on_train); } @@ -3638,9 +3638,9 @@ void rct_peep::UpdateRideAdvanceThroughEntrance() return; } - sint8 load_position = 0; + int8_t load_position = 0; // Safe, in case current seat > number of loading positions - uint16 numSeatPositions = static_cast(vehicle_type->peep_loading_positions.size()); + uint16_t numSeatPositions = static_cast(vehicle_type->peep_loading_positions.size()); if (numSeatPositions != 0) { size_t loadPositionIndex = numSeatPositions - 1; @@ -3674,7 +3674,7 @@ void rct_peep::UpdateRideAdvanceThroughEntrance() * * rct2: 0x0069321D */ -static void peep_go_to_ride_exit(rct_peep * peep, Ride * ride, sint16 x, sint16 y, sint16 z, uint8 exit_direction) +static void peep_go_to_ride_exit(rct_peep * peep, Ride * ride, int16_t x, int16_t y, int16_t z, uint8_t exit_direction) { z += RideData5[ride->type].z; @@ -3691,10 +3691,10 @@ static void peep_go_to_ride_exit(rct_peep * peep, Ride * ride, sint16 x, sint16 x += 16; y += 16; - sint16 x_shift = word_981D6C[exit_direction].x; - sint16 y_shift = word_981D6C[exit_direction].y; + int16_t x_shift = word_981D6C[exit_direction].x; + int16_t y_shift = word_981D6C[exit_direction].y; - sint16 shift_multiplier = 20; + int16_t shift_multiplier = 20; rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); if (rideEntry != nullptr) @@ -3747,7 +3747,7 @@ void rct_peep::UpdateRideFreeVehicleEnterRide(Ride * ride) } sub_state = PEEP_RIDE_LEAVE_ENTRANCE; - uint8 queueTime = days_in_queue; + uint8_t queueTime = days_in_queue; if (queueTime < 253) queueTime += 3; @@ -3761,9 +3761,9 @@ void rct_peep::UpdateRideFreeVehicleEnterRide(Ride * ride) if (peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, name_string_idx); - set_format_arg(2, uint32, id); + set_format_arg(2, uint32_t, id); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); rct_string_id msg_string; if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE)) @@ -3793,8 +3793,8 @@ static void peep_update_ride_no_free_vehicle_rejoin_queue(rct_peep * peep, Ride { TileCoordsXYZD entranceLocation = ride_get_entrance_location(peep->current_ride, peep->current_ride_station); - sint32 x = entranceLocation.x * 32; - sint32 y = entranceLocation.y * 32; + int32_t x = entranceLocation.x * 32; + int32_t y = entranceLocation.y * 32; x += 16 - word_981D6C[entranceLocation.direction].x * 20; y += 16 - word_981D6C[entranceLocation.direction].y * 20; @@ -3835,7 +3835,7 @@ void rct_peep::UpdateRideFreeVehicleCheck() } rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[current_train]); - for (sint32 i = current_car; i != 0; --i) + for (int32_t i = current_car; i != 0; --i) { vehicle = GET_VEHICLE(vehicle->next_vehicle_on_train); } @@ -3884,7 +3884,7 @@ void rct_peep::UpdateRideFreeVehicleCheck() } else { - uint8 seat = current_seat | 1; + uint8_t seat = current_seat | 1; if (seat < vehicle->next_free_seat) { UpdateRideFreeVehicleEnterRide(ride); @@ -3913,7 +3913,7 @@ void rct_peep::UpdateRideFreeVehicleCheck() void rct_peep::UpdateRideApproachVehicle() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (!UpdateAction(&actionX, &actionY, &xy_distance)) { sub_state = PEEP_RIDE_ENTER_VEHICLE; @@ -3930,7 +3930,7 @@ void rct_peep::UpdateRideEnterVehicle() Ride * ride = get_ride(current_ride); rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[current_train]); - for (sint32 i = current_car; i != 0; --i) + for (int32_t i = current_car; i != 0; --i) { vehicle = GET_VEHICLE(vehicle->next_vehicle_on_train); } @@ -3985,9 +3985,9 @@ void rct_peep::UpdateRideLeaveVehicle() Ride * ride = get_ride(current_ride); rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[current_train]); - uint8 ride_station = vehicle->current_station; + uint8_t ride_station = vehicle->current_station; - for (sint32 i = current_car; i != 0; --i) + for (int32_t i = current_car; i != 0; --i) { vehicle = GET_VEHICLE(vehicle->next_vehicle_on_train); } @@ -4012,7 +4012,7 @@ void rct_peep::UpdateRideLeaveVehicle() if (ride_station >= MAX_STATIONS) { // HACK #5658: Some parks have hacked rides which end up in this state - sint8 bestStationIndex = ride_get_first_valid_station_exit(ride); + int8_t bestStationIndex = ride_get_first_valid_station_exit(ride); if (bestStationIndex == -1) { bestStationIndex = 0; @@ -4042,7 +4042,7 @@ void rct_peep::UpdateRideLeaveVehicle() for (; vehicle->is_child; vehicle = GET_VEHICLE(vehicle->prev_vehicle_on_ride)) { - uint16 trackType = vehicle->track_type >> 2; + uint16_t trackType = vehicle->track_type >> 2; if (trackType == TRACK_ELEM_FLAT || trackType > TRACK_ELEM_MIDDLE_STATION) continue; @@ -4055,13 +4055,13 @@ void rct_peep::UpdateRideLeaveVehicle() break; } - uint8 stationIndex = tile_element_get_station(inner_map); + uint8_t stationIndex = tile_element_get_station(inner_map); if (stationIndex == current_ride_station) break; } - uint8 shiftMultiplier = 12; - uint8 specialDirection = platformLocation.direction; + uint8_t shiftMultiplier = 12; + uint8_t specialDirection = platformLocation.direction; rideEntry = get_ride_entry(ride->subtype); @@ -4084,8 +4084,8 @@ void rct_peep::UpdateRideLeaveVehicle() } } - sint16 xShift = word_981D6C[specialDirection].x; - sint16 yShift = word_981D6C[specialDirection].y; + int16_t xShift = word_981D6C[specialDirection].x; + int16_t yShift = word_981D6C[specialDirection].y; platformLocation.x = vehicle->x + xShift * shiftMultiplier; platformLocation.y = vehicle->y + yShift * shiftMultiplier; @@ -4098,7 +4098,7 @@ void rct_peep::UpdateRideLeaveVehicle() platformLocation.x = vehicle->x + word_981D6C[platformLocation.direction].x * 12; platformLocation.y = vehicle->y + word_981D6C[platformLocation.direction].y * 12; - sint8 loadPosition = vehicle_entry->peep_loading_positions[current_seat]; + int8_t loadPosition = vehicle_entry->peep_loading_positions[current_seat]; switch (vehicle->sprite_direction / 8) { @@ -4126,13 +4126,13 @@ void rct_peep::UpdateRideLeaveVehicle() Guard::Assert(!exitLocation.isNull()); CoordsXYZ waypointLoc; - waypointLoc.z = (sint16)exitLocation.z * 8 + RideData5[ride->type].z; + waypointLoc.z = (int16_t)exitLocation.z * 8 + RideData5[ride->type].z; waypointLoc.x = ride->station_starts[current_ride_station].x * 32 + 16; waypointLoc.y = ride->station_starts[current_ride_station].y * 32 + 16; rct_tile_element * trackElement = ride_get_station_start_track_element(ride, current_ride_station); - uint8 station_direction = (trackElement == nullptr ? 0 : tile_element_get_direction(trackElement)); + uint8_t station_direction = (trackElement == nullptr ? 0 : tile_element_get_direction(trackElement)); vehicle = GET_VEHICLE(ride->vehicles[current_train]); @@ -4178,19 +4178,19 @@ static void peep_update_ride_prepare_for_exit(rct_peep * peep) Guard::Assert(peep->current_ride_station < Util::CountOf(ride->exits), GUARD_LINE); auto exit = ride_get_exit_location(peep->current_ride, peep->current_ride_station); - sint16 x = exit.x; - sint16 y = exit.y; - uint8 exit_direction = exit.direction; + int16_t x = exit.x; + int16_t y = exit.y; + uint8_t exit_direction = exit.direction; x *= 32; y *= 32; x += 16; y += 16; - sint16 x_shift = word_981D6C[exit_direction].x; - sint16 y_shift = word_981D6C[exit_direction].y; + int16_t x_shift = word_981D6C[exit_direction].x; + int16_t y_shift = word_981D6C[exit_direction].y; - sint16 shift_multiplier = 20; + int16_t shift_multiplier = 20; rct_ride_entry * ride_type = get_ride_entry(ride->subtype); if (ride_type != nullptr) @@ -4220,7 +4220,7 @@ static void peep_update_ride_prepare_for_exit(rct_peep * peep) */ void rct_peep::UpdateRideApproachExit() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { Invalidate(); @@ -4238,7 +4238,7 @@ void rct_peep::UpdateRideApproachExit() */ void rct_peep::UpdateRideInExit() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; Ride * ride = get_ride(current_ride); if (UpdateAction(&actionX, &actionY, &xy_distance)) @@ -4247,7 +4247,7 @@ void rct_peep::UpdateRideInExit() if (xy_distance >= 16) { - sint16 actionZ = ride->station_heights[current_ride_station] * 8; + int16_t actionZ = ride->station_heights[current_ride_station] * 8; actionZ += RideData5[ride->type].z; MoveTo(actionX, actionY, actionZ); @@ -4262,7 +4262,7 @@ void rct_peep::UpdateRideInExit() if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { - uint8 secondaryItem = RidePhotoItems[ride->type]; + uint8_t secondaryItem = RidePhotoItems[ride->type]; if (DecideAndBuyItem(current_ride, secondaryItem, ride->price_secondary)) { ride->no_secondary_items_sold++; @@ -4277,13 +4277,13 @@ void rct_peep::UpdateRideInExit() */ void rct_peep::UpdateRideApproachVehicleWaypoints() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; Ride * ride = get_ride(current_ride); - uint8 waypoint = var_37 & 3; + uint8_t waypoint = var_37 & 3; if (UpdateAction(&actionX, &actionY, &xy_distance)) { - sint16 actionZ; + int16_t actionZ; // Motion simulators have steps this moves the peeps up the steps if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) { @@ -4353,12 +4353,12 @@ void rct_peep::UpdateRideApproachVehicleWaypoints() */ void rct_peep::UpdateRideApproachExitWaypoints() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; Ride * ride = get_ride(current_ride); if (UpdateAction(&actionX, &actionY, &xy_distance)) { - sint16 actionZ; + int16_t actionZ; if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) { actionZ = ride->station_heights[current_ride_station] * 8 + 2; @@ -4419,17 +4419,17 @@ void rct_peep::UpdateRideApproachExitWaypoints() auto exit = ride_get_exit_location(current_ride, current_ride_station); actionX = exit.x; actionY = exit.y; - uint8 exit_direction = exit.direction ^ 2; + uint8_t exit_direction = exit.direction ^ 2; actionX *= 32; actionY *= 32; actionX += 16; actionY += 16; - sint16 x_shift = word_981D6C[exit_direction].x; - sint16 y_shift = word_981D6C[exit_direction].y; + int16_t x_shift = word_981D6C[exit_direction].x; + int16_t y_shift = word_981D6C[exit_direction].y; - sint16 shift_multiplier = 20; + int16_t shift_multiplier = 20; rct_ride_entry * ride_type = get_ride_entry(ride->subtype); rct_ride_entry_vehicle * vehicle_entry = &ride_type->vehicles[ride_type->default_vehicle]; @@ -4454,7 +4454,7 @@ void rct_peep::UpdateRideApproachExitWaypoints() */ void rct_peep::UpdateRideApproachSpiralSlide() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; Ride * ride = get_ride(current_ride); if (UpdateAction(&actionX, &actionY, &xy_distance)) @@ -4465,7 +4465,7 @@ void rct_peep::UpdateRideApproachSpiralSlide() return; } - uint8 waypoint = var_37 & 3; + uint8_t waypoint = var_37 & 3; if (waypoint == 3) { @@ -4485,7 +4485,7 @@ void rct_peep::UpdateRideApproachSpiralSlide() { if (ride->mode == RIDE_MODE_SINGLE_RIDE_PER_ADMISSION) lastRide = true; - if ((uint8)(current_car - 1) > (scenario_rand() & 0xF)) + if ((uint8_t)(current_car - 1) > (scenario_rand() & 0xF)) lastRide = true; } @@ -4576,9 +4576,9 @@ void rct_peep::UpdateRideOnSpiralSlide() return; case 3: { - sint16 newX = ride->station_starts[current_ride_station].x * 32; - sint16 newY = ride->station_starts[current_ride_station].y * 32; - uint8 dir = (var_37 / 4) & 3; + int16_t newX = ride->station_starts[current_ride_station].x * 32; + int16_t newY = ride->station_starts[current_ride_station].y * 32; + uint8_t dir = (var_37 / 4) & 3; // Set the location that the peep walks to go on slide again destination_x = newX + _SpiralSlideEndWaypoint[dir].x; @@ -4601,7 +4601,7 @@ void rct_peep::UpdateRideOnSpiralSlide() } } - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { @@ -4610,7 +4610,7 @@ void rct_peep::UpdateRideOnSpiralSlide() Invalidate(); return; } - uint8 waypoint = 2; + uint8_t waypoint = 2; var_37 = (var_37 * 4 & 0x30) + waypoint; actionX = ride->station_starts[current_ride_station].x * 32; @@ -4635,7 +4635,7 @@ void rct_peep::UpdateRideLeaveSpiralSlide() { // Iterates through the spiral slide waypoints until it reaches // waypoint 0. Then it readies to leave the ride by the entrance. - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { @@ -4647,7 +4647,7 @@ void rct_peep::UpdateRideLeaveSpiralSlide() Ride * ride = get_ride(current_ride); - uint8 waypoint = var_37 & 3; + uint8_t waypoint = var_37 & 3; if (waypoint != 0) { @@ -4683,10 +4683,10 @@ void rct_peep::UpdateRideLeaveSpiralSlide() exit.direction ^= 2; - sint16 xShift = word_981D6C[exit.direction].x; - sint16 yShift = word_981D6C[exit.direction].y; + int16_t xShift = word_981D6C[exit.direction].x; + int16_t yShift = word_981D6C[exit.direction].y; - sint16 shiftMultiplier = 20; + int16_t shiftMultiplier = 20; xShift *= shiftMultiplier; yShift *= shiftMultiplier; @@ -4699,7 +4699,7 @@ void rct_peep::UpdateRideLeaveSpiralSlide() } /** rct2: 0x00981FE4 */ -static constexpr const uint8 _MazeGetNewDirectionFromEdge[][4] = { +static constexpr const uint8_t _MazeGetNewDirectionFromEdge[][4] = { { 15, 7, 15, 7 }, { 11, 3, 11, 3 }, { 7, 15, 7, 15 }, @@ -4707,7 +4707,7 @@ static constexpr const uint8 _MazeGetNewDirectionFromEdge[][4] = { }; /** rct2: 0x00981FF4 */ -static constexpr const uint8 _MazeCurrentDirectionToOpenHedge[][4] = { +static constexpr const uint8_t _MazeCurrentDirectionToOpenHedge[][4] = { { 1, 2, 14, 0 }, { 4, 5, 6, 2 }, { 6, 8, 9, 10 }, @@ -4720,7 +4720,7 @@ static constexpr const uint8 _MazeCurrentDirectionToOpenHedge[][4] = { */ void rct_peep::UpdateRideMazePathfinding() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { Invalidate(); @@ -4751,7 +4751,7 @@ void rct_peep::UpdateRideMazePathfinding() actionX = destination_x & 0xFFE0; actionY = destination_y & 0xFFE0; - sint16 stationHeight = ride->station_heights[0]; + int16_t stationHeight = ride->station_heights[0]; // Find the station track element rct_tile_element * tileElement = map_get_first_element_at(actionX / 32, actionY / 32); @@ -4762,8 +4762,8 @@ void rct_peep::UpdateRideMazePathfinding() } while (!(tileElement++)->IsLastForTile()); - uint16 mazeEntry = track_element_get_maze_entry(tileElement); - uint16 openHedges = 0; + uint16_t mazeEntry = track_element_get_maze_entry(tileElement); + uint16_t openHedges = 0; // var_37 is 3, 7, 11 or 15 if (mazeEntry & (1 << _MazeCurrentDirectionToOpenHedge[var_37 / 4][3])) @@ -4790,12 +4790,12 @@ void rct_peep::UpdateRideMazePathfinding() if (openHedges == 0) return; - uint8 mazeLastEdge = maze_last_edge ^ (1 << 1); + uint8_t mazeLastEdge = maze_last_edge ^ (1 << 1); openHedges &= ~(1 << mazeLastEdge); if (openHedges == 0) openHedges |= (1 << mazeLastEdge); - uint8 chosenEdge = scenario_rand() & 0x3; + uint8_t chosenEdge = scenario_rand() & 0x3; while (!(openHedges & (1 << chosenEdge))) { chosenEdge = (chosenEdge + 1) & 3; @@ -4883,7 +4883,7 @@ void rct_peep::UpdateRideMazePathfinding() */ void rct_peep::UpdateRideLeaveExit() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; Ride * ride = get_ride(current_ride); if (UpdateAction(&actionX, &actionY, &xy_distance)) @@ -4899,9 +4899,9 @@ void rct_peep::UpdateRideLeaveExit() if (peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, name_string_idx); - set_format_arg(2, uint32, id); + set_format_arg(2, uint32_t, id); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); if (gConfigNotifications.guest_left_ride) { @@ -4922,10 +4922,10 @@ void rct_peep::UpdateRideLeaveExit() if (tileElement->GetType() != TILE_ELEMENT_TYPE_PATH) continue; - sint16 height = map_height_from_slope(x, y, tileElement->properties.path.type); + int16_t height = map_height_from_slope(x, y, tileElement->properties.path.type); height += tileElement->base_height * 8; - sint16 z_diff = z - height; + int16_t z_diff = z - height; if (z_diff > 0 || z_diff < -16) continue; @@ -4941,7 +4941,7 @@ void rct_peep::UpdateRideLeaveExit() */ void rct_peep::UpdateRideShopApproach() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { @@ -4960,8 +4960,8 @@ void rct_peep::UpdateRideShopApproach() */ void rct_peep::UpdateRideShopInteract() { - const sint16 tileCenterX = next_x + 16; - const sint16 tileCenterY = next_y + 16; + const int16_t tileCenterX = next_x + 16; + const int16_t tileCenterY = next_y + 16; Ride * ride = get_ride(current_ride); if (ride->type == RIDE_TYPE_FIRST_AID) @@ -5013,7 +5013,7 @@ void rct_peep::UpdateRideShopInteract() */ void rct_peep::UpdateRideShopLeave() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { @@ -5116,7 +5116,7 @@ void rct_peep::UpdateRide() } static void peep_update_walking_break_scenery(rct_peep * peep); -static bool peep_find_ride_to_look_at(rct_peep * peep, uint8 edge, uint8 * rideToView, uint8 * rideSeatToView); +static bool peep_find_ride_to_look_at(rct_peep * peep, uint8_t edge, uint8_t * rideToView, uint8_t * rideSeatToView); /** * @@ -5187,16 +5187,16 @@ void rct_peep::UpdateWalking() { if ((0xFFFF & scenario_rand()) <= 4096) { - static constexpr const uint8 litter_types[] = { + static constexpr const uint8_t litter_types[] = { LITTER_TYPE_EMPTY_CAN, LITTER_TYPE_RUBBISH, LITTER_TYPE_EMPTY_BURGER_BOX, LITTER_TYPE_EMPTY_CUP, }; - sint32 ebp = litter_types[scenario_rand() & 0x3]; - sint32 litterX = x + (scenario_rand() & 0x7) - 3; - sint32 litterY = y + (scenario_rand() & 0x7) - 3; - sint32 litterDirection = (scenario_rand() & 0x3); + int32_t ebp = litter_types[scenario_rand() & 0x3]; + int32_t litterX = x + (scenario_rand() & 0x7) - 3; + int32_t litterY = y + (scenario_rand() & 0x7) - 3; + int32_t litterDirection = (scenario_rand() & 0x3); litter_create(litterX, litterY, z, litterDirection, ebp); } @@ -5204,16 +5204,16 @@ void rct_peep::UpdateWalking() } else if (HasEmptyContainer()) { - if ((!GetNextIsSurface()) && ((uint32)(sprite_index & 0x1FF) == (gCurrentTicks & 0x1FF)) && + if ((!GetNextIsSurface()) && ((uint32_t)(sprite_index & 0x1FF) == (gCurrentTicks & 0x1FF)) && ((0xFFFF & scenario_rand()) <= 4096)) { - uint8 pos_stnd = 0; - for (sint32 container = HasEmptyContainerStandardFlag(); pos_stnd < 32; pos_stnd++) + uint8_t pos_stnd = 0; + for (int32_t container = HasEmptyContainerStandardFlag(); pos_stnd < 32; pos_stnd++) if (container & (1u << pos_stnd)) break; - sint32 bp = 0; + int32_t bp = 0; if (pos_stnd != 32) { @@ -5222,8 +5222,8 @@ void rct_peep::UpdateWalking() } else { - uint8 pos_extr = 0; - for (sint32 container = HasEmptyContainerExtraFlag(); pos_extr < 32; pos_extr++) + uint8_t pos_extr = 0; + for (int32_t container = HasEmptyContainerExtraFlag(); pos_extr < 32; pos_extr++) if (container & (1u << pos_extr)) break; item_extra_flags &= ~(1u << pos_extr); @@ -5233,9 +5233,9 @@ void rct_peep::UpdateWalking() window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; UpdateSpriteType(); - sint32 litterX = x + (scenario_rand() & 0x7) - 3; - sint32 litterY = y + (scenario_rand() & 0x7) - 3; - sint32 litterDirection = (scenario_rand() & 0x3); + int32_t litterX = x + (scenario_rand() & 0x7) - 3; + int32_t litterY = y + (scenario_rand() & 0x7) - 3; + int32_t litterDirection = (scenario_rand() & 0x3); litter_create(litterX, litterY, z, litterDirection, bp); } @@ -5253,7 +5253,7 @@ void rct_peep::UpdateWalking() } } - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -5262,7 +5262,7 @@ void rct_peep::UpdateWalking() { rct_tile_element * tile_element = map_get_surface_element_at({next_x, next_y}); - sint32 water_height = surface_get_water_height(tile_element); + int32_t water_height = surface_get_water_height(tile_element); if (water_height) { Invalidate(); @@ -5302,7 +5302,7 @@ void rct_peep::UpdateWalking() if (toilet > 140) return; - uint16 chance = HasFood() ? 13107 : 2849; + uint16_t chance = HasFood() ? 13107 : 2849; if ((scenario_rand() & 0xFFFF) > chance) return; @@ -5325,7 +5325,7 @@ void rct_peep::UpdateWalking() } } - sint32 positions_free = 15; + int32_t positions_free = 15; if (footpath_element_has_path_scenery(tileElement)) { @@ -5342,21 +5342,21 @@ void rct_peep::UpdateWalking() } } - sint32 edges = (tileElement->properties.path.edges & 0xF) ^ 0xF; + int32_t edges = (tileElement->properties.path.edges & 0xF) ^ 0xF; if (edges == 0) return; - uint8 chosen_edge = scenario_rand() & 0x3; + uint8_t chosen_edge = scenario_rand() & 0x3; for (; !(edges & (1 << chosen_edge));) chosen_edge = (chosen_edge + 1) & 3; - uint8 ride_to_view, ride_seat_to_view; + uint8_t ride_to_view, ride_seat_to_view; if (!peep_find_ride_to_look_at(this, chosen_edge, &ride_to_view, &ride_seat_to_view)) return; // Check if there is a peep watching (and if there is place for us) - uint16 sprite_id = sprite_get_first_in_quadrant(x, y); + uint16_t sprite_id = sprite_get_first_in_quadrant(x, y); for (rct_sprite * sprite; sprite_id != SPRITE_INDEX_NULL; sprite_id = sprite->unknown.next_in_quadrant) { sprite = get_sprite(sprite_id); @@ -5379,7 +5379,7 @@ void rct_peep::UpdateWalking() if (!positions_free) return; - uint8 chosen_position = scenario_rand() & 0x3; + uint8_t chosen_position = scenario_rand() & 0x3; for (; !(positions_free & (1 << chosen_position));) chosen_position = (chosen_position + 1) & 3; @@ -5391,8 +5391,8 @@ void rct_peep::UpdateWalking() SetState(PEEP_STATE_WATCHING); sub_state = 0; - sint32 destX = (x & 0xFFE0) + _WatchingPositionOffsets[var_37 & 0x1F].x; - sint32 destY = (y & 0xFFE0) + _WatchingPositionOffsets[var_37 & 0x1F].y; + int32_t destX = (x & 0xFFE0) + _WatchingPositionOffsets[var_37 & 0x1F].x; + int32_t destY = (y & 0xFFE0) + _WatchingPositionOffsets[var_37 & 0x1F].y; destination_x = destX; destination_y = destY; @@ -5461,7 +5461,7 @@ void rct_peep::UpdateQueuing() return; } - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (action < 0xFE) return; @@ -5540,7 +5540,7 @@ void rct_peep::UpdateEnteringPark() { if (var_37 != 1) { - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if ((pathingResult & PATHING_OUTSIDE_PARK)) { @@ -5549,9 +5549,9 @@ void rct_peep::UpdateEnteringPark() } return; } - sint16 actionX = 0; - sint16 actionY = 0; - sint16 xy_distance; + int16_t actionX = 0; + int16_t actionY = 0; + int16_t xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { Invalidate(); @@ -5577,7 +5577,7 @@ void rct_peep::UpdateLeavingPark() { if (var_37 != 0) { - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_OUTSIDE_PARK)) return; @@ -5585,9 +5585,9 @@ void rct_peep::UpdateLeavingPark() return; } - sint16 actionX = 0; - sint16 actionY = 0; - sint16 xy_distance; + int16_t actionX = 0; + int16_t actionY = 0; + int16_t xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { Invalidate(); @@ -5604,7 +5604,7 @@ void rct_peep::UpdateLeavingPark() var_37 = 1; window_invalidate_by_class(WC_GUEST_LIST); - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_OUTSIDE_PARK)) return; @@ -5621,7 +5621,7 @@ void rct_peep::UpdateWatching() { if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -5647,9 +5647,9 @@ void rct_peep::UpdateWatching() if (action < 0xFE) { // 6917F6 - sint16 actionX = 0; - sint16 actionY = 0; - sint16 xy_distance; + int16_t actionX = 0; + int16_t actionY = 0; + int16_t xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); if (action != 0xFF) @@ -5726,7 +5726,7 @@ void rct_peep::UpdateUsingBin() if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (pathingResult & PATHING_DESTINATION_REACHED) { @@ -5738,7 +5738,7 @@ void rct_peep::UpdateUsingBin() { if (action != PEEP_ACTION_NONE_2) { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); return; } @@ -5788,13 +5788,13 @@ void rct_peep::UpdateUsingBin() } // Bin selection is one of 4 corners - uint8 selected_bin = var_37 * 2; + uint8_t selected_bin = var_37 * 2; // This counts down 2 = No rubbish, 0 = full - uint8 space_left_in_bin = 0x3 & (tileElement->properties.path.addition_status >> selected_bin); - uint32 empty_containers = HasEmptyContainerStandardFlag(); + uint8_t space_left_in_bin = 0x3 & (tileElement->properties.path.addition_status >> selected_bin); + uint32_t empty_containers = HasEmptyContainerStandardFlag(); - for (uint8 cur_container = 0; cur_container < 32; cur_container++) + for (uint8_t cur_container = 0; cur_container < 32; cur_container++) { if (!(empty_containers & (1u << cur_container))) continue; @@ -5811,10 +5811,10 @@ void rct_peep::UpdateUsingBin() UpdateSpriteType(); continue; } - uint8 bp = item_standard_litter[cur_container]; + uint8_t bp = item_standard_litter[cur_container]; - sint32 litterX = x + (scenario_rand() & 7) - 3; - sint32 litterY = y + (scenario_rand() & 7) - 3; + int32_t litterX = x + (scenario_rand() & 7) - 3; + int32_t litterY = y + (scenario_rand() & 7) - 3; litter_create(litterX, litterY, z, scenario_rand() & 3, bp); item_standard_flags &= ~(1 << cur_container); @@ -5827,7 +5827,7 @@ void rct_peep::UpdateUsingBin() // space_left_in_bin = 0x3 & (tile_element->properties.path.addition_status >> selected_bin); empty_containers = HasEmptyContainerExtraFlag(); - for (uint8 cur_container = 0; cur_container < 32; cur_container++) + for (uint8_t cur_container = 0; cur_container < 32; cur_container++) { if (!(empty_containers & (1u << cur_container))) continue; @@ -5845,10 +5845,10 @@ void rct_peep::UpdateUsingBin() UpdateSpriteType(); continue; } - uint8 bp = item_extra_litter[cur_container]; + uint8_t bp = item_extra_litter[cur_container]; - sint32 litterX = x + (scenario_rand() & 7) - 3; - sint32 litterY = y + (scenario_rand() & 7) - 3; + int32_t litterX = x + (scenario_rand() & 7) - 3; + int32_t litterY = y + (scenario_rand() & 7) - 3; litter_create(litterX, litterY, z, scenario_rand() & 3, bp); item_extra_flags &= ~(1 << cur_container); @@ -5942,17 +5942,17 @@ bool rct_peep::UpdateWalkingFindBench() if (footpath_element_path_scenery_is_ghost(tileElement)) return false; - sint32 edges = (tileElement->properties.path.edges & 0xF) ^ 0xF; + int32_t edges = (tileElement->properties.path.edges & 0xF) ^ 0xF; if (edges == 0) return false; - uint8 chosen_edge = scenario_rand() & 0x3; + uint8_t chosen_edge = scenario_rand() & 0x3; for (; !(edges & (1 << chosen_edge));) chosen_edge = (chosen_edge + 1) & 0x3; - uint16 sprite_id = sprite_get_first_in_quadrant(x, y); - uint8 free_edge = 3; + uint16_t sprite_id = sprite_get_first_in_quadrant(x, y); + uint8_t free_edge = 3; // Check if there is no peep sitting in chosen_edge for (rct_sprite * sprite; sprite_id != SPRITE_INDEX_NULL; sprite_id = sprite->unknown.next_in_quadrant) @@ -5990,8 +5990,8 @@ bool rct_peep::UpdateWalkingFindBench() sub_state = PEEP_SITTING_TRYING_TO_SIT; - sint32 benchX = (x & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].x; - sint32 benchY = (y & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].y; + int32_t benchX = (x & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].x; + int32_t benchY = (y & 0xFFE0) + BenchUseOffsets[var_37 & 0x7].y; destination_x = benchX; destination_y = benchY; @@ -6041,19 +6041,19 @@ bool rct_peep::UpdateWalkingFindBin() if (footpath_element_path_scenery_is_ghost(tileElement)) return false; - sint32 edges = (tileElement->properties.path.edges & 0xF) ^ 0xF; + int32_t edges = (tileElement->properties.path.edges & 0xF) ^ 0xF; if (edges == 0) return false; - uint8 chosen_edge = scenario_rand() & 0x3; + uint8_t chosen_edge = scenario_rand() & 0x3; // Note: Bin quantity is inverted 0 = full, 3 = empty - uint8 bin_quantities = tileElement->properties.path.addition_status; + uint8_t bin_quantities = tileElement->properties.path.addition_status; // Rotate the bin to the correct edge. Makes it easier for next calc. bin_quantities = ror8(ror8(bin_quantities, chosen_edge), chosen_edge); - for (uint8 free_edge = 4; free_edge != 0; free_edge--) + for (uint8_t free_edge = 4; free_edge != 0; free_edge--) { // If not full if (bin_quantities & 0x3) @@ -6072,8 +6072,8 @@ bool rct_peep::UpdateWalkingFindBin() peep->SetState(PEEP_STATE_USING_BIN); peep->sub_state = PEEP_USING_BIN_WALKING_TO_BIN; - sint32 binX = (peep->x & 0xFFE0) + BinUseOffsets[peep->var_37 & 0x3].x; - sint32 binY = (peep->y & 0xFFE0) + BinUseOffsets[peep->var_37 & 0x3].y; + int32_t binX = (peep->x & 0xFFE0) + BinUseOffsets[peep->var_37 & 0x3].x; + int32_t binY = (peep->y & 0xFFE0) + BinUseOffsets[peep->var_37 & 0x3].y; peep->destination_x = binX; peep->destination_y = binY; @@ -6138,11 +6138,11 @@ static void peep_update_walking_break_scenery(rct_peep * peep) if (footpath_element_path_scenery_is_ghost(tileElement)) return; - sint32 edges = tileElement->properties.path.edges & 0xF; + int32_t edges = tileElement->properties.path.edges & 0xF; if (edges == 0xF) return; - uint16 sprite_id = sprite_get_first_in_quadrant(peep->x, peep->y); + uint16_t sprite_id = sprite_get_first_in_quadrant(peep->x, peep->y); // Check if a peep is already sitting on the bench. If so, do not vandalise it. for (rct_sprite * sprite; sprite_id != SPRITE_INDEX_NULL; sprite_id = sprite->unknown.next_in_quadrant) @@ -6159,7 +6159,7 @@ static void peep_update_walking_break_scenery(rct_peep * peep) } rct_peep * inner_peep; - uint16 sprite_index; + uint16_t sprite_index; FOR_ALL_STAFF(sprite_index, inner_peep) { @@ -6169,8 +6169,8 @@ static void peep_update_walking_break_scenery(rct_peep * peep) if (inner_peep->x == LOCATION_NULL) continue; - sint32 x_diff = abs(inner_peep->x - peep->x); - sint32 y_diff = abs(inner_peep->y - peep->y); + int32_t x_diff = abs(inner_peep->x - peep->x); + int32_t y_diff = abs(inner_peep->y - peep->y); if (std::max(x_diff, y_diff) < 224) return; @@ -6243,7 +6243,7 @@ static bool peep_should_watch_ride(rct_tile_element * tileElement) return true; } -bool loc_690FD0(rct_peep * peep, uint8 * rideToView, uint8 * rideSeatToView, rct_tile_element * tileElement) +bool loc_690FD0(rct_peep * peep, uint8_t * rideToView, uint8_t * rideSeatToView, rct_tile_element * tileElement) { Ride * ride = get_ride(track_element_get_ride_index(tileElement)); @@ -6288,7 +6288,7 @@ bool loc_690FD0(rct_peep * peep, uint8 * rideToView, uint8 * rideSeatToView, rct * @param[out] rideSeatToView (ch) * @return !CF */ -static bool peep_find_ride_to_look_at(rct_peep * peep, uint8 edge, uint8 * rideToView, uint8 * rideSeatToView) +static bool peep_find_ride_to_look_at(rct_peep * peep, uint8_t edge, uint8_t * rideToView, uint8_t * rideSeatToView) { rct_tile_element *tileElement, *surfaceElement; @@ -6319,8 +6319,8 @@ static bool peep_find_ride_to_look_at(rct_peep * peep, uint8 edge, uint8 * rideT return false; } while (!(tileElement++)->IsLastForTile()); - uint16 x = peep->next_x + CoordsDirectionDelta[edge].x; - uint16 y = peep->next_y + CoordsDirectionDelta[edge].y; + uint16_t x = peep->next_x + CoordsDirectionDelta[edge].x; + uint16_t y = peep->next_y + CoordsDirectionDelta[edge].y; if (x > 255 * 32 || y > 255 * 32) { return false; @@ -6626,7 +6626,7 @@ static bool peep_find_ride_to_look_at(rct_peep * peep, uint8 edge, uint8 * rideT } /* Part of 0x0069B8CC rct2: 0x0069BC31 */ -void rct_peep::SetSpriteType(uint8 new_sprite_type) +void rct_peep::SetSpriteType(uint8_t new_sprite_type) { if (sprite_type == new_sprite_type) return; @@ -6664,9 +6664,9 @@ void rct_peep::SetSpriteType(uint8 new_sprite_type) struct item_pref_t { - uint8 type; // 0 for standard, 1 for extra - uint32 item; // And this with the relevant flags - uint8 sprite_type; + uint8_t type; // 0 for standard, 1 for extra + uint32_t item; // And this with the relevant flags + uint8_t sprite_type; }; // clang-format off diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index 47280147b5..3a38f41efa 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -17,12 +17,12 @@ #include "../util/Util.h" static bool _peepPathFindIsStaff; -static sint8 _peepPathFindNumJunctions; -static sint8 _peepPathFindMaxJunctions; -static sint32 _peepPathFindTilesChecked; -static uint8 _peepPathFindFewestNumSteps; +static int8_t _peepPathFindNumJunctions; +static int8_t _peepPathFindMaxJunctions; +static int32_t _peepPathFindTilesChecked; +static uint8_t _peepPathFindFewestNumSteps; -static sint32 guest_surface_path_finding(rct_peep * peep); +static int32_t guest_surface_path_finding(rct_peep * peep); /* A junction history for the peep pathfinding heuristic search * The magic number 16 is the largest value returned by @@ -31,7 +31,7 @@ static sint32 guest_surface_path_finding(rct_peep * peep); static struct { TileCoordsXYZ location; - uint8 direction; + uint8_t direction; } _peepPathFindHistory[16]; enum @@ -76,7 +76,7 @@ static rct_tile_element * get_banner_on_path(rct_tile_element * path_element) return nullptr; } -static sint32 banner_clear_path_edges(rct_tile_element * tileElement, sint32 edges) +static int32_t banner_clear_path_edges(rct_tile_element * tileElement, int32_t edges) { if (_peepPathFindIsStaff) return edges; @@ -94,7 +94,7 @@ static sint32 banner_clear_path_edges(rct_tile_element * tileElement, sint32 edg /** * Gets the connected edges of a path that are permitted (i.e. no 'no entry' signs) */ -static sint32 path_get_permitted_edges(rct_tile_element * tileElement) +static int32_t path_get_permitted_edges(rct_tile_element * tileElement) { return banner_clear_path_edges(tileElement, tileElement->properties.path.edges) & 0x0F; } @@ -103,11 +103,11 @@ static sint32 path_get_permitted_edges(rct_tile_element * tileElement) * * rct2: 0x0069524E */ -static sint32 peep_move_one_tile(uint8 direction, rct_peep * peep) +static int32_t peep_move_one_tile(uint8_t direction, rct_peep * peep) { assert(direction <= 3); - sint16 x = peep->next_x; - sint16 y = peep->next_y; + int16_t x = peep->next_x; + int16_t y = peep->next_y; x += CoordsDirectionDelta[direction].x; y += CoordsDirectionDelta[direction].y; @@ -132,18 +132,18 @@ static sint32 peep_move_one_tile(uint8 direction, rct_peep * peep) * * rct2: 0x00694C41 */ -static sint32 guest_surface_path_finding(rct_peep * peep) +static int32_t guest_surface_path_finding(rct_peep * peep) { - sint16 x = peep->next_x; - sint16 y = peep->next_y; - sint16 z = peep->next_z; - uint8 randDirection = scenario_rand() & 3; + int16_t x = peep->next_x; + int16_t y = peep->next_y; + int16_t z = peep->next_z; + uint8_t randDirection = scenario_rand() & 3; if (!fence_in_the_way(x, y, z, z + 4, randDirection)) { x += CoordsDirectionDelta[randDirection].x; y += CoordsDirectionDelta[randDirection].y; - uint8 backwardsDirection = randDirection ^ (1 << 1); + uint8_t backwardsDirection = randDirection ^ (1 << 1); if (!fence_in_the_way(x, y, z, z + 4, backwardsDirection)) { @@ -155,7 +155,7 @@ static sint32 guest_surface_path_finding(rct_peep * peep) } randDirection++; - uint8 rand_backwards = scenario_rand() & 1; + uint8_t rand_backwards = scenario_rand() & 1; if (rand_backwards) { randDirection -= 2; @@ -168,7 +168,7 @@ static sint32 guest_surface_path_finding(rct_peep * peep) { x += CoordsDirectionDelta[randDirection].x; y += CoordsDirectionDelta[randDirection].y; - uint8 backwardsDirection = randDirection ^ (1 << 1); + uint8_t backwardsDirection = randDirection ^ (1 << 1); if (!fence_in_the_way(x, y, z, z + 4, backwardsDirection)) { @@ -188,7 +188,7 @@ static sint32 guest_surface_path_finding(rct_peep * peep) { x += CoordsDirectionDelta[randDirection].x; y += CoordsDirectionDelta[randDirection].y; - uint8 backwardsDirection = randDirection ^ (1 << 1); + uint8_t backwardsDirection = randDirection ^ (1 << 1); if (!fence_in_the_way(x, y, z, z + 4, backwardsDirection)) { @@ -221,8 +221,8 @@ static sint32 guest_surface_path_finding(rct_peep * peep) * Returns the type of the next footpath tile a peep can get to from x,y,z / * inputTileElement in the given direction. */ -static uint8 footpath_element_next_in_direction(TileCoordsXYZ loc, rct_tile_element * tileElement, - uint8 chosenDirection) +static uint8_t footpath_element_next_in_direction(TileCoordsXYZ loc, rct_tile_element * tileElement, + uint8_t chosenDirection) { rct_tile_element * nextTileElement; @@ -274,15 +274,15 @@ static uint8 footpath_element_next_in_direction(TileCoordsXYZ loc, rct_tile_elem * * This is the recursive portion of footpath_element_destination_in_direction(). */ -static uint8 footpath_element_dest_in_dir( +static uint8_t footpath_element_dest_in_dir( TileCoordsXYZ loc, [[maybe_unused]] rct_tile_element* inputTileElement, - uint8 chosenDirection, - uint8* outRideIndex, - sint32 level) + uint8_t chosenDirection, + uint8_t* outRideIndex, + int32_t level) { rct_tile_element * tileElement; - sint32 direction; + int32_t direction; if (level > 25) return PATH_SEARCH_LIMIT_REACHED; @@ -304,7 +304,7 @@ static uint8 footpath_element_dest_in_dir( { if (loc.z != tileElement->base_height) continue; - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); Ride * ride = get_ride(rideIndex); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) { @@ -344,7 +344,7 @@ static uint8 footpath_element_dest_in_dir( if (footpath_element_is_wide(tileElement)) return PATH_SEARCH_WIDE; - uint8 edges = path_get_permitted_edges(tileElement); + uint8_t edges = path_get_permitted_edges(tileElement); edges &= ~(1 << (chosenDirection ^ 2)); loc.z = tileElement->base_height; @@ -396,8 +396,8 @@ static uint8 footpath_element_dest_in_dir( * This is useful for finding out what is at the end of a short single * width path, for example that leads from a ride exit back to the main path. */ -static uint8 footpath_element_destination_in_direction(TileCoordsXYZ loc, rct_tile_element * inputTileElement, - uint8 chosenDirection, uint8 * outRideIndex) +static uint8_t footpath_element_destination_in_direction(TileCoordsXYZ loc, rct_tile_element * inputTileElement, + uint8_t chosenDirection, uint8_t * outRideIndex) { if (footpath_element_is_sloped(inputTileElement)) { @@ -414,7 +414,7 @@ static uint8 footpath_element_destination_in_direction(TileCoordsXYZ loc, rct_ti * * rct2: 0x00695225 */ -static sint32 guest_path_find_aimless(rct_peep * peep, uint8 edges) +static int32_t guest_path_find_aimless(rct_peep * peep, uint8_t edges) { if (scenario_rand() & 1) { @@ -427,7 +427,7 @@ static sint32 guest_path_find_aimless(rct_peep * peep, uint8 edges) while (true) { - uint8 direction = scenario_rand() & 3; + uint8_t direction = scenario_rand() & 3; // Otherwise go in a random direction allowed from the tile. if (edges & (1 << direction)) { @@ -440,7 +440,7 @@ static sint32 guest_path_find_aimless(rct_peep * peep, uint8 edges) * * rct2: 0x0069A60A */ -static uint8 peep_pathfind_get_max_number_junctions(rct_peep * peep) +static uint8_t peep_pathfind_get_max_number_junctions(rct_peep * peep) { if (peep->type == PEEP_TYPE_STAFF) return 8; @@ -478,17 +478,17 @@ static uint8 peep_pathfind_get_max_number_junctions(rct_peep * peep) */ static bool path_is_thin_junction(rct_tile_element * path, TileCoordsXYZ loc) { - uint8 edges = footpath_get_edges(path); + uint8_t edges = footpath_get_edges(path); - sint32 test_edge = bitscanforward(edges); + int32_t test_edge = bitscanforward(edges); if (test_edge == -1) return false; bool thin_junction = false; - sint32 thin_count = 0; + int32_t thin_count = 0; do { - sint32 fp_result = footpath_element_next_in_direction(loc, path, test_edge); + int32_t fp_result = footpath_element_next_in_direction(loc, path, test_edge); /* Ignore non-paths (e.g. ride entrances, shops), wide paths * and ride queues (per ignoreQueues) when counting @@ -585,11 +585,11 @@ static bool path_is_thin_junction(rct_tile_element * path, TileCoordsXYZ loc) * rct2: 0x0069A997 */ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, rct_tile_element * currentTileElement, - bool inPatrolArea, uint8 counter, uint16 * endScore, sint32 test_edge, - uint8 * endJunctions, TileCoordsXYZ junctionList[16], uint8 directionList[16], - TileCoordsXYZ * endXYZ, uint8 * endSteps) + bool inPatrolArea, uint8_t counter, uint16_t * endScore, int32_t test_edge, + uint8_t * endJunctions, TileCoordsXYZ junctionList[16], uint8_t directionList[16], + TileCoordsXYZ * endXYZ, uint8_t * endSteps) { - uint8 searchResult = PATH_SEARCH_FAILED; + uint8_t searchResult = PATH_SEARCH_FAILED; bool currentElementIsWide = (footpath_element_is_wide(currentTileElement) && !staff_can_ignore_wide_flag(peep, loc.x * 32, loc.y * 32, loc.z, currentTileElement)); @@ -602,7 +602,7 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r /* If this is where the search started this is a search loop and the * current search path ends here. * Return without updating the parameters (best result so far). */ - if ((_peepPathFindHistory[0].location.x == (uint8)loc.x) && (_peepPathFindHistory[0].location.y == (uint8)loc.y) && + if ((_peepPathFindHistory[0].location.x == (uint8_t)loc.x) && (_peepPathFindHistory[0].location.y == (uint8_t)loc.y) && (_peepPathFindHistory[0].location.z == loc.z)) { #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 @@ -648,7 +648,7 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) continue; - uint8 rideIndex = 0xFF; + uint8_t rideIndex = 0xFF; switch (tileElement->GetType()) { case TILE_ELEMENT_TYPE_TRACK: @@ -673,7 +673,7 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r case TILE_ELEMENT_TYPE_ENTRANCE: if (loc.z != tileElement->base_height) continue; - sint32 direction; + int32_t direction; searchResult = PATH_SEARCH_OTHER; switch (tileElement->properties.entrance.type) { @@ -740,7 +740,7 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r searchResult = PATH_SEARCH_THIN; - uint8 numEdges = bitcount(footpath_get_edges(tileElement)); + uint8_t numEdges = bitcount(footpath_get_edges(tileElement)); if (numEdges < 2) { @@ -789,14 +789,14 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r * Ignore for now. */ // Calculate the heuristic score of this map element. - uint16 x_delta = abs(gPeepPathFindGoalPosition.x - loc.x) * 32; - uint16 y_delta = abs(gPeepPathFindGoalPosition.y - loc.y) * 32; + uint16_t x_delta = abs(gPeepPathFindGoalPosition.x - loc.x) * 32; + uint16_t y_delta = abs(gPeepPathFindGoalPosition.y - loc.y) * 32; if (x_delta < y_delta) x_delta >>= 4; else y_delta >>= 4; - uint16 new_score = x_delta + y_delta; - uint16 z_delta = abs(gPeepPathFindGoalPosition.z - loc.z); + uint16_t new_score = x_delta + y_delta; + uint16_t z_delta = abs(gPeepPathFindGoalPosition.z - loc.z); z_delta <<= 1; new_score += z_delta; @@ -814,9 +814,9 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r *endXYZ = loc; // Update the telemetry *endJunctions = _peepPathFindMaxJunctions - _peepPathFindNumJunctions; - for (uint8 junctInd = 0; junctInd < *endJunctions; junctInd++) + for (uint8_t junctInd = 0; junctInd < *endJunctions; junctInd++) { - uint8 histIdx = _peepPathFindMaxJunctions - junctInd; + uint8_t histIdx = _peepPathFindMaxJunctions - junctInd; junctionList[junctInd].x = _peepPathFindHistory[histIdx].location.x; junctionList[junctInd].y = _peepPathFindHistory[histIdx].location.y; junctionList[junctInd].z = _peepPathFindHistory[histIdx].location.z; @@ -872,9 +872,9 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r *endXYZ = loc; // Update the telemetry *endJunctions = _peepPathFindMaxJunctions - _peepPathFindNumJunctions; - for (uint8 junctInd = 0; junctInd < *endJunctions; junctInd++) + for (uint8_t junctInd = 0; junctInd < *endJunctions; junctInd++) { - uint8 histIdx = _peepPathFindMaxJunctions - junctInd; + uint8_t histIdx = _peepPathFindMaxJunctions - junctInd; junctionList[junctInd].x = _peepPathFindHistory[histIdx].location.x; junctionList[junctInd].y = _peepPathFindHistory[histIdx].location.y; junctionList[junctInd].z = _peepPathFindHistory[histIdx].location.z; @@ -893,7 +893,7 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r /* At this point the map element is a non-wide path.*/ /* Get all the permitted_edges of the map element. */ - uint8 edges = path_get_permitted_edges(tileElement); + uint8_t edges = path_get_permitted_edges(tileElement); #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) @@ -906,7 +906,7 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r /* Remove the reverse edge (i.e. the edge back to the previous map element.) */ edges &= ~(1 << (test_edge ^ 2)); - sint32 next_test_edge = bitscanforward(edges); + int32_t next_test_edge = bitscanforward(edges); /* If there are no other edges the current search ends here. * Continue to the next map element without updating the parameters (best result so far). */ @@ -938,9 +938,9 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r *endXYZ = loc; // Update the telemetry *endJunctions = _peepPathFindMaxJunctions - _peepPathFindNumJunctions; - for (uint8 junctInd = 0; junctInd < *endJunctions; junctInd++) + for (uint8_t junctInd = 0; junctInd < *endJunctions; junctInd++) { - uint8 histIdx = _peepPathFindMaxJunctions - junctInd; + uint8_t histIdx = _peepPathFindMaxJunctions - junctInd; junctionList[junctInd].x = _peepPathFindHistory[histIdx].location.x; junctionList[junctInd].y = _peepPathFindHistory[histIdx].location.y; junctionList[junctInd].z = _peepPathFindHistory[histIdx].location.z; @@ -1007,11 +1007,11 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r /* Check the _peepPathFindHistory to see if this junction has been * previously passed through in the current search path. * i.e. this is a loop in the current search path. */ - for (sint32 junctionNum = _peepPathFindNumJunctions + 1; junctionNum <= _peepPathFindMaxJunctions; + for (int32_t junctionNum = _peepPathFindNumJunctions + 1; junctionNum <= _peepPathFindMaxJunctions; junctionNum++) { - if ((_peepPathFindHistory[junctionNum].location.x == (uint8)loc.x) && - (_peepPathFindHistory[junctionNum].location.y == (uint8)loc.y) && + if ((_peepPathFindHistory[junctionNum].location.x == (uint8_t)loc.x) && + (_peepPathFindHistory[junctionNum].location.y == (uint8_t)loc.y) && (_peepPathFindHistory[junctionNum].location.z == loc.z)) { pathLoop = true; @@ -1048,9 +1048,9 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r *endXYZ = loc; // Update the telemetry *endJunctions = _peepPathFindMaxJunctions; // - _peepPathFindNumJunctions; - for (uint8 junctInd = 0; junctInd < *endJunctions; junctInd++) + for (uint8_t junctInd = 0; junctInd < *endJunctions; junctInd++) { - uint8 histIdx = _peepPathFindMaxJunctions - junctInd; + uint8_t histIdx = _peepPathFindMaxJunctions - junctInd; junctionList[junctInd].x = _peepPathFindHistory[histIdx].location.x; junctionList[junctInd].y = _peepPathFindHistory[histIdx].location.y; junctionList[junctInd].z = _peepPathFindHistory[histIdx].location.z; @@ -1069,8 +1069,8 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r /* This junction was NOT previously visited in the current * search path, so add the junction to the history. */ - _peepPathFindHistory[_peepPathFindNumJunctions].location.x = (uint8)loc.x; - _peepPathFindHistory[_peepPathFindNumJunctions].location.y = (uint8)loc.y; + _peepPathFindHistory[_peepPathFindNumJunctions].location.x = (uint8_t)loc.x; + _peepPathFindHistory[_peepPathFindNumJunctions].location.y = (uint8_t)loc.y; _peepPathFindHistory[_peepPathFindNumJunctions].location.z = loc.z; // .direction take is added below. @@ -1083,9 +1083,9 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r do { edges &= ~(1 << next_test_edge); - uint8 savedNumJunctions = _peepPathFindNumJunctions; + uint8_t savedNumJunctions = _peepPathFindNumJunctions; - uint8 height = loc.z; + uint8_t height = loc.z; if (footpath_element_is_sloped(tileElement) && footpath_element_get_slope_direction(tileElement) == next_test_edge) { height += 2; @@ -1159,14 +1159,14 @@ static void peep_pathfind_heuristic_search(TileCoordsXYZ loc, rct_peep * peep, r * * rct2: 0x0069A5F0 */ -sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) +int32_t peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) { // The max number of thin junctions searched - a per-search-path limit. _peepPathFindMaxJunctions = peep_pathfind_get_max_number_junctions(peep); /* The max number of tiles to check - a whole-search limit. * Mainly to limit the performance impact of the path finding. */ - sint32 maxTilesChecked = (peep->type == PEEP_TYPE_STAFF) ? 50000 : 15000; + int32_t maxTilesChecked = (peep->type == PEEP_TYPE_STAFF) ? 50000 : 15000; // Used to allow walking through no entry banners _peepPathFindIsStaff = (peep->type == PEEP_TYPE_STAFF); @@ -1200,7 +1200,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) rct_tile_element * first_tile_element = nullptr; bool found = false; - uint8 permitted_edges = 0; + uint8_t permitted_edges = 0; bool isThin = false; do { @@ -1230,7 +1230,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) return -1; permitted_edges &= 0xF; - uint8 edges = permitted_edges; + uint8_t edges = permitted_edges; if (isThin && peep->pathfind_goal.x == goal.x && peep->pathfind_goal.y == goal.y && peep->pathfind_goal.z == goal.z) { /* Use of peep->pathfind_history[]: @@ -1322,18 +1322,18 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) if (edges == 0) return -1; - sint32 chosen_edge = bitscanforward(edges); + int32_t chosen_edge = bitscanforward(edges); // Peep has multiple edges still to try. if (edges & ~(1 << chosen_edge)) { - uint16 best_score = 0xFFFF; - uint8 best_sub = 0xFF; + uint16_t best_score = 0xFFFF; + uint8_t best_sub = 0xFF; #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - uint8 bestJunctions = 0; + uint8_t bestJunctions = 0; TileCoordsXYZ bestJunctionList[16]; - uint8 bestDirectionList[16]; + uint8_t bestDirectionList[16]; TileCoordsXYZ bestXYZ; if (gPathFindDebug) @@ -1346,11 +1346,11 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) * edge that gives the best (i.e. smallest) value (best_score) * or for different edges with equal value, the edge with the * least steps (best_sub). */ - sint32 numEdges = bitcount(edges); - for (sint32 test_edge = chosen_edge; test_edge != -1; test_edge = bitscanforward(edges)) + int32_t numEdges = bitcount(edges); + for (int32_t test_edge = chosen_edge; test_edge != -1; test_edge = bitscanforward(edges)) { edges &= ~(1 << test_edge); - uint8 height = loc.z; + uint8_t height = loc.z; if (footpath_element_is_sloped(first_tile_element) && footpath_element_get_slope_direction(first_tile_element) == test_edge) @@ -1371,12 +1371,12 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) /* The pathfinding will only use elements * 1.._peepPathFindMaxJunctions, so the starting point * is placed in element 0 */ - _peepPathFindHistory[0].location.x = (uint8)(loc.x); - _peepPathFindHistory[0].location.y = (uint8)(loc.y); + _peepPathFindHistory[0].location.x = (uint8_t)(loc.x); + _peepPathFindHistory[0].location.y = (uint8_t)(loc.y); _peepPathFindHistory[0].location.z = loc.z; _peepPathFindHistory[0].direction = 0xF; - uint16 score = 0xFFFF; + uint16_t score = 0xFFFF; /* Variable endXYZ contains the end location of the * search path. */ TileCoordsXYZ endXYZ; @@ -1384,7 +1384,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) endXYZ.y = 0; endXYZ.z = 0; - uint8 endSteps = 255; + uint8_t endSteps = 255; /* Variable endJunctions is the number of junctions * passed through in the search path. @@ -1393,9 +1393,9 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) * of the search path. * In the future these could be used to visualise the * pathfinding on the map. */ - uint8 endJunctions = 0; + uint8_t endJunctions = 0; TileCoordsXYZ endJunctionList[16]; - uint8 endDirectionList[16] = { 0 }; + uint8_t endDirectionList[16] = { 0 }; bool inPatrolArea = false; if (peep->type == PEEP_TYPE_STAFF && peep->staff_type == STAFF_TYPE_MECHANIC) @@ -1421,7 +1421,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) { log_verbose("Pathfind test edge: %d score: %d steps: %d end: %d,%d,%d junctions: %d", test_edge, score, endSteps, endXYZ.x, endXYZ.y, endXYZ.z, endJunctions); - for (uint8 listIdx = 0; listIdx < endJunctions; listIdx++) + for (uint8_t listIdx = 0; listIdx < endJunctions; listIdx++) { log_info("Junction#%d %d,%d,%d Direction %d", listIdx + 1, endJunctionList[listIdx].x, endJunctionList[listIdx].y, endJunctionList[listIdx].z, endDirectionList[listIdx]); @@ -1436,7 +1436,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) best_sub = endSteps; #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 bestJunctions = endJunctions; - for (uint8 index = 0; index < endJunctions; index++) + for (uint8_t index = 0; index < endJunctions; index++) { bestJunctionList[index].x = endJunctionList[index].x; bestJunctionList[index].y = endJunctionList[index].y; @@ -1467,7 +1467,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) if (gPathFindDebug) { log_verbose("Pathfind best edge %d with score %d steps %d", chosen_edge, best_score, best_sub); - for (uint8 listIdx = 0; listIdx < bestJunctions; listIdx++) + for (uint8_t listIdx = 0; listIdx < bestJunctions; listIdx++) { log_verbose("Junction#%d %d,%d,%d Direction %d", listIdx + 1, bestJunctionList[listIdx].x, bestJunctionList[listIdx].y, bestJunctionList[listIdx].z, bestDirectionList[listIdx]); @@ -1479,7 +1479,7 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) if (isThin) { - for (sint32 i = 0; i < 4; ++i) + for (int32_t i = 0; i < 4; ++i) { if (peep->pathfind_history[i].x == loc.x && peep->pathfind_history[i].y == loc.y && peep->pathfind_history[i].z == loc.z) @@ -1504,10 +1504,10 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) /* Peep does not remember this junction, so forget a junction * and remember this junction. */ - sint32 i = peep->pathfind_goal.direction++; + int32_t i = peep->pathfind_goal.direction++; peep->pathfind_goal.direction &= 3; - peep->pathfind_history[i].x = (uint8)loc.x; - peep->pathfind_history[i].y = (uint8)loc.y; + peep->pathfind_history[i].x = (uint8_t)loc.x; + peep->pathfind_history[i].y = (uint8_t)loc.y; peep->pathfind_history[i].z = loc.z; peep->pathfind_history[i].direction = permitted_edges; /* Remove the chosen_edge from those left to try. */ @@ -1533,16 +1533,16 @@ sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep) * @param y y coordinate of location * @return Index of gParkEntrance (or 0xFF if no park entrances exist). */ -static uint8 get_nearest_park_entrance_index(uint16 x, uint16 y) +static uint8_t get_nearest_park_entrance_index(uint16_t x, uint16_t y) { - uint8 chosenEntrance = 0xFF; - uint16 nearestDist = 0xFFFF; - for (uint8 i = 0; i < MAX_PARK_ENTRANCES; i++) + uint8_t chosenEntrance = 0xFF; + uint16_t nearestDist = 0xFFFF; + for (uint8_t i = 0; i < MAX_PARK_ENTRANCES; i++) { if (gParkEntrances[i].x == LOCATION_NULL) continue; - uint16 dist = abs(gParkEntrances[i].x - x) + abs(gParkEntrances[i].y - y); + uint16_t dist = abs(gParkEntrances[i].x - x) + abs(gParkEntrances[i].y - y); if (dist >= nearestDist) continue; @@ -1557,24 +1557,24 @@ static uint8 get_nearest_park_entrance_index(uint16 x, uint16 y) * * rct2: 0x006952C0 */ -static sint32 guest_path_find_entering_park(rct_peep* peep, [[maybe_unused]] rct_tile_element* tile_element, uint8 edges) +static int32_t guest_path_find_entering_park(rct_peep* peep, [[maybe_unused]] rct_tile_element* tile_element, uint8_t edges) { // Send peeps to the nearest park entrance. - uint8 chosenEntrance = get_nearest_park_entrance_index(peep->next_x, peep->next_y); + uint8_t chosenEntrance = get_nearest_park_entrance_index(peep->next_x, peep->next_y); // If no defined park entrances are found, walk aimlessly. if (chosenEntrance == 0xFF) return guest_path_find_aimless(peep, edges); - sint16 x = gParkEntrances[chosenEntrance].x; - sint16 y = gParkEntrances[chosenEntrance].y; - sint16 z = gParkEntrances[chosenEntrance].z; + int16_t x = gParkEntrances[chosenEntrance].x; + int16_t y = gParkEntrances[chosenEntrance].y; + int16_t z = gParkEntrances[chosenEntrance].z; gPeepPathFindGoalPosition = { x / 32, y / 32, z >> 3 }; gPeepPathFindIgnoreForeignQueues = true; gPeepPathFindQueueRideIndex = 255; - sint32 chosenDirection = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); + int32_t chosenDirection = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); if (chosenDirection == -1) return guest_path_find_aimless(peep, edges); @@ -1588,16 +1588,16 @@ static sint32 guest_path_find_entering_park(rct_peep* peep, [[maybe_unused]] rct * @param y y coordinate of location * @return Index of gPeepSpawns (or 0xFF if no peep spawns exist). */ -static uint8 get_nearest_peep_spawn_index(uint16 x, uint16 y) +static uint8_t get_nearest_peep_spawn_index(uint16_t x, uint16_t y) { - uint8 chosenSpawn = 0xFF; - uint16 nearestDist = 0xFFFF; - for (uint8 i = 0; i < MAX_PEEP_SPAWNS; ++i) + uint8_t chosenSpawn = 0xFF; + uint16_t nearestDist = 0xFFFF; + for (uint8_t i = 0; i < MAX_PEEP_SPAWNS; ++i) { if (gPeepSpawns[i].x == PEEP_SPAWN_UNDEFINED) continue; - uint16 dist = abs(gPeepSpawns[i].x - x) + abs(gPeepSpawns[i].y - y); + uint16_t dist = abs(gPeepSpawns[i].x - x) + abs(gPeepSpawns[i].y - y); if (dist >= nearestDist) continue; @@ -1612,10 +1612,10 @@ static uint8 get_nearest_peep_spawn_index(uint16 x, uint16 y) * * rct2: 0x0069536C */ -static sint32 guest_path_find_leaving_park(rct_peep* peep, [[maybe_unused]] rct_tile_element* tile_element, uint8 edges) +static int32_t guest_path_find_leaving_park(rct_peep* peep, [[maybe_unused]] rct_tile_element* tile_element, uint8_t edges) { // Send peeps to the nearest spawn point. - uint8 chosenSpawn = get_nearest_peep_spawn_index(peep->next_x, peep->next_y); + uint8_t chosenSpawn = get_nearest_peep_spawn_index(peep->next_x, peep->next_y); // If no defined spawns were found, walk aimlessly. if (chosenSpawn == 0xFF) @@ -1623,10 +1623,10 @@ static sint32 guest_path_find_leaving_park(rct_peep* peep, [[maybe_unused]] rct_ PeepSpawn * peepSpawn = &gPeepSpawns[chosenSpawn]; - sint16 x = peepSpawn->x & 0xFFE0; - sint16 y = peepSpawn->y & 0xFFE0; - uint8 z = peepSpawn->z / 8; - uint8 direction = peepSpawn->direction; + int16_t x = peepSpawn->x & 0xFFE0; + int16_t y = peepSpawn->y & 0xFFE0; + uint8_t z = peepSpawn->z / 8; + uint8_t direction = peepSpawn->direction; gPeepPathFindGoalPosition = { x / 32, y / 32, z }; if (x == peep->next_x && y == peep->next_y) @@ -1647,9 +1647,9 @@ static sint32 guest_path_find_leaving_park(rct_peep* peep, [[maybe_unused]] rct_ * * rct2: 0x00695161 */ -static sint32 guest_path_find_park_entrance(rct_peep* peep, [[maybe_unused]] rct_tile_element* tile_element, uint8 edges) +static int32_t guest_path_find_park_entrance(rct_peep* peep, [[maybe_unused]] rct_tile_element* tile_element, uint8_t edges) { - uint8 entranceNum; + uint8_t entranceNum; // Resolves already-corrupt guests (e.g. loaded from save) if (peep->peep_flags & PEEP_FLAGS_PARK_ENTRANCE_CHOSEN && @@ -1660,14 +1660,14 @@ static sint32 guest_path_find_park_entrance(rct_peep* peep, [[maybe_unused]] rct if (!(peep->peep_flags & PEEP_FLAGS_PARK_ENTRANCE_CHOSEN)) { - uint8 chosenEntrance = 0xFF; - uint16 nearestDist = 0xFFFF; + uint8_t chosenEntrance = 0xFF; + uint16_t nearestDist = 0xFFFF; for (entranceNum = 0; entranceNum < MAX_PARK_ENTRANCES; ++entranceNum) { if (gParkEntrances[entranceNum].x == LOCATION_NULL) continue; - uint16 dist = abs(gParkEntrances[entranceNum].x - peep->next_x) + abs(gParkEntrances[entranceNum].y - peep->next_y); + uint16_t dist = abs(gParkEntrances[entranceNum].x - peep->next_x) + abs(gParkEntrances[entranceNum].y - peep->next_y); if (dist >= nearestDist) continue; @@ -1684,9 +1684,9 @@ static sint32 guest_path_find_park_entrance(rct_peep* peep, [[maybe_unused]] rct } entranceNum = peep->current_ride; - sint16 x = gParkEntrances[entranceNum].x; - sint16 y = gParkEntrances[entranceNum].y; - sint16 z = gParkEntrances[entranceNum].z; + int16_t x = gParkEntrances[entranceNum].x; + int16_t y = gParkEntrances[entranceNum].y; + int16_t z = gParkEntrances[entranceNum].z; gPeepPathFindGoalPosition = { x / 32, y / 32, z >> 3 }; gPeepPathFindIgnoreForeignQueues = true; @@ -1696,7 +1696,7 @@ static sint32 guest_path_find_park_entrance(rct_peep* peep, [[maybe_unused]] rct pathfind_logging_enable(peep); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - sint32 chosenDirection = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); + int32_t chosenDirection = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 pathfind_logging_disable(); @@ -1742,11 +1742,11 @@ static void get_ride_queue_end(TileCoordsXYZ &loc) if (!found) return; - uint8 direction = tile_element_get_direction_with_offset(tileElement, 2); + uint8_t direction = tile_element_get_direction_with_offset(tileElement, 2); rct_tile_element * lastPathElement = nullptr; rct_tile_element * firstPathElement = nullptr; - sint16 baseZ = tileElement->base_height; + int16_t baseZ = tileElement->base_height; TileCoordsXY nextTile = { loc.x, loc.y }; while (true) @@ -1853,9 +1853,9 @@ static void get_ride_queue_end(TileCoordsXYZ &loc) * * rct2: 0x00694C35 */ -sint32 guest_path_finding(rct_peep * peep) +int32_t guest_path_finding(rct_peep * peep) { - //sint16 x, y, z; + //int16_t x, y, z; #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 pathfind_logging_enable(peep); @@ -1879,7 +1879,7 @@ sint32 guest_path_finding(rct_peep * peep) } _peepPathFindIsStaff = false; - uint8 edges = path_get_permitted_edges(tileElement); + uint8_t edges = path_get_permitted_edges(tileElement); if (edges == 0) { @@ -1890,8 +1890,8 @@ sint32 guest_path_finding(rct_peep * peep) { /* If this tileElement is adjacent to any non-wide paths, * remove all of the edges to wide paths. */ - uint8 adjustedEdges = edges; - for (sint32 chosenDirection = 0; chosenDirection < 4; chosenDirection++) + uint8_t adjustedEdges = edges; + for (int32_t chosenDirection = 0; chosenDirection < 4; chosenDirection++) { // If there is no path in that direction try another if (!(adjustedEdges & (1 << chosenDirection))) @@ -1909,7 +1909,7 @@ sint32 guest_path_finding(rct_peep * peep) edges = adjustedEdges; } - sint8 direction = peep->direction ^ (1 << 1); + int8_t direction = peep->direction ^ (1 << 1); // Check if in a dead end (i.e. only edge is where the peep came from) if (!(edges & ~(1 << direction))) { @@ -1972,14 +1972,14 @@ sint32 guest_path_finding(rct_peep * peep) * dead end paths, paths to ride exits, etc. */ if (!peep->HasFood() && (scenario_rand() & 0xFFFF) >= 2184) { - uint8 adjustedEdges = edges; - for (sint32 chosenDirection = 0; chosenDirection < 4; chosenDirection++) + uint8_t adjustedEdges = edges; + for (int32_t chosenDirection = 0; chosenDirection < 4; chosenDirection++) { // If there is no path in that direction try another if (!(adjustedEdges & (1 << chosenDirection))) continue; - uint8 rideIndex, pathSearchResult; + uint8_t rideIndex, pathSearchResult; pathSearchResult = footpath_element_destination_in_direction(loc, tileElement, chosenDirection, &rideIndex); switch (pathSearchResult) @@ -2003,7 +2003,7 @@ sint32 guest_path_finding(rct_peep * peep) // If at least 2 directions consult map if (bitcount(edges) >= 2) { - uint16 probability = 1638; + uint16_t probability = 1638; if (peep->HeadingForRideOrParkExit()) { probability = 9362; @@ -2040,7 +2040,7 @@ sint32 guest_path_finding(rct_peep * peep) } // Peep is heading for a ride. - uint8 rideIndex = peep->guest_heading_to_ride_id; + uint8_t rideIndex = peep->guest_heading_to_ride_id; Ride * ride = get_ride(rideIndex); if (ride->status != RIDE_STATUS_OPEN) @@ -2062,13 +2062,13 @@ sint32 guest_path_finding(rct_peep * peep) /* Find the ride's closest entrance station to the peep. * At the same time, count how many entrance stations there are and * which stations are entrance stations. */ - uint16 closestDist = 0xFFFF; - uint8 closestStationNum = 0; + uint16_t closestDist = 0xFFFF; + uint8_t closestStationNum = 0; - sint32 numEntranceStations = 0; - uint8 entranceStations = 0; + int32_t numEntranceStations = 0; + uint8_t entranceStations = 0; - for (uint8 stationNum = 0; stationNum < MAX_STATIONS; ++stationNum) + for (uint8_t stationNum = 0; stationNum < MAX_STATIONS; ++stationNum) { // Skip if stationNum has no entrance (so presumably an exit only station) if (ride_get_entrance_location(rideIndex, stationNum).isNull()) @@ -2079,9 +2079,9 @@ sint32 guest_path_finding(rct_peep * peep) TileCoordsXYZD entranceLocation = ride_get_entrance_location(rideIndex, stationNum); - sint16 stationX = (sint16)(entranceLocation.x * 32); - sint16 stationY = (sint16)(entranceLocation.y * 32); - uint16 dist = abs(stationX - peep->next_x) + abs(stationY - peep->next_y); + int16_t stationX = (int16_t)(entranceLocation.x * 32); + int16_t stationY = (int16_t)(entranceLocation.y * 32); + uint16_t dist = abs(stationX - peep->next_x) + abs(stationY - peep->next_y); if (dist < closestDist) { @@ -2107,7 +2107,7 @@ sint32 guest_path_finding(rct_peep * peep) * appropriate. */ if (numEntranceStations > 1 && (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { - sint32 select = peep->no_of_rides % numEntranceStations; + int32_t select = peep->no_of_rides % numEntranceStations; while (select > 0) { closestStationNum = bitscanforward(entranceStations); diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 24b9be06fc..4ae3c533cd 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -53,35 +53,35 @@ bool gPathFindDebug = false; utf8 gPathFindDebugPeepName[256]; #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 -uint8 gGuestChangeModifier; -uint16 gNumGuestsInPark; -uint16 gNumGuestsInParkLastWeek; -uint16 gNumGuestsHeadingForPark; +uint8_t gGuestChangeModifier; +uint16_t gNumGuestsInPark; +uint16_t gNumGuestsInParkLastWeek; +uint16_t gNumGuestsHeadingForPark; money16 gGuestInitialCash; -uint8 gGuestInitialHappiness; -uint8 gGuestInitialHunger; -uint8 gGuestInitialThirst; +uint8_t gGuestInitialHappiness; +uint8_t gGuestInitialHunger; +uint8_t gGuestInitialThirst; -uint32 gNextGuestNumber; +uint32_t gNextGuestNumber; -uint8 gPeepWarningThrottle[16]; +uint8_t gPeepWarningThrottle[16]; TileCoordsXYZ gPeepPathFindGoalPosition; bool gPeepPathFindIgnoreForeignQueues; -uint8 gPeepPathFindQueueRideIndex; -// uint32 gPeepPathFindAltStationNum; +uint8_t gPeepPathFindQueueRideIndex; +// uint32_t gPeepPathFindAltStationNum; -static uint8 _unk_F1AEF0; +static uint8_t _unk_F1AEF0; static rct_tile_element * _peepRideEntranceExitElement; static void * _crowdSoundChannel = nullptr; -static void peep_128_tick_update(rct_peep * peep, sint32 index); +static void peep_128_tick_update(rct_peep * peep, int32_t index); static void peep_easter_egg_peep_interactions(rct_peep * peep); static void peep_give_real_name(rct_peep * peep); -static void peep_release_balloon(rct_peep * peep, sint16 spawn_height); +static void peep_release_balloon(rct_peep * peep, int16_t spawn_height); // clang-format off static constexpr const char *gPeepEasterEggNames[] = { @@ -114,8 +114,8 @@ static constexpr const char *gPeepEasterEggNames[] = { /** rct2: 0x00981DB0 */ static struct { - uint8 action; - uint8 flags; + uint8_t action; + uint8_t flags; } PeepThoughtToActionMap[] = { { PEEP_ACTION_SHAKE_HEAD, 1 }, { PEEP_ACTION_EMPTY_POCKETS, 0 }, @@ -293,13 +293,13 @@ static struct { PEEP_ACTION_NONE_2, 1 }, }; -static uint8 PeepSpecialSpriteToSpriteTypeMap[] = { +static uint8_t PeepSpecialSpriteToSpriteTypeMap[] = { PEEP_ACTION_SPRITE_TYPE_NONE, PEEP_ACTION_SPRITE_TYPE_HOLD_MAT, PEEP_ACTION_SPRITE_TYPE_STAFF_MOWER }; -static uint8 PeepActionToSpriteTypeMap[] = { +static uint8_t PeepActionToSpriteTypeMap[] = { PEEP_ACTION_SPRITE_TYPE_CHECK_TIME, PEEP_ACTION_SPRITE_TYPE_EAT_FOOD, PEEP_ACTION_SPRITE_TYPE_SHAKE_HEAD, @@ -364,12 +364,12 @@ void rct_peep::Invalidate() invalidate_sprite_2((rct_sprite*)this); } -void rct_peep::MoveTo(sint16 destX, sint16 destY, sint16 destZ) +void rct_peep::MoveTo(int16_t destX, int16_t destY, int16_t destZ) { sprite_move(destX, destY, destZ, (rct_sprite*)this); } -uint8 rct_peep::GetNextDirection() const +uint8_t rct_peep::GetNextDirection() const { return next_flags & PEEP_NEXT_FLAG_DIRECTION_MASK; } @@ -384,14 +384,14 @@ bool rct_peep::GetNextIsSurface() const return next_flags & PEEP_NEXT_FLAG_IS_SURFACE; } -void rct_peep::SetNextFlags(uint8 next_direction, bool is_sloped, bool is_surface) +void rct_peep::SetNextFlags(uint8_t next_direction, bool is_sloped, bool is_surface) { next_flags = next_direction & PEEP_NEXT_FLAG_DIRECTION_MASK; next_flags |= is_sloped ? PEEP_NEXT_FLAG_IS_SLOPED : 0; next_flags |= is_surface ? PEEP_NEXT_FLAG_IS_SURFACE : 0; } -rct_peep * try_get_guest(uint16 spriteIndex) +rct_peep * try_get_guest(uint16_t spriteIndex) { rct_sprite * sprite = try_get_sprite(spriteIndex); if (sprite == nullptr) @@ -403,11 +403,11 @@ rct_peep * try_get_guest(uint16 spriteIndex) return &sprite->peep; } -sint32 peep_get_staff_count() +int32_t peep_get_staff_count() { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; - sint32 count = 0; + int32_t count = 0; FOR_ALL_STAFF(spriteIndex, peep) count++; @@ -421,8 +421,8 @@ sint32 peep_get_staff_count() */ void peep_update_all() { - sint32 i; - uint16 spriteIndex; + int32_t i; + uint16_t spriteIndex; rct_peep * peep; if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) @@ -435,7 +435,7 @@ void peep_update_all() peep = &(get_sprite(spriteIndex)->peep); spriteIndex = peep->next; - if ((uint32)(i & 0x7F) != (gCurrentTicks & 0x7F)) + if ((uint32_t)(i & 0x7F) != (gCurrentTicks & 0x7F)) { peep->Update(); } @@ -457,7 +457,7 @@ void peep_update_all() * rct2: 0x0068F41A * Called every 128 ticks */ -static void peep_128_tick_update(rct_peep * peep, sint32 index) +static void peep_128_tick_update(rct_peep * peep, int32_t index) { if (peep->type == PEEP_TYPE_STAFF) { @@ -486,13 +486,13 @@ bool rct_peep::CheckForPath() rct_tile_element * tile_element = map_get_first_element_at(next_x / 32, next_y / 32); - uint8 map_type = TILE_ELEMENT_TYPE_PATH; + uint8_t map_type = TILE_ELEMENT_TYPE_PATH; if (GetNextIsSurface()) { map_type = TILE_ELEMENT_TYPE_SURFACE; } - sint32 height = next_z; + int32_t height = next_z; do { @@ -511,7 +511,7 @@ bool rct_peep::CheckForPath() return false; } -uint8 rct_peep::GetActionSpriteType() +uint8_t rct_peep::GetActionSpriteType() { if (action >= PEEP_ACTION_NONE_1) { // PEEP_ACTION_NONE_1 or PEEP_ACTION_NONE_2 @@ -538,7 +538,7 @@ void rct_peep::UpdateCurrentActionSpriteType() { return; } - uint8 newActionSpriteType = GetActionSpriteType(); + uint8_t newActionSpriteType = GetActionSpriteType(); if (action_sprite_type == newActionSpriteType) { return; @@ -556,7 +556,7 @@ void rct_peep::UpdateCurrentActionSpriteType() } /* rct2: 0x00693BE5 */ -void rct_peep::SwitchToSpecialSprite(uint8 special_sprite_id) +void rct_peep::SwitchToSpecialSprite(uint8_t special_sprite_id) { if (special_sprite_id == special_sprite) return; @@ -582,7 +582,7 @@ static constexpr const LocationXY16 word_981D7C[4] = { { -2, 0 }, { 0, 2 }, { 2, bool rct_peep::UpdateAction() { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; return UpdateAction(&actionX, &actionY, &xy_distance); } @@ -594,7 +594,7 @@ bool rct_peep::UpdateAction() * has not yet been reached. xy_distance is how close the * peep is to the target. */ -bool rct_peep::UpdateAction(sint16 * actionX, sint16 * actionY, sint16 * xy_distance) +bool rct_peep::UpdateAction(int16_t * actionX, int16_t * actionY, int16_t * xy_distance) { _unk_F1AEF0 = action_sprite_image_offset; if (action == PEEP_ACTION_NONE_1) @@ -605,8 +605,8 @@ bool rct_peep::UpdateAction(sint16 * actionX, sint16 * actionY, sint16 * xy_dist *actionX = x - destination_x; *actionY = y - destination_y; - sint32 x_delta = abs(*actionX); - sint32 y_delta = abs(*actionY); + int32_t x_delta = abs(*actionX); + int32_t y_delta = abs(*actionY); *xy_distance = x_delta + y_delta; @@ -616,7 +616,7 @@ bool rct_peep::UpdateAction(sint16 * actionX, sint16 * actionY, sint16 * xy_dist { return false; } - sint32 nextDirection = 0; + int32_t nextDirection = 0; if (x_delta < y_delta) { nextDirection = 8; @@ -638,7 +638,7 @@ bool rct_peep::UpdateAction(sint16 * actionX, sint16 * actionY, sint16 * xy_dist *actionY = y + word_981D7C[nextDirection / 8].y; no_action_frame_num++; const rct_peep_animation * peepAnimation = g_peep_animation_entries[sprite_type].sprite_animation; - const uint8 * imageOffset = peepAnimation[action_sprite_type].frame_offsets; + const uint8_t * imageOffset = peepAnimation[action_sprite_type].frame_offsets; if (no_action_frame_num >= peepAnimation[action_sprite_type].num_frames) { no_action_frame_num = 0; @@ -687,7 +687,7 @@ bool rct_peep::UpdateAction(sint16 * actionX, sint16 * actionY, sint16 * xy_dist litter_create(x, y, z, sprite_direction, (sprite_index & 1) ? LITTER_TYPE_SICK_ALT : LITTER_TYPE_SICK); - sint32 sound_id = SOUND_COUGH_1 + (scenario_rand() & 3); + int32_t sound_id = SOUND_COUGH_1 + (scenario_rand() & 3); audio_play_sound_at_location(sound_id, x, y, z); Invalidate(); @@ -751,7 +751,7 @@ void rct_peep::Pickup() sub_state = 0; } -void rct_peep::PickupAbort(sint32 old_x) +void rct_peep::PickupAbort(int32_t old_x) { if (state != PEEP_STATE_PICKED) return; @@ -759,7 +759,7 @@ void rct_peep::PickupAbort(sint32 old_x) sprite_move(old_x, y, z + 8, (rct_sprite *)this); Invalidate(); - if (x != (sint16)LOCATION_NULL) + if (x != (int16_t)LOCATION_NULL) { SetState(PEEP_STATE_FALLING); action = 0xFF; @@ -836,7 +836,7 @@ bool rct_peep::Place(TileCoordsXYZ location, bool apply) return true; } -bool peep_pickup_command(uint32 peepnum, sint32 x, sint32 y, sint32 z, sint32 action, bool apply) +bool peep_pickup_command(uint32_t peepnum, int32_t x, int32_t y, int32_t z, int32_t action, bool apply) { if (peepnum >= MAX_SPRITES) { @@ -912,13 +912,13 @@ bool peep_pickup_command(uint32 peepnum, sint32 x, sint32 y, sint32 z, sint32 ac } void game_command_pickup_guest( - sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, [[maybe_unused]] sint32* esi, sint32* edi, sint32* ebp) + int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, [[maybe_unused]] int32_t* esi, int32_t* edi, int32_t* ebp) { - sint32 peepnum = *eax; - sint32 x = *edi; - sint32 y = *ebp; - sint32 z = *edx; - sint32 action = *ecx; + int32_t peepnum = *eax; + int32_t x = *edi; + int32_t y = *ebp; + int32_t z = *edx; + int32_t action = *ecx; if (peep_pickup_command(peepnum, x, y, z, action, *ebx & GAME_COMMAND_FLAG_APPLY)) { *ebx = 0; @@ -992,7 +992,7 @@ void rct_peep::UpdateFalling() if (action == PEEP_ACTION_DROWNING) { // Check to see if we are ready to drown. - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); if (action == PEEP_ACTION_DROWNING) @@ -1001,7 +1001,7 @@ void rct_peep::UpdateFalling() if (gConfigNotifications.guest_died) { set_format_arg(0, rct_string_id, name_string_idx); - set_format_arg(2, uint32, id); + set_format_arg(2, uint32_t, id); news_item_add_to_queue(NEWS_ITEM_BLANK, STR_NEWS_ITEM_GUEST_DROWNED, actionX | (actionY << 16)); } @@ -1013,7 +1013,7 @@ void rct_peep::UpdateFalling() // If not drowning then falling. Note: peeps 'fall' after leaving a ride/enter the park. rct_tile_element * tile_element = map_get_first_element_at(x / 32, y / 32); rct_tile_element * saved_map = nullptr; - sint32 saved_height = 0; + int32_t saved_height = 0; if (tile_element != nullptr) { @@ -1022,7 +1022,7 @@ void rct_peep::UpdateFalling() // If a path check if we are on it if (tile_element->GetType() == TILE_ELEMENT_TYPE_PATH) { - sint32 height = map_height_from_slope(x, y, tile_element->properties.surface.slope) + + int32_t height = map_height_from_slope(x, y, tile_element->properties.surface.slope) + tile_element->base_height * 8; if (height < z - 1 || height > z + 4) @@ -1037,7 +1037,7 @@ void rct_peep::UpdateFalling() // If the surface is water check to see if we could be drowning if (surface_get_water_height(tile_element) > 0) { - sint32 height = surface_get_water_height(tile_element) * 16; + int32_t height = surface_get_water_height(tile_element) * 16; if (height - 4 >= z && height < z + 20) { @@ -1059,7 +1059,7 @@ void rct_peep::UpdateFalling() return; } } - sint32 map_height = tile_element_height(0xFFFF & x, 0xFFFF & y) & 0xFFFF; + int32_t map_height = tile_element_height(0xFFFF & x, 0xFFFF & y) & 0xFFFF; if (map_height < z || map_height - 4 > z) continue; saved_height = map_height; @@ -1128,7 +1128,7 @@ void rct_peep::Update1() direction = sprite_direction >> 3; } -void rct_peep::SetState(uint8 new_state) +void rct_peep::SetState(uint8_t new_state) { peep_decrement_num_riders(this); state = new_state; @@ -1157,9 +1157,9 @@ static void peep_update_thoughts(rct_peep * peep) // 220 ticks in age between them. In order to // allow this when a thought is new it enters // a holding zone. Before it becomes fresh. - sint32 add_fresh = 1; - sint32 fresh_thought = -1; - for (sint32 i = 0; i < PEEP_MAX_THOUGHTS; i++) + int32_t add_fresh = 1; + int32_t fresh_thought = -1; + for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; i++) { if (peep->thoughts[i].type == PEEP_THOUGHT_TYPE_NONE) break; @@ -1227,7 +1227,7 @@ void rct_peep::Update() } // Walking speed logic - uint32 stepsToTake = energy; + uint32_t stepsToTake = energy; if (stepsToTake < 95 && state == PEEP_STATE_QUEUING) stepsToTake = 95; if ((peep_flags & PEEP_FLAGS_SLOW_WALK) && state != PEEP_STATE_QUEUING) @@ -1239,7 +1239,7 @@ void rct_peep::Update() stepsToTake += stepsToTake / 2; } - uint32 carryCheck = step_progress + stepsToTake; + uint32_t carryCheck = step_progress + stepsToTake; step_progress = carryCheck; if (carryCheck <= 255) { @@ -1338,11 +1338,11 @@ void peep_problem_warnings_update() { rct_peep * peep; Ride * ride; - uint16 spriteIndex; - uint16 guests_in_park = gNumGuestsInPark; - sint32 hunger_counter = 0, lost_counter = 0, noexit_counter = 0, thirst_counter = 0, litter_counter = 0, + uint16_t spriteIndex; + uint16_t guests_in_park = gNumGuestsInPark; + int32_t hunger_counter = 0, lost_counter = 0, noexit_counter = 0, thirst_counter = 0, litter_counter = 0, disgust_counter = 0, bathroom_counter = 0, vandalism_counter = 0; - uint8 * warning_throttle = gPeepWarningThrottle; + uint8_t * warning_throttle = gPeepWarningThrottle; gRideCount = ride_get_count(); // refactor this to somewhere else @@ -1509,9 +1509,9 @@ void peep_stop_crowd_noise() void peep_update_crowd_noise() { rct_viewport * viewport; - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; - sint32 visiblePeeps; + int32_t visiblePeeps; if (gGameSoundsOff) return; @@ -1562,7 +1562,7 @@ void peep_update_crowd_noise() } else { - sint32 volume; + int32_t volume; // Formula to scale peeps to dB where peeps [0, 120] scales approximately logarithmically to [-3314, -150] dB/100 // 207360000 maybe related to DSBVOLUME_MIN which is -10,000 (dB/100) @@ -1592,7 +1592,7 @@ void peep_update_crowd_noise() */ void peep_applause() { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; FOR_ALL_GUESTS(spriteIndex, peep) @@ -1624,7 +1624,7 @@ void peep_applause() */ void peep_update_days_in_queue() { - uint16 sprite_index; + uint16_t sprite_index; rct_peep * peep; FOR_ALL_GUESTS(sprite_index, peep) @@ -1649,7 +1649,7 @@ static constexpr const enum PEEP_NAUSEA_TOLERANCE nausea_tolerance_distribution[ }; /** rct2: 0x009823BC */ -static constexpr const uint8 trouser_colours[] = { +static constexpr const uint8_t trouser_colours[] = { COLOUR_BLACK, COLOUR_GREY, COLOUR_LIGHT_BROWN, @@ -1678,7 +1678,7 @@ static constexpr const uint8 trouser_colours[] = { }; /** rct2: 0x009823D5 */ -static constexpr const uint8 tshirt_colours[] = { +static constexpr const uint8_t tshirt_colours[] = { COLOUR_BLACK, COLOUR_GREY, COLOUR_LIGHT_BROWN, @@ -1719,7 +1719,7 @@ static constexpr const uint8 tshirt_colours[] = { * * rct2: 0x0069A05D */ -rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) +rct_peep * peep_generate(int32_t x, int32_t y, int32_t z) { if (gSpriteListCount[SPRITE_LIST_NULL] < 400) return nullptr; @@ -1759,8 +1759,8 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) peep->thoughts->type = PEEP_THOUGHT_TYPE_NONE; peep->window_invalidate_flags = 0; - uint8 intensityHighest = (scenario_rand() & 0x7) + 3; - uint8 intensityLowest = std::min(intensityHighest, static_cast(7)) - 3; + uint8_t intensityHighest = (scenario_rand() & 0x7) + 3; + uint8_t intensityLowest = std::min(intensityHighest, static_cast(7)) - 3; if (intensityHighest >= 7) intensityHighest = 15; @@ -1788,7 +1788,7 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) peep->intensity = (intensityHighest << 4) | intensityLowest; - uint8 nausea_tolerance = scenario_rand() & 0x7; + uint8_t nausea_tolerance = scenario_rand() & 0x7; if (gParkFlags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) { nausea_tolerance += 4; @@ -1805,7 +1805,7 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) if (gGuestInitialHappiness == 0) peep->happiness = 128; /* Initial value will vary by -15..16 */ - sint8 happiness_delta = (scenario_rand() & 0x1F) - 15; + int8_t happiness_delta = (scenario_rand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ peep->happiness = Math::Clamp(0, peep->happiness + happiness_delta, PEEP_MAX_HAPPINESS); peep->happiness_target = peep->happiness; @@ -1817,7 +1817,7 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) * to any value 0..255. */ peep->hunger = gGuestInitialHunger; /* Initial value will vary by -15..16 */ - sint8 hunger_delta = (scenario_rand() & 0x1F) - 15; + int8_t hunger_delta = (scenario_rand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ peep->hunger = Math::Clamp(0, peep->hunger + hunger_delta, 255); @@ -1826,7 +1826,7 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) * to any value 0..255. */ peep->thirst = gGuestInitialThirst; /* Initial value will vary by -15..16 */ - sint8 thirst_delta = (scenario_rand() & 0x1F) - 15; + int8_t thirst_delta = (scenario_rand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ peep->thirst = Math::Clamp(0, peep->thirst + thirst_delta, 0xFF); @@ -1853,7 +1853,7 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) cash = 0; } - if (gGuestInitialCash == (money16)(uint16)0xFFFF) + if (gGuestInitialCash == (money16)(uint16_t)0xFFFF) { cash = 0; } @@ -1883,15 +1883,15 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) peep->angriness = 0; peep->time_lost = 0; - uint8 tshirt_colour = static_cast(scenario_rand() % Util::CountOf(tshirt_colours)); + uint8_t tshirt_colour = static_cast(scenario_rand() % Util::CountOf(tshirt_colours)); peep->tshirt_colour = tshirt_colours[tshirt_colour]; - uint8 trousers_colour = static_cast(scenario_rand() % Util::CountOf(trouser_colours)); + uint8_t trousers_colour = static_cast(scenario_rand() % Util::CountOf(trouser_colours)); peep->trousers_colour = trouser_colours[trousers_colour]; /* Minimum energy is capped at 32 and maximum at 128, so this initialises * a peep with approx 34%-100% energy. (65 - 32) / (128 - 32) ≈ 34% */ - uint8 energy = (scenario_rand() % 64) + 65; + uint8_t energy = (scenario_rand() % 64) + 65; peep->energy = energy; peep->energy_target = energy; @@ -1913,7 +1913,7 @@ rct_peep * peep_generate(sint32 x, sint32 y, sint32 z) * argument_1 (ecx & ebx) * argument_2 (edx) */ -void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * argument_2) +void get_arguments_from_action(rct_peep * peep, uint32_t * argument_1, uint32_t * argument_2) { Ride * ride; @@ -1934,12 +1934,12 @@ void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * ar ride = get_ride(peep->current_ride); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE)) *argument_1 = STR_IN_RIDE; - *argument_1 |= ((uint32)ride->name << 16); + *argument_1 |= ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; break; case PEEP_STATE_BUYING: ride = get_ride(peep->current_ride); - *argument_1 = STR_AT_RIDE | ((uint32)ride->name << 16); + *argument_1 = STR_AT_RIDE | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; break; case PEEP_STATE_WALKING: @@ -1947,7 +1947,7 @@ void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * ar if (peep->guest_heading_to_ride_id != 0xFF) { ride = get_ride(peep->guest_heading_to_ride_id); - *argument_1 = STR_HEADING_FOR | ((uint32)ride->name << 16); + *argument_1 = STR_HEADING_FOR | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; } else @@ -1959,7 +1959,7 @@ void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * ar case PEEP_STATE_QUEUING_FRONT: case PEEP_STATE_QUEUING: ride = get_ride(peep->current_ride); - *argument_1 = STR_QUEUING_FOR | ((uint32)ride->name << 16); + *argument_1 = STR_QUEUING_FOR | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; break; case PEEP_STATE_SITTING: @@ -1970,12 +1970,12 @@ void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * ar if (peep->current_ride != 0xFF) { ride = get_ride(peep->current_ride); - *argument_1 = STR_WATCHING_RIDE | ((uint32)ride->name << 16); + *argument_1 = STR_WATCHING_RIDE | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; if (peep->current_seat & 0x1) - *argument_1 = STR_WATCHING_CONSTRUCTION_OF | ((uint32)ride->name << 16); + *argument_1 = STR_WATCHING_CONSTRUCTION_OF | ((uint32_t)ride->name << 16); else - *argument_1 = STR_WATCHING_RIDE | ((uint32)ride->name << 16); + *argument_1 = STR_WATCHING_RIDE | ((uint32_t)ride->name << 16); } else { @@ -2023,23 +2023,23 @@ void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * ar else { ride = get_ride(peep->current_ride); - *argument_1 = STR_RESPONDING_TO_RIDE_BREAKDOWN_CALL | ((uint32)ride->name << 16); + *argument_1 = STR_RESPONDING_TO_RIDE_BREAKDOWN_CALL | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; } break; case PEEP_STATE_FIXING: ride = get_ride(peep->current_ride); - *argument_1 = STR_FIXING_RIDE | ((uint32)ride->name << 16); + *argument_1 = STR_FIXING_RIDE | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; break; case PEEP_STATE_HEADING_TO_INSPECTION: ride = get_ride(peep->current_ride); - *argument_1 = STR_HEADING_TO_RIDE_FOR_INSPECTION | ((uint32)ride->name << 16); + *argument_1 = STR_HEADING_TO_RIDE_FOR_INSPECTION | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; break; case PEEP_STATE_INSPECTING: ride = get_ride(peep->current_ride); - *argument_1 = STR_INSPECTING_RIDE | ((uint32)ride->name << 16); + *argument_1 = STR_INSPECTING_RIDE | ((uint32_t)ride->name << 16); *argument_2 = ride->name_arguments; break; } @@ -2056,12 +2056,12 @@ void peep_thought_set_format_args(rct_peep_thought * thought) { set_format_arg(0, rct_string_id, PeepThoughts[thought->type]); - uint8 flags = PeepThoughtToActionMap[thought->type].flags; + uint8_t flags = PeepThoughtToActionMap[thought->type].flags; if (flags & 1) { Ride * ride = get_ride(thought->item); set_format_arg(2, rct_string_id, ride->name); - set_format_arg(4, uint32, ride->name_arguments); + set_format_arg(4, uint32_t, ride->name_arguments); } else if (flags & 2) { @@ -2131,7 +2131,7 @@ enum PEEP_FACE_OFFSET_VERY_VERY_HAPPY, }; -static constexpr const sint32 face_sprite_small[] = { +static constexpr const int32_t face_sprite_small[] = { SPR_PEEP_SMALL_FACE_ANGRY, SPR_PEEP_SMALL_FACE_VERY_VERY_SICK, SPR_PEEP_SMALL_FACE_VERY_SICK, @@ -2147,7 +2147,7 @@ static constexpr const sint32 face_sprite_small[] = { SPR_PEEP_SMALL_FACE_VERY_VERY_HAPPY, }; -static constexpr const sint32 face_sprite_large[] = { +static constexpr const int32_t face_sprite_large[] = { SPR_PEEP_LARGE_FACE_ANGRY_0, SPR_PEEP_LARGE_FACE_VERY_VERY_SICK_0, SPR_PEEP_LARGE_FACE_VERY_SICK_0, @@ -2163,7 +2163,7 @@ static constexpr const sint32 face_sprite_large[] = { SPR_PEEP_LARGE_FACE_VERY_VERY_HAPPY, }; -static sint32 get_face_sprite_offset(rct_peep * peep) +static int32_t get_face_sprite_offset(rct_peep * peep) { // ANGRY @@ -2190,9 +2190,9 @@ static sint32 get_face_sprite_offset(rct_peep * peep) if (peep->energy < 70) return PEEP_FACE_OFFSET_TIRED; - sint32 offset = PEEP_FACE_OFFSET_VERY_VERY_UNHAPPY; + int32_t offset = PEEP_FACE_OFFSET_VERY_VERY_UNHAPPY; // There are 7 different happiness based faces - for (sint32 i = 37; peep->happiness >= i; i += 37) + for (int32_t i = 37; peep->happiness >= i; i += 37) { offset++; } @@ -2204,7 +2204,7 @@ static sint32 get_face_sprite_offset(rct_peep * peep) * Function split into large and small sprite * rct2: 0x00698721 */ -sint32 get_peep_face_sprite_small(rct_peep * peep) +int32_t get_peep_face_sprite_small(rct_peep * peep) { return face_sprite_small[get_face_sprite_offset(peep)]; } @@ -2213,7 +2213,7 @@ sint32 get_peep_face_sprite_small(rct_peep * peep) * Function split into large and small sprite * rct2: 0x00698721 */ -sint32 get_peep_face_sprite_large(rct_peep * peep) +int32_t get_peep_face_sprite_large(rct_peep * peep) { return face_sprite_large[get_face_sprite_offset(peep)]; } @@ -2223,7 +2223,7 @@ sint32 get_peep_face_sprite_large(rct_peep * peep) * rct2: 0x0069A5A0 * tests if a peep's name matches a cheat code, normally returns using a register flag */ -sint32 peep_check_easteregg_name(sint32 index, rct_peep * peep) +int32_t peep_check_easteregg_name(int32_t index, rct_peep * peep) { char buffer[256]; @@ -2231,15 +2231,15 @@ sint32 peep_check_easteregg_name(sint32 index, rct_peep * peep) return _stricmp(buffer, gPeepEasterEggNames[index]) == 0; } -sint32 peep_get_easteregg_name_id(rct_peep * peep) +int32_t peep_get_easteregg_name_id(rct_peep * peep) { char buffer[256]; format_string(buffer, 256, peep->name_string_idx, &peep->id); - for (uint32 i = 0; i < Util::CountOf(gPeepEasterEggNames); i++) + for (uint32_t i = 0; i < Util::CountOf(gPeepEasterEggNames); i++) if (_stricmp(buffer, gPeepEasterEggNames[i]) == 0) - return static_cast(i); + return static_cast(i); return -1; } @@ -2251,9 +2251,9 @@ sint32 peep_get_easteregg_name_id(rct_peep * peep) * ah:thought_arguments * esi: peep */ -void peep_insert_new_thought(rct_peep * peep, uint8 thought_type, uint8 thought_arguments) +void peep_insert_new_thought(rct_peep * peep, uint8_t thought_type, uint8_t thought_arguments) { - uint8 action = PeepThoughtToActionMap[thought_type].action; + uint8_t action = PeepThoughtToActionMap[thought_type].action; if (action != 0xFF && peep->action >= 254) { peep->action = action; @@ -2263,7 +2263,7 @@ void peep_insert_new_thought(rct_peep * peep, uint8 thought_type, uint8 thought_ peep->Invalidate(); } - for (sint32 i = 0; i < PEEP_MAX_THOUGHTS; ++i) + for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; ++i) { rct_peep_thought * thought = &peep->thoughts[i]; // Remove the oldest thought by setting it to NONE. @@ -2299,25 +2299,25 @@ void peep_set_map_tooltip(rct_peep * peep) { set_map_tooltip_format_arg(0, rct_string_id, (peep->peep_flags & PEEP_FLAGS_TRACKING) ? STR_TRACKED_GUEST_MAP_TIP : STR_GUEST_MAP_TIP); - set_map_tooltip_format_arg(2, uint32, get_peep_face_sprite_small(peep)); + set_map_tooltip_format_arg(2, uint32_t, get_peep_face_sprite_small(peep)); set_map_tooltip_format_arg(6, rct_string_id, peep->name_string_idx); - set_map_tooltip_format_arg(8, uint32, peep->id); + set_map_tooltip_format_arg(8, uint32_t, peep->id); - uint32 arg0 = 0, arg1 = 0; + uint32_t arg0 = 0, arg1 = 0; get_arguments_from_action(peep, &arg0, &arg1); - set_map_tooltip_format_arg(12, uint32, arg0); - set_map_tooltip_format_arg(16, uint32, arg1); + set_map_tooltip_format_arg(12, uint32_t, arg0); + set_map_tooltip_format_arg(16, uint32_t, arg1); } else { set_map_tooltip_format_arg(0, rct_string_id, STR_STAFF_MAP_TIP); set_map_tooltip_format_arg(2, rct_string_id, peep->name_string_idx); - set_map_tooltip_format_arg(4, uint32, peep->id); + set_map_tooltip_format_arg(4, uint32_t, peep->id); - uint32 arg0 = 0, arg1 = 0; + uint32_t arg0 = 0, arg1 = 0; get_arguments_from_action(peep, &arg0, &arg1); - set_map_tooltip_format_arg(8, uint32, arg0); - set_map_tooltip_format_arg(12, uint32, arg1); + set_map_tooltip_format_arg(8, uint32_t, arg0); + set_map_tooltip_format_arg(12, uint32_t, arg1); } } @@ -2343,7 +2343,7 @@ void rct_peep::SwitchNextActionSpriteType() * * rct2: 0x00693CBB */ -static bool peep_update_queue_position(rct_peep * peep, uint8 previous_action) +static bool peep_update_queue_position(rct_peep * peep, uint8_t previous_action) { peep->time_in_queue++; if (peep->next_in_queue == SPRITE_INDEX_NULL) @@ -2351,16 +2351,16 @@ static bool peep_update_queue_position(rct_peep * peep, uint8 previous_action) rct_peep * peep_next = GET_PEEP(peep->next_in_queue); - sint16 x_diff = abs(peep_next->x - peep->x); - sint16 y_diff = abs(peep_next->y - peep->y); - sint16 z_diff = abs(peep_next->z - peep->z); + int16_t x_diff = abs(peep_next->x - peep->x); + int16_t y_diff = abs(peep_next->y - peep->y); + int16_t z_diff = abs(peep_next->z - peep->z); if (z_diff > 10) return false; if (x_diff < y_diff) { - sint16 temp_x = x_diff; + int16_t temp_x = x_diff; x_diff = y_diff; y_diff = temp_x; } @@ -2398,7 +2398,7 @@ static bool peep_update_queue_position(rct_peep * peep, uint8 previous_action) } } - sint16 xy_dist, x, y; + int16_t xy_dist, x, y; if (peep->action < PEEP_ACTION_NONE_1) peep->UpdateAction(&x, &y, &xy_dist); @@ -2428,10 +2428,10 @@ static void peep_return_to_centre_of_tile(rct_peep * peep) * * rct2: 0x00693f2C */ -static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct_tile_element * tile_element, uint8 & pathing_result) +static void peep_interact_with_entrance(rct_peep * peep, int16_t x, int16_t y, rct_tile_element * tile_element, uint8_t & pathing_result) { - uint8 entranceType = tile_element->properties.entrance.type; - uint8 rideIndex = tile_element->properties.entrance.ride_index; + uint8_t entranceType = tile_element->properties.entrance.type; + uint8_t rideIndex = tile_element->properties.entrance.ride_index; // Store some details to determine when to override the default // behaviour (defined below) for when staff attempt to enter a ride @@ -2487,7 +2487,7 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct } peep->time_lost = 0; - uint8 stationNum = (tile_element->properties.entrance.index >> 4) & 0x7; + uint8_t stationNum = (tile_element->properties.entrance.index >> 4) & 0x7; // Guest walks up to the ride for the first time since entering // the path tile or since considering another ride attached to // the path tile. @@ -2505,7 +2505,7 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct peep->interaction_ride_index = rideIndex; Ride * ride = get_ride(rideIndex); - uint16 previous_last = ride->last_peep_in_queue[stationNum]; + uint16_t previous_last = ride->last_peep_in_queue[stationNum]; ride->last_peep_in_queue[stationNum] = peep->sprite_index; peep->next_in_queue = previous_last; ride->queue_length[stationNum]++; @@ -2519,9 +2519,9 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct if (peep->peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); if (gConfigNotifications.guest_queuing_for_ride) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); @@ -2545,7 +2545,7 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct return; } - uint8 entranceDirection = tile_element_get_direction(tile_element); + uint8_t entranceDirection = tile_element_get_direction(tile_element); if (entranceDirection != peep->direction) { if ((entranceDirection ^ (1 << 1)) != peep->direction) @@ -2584,7 +2584,7 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct if (peep->peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); if (gConfigNotifications.guest_left_park) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_PARK, peep->sprite_index); @@ -2611,18 +2611,18 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct return; } - uint8 entranceIndex = 0; + uint8_t entranceIndex = 0; for (entranceIndex = 0; entranceIndex < MAX_PARK_ENTRANCES; entranceIndex++) { if (gParkEntrances[entranceIndex].x == (x & 0xFFE0) && gParkEntrances[entranceIndex].y == (y & 0xFFE0)) break; } - sint16 z = gParkEntrances[entranceIndex].z / 8; + int16_t z = gParkEntrances[entranceIndex].z / 8; entranceDirection = gParkEntrances[entranceIndex].direction; - sint16 next_x = (x & 0xFFE0) + CoordsDirectionDelta[entranceDirection].x; - sint16 next_y = (y & 0xFFE0) + CoordsDirectionDelta[entranceDirection].y; + int16_t next_x = (x & 0xFFE0) + CoordsDirectionDelta[entranceDirection].x; + int16_t next_y = (y & 0xFFE0) + CoordsDirectionDelta[entranceDirection].y; // Make sure there is a path right behind the entrance, otherwise turn around bool found = false; @@ -2637,7 +2637,7 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct if (footpath_element_is_sloped(nextTileElement)) { - uint8 slopeDirection = footpath_element_get_slope_direction(nextTileElement); + uint8_t slopeDirection = footpath_element_get_slope_direction(nextTileElement); if (slopeDirection == entranceDirection) { if (z != nextTileElement->base_height) @@ -2729,14 +2729,14 @@ static void peep_interact_with_entrance(rct_peep * peep, sint16 x, sint16 y, rct * * rct2: 0x006946D8 */ -static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_tile_element * tile_element, bool vandalism) +static void peep_footpath_move_forward(rct_peep * peep, int16_t x, int16_t y, rct_tile_element * tile_element, bool vandalism) { peep->next_x = (x & 0xFFE0); peep->next_y = (y & 0xFFE0); peep->next_z = tile_element->base_height; peep->SetNextFlags(tile_element->properties.path.type & 3, tile_element->properties.path.type & 4, false); - sint16 z = peep->GetZOnSlope(x, y); + int16_t z = peep->GetZOnSlope(x, y); if (peep->type == PEEP_TYPE_STAFF) { @@ -2746,9 +2746,9 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ return; } - uint8 vandalThoughtTimeout = (peep->vandalism_seen & 0xC0) >> 6; + uint8_t vandalThoughtTimeout = (peep->vandalism_seen & 0xC0) >> 6; // Advance the vandalised tiles by 1 - uint8 vandalisedTiles = (peep->vandalism_seen * 2) & 0x3F; + uint8_t vandalisedTiles = (peep->vandalism_seen * 2) & 0x3F; if (vandalism == true) { @@ -2773,10 +2773,10 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ } peep->vandalism_seen = (vandalThoughtTimeout << 6) | vandalisedTiles; - uint16 crowded = 0; - uint8 litter_count = 0; - uint8 sick_count = 0; - uint16 sprite_id = sprite_get_first_in_quadrant(x, y); + uint16_t crowded = 0; + uint8_t litter_count = 0; + uint8_t sick_count = 0; + uint16_t sprite_id = sprite_get_first_in_quadrant(x, y); for (rct_sprite * sprite; sprite_id != SPRITE_INDEX_NULL; sprite_id = sprite->unknown.next_in_quadrant) { sprite = get_sprite(sprite_id); @@ -2813,11 +2813,11 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ peep->happiness_target = std::max(0, peep->happiness_target - 14); } - litter_count = std::min(static_cast(3), litter_count); - sick_count = std::min(static_cast(3), sick_count); + litter_count = std::min(static_cast(3), litter_count); + sick_count = std::min(static_cast(3), sick_count); - uint8 disgusting_time = peep->disgusting_count & 0xC0; - uint8 disgusting_count = ((peep->disgusting_count & 0xF) << 2) | sick_count; + uint8_t disgusting_time = peep->disgusting_count & 0xC0; + uint8_t disgusting_count = ((peep->disgusting_count & 0xF) << 2) | sick_count; peep->disgusting_count = disgusting_count | disgusting_time; if (disgusting_time & 0xC0 && (scenario_rand() & 0xFFFF) <= 4369) @@ -2827,8 +2827,8 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ } else { - uint8 total_sick = 0; - for (uint8 time = 0; time < 3; time++) + uint8_t total_sick = 0; + for (uint8_t time = 0; time < 3; time++) { total_sick += (disgusting_count >> (2 * time)) & 0x3; } @@ -2842,7 +2842,7 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ } } - uint8 litter_time = peep->litter_count & 0xC0; + uint8_t litter_time = peep->litter_count & 0xC0; litter_count = ((peep->litter_count & 0xF) << 2) | litter_count; peep->litter_count = litter_count | litter_time; @@ -2853,8 +2853,8 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ } else { - uint8 total_litter = 0; - for (uint8 time = 0; time < 3; time++) + uint8_t total_litter = 0; + for (uint8_t time = 0; time < 3; time++) { total_litter += (litter_count >> (2 * time)) & 0x3; } @@ -2877,7 +2877,7 @@ static void peep_footpath_move_forward(rct_peep * peep, sint16 x, sint16 y, rct_ * * rct2: 0x0069455E */ -static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_tile_element * tile_element) +static void peep_interact_with_path(rct_peep * peep, int16_t x, int16_t y, rct_tile_element * tile_element) { // 0x00F1AEE2 bool vandalism_present = false; @@ -2887,7 +2887,7 @@ static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_til vandalism_present = true; } - sint16 z = tile_element->base_height * 8; + int16_t z = tile_element->base_height * 8; if (!map_is_location_owned(x, y, z)) { if (peep->outside_of_park == 0) @@ -2908,7 +2908,7 @@ static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_til if (peep->type == PEEP_TYPE_GUEST && footpath_element_is_queue(tile_element)) { - uint8 rideIndex = tile_element->properties.path.ride_index; + uint8_t rideIndex = tile_element->properties.path.ride_index; if (peep->state == PEEP_STATE_QUEUING) { @@ -2930,7 +2930,7 @@ static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_til // Peep is not queuing. peep->time_lost = 0; - uint8 stationNum = (tile_element->properties.path.additions & 0x70) >> 4; + uint8_t stationNum = (tile_element->properties.path.additions & 0x70) >> 4; if ((tile_element->properties.path.type & (1 << 3)) // Queue has the ride sign on it && (footpath_element_get_direction(tile_element) == @@ -2959,7 +2959,7 @@ static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_til Ride * ride = get_ride(rideIndex); // Add the peep to the ride queue. - uint16 old_last_peep = ride->last_peep_in_queue[stationNum]; + uint16_t old_last_peep = ride->last_peep_in_queue[stationNum]; ride->last_peep_in_queue[stationNum] = peep->sprite_index; peep->next_in_queue = old_last_peep; ride->queue_length[stationNum]++; @@ -2977,9 +2977,9 @@ static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_til if (peep->peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); if (gConfigNotifications.guest_queuing_for_ride) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); @@ -3004,9 +3004,9 @@ static void peep_interact_with_path(rct_peep * peep, sint16 x, sint16 y, rct_til * * rct2: 0x00693F70 */ -static bool peep_interact_with_shop(rct_peep * peep, sint16 x, sint16 y, rct_tile_element * tile_element) +static bool peep_interact_with_shop(rct_peep * peep, int16_t x, int16_t y, rct_tile_element * tile_element) { - uint8 rideIndex = track_element_get_ride_index(tile_element); + uint8_t rideIndex = track_element_get_ride_index(tile_element); Ride * ride = get_ride(rideIndex); if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) @@ -3071,9 +3071,9 @@ static bool peep_interact_with_shop(rct_peep * peep, sint16 x, sint16 y, rct_til if (peep->peep_flags & PEEP_FLAGS_TRACKING) { set_format_arg(0, rct_string_id, peep->name_string_idx); - set_format_arg(2, uint32, peep->id); + set_format_arg(2, uint32_t, peep->id); set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); rct_string_id string_id = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? STR_PEEP_TRACKING_PEEP_IS_IN_X : STR_PEEP_TRACKING_PEEP_IS_ON_X; if (gConfigNotifications.guest_used_facility) @@ -3095,11 +3095,11 @@ static bool peep_interact_with_shop(rct_peep * peep, sint16 x, sint16 y, rct_til return true; } -bool is_valid_path_z_and_direction(rct_tile_element * tileElement, sint32 currentZ, sint32 currentDirection) +bool is_valid_path_z_and_direction(rct_tile_element * tileElement, int32_t currentZ, int32_t currentDirection) { if (footpath_element_is_sloped(tileElement)) { - sint32 slopeDirection = footpath_element_get_slope_direction(tileElement); + int32_t slopeDirection = footpath_element_get_slope_direction(tileElement); if (slopeDirection == currentDirection) { if (currentZ != tileElement->base_height) @@ -3122,7 +3122,7 @@ bool is_valid_path_z_and_direction(rct_tile_element * tileElement, sint32 curren return true; } -void rct_peep::PerformNextAction(uint8 & pathing_result) +void rct_peep::PerformNextAction(uint8_t & pathing_result) { rct_tile_element * tmpTile; PerformNextAction(pathing_result, tmpTile); @@ -3132,10 +3132,10 @@ void rct_peep::PerformNextAction(uint8 & pathing_result) * * rct2: 0x00693C9E */ -void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & tile_result) +void rct_peep::PerformNextAction(uint8_t & pathing_result, rct_tile_element * & tile_result) { pathing_result = 0; - uint8 previousAction = action; + uint8_t previousAction = action; if (action == PEEP_ACTION_NONE_1) action = PEEP_ACTION_NONE_2; @@ -3146,11 +3146,11 @@ void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & ti return; } - sint16 actionX, actionY, xy_dist; + int16_t actionX, actionY, xy_dist; if (!UpdateAction(&actionX, &actionY, &xy_dist)) { pathing_result |= PATHING_DESTINATION_REACHED; - uint8 result = 0; + uint8_t result = 0; if (type == PEEP_TYPE_GUEST) { result = guest_path_finding(this); @@ -3169,7 +3169,7 @@ void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & ti if ((actionX & 0xFFE0) == next_x && (actionY & 0xFFE0) == next_y) { - sint16 height = GetZOnSlope(actionX, actionY); + int16_t height = GetZOnSlope(actionX, actionY); Invalidate(); MoveTo(actionX, actionY, height); Invalidate(); @@ -3187,8 +3187,8 @@ void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & ti } rct_tile_element * tileElement = map_get_first_element_at(actionX / 32, actionY / 32); - sint16 base_z = std::max(0, (z / 8) - 2); - sint16 top_z = (z / 8) + 1; + int16_t base_z = std::max(0, (z / 8) - 2); + int16_t top_z = (z / 8) + 1; do { @@ -3223,7 +3223,7 @@ void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & ti if (type == PEEP_TYPE_STAFF || (GetNextIsSurface())) { - sint16 height = abs(tile_element_height(actionX, actionY) - z); + int16_t height = abs(tile_element_height(actionX, actionY) - z); if (height <= 3 || (type == PEEP_TYPE_STAFF && height <= 32)) { @@ -3247,7 +3247,7 @@ void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & ti return; } - sint16 water_height = surface_get_water_height(tileElement); + int16_t water_height = surface_get_water_height(tileElement); if (water_height) { peep_return_to_centre_of_tile(this); @@ -3321,7 +3321,7 @@ static void peep_apply_easter_egg_to_nearby_guests(rct_peep * peep, easter_egg_f if (!peep_has_valid_xy(peep)) return; - uint16 spriteIndex = sprite_get_first_in_quadrant(peep->x, peep->y); + uint16_t spriteIndex = sprite_get_first_in_quadrant(peep->x, peep->y); if (spriteIndex == SPRITE_INDEX_NULL) return; @@ -3336,7 +3336,7 @@ static void peep_apply_easter_egg_to_nearby_guests(rct_peep * peep, easter_egg_f if (otherPeep->type != PEEP_TYPE_GUEST) continue; - sint32 zDiff = abs(otherPeep->z - peep->z); + int32_t zDiff = abs(otherPeep->z - peep->z); if (zDiff > 32) continue; @@ -3358,8 +3358,8 @@ static void peep_give_passing_peeps_pizza(rct_peep * peep, rct_peep * otherPeep) otherPeep->item_standard_flags |= PEEP_ITEM_PIZZA; - sint32 peepDirection = (peep->sprite_direction >> 3) ^ 2; - sint32 otherPeepOppositeDirection = otherPeep->sprite_direction >> 3; + int32_t peepDirection = (peep->sprite_direction >> 3) ^ 2; + int32_t otherPeepOppositeDirection = otherPeep->sprite_direction >> 3; if (peepDirection == otherPeepOppositeDirection) { if (otherPeep->action == PEEP_ACTION_NONE_1 || otherPeep->action == PEEP_ACTION_NONE_2) @@ -3450,7 +3450,7 @@ static void peep_easter_egg_peep_interactions(rct_peep * peep) * is. * rct2: 0x00694921 */ -sint32 rct_peep::GetZOnSlope(sint32 tile_x, sint32 tile_y) +int32_t rct_peep::GetZOnSlope(int32_t tile_x, int32_t tile_y) { if (tile_x == LOCATION_NULL) return 0; @@ -3460,8 +3460,8 @@ sint32 rct_peep::GetZOnSlope(sint32 tile_x, sint32 tile_y) return tile_element_height(tile_x, tile_y) & 0xFFFF; } - sint32 height = next_z * 8; - uint8 slope = GetNextDirection(); + int32_t height = next_z * 8; + uint8_t slope = GetNextDirection(); slope |= GetNextIsSloped() ? (1 << 2) : 0; return height + map_height_from_slope(tile_x, tile_y, slope); } @@ -3473,9 +3473,9 @@ sint32 rct_peep::GetZOnSlope(sint32 tile_x, sint32 tile_y) static void peep_give_real_name(rct_peep * peep) { // Generate a name_string_idx from the peep id using bit twiddling - uint16 ax = (uint16)(peep->id + 0xF0B); - uint16 dx = 0; - static constexpr uint16 twiddlingBitOrder[] = { 4, 9, 3, 7, 5, 8, 2, 1, 6, 0, 12, 11, 13, 10 }; + uint16_t ax = (uint16_t)(peep->id + 0xF0B); + uint16_t dx = 0; + static constexpr uint16_t twiddlingBitOrder[] = { 4, 9, 3, 7, 5, 8, 2, 1, 6, 0, 12, 11, 13, 10 }; for (size_t i = 0; i < Util::CountOf(twiddlingBitOrder); i++) { dx |= (ax & (1 << twiddlingBitOrder[i]) ? 1 : 0) << i; @@ -3493,10 +3493,10 @@ static void peep_give_real_name(rct_peep * peep) peep->name_string_idx = dx; } -static sint32 peep_compare(const void * sprite_index_a, const void * sprite_index_b) +static int32_t peep_compare(const void * sprite_index_a, const void * sprite_index_b) { - rct_peep const * peep_a = GET_PEEP(*(uint16 *)sprite_index_a); - rct_peep const * peep_b = GET_PEEP(*(uint16 *)sprite_index_b); + rct_peep const * peep_a = GET_PEEP(*(uint16_t *)sprite_index_a); + rct_peep const * peep_b = GET_PEEP(*(uint16_t *)sprite_index_b); // Compare types if (peep_a->type != peep_b->type) @@ -3518,13 +3518,13 @@ static sint32 peep_compare(const void * sprite_index_a, const void * sprite_inde rct_string_id peep_a_format = peep_a->name_string_idx + REAL_NAME_START; rct_string_id peep_b_format = peep_b->name_string_idx + REAL_NAME_START; - uint16 peep_a_name = (peep_a_format % Util::CountOf(real_names)); - uint16 peep_b_name = (peep_b_format % Util::CountOf(real_names)); + uint16_t peep_a_name = (peep_a_format % Util::CountOf(real_names)); + uint16_t peep_b_name = (peep_b_format % Util::CountOf(real_names)); if (peep_a_name == peep_b_name) { - uint16 peep_a_initial = ((peep_a_format >> 10) % Util::CountOf(real_name_initials)); - uint16 peep_b_initial = ((peep_b_format >> 10) % Util::CountOf(real_name_initials)); + uint16_t peep_a_initial = ((peep_a_format >> 10) % Util::CountOf(real_name_initials)); + uint16_t peep_b_initial = ((peep_b_format >> 10) % Util::CountOf(real_name_initials)); return peep_a_initial - peep_b_initial; } else @@ -3537,7 +3537,7 @@ static sint32 peep_compare(const void * sprite_index_a, const void * sprite_inde // Compare their names as strings utf8 name_a[256]; utf8 name_b[256]; - uint32 peepIndex = peep_a->id; + uint32_t peepIndex = peep_a->id; format_string(name_a, 256, peep_a->name_string_idx, &peepIndex); peepIndex = peep_b->id; format_string(name_b, 256, peep_b->name_string_idx, &peepIndex); @@ -3551,8 +3551,8 @@ static sint32 peep_compare(const void * sprite_index_a, const void * sprite_inde void peep_update_name_sort(rct_peep * peep) { // Remove peep from sprite list - uint16 nextSpriteIndex = peep->next; - uint16 prevSpriteIndex = peep->previous; + uint16_t nextSpriteIndex = peep->next; + uint16_t prevSpriteIndex = peep->previous; if (prevSpriteIndex != SPRITE_INDEX_NULL) { rct_peep * prevPeep = GET_PEEP(prevSpriteIndex); @@ -3570,7 +3570,7 @@ void peep_update_name_sort(rct_peep * peep) } rct_peep * otherPeep; - uint16 spriteIndex; + uint16_t spriteIndex; FOR_ALL_PEEPS(spriteIndex, otherPeep) { // Check if peep should go before this one @@ -3620,7 +3620,7 @@ finish_peep_sort: void peep_sort() { // Count number of peeps - uint16 sprite_index, num_peeps = 0; + uint16_t sprite_index, num_peeps = 0; rct_peep * peep; FOR_ALL_PEEPS(sprite_index, peep) { @@ -3632,13 +3632,13 @@ void peep_sort() return; // Create a copy of the peep list and sort it using peep_compare - uint16 * peep_list = (uint16 *)malloc(num_peeps * sizeof(uint16)); - sint32 i = 0; + uint16_t * peep_list = (uint16_t *)malloc(num_peeps * sizeof(uint16_t)); + int32_t i = 0; FOR_ALL_PEEPS(sprite_index, peep) { peep_list[i++] = peep->sprite_index; } - qsort(peep_list, num_peeps, sizeof(uint16), peep_compare); + qsort(peep_list, num_peeps, sizeof(uint16_t), peep_compare); // Set the correct peep->next and peep->previous using the sorted list for (i = 0; i < num_peeps; i++) @@ -3670,7 +3670,7 @@ void peep_update_names(bool realNames) { gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; rct_peep * peep; - uint16 spriteIndex; + uint16_t spriteIndex; FOR_ALL_GUESTS(spriteIndex, peep) { if (peep->name_string_idx == STR_GUEST_X) @@ -3683,7 +3683,7 @@ void peep_update_names(bool realNames) { gParkFlags &= ~PARK_FLAGS_SHOW_REAL_GUEST_NAMES; rct_peep * peep; - uint16 spriteIndex; + uint16_t spriteIndex; FOR_ALL_GUESTS(spriteIndex, peep) { if (peep->name_string_idx >= REAL_NAME_START && peep->name_string_idx <= REAL_NAME_END) @@ -3909,7 +3909,7 @@ void decrement_guests_heading_for_park() } } -static void peep_release_balloon(rct_peep * peep, sint16 spawn_height) +static void peep_release_balloon(rct_peep * peep, int16_t spawn_height) { if (peep->item_standard_flags & PEEP_ITEM_BALLOON) { diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 4945637792..e206861275 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -330,7 +330,7 @@ enum PEEP_ACTION_SPRITE_TYPE PEEP_ACTION_SPRITE_TYPE_WITHDRAW_MONEY = 36 }; -enum PEEP_FLAGS : uint32 +enum PEEP_FLAGS : uint32_t { PEEP_FLAGS_LEAVING_PARK = (1 << 0), PEEP_FLAGS_SLOW_WALK = (1 << 1), @@ -512,213 +512,213 @@ enum PEEP_RIDE_DECISION #pragma pack(push, 1) struct rct_peep_thought { - uint8 type; // 0 - uint8 item; // 1 - uint8 freshness; // 2 larger is less fresh - uint8 fresh_timeout; // 3 updates every tick + uint8_t type; // 0 + uint8_t item; // 1 + uint8_t freshness; // 2 larger is less fresh + uint8_t fresh_timeout; // 3 updates every tick }; assert_struct_size(rct_peep_thought, 4); struct rct_peep { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; // 0x1E - uint8 pad_1F[3]; + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; // 0x1E + uint8_t pad_1F[3]; rct_string_id name_string_idx; // 0x22 - uint16 next_x; // 0x24 - uint16 next_y; // 0x26 - uint8 next_z; // 0x28 - uint8 next_flags; // 0x29 - uint8 outside_of_park; // 0x2A - uint8 state; // 0x2B - uint8 sub_state; // 0x2C - uint8 sprite_type; // 0x2D - uint8 type; // 0x2E + uint16_t next_x; // 0x24 + uint16_t next_y; // 0x26 + uint8_t next_z; // 0x28 + uint8_t next_flags; // 0x29 + uint8_t outside_of_park; // 0x2A + uint8_t state; // 0x2B + uint8_t sub_state; // 0x2C + uint8_t sprite_type; // 0x2D + uint8_t type; // 0x2E union { - uint8 staff_type; // 0x2F - uint8 no_of_rides; // 0x2F + uint8_t staff_type; // 0x2F + uint8_t no_of_rides; // 0x2F }; - uint8 tshirt_colour; // 0x30 - uint8 trousers_colour; // 0x31 - uint16 destination_x; // 0x32 Location that the peep is trying to get to - uint16 destination_y; // 0x34 - uint8 destination_tolerance; // 0x36 How close to destination before next action/state 0 = exact - uint8 var_37; - uint8 energy; // 0x38 - uint8 energy_target; // 0x39 - uint8 happiness; // 0x3A - uint8 happiness_target; // 0x3B - uint8 nausea; // 0x3C - uint8 nausea_target; // 0x3D - uint8 hunger; // 0x3E - uint8 thirst; // 0x3F - uint8 toilet; // 0x40 - uint8 mass; // 0x41 - uint8 time_to_consume; // 0x42 - uint8 intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits - uint8 nausea_tolerance; // 0x44 - uint8 window_invalidate_flags; // 0x45 + uint8_t tshirt_colour; // 0x30 + uint8_t trousers_colour; // 0x31 + uint16_t destination_x; // 0x32 Location that the peep is trying to get to + uint16_t destination_y; // 0x34 + uint8_t destination_tolerance; // 0x36 How close to destination before next action/state 0 = exact + uint8_t var_37; + uint8_t energy; // 0x38 + uint8_t energy_target; // 0x39 + uint8_t happiness; // 0x3A + uint8_t happiness_target; // 0x3B + uint8_t nausea; // 0x3C + uint8_t nausea_target; // 0x3D + uint8_t hunger; // 0x3E + uint8_t thirst; // 0x3F + uint8_t toilet; // 0x40 + uint8_t mass; // 0x41 + uint8_t time_to_consume; // 0x42 + uint8_t intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits + uint8_t nausea_tolerance; // 0x44 + uint8_t window_invalidate_flags; // 0x45 money16 paid_on_drink; // 0x46 - uint8 ride_types_been_on[16]; // 0x48 - uint32 item_extra_flags; // 0x58 - uint8 photo2_ride_ref; // 0x5C - uint8 photo3_ride_ref; // 0x5D - uint8 photo4_ride_ref; // 0x5E - uint8 pad_5F[0x09]; // 0x5F - uint8 current_ride; // 0x68 - uint8 current_ride_station; // 0x69 - uint8 current_train; // 0x6A + uint8_t ride_types_been_on[16]; // 0x48 + uint32_t item_extra_flags; // 0x58 + uint8_t photo2_ride_ref; // 0x5C + uint8_t photo3_ride_ref; // 0x5D + uint8_t photo4_ride_ref; // 0x5E + uint8_t pad_5F[0x09]; // 0x5F + uint8_t current_ride; // 0x68 + uint8_t current_ride_station; // 0x69 + uint8_t current_train; // 0x6A union { struct { - uint8 current_car; // 0x6B - uint8 current_seat; // 0x6C + uint8_t current_car; // 0x6B + uint8_t current_seat; // 0x6C }; - uint16 time_to_sitdown; // 0x6B + uint16_t time_to_sitdown; // 0x6B struct { - uint8 time_to_stand; // 0x6B - uint8 standing_flags; // 0x6C + uint8_t time_to_stand; // 0x6B + uint8_t standing_flags; // 0x6C }; }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower - uint8 special_sprite; // 0x6D - uint8 action_sprite_type; // 0x6E + uint8_t special_sprite; // 0x6D + uint8_t action_sprite_type; // 0x6E // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which // reads this again - uint8 next_action_sprite_type; // 0x6F - uint8 action_sprite_image_offset; // 0x70 - uint8 action; // 0x71 - uint8 action_frame; // 0x72 - uint8 step_progress; // 0x73 + uint8_t next_action_sprite_type; // 0x6F + uint8_t action_sprite_image_offset; // 0x70 + uint8_t action; // 0x71 + uint8_t action_frame; // 0x72 + uint8_t step_progress; // 0x73 union { - uint16 mechanic_time_since_call; // time getting to ride to fix - uint16 next_in_queue; // 0x74 + uint16_t mechanic_time_since_call; // time getting to ride to fix + uint16_t next_in_queue; // 0x74 }; - uint8 pad_76; // Previously this was set to 0 but never used. - uint8 pad_77; + uint8_t pad_76; // Previously this was set to 0 but never used. + uint8_t pad_77; union { - uint8 maze_last_edge; // 0x78 - uint8 direction; // Direction ? + uint8_t maze_last_edge; // 0x78 + uint8_t direction; // Direction ? }; - uint8 interaction_ride_index; - uint16 time_in_queue; // 0x7A - uint8 rides_been_on[32]; // 0x7C + uint8_t interaction_ride_index; + uint16_t time_in_queue; // 0x7A + uint8_t rides_been_on[32]; // 0x7C // 255 bit bitmap of every ride the peep has been on see // window_peep_rides_update for how to use. - uint32 id; // 0x9C + uint32_t id; // 0x9C money32 cash_in_pocket; // 0xA0 money32 cash_spent; // 0xA4 - sint32 time_in_park; // 0xA8 - sint8 rejoin_queue_timeout; // 0xAC whilst waiting for a free vehicle (or pair) in the entrance - uint8 previous_ride; // 0xAD - uint16 previous_ride_time_out; // 0xAE + int32_t time_in_park; // 0xA8 + int8_t rejoin_queue_timeout; // 0xAC whilst waiting for a free vehicle (or pair) in the entrance + uint8_t previous_ride; // 0xAD + uint16_t previous_ride_time_out; // 0xAE rct_peep_thought thoughts[PEEP_MAX_THOUGHTS]; // 0xB0 - uint8 path_check_optimisation; // 0xC4 see peep.checkForPath + uint8_t path_check_optimisation; // 0xC4 see peep.checkForPath union { - uint8 staff_id; // 0xC5 - uint8 guest_heading_to_ride_id; // 0xC5 + uint8_t staff_id; // 0xC5 + uint8_t guest_heading_to_ride_id; // 0xC5 }; union { - uint8 staff_orders; // 0xC6 - uint8 peep_is_lost_countdown; // 0xC6 + uint8_t staff_orders; // 0xC6 + uint8_t peep_is_lost_countdown; // 0xC6 }; - uint8 photo1_ride_ref; // 0xC7 - uint32 peep_flags; // 0xC8 + uint8_t photo1_ride_ref; // 0xC7 + uint32_t peep_flags; // 0xC8 rct12_xyzd8 pathfind_goal; // 0xCC rct12_xyzd8 pathfind_history[4]; // 0xD0 - uint8 no_action_frame_num; // 0xE0 + uint8_t no_action_frame_num; // 0xE0 // 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8 litter_count; // 0xE1 + uint8_t litter_count; // 0xE1 union { - uint8 time_on_ride; // 0xE2 - uint8 staff_mowing_timeout; // 0xE2 + uint8_t time_on_ride; // 0xE2 + uint8_t staff_mowing_timeout; // 0xE2 }; // 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8 disgusting_count; // 0xE3 + uint8_t disgusting_count; // 0xE3 union { money16 paid_to_enter; // 0xE4 - uint16 staff_lawns_mown; // 0xE4 - uint16 staff_rides_fixed; // 0xE4 + uint16_t staff_lawns_mown; // 0xE4 + uint16_t staff_rides_fixed; // 0xE4 }; union { money16 paid_on_rides; // 0xE6 - uint16 staff_gardens_watered; // 0xE6 - uint16 staff_rides_inspected; // 0xE6 + uint16_t staff_gardens_watered; // 0xE6 + uint16_t staff_rides_inspected; // 0xE6 }; union { money16 paid_on_food; // 0xE8 - uint16 staff_litter_swept; // 0xE8 + uint16_t staff_litter_swept; // 0xE8 }; union { money16 paid_on_souvenirs; // 0xEA - uint16 staff_bins_emptied; // 0xEA + uint16_t staff_bins_emptied; // 0xEA }; - uint8 no_of_food; // 0xEC - uint8 no_of_drinks; // 0xED - uint8 no_of_souvenirs; // 0xEE - uint8 vandalism_seen; // 0xEF 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen - uint8 voucher_type; // 0xF0 - uint8 voucher_arguments; // 0xF1 ride_id or string_offset_id - uint8 surroundings_thought_timeout; // 0xF2 - uint8 angriness; // 0xF3 - uint8 time_lost; // 0xF4 the time the peep has been lost when it reaches 254 generates the lost thought - uint8 days_in_queue; // 0xF5 - uint8 balloon_colour; // 0xF6 - uint8 umbrella_colour; // 0xF7 - uint8 hat_colour; // 0xF8 - uint8 favourite_ride; // 0xF9 - uint8 favourite_ride_rating; // 0xFA - uint8 pad_FB; - uint32 item_standard_flags; // 0xFC + uint8_t no_of_food; // 0xEC + uint8_t no_of_drinks; // 0xED + uint8_t no_of_souvenirs; // 0xEE + uint8_t vandalism_seen; // 0xEF 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen + uint8_t voucher_type; // 0xF0 + uint8_t voucher_arguments; // 0xF1 ride_id or string_offset_id + uint8_t surroundings_thought_timeout; // 0xF2 + uint8_t angriness; // 0xF3 + uint8_t time_lost; // 0xF4 the time the peep has been lost when it reaches 254 generates the lost thought + uint8_t days_in_queue; // 0xF5 + uint8_t balloon_colour; // 0xF6 + uint8_t umbrella_colour; // 0xF7 + uint8_t hat_colour; // 0xF8 + uint8_t favourite_ride; // 0xF9 + uint8_t favourite_ride_rating; // 0xFA + uint8_t pad_FB; + uint32_t item_standard_flags; // 0xFC public: // Peep void Update(); - bool UpdateAction(sint16 * actionX, sint16 * actionY, sint16 * xy_distance); + bool UpdateAction(int16_t * actionX, int16_t * actionY, int16_t * xy_distance); bool UpdateAction(); - void SetState(uint8 new_state); + void SetState(uint8_t new_state); void Remove(); void Invalidate(); void UpdateCurrentActionSpriteType(); - void SwitchToSpecialSprite(uint8 special_sprite_id); + void SwitchToSpecialSprite(uint8_t special_sprite_id); void StateReset(); - void MoveTo(sint16 destX, sint16 destY, sint16 destZ); - uint8 GetNextDirection() const; + void MoveTo(int16_t destX, int16_t destY, int16_t destZ); + uint8_t GetNextDirection() const; bool GetNextIsSloped() const; bool GetNextIsSurface() const; - void SetNextFlags(uint8 next_direction, bool is_sloped, bool is_surface); + void SetNextFlags(uint8_t next_direction, bool is_sloped, bool is_surface); void Pickup(); - void PickupAbort(sint32 old_x); + void PickupAbort(int32_t old_x); bool Place(TileCoordsXYZ location, bool apply); public: // Guest - void Tick128UpdateGuest(sint32 index); + void Tick128UpdateGuest(int32_t index); void RemoveFromQueue(); - bool HasItem(sint32 peepItem) const; + bool HasItem(int32_t peepItem) const; bool HasFood() const; bool HasDrink() const; bool HasEmptyContainer() const; - void OnEnterRide(uint8 rideIndex); - void OnExitRide(uint8 rideIndex); + void OnEnterRide(uint8_t rideIndex); + void OnExitRide(uint8_t rideIndex); void RemoveFromRide(); void UpdateSpriteType(); bool HeadingForRideOrParkExit() const; @@ -767,7 +767,7 @@ private: // Staff update void UpdateEmptyingBin(); void UpdateWatering(); void UpdateAnswering(); - void UpdateFixing(sint32 steps); + void UpdateFixing(int32_t steps); bool UpdateFixingEnterStation(Ride * ride); bool UpdateFixingMoveToBrokenDownVehicle(bool firstRun, Ride * ride); bool UpdateFixingFixVehicle(bool firstRun, Ride * ride); @@ -778,64 +778,64 @@ private: // Staff update bool UpdateFixingFixStationStart(bool firstRun, Ride * ride); bool UpdateFixingFixStationBrakes(bool firstRun, Ride * ride); bool UpdateFixingMoveToStationExit(bool firstRun, Ride * ride); - bool UpdateFixingFinishFixOrInspect(bool firstRun, sint32 steps, Ride * ride); + bool UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride * ride); bool UpdateFixingLeaveByEntranceExit(bool firstRun, Ride * ride); - void UpdateRideInspected(sint32 rideIndex); + void UpdateRideInspected(int32_t rideIndex); void UpdateHeadingToInspect(); // TODO: Make these private again when done refactoring public: // Peep bool CheckForPath(); - void PerformNextAction(uint8 & pathing_result); - void PerformNextAction(uint8 & pathing_result, rct_tile_element *& tile_result); - sint32 GetZOnSlope(sint32 tile_x, sint32 tile_y); + void PerformNextAction(uint8_t & pathing_result); + void PerformNextAction(uint8_t & pathing_result, rct_tile_element *& tile_result); + int32_t GetZOnSlope(int32_t tile_x, int32_t tile_y); void SwitchNextActionSpriteType(); - uint8 GetActionSpriteType(); + uint8_t GetActionSpriteType(); public: // Guest - void StopPurchaseThought(uint8 ride_type); + void StopPurchaseThought(uint8_t ride_type); void TryGetUpFromSitting(); - void ChoseNotToGoOnRide(sint32 rideIndex, bool peepAtRide, bool updateLastRide); + void ChoseNotToGoOnRide(int32_t rideIndex, bool peepAtRide, bool updateLastRide); void PickRideToGoOn(); void ReadMap(); - bool ShouldGoOnRide(sint32 rideIndex, sint32 entranceNum, bool atQueue, bool thinking); - bool ShouldGoToShop(sint32 rideIndex, bool peepAtShop); + bool ShouldGoOnRide(int32_t rideIndex, int32_t entranceNum, bool atQueue, bool thinking); + bool ShouldGoToShop(int32_t rideIndex, bool peepAtShop); bool ShouldFindBench(); bool UpdateWalkingFindBench(); bool UpdateWalkingFindBin(); void SpendMoney(money16 & peep_expend_type, money32 amount); void SpendMoney(money32 amount); - void SetHasRidden(sint32 rideIndex); - bool HasRidden(sint32 rideIndex) const; - void SetHasRiddenRideType(sint32 rideType); - bool HasRiddenRideType(sint32 rideType) const; - sint32 HasFoodStandardFlag() const; - sint32 HasFoodExtraFlag() const; + void SetHasRidden(int32_t rideIndex); + bool HasRidden(int32_t rideIndex) const; + void SetHasRiddenRideType(int32_t rideType); + bool HasRiddenRideType(int32_t rideType) const; + int32_t HasFoodStandardFlag() const; + int32_t HasFoodExtraFlag() const; bool HasDrinkStandardFlag() const; bool HasDrinkExtraFlag() const; - sint32 HasEmptyContainerStandardFlag() const; - sint32 HasEmptyContainerExtraFlag() const; + int32_t HasEmptyContainerStandardFlag() const; + int32_t HasEmptyContainerExtraFlag() const; void CheckIfLost(); void CheckCantFindRide(); void CheckCantFindExit(); - bool DecideAndBuyItem(uint8 rideIndex, sint32 shopItem, money32 price); - void SetSpriteType(uint8 new_sprite_type); + bool DecideAndBuyItem(uint8_t rideIndex, int32_t shopItem, money32 price); + void SetSpriteType(uint8_t new_sprite_type); }; assert_struct_size(rct_peep, 0x100); #pragma pack(pop) struct rct_sprite_bounds { - uint8 sprite_width; // 0x00 - uint8 sprite_height_negative; // 0x01 - uint8 sprite_height_positive; // 0x02 + uint8_t sprite_width; // 0x00 + uint8_t sprite_height_negative; // 0x01 + uint8_t sprite_height_positive; // 0x02 }; struct rct_peep_animation { - uint32 base_image; // 0x00 + uint32_t base_image; // 0x00 size_t num_frames; - const uint8 * frame_offsets; + const uint8_t * frame_offsets; }; struct rct_peep_animation_entry @@ -903,26 +903,26 @@ enum extern rct_peep_animation_entry g_peep_animation_entries[PEEP_SPRITE_TYPE_COUNT]; extern const bool gSpriteTypeToSlowWalkMap[48]; -extern uint8 gGuestChangeModifier; -extern uint16 gNumGuestsInPark; -extern uint16 gNumGuestsInParkLastWeek; -extern uint16 gNumGuestsHeadingForPark; +extern uint8_t gGuestChangeModifier; +extern uint16_t gNumGuestsInPark; +extern uint16_t gNumGuestsInParkLastWeek; +extern uint16_t gNumGuestsHeadingForPark; extern money16 gGuestInitialCash; -extern uint8 gGuestInitialHappiness; -extern uint8 gGuestInitialHunger; -extern uint8 gGuestInitialThirst; +extern uint8_t gGuestInitialHappiness; +extern uint8_t gGuestInitialHunger; +extern uint8_t gGuestInitialThirst; -extern uint32 gNextGuestNumber; +extern uint32_t gNextGuestNumber; -extern uint8 gPeepWarningThrottle[16]; +extern uint8_t gPeepWarningThrottle[16]; extern TileCoordsXYZ gPeepPathFindGoalPosition; extern bool gPeepPathFindIgnoreForeignQueues; -extern uint8 gPeepPathFindQueueRideIndex; +extern uint8_t gPeepPathFindQueueRideIndex; -rct_peep * try_get_guest(uint16 spriteIndex); -sint32 peep_get_staff_count(); +rct_peep * try_get_guest(uint16_t spriteIndex); +int32_t peep_get_staff_count(); bool peep_can_be_picked_up(rct_peep * peep); void peep_update_all(); void peep_problem_warnings_update(); @@ -930,16 +930,16 @@ void peep_stop_crowd_noise(); void peep_update_crowd_noise(); void peep_update_days_in_queue(); void peep_applause(); -rct_peep * peep_generate(sint32 x, sint32 y, sint32 z); -void get_arguments_from_action(rct_peep * peep, uint32 * argument_1, uint32 * argument_2); +rct_peep * peep_generate(int32_t x, int32_t y, int32_t z); +void get_arguments_from_action(rct_peep * peep, uint32_t * argument_1, uint32_t * argument_2); void peep_thought_set_format_args(rct_peep_thought * thought); -sint32 get_peep_face_sprite_small(rct_peep * peep); -sint32 get_peep_face_sprite_large(rct_peep * peep); -sint32 peep_check_easteregg_name(sint32 index, rct_peep * peep); -sint32 peep_get_easteregg_name_id(rct_peep * peep); -bool peep_pickup_command(uint32 peepnum, sint32 x, sint32 y, sint32 z, sint32 action, bool apply); -void game_command_pickup_guest(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); +int32_t get_peep_face_sprite_small(rct_peep * peep); +int32_t get_peep_face_sprite_large(rct_peep * peep); +int32_t peep_check_easteregg_name(int32_t index, rct_peep * peep); +int32_t peep_get_easteregg_name_id(rct_peep * peep); +bool peep_pickup_command(uint32_t peepnum, int32_t x, int32_t y, int32_t z, int32_t action, bool apply); +void game_command_pickup_guest(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); void peep_sprite_remove(rct_peep * peep); void peep_window_state_update(rct_peep * peep); @@ -950,25 +950,25 @@ void peep_decrement_num_riders(rct_peep * peep); * ah:thought_arguments * esi: peep */ -void peep_insert_new_thought(rct_peep * peep, uint8 thought_type, uint8 thought_arguments); +void peep_insert_new_thought(rct_peep * peep, uint8_t thought_type, uint8_t thought_arguments); void peep_set_map_tooltip(rct_peep * peep); -void SwitchToSpecialSprite(rct_peep * peep, uint8 special_sprite_id); +void SwitchToSpecialSprite(rct_peep * peep, uint8_t special_sprite_id); void peep_update_name_sort(rct_peep * peep); void peep_sort(); void peep_update_names(bool realNames); -void guest_set_name(uint16 spriteIndex, const char * name); +void guest_set_name(uint16_t spriteIndex, const char * name); void peep_handle_easteregg_name(rct_peep * peep); -void game_command_set_guest_name(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); +void game_command_set_guest_name(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); -sint32 peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep); +int32_t peep_pathfind_choose_direction(TileCoordsXYZ loc, rct_peep * peep); void peep_reset_pathfind_goal(rct_peep * peep); -bool is_valid_path_z_and_direction(rct_tile_element * tileElement, sint32 currentZ, sint32 currentDirection); -sint32 guest_path_finding(rct_peep * peep); +bool is_valid_path_z_and_direction(rct_tile_element * tileElement, int32_t currentZ, int32_t currentDirection); +int32_t guest_path_finding(rct_peep * peep); #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 #define PATHFIND_DEBUG 0 // Set to 0 to disable pathfinding debugging; diff --git a/src/openrct2/peep/PeepData.cpp b/src/openrct2/peep/PeepData.cpp index 2be3e56d2a..25243823b3 100644 --- a/src/openrct2/peep/PeepData.cpp +++ b/src/openrct2/peep/PeepData.cpp @@ -11,1829 +11,1829 @@ #include "../world/Sprite.h" // clang-format off -static constexpr const uint8 PeepSpriteImage_Normal_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Normal_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Normal_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Normal_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Normal_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Normal_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Normal_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Normal_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Normal_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Normal_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Normal_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Normal_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Normal_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Normal_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Normal_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Normal_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Normal_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Normal_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Normal_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Normal_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Normal_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Normal_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Normal_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Normal_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Normal_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Normal_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Normal_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Normal_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Normal_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Normal_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Normal_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Normal_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Handyman_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Handyman_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Handyman_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Handyman_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Handyman_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Handyman_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Handyman_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Handyman_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Handyman_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Handyman_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Handyman_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Handyman_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Handyman_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Handyman_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Handyman_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Handyman_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Handyman_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Mechanic_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Mechanic_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Security_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Security_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Security_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Security_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Security_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Security_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Security_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Security_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Security_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Security_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Security_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Security_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Security_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Security_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; -static constexpr const uint8 PeepSpriteImage_Security_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Security_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Security_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Security_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Security_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Security_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Security_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Security_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Security_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Security_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Security_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Security_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Security_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Security_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Security_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Security_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; +static constexpr const uint8_t PeepSpriteImage_Security_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Security_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Security_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Security_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_03_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_30_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPanda_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_03_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_30_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPanda_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_03_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_30_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerTiger_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_03_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_30_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerTiger_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7, 8, 9 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerElephant_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6, 7, 8, 9 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerElephant_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_26_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 24, 25, 26, 27, 28, 28, 28, 29, 30, 31, 32, 32, 32, 32, 32, 33, 34, 35, 36, 37, 38 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerRoman_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_26_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 24, 25, 26, 27, 28, 28, 28, 29, 30, 31, 32, 32, 32, 32, 32, 33, 34, 35, 36, 37, 38 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerRoman_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_17_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerGorilla_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_17_sequence[] = { 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerGorilla_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7, 8, 9 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSnowman_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7, 8, 9 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSnowman_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerKnight_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 25, 26, 27 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerKnight_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_03_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_26_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_30_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerAstronaut_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_03_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_26_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_30_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerAstronaut_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerBandit_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 14, 15, 16, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerBandit_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerSheriff_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 10, 11, 12, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerSheriff_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_EntertainerPirate_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_17_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_EntertainerPirate_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_IceCream_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_IceCream_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_IceCream_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_03_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_IceCream_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_IceCream_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_IceCream_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_IceCream_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_08_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_IceCream_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_IceCream_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_IceCream_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_IceCream_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_IceCream_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_IceCream_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_IceCream_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_IceCream_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_IceCream_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_IceCream_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_03_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_08_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_IceCream_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Chips_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Chips_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Chips_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Chips_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Chips_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Chips_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Chips_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Chips_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Chips_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Chips_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Chips_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Chips_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Chips_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Chips_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Chips_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chips_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Chips_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Chips_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Chips_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Chips_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chips_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Chips_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Chips_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Chips_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chips_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chips_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Chips_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Chips_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chips_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Chips_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Chips_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Chips_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chips_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Chips_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Burger_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Burger_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Burger_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Burger_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Burger_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Burger_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Burger_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Burger_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Burger_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Burger_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Burger_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Burger_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Burger_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Burger_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Burger_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Burger_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Burger_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Burger_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Burger_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Burger_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Burger_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Burger_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Burger_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Burger_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Burger_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Burger_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Burger_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Burger_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Burger_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Burger_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Burger_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Burger_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Burger_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Burger_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Drink_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Drink_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Drink_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Drink_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Drink_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Drink_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Drink_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Drink_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Drink_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Drink_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Drink_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Drink_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Drink_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Drink_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Drink_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Drink_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Drink_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Drink_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Drink_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Drink_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Drink_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Drink_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Drink_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Drink_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Drink_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Drink_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Drink_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Drink_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Drink_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Drink_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Drink_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Drink_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Drink_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Drink_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Balloon_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Balloon_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Balloon_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Balloon_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Balloon_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Balloon_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Balloon_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Balloon_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Balloon_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Balloon_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Balloon_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Balloon_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Balloon_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Balloon_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Balloon_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Balloon_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Balloon_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Candyfloss_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Candyfloss_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Umbrella_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Umbrella_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Pizza_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Pizza_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Pizza_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_03_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Pizza_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Pizza_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Pizza_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Pizza_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_08_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Pizza_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Pizza_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Pizza_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Pizza_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Pizza_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Pizza_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Pizza_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Pizza_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pizza_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Pizza_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_03_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_08_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Pizza_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_SecurityAlt_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_17_sequence[] = { 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 4, 5, 6 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_SecurityAlt_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Popcorn_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Popcorn_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_ArmsCrossed_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_ArmsCrossed_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_HeadDown_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_HeadDown_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Nauseous_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Nauseous_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_VeryNauseous_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_VeryNauseous_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_RequireBathroom_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_RequireBathroom_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Hat_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Hat_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Hat_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Hat_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Hat_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Hat_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Hat_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Hat_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Hat_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Hat_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Hat_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Hat_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Hat_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Hat_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Hat_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Hat_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Hat_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Hat_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Hat_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Hat_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Hat_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Hat_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Hat_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Hat_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Hat_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Hat_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Hat_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Hat_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Hat_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Hat_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Hat_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Hat_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_HotDog_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_HotDog_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_HotDog_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_HotDog_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_HotDog_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_HotDog_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_HotDog_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_HotDog_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_HotDog_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_HotDog_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_HotDog_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_HotDog_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_HotDog_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_HotDog_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_HotDog_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_HotDog_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_HotDog_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_HotDog_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Tentacle_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Tentacle_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_03_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_08_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_ToffeeApple_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_03_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_08_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_ToffeeApple_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Donut_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Donut_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Donut_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Donut_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Donut_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Donut_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Donut_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_08_sequence[] = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Donut_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Donut_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Donut_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Donut_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Donut_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Donut_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Donut_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Donut_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Donut_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Donut_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Donut_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Donut_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Donut_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Donut_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Donut_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Donut_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Donut_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_08_sequence[] = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Donut_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Donut_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Donut_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Donut_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Donut_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Donut_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Donut_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Donut_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Donut_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Donut_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Coffee_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Coffee_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Coffee_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_03_sequence[] = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1 }; -static constexpr const uint8 PeepSpriteImage_Coffee_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Coffee_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Coffee_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Coffee_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_08_sequence[] = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1 }; -static constexpr const uint8 PeepSpriteImage_Coffee_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Coffee_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Coffee_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Coffee_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Coffee_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Coffee_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Coffee_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Coffee_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Coffee_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Coffee_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_03_sequence[] = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_08_sequence[] = { 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Coffee_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Chicken_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Chicken_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Chicken_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Chicken_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Chicken_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Chicken_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Chicken_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Chicken_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Chicken_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Chicken_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Chicken_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Chicken_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Chicken_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Chicken_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Chicken_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Chicken_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Chicken_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Chicken_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Lemonade_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Lemonade_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Watching_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Watching_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Watching_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Watching_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Watching_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Watching_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Watching_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Watching_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Watching_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Watching_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Watching_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Watching_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Watching_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Watching_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Watching_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Watching_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Watching_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Watching_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Watching_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Watching_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Watching_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Watching_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Watching_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Watching_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Watching_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Watching_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Watching_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Watching_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Watching_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Watching_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Watching_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Watching_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Pretzel_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Pretzel_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Sunglasses_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_00_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_08_sequence[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Sunglasses_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_SuJongkwa_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_SuJongkwa_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Juice_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Juice_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Juice_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Juice_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Juice_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Juice_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Juice_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Juice_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Juice_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Juice_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Juice_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Juice_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Juice_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Juice_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Juice_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Juice_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Juice_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Juice_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Juice_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Juice_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Juice_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Juice_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Juice_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Juice_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Juice_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Juice_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Juice_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Juice_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Juice_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Juice_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Juice_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Juice_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Juice_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Juice_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_FunnelCake_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_FunnelCake_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Noodles_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Noodles_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Noodles_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Noodles_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Noodles_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Noodles_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Noodles_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Noodles_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Noodles_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Noodles_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Noodles_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Noodles_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Noodles_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Noodles_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Noodles_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Noodles_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Noodles_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Noodles_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Sausage_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Sausage_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Sausage_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sausage_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Sausage_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Sausage_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sausage_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sausage_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sausage_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sausage_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Sausage_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Sausage_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Sausage_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Sausage_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Sausage_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sausage_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Sausage_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Sausage_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Soup_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Soup_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Soup_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Soup_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Soup_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Soup_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Soup_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Soup_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Soup_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Soup_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Soup_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Soup_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Soup_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Soup_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Soup_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Soup_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Soup_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Soup_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Soup_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Soup_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Soup_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Soup_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Soup_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Soup_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Soup_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Soup_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Soup_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Soup_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Soup_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Soup_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Soup_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Soup_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Soup_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Soup_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_02_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_07_sequence[] = { 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; -static constexpr const uint8 PeepSpriteImage_Sandwich_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_00_sequence[] = { 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_01_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_02_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_03_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_04_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_05_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_06_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_07_sequence[] = { 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_08_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_09_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_10_sequence[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_11_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_12_sequence[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_13_sequence[] = { 0, 1, 2, 3, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_14_sequence[] = { 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 13, 13, 8, 8, 9, 9, 8, 8 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_15_sequence[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_16_sequence[] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_17_sequence[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 5, 6, 7 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_18_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 17, 18, 18, 18, 18, 18, 18, 18, 17, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 15, 16, 15, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_19_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 14, 14, 14, 14, 14, 14, 19, 20, 20, 20, 19, 14, 14, 14, 14, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_20_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 14, 15, 15, 15, 16, 17, 17, 17, 14, 11, 12, 13, 12, 13, 12, 11, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_21_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_22_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 21, 22, 21, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 29, 30, 31, 32, 31, 30, 31, 32, 31, 30, 31, 32, 31, 30, 29, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_23_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 16, 17, 18, 19, 18, 17, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_24_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 21, 20, 21, 22, 21, 20, 21, 22, 20, 19, 18, 0, 0, 23, 24, 25, 26, 27, 28, 28, 26, 24, 0, 0, 0, 0, 0, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_25_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_26_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_27_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 11, 10, 10, 10, 13, 14, 14, 14, 13, 10, 10, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_28_sequence[] = { 0, 1, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_29_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_30_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_31_sequence[] = { 0, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 6, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_32_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_33_sequence[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_34_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 15, 14, 8, 9, 10, 11, 12, 13, 8, 9, 10, 11, 12, 13, 7, 6, 5, 4, 3, 2, 1, 0 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_35_sequence[] = { 0, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 4 }; +static constexpr const uint8_t PeepSpriteImage_Sandwich_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; static constexpr const rct_peep_animation PeepSpriteImage_Normal[] = { diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 7a2b4d6684..f88b22a49e 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -54,9 +54,9 @@ const rct_string_id StaffCostumeNames[] = { // Every staff member has STAFF_PATROL_AREA_SIZE elements assigned to in this array, indexed by their staff_id // Additionally there is a patrol area for each staff type, which is the union of the patrols of all staff members of that type -uint32 gStaffPatrolAreas[(STAFF_MAX_COUNT + STAFF_TYPE_COUNT) * STAFF_PATROL_AREA_SIZE]; -uint8 gStaffModes[STAFF_MAX_COUNT + STAFF_TYPE_COUNT]; -uint16 gStaffDrawPatrolAreas; +uint32_t gStaffPatrolAreas[(STAFF_MAX_COUNT + STAFF_TYPE_COUNT) * STAFF_PATROL_AREA_SIZE]; +uint8_t gStaffModes[STAFF_MAX_COUNT + STAFF_TYPE_COUNT]; +uint16_t gStaffDrawPatrolAreas; colour_t gStaffHandymanColour; colour_t gStaffMechanicColour; colour_t gStaffSecurityColour; @@ -67,10 +67,10 @@ colour_t gStaffSecurityColour; */ void staff_reset_modes() { - for (sint32 i = 0; i < STAFF_MAX_COUNT; i++) + for (int32_t i = 0; i < STAFF_MAX_COUNT; i++) gStaffModes[i] = STAFF_MODE_NONE; - for (sint32 i = STAFF_MAX_COUNT; i < (STAFF_MAX_COUNT + STAFF_TYPE_COUNT); i++) + for (int32_t i = STAFF_MAX_COUNT; i < (STAFF_MAX_COUNT + STAFF_TYPE_COUNT); i++) gStaffModes[i] = STAFF_MODE_WALK; staff_update_greyed_patrol_areas(); @@ -82,9 +82,9 @@ static inline void staff_autoposition_new_staff_member(rct_peep * newPeep) newPeep->state = PEEP_STATE_FALLING; - sint16 x, y, z; - uint32 count = 0; - uint16 sprite_index; + int16_t x, y, z; + uint32_t count = 0; + uint16_t sprite_index; rct_peep * guest = nullptr; rct_tile_element * guest_tile = nullptr; @@ -103,7 +103,7 @@ static inline void staff_autoposition_new_staff_member(rct_peep * newPeep) if (count > 0) { // Place staff at a random guest - uint32 rand = scenario_rand_max(count); + uint32_t rand = scenario_rand_max(count); FOR_ALL_GUESTS(sprite_index, guest) { if (guest->state == PEEP_STATE_WALKING) @@ -126,7 +126,7 @@ static inline void staff_autoposition_new_staff_member(rct_peep * newPeep) { // No walking guests; pick random park entrance count = 0; - uint8 i; + uint8_t i; for (i = 0; i < MAX_PARK_ENTRANCES; ++i) { if (gParkEntrances[i].x != LOCATION_NULL) @@ -135,7 +135,7 @@ static inline void staff_autoposition_new_staff_member(rct_peep * newPeep) if (count > 0) { - uint32 rand = scenario_rand_max(count); + uint32_t rand = scenario_rand_max(count); for (i = 0; i < MAX_PARK_ENTRANCES; ++i) { if (gParkEntrances[i].x != LOCATION_NULL) @@ -146,7 +146,7 @@ static inline void staff_autoposition_new_staff_member(rct_peep * newPeep) } } - uint8 dir = gParkEntrances[i].direction; + uint8_t dir = gParkEntrances[i].direction; x = gParkEntrances[i].x; y = gParkEntrances[i].y; z = gParkEntrances[i].z; @@ -167,8 +167,8 @@ static inline void staff_autoposition_new_staff_member(rct_peep * newPeep) invalidate_sprite_2((rct_sprite *)newPeep); } -static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 command_x, sint16 command_y, sint16 command_z, - sint32 autoposition, sint32 * newPeep_sprite_index) +static money32 staff_hire_new_staff_member(uint8_t staff_type, uint8_t flags, int16_t command_x, int16_t command_y, int16_t command_z, + int32_t autoposition, int32_t * newPeep_sprite_index) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_WAGES; gCommandPosition.x = command_x; @@ -183,7 +183,7 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 // Staff type matches STAFF_TYPE enum, but ENTERTAINER onwards will match // the ENTERTAINER_COSTUME enum - uint8 entertainerType = ENTERTAINER_COSTUME_PANDA; + uint8_t entertainerType = ENTERTAINER_COSTUME_PANDA; if (staff_type >= STAFF_TYPE_ENTERTAINER) { entertainerType = staff_type - STAFF_TYPE_ENTERTAINER; @@ -193,7 +193,7 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 return MONEY32_UNDEFINED; } - uint32 availableCostumes = staff_get_available_entertainer_costumes(); + uint32_t availableCostumes = staff_get_available_entertainer_costumes(); if (!(availableCostumes & (1 << entertainerType))) { // Entertainer costume unavailable @@ -203,7 +203,7 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 staff_type = STAFF_TYPE_ENTERTAINER; } - sint32 i; + int32_t i; for (i = 0; i < STAFF_MAX_COUNT; ++i) { if (!(gStaffModes[i] & 1)) @@ -218,7 +218,7 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 if (flags & GAME_COMMAND_FLAG_APPLY) { - sint32 newStaffId = i; + int32_t newStaffId = i; const rct_sprite_bounds * spriteBounds; rct_peep * newPeep = &(create_sprite(flags)->peep); @@ -259,11 +259,11 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 else newPeep->staff_orders = 0; - uint16 idSearchSpriteIndex; + uint16_t idSearchSpriteIndex; rct_peep * idSearchPeep; // We search for the first available id for a given staff type - uint32 newStaffIndex = 0; + uint32_t newStaffIndex = 0; for (;;) { bool found = false; @@ -296,14 +296,14 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 }; /* rct2: 0x009929FC */ - static constexpr const uint8 spriteTypes[] = { + static constexpr const uint8_t spriteTypes[] = { PEEP_SPRITE_TYPE_HANDYMAN, PEEP_SPRITE_TYPE_MECHANIC, PEEP_SPRITE_TYPE_SECURITY, PEEP_SPRITE_TYPE_ENTERTAINER_PANDA, }; - uint8 sprite_type = spriteTypes[staff_type]; + uint8_t sprite_type = spriteTypes[staff_type]; if (staff_type == STAFF_TYPE_ENTERTAINER) { sprite_type = PEEP_SPRITE_TYPE_ENTERTAINER_PANDA + entertainerType; @@ -334,7 +334,7 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 newPeep->pathfind_goal.z = 0xFF; newPeep->pathfind_goal.direction = 0xFF; - uint8 colour = staff_get_colour(staff_type); + uint8_t colour = staff_get_colour(staff_type); newPeep->tshirt_colour = colour; newPeep->trousers_colour = colour; @@ -365,7 +365,7 @@ static money32 staff_hire_new_staff_member(uint8 staff_type, uint8 flags, sint16 * rct2: 0x006BEFA1 */ void game_command_hire_new_staff_member( - sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, [[maybe_unused]] sint32* esi, sint32* edi, [[maybe_unused]] sint32* ebp) + int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, [[maybe_unused]] int32_t* esi, int32_t* edi, [[maybe_unused]] int32_t* ebp) { *ebx = staff_hire_new_staff_member((*ebx & 0xFF00) >> 8, *ebx & 0xFF, *eax & 0xFFFF, *ecx & 0xFFFF, *edx & 0xFFFF, (*ebx & 0xFF0000) >> 16, edi); @@ -396,17 +396,17 @@ static constexpr const bool peep_slow_walking_types[] = { * rct2: 0x006C0BB5 */ void game_command_set_staff_order( - [[maybe_unused]] sint32* eax, - sint32* ebx, - [[maybe_unused]] sint32* ecx, - sint32* edx, - [[maybe_unused]] sint32* esi, - [[maybe_unused]] sint32* edi, - [[maybe_unused]] sint32* ebp) + [[maybe_unused]] int32_t* eax, + int32_t* ebx, + [[maybe_unused]] int32_t* ecx, + int32_t* edx, + [[maybe_unused]] int32_t* esi, + [[maybe_unused]] int32_t* edi, + [[maybe_unused]] int32_t* ebp) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_WAGES; - uint8 order_id = *ebx >> 8; - uint16 sprite_id = *edx; + uint8_t order_id = *ebx >> 8; + uint16_t sprite_id = *edx; if (sprite_id >= MAX_SPRITES) { log_warning("Invalid game command, sprite_id = %u", sprite_id); @@ -418,7 +418,7 @@ void game_command_set_staff_order( rct_peep * peep = &get_sprite(sprite_id)->peep; if (order_id & 0x80) { // change costume - uint8 sprite_type = order_id & ~0x80; + uint8_t sprite_type = order_id & ~0x80; sprite_type += 4; if (sprite_type >= Util::CountOf(peep_slow_walking_types)) { @@ -453,19 +453,19 @@ void game_command_set_staff_order( * rct2: 0x006C09D1 */ void game_command_set_staff_patrol( - sint32* eax, - sint32* ebx, - sint32* ecx, - sint32* edx, - [[maybe_unused]] sint32* esi, - [[maybe_unused]] sint32* edi, - [[maybe_unused]] sint32* ebp) + int32_t* eax, + int32_t* ebx, + int32_t* ecx, + int32_t* edx, + [[maybe_unused]] int32_t* esi, + [[maybe_unused]] int32_t* edi, + [[maybe_unused]] int32_t* ebp) { if (*ebx & GAME_COMMAND_FLAG_APPLY) { - sint32 x = *eax; - sint32 y = *ecx; - uint16 sprite_id = *edx; + int32_t x = *eax; + int32_t y = *ecx; + uint16_t sprite_id = *edx; if (sprite_id >= MAX_SPRITES) { *ebx = MONEY32_UNDEFINED; @@ -480,12 +480,12 @@ void game_command_set_staff_patrol( return; } rct_peep * peep = &sprite->peep; - sint32 patrolOffset = peep->staff_id * STAFF_PATROL_AREA_SIZE; + int32_t patrolOffset = peep->staff_id * STAFF_PATROL_AREA_SIZE; staff_toggle_patrol_area(peep->staff_id, x, y); - sint32 ispatrolling = 0; - for (sint32 i = 0; i < 128; i++) + int32_t ispatrolling = 0; + for (int32_t i = 0; i < 128; i++) { ispatrolling |= gStaffPatrolAreas[patrolOffset + i]; } @@ -496,9 +496,9 @@ void game_command_set_staff_patrol( gStaffModes[peep->staff_id] |= 2; } - for (sint32 y2 = 0; y2 < 4; y2++) + for (int32_t y2 = 0; y2 < 4; y2++) { - for (sint32 x2 = 0; x2 < 4; x2++) + for (int32_t x2 = 0; x2 < 4; x2++) { map_invalidate_tile_full((x & 0x1F80) + (x2 * 32), (y & 0x1F80) + (y2 * 32)); } @@ -513,19 +513,19 @@ void game_command_set_staff_patrol( * rct2: 0x006C0B83 */ void game_command_fire_staff_member( - [[maybe_unused]] sint32* eax, - sint32* ebx, - [[maybe_unused]] sint32* ecx, - sint32* edx, - [[maybe_unused]] sint32* esi, - [[maybe_unused]] sint32* edi, - [[maybe_unused]] sint32* ebp) + [[maybe_unused]] int32_t* eax, + int32_t* ebx, + [[maybe_unused]] int32_t* ecx, + int32_t* edx, + [[maybe_unused]] int32_t* esi, + [[maybe_unused]] int32_t* edi, + [[maybe_unused]] int32_t* ebp) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_WAGES; if (*ebx & GAME_COMMAND_FLAG_APPLY) { window_close_by_class(WC_FIRE_PROMPT); - uint16 sprite_id = *edx; + uint16_t sprite_id = *edx; if (sprite_id >= MAX_SPRITES) { log_warning("Invalid game command, sprite_id = %u", sprite_id); @@ -549,15 +549,15 @@ void game_command_fire_staff_member( * Hires a new staff member of the given type. If the hire cannot be completed (eg. the maximum number of staff is reached or * there are too many peeps) it returns SPRITE_INDEX_NULL. */ -uint16 hire_new_staff_member(uint8 staffType) +uint16_t hire_new_staff_member(uint8_t staffType) { gGameCommandErrorTitle = STR_CANT_HIRE_NEW_STAFF; - sint32 command_x, ebx, command_y, command_z, esi, new_sprite_index, ebp; + int32_t command_x, ebx, command_y, command_z, esi, new_sprite_index, ebp; command_y = command_z = esi = new_sprite_index = ebp = 0; command_x = 0x8000; - sint32 autoposition = gConfigGeneral.auto_staff_placement; + int32_t autoposition = gConfigGeneral.auto_staff_placement; if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z) { autoposition = autoposition ^ 1; @@ -566,7 +566,7 @@ uint16 hire_new_staff_member(uint8 staffType) ebx = autoposition << 16 | staffType << 8 | GAME_COMMAND_FLAG_APPLY; game_command_callback = game_command_callback_hire_new_staff_member; - sint32 result = game_do_command_p(GAME_COMMAND_HIRE_NEW_STAFF_MEMBER, &command_x, &ebx, &command_y, &command_z, &esi, + int32_t result = game_do_command_p(GAME_COMMAND_HIRE_NEW_STAFF_MEMBER, &command_x, &ebx, &command_y, &command_z, &esi, &new_sprite_index, &ebp); if (result == MONEY32_UNDEFINED) @@ -575,8 +575,8 @@ uint16 hire_new_staff_member(uint8 staffType) if ((staffType == STAFF_TYPE_HANDYMAN) && gConfigGeneral.handymen_mow_default) { rct_peep * newPeep = GET_PEEP(new_sprite_index); - uint8 new_orders = newPeep->staff_orders | STAFF_ORDERS_MOWING; - game_do_command(newPeep->x, ((sint32)new_orders << 8) | GAME_COMMAND_FLAG_APPLY, newPeep->y, new_sprite_index, + uint8_t new_orders = newPeep->staff_orders | STAFF_ORDERS_MOWING; + game_do_command(newPeep->x, ((int32_t)new_orders << 8) | GAME_COMMAND_FLAG_APPLY, newPeep->y, new_sprite_index, GAME_COMMAND_SET_STAFF_ORDER, 0, 0); } @@ -591,23 +591,23 @@ void staff_update_greyed_patrol_areas() { rct_peep * peep; - for (sint32 staff_type = 0; staff_type < STAFF_TYPE_COUNT; ++staff_type) + for (int32_t staff_type = 0; staff_type < STAFF_TYPE_COUNT; ++staff_type) { - sint32 staffPatrolOffset = (staff_type + STAFF_MAX_COUNT) * STAFF_PATROL_AREA_SIZE; - for (sint32 i = 0; i < STAFF_PATROL_AREA_SIZE; i++) + int32_t staffPatrolOffset = (staff_type + STAFF_MAX_COUNT) * STAFF_PATROL_AREA_SIZE; + for (int32_t i = 0; i < STAFF_PATROL_AREA_SIZE; i++) { gStaffPatrolAreas[staffPatrolOffset + i] = 0; } - for (uint16 sprite_index = gSpriteListHead[SPRITE_LIST_PEEP]; sprite_index != SPRITE_INDEX_NULL; + for (uint16_t sprite_index = gSpriteListHead[SPRITE_LIST_PEEP]; sprite_index != SPRITE_INDEX_NULL; sprite_index = peep->next) { peep = GET_PEEP(sprite_index); if (peep->type == PEEP_TYPE_STAFF && staff_type == peep->staff_type) { - sint32 peepPatrolOffset = peep->staff_id * STAFF_PATROL_AREA_SIZE; - for (sint32 i = 0; i < STAFF_PATROL_AREA_SIZE; i++) + int32_t peepPatrolOffset = peep->staff_id * STAFF_PATROL_AREA_SIZE; + for (int32_t i = 0; i < STAFF_PATROL_AREA_SIZE; i++) { gStaffPatrolAreas[staffPatrolOffset + i] |= gStaffPatrolAreas[peepPatrolOffset + i]; } @@ -616,7 +616,7 @@ void staff_update_greyed_patrol_areas() } } -static bool staff_is_location_in_patrol_area(rct_peep * peep, sint32 x, sint32 y) +static bool staff_is_location_in_patrol_area(rct_peep * peep, int32_t x, int32_t y) { // Patrol quads are stored in a bit map (8 patrol quads per byte) // Each patrol quad is 4x4 @@ -628,7 +628,7 @@ static bool staff_is_location_in_patrol_area(rct_peep * peep, sint32 x, sint32 y * * rct2: 0x006C0905 */ -bool staff_is_location_in_patrol(rct_peep * staff, sint32 x, sint32 y) +bool staff_is_location_in_patrol(rct_peep * staff, int32_t x, int32_t y) { // Check if location is in the park if (!map_is_location_owned_or_has_rights(x, y)) @@ -641,23 +641,23 @@ bool staff_is_location_in_patrol(rct_peep * staff, sint32 x, sint32 y) return staff_is_location_in_patrol_area(staff, x, y); } -bool staff_is_location_on_patrol_edge(rct_peep * mechanic, sint32 x, sint32 y) +bool staff_is_location_on_patrol_edge(rct_peep * mechanic, int32_t x, int32_t y) { // Check whether the location x,y is inside and on the edge of the // patrol zone for mechanic. bool onZoneEdge = false; - sint32 neighbourDir = 0; + int32_t neighbourDir = 0; while (!onZoneEdge && neighbourDir <= 7) { - sint32 neighbourX = x + CoordsDirectionDelta[neighbourDir].x; - sint32 neighbourY = y + CoordsDirectionDelta[neighbourDir].y; + int32_t neighbourX = x + CoordsDirectionDelta[neighbourDir].x; + int32_t neighbourY = y + CoordsDirectionDelta[neighbourDir].y; onZoneEdge = !staff_is_location_in_patrol(mechanic, neighbourX, neighbourY); neighbourDir++; } return onZoneEdge; } -bool staff_can_ignore_wide_flag(rct_peep * staff, sint32 x, sint32 y, uint8 z, rct_tile_element * path) +bool staff_can_ignore_wide_flag(rct_peep * staff, int32_t x, int32_t y, uint8_t z, rct_tile_element * path) { /* Wide flags can potentially wall off parts of a staff patrol zone * for the heuristic search. @@ -690,14 +690,14 @@ bool staff_can_ignore_wide_flag(rct_peep * staff, sint32 x, sint32 y, uint8 z, r /* Check the connected adjacent paths that are also inside the patrol * zone but are not on the patrol zone edge have the wide flag set. */ - uint8 total = 0; - uint8 pathcount = 0; - uint8 widecount = 0; - for (sint32 adjac_dir = 0; adjac_dir <= 3; adjac_dir++) + uint8_t total = 0; + uint8_t pathcount = 0; + uint8_t widecount = 0; + for (int32_t adjac_dir = 0; adjac_dir <= 3; adjac_dir++) { - sint32 adjac_x = x + CoordsDirectionDelta[adjac_dir].x; - sint32 adjac_y = y + CoordsDirectionDelta[adjac_dir].y; - uint8 adjac_z = z; + int32_t adjac_x = x + CoordsDirectionDelta[adjac_dir].x; + int32_t adjac_y = y + CoordsDirectionDelta[adjac_dir].y; + uint8_t adjac_z = z; /* Ignore adjacent tiles outside the patrol zone. */ if (!staff_is_location_in_patrol(staff, adjac_x, adjac_y)) @@ -778,9 +778,9 @@ bool staff_can_ignore_wide_flag(rct_peep * staff, sint32 x, sint32 y, uint8 z, r * rct2: 0x006C095B * returns 0xF if not in a valid patrol area */ -static uint8 staff_get_valid_patrol_directions(rct_peep * peep, sint16 x, sint16 y) +static uint8_t staff_get_valid_patrol_directions(rct_peep * peep, int16_t x, int16_t y) { - uint8 directions = 0; + uint8_t directions = 0; if (staff_is_location_in_patrol(peep, x - 32, y)) { @@ -816,7 +816,7 @@ static uint8 staff_get_valid_patrol_directions(rct_peep * peep, sint16 x, sint16 */ void staff_reset_stats() { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * peep; FOR_ALL_STAFF(spriteIndex, peep) @@ -831,26 +831,26 @@ void staff_reset_stats() } } -bool staff_is_patrol_area_set(sint32 staffIndex, sint32 x, sint32 y) +bool staff_is_patrol_area_set(int32_t staffIndex, int32_t x, int32_t y) { x = (x & 0x1F80) >> 7; y = (y & 0x1F80) >> 1; - sint32 peepOffset = staffIndex * STAFF_PATROL_AREA_SIZE; - sint32 offset = (x | y) >> 5; - sint32 bitIndex = (x | y) & 0x1F; - return gStaffPatrolAreas[peepOffset + offset] & (((uint32)1) << bitIndex); + int32_t peepOffset = staffIndex * STAFF_PATROL_AREA_SIZE; + int32_t offset = (x | y) >> 5; + int32_t bitIndex = (x | y) & 0x1F; + return gStaffPatrolAreas[peepOffset + offset] & (((uint32_t)1) << bitIndex); } -void staff_set_patrol_area(sint32 staffIndex, sint32 x, sint32 y, bool value) +void staff_set_patrol_area(int32_t staffIndex, int32_t x, int32_t y, bool value) { x = (x & 0x1F80) >> 7; y = (y & 0x1F80) >> 1; - sint32 peepOffset = staffIndex * STAFF_PATROL_AREA_SIZE; - sint32 offset = (x | y) >> 5; - sint32 bitIndex = (x | y) & 0x1F; - uint32 * addr = &gStaffPatrolAreas[peepOffset + offset]; + int32_t peepOffset = staffIndex * STAFF_PATROL_AREA_SIZE; + int32_t offset = (x | y) >> 5; + int32_t bitIndex = (x | y) & 0x1F; + uint32_t * addr = &gStaffPatrolAreas[peepOffset + offset]; if (value) { *addr |= (1 << bitIndex); @@ -861,14 +861,14 @@ void staff_set_patrol_area(sint32 staffIndex, sint32 x, sint32 y, bool value) } } -void staff_toggle_patrol_area(sint32 staffIndex, sint32 x, sint32 y) +void staff_toggle_patrol_area(int32_t staffIndex, int32_t x, int32_t y) { x = (x & 0x1F80) >> 7; y = (y & 0x1F80) >> 1; - sint32 peepOffset = staffIndex * STAFF_PATROL_AREA_SIZE; - sint32 offset = (x | y) >> 5; - sint32 bitIndex = (x | y) & 0x1F; + int32_t peepOffset = staffIndex * STAFF_PATROL_AREA_SIZE; + int32_t offset = (x | y) >> 5; + int32_t bitIndex = (x | y) & 0x1F; gStaffPatrolAreas[peepOffset + offset] ^= (1 << bitIndex); } @@ -878,17 +878,17 @@ void staff_toggle_patrol_area(sint32 staffIndex, sint32 x, sint32 y) * * Returns 0xFF when no nearby litter or unpathable litter */ -static uint8 staff_handyman_direction_to_nearest_litter(rct_peep * peep) +static uint8_t staff_handyman_direction_to_nearest_litter(rct_peep * peep) { - uint16 nearestLitterDist = (uint16)-1; + uint16_t nearestLitterDist = (uint16_t)-1; rct_litter * nearestLitter = nullptr; rct_litter * litter = nullptr; - for (uint16 litterIndex = gSpriteListHead[SPRITE_LIST_LITTER]; litterIndex != 0xFFFF; litterIndex = litter->next) + for (uint16_t litterIndex = gSpriteListHead[SPRITE_LIST_LITTER]; litterIndex != 0xFFFF; litterIndex = litter->next) { litter = &get_sprite(litterIndex)->litter; - uint16 distance = abs(litter->x - peep->x) + abs(litter->y - peep->y) + abs(litter->z - peep->z) * 4; + uint16_t distance = abs(litter->x - peep->x) + abs(litter->y - peep->y) + abs(litter->z - peep->z) * 4; if (distance < nearestLitterDist) { @@ -902,7 +902,7 @@ static uint8 staff_handyman_direction_to_nearest_litter(rct_peep * peep) return 0xFF; } - LocationXY16 litterTile = { static_cast(nearestLitter->x & 0xFFE0), static_cast(nearestLitter->y & 0xFFE0) }; + LocationXY16 litterTile = { static_cast(nearestLitter->x & 0xFFE0), static_cast(nearestLitter->y & 0xFFE0) }; if (!staff_is_location_in_patrol(peep, litterTile.x, litterTile.y)) { @@ -912,10 +912,10 @@ static uint8 staff_handyman_direction_to_nearest_litter(rct_peep * peep) litterTile.x += 16; litterTile.y += 16; - sint16 x_diff = litterTile.x - peep->x; - sint16 y_diff = litterTile.y - peep->y; + int16_t x_diff = litterTile.x - peep->x; + int16_t y_diff = litterTile.y - peep->y; - uint8 nextDirection = 0; + uint8_t nextDirection = 0; if (abs(x_diff) <= abs(y_diff)) { @@ -926,10 +926,10 @@ static uint8 staff_handyman_direction_to_nearest_litter(rct_peep * peep) nextDirection = x_diff < 0 ? 0 : 2; } - CoordsXY nextTile = { static_cast((nearestLitter->x & 0xFFE0) - CoordsDirectionDelta[nextDirection].x), - static_cast((nearestLitter->y & 0xFFE0) - CoordsDirectionDelta[nextDirection].y) }; + CoordsXY nextTile = { static_cast((nearestLitter->x & 0xFFE0) - CoordsDirectionDelta[nextDirection].x), + static_cast((nearestLitter->y & 0xFFE0) - CoordsDirectionDelta[nextDirection].y) }; - sint16 nextZ = ((peep->z + 8) & 0xFFF0) / 8; + int16_t nextZ = ((peep->z + 8) & 0xFFF0) / 8; rct_tile_element * tileElement = map_get_first_element_at(nextTile.x / 32, nextTile.y / 32); @@ -968,7 +968,7 @@ static uint8 staff_handyman_direction_to_nearest_litter(rct_peep * peep) * * rct2: 0x006BF931 */ -static uint8 staff_handyman_direction_to_uncut_grass(rct_peep * peep, uint8 valid_directions) +static uint8_t staff_handyman_direction_to_uncut_grass(rct_peep * peep, uint8_t valid_directions) { if (!(peep->GetNextIsSurface())) { @@ -987,8 +987,8 @@ static uint8 staff_handyman_direction_to_uncut_grass(rct_peep * peep, uint8 vali return 0xFF; } - uint8 chosenDirection = scenario_rand() & 0x3; - for (uint8 i = 0; i < 4; ++i, ++chosenDirection) + uint8_t chosenDirection = scenario_rand() & 0x3; + for (uint8_t i = 0; i < 4; ++i, ++chosenDirection) { chosenDirection &= 0x3; @@ -997,8 +997,8 @@ static uint8 staff_handyman_direction_to_uncut_grass(rct_peep * peep, uint8 vali continue; } - CoordsXY chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[chosenDirection].x), - static_cast(peep->next_y + CoordsDirectionDelta[chosenDirection].y) }; + CoordsXY chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[chosenDirection].x), + static_cast(peep->next_y + CoordsDirectionDelta[chosenDirection].y) }; if (chosenTile.x > 0x1FFF || chosenTile.y > 0x1FFF) continue; @@ -1023,17 +1023,17 @@ static uint8 staff_handyman_direction_to_uncut_grass(rct_peep * peep, uint8 vali * * rct2: 0x006BFD9C */ -static sint32 staff_handyman_direction_rand_surface(rct_peep * peep, uint8 validDirections) +static int32_t staff_handyman_direction_rand_surface(rct_peep * peep, uint8_t validDirections) { - uint8 direction = scenario_rand() & 3; - for (sint32 i = 0; i < 4; ++i, ++direction) + uint8_t direction = scenario_rand() & 3; + for (int32_t i = 0; i < 4; ++i, ++direction) { direction &= 3; if (!(validDirections & (1 << direction))) continue; - LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), - static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; + LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), + static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; if (map_surface_is_blocked(chosenTile.x, chosenTile.y)) continue; @@ -1055,15 +1055,15 @@ static bool staff_path_finding_handyman(rct_peep * peep) { peep->staff_mowing_timeout++; - uint8 litterDirection = 0xFF; - uint8 validDirections = staff_get_valid_patrol_directions(peep, peep->next_x, peep->next_y); + uint8_t litterDirection = 0xFF; + uint8_t validDirections = staff_get_valid_patrol_directions(peep, peep->next_x, peep->next_y); if ((peep->staff_orders & STAFF_ORDERS_SWEEPING) && ((gCurrentTicks + peep->sprite_index) & 0xFFF) > 110) { litterDirection = staff_handyman_direction_to_nearest_litter(peep); } - uint8 direction = 0xFF; + uint8_t direction = 0xFF; if (litterDirection == 0xFF && (peep->staff_orders & STAFF_ORDERS_MOWING) && peep->staff_mowing_timeout >= 12) { direction = staff_handyman_direction_to_uncut_grass(peep, validDirections); @@ -1082,7 +1082,7 @@ static bool staff_path_finding_handyman(rct_peep * peep) if (tileElement == nullptr) return true; - uint8 pathDirections = (tileElement->properties.path.edges & validDirections) & 0xF; + uint8_t pathDirections = (tileElement->properties.path.edges & validDirections) & 0xF; if (pathDirections == 0) { direction = staff_handyman_direction_rand_surface(peep, validDirections); @@ -1121,8 +1121,8 @@ static bool staff_path_finding_handyman(rct_peep * peep) // countof(CoordsDirectionDelta) assert(direction < 8); - LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), - static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; + LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), + static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; while (chosenTile.x > 0x1FFF || chosenTile.y > 0x1FFF) { @@ -1142,10 +1142,10 @@ static bool staff_path_finding_handyman(rct_peep * peep) return false; } -static uint8 staff_direction_surface(rct_peep * peep, uint8 initialDirection) +static uint8_t staff_direction_surface(rct_peep * peep, uint8_t initialDirection) { - uint8 direction = initialDirection; - for (sint32 i = 0; i < 3; ++i) + uint8_t direction = initialDirection; + for (int32_t i = 0; i < 3; ++i) { // Looks left and right from initial direction switch (i) @@ -1170,8 +1170,8 @@ static uint8 staff_direction_surface(rct_peep * peep, uint8 initialDirection) if (fence_in_the_way(peep->next_x, peep->next_y, peep->next_z, peep->next_z + 4, direction ^ (1 << 1)) == true) continue; - LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), - static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; + LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), + static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; if (map_surface_is_blocked(chosenTile.x, chosenTile.y) == false) { @@ -1185,9 +1185,9 @@ static uint8 staff_direction_surface(rct_peep * peep, uint8 initialDirection) * * rct2: 0x006BFF45 */ -static uint8 staff_mechanic_direction_surface(rct_peep * peep) +static uint8_t staff_mechanic_direction_surface(rct_peep * peep) { - uint8 direction = scenario_rand() & 3; + uint8_t direction = scenario_rand() & 3; if ((peep->state == PEEP_STATE_ANSWERING || peep->state == PEEP_STATE_HEADING_TO_INSPECTION) && scenario_rand() & 1) { @@ -1197,10 +1197,10 @@ static uint8 staff_mechanic_direction_surface(rct_peep * peep) location = ride_get_entrance_location(peep->current_ride, peep->current_ride_station); } - LocationXY16 chosenTile = { static_cast(location.x * 32), static_cast(location.y * 32) }; + LocationXY16 chosenTile = { static_cast(location.x * 32), static_cast(location.y * 32) }; - sint16 x_diff = chosenTile.x - peep->x; - sint16 y_diff = chosenTile.y - peep->y; + int16_t x_diff = chosenTile.x - peep->x; + int16_t y_diff = chosenTile.y - peep->y; if (abs(x_diff) <= abs(y_diff)) { @@ -1219,7 +1219,7 @@ static uint8 staff_mechanic_direction_surface(rct_peep * peep) * * rct2: 0x006C02D1 */ -static uint8 staff_mechanic_direction_path_rand(rct_peep * peep, uint8 pathDirections) +static uint8_t staff_mechanic_direction_path_rand(rct_peep * peep, uint8_t pathDirections) { if (scenario_rand() & 1) { @@ -1228,8 +1228,8 @@ static uint8 staff_mechanic_direction_path_rand(rct_peep * peep, uint8 pathDirec } // Modified from original to spam scenario_rand less - uint8 direction = scenario_rand() & 3; - for (sint32 i = 0; i < 4; ++i, ++direction) + uint8_t direction = scenario_rand() & 3; + for (int32_t i = 0; i < 4; ++i, ++direction) { direction &= 3; if (pathDirections & (1 << direction)) @@ -1243,11 +1243,11 @@ static uint8 staff_mechanic_direction_path_rand(rct_peep * peep, uint8 pathDirec * * rct2: 0x006C0121 */ -static uint8 staff_mechanic_direction_path(rct_peep * peep, uint8 validDirections, rct_tile_element * pathElement) +static uint8_t staff_mechanic_direction_path(rct_peep * peep, uint8_t validDirections, rct_tile_element * pathElement) { - uint8 direction = 0xFF; - uint8 pathDirections = pathElement->properties.path.edges & 0xF; + uint8_t direction = 0xFF; + uint8_t pathDirections = pathElement->properties.path.edges & 0xF; pathDirections &= validDirections; if (pathDirections == 0) @@ -1308,7 +1308,7 @@ static uint8 staff_mechanic_direction_path(rct_peep * peep, uint8 validDirection pathfind_logging_enable(peep); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - sint32 pathfindDirection = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); + int32_t pathfindDirection = peep_pathfind_choose_direction({ peep->next_x / 32, peep->next_y / 32, peep->next_z }, peep); #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 pathfind_logging_disable(); @@ -1326,7 +1326,7 @@ static uint8 staff_mechanic_direction_path(rct_peep * peep, uint8 validDirection return staff_mechanic_direction_path_rand(peep, pathDirections); } - return (uint8)pathfindDirection; + return (uint8_t)pathfindDirection; } return staff_mechanic_direction_path_rand(peep, pathDirections); } @@ -1337,8 +1337,8 @@ static uint8 staff_mechanic_direction_path(rct_peep * peep, uint8 validDirection */ static bool staff_path_finding_mechanic(rct_peep * peep) { - uint8 validDirections = staff_get_valid_patrol_directions(peep, peep->next_x, peep->next_y); - uint8 direction = 0xFF; + uint8_t validDirections = staff_get_valid_patrol_directions(peep, peep->next_x, peep->next_y); + uint8_t direction = 0xFF; if (peep->GetNextIsSurface()) { direction = staff_mechanic_direction_surface(peep); @@ -1355,8 +1355,8 @@ static bool staff_path_finding_mechanic(rct_peep * peep) // countof(CoordsDirectionDelta) assert(direction < 8); - LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), - static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; + LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), + static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; while (chosenTile.x > 0x1FFF || chosenTile.y > 0x1FFF) { @@ -1377,10 +1377,10 @@ static bool staff_path_finding_mechanic(rct_peep * peep) * * rct2: 0x006C050B */ -static uint8 staff_direction_path(rct_peep * peep, uint8 validDirections, rct_tile_element * pathElement) +static uint8_t staff_direction_path(rct_peep * peep, uint8_t validDirections, rct_tile_element * pathElement) { - uint8 direction = 0xFF; - uint8 pathDirections = pathElement->properties.path.edges & 0xF; + uint8_t direction = 0xFF; + uint8_t pathDirections = pathElement->properties.path.edges & 0xF; if (peep->state != PEEP_STATE_ANSWERING && peep->state != PEEP_STATE_HEADING_TO_INSPECTION) { pathDirections &= validDirections; @@ -1407,7 +1407,7 @@ static uint8 staff_direction_path(rct_peep * peep, uint8 validDirections, rct_ti pathDirections |= (1 << direction); direction = scenario_rand() & 3; - for (sint32 i = 0; i < 4; ++i, ++direction) + for (int32_t i = 0; i < 4; ++i, ++direction) { direction &= 3; if (pathDirections & (1 << direction)) @@ -1424,9 +1424,9 @@ static uint8 staff_direction_path(rct_peep * peep, uint8 validDirections, rct_ti */ static bool staff_path_finding_misc(rct_peep * peep) { - uint8 validDirections = staff_get_valid_patrol_directions(peep, peep->next_x, peep->next_y); + uint8_t validDirections = staff_get_valid_patrol_directions(peep, peep->next_x, peep->next_y); - uint8 direction = 0xFF; + uint8_t direction = 0xFF; if (peep->GetNextIsSurface()) { direction = staff_direction_surface(peep, scenario_rand() & 3); @@ -1440,8 +1440,8 @@ static bool staff_path_finding_misc(rct_peep * peep) direction = staff_direction_path(peep, validDirections, pathElement); } - LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), - static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; + LocationXY16 chosenTile = { static_cast(peep->next_x + CoordsDirectionDelta[direction].x), + static_cast(peep->next_y + CoordsDirectionDelta[direction].y) }; while (chosenTile.x > 0x1FFF || chosenTile.y > 0x1FFF) { @@ -1464,7 +1464,7 @@ static bool staff_path_finding_misc(rct_peep * peep) */ static void staff_entertainer_update_nearby_peeps(rct_peep * peep) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep * guest; FOR_ALL_GUESTS(spriteIndex, guest) @@ -1472,12 +1472,12 @@ static void staff_entertainer_update_nearby_peeps(rct_peep * peep) if (guest->x == LOCATION_NULL) continue; - sint16 z_dist = abs(peep->z - guest->z); + int16_t z_dist = abs(peep->z - guest->z); if (z_dist > 48) continue; - sint16 x_dist = abs(peep->x - guest->x); - sint16 y_dist = abs(peep->y - guest->y); + int16_t x_dist = abs(peep->x - guest->x); + int16_t y_dist = abs(peep->y - guest->y); if (x_dist > 96) continue; @@ -1508,7 +1508,7 @@ static void staff_entertainer_update_nearby_peeps(rct_peep * peep) * * rct2: 0x006C05AE */ -static sint32 staff_path_finding_entertainer(rct_peep * peep) +static int32_t staff_path_finding_entertainer(rct_peep * peep) { if (((scenario_rand() & 0xFFFF) <= 0x4000) && (peep->action == PEEP_ACTION_NONE_1 || peep->action == PEEP_ACTION_NONE_2)) @@ -1532,7 +1532,7 @@ static sint32 staff_path_finding_entertainer(rct_peep * peep) * * rct2: 0x006BF926 */ -sint32 staff_path_finding(rct_peep * peep) +int32_t staff_path_finding(rct_peep * peep) { switch (peep->staff_type) { @@ -1552,13 +1552,13 @@ sint32 staff_path_finding(rct_peep * peep) } void game_command_pickup_staff( - sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, [[maybe_unused]] sint32* esi, sint32* edi, sint32* ebp) + int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, [[maybe_unused]] int32_t* esi, int32_t* edi, int32_t* ebp) { - sint32 peepnum = *eax; - sint32 x = *edi; - sint32 y = *ebp; - sint32 z = *edx; - sint32 action = *ecx; + int32_t peepnum = *eax; + int32_t x = *edi; + int32_t y = *ebp; + int32_t z = *edx; + int32_t action = *ecx; if (peep_pickup_command(peepnum, x, y, z, action, *ebx & GAME_COMMAND_FLAG_APPLY)) { *ebx = 0; @@ -1569,7 +1569,7 @@ void game_command_pickup_staff( } } -colour_t staff_get_colour(uint8 staffType) +colour_t staff_get_colour(uint8_t staffType) { switch (staffType) { @@ -1587,7 +1587,7 @@ colour_t staff_get_colour(uint8 staffType) } } -bool staff_set_colour(uint8 staffType, colour_t value) +bool staff_set_colour(uint8_t staffType, colour_t value) { switch (staffType) { @@ -1606,10 +1606,10 @@ bool staff_set_colour(uint8 staffType, colour_t value) return true; } -uint32 staff_get_available_entertainer_costumes() +uint32_t staff_get_available_entertainer_costumes() { - uint32 entertainerCostumes = 0; - for (sint32 i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) + uint32_t entertainerCostumes = 0; + for (int32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { if (scenery_group_is_invented(i)) { @@ -1627,11 +1627,11 @@ uint32 staff_get_available_entertainer_costumes() return entertainerCostumes; } -sint32 staff_get_available_entertainer_costume_list(uint8 * costumeList) +int32_t staff_get_available_entertainer_costume_list(uint8_t * costumeList) { - uint32 availableCostumes = staff_get_available_entertainer_costumes(); - sint32 numCostumes = 0; - for (uint8 i = 0; i < ENTERTAINER_COSTUME_COUNT; i++) + uint32_t availableCostumes = staff_get_available_entertainer_costumes(); + int32_t numCostumes = 0; + for (uint8_t i = 0; i < ENTERTAINER_COSTUME_COUNT; i++) { if (availableCostumes & (1 << i)) { @@ -1658,12 +1658,12 @@ void rct_peep::UpdateMowing() Invalidate(); while (true) { - sint16 actionX = 0; - sint16 actionY = 0; - sint16 xy_distance; + int16_t actionX = 0; + int16_t actionY = 0; + int16_t xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { - sint16 checkZ = tile_element_height(actionX, actionY) & 0xFFFF; + int16_t checkZ = tile_element_height(actionX, actionY) & 0xFFFF; MoveTo(actionX, actionY, checkZ); Invalidate(); return; @@ -1716,7 +1716,7 @@ void rct_peep::UpdateWatering() if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -1734,13 +1734,13 @@ void rct_peep::UpdateWatering() { if (action != PEEP_ACTION_NONE_2) { - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); return; } - sint32 actionX = next_x + CoordsDirectionDelta[var_37].x; - sint32 actionY = next_y + CoordsDirectionDelta[var_37].y; + int32_t actionX = next_x + CoordsDirectionDelta[var_37].x; + int32_t actionY = next_y + CoordsDirectionDelta[var_37].y; rct_tile_element * tile_element = map_get_first_element_at(actionX / 32, actionY / 32); @@ -1749,7 +1749,7 @@ void rct_peep::UpdateWatering() if (tile_element->GetType() != TILE_ELEMENT_TYPE_SMALL_SCENERY) continue; - if (abs(((sint32)next_z) - tile_element->base_height) > 4) + if (abs(((int32_t)next_z) - tile_element->base_height) > 4) continue; rct_scenery_entry * scenery_entry = get_small_scenery_entry(tile_element->properties.scenery.type); @@ -1779,7 +1779,7 @@ void rct_peep::UpdateEmptyingBin() { if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -1802,9 +1802,9 @@ void rct_peep::UpdateEmptyingBin() return; } - sint16 actionX = 0; - sint16 actionY = 0; - sint16 xy_distance; + int16_t actionX = 0; + int16_t actionY = 0; + int16_t xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); if (action_frame != 11) @@ -1868,12 +1868,12 @@ void rct_peep::UpdateSweeping() staff_litter_swept++; window_invalidate_flags |= PEEP_INVALIDATE_STAFF_STATS; } - sint16 actionX = 0; - sint16 actionY = 0; - sint16 xy_distance; + int16_t actionX = 0; + int16_t actionY = 0; + int16_t xy_distance; if (UpdateAction(&actionX, &actionY, &xy_distance)) { - sint16 actionZ = GetZOnSlope(actionX, actionY); + int16_t actionZ = GetZOnSlope(actionX, actionY); MoveTo(actionX, actionY, actionZ); Invalidate(); return; @@ -1942,7 +1942,7 @@ void rct_peep::UpdateHeadingToInspect() if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; rct_tile_element * rideEntranceExitElement; PerformNextAction(pathingResult, rideEntranceExitElement); @@ -1954,7 +1954,7 @@ void rct_peep::UpdateHeadingToInspect() if (current_ride != rideEntranceExitElement->properties.entrance.ride_index) return; - uint8 exit_index = ((rideEntranceExitElement->properties.entrance.index & 0x70) >> 4); + uint8_t exit_index = ((rideEntranceExitElement->properties.entrance.index & 0x70) >> 4); if (current_ride_station != exit_index) return; @@ -1969,8 +1969,8 @@ void rct_peep::UpdateHeadingToInspect() direction = tile_element_get_direction(rideEntranceExitElement); - sint32 destX = next_x + 16 + word_981D6C[direction].x * 53; - sint32 destY = next_y + 16 + word_981D6C[direction].y * 53; + int32_t destX = next_x + 16 + word_981D6C[direction].x * 53; + int32_t destY = next_y + 16 + word_981D6C[direction].y * 53; destination_x = destX; destination_y = destY; @@ -1984,9 +1984,9 @@ void rct_peep::UpdateHeadingToInspect() Invalidate(); - sint16 delta_y = abs(y - destination_y); + int16_t delta_y = abs(y - destination_y); - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (!UpdateAction(&actionX, &actionY, &xy_distance)) { SetState(PEEP_STATE_INSPECTING); @@ -1994,7 +1994,7 @@ void rct_peep::UpdateHeadingToInspect() return; } - sint32 newZ = ride->station_heights[current_ride_station] * 8; + int32_t newZ = ride->station_heights[current_ride_station] * 8; if (delta_y < 20) { @@ -2043,7 +2043,7 @@ void rct_peep::UpdateAnswering() peep_reset_pathfind_goal(this); return; } - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; UpdateAction(&actionX, &actionY, &xy_distance); return; } @@ -2061,7 +2061,7 @@ void rct_peep::UpdateAnswering() if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; rct_tile_element * rideEntranceExitElement; PerformNextAction(pathingResult, rideEntranceExitElement); @@ -2073,7 +2073,7 @@ void rct_peep::UpdateAnswering() if (current_ride != rideEntranceExitElement->properties.entrance.ride_index) return; - uint8 exit_index = ((rideEntranceExitElement->properties.entrance.index & 0x70) >> 4); + uint8_t exit_index = ((rideEntranceExitElement->properties.entrance.index & 0x70) >> 4); if (current_ride_station != exit_index) return; @@ -2088,8 +2088,8 @@ void rct_peep::UpdateAnswering() direction = tile_element_get_direction(rideEntranceExitElement); - sint32 destX = next_x + 16 + word_981D6C[direction].x * 53; - sint32 destY = next_y + 16 + word_981D6C[direction].y * 53; + int32_t destX = next_x + 16 + word_981D6C[direction].x * 53; + int32_t destY = next_y + 16 + word_981D6C[direction].y * 53; destination_x = destX; destination_y = destY; @@ -2103,9 +2103,9 @@ void rct_peep::UpdateAnswering() Invalidate(); - sint16 delta_y = abs(y - destination_y); + int16_t delta_y = abs(y - destination_y); - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (!UpdateAction(&actionX, &actionY, &xy_distance)) { SetState(PEEP_STATE_FIXING); @@ -2113,7 +2113,7 @@ void rct_peep::UpdateAnswering() return; } - sint32 newZ = ride->station_heights[current_ride_station] * 8; + int32_t newZ = ride->station_heights[current_ride_station] * 8; if (delta_y < 20) { @@ -2133,18 +2133,18 @@ static constexpr const LocationXY16 _WateringUseOffsets[] = { * * rct2: 0x006BF483 */ -static sint32 peep_update_patrolling_find_watering(rct_peep * peep) +static int32_t peep_update_patrolling_find_watering(rct_peep * peep) { if (!(peep->staff_orders & STAFF_ORDERS_WATER_FLOWERS)) return 0; - uint8 chosen_position = scenario_rand() & 7; - for (sint32 i = 0; i < 8; ++i, ++chosen_position) + uint8_t chosen_position = scenario_rand() & 7; + for (int32_t i = 0; i < 8; ++i, ++chosen_position) { chosen_position &= 7; - sint32 x = peep->next_x + CoordsDirectionDelta[chosen_position].x; - sint32 y = peep->next_y + CoordsDirectionDelta[chosen_position].y; + int32_t x = peep->next_x + CoordsDirectionDelta[chosen_position].x; + int32_t y = peep->next_y + CoordsDirectionDelta[chosen_position].y; rct_tile_element * tile_element = map_get_first_element_at(x / 32, y / 32); @@ -2161,7 +2161,7 @@ static sint32 peep_update_patrolling_find_watering(rct_peep * peep) continue; } - uint8 z_diff = abs(peep->next_z - tile_element->base_height); + uint8_t z_diff = abs(peep->next_z - tile_element->base_height); if (z_diff >= 4) { @@ -2206,7 +2206,7 @@ static sint32 peep_update_patrolling_find_watering(rct_peep * peep) * * rct2: 0x006BF3A1 */ -static sint32 peep_update_patrolling_find_bin(rct_peep * peep) +static int32_t peep_update_patrolling_find_bin(rct_peep * peep) { if (!(peep->staff_orders & STAFF_ORDERS_EMPTY_BINS)) return 0; @@ -2241,9 +2241,9 @@ static sint32 peep_update_patrolling_find_bin(rct_peep * peep) if (footpath_element_path_scenery_is_ghost(tileElement)) return 0; - uint8 bin_positions = tileElement->properties.path.edges & 0xF; - uint8 bin_quantity = tileElement->properties.path.addition_status; - uint8 chosen_position = 0; + uint8_t bin_positions = tileElement->properties.path.edges & 0xF; + uint8_t bin_quantity = tileElement->properties.path.addition_status; + uint8_t chosen_position = 0; for (; chosen_position < 4; ++chosen_position) { @@ -2270,7 +2270,7 @@ static sint32 peep_update_patrolling_find_bin(rct_peep * peep) * * rct2: 0x006BF322 */ -static sint32 peep_update_patrolling_find_grass(rct_peep * peep) +static int32_t peep_update_patrolling_find_grass(rct_peep * peep) { if (!(peep->staff_orders & STAFF_ORDERS_MOWING)) return 0; @@ -2302,12 +2302,12 @@ static sint32 peep_update_patrolling_find_grass(rct_peep * peep) * * rct2: 0x006BF295 */ -static sint32 peep_update_patrolling_find_sweeping(rct_peep * peep) +static int32_t peep_update_patrolling_find_sweeping(rct_peep * peep) { if (!(peep->staff_orders & STAFF_ORDERS_SWEEPING)) return 0; - uint16 sprite_id = sprite_get_first_in_quadrant(peep->x, peep->y); + uint16_t sprite_id = sprite_get_first_in_quadrant(peep->x, peep->y); for (rct_sprite * sprite = nullptr; sprite_id != SPRITE_INDEX_NULL; sprite_id = sprite->unknown.next_in_quadrant) { @@ -2317,7 +2317,7 @@ static sint32 peep_update_patrolling_find_sweeping(rct_peep * peep) if (sprite->unknown.linked_list_type_offset != SPRITE_LIST_LITTER * 2) continue; - uint16 z_diff = abs(peep->z - sprite->litter.z); + uint16_t z_diff = abs(peep->z - sprite->litter.z); if (z_diff >= 16) continue; @@ -2338,7 +2338,7 @@ void rct_peep::Tick128UpdateStaff() if (staff_type != STAFF_TYPE_SECURITY) return; - uint8 newSpriteType = PEEP_SPRITE_TYPE_SECURITY_ALT; + uint8_t newSpriteType = PEEP_SPRITE_TYPE_SECURITY_ALT; if (state != PEEP_STATE_PATROLLING) newSpriteType = PEEP_SPRITE_TYPE_SECURITY; @@ -2375,7 +2375,7 @@ void rct_peep::UpdatePatrolling() if (!CheckForPath()) return; - uint8 pathingResult; + uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -2386,7 +2386,7 @@ void rct_peep::UpdatePatrolling() if (tile_element != nullptr) { - sint32 water_height = surface_get_water_height(tile_element); + int32_t water_height = surface_get_water_height(tile_element); if (water_height) { Invalidate(); @@ -2441,7 +2441,7 @@ enum * when fixing a broken down ride; * - index 8 is for inspecting a ride. */ -static constexpr const uint32 FixingSubstatesForBreakdown[9] = { +static constexpr const uint32_t FixingSubstatesForBreakdown[9] = { ( // BREAKDOWN_SAFETY_CUT_OUT (1 << PEEP_FIXING_MOVE_TO_STATION_END) | (1 << PEEP_FIXING_FIX_STATION_END) | @@ -2518,7 +2518,7 @@ static constexpr const uint32 FixingSubstatesForBreakdown[9] = { * rct2: 0x006C0E8B * Also used by inspecting. */ -void rct_peep::UpdateFixing(sint32 steps) +void rct_peep::UpdateFixing(int32_t steps) { Ride * ride = get_ride(current_ride); @@ -2607,8 +2607,8 @@ void rct_peep::UpdateFixing(sint32 steps) break; } - sint32 subState = sub_state; - uint32 sub_state_sequence_mask = FixingSubstatesForBreakdown[8]; + int32_t subState = sub_state; + uint32_t sub_state_sequence_mask = FixingSubstatesForBreakdown[8]; if (state != PEEP_STATE_INSPECTING) { @@ -2658,7 +2658,7 @@ bool rct_peep::UpdateFixingMoveToBrokenDownVehicle(bool firstRun, Ride * ride) break; } - uint8 trackType = vehicle->track_type >> 2; + uint8_t trackType = vehicle->track_type >> 2; if (trackType == TRACK_ELEM_END_STATION) { break; @@ -2684,7 +2684,7 @@ bool rct_peep::UpdateFixingMoveToBrokenDownVehicle(bool firstRun, Ride * ride) } Invalidate(); - sint16 actionX, actionY, tmp_xy_distance; + int16_t actionX, actionY, tmp_xy_distance; if (UpdateAction(&actionX, &actionY, &tmp_xy_distance)) { sprite_move(actionX, actionY, z, (rct_sprite *)this); @@ -2724,7 +2724,7 @@ bool rct_peep::UpdateFixingFixVehicle(bool firstRun, Ride * ride) UpdateAction(); - uint8 actionFrame = (action == PEEP_ACTION_STAFF_FIX) ? 0x25 : 0x50; + uint8_t actionFrame = (action == PEEP_ACTION_STAFF_FIX) ? 0x25 : 0x50; if (action_frame != actionFrame) { return false; @@ -2809,9 +2809,9 @@ bool rct_peep::UpdateFixingMoveToStationEnd(bool firstRun, Ride * ride) return true; } - uint8 stationZ = ride->station_heights[current_ride_station]; - uint16 stationX = stationPosition.x * 32; - uint16 stationY = stationPosition.y * 32; + uint8_t stationZ = ride->station_heights[current_ride_station]; + uint16_t stationX = stationPosition.x * 32; + uint16_t stationY = stationPosition.y * 32; rct_tile_element * tileElement = map_get_track_element_at(stationX, stationY, stationZ); if (tileElement == nullptr) @@ -2820,7 +2820,7 @@ bool rct_peep::UpdateFixingMoveToStationEnd(bool firstRun, Ride * ride) return false; } - sint32 trackDirection = tile_element_get_direction(tileElement); + int32_t trackDirection = tile_element_get_direction(tileElement); CoordsXY offset = _StationFixingOffsets[trackDirection]; stationX += 16 + offset.x; @@ -2841,7 +2841,7 @@ bool rct_peep::UpdateFixingMoveToStationEnd(bool firstRun, Ride * ride) } Invalidate(); - sint16 actionX, actionY, tmp_distance; + int16_t actionX, actionY, tmp_distance; if (!UpdateAction(&actionX, &actionY, &tmp_distance)) { return true; @@ -2904,7 +2904,7 @@ bool rct_peep::UpdateFixingMoveToStationStart(bool firstRun, Ride * ride) return true; } - uint8 stationZ = ride->station_heights[current_ride_station]; + uint8_t stationZ = ride->station_heights[current_ride_station]; CoordsXYE input; input.x = stationPosition.x * 32; @@ -2915,7 +2915,7 @@ bool rct_peep::UpdateFixingMoveToStationStart(bool firstRun, Ride * ride) return true; } - uint8 stationDirection = 0; + uint8_t stationDirection = 0; track_begin_end trackBeginEnd; while (track_block_get_previous(input.x, input.y, input.element, &trackBeginEnd)) { @@ -2933,8 +2933,8 @@ bool rct_peep::UpdateFixingMoveToStationStart(bool firstRun, Ride * ride) } // loc_6C12ED: - uint16 destinationX = input.x + 16; - uint16 destinationY = input.y + 16; + uint16_t destinationX = input.x + 16; + uint16_t destinationY = input.y + 16; CoordsXY offset = _StationFixingOffsets[stationDirection]; @@ -2956,7 +2956,7 @@ bool rct_peep::UpdateFixingMoveToStationStart(bool firstRun, Ride * ride) } Invalidate(); - sint16 actionX, actionY, tmp_xy_distance; + int16_t actionX, actionY, tmp_xy_distance; if (!UpdateAction(&actionX, &actionY, &tmp_xy_distance)) { return true; @@ -3064,8 +3064,8 @@ bool rct_peep::UpdateFixingMoveToStationExit(bool firstRun, Ride * ride) } } - uint16 stationX = stationPosition.x * 32; - uint16 stationY = stationPosition.y * 32; + uint16_t stationX = stationPosition.x * 32; + uint16_t stationY = stationPosition.y * 32; stationX += 16; stationY += 16; @@ -3080,7 +3080,7 @@ bool rct_peep::UpdateFixingMoveToStationExit(bool firstRun, Ride * ride) } Invalidate(); - sint16 actionX, actionY, tmp_xy_distance; + int16_t actionX, actionY, tmp_xy_distance; if (!UpdateAction(&actionX, &actionY, &tmp_xy_distance)) { return true; @@ -3099,7 +3099,7 @@ bool rct_peep::UpdateFixingMoveToStationExit(bool firstRun, Ride * ride) * fixing sub_state: finish_fix_or_inspect - applies to fixing all failures & inspections * - see FixingSubstatesForBreakdown[] */ -bool rct_peep::UpdateFixingFinishFixOrInspect(bool firstRun, sint32 steps, Ride * ride) +bool rct_peep::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride * ride) { if (!firstRun) { @@ -3159,8 +3159,8 @@ bool rct_peep::UpdateFixingLeaveByEntranceExit(bool firstRun, Ride * ride) } } - uint16 exitX = exitPosition.x * 32; - uint16 exitY = exitPosition.y * 32; + uint16_t exitX = exitPosition.x * 32; + uint16_t exitY = exitPosition.y * 32; exitX += 16; exitY += 16; @@ -3175,14 +3175,14 @@ bool rct_peep::UpdateFixingLeaveByEntranceExit(bool firstRun, Ride * ride) } Invalidate(); - sint16 actionX, actionY, xy_distance; + int16_t actionX, actionY, xy_distance; if (!UpdateAction(&actionX, &actionY, &xy_distance)) { SetState(PEEP_STATE_FALLING); return false; } - uint16 stationHeight = ride->station_heights[current_ride_station] * 8; + uint16_t stationHeight = ride->station_heights[current_ride_station] * 8; if (xy_distance >= 16) { @@ -3198,7 +3198,7 @@ bool rct_peep::UpdateFixingLeaveByEntranceExit(bool firstRun, Ride * ride) /** * rct2: 0x6B7588 */ -void rct_peep::UpdateRideInspected(sint32 rideIndex) +void rct_peep::UpdateRideInspected(int32_t rideIndex) { Ride * ride = get_ride(rideIndex); ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; diff --git a/src/openrct2/peep/Staff.h b/src/openrct2/peep/Staff.h index 95dc08789c..458fd742c6 100644 --- a/src/openrct2/peep/Staff.h +++ b/src/openrct2/peep/Staff.h @@ -64,43 +64,43 @@ enum ENTERTAINER_COSTUME extern const rct_string_id StaffCostumeNames[ENTERTAINER_COSTUME_COUNT]; -extern uint32 gStaffPatrolAreas[(STAFF_MAX_COUNT + STAFF_TYPE_COUNT) * STAFF_PATROL_AREA_SIZE]; -extern uint8 gStaffModes[STAFF_MAX_COUNT + STAFF_TYPE_COUNT]; -extern uint16 gStaffDrawPatrolAreas; +extern uint32_t gStaffPatrolAreas[(STAFF_MAX_COUNT + STAFF_TYPE_COUNT) * STAFF_PATROL_AREA_SIZE]; +extern uint8_t gStaffModes[STAFF_MAX_COUNT + STAFF_TYPE_COUNT]; +extern uint16_t gStaffDrawPatrolAreas; extern colour_t gStaffHandymanColour; extern colour_t gStaffMechanicColour; extern colour_t gStaffSecurityColour; -void game_command_hire_new_staff_member(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); -void game_command_callback_hire_new_staff_member(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, - sint32 ebp); -void game_command_set_staff_order(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); -void game_command_set_staff_patrol(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); -void game_command_fire_staff_member(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); -void game_command_set_staff_name(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); -void game_command_pickup_staff(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, - sint32 * ebp); +void game_command_hire_new_staff_member(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); +void game_command_callback_hire_new_staff_member(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, + int32_t ebp); +void game_command_set_staff_order(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); +void game_command_set_staff_patrol(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); +void game_command_fire_staff_member(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); +void game_command_set_staff_name(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); +void game_command_pickup_staff(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, + int32_t * ebp); void staff_reset_modes(); -void staff_set_name(uint16 spriteIndex, const char * name); -uint16 hire_new_staff_member(uint8 staffType); +void staff_set_name(uint16_t spriteIndex, const char * name); +uint16_t hire_new_staff_member(uint8_t staffType); void staff_update_greyed_patrol_areas(); -bool staff_is_location_in_patrol(rct_peep * mechanic, sint32 x, sint32 y); -bool staff_is_location_on_patrol_edge(rct_peep * mechanic, sint32 x, sint32 y); -bool staff_can_ignore_wide_flag(rct_peep * mechanic, sint32 x, sint32 y, uint8 z, rct_tile_element * path); -sint32 staff_path_finding(rct_peep * peep); +bool staff_is_location_in_patrol(rct_peep * mechanic, int32_t x, int32_t y); +bool staff_is_location_on_patrol_edge(rct_peep * mechanic, int32_t x, int32_t y); +bool staff_can_ignore_wide_flag(rct_peep * mechanic, int32_t x, int32_t y, uint8_t z, rct_tile_element * path); +int32_t staff_path_finding(rct_peep * peep); void staff_reset_stats(); -bool staff_is_patrol_area_set(sint32 staffIndex, sint32 x, sint32 y); -void staff_set_patrol_area(sint32 staffIndex, sint32 x, sint32 y, bool value); -void staff_toggle_patrol_area(sint32 staffIndex, sint32 x, sint32 y); -colour_t staff_get_colour(uint8 staffType); -bool staff_set_colour(uint8 staffType, colour_t value); -uint32 staff_get_available_entertainer_costumes(); -sint32 staff_get_available_entertainer_costume_list(uint8 * costumeList); +bool staff_is_patrol_area_set(int32_t staffIndex, int32_t x, int32_t y); +void staff_set_patrol_area(int32_t staffIndex, int32_t x, int32_t y, bool value); +void staff_toggle_patrol_area(int32_t staffIndex, int32_t x, int32_t y); +colour_t staff_get_colour(uint8_t staffType); +bool staff_set_colour(uint8_t staffType, colour_t value); +uint32_t staff_get_available_entertainer_costumes(); +int32_t staff_get_available_entertainer_costume_list(uint8_t * costumeList); #endif diff --git a/src/openrct2/platform/Android.cpp b/src/openrct2/platform/Android.cpp index 58f4c79b34..d7f1216dd3 100644 --- a/src/openrct2/platform/Android.cpp +++ b/src/openrct2/platform/Android.cpp @@ -25,15 +25,15 @@ bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size) } #endif -uint16 platform_get_locale_language() { +uint16_t platform_get_locale_language() { return LANGUAGE_ENGLISH_UK; } -uint8 platform_get_locale_currency() { +uint8_t platform_get_locale_currency() { return platform_get_currency_value(NULL); } -uint8 platform_get_locale_measurement_format() { +uint8_t platform_get_locale_measurement_format() { return MEASUREMENT_FORMAT_METRIC; } diff --git a/src/openrct2/platform/Crash.cpp b/src/openrct2/platform/Crash.cpp index 0ca0f9dadf..f3dba481b8 100644 --- a/src/openrct2/platform/Crash.cpp +++ b/src/openrct2/platform/Crash.cpp @@ -112,7 +112,7 @@ static bool OnCrash(const wchar_t * dumpPath, { LPITEMIDLIST pidl = ILCreateFromPathW(dumpPath); LPITEMIDLIST files[2]; - uint32 numFiles = 0; + uint32_t numFiles = 0; files[numFiles++] = ILCreateFromPathW(dumpFilePath); if (savedGameDumped) @@ -122,7 +122,7 @@ static bool OnCrash(const wchar_t * dumpPath, if (pidl != nullptr) { SHOpenFolderAndSelectItems(pidl, numFiles, (LPCITEMIDLIST *)files, 0); ILFree(pidl); - for (uint32 i = 0; i < numFiles; i++) + for (uint32_t i = 0; i < numFiles; i++) { ILFree(files[i]); } diff --git a/src/openrct2/platform/Linux.cpp b/src/openrct2/platform/Linux.cpp index b98f692ecd..78fdc77b04 100644 --- a/src/openrct2/platform/Linux.cpp +++ b/src/openrct2/platform/Linux.cpp @@ -36,7 +36,7 @@ #include "../util/Util.h" #include "platform.h" -uint16 platform_get_locale_language(){ +uint16_t platform_get_locale_language(){ const char *langString = setlocale(LC_MESSAGES, ""); if(langString != nullptr){ // The locale has the following form: @@ -45,9 +45,9 @@ uint16 platform_get_locale_language(){ // longest on my system is 29 with codeset and modifier, so 32 for the pattern should be more than enough char pattern[32]; //strip the codeset and modifier part - sint32 length = strlen(langString); + int32_t length = strlen(langString); { - for(sint32 i = 0; i < length; ++i){ + for(int32_t i = 0; i < length; ++i){ if(langString[i] == '.' || langString[i] == '@'){ length = i; break; @@ -65,7 +65,7 @@ uint16 platform_get_locale_language(){ } // Iterate through all available languages - for(sint32 i = 1; i < LANGUAGE_COUNT; ++i){ + for(int32_t i = 1; i < LANGUAGE_COUNT; ++i){ if(!fnmatch(pattern, LanguagesDescriptors[i].locale, 0)){ return i; } @@ -86,7 +86,7 @@ uint16 platform_get_locale_language(){ if(strip != nullptr){ pattern[strip - pattern] = '*'; pattern[strip - pattern +1] = '\0'; // pattern is now "language*" - for(sint32 i = 1; i < LANGUAGE_COUNT; ++i){ + for(int32_t i = 1; i < LANGUAGE_COUNT; ++i){ if(!fnmatch(pattern, LanguagesDescriptors[i].locale, 0)){ return i; } @@ -96,7 +96,7 @@ uint16 platform_get_locale_language(){ return LANGUAGE_ENGLISH_UK; } -uint8 platform_get_locale_currency(){ +uint8_t platform_get_locale_currency(){ char *langstring = setlocale(LC_MONETARY, ""); if (langstring == nullptr) { @@ -108,7 +108,7 @@ uint8 platform_get_locale_currency(){ return platform_get_currency_value(lc->int_curr_symbol); } -uint8 platform_get_locale_measurement_format(){ +uint8_t platform_get_locale_measurement_format(){ // LC_MEASUREMENT is GNU specific. #ifdef LC_MEASUREMENT const char *langstring = setlocale(LC_MEASUREMENT, ""); diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp index a12105fe04..1c08b43356 100644 --- a/src/openrct2/platform/Platform.Linux.cpp +++ b/src/openrct2/platform/Platform.Linux.cpp @@ -149,7 +149,7 @@ namespace Platform log_fatal("failed to read /proc/self/exe"); } #elif defined(__FreeBSD__) - const sint32 mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; + const int32_t mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; auto exeLen = sizeof(exePath); if (sysctl(mib, 4, exePath, &exeLen, nullptr, 0) == -1) { diff --git a/src/openrct2/platform/Platform.Posix.cpp b/src/openrct2/platform/Platform.Posix.cpp index 36729ca751..e91f7be9b2 100644 --- a/src/openrct2/platform/Platform.Posix.cpp +++ b/src/openrct2/platform/Platform.Posix.cpp @@ -19,7 +19,7 @@ namespace Platform { - uint32 GetTicks() + uint32_t GetTicks() { return platform_get_ticks(); } diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 2c2d9f8279..9c34fbc710 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -38,7 +38,7 @@ namespace Platform #endif static std::string WIN32_GetModuleFileNameW(HMODULE hModule); - uint32 GetTicks() + uint32_t GetTicks() { return platform_get_ticks(); } @@ -190,7 +190,7 @@ namespace Platform return result; } - bool IsOSVersionAtLeast(uint32 major, uint32 minor, uint32 build) + bool IsOSVersionAtLeast(uint32_t major, uint32_t minor, uint32_t build) { bool result = false; auto hModule = GetModuleHandleA("ntdll.dll"); @@ -289,9 +289,9 @@ namespace Platform static std::string WIN32_GetModuleFileNameW(HMODULE hModule) { - uint32 wExePathCapacity = MAX_PATH; + uint32_t wExePathCapacity = MAX_PATH; std::unique_ptr wExePath; - uint32 size; + uint32_t size; do { wExePathCapacity *= 2; diff --git a/src/openrct2/platform/Platform.macOS.mm b/src/openrct2/platform/Platform.macOS.mm index 999cc8ae7e..a12dd2ccaf 100644 --- a/src/openrct2/platform/Platform.macOS.mm +++ b/src/openrct2/platform/Platform.macOS.mm @@ -87,7 +87,7 @@ namespace Platform std::string GetCurrentExecutablePath() { char exePath[MAX_PATH]; - uint32 size = MAX_PATH; + uint32_t size = MAX_PATH; int result = _NSGetExecutablePath(exePath, &size); if (result == 0) { diff --git a/src/openrct2/platform/Platform2.h b/src/openrct2/platform/Platform2.h index 5491337b1f..3e241e593d 100644 --- a/src/openrct2/platform/Platform2.h +++ b/src/openrct2/platform/Platform2.h @@ -23,7 +23,7 @@ enum class SPECIAL_FOLDER namespace Platform { - uint32 GetTicks(); + uint32_t GetTicks(); std::string GetEnvironmentVariable(const std::string &name); std::string GetFolderPath(SPECIAL_FOLDER folder); std::string GetInstallPath(); @@ -39,7 +39,7 @@ namespace Platform std::string FormatTime(std::time_t timestamp); #ifdef _WIN32 - bool IsOSVersionAtLeast(uint32 major, uint32 minor, uint32 build); + bool IsOSVersionAtLeast(uint32_t major, uint32_t minor, uint32_t build); #endif bool IsColourTerminalSupported(); diff --git a/src/openrct2/platform/Posix.cpp b/src/openrct2/platform/Posix.cpp index 12ecb1467b..d875fde005 100644 --- a/src/openrct2/platform/Posix.cpp +++ b/src/openrct2/platform/Posix.cpp @@ -122,7 +122,7 @@ bool platform_directory_exists(const utf8 *path) char buffer[MAX_PATH]; platform_utf8_to_multibyte(path, buffer, MAX_PATH); struct stat dirinfo; - sint32 result = stat(buffer, &dirinfo); + int32_t result = stat(buffer, &dirinfo); log_verbose("checking dir %s, result = %d, is_dir = %d", buffer, result, S_ISDIR(dirinfo.st_mode)); if ((result != 0) || !S_ISDIR(dirinfo.st_mode)) { @@ -271,7 +271,7 @@ bool platform_lock_single_instance() // take care of that, because flock keeps the lock as long as the // file is open and closes it automatically on file close. // This is intentional. - sint32 pidFile = open(pidFilePath, O_CREAT | O_RDWR, 0666); + int32_t pidFile = open(pidFilePath, O_CREAT | O_RDWR, 0666); if (pidFile == -1) { log_warning("Cannot open lock file for writing."); @@ -297,7 +297,7 @@ bool platform_lock_single_instance() return true; } -sint32 platform_get_drives() { +int32_t platform_get_drives() { // POSIX systems do not know drives. Return 0. return 0; } @@ -363,7 +363,7 @@ bool platform_file_move(const utf8 *srcPath, const utf8 *dstPath) bool platform_file_delete(const utf8 *path) { - sint32 ret = unlink(path); + int32_t ret = unlink(path); return ret == 0; } @@ -375,7 +375,7 @@ time_t platform_file_get_modified_time(const utf8* path){ return 100; } -uint8 platform_get_locale_temperature_format(){ +uint8_t platform_get_locale_temperature_format(){ // LC_MEASUREMENT is GNU specific. #ifdef LC_MEASUREMENT const char *langstring = setlocale(LC_MEASUREMENT, ""); @@ -395,7 +395,7 @@ uint8 platform_get_locale_temperature_format(){ return TEMPERATURE_FORMAT_C; } -uint8 platform_get_locale_date_format() +uint8_t platform_get_locale_date_format() { return DATE_FORMAT_DAY_MONTH_YEAR; } @@ -409,7 +409,7 @@ datetime64 platform_get_datetime_now_utc() // Epoch starts from: 1970-01-01T00:00:00Z // Convert to ticks from 0001-01-01T00:00:00Z - uint64 utcEpochTicks = (uint64)tv.tv_sec * 10000000ULL + tv.tv_usec * 10; + uint64_t utcEpochTicks = (uint64_t)tv.tv_sec * 10000000ULL + tv.tv_usec * 10; datetime64 utcNow = epochAsTicks + utcEpochTicks; return utcNow; } diff --git a/src/openrct2/platform/Shared.cpp b/src/openrct2/platform/Shared.cpp index a8c15eee42..a33f4a8c87 100644 --- a/src/openrct2/platform/Shared.cpp +++ b/src/openrct2/platform/Shared.cpp @@ -60,23 +60,23 @@ char * strndup(const char * src, size_t size) #endif // !((defined (_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) || (defined(__APPLE__) && defined(__MACH__))) #ifdef _WIN32 -static uint32 _frequency = 0; +static uint32_t _frequency = 0; static LARGE_INTEGER _entryTimestamp; #endif -using update_palette_func = void (*)(const uint8 *, sint32, sint32); +using update_palette_func = void (*)(const uint8_t *, int32_t, int32_t); rct_palette_entry gPalette[256]; -void platform_update_palette(const uint8 * colours, sint32 start_index, sint32 num_colours) +void platform_update_palette(const uint8_t * colours, int32_t start_index, int32_t num_colours) { colours += start_index * 4; - for (sint32 i = start_index; i < num_colours + start_index; i++) + for (int32_t i = start_index; i < num_colours + start_index; i++) { - uint8 r = colours[2]; - uint8 g = colours[1]; - uint8 b = colours[0]; + uint8_t r = colours[2]; + uint8_t g = colours[1]; + uint8_t b = colours[0]; #ifdef __ENABLE_LIGHTFX__ if (lightfx_is_available()) @@ -116,7 +116,7 @@ void platform_update_palette(const uint8 * colours, sint32 start_index, sint32 n void platform_toggle_windowed_mode() { - sint32 targetMode = gConfigGeneral.fullscreen_mode == 0 ? 2 : 0; + int32_t targetMode = gConfigGeneral.fullscreen_mode == 0 ? 2 : 0; context_set_fullscreen_mode(targetMode); gConfigGeneral.fullscreen_mode = targetMode; config_save_default(); @@ -144,12 +144,12 @@ static void platform_ticks_init() #ifdef _WIN32 LARGE_INTEGER freq; QueryPerformanceFrequency(&freq); - _frequency = (uint32)(freq.QuadPart / 1000); + _frequency = (uint32_t)(freq.QuadPart / 1000); QueryPerformanceCounter(&_entryTimestamp); #endif } -uint32 platform_get_ticks() +uint32_t platform_get_ticks() { #ifdef _WIN32 LARGE_INTEGER pfc; @@ -158,9 +158,9 @@ uint32 platform_get_ticks() LARGE_INTEGER runningDelta; runningDelta.QuadPart = pfc.QuadPart - _entryTimestamp.QuadPart; - return (uint32)(runningDelta.QuadPart / _frequency); + return (uint32_t)(runningDelta.QuadPart / _frequency); #elif defined(__APPLE__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) - return (uint32)(((mach_absolute_time() * _mach_base_info.numer) / _mach_base_info.denom) / 1000000); + return (uint32_t)(((mach_absolute_time() * _mach_base_info.numer) / _mach_base_info.denom) / 1000000); #else struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) @@ -168,11 +168,11 @@ uint32 platform_get_ticks() log_fatal("clock_gettime failed"); exit(-1); } - return (uint32)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000); + return (uint32_t)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000); #endif } -void platform_sleep(uint32 ms) +void platform_sleep(uint32_t ms) { #ifdef _WIN32 Sleep(ms); @@ -181,14 +181,14 @@ void platform_sleep(uint32 ms) #endif } -uint8 platform_get_currency_value(const char * currCode) +uint8_t platform_get_currency_value(const char * currCode) { if (currCode == nullptr || strlen(currCode) < 3) { return CURRENCY_POUNDS; } - for (sint32 currency = 0; currency < CURRENCY_END; ++currency) + for (int32_t currency = 0; currency < CURRENCY_END; ++currency) { if (strncmp(currCode, CurrencyDescriptors[currency].isoCode, 3) == 0) { diff --git a/src/openrct2/platform/Windows.cpp b/src/openrct2/platform/Windows.cpp index b975b6bc97..64f08660e7 100644 --- a/src/openrct2/platform/Windows.cpp +++ b/src/openrct2/platform/Windows.cpp @@ -136,7 +136,7 @@ bool platform_directory_delete(const utf8 *path) fileop.lpszProgressTitle = nullptr; fileop.hNameMappings = nullptr; - sint32 ret = SHFileOperationW(&fileop); + int32_t ret = SHFileOperationW(&fileop); return (ret == 0); } @@ -160,7 +160,7 @@ bool platform_lock_single_instance() } } -sint32 platform_get_drives() +int32_t platform_get_drives() { return GetLogicalDrives(); } @@ -224,7 +224,7 @@ bool platform_get_steam_path(utf8 * outPath, size_t outSize) return result == ERROR_SUCCESS; } -uint16 platform_get_locale_language() +uint16_t platform_get_locale_language() { CHAR langCode[4]; @@ -295,7 +295,7 @@ time_t platform_file_get_modified_time(const utf8* path) } } -uint8 platform_get_locale_currency() +uint8_t platform_get_locale_currency() { CHAR currCode[4]; if (GetLocaleInfo(LOCALE_USER_DEFAULT, @@ -309,7 +309,7 @@ uint8 platform_get_locale_currency() return platform_get_currency_value(currCode); } -uint8 platform_get_locale_measurement_format() +uint8_t platform_get_locale_measurement_format() { UINT measurement_system; if (GetLocaleInfo(LOCALE_USER_DEFAULT, @@ -329,7 +329,7 @@ uint8 platform_get_locale_measurement_format() } } -uint8 platform_get_locale_temperature_format() +uint8_t platform_get_locale_temperature_format() { UINT fahrenheit; @@ -350,7 +350,7 @@ uint8 platform_get_locale_temperature_format() return TEMPERATURE_FORMAT_C; } -uint8 platform_get_locale_date_format() +uint8_t platform_get_locale_date_format() { // Retrieve short date format, eg "MM/dd/yyyy" wchar_t dateFormat[20]; @@ -450,7 +450,7 @@ datetime64 platform_get_datetime_now_utc() // Get file time FILETIME fileTime; GetSystemTimeAsFileTime(&fileTime); - uint64 fileTime64 = ((uint64)fileTime.dwHighDateTime << 32ULL) | ((uint64)fileTime.dwLowDateTime); + uint64_t fileTime64 = ((uint64_t)fileTime.dwHighDateTime << 32ULL) | ((uint64_t)fileTime.dwLowDateTime); // File time starts from: 1601-01-01T00:00:00Z // Convert to start from: 0001-01-01T00:00:00Z @@ -510,12 +510,12 @@ static bool windows_setup_file_association( const utf8 * fileTypeText, const utf8 * commandText, const utf8 * commandArgs, - const uint32 iconIndex + const uint32_t iconIndex ) { wchar_t exePathW[MAX_PATH]; wchar_t dllPathW[MAX_PATH]; - [[maybe_unused]] sint32 printResult; + [[maybe_unused]] int32_t printResult; GetModuleFileNameW(NULL, exePathW, sizeof(exePathW)); GetModuleFileNameW(plaform_get_dll_module(), dllPathW, sizeof(dllPathW)); diff --git a/src/openrct2/platform/macos.mm b/src/openrct2/platform/macos.mm index ecfa869000..991cd1acc9 100644 --- a/src/openrct2/platform/macos.mm +++ b/src/openrct2/platform/macos.mm @@ -58,7 +58,7 @@ bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size) } #endif // NO_TTF -bool platform_has_matching_language(NSString *preferredLocale, uint16* languageIdentifier) +bool platform_has_matching_language(NSString *preferredLocale, uint16_t* languageIdentifier) { @autoreleasepool { @@ -100,13 +100,13 @@ bool platform_has_matching_language(NSString *preferredLocale, uint16* languageI } } -uint16 platform_get_locale_language() +uint16_t platform_get_locale_language() { @autoreleasepool { NSArray *preferredLanguages = [NSLocale preferredLanguages]; for (NSString *preferredLanguage in preferredLanguages) { - uint16 languageIdentifier; + uint16_t languageIdentifier; if (platform_has_matching_language(preferredLanguage, &languageIdentifier)) { return languageIdentifier; } @@ -117,7 +117,7 @@ uint16 platform_get_locale_language() } } -uint8 platform_get_locale_currency() +uint8_t platform_get_locale_currency() { @autoreleasepool { @@ -126,7 +126,7 @@ uint8 platform_get_locale_currency() } } -uint8 platform_get_locale_measurement_format() +uint8_t platform_get_locale_measurement_format() { @autoreleasepool { diff --git a/src/openrct2/platform/platform.h b/src/openrct2/platform/platform.h index 76c58f4ba0..b01d0a07d1 100644 --- a/src/openrct2/platform/platform.h +++ b/src/openrct2/platform/platform.h @@ -31,26 +31,26 @@ struct rct2_install_info; #endif struct resolution_t { - sint32 width, height; + int32_t width, height; }; struct file_info { const char *path; - uint64 size; - uint64 last_modified; + uint64_t size; + uint64_t last_modified; }; struct rct2_date { - uint8 day; - uint8 month; - sint16 year; - uint8 day_of_week; + uint8_t day; + uint8_t month; + int16_t year; + uint8_t day_of_week; }; struct rct2_time { - uint8 hour; - uint8 minute; - uint8 second; + uint8_t hour; + uint8_t minute; + uint8_t second; }; enum FILEDIALOG_TYPE @@ -60,7 +60,7 @@ enum FILEDIALOG_TYPE }; struct file_dialog_desc { - uint8 type; + uint8_t type; const utf8 *title; const utf8 *initial_directory; const utf8 *default_filename; @@ -71,7 +71,7 @@ struct file_dialog_desc { }; // Platform shared definitions -void platform_update_palette(const uint8 *colours, sint32 start_index, sint32 num_colours); +void platform_update_palette(const uint8_t *colours, int32_t start_index, int32_t num_colours); void platform_toggle_windowed_mode(); void platform_refresh_video(bool recreate_window); void platform_get_date_utc(rct2_date *out_date); @@ -91,24 +91,24 @@ bool platform_lock_single_instance(); bool platform_place_string_on_clipboard(utf8* target); // Returns the bitmask of the GetLogicalDrives function for windows, 0 for other systems -sint32 platform_get_drives(); +int32_t platform_get_drives(); bool platform_file_copy(const utf8 *srcPath, const utf8 *dstPath, bool overwrite); bool platform_file_move(const utf8 *srcPath, const utf8 *dstPath); bool platform_file_delete(const utf8 *path); -uint32 platform_get_ticks(); -void platform_sleep(uint32 ms); +uint32_t platform_get_ticks(); +void platform_sleep(uint32_t ms); void platform_get_openrct_data_path(utf8 *outPath, size_t outSize); void platform_get_user_directory(utf8 *outPath, const utf8 *subDirectory, size_t outSize); utf8* platform_get_username(); bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, size_t outSize); utf8 *platform_open_directory_browser(const utf8 *title); -uint8 platform_get_locale_currency(); -uint8 platform_get_currency_value(const char *currencyCode); -uint16 platform_get_locale_language(); -uint8 platform_get_locale_measurement_format(); -uint8 platform_get_locale_temperature_format(); -uint8 platform_get_locale_date_format(); +uint8_t platform_get_locale_currency(); +uint8_t platform_get_currency_value(const char *currencyCode); +uint16_t platform_get_locale_language(); +uint8_t platform_get_locale_measurement_format(); +uint8_t platform_get_locale_temperature_format(); +uint8_t platform_get_locale_date_format(); bool platform_process_is_elevated(); bool platform_get_steam_path(utf8 * outPath, size_t outSize); @@ -141,7 +141,7 @@ void core_init(); bool platform_setup_uri_protocol(); // This function cannot be marked as 'static', even though it may seem to be, // as it requires external linkage, which 'static' prevents - __declspec(dllexport) sint32 StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, sint32 nCmdShow); + __declspec(dllexport) int32_t StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int32_t nCmdShow); #endif // _WIN32 #if defined(__APPLE__) && defined(__MACH__) diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index ffe4a9562c..97f4c2fbfd 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -32,10 +32,10 @@ struct ParkLoadResult; #pragma pack(push, 1) struct rct1_entrance { - uint16 x; - uint16 y; - uint16 z; - uint8 direction; + uint16_t x; + uint16_t y; + uint16_t z; + uint8_t direction; }; assert_struct_size(rct1_entrance, 7); @@ -44,11 +44,11 @@ assert_struct_size(rct1_entrance, 7); * size: 0x260 */ struct rct1_ride { - uint8 type; // 0x000 - uint8 vehicle_type; // 0x001 - uint16 lifecycle_flags; // 0x002 - uint8 operating_mode; // 0x004 - uint8 colour_scheme; // 0x005 + uint8_t type; // 0x000 + uint8_t vehicle_type; // 0x001 + uint16_t lifecycle_flags; // 0x002 + uint8_t operating_mode; // 0x004 + uint8_t colour_scheme; // 0x005 struct { colour_t body; colour_t trim; @@ -56,85 +56,85 @@ struct rct1_ride { colour_t track_primary_colour; // 0x01E colour_t track_secondary_colour; // 0x01F colour_t track_support_colour; // 0x020 - uint8 status; // 0x021 - uint16 name; // 0x022 - uint16 name_argument_ride; // 0x024 - uint16 name_argument_number; // 0x026 + uint8_t status; // 0x021 + uint16_t name; // 0x022 + uint16_t name_argument_ride; // 0x024 + uint16_t name_argument_number; // 0x026 LocationXY8 overall_view; // 0x028 LocationXY8 station_starts[RCT12_MAX_STATIONS_PER_RIDE]; // 0x02A - uint8 station_height[RCT12_MAX_STATIONS_PER_RIDE]; // 0x032 - uint8 station_length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x036 - uint8 station_light[RCT12_MAX_STATIONS_PER_RIDE]; // 0x03A - uint8 station_depart[RCT12_MAX_STATIONS_PER_RIDE]; // 0x03E + uint8_t station_height[RCT12_MAX_STATIONS_PER_RIDE]; // 0x032 + uint8_t station_length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x036 + uint8_t station_light[RCT12_MAX_STATIONS_PER_RIDE]; // 0x03A + uint8_t station_depart[RCT12_MAX_STATIONS_PER_RIDE]; // 0x03E LocationXY8 entrance[RCT12_MAX_STATIONS_PER_RIDE]; // 0x042 LocationXY8 exit[RCT12_MAX_STATIONS_PER_RIDE]; // 0x04A - uint16 last_peep_in_queue[RCT12_MAX_STATIONS_PER_RIDE]; // 0x052 - uint8 num_peeps_in_queue[RCT12_MAX_STATIONS_PER_RIDE]; // 0x05A - uint16 vehicles[RCT1_MAX_TRAINS_PER_RIDE]; // 0x05E - uint8 depart_flags; // 0x076 - uint8 num_stations; // 0x077 - uint8 num_trains; // 0x078 - uint8 num_cars_per_train; // 0x079 - uint8 proposed_num_vehicles; // 0x07A - uint8 proposed_num_cars_per_train; // 0x07B - uint8 max_trains; // 0x07C - uint8 min_max_cars_per_train; // 0x07D - uint8 min_waiting_time; // 0x07E - uint8 max_waiting_time; // 0x07F - uint8 operation_option; // 0x080 - uint8 boat_hire_return_direction; // 0x081 + uint16_t last_peep_in_queue[RCT12_MAX_STATIONS_PER_RIDE]; // 0x052 + uint8_t num_peeps_in_queue[RCT12_MAX_STATIONS_PER_RIDE]; // 0x05A + uint16_t vehicles[RCT1_MAX_TRAINS_PER_RIDE]; // 0x05E + uint8_t depart_flags; // 0x076 + uint8_t num_stations; // 0x077 + uint8_t num_trains; // 0x078 + uint8_t num_cars_per_train; // 0x079 + uint8_t proposed_num_vehicles; // 0x07A + uint8_t proposed_num_cars_per_train; // 0x07B + uint8_t max_trains; // 0x07C + uint8_t min_max_cars_per_train; // 0x07D + uint8_t min_waiting_time; // 0x07E + uint8_t max_waiting_time; // 0x07F + uint8_t operation_option; // 0x080 + uint8_t boat_hire_return_direction; // 0x081 LocationXY8 boat_hire_return_position; // 0x082 - uint8 data_logging_index; // 0x084 - uint8 special_track_elements; // 0x085 - uint16 unk_86; // 0x086 - sint32 max_speed; // 0x088 - sint32 average_speed; // 0x08C - uint8 current_test_segment; // 0x090 - uint8 average_speed_test_timeout; // 0x091 - uint8 pad_0E2[0x2]; // 0x092 - sint32 length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x094 - uint16 time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x0A4 + uint8_t data_logging_index; // 0x084 + uint8_t special_track_elements; // 0x085 + uint16_t unk_86; // 0x086 + int32_t max_speed; // 0x088 + int32_t average_speed; // 0x08C + uint8_t current_test_segment; // 0x090 + uint8_t average_speed_test_timeout; // 0x091 + uint8_t pad_0E2[0x2]; // 0x092 + int32_t length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x094 + uint16_t time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x0A4 fixed16_2dp max_positive_vertical_g; // 0x0AC fixed16_2dp max_negative_vertical_g; // 0x0AE fixed16_2dp max_lateral_g; // 0x0B0 fixed16_2dp previous_vertical_g; // 0x0B2 fixed16_2dp previous_lateral_g; // 0x0B4 - uint8 pad_B6[0x2]; // 0x0B6 - uint32 testing_flags; // 0x0B8 + uint8_t pad_B6[0x2]; // 0x0B6 + uint32_t testing_flags; // 0x0B8 // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times LocationXY8 cur_test_track_location; // 0x0BC // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16 turn_count_default; // 0x0BE X = current turn count - uint16 turn_count_banked; // 0x0C0 - uint16 turn_count_sloped; // 0x0C2 X = number turns > 3 elements + uint16_t turn_count_default; // 0x0BE X = current turn count + uint16_t turn_count_banked; // 0x0C0 + uint16_t turn_count_sloped; // 0x0C2 X = number turns > 3 elements union { - uint8 num_inversions; // 0x0C4 - uint8 num_holes; + uint8_t num_inversions; // 0x0C4 + uint8_t num_holes; }; - uint8 num_drops; // 0x0C5 - uint8 start_drop_height; // 0x0C6 - uint8 highest_drop_height; // 0x0C7 - sint32 sheltered_length; // 0x0C8 - uint8 unk_CC[2]; // 0x0CC - uint8 num_sheltered_sections; // 0x0CE + uint8_t num_drops; // 0x0C5 + uint8_t start_drop_height; // 0x0C6 + uint8_t highest_drop_height; // 0x0C7 + int32_t sheltered_length; // 0x0C8 + uint8_t unk_CC[2]; // 0x0CC + uint8_t num_sheltered_sections; // 0x0CE // see cur_test_track_location - uint8 cur_test_track_z; // 0x0CF - sint16 unk_D0; // 0x0D0 - sint16 unk_D2; // 0x0D2 - sint16 customers_per_hour; // 0x0D4 - sint16 unk_D6; // 0x0D6 - sint16 unk_D8; // 0x0D8 - sint16 unk_DA; // 0x0DA - sint16 unk_DC; // 0x0DC - sint16 unk_DE; // 0x0DE - uint16 age; // 0x0E0 - sint16 running_cost; // 0x0E2 - sint16 unk_E4; // 0x0E4 - sint16 unk_E6; // 0x0E6 + uint8_t cur_test_track_z; // 0x0CF + int16_t unk_D0; // 0x0D0 + int16_t unk_D2; // 0x0D2 + int16_t customers_per_hour; // 0x0D4 + int16_t unk_D6; // 0x0D6 + int16_t unk_D8; // 0x0D8 + int16_t unk_DA; // 0x0DA + int16_t unk_DC; // 0x0DC + int16_t unk_DE; // 0x0DE + uint16_t age; // 0x0E0 + int16_t running_cost; // 0x0E2 + int16_t unk_E4; // 0x0E4 + int16_t unk_E6; // 0x0E6 money16 price; // 0x0E8 LocationXY8 chairlift_bullwheel_location[2]; // 0x0EA - uint8 chairlift_bullwheel_z[2]; // 0x0EE + uint8_t chairlift_bullwheel_z[2]; // 0x0EE union { rating_tuple ratings; struct { @@ -143,372 +143,372 @@ struct rct1_ride { ride_rating nausea; // 0x0F4 }; }; - uint16 value; // 0x0F6 - uint16 chairlift_bullwheel_rotation; // 0x0F8 - uint8 satisfaction; // 0x0FA - uint8 satisfaction_time_out; // 0x0FB - uint8 satisfaction_next; // 0x0FC - uint8 window_invalidate_flags; // 0x0FD - uint8 unk_FE[2]; // 0x0FE - uint32 total_customers; // 0x100 + uint16_t value; // 0x0F6 + uint16_t chairlift_bullwheel_rotation; // 0x0F8 + uint8_t satisfaction; // 0x0FA + uint8_t satisfaction_time_out; // 0x0FB + uint8_t satisfaction_next; // 0x0FC + uint8_t window_invalidate_flags; // 0x0FD + uint8_t unk_FE[2]; // 0x0FE + uint32_t total_customers; // 0x100 money32 total_profit; // 0x104 - uint8 popularity; // 0x108 - uint8 popularity_time_out; // 0x109 - uint8 popularity_next; // 0x10A - uint8 num_riders; // 0x10B - uint8 music_tune_id; // 0x10C - uint8 slide_in_use; // 0x10D + uint8_t popularity; // 0x108 + uint8_t popularity_time_out; // 0x109 + uint8_t popularity_next; // 0x10A + uint8_t num_riders; // 0x10B + uint8_t music_tune_id; // 0x10C + uint8_t slide_in_use; // 0x10D union { - uint16 slide_peep; // 0x10E - uint16 maze_tiles; // 0x10E + uint16_t slide_peep; // 0x10E + uint16_t maze_tiles; // 0x10E }; - uint8 pad_110[0xE]; // 0x110 - uint8 slide_peep_t_shirt_colour; // 0x11E - uint8 pad_11F[0x7]; // 0x11F - uint8 spiral_slide_progress; // 0x126 - uint8 pad_127[0x9]; // 0x127 - sint16 build_date; // 0x130 + uint8_t pad_110[0xE]; // 0x110 + uint8_t slide_peep_t_shirt_colour; // 0x11E + uint8_t pad_11F[0x7]; // 0x11F + uint8_t spiral_slide_progress; // 0x126 + uint8_t pad_127[0x9]; // 0x127 + int16_t build_date; // 0x130 money16 upkeep_cost; // 0x131 - uint16 race_winner; // 0x132 - uint8 unk_134[2]; // 0x134 - uint32 music_position; // 0x138 - uint8 breakdown_reason_pending; // 0x13C - uint8 mechanic_status; // 0x13D - uint16 mechanic; // 0x13E - uint8 inspection_station; // 0x140 - uint8 broken_vehicle; // 0x141 - uint8 broken_car; // 0x142 - uint8 breakdown_reason; // 0x143 - uint8 unk_144[2]; // 0x144 + uint16_t race_winner; // 0x132 + uint8_t unk_134[2]; // 0x134 + uint32_t music_position; // 0x138 + uint8_t breakdown_reason_pending; // 0x13C + uint8_t mechanic_status; // 0x13D + uint16_t mechanic; // 0x13E + uint8_t inspection_station; // 0x140 + uint8_t broken_vehicle; // 0x141 + uint8_t broken_car; // 0x142 + uint8_t breakdown_reason; // 0x143 + uint8_t unk_144[2]; // 0x144 union { struct { - uint8 reliability_subvalue; // 0x146, 0 - 255, acts like the decimals for reliability_percentage - uint8 reliability_percentage; // 0x147, Starts at 100 and decreases from there. + uint8_t reliability_subvalue; // 0x146, 0 - 255, acts like the decimals for reliability_percentage + uint8_t reliability_percentage; // 0x147, Starts at 100 and decreases from there. }; - uint16 reliability; // 0x146 + uint16_t reliability; // 0x146 }; - uint8 unreliability_factor; // 0x148 - uint8 downtime; // 0x149 - uint8 inspection_interval; // 0x14A - uint8 last_inspection; // 0x14B - uint8 unk_14C[20]; // 0x14C + uint8_t unreliability_factor; // 0x148 + uint8_t downtime; // 0x149 + uint8_t inspection_interval; // 0x14A + uint8_t last_inspection; // 0x14B + uint8_t unk_14C[20]; // 0x14C money32 income_per_hour; // 0x160 money32 profit; // 0x164 - uint8 queue_time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x168 + uint8_t queue_time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x168 colour_t track_colour_main[4]; // 0x16C colour_t track_colour_additional[4]; // 0x170 colour_t track_colour_supports[4]; // 0x174 - uint8 music; // 0x178 - uint8 entrance_style; // 0x179 - uint8 unk_17A[230]; // 0x17A + uint8_t music; // 0x178 + uint8_t entrance_style; // 0x179 + uint8_t unk_17A[230]; // 0x17A }; assert_struct_size(rct1_ride, 0x260); struct rct1_unk_sprite { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; //direction of sprite? 0x1e - uint8 pad_1F[3]; // 0x1f + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; //direction of sprite? 0x1e + uint8_t pad_1F[3]; // 0x1f rct_string_id name_string_idx; // 0x22 - uint16 var_24; - uint16 frame; // 0x26 - uint8 var_28[3]; - uint8 var_2B; - uint8 pad_2C[0x45]; - uint8 var_71; + uint16_t var_24; + uint16_t frame; // 0x26 + uint8_t var_28[3]; + uint8_t var_2B; + uint8_t pad_2C[0x45]; + uint8_t var_71; }; struct rct1_vehicle { - uint8 sprite_identifier; // 0x00 - uint8 is_child; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t is_child; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; // 0x1E - uint8 vehicle_sprite_type; // 0x1F - uint8 bank_rotation; // 0x20 - uint8 pad_21[3]; - sint32 remaining_distance; // 0x24 - sint32 velocity; // 0x28 - sint32 acceleration; // 0x2C - uint8 ride; // 0x30 - uint8 vehicle_type; // 0x31 + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; // 0x1E + uint8_t vehicle_sprite_type; // 0x1F + uint8_t bank_rotation; // 0x20 + uint8_t pad_21[3]; + int32_t remaining_distance; // 0x24 + int32_t velocity; // 0x28 + int32_t acceleration; // 0x2C + uint8_t ride; // 0x30 + uint8_t vehicle_type; // 0x31 rct_vehicle_colour colours; // 0x32 union { - uint16 track_progress; // 0x34 + uint16_t track_progress; // 0x34 struct { - sint8 var_34; - uint8 var_35; + int8_t var_34; + uint8_t var_35; }; }; union { - sint16 track_direction; // 0x36 (0000 0000 0000 0011) - sint16 track_type; // 0x36 (0000 0011 1111 1100) + int16_t track_direction; // 0x36 (0000 0000 0000 0011) + int16_t track_type; // 0x36 (0000 0011 1111 1100) LocationXY8 boat_location; // 0x36 }; - uint16 track_x; // 0x38 - uint16 track_y; // 0x3A - uint16 track_z; // 0x3C - uint16 next_vehicle_on_train; // 0x3E + uint16_t track_x; // 0x38 + uint16_t track_y; // 0x3A + uint16_t track_z; // 0x3C + uint16_t next_vehicle_on_train; // 0x3E // The previous vehicle on the same train or the last vehicle on the previous or only train. - uint16 prev_vehicle_on_ride; // 0x40 + uint16_t prev_vehicle_on_ride; // 0x40 // The next vehicle on the same train or the first vehicle on the next or only train - uint16 next_vehicle_on_ride; // 0x42 + uint16_t next_vehicle_on_ride; // 0x42 - uint16 var_44; - uint16 mass; // 0x46 - uint16 update_flags; // 0x48 - uint8 swing_sprite; - uint8 current_station; // 0x4B + uint16_t var_44; + uint16_t mass; // 0x46 + uint16_t update_flags; // 0x48 + uint8_t swing_sprite; + uint8_t current_station; // 0x4B union { - sint16 swinging_car_var_0; // 0x4C - sint16 current_time; // 0x4C + int16_t swinging_car_var_0; // 0x4C + int16_t current_time; // 0x4C struct { - sint8 ferris_wheel_var_0; // 0x4C - sint8 ferris_wheel_var_1; // 0x4D + int8_t ferris_wheel_var_0; // 0x4C + int8_t ferris_wheel_var_1; // 0x4D }; }; - sint16 var_4E; - uint8 status; // 0x50 - uint8 sub_state; // 0x51 - uint16 peep[32]; // 0x52 - uint8 peep_tshirt_colours[32]; // 0x92 - uint8 num_seats; // 0xB2 - uint8 num_peeps; // 0xB3 - uint8 next_free_seat; // 0xB4 - uint8 restraints_position; // 0xB5 0 == Close, 255 == Open - sint16 spin_speed; - uint16 sound2_flags; - uint8 spin_sprite; - uint8 sound1_id; // 0xBB - uint8 sound1_volume; // 0xBC - uint8 sound2_id; // 0xBD - uint8 sound2_volume; // 0xBE - sint8 sound_vector_factor; + int16_t var_4E; + uint8_t status; // 0x50 + uint8_t sub_state; // 0x51 + uint16_t peep[32]; // 0x52 + uint8_t peep_tshirt_colours[32]; // 0x92 + uint8_t num_seats; // 0xB2 + uint8_t num_peeps; // 0xB3 + uint8_t next_free_seat; // 0xB4 + uint8_t restraints_position; // 0xB5 0 == Close, 255 == Open + int16_t spin_speed; + uint16_t sound2_flags; + uint8_t spin_sprite; + uint8_t sound1_id; // 0xBB + uint8_t sound1_volume; // 0xBC + uint8_t sound2_id; // 0xBD + uint8_t sound2_volume; // 0xBE + int8_t sound_vector_factor; union { - uint16 var_C0; - uint16 time_waiting; // 0xC0 - uint16 cable_lift_target; // 0xC0 + uint16_t var_C0; + uint16_t time_waiting; // 0xC0 + uint16_t cable_lift_target; // 0xC0 }; - uint8 speed; // 0xC2 - uint8 powered_acceleration; // 0xC3 - uint8 var_C4; - uint8 animation_frame; - uint8 pad_C6[0x2]; - uint16 var_C8; - uint16 var_CA; - uint8 scream_sound_id; // 0xCC - uint8 var_CD; + uint8_t speed; // 0xC2 + uint8_t powered_acceleration; // 0xC3 + uint8_t var_C4; + uint8_t animation_frame; + uint8_t pad_C6[0x2]; + uint16_t var_C8; + uint16_t var_CA; + uint8_t scream_sound_id; // 0xCC + uint8_t var_CD; union { - uint8 var_CE; - uint8 num_laps; // 0xCE + uint8_t var_CE; + uint8_t num_laps; // 0xCE }; union { - uint8 var_CF; - uint8 brake_speed; // 0xCF + uint8_t var_CF; + uint8_t brake_speed; // 0xCF }; - uint16 lost_time_out; // 0xD0 - sint8 vertical_drop_countdown; // 0xD1 - uint8 var_D3; - uint8 mini_golf_current_animation; - uint8 mini_golf_flags; // 0xD5 - uint8 ride_subtype; // 0xD6 - uint8 colours_extended; // 0xD7 + uint16_t lost_time_out; // 0xD0 + int8_t vertical_drop_countdown; // 0xD1 + uint8_t var_D3; + uint8_t mini_golf_current_animation; + uint8_t mini_golf_flags; // 0xD5 + uint8_t ride_subtype; // 0xD6 + uint8_t colours_extended; // 0xD7 }; struct rct1_peep { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; // 0x1E - uint8 pad_1F[3]; + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; // 0x1E + uint8_t pad_1F[3]; rct_string_id name_string_idx; // 0x22 - uint16 next_x; // 0x24 - uint16 next_y; // 0x26 - uint8 next_z; // 0x28 - uint8 next_flags; // 0x29 - uint8 outside_of_park; // 0x2A - uint8 state; // 0x2B - uint8 sub_state; // 0x2C - uint8 sprite_type; // 0x2D - uint8 type; // 0x2E + uint16_t next_x; // 0x24 + uint16_t next_y; // 0x26 + uint8_t next_z; // 0x28 + uint8_t next_flags; // 0x29 + uint8_t outside_of_park; // 0x2A + uint8_t state; // 0x2B + uint8_t sub_state; // 0x2C + uint8_t sprite_type; // 0x2D + uint8_t type; // 0x2E union{ - uint8 staff_type; // 0x2F - uint8 no_of_rides; // 0x2F + uint8_t staff_type; // 0x2F + uint8_t no_of_rides; // 0x2F }; - uint8 tshirt_colour; // 0x30 - uint8 trousers_colour; // 0x31 - uint16 destination_x; // 0x32 Location that the peep is trying to get to - uint16 destination_y; // 0x34 - uint8 destination_tolerance; // 0x36 How close to destination before next action/state 0 = exact - uint8 var_37; - uint8 energy; // 0x38 - uint8 energy_target; // 0x39 - uint8 happiness; // 0x3A - uint8 happiness_target; // 0x3B - uint8 nausea; // 0x3C - uint8 nausea_target; // 0x3D - uint8 hunger; // 0x3E - uint8 thirst; // 0x3F - uint8 toilet; // 0x40 - uint8 mass; // 0x41 - uint8 time_to_consume; - uint8 intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits - uint8 nausea_tolerance; // 0x44 - uint8 window_invalidate_flags; // 0x45 + uint8_t tshirt_colour; // 0x30 + uint8_t trousers_colour; // 0x31 + uint16_t destination_x; // 0x32 Location that the peep is trying to get to + uint16_t destination_y; // 0x34 + uint8_t destination_tolerance; // 0x36 How close to destination before next action/state 0 = exact + uint8_t var_37; + uint8_t energy; // 0x38 + uint8_t energy_target; // 0x39 + uint8_t happiness; // 0x3A + uint8_t happiness_target; // 0x3B + uint8_t nausea; // 0x3C + uint8_t nausea_target; // 0x3D + uint8_t hunger; // 0x3E + uint8_t thirst; // 0x3F + uint8_t toilet; // 0x40 + uint8_t mass; // 0x41 + uint8_t time_to_consume; + uint8_t intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits + uint8_t nausea_tolerance; // 0x44 + uint8_t window_invalidate_flags; // 0x45 money16 paid_on_drink; // 0x46 - uint8 ride_types_been_on[16]; // 0x48 - uint32 item_extra_flags; // 0x58 - uint8 photo2_ride_ref; // 0x5C - uint8 photo3_ride_ref; // 0x5D - uint8 photo4_ride_ref; // 0x5E - uint8 pad_5F[0x09]; // 0x5F - uint8 current_ride; // 0x68 - uint8 current_ride_station; // 0x69 - uint8 current_train; // 0x6A + uint8_t ride_types_been_on[16]; // 0x48 + uint32_t item_extra_flags; // 0x58 + uint8_t photo2_ride_ref; // 0x5C + uint8_t photo3_ride_ref; // 0x5D + uint8_t photo4_ride_ref; // 0x5E + uint8_t pad_5F[0x09]; // 0x5F + uint8_t current_ride; // 0x68 + uint8_t current_ride_station; // 0x69 + uint8_t current_train; // 0x6A union{ struct{ - uint8 current_car; // 0x6B - uint8 current_seat; // 0x6C + uint8_t current_car; // 0x6B + uint8_t current_seat; // 0x6C }; - uint16 time_to_sitdown; //0x6B + uint16_t time_to_sitdown; //0x6B struct{ - uint8 time_to_stand; //0x6B - uint8 standing_flags; //0x6C + uint8_t time_to_stand; //0x6B + uint8_t standing_flags; //0x6C }; }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower - uint8 special_sprite; // 0x6D - uint8 action_sprite_type; // 0x6E + uint8_t special_sprite; // 0x6D + uint8_t action_sprite_type; // 0x6E // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which reads this again - uint8 next_action_sprite_type; // 0x6F - uint8 action_sprite_image_offset; // 0x70 - uint8 action; // 0x71 - uint8 action_frame; // 0x72 - uint8 step_progress; + uint8_t next_action_sprite_type; // 0x6F + uint8_t action_sprite_image_offset; // 0x70 + uint8_t action; // 0x71 + uint8_t action_frame; // 0x72 + uint8_t step_progress; union { - uint16 mechanic_time_since_call; // time getting to ride to fix - uint16 next_in_queue; // 0x74 + uint16_t mechanic_time_since_call; // time getting to ride to fix + uint16_t next_in_queue; // 0x74 }; - uint8 pad_76; - uint8 pad_77; + uint8_t pad_76; + uint8_t pad_77; union{ - uint8 maze_last_edge; // 0x78 - uint8 direction; //Direction ? + uint8_t maze_last_edge; // 0x78 + uint8_t direction; //Direction ? }; - uint8 interaction_ride_index; - uint16 time_in_queue; // 0x7A - uint8 rides_been_on[32]; // 0x7C + uint8_t interaction_ride_index; + uint16_t time_in_queue; // 0x7A + uint8_t rides_been_on[32]; // 0x7C // 255 bit bitmap of every ride the peep has been on see // window_peep_rides_update for how to use. - uint32 id; // 0x9C + uint32_t id; // 0x9C money32 cash_in_pocket; // 0xA0 money32 cash_spent; // 0xA4 - sint32 time_in_park; // 0xA8 - sint8 rejoin_queue_timeout; // 0xAC - uint8 previous_ride; // 0xAD - uint16 previous_ride_time_out; // 0xAE + int32_t time_in_park; // 0xA8 + int8_t rejoin_queue_timeout; // 0xAC + uint8_t previous_ride; // 0xAD + uint16_t previous_ride_time_out; // 0xAE rct_peep_thought thoughts[PEEP_MAX_THOUGHTS]; // 0xB0 - uint8 pad_C4; + uint8_t pad_C4; union { - uint8 staff_id; // 0xC5 - uint8 guest_heading_to_ride_id; // 0xC5 + uint8_t staff_id; // 0xC5 + uint8_t guest_heading_to_ride_id; // 0xC5 }; union { - uint8 staff_orders; // 0xC6 - uint8 peep_is_lost_countdown; // 0xC6 + uint8_t staff_orders; // 0xC6 + uint8_t peep_is_lost_countdown; // 0xC6 }; - uint8 photo1_ride_ref; // 0xC7 - uint32 peep_flags; // 0xC8 + uint8_t photo1_ride_ref; // 0xC7 + uint32_t peep_flags; // 0xC8 rct12_xyzd8 pathfind_goal; // 0xCC rct12_xyzd8 pathfind_history[4]; // 0xD0 - uint8 no_action_frame_num; // 0xE0 + uint8_t no_action_frame_num; // 0xE0 // 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8 litter_count; // 0xE1 + uint8_t litter_count; // 0xE1 union{ - uint8 time_on_ride; // 0xE2 - uint8 staff_mowing_timeout; // 0xE2 + uint8_t time_on_ride; // 0xE2 + uint8_t staff_mowing_timeout; // 0xE2 }; // 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8 disgusting_count; // 0xE3 + uint8_t disgusting_count; // 0xE3 money16 paid_to_enter; // 0xE4 money16 paid_on_rides; // 0xE6 money16 paid_on_food; // 0xE8 money16 paid_on_souvenirs; // 0xEA - uint8 no_of_food; // 0xEC - uint8 no_of_drinks; // 0xED - uint8 no_of_souvenirs; // 0xEE - uint8 vandalism_seen; // 0xEF - uint8 voucher_type; // 0xF0 - uint8 voucher_arguments; // 0xF1 ride_id or string_offset_id - uint8 surroundings_thought_timeout; // 0xF2 - uint8 angriness; // 0xF3 - uint8 time_lost; - uint8 days_in_queue; // 0xF5 - uint8 balloon_colour; // 0xF6 - uint8 umbrella_colour; // 0xF7 - uint8 hat_colour; // 0xF8 - uint8 favourite_ride; // 0xF9 - uint8 favourite_ride_rating; // 0xFA - uint8 pad_FB; - uint32 item_standard_flags; // 0xFC + uint8_t no_of_food; // 0xEC + uint8_t no_of_drinks; // 0xED + uint8_t no_of_souvenirs; // 0xEE + uint8_t vandalism_seen; // 0xEF + uint8_t voucher_type; // 0xF0 + uint8_t voucher_arguments; // 0xF1 ride_id or string_offset_id + uint8_t surroundings_thought_timeout; // 0xF2 + uint8_t angriness; // 0xF3 + uint8_t time_lost; + uint8_t days_in_queue; // 0xF5 + uint8_t balloon_colour; // 0xF6 + uint8_t umbrella_colour; // 0xF7 + uint8_t hat_colour; // 0xF8 + uint8_t favourite_ride; // 0xF9 + uint8_t favourite_ride_rating; // 0xFA + uint8_t pad_FB; + uint32_t item_standard_flags; // 0xFC }; assert_struct_size(rct1_peep, 0x100); @@ -544,7 +544,7 @@ enum RCT1_PEEP_SPRITE_TYPE { }; union rct1_sprite { - uint8 pad_00[0x100]; + uint8_t pad_00[0x100]; rct1_unk_sprite unknown; rct1_vehicle vehicle; rct1_peep peep; @@ -560,11 +560,11 @@ union rct1_sprite { assert_struct_size(rct1_sprite, 0x100); struct rct1_research_item { - uint8 item; - uint8 related_ride; - uint8 type; - uint8 flags; - uint8 category; + uint8_t item; + uint8_t related_ride; + uint8_t type; + uint8_t flags; + uint8_t category; }; assert_struct_size(rct1_research_item, 5); @@ -573,174 +573,174 @@ assert_struct_size(rct1_research_item, 5); * size: 0x1F850C */ struct rct1_s4 { - uint16 month; - uint16 day; - uint32 ticks; - uint32 random_a; - uint32 random_b; + uint16_t month; + uint16_t day; + uint32_t ticks; + uint32_t random_a; + uint32_t random_b; rct_tile_element tile_elements[RCT1_MAX_TILE_ELEMENTS]; - uint32 unk_counter; + uint32_t unk_counter; rct1_sprite sprites[RCT1_MAX_SPRITES]; - uint16 next_sprite_index; - uint16 first_vehicle_sprite_index; - uint16 first_peep_sprite_index; - uint16 first_duck_sprite_index; - uint16 first_litter_sprite_index; - uint16 first_oversized_ride_car_sprite_index; - uint16 sprites_available; - uint16 num_vehicle_sprites; - uint16 num_peep_sprites; - uint16 num_duck_sprites; - uint16 num_litter_sprites; - uint16 num_oversized_ride_car_sprites; - uint32 park_name_string_index; - uint32 unk_198830; + uint16_t next_sprite_index; + uint16_t first_vehicle_sprite_index; + uint16_t first_peep_sprite_index; + uint16_t first_duck_sprite_index; + uint16_t first_litter_sprite_index; + uint16_t first_oversized_ride_car_sprite_index; + uint16_t sprites_available; + uint16_t num_vehicle_sprites; + uint16_t num_peep_sprites; + uint16_t num_duck_sprites; + uint16_t num_litter_sprites; + uint16_t num_oversized_ride_car_sprites; + uint32_t park_name_string_index; + uint32_t unk_198830; money32 cash; money32 loan; - uint32 park_flags; + uint32_t park_flags; money16 park_entrance_fee; rct1_entrance park_entrance; - uint8 unk_198849; + uint8_t unk_198849; rct12_peep_spawn peep_spawn[RCT12_MAX_PEEP_SPAWNS]; - uint8 unk_198856; - uint8 research_level; - uint32 unk_198858; - uint8 available_rides[32]; - uint8 available_vehicles[32]; - uint32 ride_feature_1[128]; - uint32 ride_feature_2[128]; - uint16 guests_in_park; - uint16 unk_198C9E; + uint8_t unk_198856; + uint8_t research_level; + uint32_t unk_198858; + uint8_t available_rides[32]; + uint8_t available_vehicles[32]; + uint32_t ride_feature_1[128]; + uint32_t ride_feature_2[128]; + uint16_t guests_in_park; + uint16_t unk_198C9E; money32 expenditure[RCT12_EXPENDITURE_TABLE_MONTH_COUNT][RCT12_EXPENDITURE_TYPE_COUNT]; - uint32 guests_in_park_2; - uint8 unk_199024; + uint32_t guests_in_park_2; + uint8_t unk_199024; colour_t handman_colour; colour_t mechanic_colour; colour_t security_guard_colour; - uint8 available_scenery[128]; - uint16 available_banners; - uint8 unk_1990AA[94]; - uint16 park_rating; - uint8 park_rating_history[32]; - uint8 guests_in_park_history[32]; - uint8 research_priority; - uint8 research_progress_stage; - uint8 last_research_item; - uint8 last_research_ride; - uint8 last_research_type; - uint8 last_research_flags; + uint8_t available_scenery[128]; + uint16_t available_banners; + uint8_t unk_1990AA[94]; + uint16_t park_rating; + uint8_t park_rating_history[32]; + uint8_t guests_in_park_history[32]; + uint8_t research_priority; + uint8_t research_progress_stage; + uint8_t last_research_item; + uint8_t last_research_ride; + uint8_t last_research_type; + uint8_t last_research_flags; rct1_research_item research_items[200]; - uint8 next_research_item; - uint8 next_research_ride; - uint8 next_research_type; - uint8 next_research_flags; - uint16 research_progress; - uint8 next_research_category; - uint8 next_research_expected_day; - uint8 next_research_expected_month; - uint8 guest_initial_happiness; - uint16 park_size; - uint16 guest_generation_probability; + uint8_t next_research_item; + uint8_t next_research_ride; + uint8_t next_research_type; + uint8_t next_research_flags; + uint16_t research_progress; + uint8_t next_research_category; + uint8_t next_research_expected_day; + uint8_t next_research_expected_month; + uint8_t guest_initial_happiness; + uint16_t park_size; + uint16_t guest_generation_probability; money16 total_ride_value_for_money; money32 max_loan; money16 guest_initial_cash; - uint8 guest_initial_hunger; - uint8 guest_initial_thirst; - uint8 scenario_objective_type; - uint8 scenario_objective_years; - uint16 unk_199552; + uint8_t guest_initial_hunger; + uint8_t guest_initial_thirst; + uint8_t scenario_objective_type; + uint8_t scenario_objective_years; + uint16_t unk_199552; money32 scenario_objective_currency; - uint16 scenario_objective_num_guests; - uint8 marketing_status[20]; - uint8 marketing_assoc[20]; - uint8 unk_199582[2]; + uint16_t scenario_objective_num_guests; + uint8_t marketing_status[20]; + uint8_t marketing_assoc[20]; + uint8_t unk_199582[2]; money32 cash_history[RCT12_FINANCE_GRAPH_SIZE]; money32 total_expenditure; money32 profit; - uint8 unk_199788[8]; + uint8_t unk_199788[8]; money32 weekly_profit_history[RCT12_FINANCE_GRAPH_SIZE]; money32 park_value; money32 park_value_history[RCT12_FINANCE_GRAPH_SIZE]; - uint32 completed_company_value; - uint32 num_admissions; + uint32_t completed_company_value; + uint32_t num_admissions; money32 admission_total_income; money32 company_value; - uint8 thought_timer[16]; + uint8_t thought_timer[16]; rct12_award awards[RCT12_MAX_AWARDS]; money16 land_price; money16 construction_rights_price; - uint16 unk_199BCC; - uint16 unk_199BCE; - uint32 unk_199BD0; + uint16_t unk_199BCC; + uint16_t unk_199BCE; + uint32_t unk_199BD0; char username[64]; - uint32 game_version; + uint32_t game_version; money32 objective_completion_company_value; - uint32 finance_checksum; - uint16 num_rides; - uint16 cheat_detection_neg_num_rides; - uint16 cheat_detection_max_owned_tiles; - uint16 cheat_detection_neg_max_owned_tiles; - uint32 finance_checksum_3; - uint32 scenario_slot_index_checksum; + uint32_t finance_checksum; + uint16_t num_rides; + uint16_t cheat_detection_neg_num_rides; + uint16_t cheat_detection_max_owned_tiles; + uint16_t cheat_detection_neg_max_owned_tiles; + uint32_t finance_checksum_3; + uint32_t scenario_slot_index_checksum; char scenario_winner[32]; - uint32 finance_checksum_2; + uint32_t finance_checksum_2; char copyright_notice[40]; - uint16 cheat_detection_sv6_sc4[4]; - uint16 unk_199C84; - uint16 unk_199C86; - uint16 map_size_units; - uint16 map_size_unk_b; - uint16 map_size; - uint16 map_size_max_xy; - uint32 same_price_flags; - uint16 unk_199C94; - uint8 unk_199C96[3]; - uint8 water_colour; - uint16 unk_199C9A; + uint16_t cheat_detection_sv6_sc4[4]; + uint16_t unk_199C84; + uint16_t unk_199C86; + uint16_t map_size_units; + uint16_t map_size_unk_b; + uint16_t map_size; + uint16_t map_size_max_xy; + uint32_t same_price_flags; + uint16_t unk_199C94; + uint8_t unk_199C96[3]; + uint8_t water_colour; + uint16_t unk_199C9A; rct1_research_item research_items_LL[180]; - uint8 unk_19A020[5468]; + uint8_t unk_19A020[5468]; rct_banner banners[100]; char string_table[RCT12_MAX_USER_STRINGS][RCT12_USER_STRING_MAX_LENGTH]; - uint32 game_time_counter; + uint32_t game_time_counter; rct1_ride rides[RCT12_MAX_RIDES_IN_PARK]; - uint16 unk_game_time_counter; - uint16 view_x; - uint16 view_y; - uint8 view_zoom; - uint8 view_rotation; + uint16_t unk_game_time_counter; + uint16_t view_x; + uint16_t view_y; + uint8_t view_zoom; + uint8_t view_rotation; rct_map_animation map_animations[RCT1_MAX_ANIMATED_OBJECTS]; - uint32 num_map_animations; - uint8 unk_1CADBC[12]; - uint16 scrolling_text_step; - uint32 unk_1CADCA; - uint16 unk_1CADCE; - uint8 unk_1CADD0[116]; + uint32_t num_map_animations; + uint8_t unk_1CADBC[12]; + uint16_t scrolling_text_step; + uint32_t unk_1CADCA; + uint16_t unk_1CADCE; + uint8_t unk_1CADD0[116]; rct_ride_measurement ride_measurements[8]; - uint32 next_guest_index; - uint16 game_counter_5; - uint8 patrol_areas[(RCT1_MAX_STAFF + RCT12_STAFF_TYPE_COUNT) * RCT12_PATROL_AREA_SIZE]; - uint8 staff_modes[RCT1_MAX_STAFF]; - uint8 unk_1F431E[4]; - uint8 unk_1F4322[8]; - uint8 climate; - uint8 unk_1F432B; - uint16 climate_timer; - uint8 weather; - uint8 target_weather; - uint8 temperature; - uint8 target_temperature; - uint8 thunder_frequency; - uint8 target_thunder_frequency; - uint8 weather_gloom; - uint8 target_weather_gloom; - uint8 rain; - uint8 target_rain; + uint32_t next_guest_index; + uint16_t game_counter_5; + uint8_t patrol_areas[(RCT1_MAX_STAFF + RCT12_STAFF_TYPE_COUNT) * RCT12_PATROL_AREA_SIZE]; + uint8_t staff_modes[RCT1_MAX_STAFF]; + uint8_t unk_1F431E[4]; + uint8_t unk_1F4322[8]; + uint8_t climate; + uint8_t unk_1F432B; + uint16_t climate_timer; + uint8_t weather; + uint8_t target_weather; + uint8_t temperature; + uint8_t target_temperature; + uint8_t thunder_frequency; + uint8_t target_thunder_frequency; + uint8_t weather_gloom; + uint8_t target_weather_gloom; + uint8_t rain; + uint8_t target_rain; rct12_news_item messages[RCT12_MAX_NEWS_ITEMS]; char scenario_name[62]; - uint16 scenario_slot_index; - uint32 scenario_flags; - uint8 unk_1F8358[432]; - uint32 expansion_pack_checksum; + uint16_t scenario_slot_index; + uint32_t scenario_flags; + uint8_t unk_1F8358[432]; + uint32_t expansion_pack_checksum; }; assert_struct_size(rct1_s4, 0x1F850C); @@ -749,50 +749,50 @@ assert_struct_size(rct1_s4, 0x1F850C); * size: 0x2006 */ struct rct_track_td4 { - uint8 type; // 0x00 - uint8 vehicle_type; - uint32 flags; // 0x02 - uint8 mode; // 0x06 - uint8 version_and_colour_scheme; // 0x07 0b0000_VVCC + uint8_t type; // 0x00 + uint8_t vehicle_type; + uint32_t flags; // 0x02 + uint8_t mode; // 0x06 + uint8_t version_and_colour_scheme; // 0x07 0b0000_VVCC rct_vehicle_colour vehicle_colours[RCT1_MAX_TRAINS_PER_RIDE]; // 0x08 - uint8 track_spine_colour_v0; // 0x20 - uint8 track_rail_colour_v0; // 0x21 - uint8 track_support_colour_v0; // 0x22 - uint8 depart_flags; // 0x23 - uint8 number_of_trains; // 0x24 - uint8 number_of_cars_per_train; // 0x25 - uint8 min_waiting_time; // 0x26 - uint8 max_waiting_time; // 0x27 + uint8_t track_spine_colour_v0; // 0x20 + uint8_t track_rail_colour_v0; // 0x21 + uint8_t track_support_colour_v0; // 0x22 + uint8_t depart_flags; // 0x23 + uint8_t number_of_trains; // 0x24 + uint8_t number_of_cars_per_train; // 0x25 + uint8_t min_waiting_time; // 0x26 + uint8_t max_waiting_time; // 0x27 union { - uint8 operation_setting; - uint8 launch_speed; - uint8 num_laps; - uint8 max_people; + uint8_t operation_setting; + uint8_t launch_speed; + uint8_t num_laps; + uint8_t max_people; }; - sint8 max_speed; // 0x29 - sint8 average_speed; // 0x2A - uint16 ride_length; // 0x2B - uint8 max_positive_vertical_g; // 0x2D - sint8 max_negative_vertical_g; // 0x2C - uint8 max_lateral_g; // 0x2F + int8_t max_speed; // 0x29 + int8_t average_speed; // 0x2A + uint16_t ride_length; // 0x2B + uint8_t max_positive_vertical_g; // 0x2D + int8_t max_negative_vertical_g; // 0x2C + uint8_t max_lateral_g; // 0x2F union { - uint8 num_inversions; // 0x30 - uint8 num_holes; // 0x30 + uint8_t num_inversions; // 0x30 + uint8_t num_holes; // 0x30 }; - uint8 num_drops; // 0x31 - uint8 highest_drop_height; // 0x32 - uint8 excitement; // 0x33 - uint8 intensity; // 0x34 - uint8 nausea; // 0x35 + uint8_t num_drops; // 0x31 + uint8_t highest_drop_height; // 0x32 + uint8_t excitement; // 0x33 + uint8_t intensity; // 0x34 + uint8_t nausea; // 0x35 money16 upkeep_cost; // 0x36 // Added Attractions / Loopy Landscapes only - uint8 track_spine_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x38 - uint8 track_rail_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x3C - uint8 track_support_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x40 - uint8 flags2; // 0x44 + uint8_t track_spine_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x38 + uint8_t track_rail_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x3C + uint8_t track_support_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x40 + uint8_t flags2; // 0x44 - uint8 var_45[0x7F]; // 0x45 + uint8_t var_45[0x7F]; // 0x45 void *elements; // 0xC4 (data starts here in file, 38 for original RCT1) size_t elementsSize; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index d3c39db397..2cdb9bf3d2 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -62,9 +62,9 @@ using namespace OpenRCT2; -static uint8 GetPathType(rct_tile_element * tileElement); -static sint32 GetWallType(rct_tile_element * tileElement, sint32 edge); -static uint8 GetWallColour(rct_tile_element * tileElement); +static uint8_t GetPathType(rct_tile_element * tileElement); +static int32_t GetWallType(rct_tile_element * tileElement, int32_t edge); +static uint8_t GetWallColour(rct_tile_element * tileElement); class EntryList { @@ -107,8 +107,8 @@ class S4Importer final : public IParkImporter private: std::string _s4Path; rct1_s4 _s4 = {}; - uint8 _gameVersion = 0; - uint8 _parkValueConversionFactor = 0; + uint8_t _gameVersion = 0; + uint8_t _parkValueConversionFactor = 0; // Lists of dynamic object entries EntryList _rideEntries; @@ -121,18 +121,18 @@ private: EntryList _waterEntry; // Lookup tables for converting from RCT1 hard coded types to the new dynamic object entries - uint8 _rideTypeToRideEntryMap[RCT1_RIDE_TYPE_COUNT]{}; - uint8 _vehicleTypeToRideEntryMap[RCT1_VEHICLE_TYPE_COUNT]{}; - uint8 _smallSceneryTypeToEntryMap[256]{}; - uint8 _largeSceneryTypeToEntryMap[256]{}; - uint8 _wallTypeToEntryMap[256]{}; - uint8 _pathTypeToEntryMap[24]{}; - uint8 _pathAdditionTypeToEntryMap[16]{}; - uint8 _sceneryThemeTypeToEntryMap[24]{}; + uint8_t _rideTypeToRideEntryMap[RCT1_RIDE_TYPE_COUNT]{}; + uint8_t _vehicleTypeToRideEntryMap[RCT1_VEHICLE_TYPE_COUNT]{}; + uint8_t _smallSceneryTypeToEntryMap[256]{}; + uint8_t _largeSceneryTypeToEntryMap[256]{}; + uint8_t _wallTypeToEntryMap[256]{}; + uint8_t _pathTypeToEntryMap[24]{}; + uint8_t _pathAdditionTypeToEntryMap[16]{}; + uint8_t _sceneryThemeTypeToEntryMap[24]{}; // Research - uint8 _researchRideEntryUsed[MAX_RIDE_OBJECTS]{}; - uint8 _researchRideTypeUsed[RCT1_RIDE_TYPE_COUNT]{}; + uint8_t _researchRideEntryUsed[MAX_RIDE_OBJECTS]{}; + uint8_t _researchRideTypeUsed[RCT1_RIDE_TYPE_COUNT]{}; // Scenario repository - used for determining scenario name IScenarioRepository * _scenarioRepository = GetScenarioRepository(); @@ -265,7 +265,7 @@ public: return true; } - sint32 CorrectRCT1ParkValue(money32 oldParkValue) + int32_t CorrectRCT1ParkValue(money32 oldParkValue) { if (oldParkValue == MONEY32_UNDEFINED) { @@ -297,12 +297,12 @@ private: { auto s4 = std::make_unique(); size_t dataSize = stream->GetLength() - stream->GetPosition(); - auto deleter_lambda = [dataSize](uint8 * ptr) { Memory::FreeArray(ptr, dataSize); }; - auto data = std::unique_ptr(stream->ReadArray(dataSize), deleter_lambda); - auto decodedData = std::unique_ptr)>(Memory::Allocate(sizeof(rct1_s4)), &Memory::Free); + auto deleter_lambda = [dataSize](uint8_t * ptr) { Memory::FreeArray(ptr, dataSize); }; + auto data = std::unique_ptr(stream->ReadArray(dataSize), deleter_lambda); + auto decodedData = std::unique_ptr)>(Memory::Allocate(sizeof(rct1_s4)), &Memory::Free); size_t decodedSize; - sint32 fileType = sawyercoding_detect_file_type(data.get(), dataSize); + int32_t fileType = sawyercoding_detect_file_type(data.get(), dataSize); if (isScenario && (fileType & FILE_VERSION_MASK) != FILE_VERSION_RCT1) { decodedSize = sawyercoding_decode_sc4(data.get(), decodedData.get(), dataSize, sizeof(rct1_s4)); @@ -330,7 +330,7 @@ private: _parkValueConversionFactor = 0; InitialiseEntryMaps(); - uint16 mapSize = _s4.map_size == 0 ? 128 : _s4.map_size; + uint16_t mapSize = _s4.map_size == 0 ? 128 : _s4.map_size; String::Set(gScenarioFileName, sizeof(gScenarioFileName), GetRCT1ScenarioName().c_str()); @@ -433,10 +433,10 @@ private: break; case RCT1_RESEARCH_TYPE_RIDE: { - uint8 rideType = researchItem->item; + uint8_t rideType = researchItem->item; // Add all vehicles for this ride type - uint32 numVehicles = 0; + uint32_t numVehicles = 0; for (size_t j = 0; j < researchListCount; j++) { const rct1_research_item *researchItem2 = &researchList[j]; @@ -483,8 +483,8 @@ private: switch (tileElement->GetType()) { case TILE_ELEMENT_TYPE_PATH: { - uint8 pathType = GetPathType(tileElement); - uint8 pathAdditionsType = tileElement->properties.path.additions & 0x0F; + uint8_t pathType = GetPathType(tileElement); + uint8_t pathAdditionsType = tileElement->properties.path.additions & 0x0F; AddEntryForPath(pathType); AddEntryForPathAddition(pathAdditionsType); @@ -498,9 +498,9 @@ private: break; case TILE_ELEMENT_TYPE_WALL: { - for (sint32 edge = 0; edge < 4; edge++) + for (int32_t edge = 0; edge < 4; edge++) { - sint32 type = GetWallType(tileElement, edge); + int32_t type = GetWallType(tileElement, edge); if (type != -1) { @@ -535,7 +535,7 @@ private: void AddAvailableEntriesFromSceneryGroups() { - for (sint32 sceneryTheme = 0; sceneryTheme <= RCT1_SCENERY_THEME_PAGODA; sceneryTheme++) + for (int32_t sceneryTheme = 0; sceneryTheme <= RCT1_SCENERY_THEME_PAGODA; sceneryTheme++) { if (sceneryTheme != 0 && _sceneryThemeTypeToEntryMap[sceneryTheme] == 255) continue; @@ -547,7 +547,7 @@ private: auto foundObject = objectRepository->FindObject(objectName); if (foundObject != nullptr) { - uint8 objectType = object_entry_get_type(&foundObject->ObjectEntry); + uint8_t objectType = object_entry_get_type(&foundObject->ObjectEntry); switch (objectType) { case OBJECT_TYPE_SMALL_SCENERY: case OBJECT_TYPE_LARGE_SCENERY: @@ -585,7 +585,7 @@ private: _waterEntry.GetOrAddEntry(entryName); } - void AddEntryForRideType(uint8 rideType) + void AddEntryForRideType(uint8_t rideType) { assert(rideType < Util::CountOf(_rideTypeToRideEntryMap)); if (_rideTypeToRideEntryMap[rideType] == 255) @@ -593,11 +593,11 @@ private: const char * entryName = RCT1::GetRideTypeObject(rideType); size_t entryIndex = _rideEntries.GetOrAddEntry(entryName); - _rideTypeToRideEntryMap[rideType] = (uint8)entryIndex; + _rideTypeToRideEntryMap[rideType] = (uint8_t)entryIndex; } } - void AddEntryForVehicleType(uint8 rideType, uint8 vehicleType) + void AddEntryForVehicleType(uint8_t rideType, uint8_t vehicleType) { assert(vehicleType < Util::CountOf(_vehicleTypeToRideEntryMap)); if (_vehicleTypeToRideEntryMap[vehicleType] == 255) @@ -605,12 +605,12 @@ private: const char * entryName = RCT1::GetVehicleObject(vehicleType); size_t entryIndex = _rideEntries.GetOrAddEntry(entryName); - _vehicleTypeToRideEntryMap[vehicleType] = (uint8)entryIndex; - _rideTypeToRideEntryMap[rideType] = (uint8)entryIndex; + _vehicleTypeToRideEntryMap[vehicleType] = (uint8_t)entryIndex; + _rideTypeToRideEntryMap[rideType] = (uint8_t)entryIndex; } } - void AddEntryForSmallScenery(uint8 smallSceneryType) + void AddEntryForSmallScenery(uint8_t smallSceneryType) { assert(smallSceneryType < Util::CountOf(_smallSceneryTypeToEntryMap)); if (_smallSceneryTypeToEntryMap[smallSceneryType] == 255) @@ -618,11 +618,11 @@ private: const char * entryName = RCT1::GetSmallSceneryObject(smallSceneryType); size_t entryIndex = _smallSceneryEntries.GetOrAddEntry(entryName); - _smallSceneryTypeToEntryMap[smallSceneryType] = (uint8)entryIndex; + _smallSceneryTypeToEntryMap[smallSceneryType] = (uint8_t)entryIndex; } } - void AddEntryForLargeScenery(uint8 largeSceneryType) + void AddEntryForLargeScenery(uint8_t largeSceneryType) { assert(largeSceneryType < Util::CountOf(_largeSceneryTypeToEntryMap)); if (_largeSceneryTypeToEntryMap[largeSceneryType] == 255) @@ -630,11 +630,11 @@ private: const char * entryName = RCT1::GetLargeSceneryObject(largeSceneryType); size_t entryIndex = _largeSceneryEntries.GetOrAddEntry(entryName); - _largeSceneryTypeToEntryMap[largeSceneryType] = (uint8)entryIndex; + _largeSceneryTypeToEntryMap[largeSceneryType] = (uint8_t)entryIndex; } } - void AddEntryForWall(uint8 wallType) + void AddEntryForWall(uint8_t wallType) { assert(wallType < Util::CountOf(_wallTypeToEntryMap)); if (_wallTypeToEntryMap[wallType] == 255) @@ -642,11 +642,11 @@ private: const char * entryName = RCT1::GetWallObject(wallType); size_t entryIndex = _wallEntries.GetOrAddEntry(entryName); - _wallTypeToEntryMap[wallType] = (uint8)entryIndex; + _wallTypeToEntryMap[wallType] = (uint8_t)entryIndex; } } - void AddEntryForPath(uint8 pathType) + void AddEntryForPath(uint8_t pathType) { assert(pathType < Util::CountOf(_pathTypeToEntryMap)); if (_pathTypeToEntryMap[pathType] == 255) @@ -654,30 +654,30 @@ private: const char * entryName = RCT1::GetPathObject(pathType); size_t entryIndex = _pathEntries.GetOrAddEntry(entryName); - _pathTypeToEntryMap[pathType] = (uint8)entryIndex; + _pathTypeToEntryMap[pathType] = (uint8_t)entryIndex; } } - void AddEntryForPathAddition(uint8 pathAdditionType) + void AddEntryForPathAddition(uint8_t pathAdditionType) { if (pathAdditionType == RCT1_PATH_ADDITION_NONE) return; if (_pathAdditionTypeToEntryMap[pathAdditionType] == 255) { - uint8 normalisedPathAdditionType = RCT1::NormalisePathAddition(pathAdditionType); + uint8_t normalisedPathAdditionType = RCT1::NormalisePathAddition(pathAdditionType); if (_pathAdditionTypeToEntryMap[normalisedPathAdditionType] == 255) { const char * entryName = RCT1::GetPathAddtionObject(normalisedPathAdditionType); size_t entryIndex = _pathAdditionEntries.GetOrAddEntry(entryName); - _pathAdditionTypeToEntryMap[normalisedPathAdditionType] = (uint8)entryIndex; + _pathAdditionTypeToEntryMap[normalisedPathAdditionType] = (uint8_t)entryIndex; } _pathAdditionTypeToEntryMap[pathAdditionType] = _pathAdditionTypeToEntryMap[normalisedPathAdditionType]; } } - void AddEntriesForSceneryTheme(uint8 sceneryThemeType) + void AddEntriesForSceneryTheme(uint8_t sceneryThemeType) { if (sceneryThemeType == RCT1_SCENERY_THEME_GENERAL || sceneryThemeType == RCT1_SCENERY_THEME_JUMPING_FOUNTAINS || @@ -696,14 +696,14 @@ private: else { size_t entryIndex = _sceneryGroupEntries.GetOrAddEntry(entryName); - _sceneryThemeTypeToEntryMap[sceneryThemeType] = (uint8)entryIndex; + _sceneryThemeTypeToEntryMap[sceneryThemeType] = (uint8_t)entryIndex; } } } void ImportRides() { - for (sint32 i = 0; i < RCT12_MAX_RIDES_IN_PARK; i++) + for (int32_t i = 0; i < RCT12_MAX_RIDES_IN_PARK; i++) { if (_s4.rides[i].type != RIDE_TYPE_NULL) { @@ -779,7 +779,7 @@ private: // Station dst->overall_view = src->overall_view; - for (sint32 i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) + for (int32_t i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) { dst->station_starts[i] = src->station_starts[i]; dst->station_heights[i] = src->station_height[i] / 2; @@ -807,7 +807,7 @@ private: dst->length[i] = src->length[i]; } // All other values take 0 as their default. Since they're already memset to that, no need to do it again. - for (sint32 i = RCT12_MAX_STATIONS_PER_RIDE; i < MAX_STATIONS; i++) + for (int32_t i = RCT12_MAX_STATIONS_PER_RIDE; i < MAX_STATIONS; i++) { dst->station_starts[i].xy = RCT_XY8_UNDEFINED; dst->train_at_station[i] = 255; @@ -819,11 +819,11 @@ private: dst->num_stations = src->num_stations; // Vehicle links (indexes converted later) - for (sint32 i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++) + for (int32_t i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++) { dst->vehicles[i] = src->vehicles[i]; } - for (sint32 i = RCT1_MAX_TRAINS_PER_RIDE; i < MAX_VEHICLES_PER_RIDE; i++) + for (int32_t i = RCT1_MAX_TRAINS_PER_RIDE; i < MAX_VEHICLES_PER_RIDE; i++) { dst->vehicles[i] = SPRITE_INDEX_NULL; } @@ -1055,15 +1055,15 @@ private: } } - void FixRideVehicleLinks(const uint16 * spriteIndexMap) + void FixRideVehicleLinks(const uint16_t * spriteIndexMap) { - uint8 i; + uint8_t i; Ride * ride; FOR_ALL_RIDES(i, ride) { - for (uint8 j = 0; j < Util::CountOf(ride->vehicles); j++) + for (uint8_t j = 0; j < Util::CountOf(ride->vehicles); j++) { - uint16 originalIndex = ride->vehicles[j]; + uint16_t originalIndex = ride->vehicles[j]; if (originalIndex != SPRITE_INDEX_NULL) { ride->vehicles[j] = spriteIndexMap[originalIndex]; @@ -1074,7 +1074,7 @@ private: void ImportRideMeasurements() { - for (sint32 i = 0; i < MAX_RIDE_MEASUREMENTS; i++) + for (int32_t i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { rct_ride_measurement * dst = get_ride_measurement(i); rct_ride_measurement * src = &_s4.ride_measurements[i]; @@ -1085,7 +1085,7 @@ private: void ImportRideMeasurement(rct_ride_measurement * dst, rct_ride_measurement * src) { *dst = *src; - for (sint32 i = 0; i < RIDE_MEASUREMENT_MAX_ITEMS; i++) + for (int32_t i = 0; i < RIDE_MEASUREMENT_MAX_ITEMS; i++) { dst->velocity[i] /= 2; dst->altitude[i] /= 2; @@ -1105,7 +1105,7 @@ private: void ImportVehicles() { std::vector vehicles; - uint16 spriteIndexMap[RCT1_MAX_SPRITES]; + uint16_t spriteIndexMap[RCT1_MAX_SPRITES]; for (int i = 0; i < RCT1_MAX_SPRITES; i++) { spriteIndexMap[i] = SPRITE_INDEX_NULL; @@ -1138,7 +1138,7 @@ private: void ImportVehicle(rct_vehicle * dst, rct1_vehicle * src) { Ride * ride = get_ride(src->ride); - uint8 vehicleEntryIndex = RCT1::GetVehicleSubEntryIndex(src->vehicle_type); + uint8_t vehicleEntryIndex = RCT1::GetVehicleSubEntryIndex(src->vehicle_type); dst->sprite_identifier = SPRITE_IDENTIFIER_VEHICLE; dst->ride = src->ride; @@ -1201,7 +1201,7 @@ private: // Guests (indexes converted later) for (int i = 0; i < 32; i++) { - uint16 spriteIndex = src->peep[i]; + uint16_t spriteIndex = src->peep[i]; dst->peep[i] = spriteIndex; if (spriteIndex != SPRITE_INDEX_NULL) { @@ -1236,7 +1236,7 @@ private: void SetVehicleColours(rct_vehicle * dst, rct1_vehicle * src) { rct1_ride * srcRide = &_s4.rides[src->ride]; - uint8 vehicleTypeIndex = srcRide->vehicle_type; + uint8_t vehicleTypeIndex = srcRide->vehicle_type; RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor(vehicleTypeIndex); // RCT1 had no third colour @@ -1280,7 +1280,7 @@ private: } } - void FixVehicleLinks(rct_vehicle * vehicle, const uint16 * spriteIndexMap) + void FixVehicleLinks(rct_vehicle * vehicle, const uint16_t * spriteIndexMap) { if (vehicle->prev_vehicle_on_ride != SPRITE_INDEX_NULL) { @@ -1296,7 +1296,7 @@ private: } } - void FixVehiclePeepLinks(rct_vehicle * vehicle, const uint16 * spriteIndexMap) + void FixVehiclePeepLinks(rct_vehicle * vehicle, const uint16_t * spriteIndexMap) { for (auto &peep : vehicle->peep) { @@ -1306,7 +1306,7 @@ private: void ImportPeeps() { - uint16 spriteIndexMap[RCT1_MAX_SPRITES]; + uint16_t spriteIndexMap[RCT1_MAX_SPRITES]; for (size_t i = 0; i < RCT1_MAX_SPRITES; i++) { spriteIndexMap[i] = SPRITE_INDEX_NULL; @@ -1557,7 +1557,7 @@ private: } } - void FixRidePeepLinks(Ride * ride, const uint16 * spriteIndexMap) + void FixRidePeepLinks(Ride * ride, const uint16_t * spriteIndexMap) { for (auto &peep : ride->last_peep_in_queue) { @@ -1570,7 +1570,7 @@ private: } } - void FixPeepNextInQueue(rct_peep * peep, const uint16 * spriteIndexMap) + void FixPeepNextInQueue(rct_peep * peep, const uint16_t * spriteIndexMap) { peep->next_in_queue = MapSpriteIndex(peep->next_in_queue, spriteIndexMap); } @@ -1587,8 +1587,8 @@ private: // index in the array ----^ ^--- bit position in the 8-bit value // We do the opposite in this function to recover the x and y values. - sint32 peepOffset = staffmember->staff_id * RCT12_PATROL_AREA_SIZE; - for (sint32 i = 0; i < RCT12_PATROL_AREA_SIZE; i++) + int32_t peepOffset = staffmember->staff_id * RCT12_PATROL_AREA_SIZE; + for (int32_t i = 0; i < RCT12_PATROL_AREA_SIZE; i++) { if (_s4.patrol_areas[peepOffset + i] == 0) { @@ -1596,20 +1596,20 @@ private: continue; } - // Loop over the bits of the uint8 - for (sint32 j = 0; j < 8; j++) + // Loop over the bits of the uint8_t + for (int32_t j = 0; j < 8; j++) { - sint8 bit = (_s4.patrol_areas[peepOffset + i] >> j) & 1; + int8_t bit = (_s4.patrol_areas[peepOffset + i] >> j) & 1; if (bit == 0) { // No patrol for this area continue; } // val contains the 5 highest bits of both the x and y coordinates - sint32 val = j | (i << 3); - sint32 x = val & 0x1F; + int32_t val = j | (i << 3); + int32_t x = val & 0x1F; x <<= 7; - sint32 y = val & 0x3E0; + int32_t y = val & 0x3E0; y <<= 2; staff_set_patrol_area(staffmember->staff_id, x, y, true); } @@ -1737,9 +1737,9 @@ private: dst->state = src->state; } - uint16 MapSpriteIndex(uint16 originalSpriteIndex, const uint16 * spriteIndexMap) + uint16_t MapSpriteIndex(uint16_t originalSpriteIndex, const uint16_t * spriteIndexMap) { - uint16 newSpriteIndex = SPRITE_INDEX_NULL; + uint16_t newSpriteIndex = SPRITE_INDEX_NULL; if (originalSpriteIndex != SPRITE_INDEX_NULL) { if (originalSpriteIndex >= RCT1_MAX_SPRITES) @@ -1853,16 +1853,16 @@ private: LoadObjects(OBJECT_TYPE_WATER, _waterEntry); } - void LoadObjects(uint8 objectType, const EntryList &entries) + void LoadObjects(uint8_t objectType, const EntryList &entries) { LoadObjects(objectType, entries.GetEntries()); } - void LoadObjects(uint8 objectType, const std::vector &entries) + void LoadObjects(uint8_t objectType, const std::vector &entries) { auto objectManager = OpenRCT2::GetContext()->GetObjectManager(); - uint32 entryIndex = 0; + uint32_t entryIndex = 0; for (const char * objectName : entries) { rct_object_entry entry; @@ -1881,12 +1881,12 @@ private: } } - void AppendRequiredObjects(std::vector& entries, uint8 objectType, const EntryList& entryList) + void AppendRequiredObjects(std::vector& entries, uint8_t objectType, const EntryList& entryList) { AppendRequiredObjects(entries, objectType, entryList.GetEntries()); } - void AppendRequiredObjects(std::vector& entries, uint8 objectType, const std::vector& objectNames) + void AppendRequiredObjects(std::vector& entries, uint8_t objectType, const std::vector& objectNames) { for (const auto objectName : objectNames) { @@ -1922,7 +1922,7 @@ private: return result; } - void GetInvalidObjects(uint8 objectType, const std::vector &entries, std::vector &missingObjects) + void GetInvalidObjects(uint8_t objectType, const std::vector &entries, std::vector &missingObjects) { auto objectRepository = OpenRCT2::GetContext()->GetObjectRepository(); for (const char * objectName : entries) @@ -1983,7 +1983,7 @@ private: std::fill(std::begin(_researchRideTypeUsed), std::end(_researchRideTypeUsed), 0); // The first six scenery groups are always available - for (uint8 i = 0; i < 6; i++) + for (uint8_t i = 0; i < 6; i++) { research_insert_scenery_group_entry(i, true); } @@ -2012,8 +2012,8 @@ private: switch (researchItem->type) { case RCT1_RESEARCH_TYPE_THEME: { - uint8 rct1SceneryTheme = researchItem->item; - uint8 sceneryGroupEntryIndex = _sceneryThemeTypeToEntryMap[rct1SceneryTheme]; + uint8_t rct1SceneryTheme = researchItem->item; + uint8_t sceneryGroupEntryIndex = _sceneryThemeTypeToEntryMap[rct1SceneryTheme]; if (sceneryGroupEntryIndex != 254 && sceneryGroupEntryIndex != 255) { @@ -2023,11 +2023,11 @@ private: } case RCT1_RESEARCH_TYPE_RIDE: { - uint8 rct1RideType = researchItem->item; + uint8_t rct1RideType = researchItem->item; _researchRideTypeUsed[rct1RideType] = true; // Add all vehicles for this ride type that are researched or before this research item - uint32 numVehicles = 0; + uint32_t numVehicles = 0; for (size_t j = 0; j < researchListCount; j++) { const rct1_research_item *researchItem2 = &researchList[j]; @@ -2054,7 +2054,7 @@ private: if (numVehicles == 0) { // No vehicles found so just add the default for this ride - uint8 rideEntryIndex = _rideTypeToRideEntryMap[rct1RideType]; + uint8_t rideEntryIndex = _rideTypeToRideEntryMap[rct1RideType]; Guard::Assert(rideEntryIndex != RIDE_ENTRY_INDEX_NULL, "rideEntryIndex was RIDE_ENTRY_INDEX_NULL"); if (!_researchRideEntryUsed[rideEntryIndex]) { @@ -2082,7 +2082,7 @@ private: } // Research funding / priority - uint8 activeResearchTypes = 0; + uint8_t activeResearchTypes = 0; if (_s4.research_priority & RCT1_RESEARCH_CATEGORY_ROLLERCOASTERS) { activeResearchTypes |= (1 << RESEARCH_CATEGORY_ROLLERCOASTER); @@ -2129,8 +2129,8 @@ private: void InsertResearchVehicle(const rct1_research_item * researchItem, bool researched) { - uint8 vehicle = researchItem->item; - uint8 rideEntryIndex = _vehicleTypeToRideEntryMap[vehicle]; + uint8_t vehicle = researchItem->item; + uint8_t rideEntryIndex = _vehicleTypeToRideEntryMap[vehicle]; if (!_researchRideEntryUsed[rideEntryIndex]) { @@ -2176,7 +2176,7 @@ private: } // Awards - for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++) + for (int32_t i = 0; i < RCT12_MAX_AWARDS; i++) { rct12_award * src = &_s4.awards[i]; Award * dst = &gCurrentAwards[i]; @@ -2205,12 +2205,12 @@ private: if (dst->Type == NEWS_ITEM_RESEARCH) { - uint8 researchItem = src->Assoc & 0x000000FF; - uint8 researchType = (src->Assoc & 0x00FF0000) >> 16; + uint8_t researchItem = src->Assoc & 0x000000FF; + uint8_t researchType = (src->Assoc & 0x00FF0000) >> 16; rct_research_item tmpResearchItem = {}; ConvertResearchEntry(&tmpResearchItem, researchItem, researchType); - dst->Assoc = (uint32)tmpResearchItem.rawValue; + dst->Assoc = (uint32_t)tmpResearchItem.rawValue; } else { @@ -2252,12 +2252,12 @@ private: gTotalRideValueForMoney = _s4.total_ride_value_for_money; } - void ConvertResearchEntry(rct_research_item * dst, uint8 srcItem, uint8 srcType) + void ConvertResearchEntry(rct_research_item * dst, uint8_t srcItem, uint8_t srcType) { dst->rawValue = RESEARCHED_ITEMS_SEPARATOR; if (srcType == RCT1_RESEARCH_TYPE_RIDE) { - uint8 entryIndex = _rideTypeToRideEntryMap[srcItem]; + uint8_t entryIndex = _rideTypeToRideEntryMap[srcItem]; if (entryIndex != 255) { @@ -2275,7 +2275,7 @@ private: } else if (srcType == RCT1_RESEARCH_TYPE_VEHICLE) { - uint8 entryIndex = _vehicleTypeToRideEntryMap[srcItem]; + uint8_t entryIndex = _vehicleTypeToRideEntryMap[srcItem]; if (entryIndex != 255) { @@ -2293,7 +2293,7 @@ private: } else if (srcType == RCT1_RESEARCH_TYPE_THEME) { - uint8 entryIndex = _sceneryThemeTypeToEntryMap[srcItem]; + uint8_t entryIndex = _sceneryThemeTypeToEntryMap[srcItem]; if (entryIndex != 254 && entryIndex != 255) { @@ -2326,7 +2326,7 @@ private: std::string name = String::ToStd(_s4.scenario_name); std::string details; - sint32 scNumber = _s4.scenario_slot_index; + int32_t scNumber = _s4.scenario_slot_index; if (scNumber != -1) { source_desc sourceDesc; @@ -2392,17 +2392,17 @@ private: rct_tile_element * * tilePointer = gTileElementTilePointers; // 128 rows of map data from RCT1 map - for (sint32 x = 0; x < RCT1_MAX_MAP_SIZE; x++) + for (int32_t x = 0; x < RCT1_MAX_MAP_SIZE; x++) { // Assign the first half of this row - for (sint32 y = 0; y < RCT1_MAX_MAP_SIZE; y++) + for (int32_t y = 0; y < RCT1_MAX_MAP_SIZE; y++) { *tilePointer++ = tileElement; while (!(tileElement++)->IsLastForTile()); } // Fill the rest of the row with blank tiles - for (sint32 y = 0; y < RCT1_MAX_MAP_SIZE; y++) + for (int32_t y = 0; y < RCT1_MAX_MAP_SIZE; y++) { nextFreeTileElement->type = TILE_ELEMENT_TYPE_SURFACE; nextFreeTileElement->flags = TILE_ELEMENT_FLAG_LAST_TILE; @@ -2417,7 +2417,7 @@ private: } // 128 extra rows left to fill with blank tiles - for (sint32 y = 0; y < 128 * 256; y++) + for (int32_t y = 0; y < 128 * 256; y++) { nextFreeTileElement->type = TILE_ELEMENT_TYPE_SURFACE; nextFreeTileElement->flags = TILE_ELEMENT_FLAG_LAST_TILE; @@ -2501,8 +2501,8 @@ private: case TILE_ELEMENT_TYPE_PATH: { // Type - uint8 pathType = GetPathType(tileElement); - uint8 entryIndex = _pathTypeToEntryMap[pathType]; + uint8_t pathType = GetPathType(tileElement); + uint8_t entryIndex = _pathTypeToEntryMap[pathType]; tileElement->type &= ~TILE_ELEMENT_DIRECTION_MASK; tileElement->flags &= ~(TILE_ELEMENT_FLAG_BROKEN | TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE); @@ -2516,10 +2516,10 @@ private: footpath_scenery_set_is_ghost(tileElement, false); // Additions - uint8 additionType = footpath_element_get_path_scenery(tileElement); + uint8_t additionType = footpath_element_get_path_scenery(tileElement); if (additionType != RCT1_PATH_ADDITION_NONE) { - uint8 normalisedType = RCT1::NormalisePathAddition(additionType); + uint8_t normalisedType = RCT1::NormalisePathAddition(additionType); entryIndex = _pathAdditionTypeToEntryMap[normalisedType]; if (additionType != normalisedType) { @@ -2532,12 +2532,12 @@ private: case TILE_ELEMENT_TYPE_ENTRANCE: if (tileElement->properties.entrance.type == ENTRANCE_TYPE_PARK_ENTRANCE) { - uint8 pathType = tileElement->properties.entrance.path_type; + uint8_t pathType = tileElement->properties.entrance.path_type; if (pathType == 0) { pathType = RCT1_FOOTPATH_TYPE_TARMAC_GRAY; } - uint8 entryIndex = _pathTypeToEntryMap[pathType]; + uint8_t entryIndex = _pathTypeToEntryMap[pathType]; tileElement->properties.entrance.path_type = entryIndex & 0x7F; } break; @@ -2553,9 +2553,9 @@ private: bool oldCheatValue = gCheatsBuildInPauseMode; gCheatsBuildInPauseMode = true; - for (sint32 x = 0; x < RCT1_MAX_MAP_SIZE; x++) + for (int32_t x = 0; x < RCT1_MAX_MAP_SIZE; x++) { - for (sint32 y = 0; y < RCT1_MAX_MAP_SIZE; y++) + for (int32_t y = 0; y < RCT1_MAX_MAP_SIZE; y++) { rct_tile_element * tileElement = map_get_first_element_at(x, y); do @@ -2565,19 +2565,19 @@ private: rct_tile_element originalTileElement = *tileElement; tile_element_remove(tileElement); - for (sint32 edge = 0; edge < 4; edge++) + for (int32_t edge = 0; edge < 4; edge++) { - sint32 type = GetWallType(&originalTileElement, edge); + int32_t type = GetWallType(&originalTileElement, edge); if (type != -1) { - sint32 colourA = RCT1::GetColour(GetWallColour(&originalTileElement)); - sint32 colourB = 0; - sint32 colourC = 0; + int32_t colourA = RCT1::GetColour(GetWallColour(&originalTileElement)); + int32_t colourB = 0; + int32_t colourC = 0; ConvertWall(&type, &colourA, &colourB); type = _wallTypeToEntryMap[type]; - const uint8 flags = + const uint8_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | @@ -2596,7 +2596,7 @@ private: gCheatsBuildInPauseMode = oldCheatValue; } - void ConvertWall(sint32 * type, sint32 * colourA, sint32 * colourB) + void ConvertWall(int32_t * type, int32_t * colourA, int32_t * colourB) { switch (*type) { case RCT1_WALL_TYPE_WOODEN_PANEL_FENCE: @@ -2634,16 +2634,16 @@ private: void FixBanners() { - for (sint32 x = 0; x < RCT1_MAX_MAP_SIZE; x++) + for (int32_t x = 0; x < RCT1_MAX_MAP_SIZE; x++) { - for (sint32 y = 0; y < RCT1_MAX_MAP_SIZE; y++) + for (int32_t y = 0; y < RCT1_MAX_MAP_SIZE; y++) { rct_tile_element * tileElement = map_get_first_element_at(x, y); do { if (tileElement->GetType() == TILE_ELEMENT_TYPE_BANNER) { - uint8 index = tileElement->properties.banner.index; + uint8_t index = tileElement->properties.banner.index; rct_banner * src = &_s4.banners[index]; rct_banner * dst = &gBanners[index]; ImportBanner(dst, src); @@ -2696,7 +2696,7 @@ private: gParkEntrances[i].x = LOCATION_NULL; } - uint8 entranceIndex = 0; + uint8_t entranceIndex = 0; tile_element_iterator it; tile_element_iterator_begin(&it); @@ -2729,7 +2729,7 @@ private: break; case TILE_ELEMENT_TYPE_LARGE_SCENERY: { - uint8 type = scenery_large_get_type(tileElement); + uint8_t type = scenery_large_get_type(tileElement); scenery_large_set_type(tileElement, _largeSceneryTypeToEntryMap[type]); break; } @@ -2737,7 +2737,7 @@ private: } } - EntryList * GetEntryList(uint8 objectType) + EntryList * GetEntryList(uint8_t objectType) { switch (objectType) { case OBJECT_TYPE_RIDE: return &_rideEntries; @@ -2809,9 +2809,9 @@ private: */ void CountBlockSections() { - for (sint32 x = 0; x < RCT1_MAX_MAP_SIZE; x++) + for (int32_t x = 0; x < RCT1_MAX_MAP_SIZE; x++) { - for (sint32 y = 0; y < RCT1_MAX_MAP_SIZE; y++) + for (int32_t y = 0; y < RCT1_MAX_MAP_SIZE; y++) { rct_tile_element * tileElement = map_get_first_element_at(x, y); do @@ -2822,7 +2822,7 @@ private: if (!track_element_is_lift_hill(tileElement)) continue; - uint8 trackType = track_element_get_type(tileElement); + uint8_t trackType = track_element_get_type(tileElement); switch (trackType) { case TRACK_ELEM_25_DEG_UP_TO_FLAT: case TRACK_ELEM_60_DEG_UP_TO_FLAT: @@ -2833,7 +2833,7 @@ private: continue; } - uint8 rideIndex = track_element_get_ride_index(tileElement); + uint8_t rideIndex = track_element_get_ride_index(tileElement); Ride * ride = get_ride(rideIndex); ride->num_block_brakes++; } @@ -2867,22 +2867,22 @@ void load_from_sc4(const utf8 * path) s4Importer->Import(); } -static uint8 GetPathType(rct_tile_element * tileElement) +static uint8_t GetPathType(rct_tile_element * tileElement) { - uint8 pathColour = tileElement->type & 3; - uint8 pathType = (tileElement->properties.path.type & FOOTPATH_PROPERTIES_TYPE_MASK) >> 2; + uint8_t pathColour = tileElement->type & 3; + uint8_t pathType = (tileElement->properties.path.type & FOOTPATH_PROPERTIES_TYPE_MASK) >> 2; pathType = pathType | pathColour; return pathType; } -static sint32 GetWallType(rct_tile_element * tileElement, sint32 edge) +static int32_t GetWallType(rct_tile_element * tileElement, int32_t edge) { - uint8 var_05 = tileElement->properties.wall.colour_3; - uint16 var_06 = tileElement->properties.wall.colour_1 | (tileElement->properties.wall.animation << 8); + uint8_t var_05 = tileElement->properties.wall.colour_3; + uint16_t var_06 = tileElement->properties.wall.colour_1 | (tileElement->properties.wall.animation << 8); - sint32 typeA = (var_05 >> (edge * 2)) & 3; - sint32 typeB = (var_06 >> (edge * 4)) & 0x0F; + int32_t typeA = (var_05 >> (edge * 2)) & 3; + int32_t typeB = (var_06 >> (edge * 4)) & 0x0F; if (typeB != 0x0F) { @@ -2894,7 +2894,7 @@ static sint32 GetWallType(rct_tile_element * tileElement, sint32 edge) } } -static uint8 GetWallColour(rct_tile_element * tileElement) +static uint8_t GetWallColour(rct_tile_element * tileElement) { return ((tileElement->type & 0xC0) >> 3) | ((tileElement->properties.wall.type & 0xE0) >> 5); } diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index eb507d7142..e76d4a60a1 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -22,7 +22,7 @@ namespace RCT1 { colour_t GetColour(colour_t colour) { - static constexpr const uint8 map[] = + static constexpr const uint8_t map[] = { COLOUR_BLACK, COLOUR_GREY, @@ -65,9 +65,9 @@ namespace RCT1 return map[colour]; } - uint8 GetPeepSpriteType(uint8 rct1SpriteType) + uint8_t GetPeepSpriteType(uint8_t rct1SpriteType) { - static constexpr const uint8 map[] = + static constexpr const uint8_t map[] = { PEEP_SPRITE_TYPE_NORMAL, // 0x00 PEEP_SPRITE_TYPE_HANDYMAN, // 0x01 @@ -113,9 +113,9 @@ namespace RCT1 return map[rct1SpriteType]; } - uint8 GetTerrain(uint8 terrain) + uint8_t GetTerrain(uint8_t terrain) { - static constexpr const uint8 map[] = + static constexpr const uint8_t map[] = { TERRAIN_GRASS, TERRAIN_SAND, @@ -138,9 +138,9 @@ namespace RCT1 return map[terrain]; } - uint8 GetTerrainEdge(uint8 terrainEdge) + uint8_t GetTerrainEdge(uint8_t terrainEdge) { - static constexpr const uint8 map[] = + static constexpr const uint8_t map[] = { TERRAIN_EDGE_ROCK, TERRAIN_EDGE_BRICK, @@ -163,9 +163,9 @@ namespace RCT1 return map[terrainEdge]; } - uint8 GetRideType(uint8 rideType) + uint8_t GetRideType(uint8_t rideType) { - static uint8 map[] = + static uint8_t map[] = { RIDE_TYPE_WOODEN_ROLLER_COASTER, RIDE_TYPE_STAND_UP_ROLLER_COASTER, @@ -258,7 +258,7 @@ namespace RCT1 return map[rideType]; } - RCT1VehicleColourSchemeCopyDescriptor GetColourSchemeCopyDescriptor(uint8 vehicleType) + RCT1VehicleColourSchemeCopyDescriptor GetColourSchemeCopyDescriptor(uint8_t vehicleType) { static RCT1VehicleColourSchemeCopyDescriptor map[89] = { @@ -357,7 +357,7 @@ namespace RCT1 return map[vehicleType]; } - bool RideTypeUsesVehicles(uint8 rideType) + bool RideTypeUsesVehicles(uint8_t rideType) { switch (rideType) { case RCT1_RIDE_TYPE_HEDGE_MAZE: @@ -390,7 +390,7 @@ namespace RCT1 } } - bool PathIsQueue(uint8 pathType) + bool PathIsQueue(uint8_t pathType) { switch (pathType) { case RCT1_FOOTPATH_TYPE_QUEUE_BLUE: @@ -402,7 +402,7 @@ namespace RCT1 return false; } - uint8 NormalisePathAddition(uint8 pathAdditionType) + uint8_t NormalisePathAddition(uint8_t pathAdditionType) { switch (pathAdditionType) { case RCT1_PATH_ADDITION_BROKEN_LAMP_1: return RCT1_PATH_ADDITION_LAMP_1; @@ -415,9 +415,9 @@ namespace RCT1 return pathAdditionType; } - uint8 GetVehicleSubEntryIndex(uint8 vehicleSubEntry) + uint8_t GetVehicleSubEntryIndex(uint8_t vehicleSubEntry) { - static constexpr const uint8 map[] = + static constexpr const uint8_t map[] = { 0, // STEEL_RC_FRONT 1, // STEEL_RC_CARRIAGE @@ -679,7 +679,7 @@ namespace RCT1 return map[vehicleSubEntry]; } - const char * GetRideTypeObject(uint8 rideType) + const char * GetRideTypeObject(uint8_t rideType) { static constexpr const char * map[] = { @@ -774,7 +774,7 @@ namespace RCT1 return map[rideType]; } - const char * GetVehicleObject(uint8 vehicleType) + const char * GetVehicleObject(uint8_t vehicleType) { static constexpr const char * map[] = { @@ -873,7 +873,7 @@ namespace RCT1 return map[vehicleType]; } - const char * GetSmallSceneryObject(uint8 smallSceneryType) + const char * GetSmallSceneryObject(uint8_t smallSceneryType) { static constexpr const char * map[] = { @@ -1125,7 +1125,7 @@ namespace RCT1 return map[smallSceneryType]; } - const char * GetLargeSceneryObject(uint8 largeSceneryType) + const char * GetLargeSceneryObject(uint8_t largeSceneryType) { static constexpr const char * map[] = { @@ -1172,7 +1172,7 @@ namespace RCT1 return map[largeSceneryType]; } - const char * GetWallObject(uint8 wallType) + const char * GetWallObject(uint8_t wallType) { static constexpr const char * map[] = { @@ -1276,7 +1276,7 @@ namespace RCT1 return map[wallType]; } - const char * GetPathObject(uint8 pathType) + const char * GetPathObject(uint8_t pathType) { static constexpr const char * map[] = { @@ -1313,7 +1313,7 @@ namespace RCT1 return map[pathType]; } - const char * GetPathAddtionObject(uint8 pathAdditionType) + const char * GetPathAddtionObject(uint8_t pathAdditionType) { static constexpr const char * map[] = { @@ -1336,7 +1336,7 @@ namespace RCT1 return map[pathAdditionType]; } - const char * GetSceneryGroupObject(uint8 sceneryGroupType) + const char * GetSceneryGroupObject(uint8_t sceneryGroupType) { static constexpr const char * map[] = { @@ -1362,7 +1362,7 @@ namespace RCT1 return map[sceneryGroupType]; } - const char * GetWaterObject(uint8 waterType) + const char * GetWaterObject(uint8_t waterType) { static constexpr const char * map[] = { @@ -1372,7 +1372,7 @@ namespace RCT1 return map[waterType]; } - const std::vector GetSceneryObjects(uint8 sceneryType) + const std::vector GetSceneryObjects(uint8_t sceneryType) { static const std::vector map[] = { diff --git a/src/openrct2/rct1/Tables.h b/src/openrct2/rct1/Tables.h index b3ac37b589..d81d0bee71 100644 --- a/src/openrct2/rct1/Tables.h +++ b/src/openrct2/rct1/Tables.h @@ -15,30 +15,30 @@ namespace RCT1 { struct RCT1VehicleColourSchemeCopyDescriptor { - sint8 colour1, colour2, colour3; + int8_t colour1, colour2, colour3; }; colour_t GetColour(colour_t colour); - uint8 GetPeepSpriteType(uint8 rct1SpriteType); - uint8 GetTerrain(uint8 terrain); - uint8 GetTerrainEdge(uint8 terrainEdge); + uint8_t GetPeepSpriteType(uint8_t rct1SpriteType); + uint8_t GetTerrain(uint8_t terrain); + uint8_t GetTerrainEdge(uint8_t terrainEdge); - uint8 GetRideType(uint8 rideType); - RCT1VehicleColourSchemeCopyDescriptor GetColourSchemeCopyDescriptor(uint8 vehicleType); - bool RideTypeUsesVehicles(uint8 rideType); - bool PathIsQueue(uint8 pathType); - uint8 NormalisePathAddition(uint8 pathAdditionType); - uint8 GetVehicleSubEntryIndex(uint8 vehicleSubEntry); + uint8_t GetRideType(uint8_t rideType); + RCT1VehicleColourSchemeCopyDescriptor GetColourSchemeCopyDescriptor(uint8_t vehicleType); + bool RideTypeUsesVehicles(uint8_t rideType); + bool PathIsQueue(uint8_t pathType); + uint8_t NormalisePathAddition(uint8_t pathAdditionType); + uint8_t GetVehicleSubEntryIndex(uint8_t vehicleSubEntry); - const char * GetRideTypeObject(uint8 rideType); - const char * GetVehicleObject(uint8 vehicleType); - const char * GetSmallSceneryObject(uint8 smallSceneryType); - const char * GetLargeSceneryObject(uint8 largeSceneryType); - const char * GetWallObject(uint8 wallType); - const char * GetPathObject(uint8 pathType); - const char * GetPathAddtionObject(uint8 pathAdditionType); - const char * GetSceneryGroupObject(uint8 sceneryGroupType); - const char * GetWaterObject(uint8 waterType); + const char * GetRideTypeObject(uint8_t rideType); + const char * GetVehicleObject(uint8_t vehicleType); + const char * GetSmallSceneryObject(uint8_t smallSceneryType); + const char * GetLargeSceneryObject(uint8_t largeSceneryType); + const char * GetWallObject(uint8_t wallType); + const char * GetPathObject(uint8_t pathType); + const char * GetPathAddtionObject(uint8_t pathAdditionType); + const char * GetSceneryGroupObject(uint8_t sceneryGroupType); + const char * GetWaterObject(uint8_t waterType); - const std::vector GetSceneryObjects(uint8 sceneryType); + const std::vector GetSceneryObjects(uint8_t sceneryType); } // namespace RCT1 diff --git a/src/openrct2/rct12/RCT12.h b/src/openrct2/rct12/RCT12.h index 4ab66c35a2..fe6b919522 100644 --- a/src/openrct2/rct12/RCT12.h +++ b/src/openrct2/rct12/RCT12.h @@ -41,8 +41,8 @@ struct rct12_award { - uint16 time; - uint16 type; + uint16_t time; + uint16_t type; }; assert_struct_size(rct12_award, 4); @@ -52,29 +52,29 @@ assert_struct_size(rct12_award, 4); */ struct rct12_news_item { - uint8 Type; - uint8 Flags; - uint32 Assoc; - uint16 Ticks; - uint16 MonthYear; - uint8 Day; - uint8 pad_0B; + uint8_t Type; + uint8_t Flags; + uint32_t Assoc; + uint16_t Ticks; + uint16_t MonthYear; + uint8_t Day; + uint8_t pad_0B; char Text[256]; }; assert_struct_size(rct12_news_item, 0x10C); struct rct12_xyzd8 { - uint8 x, y, z, direction; + uint8_t x, y, z, direction; }; assert_struct_size(rct12_xyzd8, 4); struct rct12_peep_spawn { - uint16 x; - uint16 y; - uint8 z; - uint8 direction; + uint16_t x; + uint16_t y; + uint8_t z; + uint8_t direction; }; assert_struct_size(rct12_peep_spawn, 6); diff --git a/src/openrct2/rct12/SawyerChunk.h b/src/openrct2/rct12/SawyerChunk.h index 1af10d47af..f6f47ee2f1 100644 --- a/src/openrct2/rct12/SawyerChunk.h +++ b/src/openrct2/rct12/SawyerChunk.h @@ -14,7 +14,7 @@ /** * The type of encoding / compression for a sawyer encoded chunk. */ -enum class SAWYER_ENCODING : uint8 +enum class SAWYER_ENCODING : uint8_t { NONE, RLE, diff --git a/src/openrct2/rct12/SawyerChunkReader.cpp b/src/openrct2/rct12/SawyerChunkReader.cpp index 99beca81b9..7a1c8c15a8 100644 --- a/src/openrct2/rct12/SawyerChunkReader.cpp +++ b/src/openrct2/rct12/SawyerChunkReader.cpp @@ -40,7 +40,7 @@ SawyerChunkReader::SawyerChunkReader(IStream * stream) void SawyerChunkReader::SkipChunk() { - uint64 originalPosition = _stream->GetPosition(); + uint64_t originalPosition = _stream->GetPosition(); try { auto header = _stream->ReadValue(); @@ -56,7 +56,7 @@ void SawyerChunkReader::SkipChunk() std::shared_ptr SawyerChunkReader::ReadChunk() { - uint64 originalPosition = _stream->GetPosition(); + uint64_t originalPosition = _stream->GetPosition(); try { auto header = _stream->ReadValue(); @@ -66,16 +66,16 @@ std::shared_ptr SawyerChunkReader::ReadChunk() case CHUNK_ENCODING_RLECOMPRESSED: case CHUNK_ENCODING_ROTATE: { - std::unique_ptr compressedData(new uint8[header.length]); + std::unique_ptr compressedData(new uint8_t[header.length]); if (_stream->TryRead(compressedData.get(), header.length) != header.length) { throw SawyerChunkException(EXCEPTION_MSG_CORRUPT_CHUNK_SIZE); } - auto buffer = (uint8 *)AllocateLargeTempBuffer(); + auto buffer = (uint8_t *)AllocateLargeTempBuffer(); size_t uncompressedLength = DecodeChunk(buffer, MAX_UNCOMPRESSED_CHUNK_SIZE, compressedData.get(), header); Guard::Assert(uncompressedLength != 0, "Encountered zero-sized chunk!"); - buffer = (uint8 *)FinaliseLargeTempBuffer(buffer, uncompressedLength); + buffer = (uint8_t *)FinaliseLargeTempBuffer(buffer, uncompressedLength); return std::make_shared((SAWYER_ENCODING)header.encoding, buffer, uncompressedLength); } default: @@ -93,7 +93,7 @@ std::shared_ptr SawyerChunkReader::ReadChunk() void SawyerChunkReader::ReadChunk(void * dst, size_t length) { auto chunk = ReadChunk(); - auto chunkData = (const uint8 *)chunk->GetData(); + auto chunkData = (const uint8_t *)chunk->GetData(); auto chunkLength = chunk->GetLength(); if (chunkLength > length) { @@ -105,7 +105,7 @@ void SawyerChunkReader::ReadChunk(void * dst, size_t length) auto remainingLength = length - chunkLength; if (remainingLength > 0) { - auto offset = (uint8 *)dst + chunkLength; + auto offset = (uint8_t *)dst + chunkLength; std::memset(offset, 0, remainingLength); } } @@ -150,12 +150,12 @@ size_t SawyerChunkReader::DecodeChunkRLERepeat(void * dst, size_t dstCapacity, c size_t SawyerChunkReader::DecodeChunkRLE(void * dst, size_t dstCapacity, const void * src, size_t srcLength) { - auto src8 = static_cast(src); - auto dst8 = static_cast(dst); + auto src8 = static_cast(src); + auto dst8 = static_cast(dst); auto dstEnd = dst8 + dstCapacity; for (size_t i = 0; i < srcLength; i++) { - uint8 rleCodeByte = src8[i]; + uint8_t rleCodeByte = src8[i]; if (rleCodeByte & 128) { i++; @@ -194,8 +194,8 @@ size_t SawyerChunkReader::DecodeChunkRLE(void * dst, size_t dstCapacity, const v size_t SawyerChunkReader::DecodeChunkRepeat(void * dst, size_t dstCapacity, const void * src, size_t srcLength) { - auto src8 = static_cast(src); - auto dst8 = static_cast(dst); + auto src8 = static_cast(src); + auto dst8 = static_cast(dst); auto dstEnd = dst8 + dstCapacity; for (size_t i = 0; i < srcLength; i++) { @@ -206,7 +206,7 @@ size_t SawyerChunkReader::DecodeChunkRepeat(void * dst, size_t dstCapacity, cons else { size_t count = (src8[i] & 7) + 1; - const uint8 * copySrc = dst8 + (sint32)(src8[i] >> 3) - 32; + const uint8_t * copySrc = dst8 + (int32_t)(src8[i] >> 3) - 32; if (dst8 + count >= dstEnd || copySrc + count >= dstEnd) { @@ -227,9 +227,9 @@ size_t SawyerChunkReader::DecodeChunkRotate(void * dst, size_t dstCapacity, cons throw SawyerChunkException(EXCEPTION_MSG_DESTINATION_TOO_SMALL); } - auto src8 = static_cast(src); - auto dst8 = static_cast(dst); - uint8 code = 1; + auto src8 = static_cast(src); + auto dst8 = static_cast(dst); + uint8_t code = 1; for (size_t i = 0; i < srcLength; i++) { dst8[i] = ror8(src8[i], code); @@ -259,7 +259,7 @@ void * SawyerChunkReader::FinaliseLargeTempBuffer(void * buffer, size_t len) std::memcpy(finalBuffer, buffer, len); HeapFree(GetProcessHeap(), 0, buffer); #else - auto finalBuffer = (uint8 *)std::realloc(buffer, len); + auto finalBuffer = (uint8_t *)std::realloc(buffer, len); #endif if (finalBuffer == nullptr) { diff --git a/src/openrct2/rct12/SawyerChunkWriter.cpp b/src/openrct2/rct12/SawyerChunkWriter.cpp index 4897bdf451..35860f99ac 100644 --- a/src/openrct2/rct12/SawyerChunkWriter.cpp +++ b/src/openrct2/rct12/SawyerChunkWriter.cpp @@ -29,11 +29,11 @@ void SawyerChunkWriter::WriteChunk(const SawyerChunk * chunk) void SawyerChunkWriter::WriteChunk(const void * src, size_t length, SAWYER_ENCODING encoding) { sawyercoding_chunk_header header; - header.encoding = (uint8)encoding; - header.length = (uint32)length; + header.encoding = (uint8_t)encoding; + header.length = (uint32_t)length; - auto data = std::make_unique(MAX_COMPRESSED_CHUNK_SIZE); - size_t dataLength = sawyercoding_write_chunk_buffer(data.get(), (const uint8 *)src, header); + auto data = std::make_unique(MAX_COMPRESSED_CHUNK_SIZE); + size_t dataLength = sawyercoding_write_chunk_buffer(data.get(), (const uint8_t *)src, header); _stream->Write(data.get(), dataLength); } diff --git a/src/openrct2/rct12/SawyerEncoding.cpp b/src/openrct2/rct12/SawyerEncoding.cpp index bef5170156..12093f3959 100644 --- a/src/openrct2/rct12/SawyerEncoding.cpp +++ b/src/openrct2/rct12/SawyerEncoding.cpp @@ -15,8 +15,8 @@ namespace SawyerEncoding { bool ValidateChecksum(IStream * stream) { - uint64 initialPosition = stream->GetPosition(); - uint64 dataSize = stream->GetLength() - initialPosition; + uint64_t initialPosition = stream->GetPosition(); + uint64_t dataSize = stream->GetLength() - initialPosition; if (dataSize < 8) { return false; @@ -26,14 +26,14 @@ namespace SawyerEncoding try { // Calculate checksum - uint32 checksum = 0; + uint32_t checksum = 0; do { - uint8 buffer[4096]; - uint64 bufferSize = std::min(dataSize, sizeof(buffer)); + uint8_t buffer[4096]; + uint64_t bufferSize = std::min(dataSize, sizeof(buffer)); stream->Read(buffer, bufferSize); - for (uint64 i = 0; i < bufferSize; i++) + for (uint64_t i = 0; i < bufferSize; i++) { checksum += buffer[i]; } @@ -43,7 +43,7 @@ namespace SawyerEncoding while (dataSize != 0); // Read file checksum - uint32 fileChecksum = stream->ReadValue(); + uint32_t fileChecksum = stream->ReadValue(); // Rewind back to original position stream->SetPosition(initialPosition); diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index 2d6299ff9c..0f87a8a589 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -28,19 +28,19 @@ #define RCT2_MAX_SPRITES 10000 #define RCT2_MAX_TILE_ELEMENTS 0x30000 #define RCT2_MAX_ANIMATED_OBJECTS 2000 -#define RCT2_MAX_RESEARCHED_RIDE_TYPE_QUADS 8 // With 32 bits per uint32, this means there is room for 256 types. -#define RCT2_MAX_RESEARCHED_RIDE_ENTRY_QUADS 8 // With 32 bits per uint32, this means there is room for 256 entries. +#define RCT2_MAX_RESEARCHED_RIDE_TYPE_QUADS 8 // With 32 bits per uint32_t, this means there is room for 256 types. +#define RCT2_MAX_RESEARCHED_RIDE_ENTRY_QUADS 8 // With 32 bits per uint32_t, this means there is room for 256 entries. #define RCT2_MAX_RESEARCHED_SCENERY_ITEM_QUADS 56 #define RCT2_MAX_RESEARCHED_SCENERY_ITEMS (RCT2_MAX_RESEARCHED_SCENERY_ITEM_QUADS * 32) // There are 32 bits per quad. struct rct2_install_info { - uint32 installLevel; + uint32_t installLevel; char title[260]; char path[260]; - uint32 var_20C; - uint8 pad_210[256]; + uint32_t var_20C; + uint8_t pad_210[256]; char expansionPackNames[16][128]; - uint32 activeExpansionPacks; //0xB10 + uint32_t activeExpansionPacks; //0xB10 }; #pragma pack(push, 1) @@ -50,117 +50,117 @@ struct rct2_install_info { * size: 0x0260 */ struct rct2_ride { - uint8 type; // 0x000 + uint8_t type; // 0x000 // pointer to static info. for example, wild mouse type is 0x36, subtype is // 0x4c. - uint8 subtype; // 0x001 - uint16 pad_002; // 0x002 - uint8 mode; // 0x004 - uint8 colour_scheme_type; // 0x005 + uint8_t subtype; // 0x001 + uint16_t pad_002; // 0x002 + uint8_t mode; // 0x004 + uint8_t colour_scheme_type; // 0x005 rct_vehicle_colour vehicle_colours[RCT2_MAX_CARS_PER_TRAIN]; // 0x006 - uint8 pad_046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions + uint8_t pad_046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions // 0 = closed, 1 = open, 2 = test - uint8 status; // 0x049 + uint8_t status; // 0x049 rct_string_id name; // 0x04A union { - uint32 name_arguments; // 0x04C + uint32_t name_arguments; // 0x04C struct { rct_string_id name_arguments_type_name; // 0x04C - uint16 name_arguments_number; // 0x04E + uint16_t name_arguments_number; // 0x04E }; }; LocationXY8 overall_view; // 0x050 LocationXY8 station_starts[RCT12_MAX_STATIONS_PER_RIDE]; // 0x052 - uint8 station_heights[RCT12_MAX_STATIONS_PER_RIDE]; // 0x05A - uint8 station_length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x05E - uint8 station_depart[RCT12_MAX_STATIONS_PER_RIDE]; // 0x062 + uint8_t station_heights[RCT12_MAX_STATIONS_PER_RIDE]; // 0x05A + uint8_t station_length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x05E + uint8_t station_depart[RCT12_MAX_STATIONS_PER_RIDE]; // 0x062 // ride->vehicle index for current train waiting for passengers // at station - uint8 train_at_station[RCT12_MAX_STATIONS_PER_RIDE]; // 0x066 + uint8_t train_at_station[RCT12_MAX_STATIONS_PER_RIDE]; // 0x066 LocationXY8 entrances[RCT12_MAX_STATIONS_PER_RIDE]; // 0x06A LocationXY8 exits[RCT12_MAX_STATIONS_PER_RIDE]; // 0x072 - uint16 last_peep_in_queue[RCT12_MAX_STATIONS_PER_RIDE]; // 0x07A - uint8 pad_082[RCT12_MAX_STATIONS_PER_RIDE]; // 0x082, Used to be number of peeps in queue in RCT1, but this has moved. - uint16 vehicles[RCT2_MAX_VEHICLES_PER_RIDE]; // 0x086, Points to the first car in the train - uint8 depart_flags; // 0x0C6 + uint16_t last_peep_in_queue[RCT12_MAX_STATIONS_PER_RIDE]; // 0x07A + uint8_t pad_082[RCT12_MAX_STATIONS_PER_RIDE]; // 0x082, Used to be number of peeps in queue in RCT1, but this has moved. + uint16_t vehicles[RCT2_MAX_VEHICLES_PER_RIDE]; // 0x086, Points to the first car in the train + uint8_t depart_flags; // 0x0C6 // Not sure if these should be uint or sint. - uint8 num_stations; // 0x0C7 - uint8 num_vehicles; // 0x0C8 - uint8 num_cars_per_train; // 0x0C9 - uint8 proposed_num_vehicles; // 0x0CA - uint8 proposed_num_cars_per_train; // 0x0CB - uint8 max_trains; // 0x0CC - uint8 min_max_cars_per_train; // 0x0CD - uint8 min_waiting_time; // 0x0CE - uint8 max_waiting_time; // 0x0CF + uint8_t num_stations; // 0x0C7 + uint8_t num_vehicles; // 0x0C8 + uint8_t num_cars_per_train; // 0x0C9 + uint8_t proposed_num_vehicles; // 0x0CA + uint8_t proposed_num_cars_per_train; // 0x0CB + uint8_t max_trains; // 0x0CC + uint8_t min_max_cars_per_train; // 0x0CD + uint8_t min_waiting_time; // 0x0CE + uint8_t max_waiting_time; // 0x0CF union { - uint8 operation_option; // 0x0D0 - uint8 time_limit; // 0x0D0 - uint8 num_laps; // 0x0D0 - uint8 launch_speed; // 0x0D0 - uint8 speed; // 0x0D0 - uint8 rotations; // 0x0D0 + uint8_t operation_option; // 0x0D0 + uint8_t time_limit; // 0x0D0 + uint8_t num_laps; // 0x0D0 + uint8_t launch_speed; // 0x0D0 + uint8_t speed; // 0x0D0 + uint8_t rotations; // 0x0D0 }; - uint8 boat_hire_return_direction; // 0x0D1 + uint8_t boat_hire_return_direction; // 0x0D1 LocationXY8 boat_hire_return_position; // 0x0D2 - uint8 measurement_index; // 0x0D4 + uint8_t measurement_index; // 0x0D4 // bits 0 through 4 are the number of helix sections // bit 5: spinning tunnel, water splash, or rapids // bit 6: log reverser, waterfall // bit 7: whirlpool - uint8 special_track_elements; // 0x0D5 - uint8 pad_0D6[2]; // 0x0D6 + uint8_t special_track_elements; // 0x0D5 + uint8_t pad_0D6[2]; // 0x0D6 // Divide this value by 29127 to get the human-readable max speed // (in RCT2, display_speed = (max_speed * 9) >> 18) - sint32 max_speed; // 0x0D8 - sint32 average_speed; // 0x0DC - uint8 current_test_segment; // 0x0E0 - uint8 average_speed_test_timeout; // 0x0E1 - uint8 pad_0E2[0x2]; // 0x0E2 - sint32 length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x0E4 - uint16 time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x0F4 + int32_t max_speed; // 0x0D8 + int32_t average_speed; // 0x0DC + uint8_t current_test_segment; // 0x0E0 + uint8_t average_speed_test_timeout; // 0x0E1 + uint8_t pad_0E2[0x2]; // 0x0E2 + int32_t length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x0E4 + uint16_t time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x0F4 fixed16_2dp max_positive_vertical_g; // 0x0FC fixed16_2dp max_negative_vertical_g; // 0x0FE fixed16_2dp max_lateral_g; // 0x100 fixed16_2dp previous_vertical_g; // 0x102 fixed16_2dp previous_lateral_g; // 0x104 - uint8 pad_106[0x2]; // 0x106 - uint32 testing_flags; // 0x108 + uint8_t pad_106[0x2]; // 0x106 + uint32_t testing_flags; // 0x108 // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times LocationXY8 cur_test_track_location; // 0x10C // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16 turn_count_default; // 0x10E X = current turn count - uint16 turn_count_banked; // 0x110 - uint16 turn_count_sloped; // 0x112 X = number turns > 3 elements + uint16_t turn_count_default; // 0x10E X = current turn count + uint16_t turn_count_banked; // 0x110 + uint16_t turn_count_sloped; // 0x112 X = number turns > 3 elements union { - uint8 inversions; // 0x114 (???X XXXX) - uint8 holes; // 0x114 (???X XXXX) + uint8_t inversions; // 0x114 (???X XXXX) + uint8_t holes; // 0x114 (???X XXXX) // This is a very rough approximation of how much of the ride is undercover. // It reaches the maximum value of 7 at about 50% undercover and doesn't increase beyond that. - uint8 sheltered_eighths; // 0x114 (XXX?-????) + uint8_t sheltered_eighths; // 0x114 (XXX?-????) }; // Y is number of powered lifts, X is drops - uint8 drops; // 0x115 (YYXX XXXX) - uint8 start_drop_height; // 0x116 - uint8 highest_drop_height; // 0x117 - sint32 sheltered_length; // 0x118 + uint8_t drops; // 0x115 (YYXX XXXX) + uint8_t start_drop_height; // 0x116 + uint8_t highest_drop_height; // 0x117 + int32_t sheltered_length; // 0x118 // Unused always 0? Should affect nausea - uint16 var_11C; // 0x11C - uint8 num_sheltered_sections; // 0x11E (?abY YYYY) + uint16_t var_11C; // 0x11C + uint8_t num_sheltered_sections; // 0x11E (?abY YYYY) // see cur_test_track_location - uint8 cur_test_track_z; // 0x11F + uint8_t cur_test_track_z; // 0x11F // Customer counter in the current 960 game tick (about 30 seconds) interval - uint16 cur_num_customers; // 0x120 + uint16_t cur_num_customers; // 0x120 // Counts ticks to update customer intervals, resets each 960 game ticks. - uint16 num_customers_timeout; // 0x122 + uint16_t num_customers_timeout; // 0x122 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16 num_customers[RCT2_CUSTOMER_HISTORY_SIZE]; // 0x124 + uint16_t num_customers[RCT2_CUSTOMER_HISTORY_SIZE]; // 0x124 money16 price; // 0x138 LocationXY8 chairlift_bullwheel_location[2]; // 0x13A - uint8 chairlift_bullwheel_z[2]; // 0x13E + uint8_t chairlift_bullwheel_z[2]; // 0x13E union { rating_tuple ratings; // 0x140 struct { @@ -169,93 +169,93 @@ struct rct2_ride { ride_rating nausea; // 0x144 }; }; - uint16 value; // 0x146 - uint16 chairlift_bullwheel_rotation; // 0x148 - uint8 satisfaction; // 0x14A - uint8 satisfaction_time_out; // 0x14B - uint8 satisfaction_next; // 0x14C + uint16_t value; // 0x146 + uint16_t chairlift_bullwheel_rotation; // 0x148 + uint8_t satisfaction; // 0x14A + uint8_t satisfaction_time_out; // 0x14B + uint8_t satisfaction_next; // 0x14C // Various flags stating whether a window needs to be refreshed - uint8 window_invalidate_flags; // 0x14D - uint8 pad_14E[0x02]; // 0x14E - uint32 total_customers; // 0x150 + uint8_t window_invalidate_flags; // 0x14D + uint8_t pad_14E[0x02]; // 0x14E + uint32_t total_customers; // 0x150 money32 total_profit; // 0x154 - uint8 popularity; // 0x158 - uint8 popularity_time_out; // 0x159 Updated every purchase and ?possibly by time? - uint8 popularity_next; // 0x15A When timeout reached this will be the next popularity - uint8 num_riders; // 0x15B - uint8 music_tune_id; // 0x15C - uint8 slide_in_use; // 0x15D + uint8_t popularity; // 0x158 + uint8_t popularity_time_out; // 0x159 Updated every purchase and ?possibly by time? + uint8_t popularity_next; // 0x15A When timeout reached this will be the next popularity + uint8_t num_riders; // 0x15B + uint8_t music_tune_id; // 0x15C + uint8_t slide_in_use; // 0x15D union { - uint16 slide_peep; // 0x15E - uint16 maze_tiles; // 0x15E + uint16_t slide_peep; // 0x15E + uint16_t maze_tiles; // 0x15E }; - uint8 pad_160[0xE]; // 0x160 - uint8 slide_peep_t_shirt_colour; // 0x16E - uint8 pad_16F[0x7]; // 0x16F - uint8 spiral_slide_progress; // 0x176 - uint8 pad_177[0x9]; // 0x177 - sint16 build_date; // 0x180 + uint8_t pad_160[0xE]; // 0x160 + uint8_t slide_peep_t_shirt_colour; // 0x16E + uint8_t pad_16F[0x7]; // 0x16F + uint8_t spiral_slide_progress; // 0x176 + uint8_t pad_177[0x9]; // 0x177 + int16_t build_date; // 0x180 money16 upkeep_cost; // 0x182 - uint16 race_winner; // 0x184 - uint8 pad_186[0x02]; // 0x186 - uint32 music_position; // 0x188 - uint8 breakdown_reason_pending; // 0x18C - uint8 mechanic_status; // 0x18D - uint16 mechanic; // 0x18E - uint8 inspection_station; // 0x190 - uint8 broken_vehicle; // 0x191 - uint8 broken_car; // 0x192 - uint8 breakdown_reason; // 0x193 + uint16_t race_winner; // 0x184 + uint8_t pad_186[0x02]; // 0x186 + uint32_t music_position; // 0x188 + uint8_t breakdown_reason_pending; // 0x18C + uint8_t mechanic_status; // 0x18D + uint16_t mechanic; // 0x18E + uint8_t inspection_station; // 0x190 + uint8_t broken_vehicle; // 0x191 + uint8_t broken_car; // 0x192 + uint8_t breakdown_reason; // 0x193 money16 price_secondary; // 0x194 union { struct { - uint8 reliability_subvalue; // 0x196, 0 - 255, acts like the decimals for reliability_percentage - uint8 reliability_percentage; // 0x197, Starts at 100 and decreases from there. + uint8_t reliability_subvalue; // 0x196, 0 - 255, acts like the decimals for reliability_percentage + uint8_t reliability_percentage; // 0x197, Starts at 100 and decreases from there. }; - uint16 reliability; // 0x196 + uint16_t reliability; // 0x196 }; // Small constant used to increase the unreliability as the game continues, // making breakdowns more and more likely. - uint8 unreliability_factor; // 0x198 + uint8_t unreliability_factor; // 0x198 // Range from [0, 100] - uint8 downtime; // 0x199 - uint8 inspection_interval; // 0x19A - uint8 last_inspection; // 0x19B - uint8 downtime_history[RCT2_DOWNTIME_HISTORY_SIZE]; // 0x19C - uint32 no_primary_items_sold; // 0x1A4 - uint32 no_secondary_items_sold; // 0x1A8 - uint8 breakdown_sound_modifier; // 0x1AC + uint8_t downtime; // 0x199 + uint8_t inspection_interval; // 0x19A + uint8_t last_inspection; // 0x19B + uint8_t downtime_history[RCT2_DOWNTIME_HISTORY_SIZE]; // 0x19C + uint32_t no_primary_items_sold; // 0x1A4 + uint32_t no_secondary_items_sold; // 0x1A8 + uint8_t breakdown_sound_modifier; // 0x1AC // Used to oscillate the sound when ride breaks down. // 0 = no change, 255 = max change - uint8 not_fixed_timeout; // 0x1AD - uint8 last_crash_type; // 0x1AE - uint8 connected_message_throttle; // 0x1AF + uint8_t not_fixed_timeout; // 0x1AD + uint8_t last_crash_type; // 0x1AE + uint8_t connected_message_throttle; // 0x1AF money32 income_per_hour; // 0x1B0 money32 profit; // 0x1B4 - uint8 queue_time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x1B8 - uint8 track_colour_main[RCT12_NUM_COLOUR_SCHEMES]; // 0x1BC - uint8 track_colour_additional[RCT12_NUM_COLOUR_SCHEMES]; // 0x1C0 - uint8 track_colour_supports[RCT12_NUM_COLOUR_SCHEMES]; // 0x1C4 - uint8 music; // 0x1C8 - uint8 entrance_style; // 0x1C9 - uint16 vehicle_change_timeout; // 0x1CA - uint8 num_block_brakes; // 0x1CC - uint8 lift_hill_speed; // 0x1CD - uint16 guests_favourite; // 0x1CE - uint32 lifecycle_flags; // 0x1D0 - uint8 vehicle_colours_extended[RCT2_MAX_CARS_PER_TRAIN]; // 0x1D4 - uint16 total_air_time; // 0x1F4 - uint8 current_test_station; // 0x1F6 - uint8 num_circuits; // 0x1F7 - sint16 cable_lift_x; // 0x1F8 - sint16 cable_lift_y; // 0x1FA - uint8 cable_lift_z; // 0x1FC - uint8 pad_1FD; // 0x1FD - uint16 cable_lift; // 0x1FE - uint16 queue_length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x200 - uint8 pad_208[0x58]; // 0x208 + uint8_t queue_time[RCT12_MAX_STATIONS_PER_RIDE]; // 0x1B8 + uint8_t track_colour_main[RCT12_NUM_COLOUR_SCHEMES]; // 0x1BC + uint8_t track_colour_additional[RCT12_NUM_COLOUR_SCHEMES]; // 0x1C0 + uint8_t track_colour_supports[RCT12_NUM_COLOUR_SCHEMES]; // 0x1C4 + uint8_t music; // 0x1C8 + uint8_t entrance_style; // 0x1C9 + uint16_t vehicle_change_timeout; // 0x1CA + uint8_t num_block_brakes; // 0x1CC + uint8_t lift_hill_speed; // 0x1CD + uint16_t guests_favourite; // 0x1CE + uint32_t lifecycle_flags; // 0x1D0 + uint8_t vehicle_colours_extended[RCT2_MAX_CARS_PER_TRAIN]; // 0x1D4 + uint16_t total_air_time; // 0x1F4 + uint8_t current_test_station; // 0x1F6 + uint8_t num_circuits; // 0x1F7 + int16_t cable_lift_x; // 0x1F8 + int16_t cable_lift_y; // 0x1FA + uint8_t cable_lift_z; // 0x1FC + uint8_t pad_1FD; // 0x1FD + uint16_t cable_lift; // 0x1FE + uint16_t queue_length[RCT12_MAX_STATIONS_PER_RIDE]; // 0x200 + uint8_t pad_208[0x58]; // 0x208 }; assert_struct_size(rct2_ride, 0x260); @@ -265,10 +265,10 @@ assert_struct_size(rct2_ride, 0x260); */ struct rct_scores_header { - uint32 var_0; - uint32 var_4; - uint32 var_8; - uint32 ScenarioCount; + uint32_t var_0; + uint32_t var_4; + uint32_t var_8; + uint32_t ScenarioCount; }; assert_struct_size(rct_scores_header, 0x10); @@ -279,15 +279,15 @@ assert_struct_size(rct_scores_header, 0x10); struct rct_scores_entry { char Path[256]; - uint8 Category; - uint8 pad_0101[0x1F]; - sint8 ObjectiveType; - sint8 ObjectiveArg1; - sint32 objectiveArg2; - sint16 objectiveArg3; + uint8_t Category; + uint8_t pad_0101[0x1F]; + int8_t ObjectiveType; + int8_t ObjectiveArg1; + int32_t objectiveArg2; + int16_t objectiveArg3; char Name[64]; char Details[256]; - sint32 Flags; + int32_t Flags; money32 CompanyValue; char CompletedBy[64]; }; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 9fb2df5e47..15de03c407 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -80,7 +80,7 @@ void S6Exporter::Save(IStream * stream, bool isScenario) { _s6.header.type = isScenario ? S6_TYPE_SCENARIO : S6_TYPE_SAVEDGAME; _s6.header.classic_flag = 0; - _s6.header.num_packed_objects = uint16(ExportObjectsList.size()); + _s6.header.num_packed_objects = uint16_t(ExportObjectsList.size()); _s6.header.version = S6_RCT2_VERSION; _s6.header.magic_number = S6_MAGIC_NUMBER; _s6.game_version_number = 201028; @@ -135,8 +135,8 @@ void S6Exporter::Save(IStream * stream, bool isScenario) // Read all written bytes back into a single buffer stream->SetPosition(0); - auto data = std::unique_ptr>(stream->ReadArray(fileSize), Memory::Free); - uint32 checksum = sawyercoding_calculate_checksum(data.get(), fileSize); + auto data = std::unique_ptr>(stream->ReadArray(fileSize), Memory::Free); + uint32_t checksum = sawyercoding_calculate_checksum(data.get(), fileSize); // Write the checksum on the end stream->SetPosition(fileSize); @@ -145,9 +145,9 @@ void S6Exporter::Save(IStream * stream, bool isScenario) void S6Exporter::Export() { - sint32 spatial_cycle = check_for_spatial_index_cycles(false); - sint32 regular_cycle = check_for_sprite_list_cycles(false); - sint32 disjoint_sprites_count = fix_disjoint_sprites(); + int32_t spatial_cycle = check_for_spatial_index_cycles(false); + int32_t regular_cycle = check_for_sprite_list_cycles(false); + int32_t disjoint_sprites_count = fix_disjoint_sprites(); openrct2_assert(spatial_cycle == -1, "Sprite cycle exists in spatial list %d", spatial_cycle); openrct2_assert(regular_cycle == -1, "Sprite cycle exists in regular list %d", regular_cycle); // This one is less harmful, no need to assert for it ~janisozaur @@ -164,10 +164,10 @@ void S6Exporter::Export() auto temp = utf8_to_rct2(gS6Info.details); safe_strcpy(_s6.info.details, temp.data(), sizeof(_s6.info.details)); } - uint32 researchedTrackPiecesA[128]; - uint32 researchedTrackPiecesB[128]; + uint32_t researchedTrackPiecesA[128]; + uint32_t researchedTrackPiecesB[128]; - for (sint32 i = 0; i < OBJECT_ENTRY_COUNT; i++) + for (int32_t i = 0; i < OBJECT_ENTRY_COUNT; i++) { const rct_object_entry * entry = get_loaded_object_entry(i); void * entryData = get_loaded_object_chunk(i); @@ -196,12 +196,12 @@ void S6Exporter::Export() // compression ratios. Especially useful for multiplayer servers that // use zlib on the sent stream. sprite_clear_all_unused(); - for (sint32 i = 0; i < RCT2_MAX_SPRITES; i++) + for (int32_t i = 0; i < RCT2_MAX_SPRITES; i++) { memcpy(&_s6.sprites[i], get_sprite(i), sizeof(rct_sprite)); } - for (sint32 i = 0; i < NUM_SPRITE_LISTS; i++) + for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++) { _s6.sprite_lists_head[i] = gSpriteListHead[i]; _s6.sprite_lists_count[i] = gSpriteListCount[i]; @@ -224,7 +224,7 @@ void S6Exporter::Export() ExportResearchedRideTypes(); ExportResearchedRideEntries(); // Not used by OpenRCT2 any more, but left in to keep RCT2 export working. - for (uint8 i = 0; i < Util::CountOf(RideTypePossibleTrackConfigurations); i++) + for (uint8_t i = 0; i < Util::CountOf(RideTypePossibleTrackConfigurations); i++) { researchedTrackPiecesA[i] = (RideTypePossibleTrackConfigurations[i] ) & 0xFFFFFFFFULL; researchedTrackPiecesB[i] = (RideTypePossibleTrackConfigurations[i] >> 32ULL) & 0xFFFFFFFFULL; @@ -296,7 +296,7 @@ void S6Exporter::Export() memcpy(_s6.peep_warning_throttle, gPeepWarningThrottle, sizeof(_s6.peep_warning_throttle)); // Awards - for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++) + for (int32_t i = 0; i < RCT12_MAX_AWARDS; i++) { Award * src = &gCurrentAwards[i]; rct12_award * dst = &_s6.awards[i]; @@ -338,7 +338,7 @@ void S6Exporter::Export() // pad_0135934B _s6.same_price_throughout_extended = gSamePriceThroughoutParkB; // Preserve compatibility with vanilla RCT2's save format. - for (uint8 i = 0; i < RCT12_MAX_PARK_ENTRANCES; i++) + for (uint8_t i = 0; i < RCT12_MAX_PARK_ENTRANCES; i++) { _s6.park_entrance_x[i] = gParkEntrances[i].x; _s6.park_entrance_y[i] = gParkEntrances[i].y; @@ -424,14 +424,14 @@ void S6Exporter::ExportPeepSpawns() for (size_t i = 0; i < RCT12_MAX_PEEP_SPAWNS; i++) { _s6.peep_spawns[i] = { - (uint16)gPeepSpawns[i].x, (uint16)gPeepSpawns[i].y, (uint8)(gPeepSpawns[i].z / 16), gPeepSpawns[i].direction + (uint16_t)gPeepSpawns[i].x, (uint16_t)gPeepSpawns[i].y, (uint8_t)(gPeepSpawns[i].z / 16), gPeepSpawns[i].direction }; } } -uint32 S6Exporter::GetLoanHash(money32 initialCash, money32 bankLoan, uint32 maxBankLoan) +uint32_t S6Exporter::GetLoanHash(money32 initialCash, money32 bankLoan, uint32_t maxBankLoan) { - sint32 value = 0x70093A; + int32_t value = 0x70093A; value -= initialCash; value = ror32(value, 5); value -= bankLoan; @@ -443,7 +443,7 @@ uint32 S6Exporter::GetLoanHash(money32 initialCash, money32 bankLoan, uint32 max void S6Exporter::ExportRides() { - for (sint32 index = 0; index < RCT12_MAX_RIDES_IN_PARK; index++) + for (int32_t index = 0; index < RCT12_MAX_RIDES_IN_PARK; index++) { auto src = get_ride(index); auto dst = &_s6.rides[index]; @@ -469,7 +469,7 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->mode = src->mode; dst->colour_scheme_type = src->colour_scheme_type; - for (uint8 i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i ++) + for (uint8_t i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i ++) { dst->vehicle_colours[i] = src->vehicle_colours[i]; } @@ -481,7 +481,7 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->overall_view = src->overall_view; - for (sint32 i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) + for (int32_t i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) { dst->station_starts[i] = src->station_starts[i]; dst->station_heights[i] = src->station_heights[i]; @@ -493,13 +493,13 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) if (entrance.isNull()) dst->entrances[i].xy = RCT_XY8_UNDEFINED; else - dst->entrances[i] = { (uint8)entrance.x, (uint8)entrance.y }; + dst->entrances[i] = { (uint8_t)entrance.x, (uint8_t)entrance.y }; TileCoordsXYZD exit = ride_get_exit_location(src, i); if (exit.isNull()) dst->exits[i].xy = RCT_XY8_UNDEFINED; else - dst->exits[i] = { (uint8)exit.x, (uint8)exit.y }; + dst->exits[i] = { (uint8_t)exit.x, (uint8_t)exit.y }; dst->last_peep_in_queue[i] = src->last_peep_in_queue[i]; @@ -511,7 +511,7 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->queue_length[i] = src->queue_length[i]; } - for (uint8 i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE; i++) + for (uint8_t i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE; i++) { dst->vehicles[i] = src->vehicles[i]; } @@ -569,14 +569,14 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->cur_num_customers = src->cur_num_customers; dst->num_customers_timeout = src->num_customers_timeout; - for (uint8 i = 0; i < RCT2_CUSTOMER_HISTORY_SIZE; i++) + for (uint8_t i = 0; i < RCT2_CUSTOMER_HISTORY_SIZE; i++) { dst->num_customers[i] = src->num_customers[i]; } dst->price = src->price; - for (uint8 i = 0; i < 2; i++) + for (uint8_t i = 0; i < 2; i++) { dst->chairlift_bullwheel_location[i] = src->chairlift_bullwheel_location[i]; dst->chairlift_bullwheel_z[i] = src->chairlift_bullwheel_z[i]; @@ -631,7 +631,7 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->inspection_interval = src->inspection_interval; dst->last_inspection = src->last_inspection; - for (uint8 i = 0; i < RCT2_DOWNTIME_HISTORY_SIZE; i++) + for (uint8_t i = 0; i < RCT2_DOWNTIME_HISTORY_SIZE; i++) { dst->downtime_history[i] = src->downtime_history[i]; } @@ -647,7 +647,7 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->income_per_hour = src->income_per_hour; dst->profit = src->profit; - for (uint8 i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) + for (uint8_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) { dst->track_colour_main[i] = src->track_colour_main[i]; dst->track_colour_additional[i] = src->track_colour_additional[i]; @@ -662,7 +662,7 @@ void S6Exporter::ExportRide(rct2_ride * dst, const Ride * src) dst->guests_favourite = src->guests_favourite; dst->lifecycle_flags = src->lifecycle_flags; - for (uint8 i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i++) + for (uint8_t i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i++) { dst->vehicle_colours_extended[i] = src->vehicle_colours_extended[i]; } @@ -686,13 +686,13 @@ void S6Exporter::ExportResearchedRideTypes() std::end(_s6.researched_ride_types), false); - for (sint32 rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) + for (int32_t rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) { if (ride_type_is_invented(rideType)) { - sint32 quadIndex = rideType >> 5; - sint32 bitIndex = rideType & 0x1F; - _s6.researched_ride_types[quadIndex] |= (uint32) 1 << bitIndex; + int32_t quadIndex = rideType >> 5; + int32_t bitIndex = rideType & 0x1F; + _s6.researched_ride_types[quadIndex] |= (uint32_t) 1 << bitIndex; } } } @@ -704,13 +704,13 @@ void S6Exporter::ExportResearchedRideEntries() std::end(_s6.researched_ride_entries), false); - for (sint32 rideEntryIndex = 0; rideEntryIndex < MAX_RIDE_OBJECTS; rideEntryIndex++) + for (int32_t rideEntryIndex = 0; rideEntryIndex < MAX_RIDE_OBJECTS; rideEntryIndex++) { if (ride_entry_is_invented(rideEntryIndex)) { - sint32 quadIndex = rideEntryIndex >> 5; - sint32 bitIndex = rideEntryIndex & 0x1F; - _s6.researched_ride_entries[quadIndex] |= (uint32) 1 << bitIndex; + int32_t quadIndex = rideEntryIndex >> 5; + int32_t bitIndex = rideEntryIndex & 0x1F; + _s6.researched_ride_entries[quadIndex] |= (uint32_t) 1 << bitIndex; } } } @@ -722,13 +722,13 @@ void S6Exporter::ExportResearchedSceneryItems() std::end(_s6.researched_scenery_items), false); - for (uint16 sceneryEntryIndex = 0; sceneryEntryIndex < RCT2_MAX_RESEARCHED_SCENERY_ITEMS; sceneryEntryIndex++) + for (uint16_t sceneryEntryIndex = 0; sceneryEntryIndex < RCT2_MAX_RESEARCHED_SCENERY_ITEMS; sceneryEntryIndex++) { if (scenery_is_invented(sceneryEntryIndex)) { - sint32 quadIndex = sceneryEntryIndex >> 5; - sint32 bitIndex = sceneryEntryIndex & 0x1F; - _s6.researched_scenery_items[quadIndex] |= (uint32) 1 << bitIndex; + int32_t quadIndex = sceneryEntryIndex >> 5; + int32_t bitIndex = sceneryEntryIndex & 0x1F; + _s6.researched_scenery_items[quadIndex] |= (uint32_t) 1 << bitIndex; } } } @@ -738,7 +738,7 @@ void S6Exporter::ExportResearchList() memcpy(_s6.research_items, gResearchItems, sizeof(_s6.research_items)); } -enum : uint32 +enum : uint32_t { S6_SAVE_FLAG_EXPORT = 1 << 0, S6_SAVE_FLAG_SCENARIO = 1 << 1, @@ -750,7 +750,7 @@ enum : uint32 * rct2: 0x006754F5 * @param flags bit 0: pack objects, 1: save as scenario */ -sint32 scenario_save(const utf8 * path, sint32 flags) +int32_t scenario_save(const utf8 * path, int32_t flags) { if (flags & S6_SAVE_FLAG_SCENARIO) { diff --git a/src/openrct2/rct2/S6Exporter.h b/src/openrct2/rct2/S6Exporter.h index 58ff537d63..efd0d7de09 100644 --- a/src/openrct2/rct2/S6Exporter.h +++ b/src/openrct2/rct2/S6Exporter.h @@ -40,7 +40,7 @@ private: rct_s6_data _s6{}; void Save(IStream * stream, bool isScenario); - static uint32 GetLoanHash(money32 initialCash, money32 bankLoan, uint32 maxBankLoan); + static uint32_t GetLoanHash(money32 initialCash, money32 bankLoan, uint32_t maxBankLoan); void ExportResearchedRideTypes(); void ExportResearchedRideEntries(); void ExportResearchedSceneryItems(); diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index c22c3afa47..51c090ed8e 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -60,7 +60,7 @@ private: const utf8 * _s6Path = nullptr; rct_s6_data _s6 { }; - uint8 _gameVersion = 0; + uint8_t _gameVersion = 0; public: S6Importer(std::shared_ptr objectRepository, std::shared_ptr objectManager) @@ -140,7 +140,7 @@ public: // Read packed objects // TODO try to contain this more and not store objects until later - for (uint16 i = 0; i < _s6.header.num_packed_objects; i++) + for (uint16_t i = 0; i < _s6.header.num_packed_objects; i++) { _objectRepository->ExportPackedObject(stream); } @@ -203,12 +203,12 @@ public: memcpy(gTileElements, _s6.tile_elements, sizeof(_s6.tile_elements)); gNextFreeTileElementPointerIndex = _s6.next_free_tile_element_pointer_index; - for (sint32 i = 0; i < RCT2_MAX_SPRITES; i++) + for (int32_t i = 0; i < RCT2_MAX_SPRITES; i++) { memcpy(get_sprite(i), &_s6.sprites[i], sizeof(rct_sprite)); } - for (sint32 i = 0; i < NUM_SPRITE_LISTS; i++) + for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++) { gSpriteListHead[i] = _s6.sprite_lists_head[i]; gSpriteListCount[i] = _s6.sprite_lists_count[i]; @@ -306,7 +306,7 @@ public: memcpy(gPeepWarningThrottle, _s6.peep_warning_throttle, sizeof(_s6.peep_warning_throttle)); // Awards - for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++) + for (int32_t i = 0; i < RCT12_MAX_AWARDS; i++) { rct12_award * src = &_s6.awards[i]; Award * dst = &gCurrentAwards[i]; @@ -348,7 +348,7 @@ public: // pad_0135934B gSamePriceThroughoutParkB = _s6.same_price_throughout_extended; // Preserve compatibility with vanilla RCT2's save format. - for (uint8 i = 0; i < RCT12_MAX_PARK_ENTRANCES; i++) + for (uint8_t i = 0; i < RCT12_MAX_PARK_ENTRANCES; i++) { gParkEntrances[i].x = _s6.park_entrance_x[i]; gParkEntrances[i].y = _s6.park_entrance_y[i]; @@ -443,7 +443,7 @@ public: // We try to fix the cycles on import, hence the 'true' parameter check_for_sprite_list_cycles(true); check_for_spatial_index_cycles(true); - sint32 disjoint_sprites_count = fix_disjoint_sprites(); + int32_t disjoint_sprites_count = fix_disjoint_sprites(); // This one is less harmful, no need to assert for it ~janisozaur if (disjoint_sprites_count > 0) { @@ -464,7 +464,7 @@ public: void ImportRides() { - for (uint8 index = 0; index < RCT12_MAX_RIDES_IN_PARK; index++) + for (uint8_t index = 0; index < RCT12_MAX_RIDES_IN_PARK; index++) { auto src = &_s6.rides[index]; auto dst = get_ride(index); @@ -480,7 +480,7 @@ public: } } - void ImportRide(Ride * dst, const rct2_ride * src, const uint8 rideIndex) + void ImportRide(Ride * dst, const rct2_ride * src, const uint8_t rideIndex) { memset(dst, 0, sizeof(Ride)); @@ -490,7 +490,7 @@ public: dst->mode = src->mode; dst->colour_scheme_type = src->colour_scheme_type; - for (uint8 i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i ++) + for (uint8_t i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i ++) { dst->vehicle_colours[i] = src->vehicle_colours[i]; } @@ -502,7 +502,7 @@ public: dst->overall_view = src->overall_view; - for (sint32 i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) + for (int32_t i = 0; i < RCT12_MAX_STATIONS_PER_RIDE; i++) { dst->station_starts[i] = src->station_starts[i]; dst->station_heights[i] = src->station_heights[i]; @@ -531,7 +531,7 @@ public: dst->queue_length[i] = src->queue_length[i]; } // All other values take 0 as their default. Since they're already memset to that, no need to do it again. - for (sint32 i = RCT12_MAX_STATIONS_PER_RIDE; i < MAX_STATIONS; i++) + for (int32_t i = RCT12_MAX_STATIONS_PER_RIDE; i < MAX_STATIONS; i++) { dst->station_starts[i].xy = RCT_XY8_UNDEFINED; dst->train_at_station[i] = 255; @@ -540,11 +540,11 @@ public: dst->last_peep_in_queue[i] = SPRITE_INDEX_NULL; } - for (sint32 i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE; i++) + for (int32_t i = 0; i < RCT2_MAX_VEHICLES_PER_RIDE; i++) { dst->vehicles[i] = src->vehicles[i]; } - for (sint32 i = RCT2_MAX_VEHICLES_PER_RIDE; i < MAX_VEHICLES_PER_RIDE; i++) + for (int32_t i = RCT2_MAX_VEHICLES_PER_RIDE; i < MAX_VEHICLES_PER_RIDE; i++) { dst->vehicles[i] = SPRITE_INDEX_NULL; } @@ -602,14 +602,14 @@ public: dst->cur_num_customers = src->cur_num_customers; dst->num_customers_timeout = src->num_customers_timeout; - for (uint8 i = 0; i < RCT2_CUSTOMER_HISTORY_SIZE; i++) + for (uint8_t i = 0; i < RCT2_CUSTOMER_HISTORY_SIZE; i++) { dst->num_customers[i] = src->num_customers[i]; } dst->price = src->price; - for (uint8 i = 0; i < 2; i++) + for (uint8_t i = 0; i < 2; i++) { dst->chairlift_bullwheel_location[i] = src->chairlift_bullwheel_location[i]; dst->chairlift_bullwheel_z[i] = src->chairlift_bullwheel_z[i]; @@ -666,7 +666,7 @@ public: dst->inspection_interval = src->inspection_interval; dst->last_inspection = src->last_inspection; - for (uint8 i = 0; i < RCT2_DOWNTIME_HISTORY_SIZE; i++) + for (uint8_t i = 0; i < RCT2_DOWNTIME_HISTORY_SIZE; i++) { dst->downtime_history[i] = src->downtime_history[i]; } @@ -682,7 +682,7 @@ public: dst->income_per_hour = src->income_per_hour; dst->profit = src->profit; - for (uint8 i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) + for (uint8_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) { dst->track_colour_main[i] = src->track_colour_main[i]; dst->track_colour_additional[i] = src->track_colour_additional[i]; @@ -697,7 +697,7 @@ public: dst->guests_favourite = src->guests_favourite; dst->lifecycle_flags = src->lifecycle_flags; - for (uint8 i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i++) + for (uint8_t i = 0; i < RCT2_MAX_CARS_PER_TRAIN; i++) { dst->vehicle_colours_extended[i] = src->vehicle_colours_extended[i]; } @@ -718,11 +718,11 @@ public: { set_every_ride_type_not_invented(); - for (sint32 rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) + for (int32_t rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) { - sint32 quadIndex = rideType >> 5; - sint32 bitIndex = rideType & 0x1F; - bool invented = (_s6.researched_ride_types[quadIndex] & ((uint32) 1 << bitIndex)); + int32_t quadIndex = rideType >> 5; + int32_t bitIndex = rideType & 0x1F; + bool invented = (_s6.researched_ride_types[quadIndex] & ((uint32_t) 1 << bitIndex)); if (invented) ride_type_set_invented(rideType); @@ -733,11 +733,11 @@ public: { set_every_ride_entry_not_invented(); - for (sint32 rideEntryIndex = 0; rideEntryIndex < MAX_RIDE_OBJECTS; rideEntryIndex++) + for (int32_t rideEntryIndex = 0; rideEntryIndex < MAX_RIDE_OBJECTS; rideEntryIndex++) { - sint32 quadIndex = rideEntryIndex >> 5; - sint32 bitIndex = rideEntryIndex & 0x1F; - bool invented = (_s6.researched_ride_entries[quadIndex] & ((uint32) 1 << bitIndex)); + int32_t quadIndex = rideEntryIndex >> 5; + int32_t bitIndex = rideEntryIndex & 0x1F; + bool invented = (_s6.researched_ride_entries[quadIndex] & ((uint32_t) 1 << bitIndex)); if (invented) ride_entry_set_invented(rideEntryIndex); @@ -748,11 +748,11 @@ public: { set_all_scenery_items_not_invented(); - for (uint16 sceneryEntryIndex = 0; sceneryEntryIndex < RCT2_MAX_RESEARCHED_SCENERY_ITEMS; sceneryEntryIndex++) + for (uint16_t sceneryEntryIndex = 0; sceneryEntryIndex < RCT2_MAX_RESEARCHED_SCENERY_ITEMS; sceneryEntryIndex++) { - sint32 quadIndex = sceneryEntryIndex >> 5; - sint32 bitIndex = sceneryEntryIndex & 0x1F; - bool invented = (_s6.researched_scenery_items[quadIndex] & ((uint32) 1 << bitIndex)); + int32_t quadIndex = sceneryEntryIndex >> 5; + int32_t bitIndex = sceneryEntryIndex & 0x1F; + bool invented = (_s6.researched_scenery_items[quadIndex] & ((uint32_t) 1 << bitIndex)); if (invented) scenery_set_invented(sceneryEntryIndex); @@ -811,10 +811,10 @@ public: } } - void ImportNumRiders(Ride * dst, const uint8 rideIndex) + void ImportNumRiders(Ride * dst, const uint8_t rideIndex) { // The number of riders might have overflown or underflown. Re-calculate the value. - uint16 numRiders = 0; + uint16_t numRiders = 0; for (const rct_sprite sprite : _s6.sprites) { if (sprite.unknown.sprite_identifier == SPRITE_IDENTIFIER_PEEP) diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index eca33a0bdb..f54c8f6b92 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -23,13 +23,13 @@ static void cable_lift_update_departing(rct_vehicle * vehicle); static void cable_lift_update_travelling(rct_vehicle * vehicle); static void cable_lift_update_arriving(rct_vehicle * vehicle); -rct_vehicle * cable_lift_segment_create(sint32 rideIndex, - sint32 x, - sint32 y, - sint32 z, - sint32 direction, - uint16 var_44, - sint32 remaining_distance, +rct_vehicle * cable_lift_segment_create(int32_t rideIndex, + int32_t x, + int32_t y, + int32_t z, + int32_t direction, + uint16_t var_44, + int32_t remaining_distance, bool head) { Ride * ride = get_ride(rideIndex); @@ -165,8 +165,8 @@ static void cable_lift_update_waiting_to_depart(rct_vehicle * vehicle) rct_vehicle * passengerVehicle = GET_VEHICLE(vehicle->cable_lift_target); rct_vehicle * cableLiftSecondPart = GET_VEHICLE(vehicle->prev_vehicle_on_ride); - sint16 dist_x = abs(passengerVehicle->x - cableLiftSecondPart->x); - sint16 dist_y = abs(passengerVehicle->y - cableLiftSecondPart->y); + int16_t dist_x = abs(passengerVehicle->x - cableLiftSecondPart->x); + int16_t dist_y = abs(passengerVehicle->y - cableLiftSecondPart->y); if (dist_x + dist_y > 2) return; @@ -230,17 +230,17 @@ static bool sub_6DF01A_loop(rct_vehicle * vehicle) Ride * ride = get_ride(vehicle->ride); for (; vehicle->remaining_distance >= 13962; _vehicleUnkF64E10++) { - uint8 trackType = vehicle->track_type >> 2; + uint8_t trackType = vehicle->track_type >> 2; if (trackType == TRACK_ELEM_CABLE_LIFT_HILL && vehicle->track_progress == 160) { _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_1; } - uint16 trackProgress = vehicle->track_progress + 1; + uint16_t trackProgress = vehicle->track_progress + 1; const rct_vehicle_info * moveInfo = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, 0); - uint16 trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); + uint16_t trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); if (trackProgress >= trackTotalProgress) { _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; @@ -255,8 +255,8 @@ static bool sub_6DF01A_loop(rct_vehicle * vehicle) CoordsXYE input; CoordsXYE output; - sint32 outputZ; - sint32 outputDirection; + int32_t outputZ; + int32_t outputDirection; input.x = vehicle->track_x; input.y = vehicle->track_y; @@ -289,7 +289,7 @@ static bool sub_6DF01A_loop(rct_vehicle * vehicle) unk.y += vehicle->track_y; unk.z += vehicle->track_z; - uint8 bx = 0; + uint8_t bx = 0; unk.z += RideData5[ride->type].z_offset; if (unk.x != unk_F64E20.x) bx |= (1 << 0); @@ -320,12 +320,12 @@ static bool sub_6DF21B_loop(rct_vehicle * vehicle) Ride * ride = get_ride(vehicle->ride); for (; vehicle->remaining_distance < 0; _vehicleUnkF64E10++) { - uint16 trackProgress = vehicle->track_progress - 1; + uint16_t trackProgress = vehicle->track_progress - 1; const rct_vehicle_info * moveInfo; - if ((sint16) trackProgress == -1) + if ((int16_t) trackProgress == -1) { - uint8 trackType = vehicle->track_type >> 2; + uint8_t trackType = vehicle->track_type >> 2; _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_start; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_start; @@ -363,7 +363,7 @@ static bool sub_6DF21B_loop(rct_vehicle * vehicle) } moveInfo = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, 0); - uint16 trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); + uint16_t trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); trackProgress = trackTotalProgress - 1; } vehicle->track_progress = trackProgress; @@ -375,7 +375,7 @@ static bool sub_6DF21B_loop(rct_vehicle * vehicle) unk.y += vehicle->track_y; unk.z += vehicle->track_z; - uint8 bx = 0; + uint8_t bx = 0; unk.z += RideData5[ride->type].z_offset; if (unk.x != unk_F64E20.x) bx |= (1 << 0); @@ -405,7 +405,7 @@ static bool sub_6DF21B_loop(rct_vehicle * vehicle) * * rct2: 0x006DEF56 */ -sint32 cable_lift_update_track_motion(rct_vehicle * cableLift) +int32_t cable_lift_update_track_motion(rct_vehicle * cableLift) { _vehicleF64E2C = 0; gCurrentVehicle = cableLift; @@ -495,25 +495,25 @@ sint32 cable_lift_update_track_motion(rct_vehicle * cableLift) } } - uint32 vehicleCount = 0; - uint16 massTotal = 0; - sint32 accelerationTotal = 0; + uint32_t vehicleCount = 0; + uint16_t massTotal = 0; + int32_t accelerationTotal = 0; - for (uint16 spriteId = cableLift->sprite_index; spriteId != SPRITE_INDEX_NULL;) + for (uint16_t spriteId = cableLift->sprite_index; spriteId != SPRITE_INDEX_NULL;) { rct_vehicle * vehicle = GET_VEHICLE(spriteId); vehicleCount++; massTotal += vehicle->mass; - accelerationTotal = add_clamp_sint32(accelerationTotal, vehicle->acceleration); + accelerationTotal = add_clamp_int32_t(accelerationTotal, vehicle->acceleration); spriteId = vehicle->next_vehicle_on_train; } - sint32 newAcceleration = (accelerationTotal / vehicleCount) >> 9; + int32_t newAcceleration = (accelerationTotal / vehicleCount) >> 9; newAcceleration -= cableLift->velocity >> 12; - sint32 edx = cableLift->velocity >> 8; + int32_t edx = cableLift->velocity >> 8; edx *= edx; if (cableLift->velocity < 0) { diff --git a/src/openrct2/ride/CableLift.h b/src/openrct2/ride/CableLift.h index ee40115cad..da860f6f9a 100644 --- a/src/openrct2/ride/CableLift.h +++ b/src/openrct2/ride/CableLift.h @@ -13,8 +13,8 @@ #include "../common.h" #include "Vehicle.h" -rct_vehicle *cable_lift_segment_create(sint32 rideIndex, sint32 x, sint32 y, sint32 z, sint32 direction, uint16 var_44, sint32 remaining_distance, bool head); +rct_vehicle *cable_lift_segment_create(int32_t rideIndex, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head); void cable_lift_update(rct_vehicle *vehicle); -sint32 cable_lift_update_track_motion(rct_vehicle *cableLift); +int32_t cable_lift_update_track_motion(rct_vehicle *cableLift); #endif diff --git a/src/openrct2/ride/MusicList.cpp b/src/openrct2/ride/MusicList.cpp index de12611850..fe6a61baa0 100644 --- a/src/openrct2/ride/MusicList.cpp +++ b/src/openrct2/ride/MusicList.cpp @@ -14,10 +14,10 @@ #include "MusicList.h" -#define MAKE_TUNEID_LIST(...) std::vector({__VA_ARGS__}) +#define MAKE_TUNEID_LIST(...) std::vector({__VA_ARGS__}) // 0x009AEF28 -std::vector gRideMusicStyleTuneIds[] = +std::vector gRideMusicStyleTuneIds[] = { MAKE_TUNEID_LIST(TUNE_DODGEMS_BEAT), // MUSIC_STYLE_DODGEMS_BEAT MAKE_TUNEID_LIST( // MUSIC_STYLE_FAIRGROUND_ORGAN diff --git a/src/openrct2/ride/MusicList.h b/src/openrct2/ride/MusicList.h index 94fca30245..3ca9d5b84d 100644 --- a/src/openrct2/ride/MusicList.h +++ b/src/openrct2/ride/MusicList.h @@ -63,4 +63,4 @@ enum TUNE_SWEAT_DREAMS, // 45, (sic) }; -extern std::vector gRideMusicStyleTuneIds[]; +extern std::vector gRideMusicStyleTuneIds[]; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 59c52d2d1f..3c553fcb81 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -65,7 +65,7 @@ using namespace OpenRCT2; /** rct2: 0x0097C3AF */ // clang-format off -const uint8 gRideClassifications[255] = { +const uint8_t gRideClassifications[255] = { RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, RIDE_CLASS_RIDE, @@ -133,11 +133,11 @@ const uint8 gRideClassifications[255] = { }; // clang-format on -uint8 gTypeToRideEntryIndexMap[TYPE_TO_RIDE_ENTRY_SLOTS]; +uint8_t gTypeToRideEntryIndexMap[TYPE_TO_RIDE_ENTRY_SLOTS]; #pragma endregion -static constexpr const sint32 RideInspectionInterval[] = { +static constexpr const int32_t RideInspectionInterval[] = { 10, 20, 30, 45, 60, 120, 0, 0 }; @@ -145,82 +145,82 @@ Ride gRideList[MAX_RIDES]; rct_ride_measurement gRideMeasurements[MAX_RIDE_MEASUREMENTS]; -uint16 gRideCount; +uint16_t gRideCount; bool gGotoStartPlacementMode = false; -sint32 gRideRemoveTrackPieceCallbackX; -sint32 gRideRemoveTrackPieceCallbackY; -sint32 gRideRemoveTrackPieceCallbackZ; -sint32 gRideRemoveTrackPieceCallbackDirection; -sint32 gRideRemoveTrackPieceCallbackType; +int32_t gRideRemoveTrackPieceCallbackX; +int32_t gRideRemoveTrackPieceCallbackY; +int32_t gRideRemoveTrackPieceCallbackZ; +int32_t gRideRemoveTrackPieceCallbackDirection; +int32_t gRideRemoveTrackPieceCallbackType; money16 gTotalRideValueForMoney; money32 _currentTrackPrice; -uint16 _numCurrentPossibleRideConfigurations; -uint16 _numCurrentPossibleSpecialTrackPieces; +uint16_t _numCurrentPossibleRideConfigurations; +uint16_t _numCurrentPossibleSpecialTrackPieces; -uint16 _currentTrackCurve; -uint16 _currentTrackEndX; -uint16 _currentTrackEndY; -uint8 _rideConstructionState; -uint8 _currentRideIndex; -uint16 _currentTrackBeginX; -uint16 _currentTrackBeginY; -uint16 _currentTrackBeginZ; -uint8 _currentTrackPieceDirection; -uint8 _currentTrackPieceType; -uint8 _currentTrackSelectionFlags; -sint8 _rideConstructionArrowPulseTime; -uint8 _currentTrackSlopeEnd; -uint8 _currentTrackBankEnd; -uint8 _currentTrackLiftHill; -uint8 _currentTrackAlternative; -uint8 _selectedTrackType; +uint16_t _currentTrackCurve; +uint16_t _currentTrackEndX; +uint16_t _currentTrackEndY; +uint8_t _rideConstructionState; +uint8_t _currentRideIndex; +uint16_t _currentTrackBeginX; +uint16_t _currentTrackBeginY; +uint16_t _currentTrackBeginZ; +uint8_t _currentTrackPieceDirection; +uint8_t _currentTrackPieceType; +uint8_t _currentTrackSelectionFlags; +int8_t _rideConstructionArrowPulseTime; +uint8_t _currentTrackSlopeEnd; +uint8_t _currentTrackBankEnd; +uint8_t _currentTrackLiftHill; +uint8_t _currentTrackAlternative; +uint8_t _selectedTrackType; -uint8 _previousTrackBankEnd; -uint8 _previousTrackSlopeEnd; +uint8_t _previousTrackBankEnd; +uint8_t _previousTrackSlopeEnd; -uint16 _previousTrackPieceX; -uint16 _previousTrackPieceY; -uint16 _previousTrackPieceZ; +uint16_t _previousTrackPieceX; +uint16_t _previousTrackPieceY; +uint16_t _previousTrackPieceZ; -uint8 _currentBrakeSpeed2; -uint8 _currentSeatRotationAngle; +uint8_t _currentBrakeSpeed2; +uint8_t _currentSeatRotationAngle; LocationXYZ16 _unkF44188; CoordsXYZD _unkF440C5; -uint8 gRideEntranceExitPlaceType; -uint8 gRideEntranceExitPlaceRideIndex; -uint8 gRideEntranceExitPlaceStationIndex; -uint8 gRideEntranceExitPlacePreviousRideConstructionState; -uint8 gRideEntranceExitPlaceDirection; +uint8_t gRideEntranceExitPlaceType; +uint8_t gRideEntranceExitPlaceRideIndex; +uint8_t gRideEntranceExitPlaceStationIndex; +uint8_t gRideEntranceExitPlacePreviousRideConstructionState; +uint8_t gRideEntranceExitPlaceDirection; -uint8 gLastEntranceStyle; +uint8_t gLastEntranceStyle; // Static function declarations -rct_peep *find_closest_mechanic(sint32 x, sint32 y, sint32 forInspection); -static void ride_breakdown_status_update(sint32 rideIndex); -static void ride_breakdown_update(sint32 rideIndex); -static void ride_call_closest_mechanic(sint32 rideIndex); -static void ride_call_mechanic(sint32 rideIndex, rct_peep *mechanic, sint32 forInspection); +rct_peep *find_closest_mechanic(int32_t x, int32_t y, int32_t forInspection); +static void ride_breakdown_status_update(int32_t rideIndex); +static void ride_breakdown_update(int32_t rideIndex); +static void ride_call_closest_mechanic(int32_t rideIndex); +static void ride_call_mechanic(int32_t rideIndex, rct_peep *mechanic, int32_t forInspection); static void ride_chairlift_update(Ride *ride); -static void ride_entrance_exit_connected(Ride* ride, sint32 ride_idx); +static void ride_entrance_exit_connected(Ride* ride, int32_t ride_idx); static void ride_set_name_to_vehicle_default(Ride * ride, rct_ride_entry * rideEntry); -static sint32 ride_get_new_breakdown_problem(Ride *ride); +static int32_t ride_get_new_breakdown_problem(Ride *ride); static void ride_inspection_update(Ride *ride); -static void ride_mechanic_status_update(sint32 rideIndex, sint32 mechanicStatus); -static void ride_music_update(sint32 rideIndex); -static void ride_shop_connected(Ride* ride, sint32 ride_idx); +static void ride_mechanic_status_update(int32_t rideIndex, int32_t mechanicStatus); +static void ride_music_update(int32_t rideIndex); +static void ride_shop_connected(Ride* ride, int32_t ride_idx); static void ride_spiral_slide_update(Ride *ride); -static void ride_update(sint32 rideIndex); -static void ride_update_vehicle_colours(sint32 rideIndex); +static void ride_update(int32_t rideIndex); +static void ride_update_vehicle_colours(int32_t rideIndex); void loc_6DDF9C(Ride *ride, rct_tile_element *tileElement); -Ride *get_ride(sint32 index) +Ride *get_ride(int32_t index) { if (index < 0 || index >= MAX_RIDES) { @@ -230,7 +230,7 @@ Ride *get_ride(sint32 index) return &gRideList[index]; } -rct_ride_entry * get_ride_entry(sint32 index) +rct_ride_entry * get_ride_entry(int32_t index) { rct_ride_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -245,7 +245,7 @@ rct_ride_entry * get_ride_entry(sint32 index) return result; } -void get_ride_entry_name(char *name, sint32 index) +void get_ride_entry_name(char *name, int32_t index) { if (index < 0 || index >= object_entry_group_counts[OBJECT_TYPE_RIDE]) { @@ -258,7 +258,7 @@ void get_ride_entry_name(char *name, sint32 index) name[8] = '\0'; } -rct_ride_measurement *get_ride_measurement(sint32 index) +rct_ride_measurement *get_ride_measurement(int32_t index) { return &gRideMeasurements[index]; } @@ -282,32 +282,32 @@ rct_ride_entry * get_ride_entry_by_ride(Ride *ride) void reset_type_to_ride_entry_index_map(IObjectManager& objectManager) { size_t stride = MAX_RIDE_OBJECTS + 1; - uint8 * entryTypeTable = (uint8 *)malloc(RIDE_TYPE_COUNT * stride); + uint8_t * entryTypeTable = (uint8_t *)malloc(RIDE_TYPE_COUNT * stride); memset(entryTypeTable, 0xFF, RIDE_TYPE_COUNT * stride); - for (uint8 i = 0; i < MAX_RIDE_OBJECTS; i++) { + for (uint8_t i = 0; i < MAX_RIDE_OBJECTS; i++) { auto obj = objectManager.GetLoadedObject(OBJECT_TYPE_RIDE, i); if (obj != nullptr) { - for (uint8 j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) + for (uint8_t j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++) { auto rideEntry = (rct_ride_entry *)obj->GetLegacyData(); - uint8 rideType = rideEntry->ride_type[j]; + uint8_t rideType = rideEntry->ride_type[j]; if (rideType < RIDE_TYPE_COUNT) { - uint8 * entryArray = &entryTypeTable[rideType * stride]; - uint8 * nextEntry = (uint8 *)memchr(entryArray, 0xFF, stride); + uint8_t * entryArray = &entryTypeTable[rideType * stride]; + uint8_t * nextEntry = (uint8_t *)memchr(entryArray, 0xFF, stride); *nextEntry = i; } } } } - uint8 * dst = gTypeToRideEntryIndexMap; - for (uint8 i = 0; i < RIDE_TYPE_COUNT; i++) { - uint8 * entryArray = &entryTypeTable[i * stride]; - uint8 * entry = entryArray; + uint8_t * dst = gTypeToRideEntryIndexMap; + for (uint8_t i = 0; i < RIDE_TYPE_COUNT; i++) { + uint8_t * entryArray = &entryTypeTable[i * stride]; + uint8_t * entry = entryArray; while (*entry != 0xFF) { *dst++ = *entry++; } @@ -317,9 +317,9 @@ void reset_type_to_ride_entry_index_map(IObjectManager& objectManager) free(entryTypeTable); } -uint8 *get_ride_entry_indices_for_ride_type(uint8 rideType) +uint8_t *get_ride_entry_indices_for_ride_type(uint8_t rideType) { - uint8 *entryIndexList = gTypeToRideEntryIndexMap; + uint8_t *entryIndexList = gTypeToRideEntryIndexMap; while (rideType > 0) { do { entryIndexList++; @@ -329,10 +329,10 @@ uint8 *get_ride_entry_indices_for_ride_type(uint8 rideType) return entryIndexList; } -sint32 ride_get_count() +int32_t ride_get_count() { Ride *ride; - sint32 i, count = 0; + int32_t i, count = 0; FOR_ALL_RIDES(i, ride) count++; @@ -340,29 +340,29 @@ sint32 ride_get_count() return count; } -sint32 ride_get_total_queue_length(Ride *ride) +int32_t ride_get_total_queue_length(Ride *ride) { - sint32 i, queueLength = 0; + int32_t i, queueLength = 0; for (i = 0; i < MAX_STATIONS; i++) if (!ride_get_entrance_location(ride, i).isNull()) queueLength += ride->queue_length[i]; return queueLength; } -sint32 ride_get_max_queue_time(Ride *ride) +int32_t ride_get_max_queue_time(Ride *ride) { - uint8 i, queueTime = 0; + uint8_t i, queueTime = 0; for (i = 0; i < MAX_STATIONS; i++) if (!ride_get_entrance_location(ride, i).isNull()) queueTime = std::max(queueTime, ride->queue_time[i]); - return (sint32)queueTime; + return (int32_t)queueTime; } -rct_peep * ride_get_queue_head_guest(Ride * ride, sint32 stationIndex) +rct_peep * ride_get_queue_head_guest(Ride * ride, int32_t stationIndex) { rct_peep * peep; rct_peep * result = nullptr; - uint16 spriteIndex = ride->last_peep_in_queue[stationIndex]; + uint16_t spriteIndex = ride->last_peep_in_queue[stationIndex]; while ((peep = try_get_guest(spriteIndex)) != nullptr) { spriteIndex = peep->next_in_queue; result = peep; @@ -370,11 +370,11 @@ rct_peep * ride_get_queue_head_guest(Ride * ride, sint32 stationIndex) return result; } -static void ride_update_queue_length(Ride * ride, sint32 stationIndex) +static void ride_update_queue_length(Ride * ride, int32_t stationIndex) { - uint16 count = 0; + uint16_t count = 0; rct_peep * peep; - uint16 spriteIndex = ride->last_peep_in_queue[stationIndex]; + uint16_t spriteIndex = ride->last_peep_in_queue[stationIndex]; while ((peep = try_get_guest(spriteIndex)) != nullptr) { spriteIndex = peep->next_in_queue; count++; @@ -382,7 +382,7 @@ static void ride_update_queue_length(Ride * ride, sint32 stationIndex) ride->queue_length[stationIndex] = count; } -void ride_queue_insert_guest_at_front(Ride * ride, sint32 stationIndex, rct_peep * peep) +void ride_queue_insert_guest_at_front(Ride * ride, int32_t stationIndex, rct_peep * peep) { assert(ride != nullptr); assert(stationIndex < MAX_STATIONS); @@ -404,9 +404,9 @@ void ride_queue_insert_guest_at_front(Ride * ride, sint32 stationIndex, rct_peep */ void ride_update_favourited_stat() { - sint32 i; + int32_t i; Ride *ride; - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep* peep; FOR_ALL_RIDES(i, ride) @@ -442,7 +442,7 @@ static money32 ride_calculate_income_per_hour(Ride *ride) money32 customersPerHour = ride_customers_per_hour(ride); money32 priceMinusCost = ride_get_price(ride); - sint32 currentShopItem = entry->shop_item; + int32_t currentShopItem = entry->shop_item; if (currentShopItem != SHOP_ITEM_NONE) { priceMinusCost -= get_shop_item_cost(currentShopItem); } @@ -470,7 +470,7 @@ static money32 ride_calculate_income_per_hour(Ride *ride) * dl ride index * esi result map element */ -bool ride_try_get_origin_element(sint32 rideIndex, CoordsXYE *output) +bool ride_try_get_origin_element(int32_t rideIndex, CoordsXYE *output) { rct_tile_element *resultTileElement = nullptr; @@ -518,7 +518,7 @@ bool ride_try_get_origin_element(sint32 rideIndex, CoordsXYE *output) * Use track_block_get_next if you are unsure if you are * on the first element of a track block */ -bool track_block_get_next_from_zero(sint16 x, sint16 y, sint16 z_start, uint8 rideIndex, uint8 direction_start, CoordsXYE *output, sint32 *z, sint32 *direction, bool isGhost) +bool track_block_get_next_from_zero(int16_t x, int16_t y, int16_t z_start, uint8_t rideIndex, uint8_t direction_start, CoordsXYE *output, int32_t *z, int32_t *direction, bool isGhost) { Ride* ride = get_ride(rideIndex); @@ -550,14 +550,14 @@ bool track_block_get_next_from_zero(sint16 x, sint16 y, sint16 z_start, uint8 ri const rct_preview_track* nextTrackBlock = get_track_def_from_ride(ride, track_element_get_type(tileElement)); const rct_track_coordinates* nextTrackCoordinate = get_track_coord_from_ride(ride, track_element_get_type(tileElement)); - uint8 nextRotation = + uint8_t nextRotation = tile_element_get_direction_with_offset(tileElement, nextTrackCoordinate->rotation_begin) | (nextTrackCoordinate->rotation_begin & (1 << 2)); if (nextRotation != direction_start) continue; - sint16 nextZ = nextTrackCoordinate->z_begin - nextTrackBlock->z + tileElement->base_height * 8; + int16_t nextZ = nextTrackCoordinate->z_begin - nextTrackBlock->z + tileElement->base_height * 8; if (nextZ != z_start) continue; @@ -581,22 +581,22 @@ bool track_block_get_next_from_zero(sint16 x, sint16 y, sint16 z_start, uint8 ri * * rct2: 0x006C60C2 */ -bool track_block_get_next(CoordsXYE *input, CoordsXYE *output, sint32 *z, sint32 *direction) +bool track_block_get_next(CoordsXYE *input, CoordsXYE *output, int32_t *z, int32_t *direction) { - uint8 rideIndex = track_element_get_ride_index(input->element); + uint8_t rideIndex = track_element_get_ride_index(input->element); Ride* ride = get_ride(rideIndex); const rct_preview_track* trackBlock = get_track_def_from_ride(ride, track_element_get_type(input->element)); - uint8 sequence = tile_element_get_track_sequence(input->element); + uint8_t sequence = tile_element_get_track_sequence(input->element); trackBlock += sequence; const rct_track_coordinates* trackCoordinate = get_track_coord_from_ride(ride, track_element_get_type(input->element)); - sint32 x = input->x; - sint32 y = input->y; - sint32 OriginZ = input->element->base_height * 8; + int32_t x = input->x; + int32_t y = input->y; + int32_t OriginZ = input->element->base_height * 8; - uint8 rotation = tile_element_get_direction(input->element); + uint8_t rotation = tile_element_get_direction(input->element); switch (rotation){ case 0: x += trackCoordinate->x; @@ -627,7 +627,7 @@ bool track_block_get_next(CoordsXYE *input, CoordsXYE *output, sint32 *z, sint32 OriginZ -= trackBlock->z; OriginZ += trackCoordinate->z_end; - uint8 directionStart = ((trackCoordinate->rotation_end + rotation) & TILE_ELEMENT_DIRECTION_MASK) | + uint8_t directionStart = ((trackCoordinate->rotation_end + rotation) & TILE_ELEMENT_DIRECTION_MASK) | (trackCoordinate->rotation_end & (1 << 2)); return track_block_get_next_from_zero(x, y, OriginZ, rideIndex, directionStart, output, z, direction, false); @@ -641,10 +641,10 @@ bool track_block_get_next(CoordsXYE *input, CoordsXYE *output, sint32 *z, sint32 * element of a track block * rct2: 0x006C63D6 */ -bool track_block_get_previous_from_zero(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8 direction, track_begin_end *outTrackBeginEnd){ +bool track_block_get_previous_from_zero(int16_t x, int16_t y, int16_t z, uint8_t rideIndex, uint8_t direction, track_begin_end *outTrackBeginEnd){ Ride* ride = get_ride(rideIndex); - uint8 directionStart = direction; + uint8_t directionStart = direction; direction ^= (1 << 1); if (!(direction & (1 << 2))){ @@ -675,14 +675,14 @@ bool track_block_get_previous_from_zero(sint16 x, sint16 y, sint16 z, uint8 ride if ((nextTrackBlock + 1)->index != 255) continue; - uint8 nextRotation = + uint8_t nextRotation = tile_element_get_direction_with_offset(tileElement, nextTrackCoordinate->rotation_end) | (nextTrackCoordinate->rotation_end & (1 << 2)); if (nextRotation != directionStart) continue; - sint16 nextZ = nextTrackCoordinate->z_end - nextTrackBlock->z + tileElement->base_height * 8; + int16_t nextZ = nextTrackCoordinate->z_end - nextTrackBlock->z + tileElement->base_height * 8; if (nextZ != z) continue; @@ -739,20 +739,20 @@ bool track_block_get_previous_from_zero(sint16 x, sint16 y, sint16 z, uint8 ride * higher two bytes of ecx and edx where as outTrackBeginEnd.end_x and * outTrackBeginEnd.end_y will be in the lower two bytes (cx and dx). */ -bool track_block_get_previous(sint32 x, sint32 y, rct_tile_element *tileElement, track_begin_end *outTrackBeginEnd) +bool track_block_get_previous(int32_t x, int32_t y, rct_tile_element *tileElement, track_begin_end *outTrackBeginEnd) { - uint8 rideIndex = track_element_get_ride_index(tileElement); + uint8_t rideIndex = track_element_get_ride_index(tileElement); Ride* ride = get_ride(rideIndex); const rct_preview_track* trackBlock = get_track_def_from_ride(ride, track_element_get_type(tileElement)); - uint8 sequence = tile_element_get_track_sequence(tileElement); + uint8_t sequence = tile_element_get_track_sequence(tileElement); trackBlock += sequence; const rct_track_coordinates* trackCoordinate = get_track_coord_from_ride(ride, track_element_get_type(tileElement)); - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; - uint8 rotation = tile_element_get_direction(tileElement); + uint8_t rotation = tile_element_get_direction(tileElement); switch (rotation){ case 0: x -= trackBlock->x; @@ -790,10 +790,10 @@ bool track_block_get_previous(sint32 x, sint32 y, rct_tile_element *tileElement, * bx result y * esi input / output map element */ -sint32 ride_find_track_gap(CoordsXYE *input, CoordsXYE *output) +int32_t ride_find_track_gap(CoordsXYE *input, CoordsXYE *output) { assert(input->element->GetType() == TILE_ELEMENT_TYPE_TRACK); - sint32 rideIndex = track_element_get_ride_index(input->element); + int32_t rideIndex = track_element_get_ride_index(input->element); Ride* ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) @@ -837,7 +837,7 @@ sint32 ride_find_track_gap(CoordsXYE *input, CoordsXYE *output) * * rct2: 0x006AF561 */ -void ride_get_status(sint32 rideIndex, rct_string_id *formatSecondary, sint32 *argument) +void ride_get_status(int32_t rideIndex, rct_string_id *formatSecondary, int32_t *argument) { Ride *ride = get_ride(rideIndex); @@ -890,23 +890,23 @@ void ride_get_status(sint32 rideIndex, rct_string_id *formatSecondary, sint32 *a } } -sint32 ride_get_total_length(Ride *ride) +int32_t ride_get_total_length(Ride *ride) { - sint32 i, totalLength = 0; + int32_t i, totalLength = 0; for (i = 0; i < ride->num_stations; i++) totalLength += ride->length[i]; return totalLength; } -sint32 ride_get_total_time(Ride *ride) +int32_t ride_get_total_time(Ride *ride) { - sint32 i, totalTime = 0; + int32_t i, totalTime = 0; for (i = 0; i < ride->num_stations; i++) totalTime += ride->time[i]; return totalTime; } -sint32 ride_can_have_multiple_circuits(Ride *ride) +int32_t ride_can_have_multiple_circuits(Ride *ride) { if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_ALLOW_MULTIPLE_CIRCUITS)) return 0; @@ -935,12 +935,12 @@ sint32 ride_can_have_multiple_circuits(Ride *ride) */ void ride_init_all() { - for (sint32 i = 0; i < MAX_RIDES; i++) { + for (int32_t i = 0; i < MAX_RIDES; i++) { Ride *ride = get_ride(i); ride->type = RIDE_TYPE_NULL; } - for (sint32 i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { + for (int32_t i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { rct_ride_measurement *ride_measurement = get_ride_measurement(i); ride_measurement->ride_index = 255; } @@ -952,7 +952,7 @@ void ride_init_all() */ void reset_all_ride_build_dates() { - sint32 i; + int32_t i; Ride *ride; FOR_ALL_RIDES(i, ride) @@ -963,7 +963,7 @@ void reset_all_ride_build_dates() #pragma region Construction -static sint32 ride_check_if_construction_allowed(Ride *ride) +static int32_t ride_check_if_construction_allowed(Ride *ride) { rct_ride_entry * rideEntry = get_ride_entry_by_ride(ride); if (rideEntry == nullptr) { @@ -972,14 +972,14 @@ static sint32 ride_check_if_construction_allowed(Ride *ride) } if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) { set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); context_show_error(STR_CANT_START_CONSTRUCTION_ON, STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING); return 0; } if (ride->status != RIDE_STATUS_CLOSED) { set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); context_show_error(STR_CANT_START_CONSTRUCTION_ON, STR_MUST_BE_CLOSED_FIRST); return 0; } @@ -987,7 +987,7 @@ static sint32 ride_check_if_construction_allowed(Ride *ride) return 1; } -static rct_window *ride_create_or_find_construction_window(sint32 rideIndex) +static rct_window *ride_create_or_find_construction_window(int32_t rideIndex) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_FOCUS); @@ -1000,7 +1000,7 @@ static rct_window *ride_create_or_find_construction_window(sint32 rideIndex) * * rct2: 0x006B4857 */ -void ride_construct(sint32 rideIndex) +void ride_construct(int32_t rideIndex) { CoordsXYE trackElement; @@ -1023,7 +1023,7 @@ static void ride_remove_cable_lift(Ride *ride) { if (ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) { ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CABLE_LIFT; - uint16 spriteIndex = ride->cable_lift; + uint16_t spriteIndex = ride->cable_lift; do { rct_vehicle *vehicle = GET_VEHICLE(spriteIndex); invalidate_sprite_2((rct_sprite*)vehicle); @@ -1044,7 +1044,7 @@ static void ride_remove_vehicles(Ride *ride) ride->lifecycle_flags &= ~(RIDE_LIFECYCLE_TEST_IN_PROGRESS | RIDE_LIFECYCLE_HAS_STALLED_VEHICLE); for (size_t i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { - uint16 spriteIndex = ride->vehicles[i]; + uint16_t spriteIndex = ride->vehicles[i]; while (spriteIndex != SPRITE_INDEX_NULL) { rct_vehicle *vehicle = GET_VEHICLE(spriteIndex); invalidate_sprite_2((rct_sprite*)vehicle); @@ -1064,7 +1064,7 @@ static void ride_remove_vehicles(Ride *ride) * * rct2: 0x006DD4AC */ -void ride_clear_for_construction(sint32 rideIndex) +void ride_clear_for_construction(int32_t rideIndex) { Ride *ride; rct_window *w; @@ -1096,18 +1096,18 @@ void ride_clear_for_construction(sint32 rideIndex) * * rct2: 0x006664DF */ -void ride_remove_peeps(sint32 rideIndex) +void ride_remove_peeps(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); // Find first station - sint8 stationIndex = ride_get_first_valid_station_start(ride); + int8_t stationIndex = ride_get_first_valid_station_start(ride); // Get exit position and direction - sint32 exitX = 0; - sint32 exitY = 0; - sint32 exitZ = 0; - sint32 exitDirection = 255; + int32_t exitX = 0; + int32_t exitY = 0; + int32_t exitZ = 0; + int32_t exitDirection = 255; if (stationIndex != -1) { TileCoordsXYZD location = ride_get_exit_location(ride, stationIndex); if (!location.isNull()) { @@ -1128,7 +1128,7 @@ void ride_remove_peeps(sint32 rideIndex) } // Place all the peeps at exit - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep *peep; FOR_ALL_PEEPS(spriteIndex, peep) { if ( @@ -1147,9 +1147,9 @@ void ride_remove_peeps(sint32 rideIndex) peep->Invalidate(); if (exitDirection == 255) { - sint32 x = peep->next_x + 16; - sint32 y = peep->next_y + 16; - sint32 z = peep->next_z * 8; + int32_t x = peep->next_x + 16; + int32_t y = peep->next_y + 16; + int32_t z = peep->next_z * 8; if (peep->GetNextIsSloped()) z += 8; z++; @@ -1174,11 +1174,11 @@ void ride_remove_peeps(sint32 rideIndex) ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN; } -void ride_clear_blocked_tiles(sint32 rideIndex) +void ride_clear_blocked_tiles(int32_t rideIndex) { - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { auto element = map_get_first_element_at(x, y); if (element != nullptr) @@ -1213,7 +1213,7 @@ void ride_clear_blocked_tiles(sint32 rideIndex) * di : output_element * bp : flags */ -sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type, uint16 extra_params, rct_tile_element** output_element, uint16 flags) +int32_t sub_6C683D(int32_t* x, int32_t* y, int32_t* z, int32_t direction, int32_t type, uint16_t extra_params, rct_tile_element** output_element, uint16_t flags) { rct_tile_element *tileElement = map_get_first_element_at(*x / 32, *y / 32); rct_tile_element *successTileElement = nullptr; @@ -1243,8 +1243,8 @@ sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type // Possibly z should be & 0xF8 const rct_preview_track * trackBlock = get_track_def_from_ride_index(track_element_get_ride_index(tileElement), type); - sint32 sequence = tile_element_get_track_sequence(tileElement); - uint8 mapDirection = tile_element_get_direction(tileElement); + int32_t sequence = tile_element_get_track_sequence(tileElement); + uint8_t mapDirection = tile_element_get_direction(tileElement); switch (mapDirection){ case TILE_ELEMENT_DIRECTION_WEST: @@ -1266,10 +1266,10 @@ sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type } *z -= trackBlock[sequence].z; - sint32 start_x = *x, start_y = *y, start_z = *z; + int32_t start_x = *x, start_y = *y, start_z = *z; *z += trackBlock[0].z; - for (sint32 i = 0; trackBlock[i].index != 0xFF; ++i){ - sint32 cur_x = start_x, cur_y = start_y, cur_z = start_z; + for (int32_t i = 0; trackBlock[i].index != 0xFF; ++i){ + int32_t cur_x = start_x, cur_y = start_y, cur_z = start_z; switch (mapDirection){ case TILE_ELEMENT_DIRECTION_WEST: cur_x += trackBlock[i].x; @@ -1332,11 +1332,11 @@ sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type } if (flags & (1 << 2)) { - track_element_set_colour_scheme(tileElement, (uint8)(extra_params & 0xFF)); + track_element_set_colour_scheme(tileElement, (uint8_t)(extra_params & 0xFF)); } if (flags & (1 << 5)) { - track_element_set_seat_rotation(tileElement, (uint8)(extra_params & 0xFF)); + track_element_set_seat_rotation(tileElement, (uint8_t)(extra_params & 0xFF)); } if (flags & (1 << 3)) { @@ -1354,7 +1354,7 @@ sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type void ride_restore_provisional_track_piece() { if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) { - sint32 x, y, z, direction, type, rideIndex, liftHillAndAlternativeState; + int32_t x, y, z, direction, type, rideIndex, liftHillAndAlternativeState; if (window_ride_construction_update_state(&type, &direction, &rideIndex, &liftHillAndAlternativeState, &x, &y, &z, nullptr)) { ride_construction_remove_ghosts(); } else { @@ -1370,7 +1370,7 @@ void ride_remove_provisional_track_piece() return; } Ride *ride; - sint32 rideIndex, x, y, z, direction; + int32_t rideIndex, x, y, z, direction; rideIndex = _currentRideIndex; @@ -1381,7 +1381,7 @@ void ride_remove_provisional_track_piece() ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) { - sint32 flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; + int32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; maze_set_track(x, y, z, flags, false, 0, rideIndex, GC_SET_MAZE_TRACK_FILL); maze_set_track(x, y + 16, z, flags, false, 1, rideIndex, GC_SET_MAZE_TRACK_FILL); maze_set_track(x + 16, y + 16, z, flags, false, 2, rideIndex, GC_SET_MAZE_TRACK_FILL); @@ -1396,9 +1396,9 @@ void ride_remove_provisional_track_piece() } CoordsXYE next_track; if (track_block_get_next_from_zero(x, y, z, rideIndex, direction, &next_track, &z, &direction, true)) { - sint32 flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; - uint8 trackType = track_element_get_type(next_track.element); - sint32 trackSequence = tile_element_get_track_sequence(next_track.element); + int32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; + uint8_t trackType = track_element_get_type(next_track.element); + int32_t trackSequence = tile_element_get_track_sequence(next_track.element); game_do_command( next_track.x, flags | ((direction & 3) << 8), @@ -1433,7 +1433,7 @@ void ride_construction_remove_ghosts() */ void ride_construction_invalidate_current_track() { - sint32 x, y, z; + int32_t x, y, z; switch (_rideConstructionState) { case RIDE_CONSTRUCTION_STATE_SELECTED: @@ -1505,7 +1505,7 @@ static void ride_construction_reset_current_piece() */ void ride_construction_set_default_next_piece() { - sint32 x, y, z, direction, rideIndex, trackType, curve, bank, slope; + int32_t x, y, z, direction, rideIndex, trackType, curve, bank, slope; Ride *ride; track_begin_end trackBeginEnd; CoordsXYE xyElement; @@ -1648,11 +1648,11 @@ void ride_select_next_section() { if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) { ride_construction_invalidate_current_track(); - sint32 x = _currentTrackBeginX; - sint32 y = _currentTrackBeginY; - sint32 z = _currentTrackBeginZ; - sint32 direction = _currentTrackPieceDirection; - sint32 type = _currentTrackPieceType; + int32_t x = _currentTrackBeginX; + int32_t y = _currentTrackBeginY; + int32_t z = _currentTrackBeginZ; + int32_t direction = _currentTrackPieceDirection; + int32_t type = _currentTrackPieceType; rct_tile_element *tileElement; if (sub_6C683D(&x, &y, &z, direction & 3, type, 0, &tileElement, 0)) { _rideConstructionState = RIDE_CONSTRUCTION_STATE_0; @@ -1713,11 +1713,11 @@ void ride_select_previous_section() { if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) { ride_construction_invalidate_current_track(); - sint32 x = _currentTrackBeginX; - sint32 y = _currentTrackBeginY; - sint32 z = _currentTrackBeginZ; - sint32 direction = _currentTrackPieceDirection; - sint32 type = _currentTrackPieceType; + int32_t x = _currentTrackBeginX; + int32_t y = _currentTrackBeginY; + int32_t z = _currentTrackBeginZ; + int32_t direction = _currentTrackPieceDirection; + int32_t type = _currentTrackPieceType; rct_tile_element *tileElement; if (sub_6C683D(&x, &y, &z, direction & 3, type, 0, &tileElement, 0)) { _rideConstructionState = RIDE_CONSTRUCTION_STATE_0; @@ -1766,9 +1766,9 @@ void ride_select_previous_section() * * rct2: 0x006CC2CA */ -static sint32 ride_modify_entrance_or_exit(rct_tile_element *tileElement, sint32 x, sint32 y) +static int32_t ride_modify_entrance_or_exit(rct_tile_element *tileElement, int32_t x, int32_t y) { - sint32 rideIndex, entranceType; + int32_t rideIndex, entranceType; rct_window *constructionWindow; rideIndex = tileElement->properties.entrance.ride_index; @@ -1777,7 +1777,7 @@ static sint32 ride_modify_entrance_or_exit(rct_tile_element *tileElement, sint32 if (entranceType != ENTRANCE_TYPE_RIDE_ENTRANCE && entranceType != ENTRANCE_TYPE_RIDE_EXIT) return 0; - sint32 bl = (tileElement->properties.entrance.index & 0x70) >> 4; + int32_t bl = (tileElement->properties.entrance.index & 0x70) >> 4; // Get or create construction window for ride constructionWindow = window_find_by_class(WC_RIDE_CONSTRUCTION); @@ -1824,7 +1824,7 @@ static sint32 ride_modify_entrance_or_exit(rct_tile_element *tileElement, sint32 * * rct2: 0x006CC287 */ -static sint32 ride_modify_maze(rct_tile_element *tileElement, sint32 x, sint32 y) +static int32_t ride_modify_maze(rct_tile_element *tileElement, int32_t x, int32_t y) { _currentRideIndex = track_element_get_ride_index(tileElement); _rideConstructionState = RIDE_CONSTRUCTION_STATE_MAZE_BUILD; @@ -1844,9 +1844,9 @@ static sint32 ride_modify_maze(rct_tile_element *tileElement, sint32 x, sint32 y * * rct2: 0x006CC056 */ -sint32 ride_modify(CoordsXYE *input) +int32_t ride_modify(CoordsXYE *input) { - sint32 rideIndex, x, y, z, direction, type; + int32_t rideIndex, x, y, z, direction, type; CoordsXYE tileElement, endOfTrackElement; Ride *ride; rct_ride_entry *rideEntry; @@ -1864,7 +1864,7 @@ sint32 ride_modify(CoordsXYE *input) if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) { set_format_arg(6, rct_string_id, ride->name); - set_format_arg(8, uint32, ride->name_arguments); + set_format_arg(8, uint32_t, ride->name_arguments); context_show_error(STR_CANT_START_CONSTRUCTION_ON, STR_LOCAL_AUTHORITY_FORBIDS_DEMOLITION_OR_MODIFICATIONS_TO_THIS_RIDE); return 0; } @@ -1946,7 +1946,7 @@ sint32 ride_modify(CoordsXYE *input) * * rct2: 0x006CC3FB */ -sint32 ride_initialise_construction_window(sint32 rideIndex) +int32_t ride_initialise_construction_window(int32_t rideIndex) { Ride *ride; rct_window *w; @@ -1999,7 +1999,7 @@ sint32 ride_initialise_construction_window(sint32 rideIndex) void ride_update_all() { Ride *ride; - sint32 i; + int32_t i; // Remove all rides if scenario editor if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { @@ -2022,7 +2022,7 @@ void ride_update_all() * * rct2: 0x006ABE73 */ -static void ride_update(sint32 rideIndex) +static void ride_update(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); @@ -2033,7 +2033,7 @@ static void ride_update(sint32 rideIndex) // Update stations if (ride->type != RIDE_TYPE_MAZE) - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) ride_update_station(ride, i); // Update financial statistics @@ -2044,7 +2044,7 @@ static void ride_update(sint32 rideIndex) ride->num_customers_timeout = 0; // Shift number of customers history, start of the array is the most recent one - for (sint32 i = CUSTOMER_HISTORY_SIZE - 1; i > 0; i--) + for (int32_t i = CUSTOMER_HISTORY_SIZE - 1; i > 0; i--) { ride->num_customers[i] = ride->num_customers[i - 1]; } @@ -2070,14 +2070,14 @@ static void ride_update(sint32 rideIndex) // Various things include news messages if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION)) - if (((gCurrentTicks >> 1) & 255) == (uint32)rideIndex) + if (((gCurrentTicks >> 1) & 255) == (uint32_t)rideIndex) ride_breakdown_status_update(rideIndex); ride_inspection_update(ride); if (ride->status == RIDE_STATUS_TESTING && gConfigGeneral.no_test_crashes) { - for (sint32 i = 0; i < ride->num_vehicles; i++) { - uint16 spriteIndex = ride->vehicles[i]; + for (int32_t i = 0; i < ride->num_vehicles; i++) { + uint16_t spriteIndex = ride->vehicles[i]; if (spriteIndex == SPRITE_INDEX_NULL) continue; @@ -2099,7 +2099,7 @@ static void ride_update(sint32 rideIndex) */ static void ride_chairlift_update(Ride *ride) { - sint32 x, y, z; + int32_t x, y, z; if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) return; @@ -2107,7 +2107,7 @@ static void ride_chairlift_update(Ride *ride) ride->breakdown_reason_pending == 0) return; - uint16 old_chairlift_bullwheel_rotation = ride->chairlift_bullwheel_rotation >> 14; + uint16_t old_chairlift_bullwheel_rotation = ride->chairlift_bullwheel_rotation >> 14; ride->chairlift_bullwheel_rotation += ride->speed * 2048; if (old_chairlift_bullwheel_rotation == ride->speed / 8) return; @@ -2129,7 +2129,7 @@ static void ride_chairlift_update(Ride *ride) * edi: ride (in code as bytes offset from start of rides list) * bl: happiness */ -void ride_update_satisfaction(Ride* ride, uint8 happiness) { +void ride_update_satisfaction(Ride* ride, uint8_t happiness) { ride->satisfaction_next += happiness; ride->satisfaction_time_out++; if (ride->satisfaction_time_out >= 20) { @@ -2149,7 +2149,7 @@ void ride_update_satisfaction(Ride* ride, uint8 happiness) { * bl : pop_amount * pop_amount can be zero if peep visited but did not purchase. */ -void ride_update_popularity(Ride* ride, uint8 pop_amount){ +void ride_update_popularity(Ride* ride, uint8_t pop_amount){ ride->popularity_next += pop_amount; ride->popularity_time_out++; if (ride->popularity_time_out < 25)return; @@ -2204,20 +2204,20 @@ static void ride_spiral_slide_update(Ride *ride) peep->destination_x++; } - const uint8 current_rotation = get_current_rotation(); + const uint8_t current_rotation = get_current_rotation(); // Invalidate something related to station start - for (sint32 i = 0; i < MAX_STATIONS; i++) { + for (int32_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED) continue; - sint32 x = ride->station_starts[i].x; - sint32 y = ride->station_starts[i].y; + int32_t x = ride->station_starts[i].x; + int32_t y = ride->station_starts[i].y; rct_tile_element *tileElement = ride_get_station_start_track_element(ride, i); if (tileElement == nullptr) continue; - sint32 rotation = tile_element_get_direction(tileElement); + int32_t rotation = tile_element_get_direction(tileElement); x *= 32; y *= 32; x += ride_spiral_slide_main_tile_offset[rotation][current_rotation].x; @@ -2231,7 +2231,7 @@ static void ride_spiral_slide_update(Ride *ride) #pragma region Breakdown and inspection functions -static uint8 _breakdownProblemProbabilities[] = { +static uint8_t _breakdownProblemProbabilities[] = { 25, // BREAKDOWN_SAFETY_CUT_OUT 12, // BREAKDOWN_RESTRAINTS_STUCK_CLOSED 10, // BREAKDOWN_RESTRAINTS_STUCK_OPEN @@ -2257,7 +2257,7 @@ static void ride_inspection_update(Ride *ride) if (ride->last_inspection == 0) ride->last_inspection--; - sint32 inspectionIntervalMinutes = RideInspectionInterval[ride->inspection_interval]; + int32_t inspectionIntervalMinutes = RideInspectionInterval[ride->inspection_interval]; if (inspectionIntervalMinutes == 0) return; @@ -2274,12 +2274,12 @@ static void ride_inspection_update(Ride *ride) ride->lifecycle_flags |= RIDE_LIFECYCLE_DUE_INSPECTION; ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - sint8 stationIndex = ride_get_first_valid_station_exit(ride); + int8_t stationIndex = ride_get_first_valid_station_exit(ride); ride->inspection_station = (stationIndex != -1) ? stationIndex : 0; } -static sint32 get_age_penalty(Ride *ride) { - sint32 years; +static int32_t get_age_penalty(Ride *ride) { + int32_t years; years = date_get_year(gDateMonthsElapsed - ride->build_date); switch (years) { case 0: @@ -2304,7 +2304,7 @@ static sint32 get_age_penalty(Ride *ride) { * * rct2: 0x006AC622 */ -static void ride_breakdown_update(sint32 rideIndex) +static void ride_breakdown_update(int32_t rideIndex) { if (gCurrentTicks & 255) return; @@ -2317,16 +2317,16 @@ static void ride_breakdown_update(sint32 rideIndex) if (!(gCurrentTicks & 8191)) { - sint32 totalDowntime = 0; + int32_t totalDowntime = 0; - for (sint32 i = 0; i < DOWNTIME_HISTORY_SIZE; i++) + for (int32_t i = 0; i < DOWNTIME_HISTORY_SIZE; i++) { totalDowntime += ride->downtime_history[i]; } ride->downtime = std::min(totalDowntime / 2, 100); - for (sint32 i = DOWNTIME_HISTORY_SIZE - 1; i > 0; i--) + for (int32_t i = DOWNTIME_HISTORY_SIZE - 1; i > 0; i--) { ride->downtime_history[i] = ride->downtime_history[i - 1]; } @@ -2341,8 +2341,8 @@ static void ride_breakdown_update(sint32 rideIndex) return; // Calculate breakdown probability? - sint32 unreliabilityAccumulator = ride->unreliability_factor + get_age_penalty(ride); - ride->reliability = (uint16) std::max(0, (ride->reliability - unreliabilityAccumulator)); + int32_t unreliabilityAccumulator = ride->unreliability_factor + get_age_penalty(ride); + ride->reliability = (uint16_t) std::max(0, (ride->reliability - unreliabilityAccumulator)); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; // Random probability of a breakdown. Roughly this is 1 in @@ -2351,9 +2351,9 @@ static void ride_breakdown_update(sint32 rideIndex) // // a 0.8% chance, less the breakdown factor which accumulates as the game // continues. - if ((ride->reliability == 0 || (sint32)(scenario_rand() & 0x2FFFFF) <= 1 + RIDE_INITIAL_RELIABILITY - ride->reliability) + if ((ride->reliability == 0 || (int32_t)(scenario_rand() & 0x2FFFFF) <= 1 + RIDE_INITIAL_RELIABILITY - ride->reliability) && !gCheatsDisableAllBreakdowns) { - sint32 breakdownReason = ride_get_new_breakdown_problem(ride); + int32_t breakdownReason = ride_get_new_breakdown_problem(ride); if (breakdownReason != -1) ride_prepare_breakdown(rideIndex, breakdownReason); } @@ -2363,9 +2363,9 @@ static void ride_breakdown_update(sint32 rideIndex) * * rct2: 0x006B7294 */ -static sint32 ride_get_new_breakdown_problem(Ride *ride) +static int32_t ride_get_new_breakdown_problem(Ride *ride) { - sint32 availableBreakdownProblems, monthsOld, totalProbability, randomProbability, problemBits, breakdownProblem; + int32_t availableBreakdownProblems, monthsOld, totalProbability, randomProbability, problemBits, breakdownProblem; rct_ride_entry *entry; // Brake failure is more likely when it's raining @@ -2436,9 +2436,9 @@ static void choose_random_train_to_breakdown_safe(Ride * ride) * * rct2: 0x006B7348 */ -void ride_prepare_breakdown(sint32 rideIndex, sint32 breakdownReason) +void ride_prepare_breakdown(int32_t rideIndex, int32_t breakdownReason) { - sint32 i; + int32_t i; Ride *ride; rct_vehicle *vehicle; @@ -2510,12 +2510,12 @@ void ride_prepare_breakdown(sint32 rideIndex, sint32 breakdownReason) * * rct2: 0x006B74FA */ -void ride_breakdown_add_news_item(sint32 rideIndex) +void ride_breakdown_add_news_item(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); if (gConfigNotifications.ride_broken_down) { news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_BROKEN_DOWN, rideIndex); } @@ -2525,7 +2525,7 @@ void ride_breakdown_add_news_item(sint32 rideIndex) * * rct2: 0x006B75C8 */ -static void ride_breakdown_status_update(sint32 rideIndex) +static void ride_breakdown_status_update(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); @@ -2544,7 +2544,7 @@ static void ride_breakdown_status_update(sint32 rideIndex) ride->mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES ) { set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_STILL_NOT_FIXED, rideIndex); } @@ -2558,9 +2558,9 @@ static void ride_breakdown_status_update(sint32 rideIndex) * * rct2: 0x006B762F */ -static void ride_mechanic_status_update(sint32 rideIndex, sint32 mechanicStatus) +static void ride_mechanic_status_update(int32_t rideIndex, int32_t mechanicStatus) { - sint32 breakdownReason; + int32_t breakdownReason; Ride *ride; rct_peep *mechanic; @@ -2641,7 +2641,7 @@ static void ride_mechanic_status_update(sint32 rideIndex, sint32 mechanicStatus) * * rct2: 0x006B796C */ -static void ride_call_mechanic(sint32 rideIndex, rct_peep *mechanic, sint32 forInspection) +static void ride_call_mechanic(int32_t rideIndex, rct_peep *mechanic, int32_t forInspection) { Ride *ride; @@ -2659,11 +2659,11 @@ static void ride_call_mechanic(sint32 rideIndex, rct_peep *mechanic, sint32 forI * * rct2: 0x006B76AB */ -static void ride_call_closest_mechanic(sint32 rideIndex) +static void ride_call_closest_mechanic(int32_t rideIndex) { Ride *ride; rct_peep *mechanic; - sint32 forInspection; + int32_t forInspection; ride = get_ride(rideIndex); forInspection = (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) == 0; @@ -2673,9 +2673,9 @@ static void ride_call_closest_mechanic(sint32 rideIndex) ride_call_mechanic(rideIndex, mechanic, forInspection); } -rct_peep *ride_find_closest_mechanic(Ride *ride, sint32 forInspection) +rct_peep *ride_find_closest_mechanic(Ride *ride, int32_t forInspection) { - sint32 x, y, z, stationIndex; + int32_t x, y, z, stationIndex; TileCoordsXYZD location; rct_tile_element *tileElement; @@ -2711,10 +2711,10 @@ rct_peep *ride_find_closest_mechanic(Ride *ride, sint32 forInspection) * rct2: 0x006B774B (forInspection = 0) * rct2: 0x006B78C3 (forInspection = 1) */ -rct_peep *find_closest_mechanic(sint32 x, sint32 y, sint32 forInspection) +rct_peep *find_closest_mechanic(int32_t x, int32_t y, int32_t forInspection) { - uint32 closestDistance, distance; - uint16 spriteIndex; + uint32_t closestDistance, distance; + uint16_t spriteIndex; rct_peep *peep, *closestMechanic = nullptr; closestDistance = UINT_MAX; @@ -2780,7 +2780,7 @@ rct_peep *ride_get_assigned_mechanic(Ride *ride) * * rct2: 0x006ABE85 */ -static void ride_music_update(sint32 rideIndex) +static void ride_music_update(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); @@ -2836,11 +2836,11 @@ static void ride_music_update(sint32 rideIndex) return; } - sint32 x = ride->station_starts[0].x * 32 + 16; - sint32 y = ride->station_starts[0].y * 32 + 16; - sint32 z = ride->station_heights[0] * 8; + int32_t x = ride->station_starts[0].x * 32 + 16; + int32_t y = ride->station_starts[0].y * 32 + 16; + int32_t z = ride->station_heights[0] * 8; - sint32 sampleRate = 22050; + int32_t sampleRate = 22050; // Alter sample rate for a power cut effect if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { @@ -2879,10 +2879,10 @@ void ride_measurement_clear(Ride *ride) */ static void ride_measurement_update(rct_ride_measurement *measurement) { - uint16 spriteIndex; + uint16_t spriteIndex; Ride *ride; rct_vehicle *vehicle; - sint32 velocity, altitude, verticalG, lateralG; + int32_t velocity, altitude, verticalG, lateralG; ride = get_ride(measurement->ride_index); spriteIndex = ride->vehicles[measurement->vehicle_index]; @@ -2905,7 +2905,7 @@ static void ride_measurement_update(rct_ride_measurement *measurement) return; } - uint8 trackType = (vehicle->track_type >> 2) & 0xFF; + uint8_t trackType = (vehicle->track_type >> 2) & 0xFF; if (trackType == TRACK_ELEM_BLOCK_BRAKES || trackType == TRACK_ELEM_CABLE_LIFT_HILL || trackType == TRACK_ELEM_25_DEG_UP_TO_FLAT || @@ -2959,7 +2959,7 @@ void ride_measurements_update() return; // For each ride measurement - for (sint32 i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { + for (int32_t i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { rct_ride_measurement *measurement = get_ride_measurement(i); if (measurement->ride_index == 255) continue; @@ -2972,8 +2972,8 @@ void ride_measurements_update() ride_measurement_update(measurement); } else { // For each vehicle - for (sint32 j = 0; j < ride->num_vehicles; j++) { - uint16 spriteIndex = ride->vehicles[j]; + for (int32_t j = 0; j < ride->num_vehicles; j++) { + uint16_t spriteIndex = ride->vehicles[j]; if (spriteIndex == SPRITE_INDEX_NULL) continue; @@ -2992,9 +2992,9 @@ void ride_measurements_update() } } -static rct_ride_measurement *ride_get_existing_measurement(sint32 rideIndex) +static rct_ride_measurement *ride_get_existing_measurement(int32_t rideIndex) { - for (sint32 i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { + for (int32_t i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { rct_ride_measurement *measurement = get_ride_measurement(i); if (measurement->ride_index == rideIndex) return measurement; @@ -3003,9 +3003,9 @@ static rct_ride_measurement *ride_get_existing_measurement(sint32 rideIndex) return nullptr; } -static sint32 ride_get_free_measurement() +static int32_t ride_get_free_measurement() { - for (sint32 i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { + for (int32_t i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { rct_ride_measurement *measurement = get_ride_measurement(i); if (measurement->ride_index == 255) return i; @@ -3018,7 +3018,7 @@ static sint32 ride_get_free_measurement() * * rct2: 0x006B66D9 */ -rct_ride_measurement *ride_get_measurement(sint32 rideIndex, rct_string_id *message) +rct_ride_measurement *ride_get_measurement(int32_t rideIndex, rct_string_id *message) { Ride *ride = get_ride(rideIndex); @@ -3032,11 +3032,11 @@ rct_ride_measurement *ride_get_measurement(sint32 rideIndex, rct_string_id *mess rct_ride_measurement *measurement = ride_get_existing_measurement(rideIndex); if (measurement == nullptr) { // Find a free measurement - sint32 i = ride_get_free_measurement(); + int32_t i = ride_get_free_measurement(); if (i == -1) { // Use last recently used measurement for some other ride - sint32 lruIndex = 0; - uint32 lruTicks = 0xFFFFFFFF; + int32_t lruIndex = 0; + uint32_t lruTicks = 0xFFFFFFFF; for (i = 0; i < MAX_RIDE_MEASUREMENTS; i++) { measurement = get_ride_measurement(i); @@ -3078,7 +3078,7 @@ rct_ride_measurement *ride_get_measurement(sint32 rideIndex, rct_string_id *mess #pragma region Colour functions -track_colour ride_get_track_colour(Ride *ride, sint32 colourScheme) +track_colour ride_get_track_colour(Ride *ride, int32_t colourScheme) { track_colour result; result.main = ride->track_colour_main[colourScheme]; @@ -3087,7 +3087,7 @@ track_colour ride_get_track_colour(Ride *ride, sint32 colourScheme) return result; } -vehicle_colour ride_get_vehicle_colour(Ride *ride, sint32 vehicleIndex) +vehicle_colour ride_get_vehicle_colour(Ride *ride, int32_t vehicleIndex) { vehicle_colour result; @@ -3102,9 +3102,9 @@ vehicle_colour ride_get_vehicle_colour(Ride *ride, sint32 vehicleIndex) return result; } -static bool ride_does_vehicle_colour_exist(uint8 ride_sub_type, vehicle_colour *vehicleColour) +static bool ride_does_vehicle_colour_exist(uint8_t ride_sub_type, vehicle_colour *vehicleColour) { - sint32 i; + int32_t i; Ride *ride2; FOR_ALL_RIDES(i, ride2) { if (ride2->subtype != ride_sub_type) continue; @@ -3114,7 +3114,7 @@ static bool ride_does_vehicle_colour_exist(uint8 ride_sub_type, vehicle_colour * return true; } -sint32 ride_get_unused_preset_vehicle_colour(uint8 ride_sub_type) +int32_t ride_get_unused_preset_vehicle_colour(uint8_t ride_sub_type) { if (ride_sub_type >= 128) { @@ -3131,9 +3131,9 @@ sint32 ride_get_unused_preset_vehicle_colour(uint8 ride_sub_type) if (presetList->count == 255) return 255; - for (sint32 attempt = 0; attempt < 200; attempt++) { - uint8 numColourConfigurations = presetList->count; - sint32 randomConfigIndex = util_rand() % numColourConfigurations; + for (int32_t attempt = 0; attempt < 200; attempt++) { + uint8_t numColourConfigurations = presetList->count; + int32_t randomConfigIndex = util_rand() % numColourConfigurations; vehicle_colour *preset = &presetList->list[randomConfigIndex]; if (ride_does_vehicle_colour_exist(ride_sub_type, preset)) { @@ -3147,7 +3147,7 @@ sint32 ride_get_unused_preset_vehicle_colour(uint8 ride_sub_type) * * rct2: 0x006DE52C */ -void ride_set_vehicle_colours_to_random_preset(Ride *ride, uint8 preset_index) +void ride_set_vehicle_colours_to_random_preset(Ride *ride, uint8_t preset_index) { rct_ride_entry *rideEntry = get_ride_entry(ride->subtype); vehicle_colour_preset_list *presetList = rideEntry->vehicle_preset_list; @@ -3162,8 +3162,8 @@ void ride_set_vehicle_colours_to_random_preset(Ride *ride, uint8 preset_index) ride->vehicle_colours_extended[0] = preset->additional_2; } else { ride->colour_scheme_type = RIDE_COLOUR_SCHEME_DIFFERENT_PER_TRAIN; - uint32 count = std::min(presetList->count, (uint8)32); - for (uint32 i = 0; i < count; i++) { + uint32_t count = std::min(presetList->count, (uint8_t)32); + for (uint32_t i = 0; i < count; i++) { vehicle_colour *preset = &presetList->list[i]; ride->vehicle_colours[i].body_colour = preset->main; ride->vehicle_colours[i].trim_colour = preset->additional_1; @@ -3183,7 +3183,7 @@ void ride_set_vehicle_colours_to_random_preset(Ride *ride, uint8 preset_index) void ride_check_all_reachable() { Ride *ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride->connected_message_throttle != 0) @@ -3203,9 +3203,9 @@ void ride_check_all_reachable() * rct2: 0x006B7C59 * @return 1 if the coordinate is reachable or has no entrance, 0 otherwise */ -static sint32 ride_entrance_exit_is_reachable(TileCoordsXYZD coordinates) +static int32_t ride_entrance_exit_is_reachable(TileCoordsXYZD coordinates) { - sint32 x, y, z; + int32_t x, y, z; if (coordinates.isNull()) return 1; @@ -3213,7 +3213,7 @@ static sint32 ride_entrance_exit_is_reachable(TileCoordsXYZD coordinates) x = coordinates.x; y = coordinates.y; z = coordinates.z; - uint8 face_direction = coordinates.direction; + uint8_t face_direction = coordinates.direction; x *= 32; y *= 32; @@ -3225,9 +3225,9 @@ static sint32 ride_entrance_exit_is_reachable(TileCoordsXYZD coordinates) return map_coord_is_connected(x, y, z, face_direction); } -static void ride_entrance_exit_connected(Ride* ride, sint32 ride_idx) +static void ride_entrance_exit_connected(Ride* ride, int32_t ride_idx) { - for (sint32 i = 0; i < MAX_STATIONS; ++i) + for (int32_t i = 0; i < MAX_STATIONS; ++i) { LocationXY8 station_start = ride->station_starts[i]; TileCoordsXYZD entrance = ride_get_entrance_location(ride_idx, i); @@ -3239,7 +3239,7 @@ static void ride_entrance_exit_connected(Ride* ride, sint32 ride_idx) { // name of ride is parameter of the format string set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); } @@ -3250,7 +3250,7 @@ static void ride_entrance_exit_connected(Ride* ride, sint32 ride_idx) { // name of ride is parameter of the format string set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_EXIT_NOT_CONNECTED, ride_idx); } @@ -3260,9 +3260,9 @@ static void ride_entrance_exit_connected(Ride* ride, sint32 ride_idx) } } -static void ride_shop_connected(Ride* ride, sint32 ride_idx) +static void ride_shop_connected(Ride* ride, int32_t ride_idx) { - sint32 x, y, count; + int32_t x, y, count; rct_tile_element *tileElement; LocationXY8 coordinates = ride->station_starts[0]; @@ -3278,8 +3278,8 @@ static void ride_shop_connected(Ride* ride, sint32 ride_idx) break; } while (!(tileElement++)->IsLastForTile()); - uint16 entrance_directions = 0; - uint8 track_type = track_element_get_type(tileElement); + uint16_t entrance_directions = 0; + uint8_t track_type = track_element_get_type(tileElement); ride = get_ride(track_element_get_ride_index(tileElement)); if (ride == nullptr) { @@ -3291,7 +3291,7 @@ static void ride_shop_connected(Ride* ride, sint32 ride_idx) entrance_directions = TrackSequenceProperties[track_type][0]; } - uint8 tile_direction = tile_element_get_direction(tileElement); + uint8_t tile_direction = tile_element_get_direction(tileElement); entrance_directions <<= tile_direction; entrance_directions = ((entrance_directions >> 12) | entrance_directions) & 0xF; @@ -3311,10 +3311,10 @@ static void ride_shop_connected(Ride* ride, sint32 ride_idx) entrance_directions >>= 1; // Flip direction north<->south, east<->west - uint8 face_direction = count ^ 2; + uint8_t face_direction = count ^ 2; - sint32 y2 = y - CoordsDirectionDelta[face_direction].y; - sint32 x2 = x - CoordsDirectionDelta[face_direction].x; + int32_t y2 = y - CoordsDirectionDelta[face_direction].y; + int32_t x2 = x - CoordsDirectionDelta[face_direction].x; if (map_coord_is_connected(x2 / 32, y2 / 32, tileElement->base_height, face_direction)) return; @@ -3322,7 +3322,7 @@ static void ride_shop_connected(Ride* ride, sint32 ride_idx) // Name of ride is parameter of the format string set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); } @@ -3336,7 +3336,7 @@ static void ride_shop_connected(Ride* ride, sint32 ride_idx) static void ride_track_set_map_tooltip(rct_tile_element *tileElement) { - sint32 rideIndex; + int32_t rideIndex; Ride *ride; rideIndex = track_element_get_ride_index(tileElement); @@ -3344,18 +3344,18 @@ static void ride_track_set_map_tooltip(rct_tile_element *tileElement) set_map_tooltip_format_arg(0, rct_string_id, STR_RIDE_MAP_TIP); set_map_tooltip_format_arg(2, rct_string_id, ride->name); - set_map_tooltip_format_arg(4, uint32, ride->name_arguments); + set_map_tooltip_format_arg(4, uint32_t, ride->name_arguments); rct_string_id formatSecondary; - sint32 arg1 = 0; + int32_t arg1 = 0; ride_get_status(rideIndex, &formatSecondary, &arg1); set_map_tooltip_format_arg(8, rct_string_id, formatSecondary); - set_map_tooltip_format_arg(10, uint32, arg1); + set_map_tooltip_format_arg(10, uint32_t, arg1); } static void ride_station_set_map_tooltip(rct_tile_element *tileElement) { - sint32 i, rideIndex, stationIndex; + int32_t i, rideIndex, stationIndex; Ride *ride; rideIndex = track_element_get_ride_index(tileElement); @@ -3369,20 +3369,20 @@ static void ride_station_set_map_tooltip(rct_tile_element *tileElement) set_map_tooltip_format_arg(0, rct_string_id, STR_RIDE_MAP_TIP); set_map_tooltip_format_arg(2, rct_string_id, ride->num_stations <= 1 ? STR_RIDE_STATION : STR_RIDE_STATION_X); set_map_tooltip_format_arg(4, rct_string_id, ride->name); - set_map_tooltip_format_arg(6, uint32, ride->name_arguments); + set_map_tooltip_format_arg(6, uint32_t, ride->name_arguments); set_map_tooltip_format_arg(10, rct_string_id, RideComponentNames[RideNameConvention[ride->type].station].capitalised); - set_map_tooltip_format_arg(12, uint16, stationIndex + 1); + set_map_tooltip_format_arg(12, uint16_t, stationIndex + 1); rct_string_id formatSecondary; - sint32 arg1; + int32_t arg1; ride_get_status(rideIndex, &formatSecondary, &arg1); set_map_tooltip_format_arg(14, rct_string_id, formatSecondary); - set_map_tooltip_format_arg(16, uint32, arg1); + set_map_tooltip_format_arg(16, uint32_t, arg1); } static void ride_entrance_set_map_tooltip(rct_tile_element *tileElement) { - sint32 i, rideIndex, stationIndex; + int32_t i, rideIndex, stationIndex; Ride *ride; rideIndex = track_element_get_ride_index(tileElement); @@ -3396,15 +3396,15 @@ static void ride_entrance_set_map_tooltip(rct_tile_element *tileElement) if (tileElement->properties.entrance.type == ENTRANCE_TYPE_RIDE_ENTRANCE) { // Get the queue length - sint32 queueLength = 0; + int32_t queueLength = 0; if (!ride_get_entrance_location(ride, stationIndex).isNull()) queueLength = ride->queue_length[stationIndex]; set_map_tooltip_format_arg(0, rct_string_id, STR_RIDE_MAP_TIP); set_map_tooltip_format_arg(2, rct_string_id, ride->num_stations <= 1 ? STR_RIDE_ENTRANCE : STR_RIDE_STATION_X_ENTRANCE); set_map_tooltip_format_arg(4, rct_string_id, ride->name); - set_map_tooltip_format_arg(6, uint32, ride->name_arguments); - set_map_tooltip_format_arg(12, uint16, stationIndex + 1); + set_map_tooltip_format_arg(6, uint32_t, ride->name_arguments); + set_map_tooltip_format_arg(12, uint16_t, stationIndex + 1); if (queueLength == 0) { set_map_tooltip_format_arg(14, rct_string_id, STR_QUEUE_EMPTY); } else if (queueLength == 1) { @@ -3412,7 +3412,7 @@ static void ride_entrance_set_map_tooltip(rct_tile_element *tileElement) } else { set_map_tooltip_format_arg(14, rct_string_id, STR_QUEUE_PEOPLE); } - set_map_tooltip_format_arg(16, uint16, queueLength); + set_map_tooltip_format_arg(16, uint16_t, queueLength); } else { // Get the station stationIndex = tile_element_get_station(tileElement); @@ -3422,8 +3422,8 @@ static void ride_entrance_set_map_tooltip(rct_tile_element *tileElement) set_map_tooltip_format_arg(0, rct_string_id, ride->num_stations <= 1 ? STR_RIDE_EXIT : STR_RIDE_STATION_X_EXIT); set_map_tooltip_format_arg(2, rct_string_id, ride->name); - set_map_tooltip_format_arg(4, uint32, ride->name_arguments); - set_map_tooltip_format_arg(10, uint16, stationIndex + 1); + set_map_tooltip_format_arg(4, uint32_t, ride->name_arguments); + set_map_tooltip_format_arg(10, uint16_t, stationIndex + 1); } } @@ -3446,7 +3446,7 @@ void ride_set_map_tooltip(rct_tile_element *tileElement) } } -static sint32 ride_music_params_update_label_51(uint32 a1, uint8 * tuneId, uint8 rideIndex, sint32 v32, sint32 pan_x, uint16 sampleRate) +static int32_t ride_music_params_update_label_51(uint32_t a1, uint8_t * tuneId, uint8_t rideIndex, int32_t v32, int32_t pan_x, uint16_t sampleRate) { if (a1 < gRideMusicInfoList[*tuneId].length) { @@ -3471,7 +3471,7 @@ static sint32 ride_music_params_update_label_51(uint32 a1, uint8 * tuneId, uint8 } } -static sint32 ride_music_params_update_label_58(uint32 position, uint8 * tuneId) +static int32_t ride_music_params_update_label_58(uint32_t position, uint8_t * tuneId) { rct_ride_music_info * ride_music_info = &gRideMusicInfoList[*tuneId]; position += ride_music_info->offset; @@ -3499,18 +3499,18 @@ static sint32 ride_music_params_update_label_58(uint32 position, uint8 * tuneId) * @param tuneId (bh) * @returns new position (ebp) */ -sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint16 sampleRate, uint32 position, uint8 * tuneId) +int32_t ride_music_params_update(int16_t x, int16_t y, int16_t z, uint8_t rideIndex, uint16_t sampleRate, uint32_t position, uint8_t * tuneId) { if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gGameSoundsOff && g_music_tracking_viewport != nullptr) { const LocationXY16 rotatedCoords = ride_get_rotated_coords(x, y, z); rct_viewport * viewport = g_music_tracking_viewport; - sint16 view_width = viewport->view_width; - sint16 view_width2 = view_width * 2; - sint16 view_x = viewport->view_x - view_width2; - sint16 view_y = viewport->view_y - view_width; - sint16 view_x2 = view_width2 + view_width2 + viewport->view_width + view_x; - sint16 view_y2 = view_width + view_width + viewport->view_height + view_y; + int16_t view_width = viewport->view_width; + int16_t view_width2 = view_width * 2; + int16_t view_x = viewport->view_x - view_width2; + int16_t view_y = viewport->view_y - view_width; + int16_t view_x2 = view_width2 + view_width2 + viewport->view_width + view_x; + int16_t view_y2 = view_width + view_width + viewport->view_height + view_y; if (view_x >= rotatedCoords.x || view_y >= rotatedCoords.y || @@ -3520,28 +3520,28 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u return ride_music_params_update_label_58(position, tuneId); } - sint32 x2 = viewport->x + ((rotatedCoords.x - viewport->view_x) >> viewport->zoom); + int32_t x2 = viewport->x + ((rotatedCoords.x - viewport->view_x) >> viewport->zoom); x2 *= 0x10000; - uint16 screenwidth = context_get_width(); + uint16_t screenwidth = context_get_width(); if (screenwidth < 64) { screenwidth = 64; } - sint32 pan_x = ((x2 / screenwidth) - 0x8000) >> 4; + int32_t pan_x = ((x2 / screenwidth) - 0x8000) >> 4; - sint32 y2 = viewport->y + ((rotatedCoords.y - viewport->view_y) >> viewport->zoom); + int32_t y2 = viewport->y + ((rotatedCoords.y - viewport->view_y) >> viewport->zoom); y2 *= 0x10000; - uint16 screenheight = context_get_height(); + uint16_t screenheight = context_get_height(); if (screenheight < 64) { screenheight = 64; } - sint32 pan_y = ((y2 / screenheight) - 0x8000) >> 4; + int32_t pan_y = ((y2 / screenheight) - 0x8000) >> 4; - uint8 vol1 = 255; - uint8 vol2 = 255; - sint32 panx2 = pan_x; - sint32 pany2 = pan_y; + uint8_t vol1 = 255; + uint8_t vol2 = 255; + int32_t panx2 = pan_x; + int32_t pany2 = pan_y; if (pany2 < 0) { pany2 = -pany2; @@ -3554,7 +3554,7 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u if (pany2 > 0) { pany2 = -((pany2 / 4) - 1024) / 4; - vol1 = (uint8) pany2; + vol1 = (uint8_t) pany2; if (pany2 >= 256) { vol1 = 255; @@ -3573,7 +3573,7 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u if (panx2 > 0) { panx2 = -((panx2 / 4) - 1024) / 4; - vol2 = (uint8) panx2; + vol2 = (uint8_t) panx2; if (panx2 >= 256) { vol2 = 255; @@ -3591,7 +3591,7 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u { vol1 = vol1 - (gVolumeAdjustZoom * 3); } - sint32 v32 = -(((uint8) (-vol1 - 1) * (uint8) (-vol1 - 1)) / 16) - 700; + int32_t v32 = -(((uint8_t) (-vol1 - 1) * (uint8_t) (-vol1 - 1)) / 16) - 700; if (vol1 && v32 >= -4000) { if (pan_x > 10000) @@ -3603,8 +3603,8 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u pan_x = -10000; } rct_ride_music * ride_music = &gRideMusicList[0]; - sint32 channel = 0; - uint32 a1; + int32_t channel = 0; + uint32_t a1; while (ride_music->ride_id != rideIndex || ride_music->tune_id != *tuneId) { ride_music++; @@ -3617,13 +3617,13 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u return ride_music_params_update_label_51(a1, tuneId, rideIndex, v32, pan_x, sampleRate); } } - sint32 playing = Mixer_Channel_IsPlaying(gRideMusicList[channel].sound_channel); + int32_t playing = Mixer_Channel_IsPlaying(gRideMusicList[channel].sound_channel); if (!playing) { *tuneId = 0xFF; return 0; } - a1 = (uint32) Mixer_Channel_GetOffset(gRideMusicList[channel].sound_channel); + a1 = (uint32_t) Mixer_Channel_GetOffset(gRideMusicList[channel].sound_channel); return ride_music_params_update_label_51(a1, tuneId, rideIndex, v32, pan_x, sampleRate); } @@ -3642,7 +3642,7 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u void ride_music_update_final() { rct_ride_music_params * edi = nullptr; - sint32 ebx = 0; + int32_t ebx = 0; if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)) { // TODO Allow circus music (CSS24) to play if ride music is disabled (that should be sound) @@ -3650,12 +3650,12 @@ void ride_music_update_final() { while (1) { - sint32 v8 = 0; - sint32 v9 = 1; + int32_t v8 = 0; + int32_t v9 = 1; rct_ride_music_params * ride_music_params = &gRideMusicParamsList[0]; while (ride_music_params < gRideMusicParamsListEnd) { - if (ride_music_params->ride_id != (uint8) -1) + if (ride_music_params->ride_id != (uint8_t) -1) { v8++; if (v9 >= ride_music_params->volume) @@ -3675,13 +3675,13 @@ void ride_music_update_final() // stop currently playing music that is not in music params list or not playing? rct_ride_music * ride_music = &gRideMusicList[0]; - sint32 channel = 0; + int32_t channel = 0; do { if (ride_music->ride_id != RIDE_ID_NULL) { rct_ride_music_params * ride_music_params = &gRideMusicParamsList[0]; - sint32 isplaying = 0; + int32_t isplaying = 0; while (ride_music_params < gRideMusicParamsListEnd && !isplaying) { if (ride_music_params->ride_id == ride_music->ride_id && ride_music_params->tune_id == ride_music->tune_id) @@ -3708,7 +3708,7 @@ void ride_music_update_final() if (ride_music_params->ride_id != RIDE_ID_NULL) { rct_ride_music * ride_music_2 = &gRideMusicList[0]; - sint32 channel2 = 0; + int32_t channel2 = 0; while (ride_music_params->ride_id != ride_music_2->ride_id || ride_music_params->tune_id != ride_music_2->tune_id) { if (ride_music_2->ride_id == RIDE_ID_NULL) @@ -3732,7 +3732,7 @@ void ride_music_update_final() Mixer_Channel_Volume(ride_music_3->sound_channel, DStoMixerVolume(ride_music_3->volume)); Mixer_Channel_Pan(ride_music_3->sound_channel, DStoMixerPan(ride_music_3->pan)); Mixer_Channel_Rate(ride_music_3->sound_channel, DStoMixerRate(ride_music_3->frequency)); - sint32 offset = ride_music_params->offset - 10000; + int32_t offset = ride_music_params->offset - 10000; if (offset < 0) { offset = 0; @@ -3773,9 +3773,9 @@ void ride_music_update_final() #pragma endregion -static bool ride_is_mode_valid(Ride *ride, uint8 mode) +static bool ride_is_mode_valid(Ride *ride, uint8_t mode) { - const uint8 * availableModes = ride_seek_available_modes(ride); + const uint8_t * availableModes = ride_seek_available_modes(ride); for (; *availableModes != 0xFF; availableModes++) { @@ -3788,24 +3788,24 @@ static bool ride_is_mode_valid(Ride *ride, uint8 mode) return false; } -static bool ride_is_valid_lift_hill_speed(Ride *ride, sint32 speed) +static bool ride_is_valid_lift_hill_speed(Ride *ride, int32_t speed) { - sint32 minSpeed = gCheatsFastLiftHill ? 0 : RideLiftData[ride->type].minimum_speed; - sint32 maxSpeed = gCheatsFastLiftHill ? 255 : RideLiftData[ride->type].maximum_speed; + int32_t minSpeed = gCheatsFastLiftHill ? 0 : RideLiftData[ride->type].minimum_speed; + int32_t maxSpeed = gCheatsFastLiftHill ? 255 : RideLiftData[ride->type].maximum_speed; return speed >= minSpeed && speed <= maxSpeed; } -static bool ride_is_valid_num_circuits(sint32 numCircuits) +static bool ride_is_valid_num_circuits(int32_t numCircuits) { - sint32 minNumCircuits = 1; - sint32 maxNumCircuits = gCheatsFastLiftHill ? 255 : 20; + int32_t minNumCircuits = 1; + int32_t maxNumCircuits = gCheatsFastLiftHill ? 255 : 20; return numCircuits >= minNumCircuits && numCircuits <= maxNumCircuits; } -static bool ride_is_valid_operation_option(Ride *ride, uint8 value) +static bool ride_is_valid_operation_option(Ride *ride, uint8_t value) { - uint8 minValue = RideProperties[ride->type].min_value; - uint8 maxValue = RideProperties[ride->type].max_value; + uint8_t minValue = RideProperties[ride->type].min_value; + uint8_t maxValue = RideProperties[ride->type].max_value; if (gCheatsFastLiftHill) { minValue = 0; maxValue = 255; @@ -3814,7 +3814,7 @@ static bool ride_is_valid_operation_option(Ride *ride, uint8 value) return value >= minValue && value <= maxValue; } -static money32 ride_set_setting(uint8 rideIndex, uint8 setting, uint8 value, uint8 flags) +static money32 ride_set_setting(uint8_t rideIndex, uint8_t setting, uint8_t value, uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_RUNNING_COSTS; @@ -3980,18 +3980,18 @@ static money32 ride_set_setting(uint8 rideIndex, uint8 setting, uint8 value, uin * rct2: 0x006B5559 */ void game_command_set_ride_setting( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - uint8 rideIndex = *edx & 0xFF; - uint8 setting = (*edx >> 8) & 0xFF; - uint8 newValue = (*ebx >> 8) & 0xFF; - uint8 flags = *ebx & 0xFF; + uint8_t rideIndex = *edx & 0xFF; + uint8_t setting = (*edx >> 8) & 0xFF; + uint8_t newValue = (*ebx >> 8) & 0xFF; + uint8_t flags = *ebx & 0xFF; *ebx = ride_set_setting(rideIndex, setting, newValue, flags); } @@ -3999,10 +3999,10 @@ void game_command_set_ride_setting( * * rct2: 0x006B4CC1 */ -static sint32 ride_mode_check_valid_station_numbers(Ride *ride) +static int32_t ride_mode_check_valid_station_numbers(Ride *ride) { - uint8 no_stations = 0; - for (uint8 station_index = 0; station_index < MAX_STATIONS; ++station_index){ + uint8_t no_stations = 0; + for (uint8_t station_index = 0; station_index < MAX_STATIONS; ++station_index){ if (ride->station_starts[station_index].xy != RCT_XY8_UNDEFINED) { no_stations++; @@ -4036,8 +4036,8 @@ static sint32 ride_mode_check_valid_station_numbers(Ride *ride) * returns stationIndex of first station on success * -1 on failure. */ -static sint32 ride_mode_check_station_present(Ride* ride){ - sint32 stationIndex = ride_get_first_valid_station_start(ride); +static int32_t ride_mode_check_station_present(Ride* ride){ + int32_t stationIndex = ride_get_first_valid_station_start(ride); if (stationIndex == -1) { gGameCommandErrorText = STR_NOT_YET_CONSTRUCTED; @@ -4058,16 +4058,16 @@ static sint32 ride_mode_check_station_present(Ride* ride){ * * rct2: 0x006B5872 */ -static sint32 ride_check_for_entrance_exit(sint32 rideIndex) +static int32_t ride_check_for_entrance_exit(int32_t rideIndex) { Ride* ride = get_ride(rideIndex); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) return 1; - sint32 i; - uint8 entrance = 0; - uint8 exit = 0; + int32_t i; + uint8_t entrance = 0; + uint8_t exit = 0; for (i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED) continue; @@ -4107,17 +4107,17 @@ static sint32 ride_check_for_entrance_exit(sint32 rideIndex) * * rct2: 0x006B5952 */ -static void sub_6B5952(sint32 rideIndex) +static void sub_6B5952(int32_t rideIndex) { - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { TileCoordsXYZD location = ride_get_entrance_location(rideIndex, i); if (location.isNull()) continue; - sint32 x = location.x * 32; - sint32 y = location.y * 32; - sint32 z = location.z; + int32_t x = location.x * 32; + int32_t y = location.y * 32; + int32_t z = location.z; // This will fire for every entrance on this x, y and z, regardless whether that actually belongs to // the ride or not. @@ -4128,7 +4128,7 @@ static void sub_6B5952(sint32 rideIndex) if (tileElement->base_height != z) continue; - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); footpath_chain_ride_queue(rideIndex, i, x, y, tileElement, direction ^ 2); } while (!(tileElement++)->IsLastForTile()); } @@ -4138,11 +4138,11 @@ static void sub_6B5952(sint32 rideIndex) * * rct2: 0x006D3319 */ -static sint32 ride_check_block_brakes(CoordsXYE *input, CoordsXYE *output) +static int32_t ride_check_block_brakes(CoordsXYE *input, CoordsXYE *output) { rct_window *w; track_circuit_iterator it; - sint32 rideIndex, type; + int32_t rideIndex, type; rideIndex = track_element_get_ride_index(input->element); w = window_find_by_class(WC_RIDE_CONSTRUCTION); @@ -4189,7 +4189,7 @@ static sint32 ride_check_block_brakes(CoordsXYE *input, CoordsXYE *output) */ static bool ride_check_track_contains_inversions(CoordsXYE *input, CoordsXYE *output) { - sint32 rideIndex = track_element_get_ride_index(input->element); + int32_t rideIndex = track_element_get_ride_index(input->element); Ride *ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) return true; @@ -4205,7 +4205,7 @@ static bool ride_check_track_contains_inversions(CoordsXYE *input, CoordsXYE *ou slowIt = it; while (track_circuit_iterator_next(&it)) { - sint32 trackType = track_element_get_type(it.current.element); + int32_t trackType = track_element_get_type(it.current.element); if (TrackFlags[trackType] & TRACK_ELEM_FLAG_INVERSION_TO_NORMAL) { *output = it.current; return true; @@ -4234,7 +4234,7 @@ static bool ride_check_track_contains_inversions(CoordsXYE *input, CoordsXYE *ou */ static bool ride_check_track_contains_banked(CoordsXYE *input, CoordsXYE *output) { - sint32 rideIndex = track_element_get_ride_index(input->element); + int32_t rideIndex = track_element_get_ride_index(input->element); Ride *ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) return true; @@ -4250,7 +4250,7 @@ static bool ride_check_track_contains_banked(CoordsXYE *input, CoordsXYE *output slowIt = it; while (track_circuit_iterator_next(&it)) { - sint32 trackType = track_element_get_type(output->element); + int32_t trackType = track_element_get_type(output->element); if (TrackFlags[trackType] & TRACK_ELEM_FLAG_BANKED) { *output = it.current; return true; @@ -4274,7 +4274,7 @@ static bool ride_check_track_contains_banked(CoordsXYE *input, CoordsXYE *output * * rct2: 0x006CB25D */ -static sint32 ride_check_station_length(CoordsXYE *input, CoordsXYE *output) +static int32_t ride_check_station_length(CoordsXYE *input, CoordsXYE *output) { rct_window* w = window_find_by_class(WC_RIDE_CONSTRUCTION); if (w != nullptr && @@ -4294,7 +4294,7 @@ static sint32 ride_check_station_length(CoordsXYE *input, CoordsXYE *output) output->element = trackBeginEnd.begin_element; } - sint32 num_station_elements = 0; + int32_t num_station_elements = 0; CoordsXYE last_good_station = *output; do{ @@ -4328,7 +4328,7 @@ static bool ride_check_start_and_end_is_station(CoordsXYE * input) { rct_window *w; Ride *ride; - sint32 rideIndex, trackType; + int32_t rideIndex, trackType; CoordsXYE trackBack, trackFront; rideIndex = track_element_get_ride_index(input->element); @@ -4368,21 +4368,21 @@ static bool ride_check_start_and_end_is_station(CoordsXYE * input) */ static void ride_set_boat_hire_return_point(Ride * ride, CoordsXYE * startElement) { - sint32 trackType = -1; - sint32 returnX = startElement->x; - sint32 returnY = startElement->y; - sint32 startX = returnX; - sint32 startY = returnY; + int32_t trackType = -1; + int32_t returnX = startElement->x; + int32_t returnY = startElement->y; + int32_t startX = returnX; + int32_t startY = returnY; rct_tile_element *returnTrackElement = startElement->element; track_begin_end trackBeginEnd; while (track_block_get_previous(returnX, returnY, returnTrackElement, &trackBeginEnd)) { // If previous track is back to the starting x, y, then break loop (otherwise possible infinite loop) if (trackType != -1 && startX == trackBeginEnd.begin_x && startY == trackBeginEnd.begin_y) break; - sint32 x = trackBeginEnd.begin_x; - sint32 y = trackBeginEnd.begin_y; - sint32 z = trackBeginEnd.begin_z; - sint32 direction = trackBeginEnd.begin_direction; + int32_t x = trackBeginEnd.begin_x; + int32_t y = trackBeginEnd.begin_y; + int32_t z = trackBeginEnd.begin_z; + int32_t direction = trackBeginEnd.begin_direction; trackType = track_element_get_type(trackBeginEnd.begin_element); sub_6C683D(&x, &y, &z, direction, trackType, 0, &returnTrackElement, 0); returnX = x; @@ -4390,7 +4390,7 @@ static void ride_set_boat_hire_return_point(Ride * ride, CoordsXYE * startElemen }; trackType = track_element_get_type(returnTrackElement); - sint32 elementReturnDirection = TrackCoordinates[trackType].rotation_begin; + int32_t elementReturnDirection = TrackCoordinates[trackType].rotation_begin; ride->boat_hire_return_direction = returnTrackElement->GetDirectionWithOffset(elementReturnDirection); ride->boat_hire_return_position.x = returnX >> 5; ride->boat_hire_return_position.y = returnY >> 5; @@ -4407,7 +4407,7 @@ static void ride_set_maze_entrance_exit_points(Ride *ride) // Create a list of all the entrance and exit positions TileCoordsXYZD * position = positions; - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { const auto entrance = ride_get_entrance_location(ride, i); const auto exit = ride_get_exit_location(ride, i); @@ -4424,9 +4424,9 @@ static void ride_set_maze_entrance_exit_points(Ride *ride) // Enumerate entrance and exit positions for (position = positions; !(*position).isNull(); position++) { - sint32 x = (*position).x << 5; - sint32 y = (*position).y << 5; - sint32 z = (*position).z; + int32_t x = (*position).x << 5; + int32_t y = (*position).y << 5; + int32_t z = (*position).z; rct_tile_element *tileElement = map_get_first_element_at((*position).x, (*position).y); do { @@ -4452,7 +4452,7 @@ static void ride_set_block_points(CoordsXYE *startElement) { CoordsXYE currentElement = *startElement; do { - sint32 trackType = track_element_get_type(currentElement.element); + int32_t trackType = track_element_get_type(currentElement.element); switch (trackType) { case TRACK_ELEM_END_STATION: case TRACK_ELEM_CABLE_LIFT_HILL: @@ -4471,7 +4471,7 @@ static void ride_set_block_points(CoordsXYE *startElement) * * rct2: 0x006B4D26 */ -static void ride_set_start_finish_points(sint32 rideIndex, CoordsXYE *startElement) +static void ride_set_start_finish_points(int32_t rideIndex, CoordsXYE *startElement) { Ride *ride = get_ride(rideIndex); @@ -4493,10 +4493,10 @@ static void ride_set_start_finish_points(sint32 rideIndex, CoordsXYE *startEleme * * rct2: 0x0069ED9E */ -static sint32 count_free_misc_sprite_slots() +static int32_t count_free_misc_sprite_slots() { - sint32 miscSpriteCount = gSpriteListCount[SPRITE_LIST_MISC]; - sint32 remainingSpriteCount = gSpriteListCount[SPRITE_LIST_NULL]; + int32_t miscSpriteCount = gSpriteListCount[SPRITE_LIST_MISC]; + int32_t remainingSpriteCount = gSpriteListCount[SPRITE_LIST_NULL]; return std::max(0, miscSpriteCount + remainingSpriteCount - 300); } @@ -4524,20 +4524,20 @@ static constexpr const LocationXY16 word_9A2A60[] = { * rct2: 0x006DD90D */ static rct_vehicle *vehicle_create_car( - sint32 rideIndex, - sint32 vehicleEntryIndex, - sint32 carIndex, - sint32 vehicleIndex, - sint32 x, - sint32 y, - sint32 z, - sint32 *remainingDistance, + int32_t rideIndex, + int32_t vehicleEntryIndex, + int32_t carIndex, + int32_t vehicleIndex, + int32_t x, + int32_t y, + int32_t z, + int32_t *remainingDistance, rct_tile_element *tileElement ) { Ride *ride = get_ride(rideIndex); rct_ride_entry *rideEntry = get_ride_entry(ride->subtype); rct_ride_entry_vehicle *vehicleEntry = &rideEntry->vehicles[vehicleEntryIndex]; - sint32 edx; + int32_t edx; rct_vehicle *vehicle = (rct_vehicle*)create_sprite(1); vehicle->sprite_identifier = SPRITE_IDENTIFIER_VEHICLE; @@ -4582,14 +4582,14 @@ static rct_vehicle *vehicle_create_car( vehicle->bank_rotation = 0; vehicle->target_seat_rotation = 4; vehicle->seat_rotation = 4; - for (sint32 i = 0; i < 32; i++) { + for (int32_t i = 0; i < 32; i++) { vehicle->peep[i] = SPRITE_INDEX_NULL; } if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_DODGEM_CAR_PLACEMENT) { // loc_6DDCA4: vehicle->var_CD = 0; - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); x += word_9A3AB4[direction].x; y += word_9A3AB4[direction].y; z = tileElement->base_height * 8; @@ -4616,7 +4616,7 @@ static rct_vehicle *vehicle_create_car( sprite_move(chosenLoc.x, chosenLoc.y, z, (rct_sprite*)vehicle); } else { - sint16 dl = 0; + int16_t dl = 0; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_CHAIRLIFT) { dl = 1; } @@ -4647,7 +4647,7 @@ static rct_vehicle *vehicle_create_car( vehicle->track_x = x; vehicle->track_y = y; - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); vehicle->sprite_direction = direction << 3; if (ride->type == RIDE_TYPE_SPACE_RINGS) { @@ -4702,13 +4702,13 @@ static rct_vehicle *vehicle_create_car( * * rct2: 0x006DD84C */ -static train_ref vehicle_create_train(sint32 rideIndex, sint32 x, sint32 y, sint32 z, sint32 vehicleIndex, sint32 *remainingDistance, rct_tile_element *tileElement) +static train_ref vehicle_create_train(int32_t rideIndex, int32_t x, int32_t y, int32_t z, int32_t vehicleIndex, int32_t *remainingDistance, rct_tile_element *tileElement) { Ride *ride = get_ride(rideIndex); train_ref train = { nullptr, nullptr }; - for (sint32 carIndex = 0; carIndex < ride->num_cars_per_train; carIndex++) { - const uint8 vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, carIndex); + for (int32_t carIndex = 0; carIndex < ride->num_cars_per_train; carIndex++) { + const uint8_t vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, carIndex); rct_vehicle *car = vehicle_create_car(rideIndex, vehicle, carIndex, vehicleIndex, x, y, z, remainingDistance, tileElement); if (carIndex == 0) { train.head = car; @@ -4723,14 +4723,14 @@ static train_ref vehicle_create_train(sint32 rideIndex, sint32 x, sint32 y, sint return train; } -static void vehicle_create_trains(sint32 rideIndex, sint32 x, sint32 y, sint32 z, rct_tile_element *tileElement) +static void vehicle_create_trains(int32_t rideIndex, int32_t x, int32_t y, int32_t z, rct_tile_element *tileElement) { Ride *ride = get_ride(rideIndex); train_ref firstTrain = {}; train_ref lastTrain = {}; - sint32 remainingDistance = 0; + int32_t remainingDistance = 0; - for (sint32 vehicleIndex = 0; vehicleIndex < ride->num_vehicles; vehicleIndex++) { + for (int32_t vehicleIndex = 0; vehicleIndex < ride->num_vehicles; vehicleIndex++) { if (ride_is_block_sectioned(ride)) { remainingDistance = 0; } @@ -4746,7 +4746,7 @@ static void vehicle_create_trains(sint32 rideIndex, sint32 x, sint32 y, sint32 z // Add train to ride vehicle list move_sprite_to_list((rct_sprite*)train.head, SPRITE_LIST_TRAIN * 2); - for (sint32 i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { + for (int32_t i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { if (ride->vehicles[i] == SPRITE_INDEX_NULL) { ride->vehicles[i] = train.head->sprite_index; break; @@ -4766,7 +4766,7 @@ static void vehicle_unset_update_flag_b1(rct_vehicle *head) rct_vehicle *vehicle = head; while (true) { vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_1; - uint16 spriteIndex = vehicle->next_vehicle_on_train; + uint16_t spriteIndex = vehicle->next_vehicle_on_train; if (spriteIndex == SPRITE_INDEX_NULL) { break; } @@ -4781,15 +4781,15 @@ static void vehicle_unset_update_flag_b1(rct_vehicle *head) static void ride_create_vehicles_find_first_block(Ride *ride, CoordsXYE *outXYElement) { rct_vehicle *vehicle = GET_VEHICLE(ride->vehicles[0]); - sint32 firstX = vehicle->track_x; - sint32 firstY = vehicle->track_y; - sint32 firstZ = vehicle->track_z; + int32_t firstX = vehicle->track_x; + int32_t firstY = vehicle->track_y; + int32_t firstZ = vehicle->track_z; rct_tile_element *firstElement = map_get_track_element_at(firstX, firstY, firstZ / 8); assert(firstElement != nullptr); - sint32 x = firstX; - sint32 y = firstY; + int32_t x = firstX; + int32_t y = firstY; rct_tile_element *trackElement = firstElement; track_begin_end trackBeginEnd; while (track_block_get_previous(x, y, trackElement, &trackBeginEnd)) { @@ -4800,7 +4800,7 @@ static void ride_create_vehicles_find_first_block(Ride *ride, CoordsXYE *outXYEl break; } - sint32 trackType = track_element_get_type(trackElement); + int32_t trackType = track_element_get_type(trackElement); switch (trackType) { case TRACK_ELEM_25_DEG_UP_TO_FLAT: case TRACK_ELEM_60_DEG_UP_TO_FLAT: @@ -4846,7 +4846,7 @@ static void ride_create_vehicles_find_first_block(Ride *ride, CoordsXYE *outXYEl * * rct2: 0x006DD84C */ -static bool ride_create_vehicles(Ride *ride, sint32 rideIndex, CoordsXYE *element, sint32 isApplying) +static bool ride_create_vehicles(Ride *ride, int32_t rideIndex, CoordsXYE *element, int32_t isApplying) { ride_update_max_vehicles(rideIndex); if (ride->subtype == RIDE_ENTRY_INDEX_NULL) { @@ -4854,7 +4854,7 @@ static bool ride_create_vehicles(Ride *ride, sint32 rideIndex, CoordsXYE *elemen } // Check if there are enough free sprite slots for all the vehicles - sint32 totalCars = ride->num_vehicles * ride->num_cars_per_train; + int32_t totalCars = ride->num_vehicles * ride->num_cars_per_train; if (totalCars > count_free_misc_sprite_slots()) { gGameCommandErrorText = STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES; return false; @@ -4865,10 +4865,10 @@ static bool ride_create_vehicles(Ride *ride, sint32 rideIndex, CoordsXYE *elemen } rct_tile_element *tileElement = element->element; - sint32 x = element->x; - sint32 y = element->y; - sint32 z = element->element->base_height; - sint32 direction = tile_element_get_direction(tileElement); + int32_t x = element->x; + int32_t y = element->y; + int32_t z = element->element->base_height; + int32_t direction = tile_element_get_direction(tileElement); // if (ride->mode == RIDE_MODE_STATION_TO_STATION) { @@ -4892,7 +4892,7 @@ static bool ride_create_vehicles(Ride *ride, sint32 rideIndex, CoordsXYE *elemen // Initialise station departs // 006DDDD0: ride->lifecycle_flags |= RIDE_LIFECYCLE_ON_TRACK; - for (sint32 i = 0; i < MAX_STATIONS; i++) { + for (int32_t i = 0; i < MAX_STATIONS; i++) { ride->station_depart[i] = (ride->station_depart[i] & 0x80) | 1; } @@ -4903,7 +4903,7 @@ static bool ride_create_vehicles(Ride *ride, sint32 rideIndex, CoordsXYE *elemen ride_create_vehicles_find_first_block(ride, &firstBlock); loc_6DDF9C(ride, firstBlock.element); } else { - for (sint32 i = 0; i < ride->num_vehicles; i++) { + for (int32_t i = 0; i < ride->num_vehicles; i++) { rct_vehicle *vehicle = GET_VEHICLE(ride->vehicles[i]); rct_ride_entry_vehicle *vehicleEntry = vehicle_get_vehicle_entry(vehicle); @@ -4928,7 +4928,7 @@ void loc_6DDF9C(Ride *ride, rct_tile_element *tileElement) { rct_vehicle *train, *car; - for (sint32 i = 0; i < ride->num_vehicles; i++) { + for (int32_t i = 0; i < ride->num_vehicles; i++) { train = GET_VEHICLE(ride->vehicles[i]); if (i == 0) { vehicle_update_track_motion(train, nullptr); @@ -4947,7 +4947,7 @@ void loc_6DDF9C(Ride *ride, rct_tile_element *tileElement) car->swing_sprite = 0; car->remaining_distance += 13962; - uint16 spriteIndex = car->next_vehicle_on_train; + uint16_t spriteIndex = car->next_vehicle_on_train; if (spriteIndex == SPRITE_INDEX_NULL) { break; } @@ -4964,7 +4964,7 @@ void loc_6DDF9C(Ride *ride, rct_tile_element *tileElement) car->status = VEHICLE_STATUS_MOVING_TO_END_OF_STATION; } - uint16 spriteIndex = car->next_vehicle_on_train; + uint16_t spriteIndex = car->next_vehicle_on_train; if (spriteIndex == SPRITE_INDEX_NULL) { break; } @@ -4981,7 +4981,7 @@ void loc_6DDF9C(Ride *ride, rct_tile_element *tileElement) static bool ride_initialise_cable_lift_track(Ride *ride, bool isApplying) { LocationXY8 location; - sint32 stationIndex; + int32_t stationIndex; for (stationIndex = 0; stationIndex < MAX_STATIONS; stationIndex++) { location = ride->station_starts[stationIndex]; if (location.xy != RCT_XY8_UNDEFINED) break; @@ -4991,9 +4991,9 @@ static bool ride_initialise_cable_lift_track(Ride *ride, bool isApplying) } } - sint32 x = location.x * 32; - sint32 y = location.y * 32; - sint32 z = ride->station_heights[stationIndex]; + int32_t x = location.x * 32; + int32_t y = location.y * 32; + int32_t z = ride->station_heights[stationIndex]; bool success = false; rct_tile_element *tileElement = map_get_first_element_at(location.x, location.y); @@ -5016,15 +5016,15 @@ static bool ride_initialise_cable_lift_track(Ride *ride, bool isApplying) STATE_FIND_STATION, STATE_REST_OF_TRACK }; - sint32 state = STATE_FIND_CABLE_LIFT; + int32_t state = STATE_FIND_CABLE_LIFT; track_circuit_iterator it; track_circuit_iterator_begin(&it, { x, y, tileElement }); while (track_circuit_iterator_previous(&it)) { tileElement = it.current.element; - sint32 trackType = track_element_get_type(tileElement); + int32_t trackType = track_element_get_type(tileElement); - uint16 flags = 16; + uint16_t flags = 16; switch (state) { case STATE_FIND_CABLE_LIFT: // Search for a cable lift hill track element @@ -5057,7 +5057,7 @@ static bool ride_initialise_cable_lift_track(Ride *ride, bool isApplying) } if (isApplying) { z = tileElement->base_height * 8; - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); trackType = track_element_get_type(tileElement); x = it.current.x; y = it.current.y; @@ -5071,7 +5071,7 @@ static bool ride_initialise_cable_lift_track(Ride *ride, bool isApplying) * * rct2: 0x006DF4D4 */ -static bool ride_create_cable_lift(sint32 rideIndex, bool isApplying) +static bool ride_create_cable_lift(int32_t rideIndex, bool isApplying) { Ride *ride = get_ride(rideIndex); @@ -5100,26 +5100,26 @@ static bool ride_create_cable_lift(sint32 rideIndex, bool isApplying) return true; } - sint32 x = ride->cable_lift_x; - sint32 y = ride->cable_lift_y; - sint32 z = ride->cable_lift_z; + int32_t x = ride->cable_lift_x; + int32_t y = ride->cable_lift_y; + int32_t z = ride->cable_lift_z; rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; if (tileElement->base_height != z) continue; break; } while (!(tileElement++)->IsLastForTile()); - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); rct_vehicle *head = nullptr; rct_vehicle *tail = nullptr; - uint32 ebx = 0; - for (sint32 i = 0; i < 5; i++) { - uint32 edx = ror32(0x15478, 10); - uint16 var_44 = edx & 0xFFFF; + uint32_t ebx = 0; + for (int32_t i = 0; i < 5; i++) { + uint32_t edx = ror32(0x15478, 10); + uint16_t var_44 = edx & 0xFFFF; edx = rol32(edx, 10) >> 1; ebx -= edx; - sint32 remaining_distance = ebx; + int32_t remaining_distance = ebx; ebx -= edx; rct_vehicle *current = cable_lift_segment_create(rideIndex, x, y, z, direction, var_44, remaining_distance, i == 0); @@ -5145,7 +5145,7 @@ static bool ride_create_cable_lift(sint32 rideIndex, bool isApplying) * * rct2: 0x006B51C0 */ -static void loc_6B51C0(sint32 rideIndex) +static void loc_6B51C0(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); @@ -5156,8 +5156,8 @@ static void loc_6B51C0(sint32 rideIndex) if (w == nullptr) return; - sint8 entranceOrExit = -1; - sint32 i; + int8_t entranceOrExit = -1; + int32_t i; for (i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED) continue; @@ -5177,15 +5177,15 @@ static void loc_6B51C0(sint32 rideIndex) return; if (ride->type != RIDE_TYPE_MAZE) { - sint32 x = ride->station_starts[i].x * 32; - sint32 y = ride->station_starts[i].y * 32; - sint32 z = ride->station_heights[i] * 8; + int32_t x = ride->station_starts[i].x * 32; + int32_t y = ride->station_starts[i].y * 32; + int32_t z = ride->station_heights[i] * 8; window_scroll_to_location(w, x, y, z); CoordsXYE trackElement; ride_try_get_origin_element(rideIndex, &trackElement); ride_find_track_gap(&trackElement, &trackElement); - sint32 ok = ride_modify(&trackElement); + int32_t ok = ride_modify(&trackElement); if (ok == 0) { return; } @@ -5215,7 +5215,7 @@ static void ride_scroll_to_track_error(CoordsXYE *trackElement) * * rct2: 0x006B4F6B */ -static rct_tile_element *loc_6B4F6B(sint32 rideIndex, sint32 x, sint32 y) +static rct_tile_element *loc_6B4F6B(int32_t rideIndex, int32_t x, int32_t y) { Ride * ride = get_ride(rideIndex); rct_tile_element *tileElement = map_get_first_element_at(x / 32, y / 32); @@ -5238,9 +5238,9 @@ static rct_tile_element *loc_6B4F6B(sint32 rideIndex, sint32 x, sint32 y) return nullptr; } -sint32 ride_is_valid_for_test(sint32 rideIndex, sint32 goingToBeOpen, sint32 isApplying) +int32_t ride_is_valid_for_test(int32_t rideIndex, int32_t goingToBeOpen, int32_t isApplying) { - sint32 stationIndex; + int32_t stationIndex; Ride *ride; CoordsXYE trackElement, problematicTrackElement = {}; @@ -5367,9 +5367,9 @@ sint32 ride_is_valid_for_test(sint32 rideIndex, sint32 goingToBeOpen, sint32 isA * * rct2: 0x006B4EEA */ -sint32 ride_is_valid_for_open(sint32 rideIndex, sint32 goingToBeOpen, sint32 isApplying) +int32_t ride_is_valid_for_open(int32_t rideIndex, int32_t goingToBeOpen, int32_t isApplying) { - sint32 stationIndex; + int32_t stationIndex; Ride *ride; CoordsXYE trackElement, problematicTrackElement = {}; @@ -5539,7 +5539,7 @@ void ride_get_start_of_track(CoordsXYE * output) * * rct2: 0x006CB7FB */ -sint32 ride_get_refund_price(sint32 ride_id) +int32_t ride_get_refund_price(int32_t ride_id) { CoordsXYE trackElement; money32 addedcost, cost = 0; @@ -5553,7 +5553,7 @@ sint32 ride_get_refund_price(sint32 ride_id) // Find the start in case it is not a complete circuit ride_get_start_of_track(&trackElement); - uint8 direction = tile_element_get_direction(trackElement.element); + uint8_t direction = tile_element_get_direction(trackElement.element); // Used in the following loop to know when we have // completed all of the elements and are back at the @@ -5600,9 +5600,9 @@ sint32 ride_get_refund_price(sint32 ride_id) * * rct2: 0x00696707 */ -void ride_stop_peeps_queuing(sint32 rideIndex) +void ride_stop_peeps_queuing(int32_t rideIndex) { - uint16 spriteIndex; + uint16_t spriteIndex; rct_peep *peep; FOR_ALL_PEEPS(spriteIndex, peep) { @@ -5616,9 +5616,9 @@ void ride_stop_peeps_queuing(sint32 rideIndex) } } -sint32 ride_get_empty_slot() +int32_t ride_get_empty_slot() { - for (sint32 i = 0; i < MAX_RIDES; i++) { + for (int32_t i = 0; i < MAX_RIDES; i++) { Ride *ride = get_ride(i); if (ride->type == RIDE_TYPE_NULL) { return i; @@ -5627,12 +5627,12 @@ sint32 ride_get_empty_slot() return -1; } -sint32 ride_get_default_mode(Ride *ride) +int32_t ride_get_default_mode(Ride *ride) { const rct_ride_entry *rideEntry = get_ride_entry(ride->subtype); - const uint8 *availableModes = RideAvailableModes; + const uint8_t *availableModes = RideAvailableModes; - for (sint32 i = 0; i < ride->type; i++) { + for (int32_t i = 0; i < ride->type; i++) { while (*(availableModes++) != 255) {} } // Since this only selects a default mode and does not prevent other modes from being used, there is no need @@ -5644,10 +5644,10 @@ sint32 ride_get_default_mode(Ride *ride) return availableModes[0]; } -static bool ride_with_colour_config_exists(uint8 ride_type, const track_colour *colours) +static bool ride_with_colour_config_exists(uint8_t ride_type, const track_colour *colours) { Ride *ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride->type != ride_type) continue; @@ -5664,7 +5664,7 @@ static bool ride_name_exists(char *name) { char buffer[256]; Ride *ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { format_string(buffer, 256, ride->name, &ride->name_arguments); if ((strcmp(buffer, name) == 0) && ride_has_any_track_elements(i)) { @@ -5678,7 +5678,7 @@ static bool ride_name_exists(char *name) * * Based on rct2: 0x006B4776 */ -sint32 ride_get_random_colour_preset_index(uint8 ride_type) +int32_t ride_get_random_colour_preset_index(uint8_t ride_type) { if (ride_type >= 128) { @@ -5688,8 +5688,8 @@ sint32 ride_get_random_colour_preset_index(uint8 ride_type) const track_colour_preset_list *colourPresets = &RideColourPresets[ride_type]; // 200 attempts to find a colour preset that hasn't already been used in the park for this ride type - for (sint32 i = 0; i < 200; i++) { - sint32 listIndex = util_rand() % colourPresets->count; + for (int32_t i = 0; i < 200; i++) { + int32_t listIndex = util_rand() % colourPresets->count; const track_colour *colours = &colourPresets->list[listIndex]; if (!ride_with_colour_config_exists(ride_type, colours)) { @@ -5703,14 +5703,14 @@ sint32 ride_get_random_colour_preset_index(uint8 ride_type) * * Based on rct2: 0x006B4776 */ -void ride_set_colour_preset(Ride *ride, uint8 index) +void ride_set_colour_preset(Ride *ride, uint8_t index) { const track_colour_preset_list * colourPresets = &RideColourPresets[ride->type]; track_colour colours = { COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK }; if (index < colourPresets->count) { colours = colourPresets->list[index]; } - for (sint32 i = 0; i < NUM_COLOUR_SCHEMES; i++) { + for (int32_t i = 0; i < NUM_COLOUR_SCHEMES; i++) { ride->track_colour_main[i] = colours.main; ride->track_colour_additional[i] = colours.additional; ride->track_colour_supports[i] = colours.supports; @@ -5721,7 +5721,7 @@ void ride_set_colour_preset(Ride *ride, uint8 index) money32 ride_get_common_price(Ride *forRide) { Ride *ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { if (ride->type == forRide->type && ride != forRide) { @@ -5804,7 +5804,7 @@ static void ride_set_name_to_vehicle_default(Ride * ride, rct_ride_entry * rideE /** * This will return the name of the ride, as seen in the New Ride window. */ -rct_ride_name get_ride_naming(const uint8 rideType, rct_ride_entry * rideEntry) +rct_ride_name get_ride_naming(const uint8_t rideType, rct_ride_entry * rideEntry) { if (RideGroupManager::RideTypeHasRideGroups(rideType)) { @@ -5830,15 +5830,15 @@ rct_ride_name get_ride_naming(const uint8 rideType, rct_ride_entry * rideEntry) */ void game_command_callback_ride_construct_placed_back( - [[maybe_unused]] sint32 eax, - [[maybe_unused]] sint32 ebx, - [[maybe_unused]] sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - [[maybe_unused]] sint32 edi, - [[maybe_unused]] sint32 ebp) + [[maybe_unused]] int32_t eax, + [[maybe_unused]] int32_t ebx, + [[maybe_unused]] int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + [[maybe_unused]] int32_t edi, + [[maybe_unused]] int32_t ebp) { - sint32 trackDirection, x, y, z; + int32_t trackDirection, x, y, z; track_begin_end trackBeginEnd; trackDirection = _currentTrackPieceDirection ^ 2; @@ -5870,15 +5870,15 @@ void game_command_callback_ride_construct_placed_back( } void game_command_callback_ride_construct_placed_front( - [[maybe_unused]] sint32 eax, - [[maybe_unused]] sint32 ebx, - [[maybe_unused]] sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - [[maybe_unused]] sint32 edi, - [[maybe_unused]] sint32 ebp) + [[maybe_unused]] int32_t eax, + [[maybe_unused]] int32_t ebx, + [[maybe_unused]] int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + [[maybe_unused]] int32_t edi, + [[maybe_unused]] int32_t ebp) { - sint32 trackDirection, x, y, z; + int32_t trackDirection, x, y, z; trackDirection = _currentTrackPieceDirection; x = _currentTrackBeginX; @@ -5919,15 +5919,15 @@ void game_command_callback_ride_construct_placed_front( */ void game_command_callback_ride_remove_track_piece( - [[maybe_unused]] sint32 eax, - [[maybe_unused]] sint32 ebx, - [[maybe_unused]] sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - [[maybe_unused]] sint32 edi, - [[maybe_unused]] sint32 ebp) + [[maybe_unused]] int32_t eax, + [[maybe_unused]] int32_t ebx, + [[maybe_unused]] int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + [[maybe_unused]] int32_t edi, + [[maybe_unused]] int32_t ebp) { - sint32 x, y, z, direction, type; + int32_t x, y, z, direction, type; x = gRideRemoveTrackPieceCallbackX; y = gRideRemoveTrackPieceCallbackY; @@ -5943,26 +5943,26 @@ void game_command_callback_ride_remove_track_piece( * rct2: 0x006B2FC5 */ void game_command_set_ride_appearance( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { bool apply = (*ebx & GAME_COMMAND_FLAG_APPLY); - uint8 ride_id = *edx; + uint8_t ride_id = *edx; if (ride_id >= MAX_RIDES) { log_warning("Invalid game command for ride %u", ride_id); *ebx = MONEY32_UNDEFINED; return; } - uint8 type = *ebx >> 8; - uint8 value = *edx >> 8; - uint32 index = (uint32)*edi; + uint8_t type = *ebx >> 8; + uint8_t value = *edx >> 8; + uint32_t index = (uint32_t)*edi; if (*edi < 0) { log_warning("Invalid game command, index %d out of bounds", index); @@ -6018,7 +6018,7 @@ void game_command_set_ride_appearance( return; } if (apply) { - *((uint8*)(&ride->vehicle_colours[index])) = value; + *((uint8_t*)(&ride->vehicle_colours[index])) = value; ride_update_vehicle_colours(ride_id); } break; @@ -6029,7 +6029,7 @@ void game_command_set_ride_appearance( return; } if (apply) { - *((uint8*)(&ride->vehicle_colours[index]) + 1) = value; + *((uint8_t*)(&ride->vehicle_colours[index]) + 1) = value; ride_update_vehicle_colours(ride_id); } break; @@ -6048,7 +6048,7 @@ void game_command_set_ride_appearance( if (apply) { ride->colour_scheme_type &= ~(RIDE_COLOUR_SCHEME_DIFFERENT_PER_TRAIN | RIDE_COLOUR_SCHEME_DIFFERENT_PER_CAR); ride->colour_scheme_type |= value; - for (uint32 i = 1; i < Util::CountOf(ride->vehicle_colours); i++) { + for (uint32_t i = 1; i < Util::CountOf(ride->vehicle_colours); i++) { ride->vehicle_colours[i] = ride->vehicle_colours[0]; ride->vehicle_colours_extended[i] = ride->vehicle_colours_extended[0]; } @@ -6083,16 +6083,16 @@ void game_command_set_ride_appearance( * rct2: 0x006B53E9 */ void game_command_set_ride_price( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - uint32 flags = *ebx; - uint8 ride_number = (*edx & 0xFF); + uint32_t flags = *ebx; + uint8_t ride_number = (*edx & 0xFF); if (ride_number >= MAX_RIDES) { log_warning("Invalid game command for ride %u", ride_number); @@ -6127,7 +6127,7 @@ void game_command_set_ride_price( gCommandExpenditureType = RCT_EXPENDITURE_TYPE_PARK_RIDE_TICKETS; if (flags & GAME_COMMAND_FLAG_APPLY) { - uint32 shop_item; + uint32_t shop_item; if (ride->overall_view.xy != RCT_XY8_UNDEFINED) { LocationXYZ16 coord; @@ -6173,7 +6173,7 @@ void game_command_set_ride_price( } ride = get_ride(0); - for (uint8 rideId = 0; rideId < MAX_RIDES; rideId++, ride++) { + for (uint8_t rideId = 0; rideId < MAX_RIDES; rideId++, ride++) { // Unplaced rides have a type of NULL if (ride->type == RIDE_TYPE_NULL) continue; @@ -6201,7 +6201,7 @@ void game_command_set_ride_price( } } -bool ride_type_has_flag(sint32 rideType, sint32 flag) +bool ride_type_has_flag(int32_t rideType, int32_t flag) { return (RideProperties[rideType].flags & flag) != 0; } @@ -6220,8 +6220,8 @@ bool ride_type_has_flag(sint32 rideType, sint32 flag) * if by some miracle you manage 4 element none sloped. */ -void increment_turn_count_1_element(Ride* ride, uint8 type){ - uint16* turn_count; +void increment_turn_count_1_element(Ride* ride, uint8_t type){ + uint16_t* turn_count; switch (type){ case 0: turn_count = &ride->turn_count_default; @@ -6235,7 +6235,7 @@ void increment_turn_count_1_element(Ride* ride, uint8 type){ default: return; } - uint16 value = (*turn_count & TURN_MASK_1_ELEMENT) + 1; + uint16_t value = (*turn_count & TURN_MASK_1_ELEMENT) + 1; *turn_count &= ~TURN_MASK_1_ELEMENT; if (value > TURN_MASK_1_ELEMENT) @@ -6243,8 +6243,8 @@ void increment_turn_count_1_element(Ride* ride, uint8 type){ *turn_count |= value; } -void increment_turn_count_2_elements(Ride* ride, uint8 type){ - uint16* turn_count; +void increment_turn_count_2_elements(Ride* ride, uint8_t type){ + uint16_t* turn_count; switch (type){ case 0: turn_count = &ride->turn_count_default; @@ -6258,7 +6258,7 @@ void increment_turn_count_2_elements(Ride* ride, uint8 type){ default: return; } - uint16 value = (*turn_count & TURN_MASK_2_ELEMENTS) + 0x20; + uint16_t value = (*turn_count & TURN_MASK_2_ELEMENTS) + 0x20; *turn_count &= ~TURN_MASK_2_ELEMENTS; if (value > TURN_MASK_2_ELEMENTS) @@ -6266,8 +6266,8 @@ void increment_turn_count_2_elements(Ride* ride, uint8 type){ *turn_count |= value; } -void increment_turn_count_3_elements(Ride* ride, uint8 type){ - uint16* turn_count; +void increment_turn_count_3_elements(Ride* ride, uint8_t type){ + uint16_t* turn_count; switch (type){ case 0: turn_count = &ride->turn_count_default; @@ -6281,7 +6281,7 @@ void increment_turn_count_3_elements(Ride* ride, uint8 type){ default: return; } - uint16 value = (*turn_count & TURN_MASK_3_ELEMENTS) + 0x100; + uint16_t value = (*turn_count & TURN_MASK_3_ELEMENTS) + 0x100; *turn_count &= ~TURN_MASK_3_ELEMENTS; if (value > TURN_MASK_3_ELEMENTS) @@ -6289,8 +6289,8 @@ void increment_turn_count_3_elements(Ride* ride, uint8 type){ *turn_count |= value; } -void increment_turn_count_4_plus_elements(Ride* ride, uint8 type){ - uint16* turn_count; +void increment_turn_count_4_plus_elements(Ride* ride, uint8_t type){ + uint16_t* turn_count; switch (type){ case 0: case 1: @@ -6303,7 +6303,7 @@ void increment_turn_count_4_plus_elements(Ride* ride, uint8 type){ default: return; } - uint16 value = (*turn_count & TURN_MASK_4_PLUS_ELEMENTS) + 0x800; + uint16_t value = (*turn_count & TURN_MASK_4_PLUS_ELEMENTS) + 0x800; *turn_count &= ~TURN_MASK_4_PLUS_ELEMENTS; if (value > TURN_MASK_4_PLUS_ELEMENTS) @@ -6311,8 +6311,8 @@ void increment_turn_count_4_plus_elements(Ride* ride, uint8 type){ *turn_count |= value; } -sint32 get_turn_count_1_element(Ride* ride, uint8 type) { - uint16* turn_count; +int32_t get_turn_count_1_element(Ride* ride, uint8_t type) { + uint16_t* turn_count; switch (type){ case 0: turn_count = &ride->turn_count_default; @@ -6330,8 +6330,8 @@ sint32 get_turn_count_1_element(Ride* ride, uint8 type) { return (*turn_count) & TURN_MASK_1_ELEMENT; } -sint32 get_turn_count_2_elements(Ride* ride, uint8 type) { - uint16* turn_count; +int32_t get_turn_count_2_elements(Ride* ride, uint8_t type) { + uint16_t* turn_count; switch (type){ case 0: turn_count = &ride->turn_count_default; @@ -6349,8 +6349,8 @@ sint32 get_turn_count_2_elements(Ride* ride, uint8 type) { return ((*turn_count) & TURN_MASK_2_ELEMENTS) >> 5; } -sint32 get_turn_count_3_elements(Ride* ride, uint8 type) { - uint16* turn_count; +int32_t get_turn_count_3_elements(Ride* ride, uint8_t type) { + uint16_t* turn_count; switch (type){ case 0: turn_count = &ride->turn_count_default; @@ -6368,8 +6368,8 @@ sint32 get_turn_count_3_elements(Ride* ride, uint8 type) { return ((*turn_count) & TURN_MASK_3_ELEMENTS) >> 8; } -sint32 get_turn_count_4_plus_elements(Ride* ride, uint8 type) { - uint16* turn_count; +int32_t get_turn_count_4_plus_elements(Ride* ride, uint8_t type) { + uint16_t* turn_count; switch (type){ case 0: case 1: @@ -6408,7 +6408,7 @@ bool ride_has_whirlpool(Ride *ride) { return ride->special_track_elements & RIDE_ELEMENT_WHIRLPOOL; } -uint8 ride_get_helix_sections(Ride *ride) { +uint8_t ride_get_helix_sections(Ride *ride) { // Helix sections stored in the low 5 bits. return ride->special_track_elements & 0x1F; } @@ -6428,7 +6428,7 @@ bool ride_is_block_sectioned(Ride *ride) ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED; } -bool ride_has_any_track_elements(sint32 rideIndex) +bool ride_has_any_track_elements(int32_t rideIndex) { tile_element_iterator it; @@ -6468,11 +6468,11 @@ void ride_all_has_any_track_elements(bool *rideIndexArray) * * rct2: 0x006847BA */ -void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint32 num_images){ - uint8 bitmap[200][200] = { 0 }; +void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, int32_t num_images){ + uint8_t bitmap[200][200] = { 0 }; rct_drawpixelinfo dpi = { - /*.bits = */(uint8*)bitmap, + /*.bits = */(uint8_t*)bitmap, /*.x = */-100, /*.y = */-100, /*.width = */200, @@ -6481,12 +6481,12 @@ void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint /*.zoom_level = */0 }; - for (sint32 i = 0; i < num_images; ++i){ + for (int32_t i = 0; i < num_images; ++i){ gfx_draw_sprite_software(&dpi, vehicle_type->base_image_id + i, 0, 0, 0); } - sint32 al = -1; - for (sint32 i = 99; i != 0; --i){ - for (sint32 j = 0; j < 200; j++){ + int32_t al = -1; + for (int32_t i = 99; i != 0; --i){ + for (int32_t j = 0; j < 200; j++){ if (bitmap[j][100 - i] != 0){ al = i; break; @@ -6496,7 +6496,7 @@ void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint if (al != -1) break; - for (sint32 j = 0; j < 200; j++){ + for (int32_t j = 0; j < 200; j++){ if (bitmap[j][100 + i] != 0){ al = i; break; @@ -6508,10 +6508,10 @@ void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint } al++; - sint32 bl = -1; + int32_t bl = -1; - for (sint32 i = 99; i != 0; --i){ - for (sint32 j = 0; j < 200; j++){ + for (int32_t i = 99; i != 0; --i){ + for (int32_t j = 0; j < 200; j++){ if (bitmap[100 - i][j] != 0){ bl = i; break; @@ -6523,10 +6523,10 @@ void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint } bl++; - sint32 bh = -1; + int32_t bh = -1; - for (sint32 i = 99; i != 0; --i){ - for (sint32 j = 0; j < 200; j++){ + for (int32_t i = 99; i != 0; --i){ + for (int32_t j = 0; j < 200; j++){ if (bitmap[100 + i][j] != 0){ bh = i; break; @@ -6549,9 +6549,9 @@ void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint vehicle_type->sprite_height_positive = bh; } -static sint32 loc_6CD18E(sint16 mapX, sint16 mapY, sint16 entranceMinX, sint16 entranceMinY, sint16 entranceMaxX, sint16 entranceMaxY) +static int32_t loc_6CD18E(int16_t mapX, int16_t mapY, int16_t entranceMinX, int16_t entranceMinY, int16_t entranceMaxX, int16_t entranceMaxY) { - sint32 direction = 0; + int32_t direction = 0; if (mapX == entranceMinX) { if (mapY > entranceMinY && mapY < entranceMaxY) { return direction; @@ -6583,11 +6583,11 @@ static sint32 loc_6CD18E(sint16 mapX, sint16 mapY, sint16 entranceMinX, sint16 e * * rct2: 0x006CCF70 */ -void ride_get_entrance_or_exit_position_from_screen_position(sint32 screenX, sint32 screenY, sint32 * outX, sint32 * outY, sint32 * outDirection) +void ride_get_entrance_or_exit_position_from_screen_position(int32_t screenX, int32_t screenY, int32_t * outX, int32_t * outY, int32_t * outDirection) { - sint16 mapX, mapY; - sint16 entranceMinX, entranceMinY, entranceMaxX, entranceMaxY, word_F4418C, word_F4418E; - sint32 interactionType, direction, stationHeight, stationDirection; + int16_t mapX, mapY; + int16_t entranceMinX, entranceMinY, entranceMaxX, entranceMaxY, word_F4418C, word_F4418E; + int32_t interactionType, direction, stationHeight, stationDirection; rct_tile_element * tileElement; rct_viewport * viewport; Ride * ride; @@ -6654,7 +6654,7 @@ void ride_get_entrance_or_exit_position_from_screen_position(sint32 screenX, sin direction = mapX < 0 ? 0 : 2; } - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { mapX = _unkF44188.x + CoordsDirectionDelta[direction].x; mapY = _unkF44188.y + CoordsDirectionDelta[direction].y; @@ -6678,7 +6678,7 @@ void ride_get_entrance_or_exit_position_from_screen_position(sint32 screenX, sin if (tile_element_get_station(tileElement) != gRideEntranceExitPlaceStationIndex) continue; - sint32 eax = (direction + 2 - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK; + int32_t eax = (direction + 2 - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK; if (FlatRideTrackSequenceProperties[track_element_get_type(tileElement)][tile_element_get_track_sequence(tileElement)] & (1 << eax)) { gRideEntranceExitPlaceDirection = direction ^ 2; @@ -6786,7 +6786,7 @@ bool ride_select_backwards_from_front() bool ride_select_forwards_from_back() { - sint32 x, y, z, direction; + int32_t x, y, z, direction; ride_construction_invalidate_current_track(); @@ -6811,7 +6811,7 @@ bool ride_select_forwards_from_back() } } -money32 ride_remove_track_piece(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type, uint8 flags) +money32 ride_remove_track_piece(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t type, uint8_t flags) { gGameCommandErrorTitle = STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS; if (network_get_mode() == NETWORK_MODE_CLIENT) @@ -6830,7 +6830,7 @@ bool ride_are_all_possible_entrances_and_exits_built(Ride *ride) if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) return true; - for (sint32 i = 0; i < MAX_STATIONS; i++) { + for (int32_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED) { continue; @@ -6852,7 +6852,7 @@ bool ride_are_all_possible_entrances_and_exits_built(Ride *ride) * * rct2: 0x006B59C6 */ -void invalidate_test_results(sint32 rideIndex) +void invalidate_test_results(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); @@ -6861,8 +6861,8 @@ void invalidate_test_results(sint32 rideIndex) ride->lifecycle_flags &= ~RIDE_LIFECYCLE_TESTED; ride->lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { - for (sint32 i = 0; i < ride->num_vehicles; i++) { - uint16 spriteIndex = ride->vehicles[i]; + for (int32_t i = 0; i < ride->num_vehicles; i++) { + uint16_t spriteIndex = ride->vehicles[i]; if (spriteIndex != SPRITE_INDEX_NULL) { rct_vehicle *vehicle = GET_VEHICLE(spriteIndex); vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_TESTING; @@ -6879,7 +6879,7 @@ void invalidate_test_results(sint32 rideIndex) * @param rideIndex (dl) * @param reliabilityIncreaseFactor (ax) */ -void ride_fix_breakdown(sint32 rideIndex, sint32 reliabilityIncreaseFactor) +void ride_fix_breakdown(int32_t rideIndex, int32_t reliabilityIncreaseFactor) { Ride *ride = get_ride(rideIndex); @@ -6889,8 +6889,8 @@ void ride_fix_breakdown(sint32 rideIndex, sint32 reliabilityIncreaseFactor) ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { - for (sint32 i = 0; i < ride->num_vehicles; i++) { - uint16 spriteIndex = ride->vehicles[i]; + for (int32_t i = 0; i < ride->num_vehicles; i++) { + uint16_t spriteIndex = ride->vehicles[i]; while (spriteIndex != SPRITE_INDEX_NULL) { rct_vehicle *vehicle = GET_VEHICLE(spriteIndex); vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_ZERO_VELOCITY; @@ -6901,7 +6901,7 @@ void ride_fix_breakdown(sint32 rideIndex, sint32 reliabilityIncreaseFactor) } } - uint8 unreliability = 100 - ride->reliability_percentage; + uint8_t unreliability = 100 - ride->reliability_percentage; ride->reliability += reliabilityIncreaseFactor * (unreliability / 2); } @@ -6909,18 +6909,18 @@ void ride_fix_breakdown(sint32 rideIndex, sint32 reliabilityIncreaseFactor) * * rct2: 0x006DE102 */ -static void ride_update_vehicle_colours(sint32 rideIndex) +static void ride_update_vehicle_colours(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_SPACE_RINGS || ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_16)) { gfx_invalidate_screen(); } - for (sint32 i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { - sint32 carIndex = 0; - uint16 spriteIndex = ride->vehicles[i]; + for (int32_t i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { + int32_t carIndex = 0; + uint16_t spriteIndex = ride->vehicles[i]; rct_vehicle_colour colours = {}; - uint8 coloursExtended = 0; + uint8_t coloursExtended = 0; while (spriteIndex != SPRITE_INDEX_NULL) { rct_vehicle *vehicle = GET_VEHICLE(spriteIndex); @@ -6953,15 +6953,15 @@ static void ride_update_vehicle_colours(sint32 rideIndex) * rct2: 0x006DE4CD * trainLayout: Originally fixed to 0x00F64E38. This no longer postfixes with 255. */ -void ride_entry_get_train_layout(sint32 rideEntryIndex, sint32 numCarsPerTrain, uint8 *trainLayout) +void ride_entry_get_train_layout(int32_t rideEntryIndex, int32_t numCarsPerTrain, uint8_t *trainLayout) { - for (sint32 i = 0; i < numCarsPerTrain; i++) + for (int32_t i = 0; i < numCarsPerTrain; i++) { trainLayout[i] = ride_entry_get_vehicle_at_position(rideEntryIndex, numCarsPerTrain, i); } } -uint8 ride_entry_get_vehicle_at_position(sint32 rideEntryIndex,sint32 numCarsPerTrain,sint32 position) +uint8_t ride_entry_get_vehicle_at_position(int32_t rideEntryIndex,int32_t numCarsPerTrain,int32_t position) { rct_ride_entry *rideEntry = get_ride_entry(rideEntryIndex); if (position == 0 && rideEntry->front_vehicle != 255) { @@ -6978,10 +6978,10 @@ uint8 ride_entry_get_vehicle_at_position(sint32 rideEntryIndex,sint32 numCarsPer } // Finds track pieces that a given ride entry has sprites for -uint64 ride_entry_get_supported_track_pieces(const rct_ride_entry * rideEntry) +uint64_t ride_entry_get_supported_track_pieces(const rct_ride_entry * rideEntry) { - uint64 supportedPieces = 0xFFFFFFFFFFFFFFFFULL; - uint16 trackPieceRequiredSprites[55] = { + uint64_t supportedPieces = 0xFFFFFFFFFFFFFFFFULL; + uint16_t trackPieceRequiredSprites[55] = { 0x0001u, 0x0001u, 0x0001u, 0x0000u, 0x0006u, 0x0002u, 0x0020u, 0x000E, 0x0003u, 0x0006u, 0x0007u, 0x0002u, 0x0004u, 0x0001u, 0x0001u, 0x0001u, 0x0001u, 0x0061u, 0x000E, 0x1081u, 0x0001u, 0x0020u, 0x0020u, 0x0001u, @@ -6992,7 +6992,7 @@ uint64 ride_entry_get_supported_track_pieces(const rct_ride_entry * rideEntry) }; //Only check default vehicle; it's assumed the others will have correct sprites if this one does (I've yet to find an exception, at least) - for (sint32 j = 0; j < 55; j++) { + for (int32_t j = 0; j < 55; j++) { if ((rideEntry->vehicles[rideEntry->default_vehicle].sprite_flags & trackPieceRequiredSprites[j]) != trackPieceRequiredSprites[j]) supportedPieces &= ~(1ULL << j); } @@ -7000,14 +7000,14 @@ uint64 ride_entry_get_supported_track_pieces(const rct_ride_entry * rideEntry) return supportedPieces; } -static sint32 ride_get_smallest_station_length(Ride *ride) +static int32_t ride_get_smallest_station_length(Ride *ride) { - auto result = std::numeric_limits::max(); - for (sint32 i = 0; i < MAX_STATIONS; i++) + auto result = std::numeric_limits::max(); + for (int32_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy != RCT_XY8_UNDEFINED) { - result = std::min(result, ride->station_length[i]); + result = std::min(result, ride->station_length[i]); } } return result; @@ -7017,15 +7017,15 @@ static sint32 ride_get_smallest_station_length(Ride *ride) * * rct2: 0x006CB3AA */ -static sint32 ride_get_track_length(Ride * ride) +static int32_t ride_get_track_length(Ride * ride) { rct_window * w; rct_tile_element * tileElement = nullptr; track_circuit_iterator it, slowIt; - sint32 x = 0, y = 0, z, trackType, rideIndex, result; + int32_t x = 0, y = 0, z, trackType, rideIndex, result; bool foundTrack = false; - for (sint32 i = 0; i < MAX_STATIONS && !foundTrack; i++) + for (int32_t i = 0; i < MAX_STATIONS && !foundTrack; i++) { LocationXY8 location = ride->station_starts[i]; if (location.xy == RCT_XY8_UNDEFINED) @@ -7094,7 +7094,7 @@ static sint32 ride_get_track_length(Ride * ride) * * rct2: 0x006DD57D */ -void ride_update_max_vehicles(sint32 rideIndex) +void ride_update_max_vehicles(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); if (ride->subtype == RIDE_ENTRY_INDEX_NULL) @@ -7106,26 +7106,26 @@ void ride_update_max_vehicles(sint32 rideIndex) return; } rct_ride_entry_vehicle *vehicleEntry; - uint8 numCarsPerTrain, numVehicles; - sint32 maxNumTrains; + uint8_t numCarsPerTrain, numVehicles; + int32_t maxNumTrains; if (rideEntry->cars_per_flat_ride == 0xFF) { - sint32 trainLength; + int32_t trainLength; ride->num_cars_per_train = std::max(rideEntry->min_cars_in_train, ride->num_cars_per_train); ride->min_max_cars_per_train = rideEntry->max_cars_in_train | (rideEntry->min_cars_in_train << 4); // Calculate maximum train length based on smallest station length - sint32 stationLength = ride_get_smallest_station_length(ride); + int32_t stationLength = ride_get_smallest_station_length(ride); if (stationLength == -1) return; stationLength = (stationLength * 0x44180) - 0x16B2A; - sint32 maxMass = RideData5[ride->type].max_mass << 8; - sint32 maxCarsPerTrain = 1; - for (sint32 numCars = rideEntry->max_cars_in_train; numCars > 0; numCars--) { + int32_t maxMass = RideData5[ride->type].max_mass << 8; + int32_t maxCarsPerTrain = 1; + for (int32_t numCars = rideEntry->max_cars_in_train; numCars > 0; numCars--) { trainLength = 0; - sint32 totalMass = 0; - for (sint32 i = 0; i < numCars; i++) { + int32_t totalMass = 0; + for (int32_t i = 0; i < numCars; i++) { vehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, numCars, i)]; trainLength += vehicleEntry->spacing; totalMass += vehicleEntry->car_mass; @@ -7136,8 +7136,8 @@ void ride_update_max_vehicles(sint32 rideIndex) break; } } - sint32 newCarsPerTrain = std::max(ride->proposed_num_cars_per_train, rideEntry->min_cars_in_train); - maxCarsPerTrain = std::max(maxCarsPerTrain, (sint32)rideEntry->min_cars_in_train); + int32_t newCarsPerTrain = std::max(ride->proposed_num_cars_per_train, rideEntry->min_cars_in_train); + maxCarsPerTrain = std::max(maxCarsPerTrain, (int32_t)rideEntry->min_cars_in_train); if (!gCheatsDisableTrainLengthLimit) { newCarsPerTrain = std::min(maxCarsPerTrain, newCarsPerTrain); } @@ -7158,12 +7158,12 @@ void ride_update_max_vehicles(sint32 rideIndex) default: // Calculate maximum number of trains trainLength = 0; - for (sint32 i = 0; i < newCarsPerTrain; i++) { + for (int32_t i = 0; i < newCarsPerTrain; i++) { vehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, newCarsPerTrain, i)]; trainLength += vehicleEntry->spacing; } - sint32 totalLength = trainLength / 2; + int32_t totalLength = trainLength / 2; if (newCarsPerTrain != 1) totalLength /= 2; @@ -7180,22 +7180,22 @@ void ride_update_max_vehicles(sint32 rideIndex) maxNumTrains = std::min(maxNumTrains, 31); } else { vehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, newCarsPerTrain, 0)]; - sint32 speed = vehicleEntry->powered_max_speed; + int32_t speed = vehicleEntry->powered_max_speed; - sint32 totalSpacing = 0; - for (sint32 i = 0; i < newCarsPerTrain; i++) { + int32_t totalSpacing = 0; + for (int32_t i = 0; i < newCarsPerTrain; i++) { vehicleEntry = &rideEntry->vehicles[ride_entry_get_vehicle_at_position(ride->subtype, newCarsPerTrain, i)]; totalSpacing += vehicleEntry->spacing; } totalSpacing >>= 13; - sint32 trackLength = ride_get_track_length(ride) / 4; + int32_t trackLength = ride_get_track_length(ride) / 4; if (speed > 10) trackLength = (trackLength * 3) / 4; if (speed > 25) trackLength = (trackLength * 3) / 4; if (speed > 40) trackLength = (trackLength * 3) / 4; maxNumTrains = 0; - sint32 length = 0; + int32_t length = 0; do { maxNumTrains++; length += totalSpacing; @@ -7205,7 +7205,7 @@ void ride_update_max_vehicles(sint32 rideIndex) } ride->max_trains = maxNumTrains; - numCarsPerTrain = std::min(ride->proposed_num_cars_per_train, (uint8)newCarsPerTrain); + numCarsPerTrain = std::min(ride->proposed_num_cars_per_train, (uint8_t)newCarsPerTrain); } else { ride->max_trains = rideEntry->cars_per_flat_ride; ride->min_max_cars_per_train = rideEntry->max_cars_in_train | (rideEntry->min_cars_in_train << 4); @@ -7216,7 +7216,7 @@ void ride_update_max_vehicles(sint32 rideIndex) if (gCheatsDisableTrainLengthLimit) { maxNumTrains = 31; } - numVehicles = std::min(ride->proposed_num_vehicles, (uint8)maxNumTrains); + numVehicles = std::min(ride->proposed_num_vehicles, (uint8_t)maxNumTrains); // Refresh new current num vehicles / num cars per vehicle if (numVehicles != ride->num_vehicles || numCarsPerTrain != ride->num_cars_per_train) { @@ -7226,7 +7226,7 @@ void ride_update_max_vehicles(sint32 rideIndex) } } -void ride_set_ride_entry(sint32 rideIndex, sint32 rideEntry) +void ride_set_ride_entry(int32_t rideIndex, int32_t rideEntry) { gGameCommandErrorTitle = STR_RIDE_SET_VEHICLE_TYPE_FAIL; game_do_command( @@ -7240,7 +7240,7 @@ void ride_set_ride_entry(sint32 rideIndex, sint32 rideEntry) ); } -void ride_set_num_vehicles(sint32 rideIndex, sint32 numVehicles) +void ride_set_num_vehicles(int32_t rideIndex, int32_t numVehicles) { gGameCommandErrorTitle = STR_RIDE_SET_VEHICLE_SET_NUM_TRAINS_FAIL; game_do_command( @@ -7254,7 +7254,7 @@ void ride_set_num_vehicles(sint32 rideIndex, sint32 numVehicles) ); } -void ride_set_num_cars_per_vehicle(sint32 rideIndex, sint32 numCarsPerVehicle) +void ride_set_num_cars_per_vehicle(int32_t rideIndex, int32_t numCarsPerVehicle) { gGameCommandErrorTitle = STR_RIDE_SET_VEHICLE_SET_NUM_CARS_PER_TRAIN_FAIL; game_do_command( @@ -7268,10 +7268,10 @@ void ride_set_num_cars_per_vehicle(sint32 rideIndex, sint32 numCarsPerVehicle) ); } -static bool ride_is_vehicle_type_valid(Ride *ride, uint8 inputRideEntryIndex) +static bool ride_is_vehicle_type_valid(Ride *ride, uint8_t inputRideEntryIndex) { bool selectionShouldBeExpanded; - sint32 rideTypeIterator, rideTypeIteratorMax; + int32_t rideTypeIterator, rideTypeIteratorMax; if (gCheatsShowVehiclesFromOtherTrackTypes && !(ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) || ride->type == RIDE_TYPE_MAZE || ride->type == RIDE_TYPE_MINI_GOLF) @@ -7291,9 +7291,9 @@ static bool ride_is_vehicle_type_valid(Ride *ride, uint8 inputRideEntryIndex) if (rideTypeIterator == RIDE_TYPE_MAZE || rideTypeIterator == RIDE_TYPE_MINI_GOLF) continue; } - uint8 *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideTypeIterator); - for (uint8 *currentRideEntryIndex = rideEntryIndexPtr; *currentRideEntryIndex != RIDE_ENTRY_INDEX_NULL; currentRideEntryIndex++) { - uint8 rideEntryIndex = *currentRideEntryIndex; + uint8_t *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideTypeIterator); + for (uint8_t *currentRideEntryIndex = rideEntryIndexPtr; *currentRideEntryIndex != RIDE_ENTRY_INDEX_NULL; currentRideEntryIndex++) { + uint8_t rideEntryIndex = *currentRideEntryIndex; if (rideEntryIndex == inputRideEntryIndex) { if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) { return false; @@ -7307,7 +7307,7 @@ static bool ride_is_vehicle_type_valid(Ride *ride, uint8 inputRideEntryIndex) return false; } -static money32 ride_set_vehicles(uint8 rideIndex, uint8 setting, uint8 value, uint32 flags, uint8 ex) +static money32 ride_set_vehicles(uint8_t rideIndex, uint8_t setting, uint8_t value, uint32_t flags, uint8_t ex) { rct_ride_entry *rideEntry; @@ -7376,7 +7376,7 @@ static money32 ride_set_vehicles(uint8 rideIndex, uint8 setting, uint8 value, ui ride->subtype = value; rideEntry = get_ride_entry(ride->subtype); - uint8 preset = ex; + uint8_t preset = ex; if (!(flags & GAME_COMMAND_FLAG_NETWORKED)) { preset = ride_get_unused_preset_vehicle_colour(ride->subtype); } @@ -7425,19 +7425,19 @@ static money32 ride_set_vehicles(uint8 rideIndex, uint8 setting, uint8 value, ui * rct2: 0x006B52D4 */ void game_command_set_ride_vehicles( - sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - uint8 rideIndex = *edx & 0xFF; - uint8 setting = (*ebx >> 8) & 0xFF; - uint8 value = (*edx >> 8) & 0xFF; - uint32 flags = *ebx; - uint8 ex = *eax & 0xFF; + uint8_t rideIndex = *edx & 0xFF; + uint8_t setting = (*ebx >> 8) & 0xFF; + uint8_t value = (*edx >> 8) & 0xFF; + uint32_t flags = *ebx; + uint8_t ex = *eax & 0xFF; *ebx = ride_set_vehicles(rideIndex, setting, value, flags, ex); } @@ -7445,20 +7445,20 @@ void game_command_set_ride_vehicles( * * rct2: 0x006CB945 */ -void sub_6CB945(sint32 rideIndex) +void sub_6CB945(int32_t rideIndex) { Ride* ride = get_ride(rideIndex); if (ride->type != RIDE_TYPE_MAZE) { - for (uint8 stationId = 0; stationId < MAX_STATIONS; ++stationId) { + for (uint8_t stationId = 0; stationId < MAX_STATIONS; ++stationId) { if (ride->station_starts[stationId].xy == RCT_XY8_UNDEFINED) continue; LocationXYZ16 location = { - (sint16)(ride->station_starts[stationId].x * 32), - (sint16)(ride->station_starts[stationId].y * 32), + (int16_t)(ride->station_starts[stationId].x * 32), + (int16_t)(ride->station_starts[stationId].y * 32), (ride->station_heights[stationId]) }; - uint8 direction = 0xFF; + uint8_t direction = 0xFF; bool specialTrack = false; rct_tile_element* tileElement = nullptr; @@ -7527,7 +7527,7 @@ void sub_6CB945(sint32 rideIndex) // Needs room for an entrance and an exit per station, plus one position for the list terminator. TileCoordsXYZD locations[(MAX_STATIONS * 2) + 1]; TileCoordsXYZD *locationList = locations; - for (uint8 stationId = 0; stationId < MAX_STATIONS; ++stationId) + for (uint8_t stationId = 0; stationId < MAX_STATIONS; ++stationId) { TileCoordsXYZD entrance = ride_get_entrance_location(rideIndex, stationId); if (!entrance.isNull()) @@ -7584,16 +7584,16 @@ void sub_6CB945(sint32 rideIndex) if (track_element_get_ride_index(trackElement) != rideIndex) continue; if (trackElement->base_height != tileElement->base_height) continue; - uint8 trackType = track_element_get_type(trackElement); - uint8 trackSequence = tile_element_get_track_sequence(trackElement); + uint8_t trackType = track_element_get_type(trackElement); + uint8_t trackSequence = tile_element_get_track_sequence(trackElement); - uint8 direction = (tile_element_get_direction(tileElement) - tile_element_get_direction(trackElement) + 2) & 3; + uint8_t direction = (tile_element_get_direction(tileElement) - tile_element_get_direction(trackElement) + 2) & 3; if (!(TrackSequenceProperties[trackType][trackSequence] & (1 << direction))) { continue; } - uint8 stationId = 0; + uint8_t stationId = 0; if (trackType != TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP) { stationId = tile_element_get_station(trackElement); } @@ -7604,7 +7604,7 @@ void sub_6CB945(sint32 rideIndex) break; ride_set_exit_location(ride, stationId, - { location.x / 32, location.y / 32, ride->station_heights[stationId], (uint8)tile_element_get_direction(tileElement) }); + { location.x / 32, location.y / 32, ride->station_heights[stationId], (uint8_t)tile_element_get_direction(tileElement) }); } else { @@ -7612,7 +7612,7 @@ void sub_6CB945(sint32 rideIndex) break; ride_set_entrance_location(ride, stationId, - { location.x / 32, location.y / 32, ride->station_heights[stationId], (uint8)tile_element_get_direction(tileElement) }); + { location.x / 32, location.y / 32, ride->station_heights[stationId], (uint8_t)tile_element_get_direction(tileElement) }); } tileElement->properties.entrance.index &= 0x8F; @@ -7634,10 +7634,10 @@ void sub_6CB945(sint32 rideIndex) } -void ride_set_to_default_inspection_interval(sint32 rideIndex) +void ride_set_to_default_inspection_interval(int32_t rideIndex) { Ride *ride = get_ride(rideIndex); - uint8 defaultInspectionInterval = gConfigGeneral.default_inspection_interval; + uint8_t defaultInspectionInterval = gConfigGeneral.default_inspection_interval; if (ride->inspection_interval != defaultInspectionInterval) { if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) { gGameCommandErrorTitle = STR_CANT_CHANGE_OPERATING_MODE; @@ -7650,7 +7650,7 @@ void ride_set_to_default_inspection_interval(sint32 rideIndex) * * rct2: 0x006B752C */ -void ride_crash(uint8 rideIndex, uint8 vehicleIndex) +void ride_crash(uint8_t rideIndex, uint8_t vehicleIndex) { Ride *ride = get_ride(rideIndex); rct_vehicle *vehicle = GET_VEHICLE(ride->vehicles[vehicleIndex]); @@ -7668,7 +7668,7 @@ void ride_crash(uint8 rideIndex, uint8 vehicleIndex) } set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); if (gConfigNotifications.ride_crashed) { news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_HAS_CRASHED, rideIndex); } @@ -7676,7 +7676,7 @@ void ride_crash(uint8 rideIndex, uint8 vehicleIndex) void ride_reset_all_names() { - sint32 i; + int32_t i; Ride *ride; char rideNameBuffer[256]; ride_name_args name_args; @@ -7698,14 +7698,14 @@ void ride_reset_all_names() } } -const uint8* ride_seek_available_modes(Ride *ride) +const uint8_t* ride_seek_available_modes(Ride *ride) { - const uint8* availableModes; + const uint8_t* availableModes; if (!gCheatsShowAllOperatingModes) { availableModes = RideAvailableModes; - for (sint32 i = 0; i < ride->type; i++) { + for (int32_t i = 0; i < ride->type; i++) { while (*(availableModes++) != 255) { } } } @@ -7718,16 +7718,16 @@ const uint8* ride_seek_available_modes(Ride *ride) } // Gets the approximate value of customers per hour for this ride. Multiplies ride_customers_in_last_5_minutes() by 12. -uint32 ride_customers_per_hour(const Ride *ride) { +uint32_t ride_customers_per_hour(const Ride *ride) { return ride_customers_in_last_5_minutes(ride) * 12; } // Calculates the number of customers for this ride in the last 5 minutes (or more correctly 9600 game ticks) -uint32 ride_customers_in_last_5_minutes(const Ride *ride) +uint32_t ride_customers_in_last_5_minutes(const Ride *ride) { - uint32 sum = 0; + uint32_t sum = 0; - for (sint32 i = 0; i < CUSTOMER_HISTORY_SIZE; i++) + for (int32_t i = 0; i < CUSTOMER_HISTORY_SIZE; i++) { sum += ride->num_customers[i]; } @@ -7736,14 +7736,14 @@ uint32 ride_customers_in_last_5_minutes(const Ride *ride) } rct_vehicle *ride_get_broken_vehicle(Ride *ride) { - uint16 vehicleIndex = ride->vehicles[ride->broken_vehicle]; + uint16_t vehicleIndex = ride->vehicles[ride->broken_vehicle]; if (vehicleIndex == SPRITE_INDEX_NULL) { return nullptr; } rct_vehicle *vehicle = GET_VEHICLE(vehicleIndex); - for (uint8 i = 0; i < ride->broken_car; i++) { + for (uint8_t i = 0; i < ride->broken_car; i++) { vehicle = GET_VEHICLE(vehicle->next_vehicle_on_train); } @@ -7754,7 +7754,7 @@ rct_vehicle *ride_get_broken_vehicle(Ride *ride) { * * rct2: 0x006D235B */ -void ride_delete(uint8 rideIndex) +void ride_delete(uint8_t rideIndex) { Ride *ride = get_ride(rideIndex); user_string_free(ride->name); @@ -7802,7 +7802,7 @@ money16 ride_get_price(Ride * ride) * Return the tile_element of an adjacent station at x,y,z(+-2). * Returns nullptr if no suitable tile_element is found. */ -rct_tile_element *get_station_platform(sint32 x, sint32 y, sint32 z, sint32 z_tolerance) { +rct_tile_element *get_station_platform(int32_t x, int32_t y, int32_t z, int32_t z_tolerance) { bool foundTileElement = false; rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement != nullptr) { @@ -7833,19 +7833,19 @@ rct_tile_element *get_station_platform(sint32 x, sint32 y, sint32 z, sint32 z_to /** * Check for an adjacent station to x,y,z in direction. */ -static bool check_for_adjacent_station(sint32 x, sint32 y, sint32 z, uint8 direction) +static bool check_for_adjacent_station(int32_t x, int32_t y, int32_t z, uint8_t direction) { bool found = false; - sint32 adjX = x; - sint32 adjY = y; - for (uint32 i = 0; i <= RIDE_ADJACENCY_CHECK_DISTANCE; i++) + int32_t adjX = x; + int32_t adjY = y; + for (uint32_t i = 0; i <= RIDE_ADJACENCY_CHECK_DISTANCE; i++) { adjX += CoordsDirectionDelta[direction].x; adjY += CoordsDirectionDelta[direction].y; rct_tile_element * stationElement = get_station_platform(adjX, adjY, z, 2); if (stationElement != nullptr) { - sint32 rideIndex = track_element_get_ride_index(stationElement); + int32_t rideIndex = track_element_get_ride_index(stationElement); Ride * ride = get_ride(rideIndex); if (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) { @@ -7865,19 +7865,19 @@ bool ride_has_adjacent_station(Ride *ride) /* Loop through all of the ride stations, checking for an * adjacent station on either side. */ - for (sint32 stationNum = 0; stationNum < MAX_STATIONS; stationNum++) { + for (int32_t stationNum = 0; stationNum < MAX_STATIONS; stationNum++) { if (ride->station_starts[stationNum].xy != RCT_XY8_UNDEFINED) { /* Get the map element for the station start. */ - uint16 stationX = ride->station_starts[stationNum].x * 32; - uint16 stationY = ride->station_starts[stationNum].y * 32; - uint8 stationZ = ride->station_heights[stationNum]; + uint16_t stationX = ride->station_starts[stationNum].x * 32; + uint16_t stationY = ride->station_starts[stationNum].y * 32; + uint8_t stationZ = ride->station_heights[stationNum]; rct_tile_element *stationElement = get_station_platform(stationX, stationY, stationZ, 0); if (stationElement == nullptr) { continue; } /* Check the first side of the station */ - sint32 direction = tile_element_get_direction_with_offset(stationElement, 1); + int32_t direction = tile_element_get_direction_with_offset(stationElement, 1); found = check_for_adjacent_station(stationX, stationY, stationZ, direction); if (found) break; /* Check the other side of the station */ @@ -7894,7 +7894,7 @@ bool ride_has_ratings(const Ride * ride) return ride->excitement != RIDE_RATING_UNDEFINED; } -const char * ride_type_get_enum_name(sint32 rideType) +const char * ride_type_get_enum_name(int32_t rideType) { static constexpr const char * RideTypeEnumNames[RIDE_TYPE_COUNT] = { @@ -7998,9 +7998,9 @@ const char * ride_type_get_enum_name(sint32 rideType) * Searches for a non-null ride type in a ride entry. * If none is found, it will still return RIDE_TYPE_NULL. */ -uint8 ride_entry_get_first_non_null_ride_type(const rct_ride_entry * rideEntry) +uint8_t ride_entry_get_first_non_null_ride_type(const rct_ride_entry * rideEntry) { - for (uint8 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) + for (uint8_t i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++) { if (rideEntry->ride_type[i] != RIDE_TYPE_NULL) { @@ -8010,7 +8010,7 @@ uint8 ride_entry_get_first_non_null_ride_type(const rct_ride_entry * rideEntry) return RIDE_TYPE_NULL; } -bool ride_type_supports_boosters(uint8 rideType) +bool ride_type_supports_boosters(uint8_t rideType) { if (rideType == RIDE_TYPE_LOOPING_ROLLER_COASTER || rideType == RIDE_TYPE_CORKSCREW_ROLLER_COASTER || @@ -8024,9 +8024,9 @@ bool ride_type_supports_boosters(uint8 rideType) return false; } -sint32 get_booster_speed(uint8 rideType, sint32 rawSpeed) +int32_t get_booster_speed(uint8_t rideType, int32_t rawSpeed) { - sint8 shiftFactor = RideProperties[rideType].booster_speed_factor; + int8_t shiftFactor = RideProperties[rideType].booster_speed_factor; if (shiftFactor == 0) { return rawSpeed; @@ -8038,7 +8038,7 @@ sint32 get_booster_speed(uint8 rideType, sint32 rawSpeed) else { // Workaround for an issue with older compilers (GCC 6, Clang 4) which would fail the build - sint8 shiftFactorAbs = std::abs(shiftFactor); + int8_t shiftFactorAbs = std::abs(shiftFactor); return (rawSpeed >> shiftFactorAbs); } } @@ -8046,11 +8046,11 @@ sint32 get_booster_speed(uint8 rideType, sint32 rawSpeed) void fix_invalid_vehicle_sprite_sizes() { Ride *ride; - uint16 i; + uint16_t i; FOR_ALL_RIDES(i, ride) { - for (uint16 j = 0; j < MAX_VEHICLES_PER_RIDE; j++) { - uint16 rideSpriteIndex = ride->vehicles[j]; + for (uint16_t j = 0; j < MAX_VEHICLES_PER_RIDE; j++) { + uint16_t rideSpriteIndex = ride->vehicles[j]; while (rideSpriteIndex != SPRITE_INDEX_NULL) { rct_vehicle * vehicle = try_get_vehicle(rideSpriteIndex); if (vehicle == nullptr) { @@ -8080,9 +8080,9 @@ void fix_invalid_vehicle_sprite_sizes() } } -bool ride_entry_has_category(const rct_ride_entry * rideEntry, uint8 category) +bool ride_entry_has_category(const rct_ride_entry * rideEntry, uint8_t category) { - for (sint32 i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) + for (int32_t i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) { if (rideEntry->category[i] == category) { @@ -8093,14 +8093,14 @@ bool ride_entry_has_category(const rct_ride_entry * rideEntry, uint8 category) return false; } -sint32 ride_get_entry_index(sint32 rideType, sint32 rideSubType) +int32_t ride_get_entry_index(int32_t rideType, int32_t rideSubType) { - sint32 subType = rideSubType; + int32_t subType = rideSubType; if (subType == RIDE_ENTRY_INDEX_NULL) { - uint8 *availableRideEntries = get_ride_entry_indices_for_ride_type(rideType); - for (uint8 *rideEntryIndex = availableRideEntries; *rideEntryIndex != RIDE_ENTRY_INDEX_NULL; rideEntryIndex++) + uint8_t *availableRideEntries = get_ride_entry_indices_for_ride_type(rideType); + for (uint8_t *rideEntryIndex = availableRideEntries; *rideEntryIndex != RIDE_ENTRY_INDEX_NULL; rideEntryIndex++) { rct_ride_entry *rideEntry = get_ride_entry(*rideEntryIndex); if (rideEntry == nullptr) @@ -8129,7 +8129,7 @@ sint32 ride_get_entry_index(sint32 rideType, sint32 rideSubType) return subType; } -LocationXY16 ride_get_rotated_coords(sint16 x, sint16 y, sint16 z) +LocationXY16 ride_get_rotated_coords(int16_t x, int16_t y, int16_t z) { LocationXY16 rotatedCoords = { 0, 0 }; @@ -8166,11 +8166,11 @@ void determine_ride_entrance_and_exit_locations() { log_verbose("Inspecting ride entrance / exit locations"); - sint32 rideIndex; + int32_t rideIndex; Ride * ride; FOR_ALL_RIDES(rideIndex, ride) { - for (sint32 stationIndex = 0; stationIndex < MAX_STATIONS; stationIndex++) + for (int32_t stationIndex = 0; stationIndex < MAX_STATIONS; stationIndex++) { TileCoordsXYZD entranceLoc = ride->entrances[stationIndex]; TileCoordsXYZD exitLoc = ride->exits[stationIndex]; @@ -8189,7 +8189,7 @@ void determine_ride_entrance_and_exit_locations() } else { - ride->entrances[stationIndex].direction = (uint8)tile_element_get_direction(tileElement); + ride->entrances[stationIndex].direction = (uint8_t)tile_element_get_direction(tileElement); } } @@ -8203,7 +8203,7 @@ void determine_ride_entrance_and_exit_locations() } else { - ride->exits[stationIndex].direction = (uint8)tile_element_get_direction(tileElement); + ride->exits[stationIndex].direction = (uint8_t)tile_element_get_direction(tileElement); } } @@ -8216,9 +8216,9 @@ void determine_ride_entrance_and_exit_locations() // Search the map to find it. Skip the outer ring of invisible tiles. bool alreadyFoundEntrance = false; bool alreadyFoundExit = false; - for (uint8 x = 1; x < MAXIMUM_MAP_SIZE_TECHNICAL - 1; x++) + for (uint8_t x = 1; x < MAXIMUM_MAP_SIZE_TECHNICAL - 1; x++) { - for (uint8 y = 1; y < MAXIMUM_MAP_SIZE_TECHNICAL - 1; y++) + for (uint8_t y = 1; y < MAXIMUM_MAP_SIZE_TECHNICAL - 1; y++) { tileElement = map_get_first_element_at(x, y); @@ -8240,7 +8240,7 @@ void determine_ride_entrance_and_exit_locations() } // The expected height is where entrances and exit reside in non-hacked parks. - const uint8 expectedHeight = ride->station_heights[stationIndex]; + const uint8_t expectedHeight = ride->station_heights[stationIndex]; if (fixEntrance && tileElement->properties.entrance.type == ENTRANCE_TYPE_RIDE_ENTRANCE) { @@ -8253,7 +8253,7 @@ void determine_ride_entrance_and_exit_locations() } // Found our entrance - ride_set_entrance_location(ride, stationIndex, { x, y, tileElement->base_height, (uint8)tile_element_get_direction(tileElement) }); + ride_set_entrance_location(ride, stationIndex, { x, y, tileElement->base_height, (uint8_t)tile_element_get_direction(tileElement) }); alreadyFoundEntrance = true; log_verbose("Fixed disconnected entrance of ride %d, station %d to x = %d, y = %d and z = %d.", rideIndex, stationIndex, x, y, tileElement->base_height); @@ -8269,7 +8269,7 @@ void determine_ride_entrance_and_exit_locations() } // Found our exit - ride_set_exit_location(ride, stationIndex, { x, y, tileElement->base_height, (uint8)tile_element_get_direction(tileElement) }); + ride_set_exit_location(ride, stationIndex, { x, y, tileElement->base_height, (uint8_t)tile_element_get_direction(tileElement) }); alreadyFoundExit = true; log_verbose("Fixed disconnected exit of ride %d, station %d to x = %d, y = %d and z = %d.", rideIndex, stationIndex, x, y, tileElement->base_height); diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index cf08d11a7e..7cef1c5610 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -45,36 +45,36 @@ interface IObjectManager; struct ride_list_item { union { struct { - uint8 type; - uint8 entry_index; + uint8_t type; + uint8_t entry_index; }; - uint16 ride_type_and_entry; + uint16_t ride_type_and_entry; }; }; assert_struct_size(ride_list_item, 2); struct track_colour { - uint8 main; - uint8 additional; - uint8 supports; + uint8_t main; + uint8_t additional; + uint8_t supports; }; assert_struct_size(track_colour, 3); struct vehicle_colour { - uint8 main; - uint8 additional_1; - uint8 additional_2; + uint8_t main; + uint8_t additional_1; + uint8_t additional_2; }; assert_struct_size(vehicle_colour, 3); struct track_colour_preset_list { - uint8 count; + uint8_t count; track_colour list[256]; }; assert_struct_size(track_colour_preset_list, (1 + 256 * 3)); struct vehicle_colour_preset_list { - uint8 count; + uint8_t count; vehicle_colour list[256]; }; assert_struct_size(vehicle_colour_preset_list, (1 + 256 * 3)); @@ -91,35 +91,35 @@ assert_struct_size(rct_ride_name, 4); */ struct rct_ride_entry { rct_ride_name naming; - uint32 images_offset; // 0x004. The first three images are previews. They correspond to the ride_type[] array. - uint32 flags; // 0x008 - uint8 ride_type[RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY];// 0x00C - uint8 min_cars_in_train; // 0x00F - uint8 max_cars_in_train; // 0x010 - uint8 cars_per_flat_ride; // 0x011 + uint32_t images_offset; // 0x004. The first three images are previews. They correspond to the ride_type[] array. + uint32_t flags; // 0x008 + uint8_t ride_type[RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY];// 0x00C + uint8_t min_cars_in_train; // 0x00F + uint8_t max_cars_in_train; // 0x010 + uint8_t cars_per_flat_ride; // 0x011 // Number of cars that can't hold passengers - uint8 zero_cars; // 0x012 + uint8_t zero_cars; // 0x012 // The index to the vehicle type displayed in // the vehicle tab. - uint8 tab_vehicle; // 0x013 - uint8 default_vehicle; // 0x014 + uint8_t tab_vehicle; // 0x013 + uint8_t default_vehicle; // 0x014 // Convert from first - fourth vehicle to // vehicle structure - uint8 front_vehicle; // 0x015 - uint8 second_vehicle; // 0x016 - uint8 rear_vehicle; // 0x017 - uint8 third_vehicle; // 0x018 - uint8 pad_019; // 0x019 + uint8_t front_vehicle; // 0x015 + uint8_t second_vehicle; // 0x016 + uint8_t rear_vehicle; // 0x017 + uint8_t third_vehicle; // 0x018 + uint8_t pad_019; // 0x019 rct_ride_entry_vehicle vehicles[RCT2_MAX_VEHICLES_PER_RIDE_ENTRY]; // 0x01A vehicle_colour_preset_list *vehicle_preset_list; // 0x1AE - sint8 excitement_multiplier; // 0x1B2 - sint8 intensity_multiplier; // 0x1B3 - sint8 nausea_multiplier; // 0x1B4 - uint8 max_height; // 0x1B5 - uint64 enabledTrackPieces; // 0x1B6 - uint8 category[RCT2_MAX_CATEGORIES_PER_RIDE]; // 0x1BE - uint8 shop_item; // 0x1C0 - uint8 shop_item_secondary; // 0x1C1 + int8_t excitement_multiplier; // 0x1B2 + int8_t intensity_multiplier; // 0x1B3 + int8_t nausea_multiplier; // 0x1B4 + uint8_t max_height; // 0x1B5 + uint64_t enabledTrackPieces; // 0x1B6 + uint8_t category[RCT2_MAX_CATEGORIES_PER_RIDE]; // 0x1BE + uint8_t shop_item; // 0x1C0 + uint8_t shop_item_secondary; // 0x1C1 rct_string_id capacity; void * obj; }; @@ -134,109 +134,109 @@ struct rct_ride_entry { */ struct Ride { - uint8 type; + uint8_t type; // pointer to static info. for example, wild mouse type is 0x36, subtype is // 0x4c. - uint8 subtype; - uint8 mode; - uint8 colour_scheme_type; + uint8_t subtype; + uint8_t mode; + uint8_t colour_scheme_type; rct_vehicle_colour vehicle_colours[MAX_CARS_PER_TRAIN]; // 0 = closed, 1 = open, 2 = test - uint8 status; + uint8_t status; rct_string_id name; union { - uint32 name_arguments; + uint32_t name_arguments; struct { rct_string_id name_arguments_type_name; - uint16 name_arguments_number; + uint16_t name_arguments_number; }; }; LocationXY8 overall_view; LocationXY8 station_starts[MAX_STATIONS]; - uint8 station_heights[MAX_STATIONS]; - uint8 station_length[MAX_STATIONS]; - uint8 station_depart[MAX_STATIONS]; + uint8_t station_heights[MAX_STATIONS]; + uint8_t station_length[MAX_STATIONS]; + uint8_t station_depart[MAX_STATIONS]; // ride->vehicle index for current train waiting for passengers // at station - uint8 train_at_station[MAX_STATIONS]; + uint8_t train_at_station[MAX_STATIONS]; TileCoordsXYZD entrances[MAX_STATIONS]; TileCoordsXYZD exits[MAX_STATIONS]; - uint16 last_peep_in_queue[MAX_STATIONS]; - uint16 vehicles[MAX_VEHICLES_PER_RIDE]; // Points to the first car in the train - uint8 depart_flags; - uint8 num_stations; - uint8 num_vehicles; - uint8 num_cars_per_train; - uint8 proposed_num_vehicles; - uint8 proposed_num_cars_per_train; - uint8 max_trains; - uint8 min_max_cars_per_train; - uint8 min_waiting_time; - uint8 max_waiting_time; + uint16_t last_peep_in_queue[MAX_STATIONS]; + uint16_t vehicles[MAX_VEHICLES_PER_RIDE]; // Points to the first car in the train + uint8_t depart_flags; + uint8_t num_stations; + uint8_t num_vehicles; + uint8_t num_cars_per_train; + uint8_t proposed_num_vehicles; + uint8_t proposed_num_cars_per_train; + uint8_t max_trains; + uint8_t min_max_cars_per_train; + uint8_t min_waiting_time; + uint8_t max_waiting_time; union { - uint8 operation_option; - uint8 time_limit; - uint8 num_laps; - uint8 launch_speed; - uint8 speed; - uint8 rotations; + uint8_t operation_option; + uint8_t time_limit; + uint8_t num_laps; + uint8_t launch_speed; + uint8_t speed; + uint8_t rotations; }; - uint8 boat_hire_return_direction; + uint8_t boat_hire_return_direction; LocationXY8 boat_hire_return_position; - uint8 measurement_index; + uint8_t measurement_index; // bits 0 through 4 are the number of helix sections // bit 5: spinning tunnel, water splash, or rapids // bit 6: log reverser, waterfall // bit 7: whirlpool - uint8 special_track_elements; + uint8_t special_track_elements; // Divide this value by 29127 to get the human-readable max speed // (in RCT2, display_speed = (max_speed * 9) >> 18) - sint32 max_speed; - sint32 average_speed; - uint8 current_test_segment; - uint8 average_speed_test_timeout; - sint32 length[MAX_STATIONS]; - uint16 time[MAX_STATIONS]; + int32_t max_speed; + int32_t average_speed; + uint8_t current_test_segment; + uint8_t average_speed_test_timeout; + int32_t length[MAX_STATIONS]; + uint16_t time[MAX_STATIONS]; fixed16_2dp max_positive_vertical_g; fixed16_2dp max_negative_vertical_g; fixed16_2dp max_lateral_g; fixed16_2dp previous_vertical_g; fixed16_2dp previous_lateral_g; - uint32 testing_flags; + uint32_t testing_flags; // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times LocationXY8 cur_test_track_location; // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16 turn_count_default; // X = current turn count - uint16 turn_count_banked; - uint16 turn_count_sloped; // X = number turns > 3 elements + uint16_t turn_count_default; // X = current turn count + uint16_t turn_count_banked; + uint16_t turn_count_sloped; // X = number turns > 3 elements union { - uint8 inversions; // (???X XXXX) - uint8 holes; // (???X XXXX) + uint8_t inversions; // (???X XXXX) + uint8_t holes; // (???X XXXX) // This is a very rough approximation of how much of the ride is undercover. // It reaches the maximum value of 7 at about 50% undercover and doesn't increase beyond that. - uint8 sheltered_eighths; // (XXX?-????) + uint8_t sheltered_eighths; // (XXX?-????) }; // Y is number of powered lifts, X is drops - uint8 drops; // (YYXX XXXX) - uint8 start_drop_height; - uint8 highest_drop_height; - sint32 sheltered_length; + uint8_t drops; // (YYXX XXXX) + uint8_t start_drop_height; + uint8_t highest_drop_height; + int32_t sheltered_length; // Unused always 0? Should affect nausea - uint16 var_11C; - uint8 num_sheltered_sections; // (?abY YYYY) + uint16_t var_11C; + uint8_t num_sheltered_sections; // (?abY YYYY) // see cur_test_track_location - uint8 cur_test_track_z; + uint8_t cur_test_track_z; // Customer counter in the current 960 game tick (about 30 seconds) interval - uint16 cur_num_customers; + uint16_t cur_num_customers; // Counts ticks to update customer intervals, resets each 960 game ticks. - uint16 num_customers_timeout; + uint16_t num_customers_timeout; // Customer count in the last 10 * 960 game ticks (sliding window) - uint16 num_customers[CUSTOMER_HISTORY_SIZE]; + uint16_t num_customers[CUSTOMER_HISTORY_SIZE]; money16 price; LocationXY8 chairlift_bullwheel_location[2]; - uint8 chairlift_bullwheel_z[2]; + uint8_t chairlift_bullwheel_z[2]; union { rating_tuple ratings; struct { @@ -245,86 +245,86 @@ struct Ride ride_rating nausea; }; }; - uint16 value; - uint16 chairlift_bullwheel_rotation; - uint8 satisfaction; - uint8 satisfaction_time_out; - uint8 satisfaction_next; + uint16_t value; + uint16_t chairlift_bullwheel_rotation; + uint8_t satisfaction; + uint8_t satisfaction_time_out; + uint8_t satisfaction_next; // Various flags stating whether a window needs to be refreshed - uint8 window_invalidate_flags; - uint32 total_customers; + uint8_t window_invalidate_flags; + uint32_t total_customers; money32 total_profit; - uint8 popularity; - uint8 popularity_time_out; // Updated every purchase and ?possibly by time? - uint8 popularity_next; // When timeout reached this will be the next popularity - uint16 num_riders; - uint8 music_tune_id; - uint8 slide_in_use; + uint8_t popularity; + uint8_t popularity_time_out; // Updated every purchase and ?possibly by time? + uint8_t popularity_next; // When timeout reached this will be the next popularity + uint16_t num_riders; + uint8_t music_tune_id; + uint8_t slide_in_use; union { - uint16 slide_peep; - uint16 maze_tiles; + uint16_t slide_peep; + uint16_t maze_tiles; }; - uint8 slide_peep_t_shirt_colour; - uint8 spiral_slide_progress; - sint16 build_date; + uint8_t slide_peep_t_shirt_colour; + uint8_t spiral_slide_progress; + int16_t build_date; money16 upkeep_cost; - uint16 race_winner; - uint32 music_position; - uint8 breakdown_reason_pending; - uint8 mechanic_status; - uint16 mechanic; - uint8 inspection_station; - uint8 broken_vehicle; - uint8 broken_car; - uint8 breakdown_reason; + uint16_t race_winner; + uint32_t music_position; + uint8_t breakdown_reason_pending; + uint8_t mechanic_status; + uint16_t mechanic; + uint8_t inspection_station; + uint8_t broken_vehicle; + uint8_t broken_car; + uint8_t breakdown_reason; money16 price_secondary; union { struct { - uint8 reliability_subvalue; // 0 - 255, acts like the decimals for reliability_percentage - uint8 reliability_percentage; // Starts at 100 and decreases from there. + uint8_t reliability_subvalue; // 0 - 255, acts like the decimals for reliability_percentage + uint8_t reliability_percentage; // Starts at 100 and decreases from there. }; - uint16 reliability; + uint16_t reliability; }; // Small constant used to increase the unreliability as the game continues, // making breakdowns more and more likely. - uint8 unreliability_factor; + uint8_t unreliability_factor; // Range from [0, 100] - uint8 downtime; - uint8 inspection_interval; - uint8 last_inspection; - uint8 downtime_history[DOWNTIME_HISTORY_SIZE]; - uint32 no_primary_items_sold; - uint32 no_secondary_items_sold; - uint8 breakdown_sound_modifier; + uint8_t downtime; + uint8_t inspection_interval; + uint8_t last_inspection; + uint8_t downtime_history[DOWNTIME_HISTORY_SIZE]; + uint32_t no_primary_items_sold; + uint32_t no_secondary_items_sold; + uint8_t breakdown_sound_modifier; // Used to oscillate the sound when ride breaks down. // 0 = no change, 255 = max change - uint8 not_fixed_timeout; - uint8 last_crash_type; - uint8 connected_message_throttle; + uint8_t not_fixed_timeout; + uint8_t last_crash_type; + uint8_t connected_message_throttle; money32 income_per_hour; money32 profit; - uint8 queue_time[MAX_STATIONS]; - uint8 track_colour_main[NUM_COLOUR_SCHEMES]; - uint8 track_colour_additional[NUM_COLOUR_SCHEMES]; - uint8 track_colour_supports[NUM_COLOUR_SCHEMES]; - uint8 music; - uint8 entrance_style; - uint16 vehicle_change_timeout; - uint8 num_block_brakes; - uint8 lift_hill_speed; - uint16 guests_favourite; - uint32 lifecycle_flags; - uint8 vehicle_colours_extended[MAX_CARS_PER_TRAIN]; - uint16 total_air_time; - uint8 current_test_station; - uint8 num_circuits; - sint16 cable_lift_x; - sint16 cable_lift_y; - uint8 cable_lift_z; - uint16 cable_lift; - uint16 queue_length[MAX_STATIONS]; + uint8_t queue_time[MAX_STATIONS]; + uint8_t track_colour_main[NUM_COLOUR_SCHEMES]; + uint8_t track_colour_additional[NUM_COLOUR_SCHEMES]; + uint8_t track_colour_supports[NUM_COLOUR_SCHEMES]; + uint8_t music; + uint8_t entrance_style; + uint16_t vehicle_change_timeout; + uint8_t num_block_brakes; + uint8_t lift_hill_speed; + uint16_t guests_favourite; + uint32_t lifecycle_flags; + uint8_t vehicle_colours_extended[MAX_CARS_PER_TRAIN]; + uint16_t total_air_time; + uint8_t current_test_station; + uint8_t num_circuits; + int16_t cable_lift_x; + int16_t cable_lift_y; + uint8_t cable_lift_z; + uint16_t cable_lift; + uint16_t queue_length[MAX_STATIONS]; }; #pragma pack(push, 1) @@ -334,29 +334,29 @@ struct Ride * size: 0x04B0C */ struct rct_ride_measurement { - uint8 ride_index; // 0x0000 - uint8 flags; // 0x0001 - uint32 last_use_tick; // 0x0002 - uint16 num_items; // 0x0006 - uint16 current_item; // 0x0008 - uint8 vehicle_index; // 0x000A - uint8 current_station; // 0x000B - sint8 vertical[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x000C - sint8 lateral[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x12CC - uint8 velocity[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x258C - uint8 altitude[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x384C + uint8_t ride_index; // 0x0000 + uint8_t flags; // 0x0001 + uint32_t last_use_tick; // 0x0002 + uint16_t num_items; // 0x0006 + uint16_t current_item; // 0x0008 + uint8_t vehicle_index; // 0x000A + uint8_t current_station; // 0x000B + int8_t vertical[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x000C + int8_t lateral[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x12CC + uint8_t velocity[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x258C + uint8_t altitude[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x384C }; assert_struct_size(rct_ride_measurement, 0x4b0c); struct track_begin_end { - sint32 begin_x; - sint32 begin_y; - sint32 begin_z; - sint32 begin_direction; + int32_t begin_x; + int32_t begin_y; + int32_t begin_z; + int32_t begin_direction; rct_tile_element *begin_element; - sint32 end_x; - sint32 end_y; - sint32 end_direction; + int32_t end_x; + int32_t end_y; + int32_t end_direction; rct_tile_element *end_element; }; #ifdef PLATFORM_32BIT @@ -364,8 +364,8 @@ assert_struct_size(track_begin_end, 36); #endif struct ride_name_args { - uint16 type_name; - uint16 number; + uint16_t type_name; + uint16_t number; }; assert_struct_size(ride_name_args, 4); @@ -378,7 +378,7 @@ assert_struct_size(ride_name_args, 4); * some padding at the end as well. */ #define TYPE_TO_RIDE_ENTRY_SLOTS 492 -extern uint8 gTypeToRideEntryIndexMap[TYPE_TO_RIDE_ENTRY_SLOTS]; +extern uint8_t gTypeToRideEntryIndexMap[TYPE_TO_RIDE_ENTRY_SLOTS]; enum { RIDE_CLASS_RIDE, @@ -747,7 +747,7 @@ enum { RIDE_ELEMENT_WHIRLPOOL = 1 << 7 }; -enum ride_type_flags : uint32 +enum ride_type_flags : uint32_t { RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN = 1 << 0, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_ADDITIONAL = 1 << 1, @@ -783,7 +783,7 @@ enum ride_type_flags : uint32 RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR = 1u << 31, }; // Hack for MSVC which thinks RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR = 1u << 31 is signed and generates narrowing conversion warnings -constexpr inline uint32 operator | (ride_type_flags a, ride_type_flags b) { return static_cast(static_cast(a) | static_cast(b)); } +constexpr inline uint32_t operator | (ride_type_flags a, ride_type_flags b) { return static_cast(static_cast(a) | static_cast(b)); } enum { RIDE_CRASH_TYPE_NONE = 0, @@ -843,13 +843,13 @@ enum { }; struct rct_ride_properties { - uint32 flags; - uint8 min_value; - uint8 max_value; - uint8 max_brakes_speed; - uint8 powered_lift_acceleration; - uint8 booster_acceleration; - sint8 booster_speed_factor; // The factor to shift the raw booster speed with + uint32_t flags; + uint8_t min_value; + uint8_t max_value; + uint8_t max_brakes_speed; + uint8_t powered_lift_acceleration; + uint8_t booster_acceleration; + int8_t booster_speed_factor; // The factor to shift the raw booster speed with }; #define RIDE_MODE_COUNT 37 @@ -872,10 +872,10 @@ struct rct_ride_properties { extern const rct_ride_properties RideProperties[RIDE_TYPE_COUNT]; /** Helper macros until rides are stored in this module. */ -Ride * get_ride(sint32 index); -rct_ride_entry * get_ride_entry(sint32 index); -void get_ride_entry_name(char * name, sint32 index); -rct_ride_measurement * get_ride_measurement(sint32 index); +Ride * get_ride(int32_t index); +rct_ride_entry * get_ride_entry(int32_t index); +void get_ride_entry_name(char * name, int32_t index); +rct_ride_measurement * get_ride_measurement(int32_t index); /** * Helper macro loop for enumerating through all the non null rides. @@ -886,157 +886,157 @@ rct_ride_measurement * get_ride_measurement(sint32 index); extern money16 gTotalRideValueForMoney; -extern const uint8 gRideClassifications[MAX_RIDES]; +extern const uint8_t gRideClassifications[MAX_RIDES]; extern Ride gRideList[MAX_RIDES]; extern rct_ride_measurement gRideMeasurements[MAX_RIDE_MEASUREMENTS]; -extern uint16 gRideCount; +extern uint16_t gRideCount; extern money32 _currentTrackPrice; -extern uint16 _numCurrentPossibleRideConfigurations; -extern uint16 _numCurrentPossibleSpecialTrackPieces; +extern uint16_t _numCurrentPossibleRideConfigurations; +extern uint16_t _numCurrentPossibleSpecialTrackPieces; -extern uint16 _currentTrackCurve; -extern uint16 _currentTrackEndX; -extern uint16 _currentTrackEndY; -extern uint8 _rideConstructionState; -extern uint8 _currentRideIndex; -extern uint16 _currentTrackBeginX; -extern uint16 _currentTrackBeginY; -extern uint16 _currentTrackBeginZ; -extern uint8 _currentTrackPieceDirection; -extern uint8 _currentTrackPieceType; -extern uint8 _currentTrackSelectionFlags; -extern sint8 _rideConstructionArrowPulseTime; -extern uint8 _currentTrackSlopeEnd; -extern uint8 _currentTrackBankEnd; -extern uint8 _currentTrackLiftHill; -extern uint8 _currentTrackAlternative; -extern uint8 _selectedTrackType; +extern uint16_t _currentTrackCurve; +extern uint16_t _currentTrackEndX; +extern uint16_t _currentTrackEndY; +extern uint8_t _rideConstructionState; +extern uint8_t _currentRideIndex; +extern uint16_t _currentTrackBeginX; +extern uint16_t _currentTrackBeginY; +extern uint16_t _currentTrackBeginZ; +extern uint8_t _currentTrackPieceDirection; +extern uint8_t _currentTrackPieceType; +extern uint8_t _currentTrackSelectionFlags; +extern int8_t _rideConstructionArrowPulseTime; +extern uint8_t _currentTrackSlopeEnd; +extern uint8_t _currentTrackBankEnd; +extern uint8_t _currentTrackLiftHill; +extern uint8_t _currentTrackAlternative; +extern uint8_t _selectedTrackType; -extern uint8 _previousTrackBankEnd; -extern uint8 _previousTrackSlopeEnd; +extern uint8_t _previousTrackBankEnd; +extern uint8_t _previousTrackSlopeEnd; -extern uint16 _previousTrackPieceX; -extern uint16 _previousTrackPieceY; -extern uint16 _previousTrackPieceZ; +extern uint16_t _previousTrackPieceX; +extern uint16_t _previousTrackPieceY; +extern uint16_t _previousTrackPieceZ; -extern uint8 _currentBrakeSpeed2; -extern uint8 _currentSeatRotationAngle; +extern uint8_t _currentBrakeSpeed2; +extern uint8_t _currentSeatRotationAngle; extern LocationXYZ16 _unkF44188; extern CoordsXYZD _unkF440C5; -extern uint8 gRideEntranceExitPlaceType; -extern uint8 gRideEntranceExitPlaceRideIndex; -extern uint8 gRideEntranceExitPlaceStationIndex; -extern uint8 gRideEntranceExitPlacePreviousRideConstructionState; -extern uint8 gRideEntranceExitPlaceDirection; +extern uint8_t gRideEntranceExitPlaceType; +extern uint8_t gRideEntranceExitPlaceRideIndex; +extern uint8_t gRideEntranceExitPlaceStationIndex; +extern uint8_t gRideEntranceExitPlacePreviousRideConstructionState; +extern uint8_t gRideEntranceExitPlaceDirection; extern bool gGotoStartPlacementMode; -extern sint32 gRideRemoveTrackPieceCallbackX; -extern sint32 gRideRemoveTrackPieceCallbackY; -extern sint32 gRideRemoveTrackPieceCallbackZ; -extern sint32 gRideRemoveTrackPieceCallbackDirection; -extern sint32 gRideRemoveTrackPieceCallbackType; +extern int32_t gRideRemoveTrackPieceCallbackX; +extern int32_t gRideRemoveTrackPieceCallbackY; +extern int32_t gRideRemoveTrackPieceCallbackZ; +extern int32_t gRideRemoveTrackPieceCallbackDirection; +extern int32_t gRideRemoveTrackPieceCallbackType; -extern uint8 gLastEntranceStyle; +extern uint8_t gLastEntranceStyle; -sint32 ride_get_empty_slot(); -sint32 ride_get_default_mode(Ride *ride); -sint32 ride_get_count(); -sint32 ride_get_total_queue_length(Ride *ride); -sint32 ride_get_max_queue_time(Ride *ride); -rct_peep * ride_get_queue_head_guest(Ride * ride, sint32 stationIndex); -void ride_queue_insert_guest_at_front(Ride * ride, sint32 stationIndex, rct_peep * peep); +int32_t ride_get_empty_slot(); +int32_t ride_get_default_mode(Ride *ride); +int32_t ride_get_count(); +int32_t ride_get_total_queue_length(Ride *ride); +int32_t ride_get_max_queue_time(Ride *ride); +rct_peep * ride_get_queue_head_guest(Ride * ride, int32_t stationIndex); +void ride_queue_insert_guest_at_front(Ride * ride, int32_t stationIndex, rct_peep * peep); void ride_init_all(); void reset_all_ride_build_dates(); void ride_update_favourited_stat(); void ride_update_all(); void ride_check_all_reachable(); -void ride_update_satisfaction(Ride* ride, uint8 happiness); -void ride_update_popularity(Ride* ride, uint8 pop_amount); -bool ride_try_get_origin_element(sint32 rideIndex, CoordsXYE *output); -sint32 ride_find_track_gap(CoordsXYE *input, CoordsXYE *output); +void ride_update_satisfaction(Ride* ride, uint8_t happiness); +void ride_update_popularity(Ride* ride, uint8_t pop_amount); +bool ride_try_get_origin_element(int32_t rideIndex, CoordsXYE *output); +int32_t ride_find_track_gap(CoordsXYE *input, CoordsXYE *output); void ride_construct_new(ride_list_item listItem); -void ride_construct(sint32 rideIndex); -sint32 ride_modify(CoordsXYE *input); -void ride_remove_peeps(sint32 rideIndex); -void ride_clear_blocked_tiles(sint32 rideIndex); -void ride_get_status(sint32 rideIndex, rct_string_id *formatSecondary, sint32 *argument); +void ride_construct(int32_t rideIndex); +int32_t ride_modify(CoordsXYE *input); +void ride_remove_peeps(int32_t rideIndex); +void ride_clear_blocked_tiles(int32_t rideIndex); +void ride_get_status(int32_t rideIndex, rct_string_id *formatSecondary, int32_t *argument); rct_peep *ride_get_assigned_mechanic(Ride *ride); -sint32 ride_get_total_length(Ride *ride); -sint32 ride_get_total_time(Ride *ride); -sint32 ride_can_have_multiple_circuits(Ride *ride); -track_colour ride_get_track_colour(Ride *ride, sint32 colourScheme); -vehicle_colour ride_get_vehicle_colour(Ride *ride, sint32 vehicleIndex); -sint32 ride_get_unused_preset_vehicle_colour(uint8 ride_sub_type); -void ride_set_vehicle_colours_to_random_preset(Ride *ride, uint8 preset_index); +int32_t ride_get_total_length(Ride *ride); +int32_t ride_get_total_time(Ride *ride); +int32_t ride_can_have_multiple_circuits(Ride *ride); +track_colour ride_get_track_colour(Ride *ride, int32_t colourScheme); +vehicle_colour ride_get_vehicle_colour(Ride *ride, int32_t vehicleIndex); +int32_t ride_get_unused_preset_vehicle_colour(uint8_t ride_sub_type); +void ride_set_vehicle_colours_to_random_preset(Ride *ride, uint8_t preset_index); rct_ride_entry *get_ride_entry_by_ride(Ride *ride); -uint8 *get_ride_entry_indices_for_ride_type(uint8 rideType); +uint8_t *get_ride_entry_indices_for_ride_type(uint8_t rideType); void reset_type_to_ride_entry_index_map(IObjectManager& objectManager); void ride_measurement_clear(Ride *ride); void ride_measurements_update(); -rct_ride_measurement *ride_get_measurement(sint32 rideIndex, rct_string_id *message); -void ride_breakdown_add_news_item(sint32 rideIndex); -rct_peep *ride_find_closest_mechanic(Ride *ride, sint32 forInspection); -sint32 ride_is_valid_for_open(sint32 rideIndex, sint32 goingToBeOpen, sint32 isApplying); -sint32 ride_is_valid_for_test(sint32 rideIndex, sint32 goingToBeOpen, sint32 isApplying); -sint32 ride_initialise_construction_window(sint32 rideIndex); +rct_ride_measurement *ride_get_measurement(int32_t rideIndex, rct_string_id *message); +void ride_breakdown_add_news_item(int32_t rideIndex); +rct_peep *ride_find_closest_mechanic(Ride *ride, int32_t forInspection); +int32_t ride_is_valid_for_open(int32_t rideIndex, int32_t goingToBeOpen, int32_t isApplying); +int32_t ride_is_valid_for_test(int32_t rideIndex, int32_t goingToBeOpen, int32_t isApplying); +int32_t ride_initialise_construction_window(int32_t rideIndex); void ride_construction_invalidate_current_track(); -sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type, uint16 extra_params, rct_tile_element** output_element, uint16 flags); +int32_t sub_6C683D(int32_t* x, int32_t* y, int32_t* z, int32_t direction, int32_t type, uint16_t extra_params, rct_tile_element** output_element, uint16_t flags); void ride_set_map_tooltip(rct_tile_element *tileElement); -sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint16 sampleRate, uint32 position, uint8 *tuneId); +int32_t ride_music_params_update(int16_t x, int16_t y, int16_t z, uint8_t rideIndex, uint16_t sampleRate, uint32_t position, uint8_t *tuneId); void ride_music_update_final(); -void ride_prepare_breakdown(sint32 rideIndex, sint32 breakdownReason); -rct_tile_element *ride_get_station_start_track_element(Ride *ride, sint32 stationIndex); -rct_tile_element *ride_get_station_exit_element(sint32 x, sint32 y, sint32 z); -void ride_set_status(sint32 rideIndex, sint32 status); -void game_command_set_ride_status(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void ride_set_name(sint32 rideIndex, const char *name); -void game_command_set_ride_name(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_set_ride_setting(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -sint32 ride_get_refund_price(sint32 ride_id); -sint32 ride_get_random_colour_preset_index(uint8 ride_type); -void ride_set_colour_preset(Ride *ride, uint8 index); +void ride_prepare_breakdown(int32_t rideIndex, int32_t breakdownReason); +rct_tile_element *ride_get_station_start_track_element(Ride *ride, int32_t stationIndex); +rct_tile_element *ride_get_station_exit_element(int32_t x, int32_t y, int32_t z); +void ride_set_status(int32_t rideIndex, int32_t status); +void game_command_set_ride_status(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void ride_set_name(int32_t rideIndex, const char *name); +void game_command_set_ride_name(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_set_ride_setting(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +int32_t ride_get_refund_price(int32_t ride_id); +int32_t ride_get_random_colour_preset_index(uint8_t ride_type); +void ride_set_colour_preset(Ride *ride, uint8_t index); money32 ride_get_common_price(Ride *forRide); -rct_ride_name get_ride_naming(const uint8 rideType, rct_ride_entry * rideEntry); -void game_command_create_ride(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_callback_ride_construct_new(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); -void game_command_callback_ride_construct_placed_front(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); -void game_command_callback_ride_construct_placed_back(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); -void game_command_callback_ride_remove_track_piece(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); -void game_command_demolish_ride(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_set_ride_appearance(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_set_ride_price(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -money32 ride_create_command(sint32 type, sint32 subType, sint32 flags, uint8 *outRideIndex, uint8 *outRideColour); +rct_ride_name get_ride_naming(const uint8_t rideType, rct_ride_entry * rideEntry); +void game_command_create_ride(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_callback_ride_construct_new(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +void game_command_callback_ride_construct_placed_front(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +void game_command_callback_ride_construct_placed_back(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +void game_command_callback_ride_remove_track_piece(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); +void game_command_demolish_ride(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_set_ride_appearance(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_set_ride_price(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +money32 ride_create_command(int32_t type, int32_t subType, int32_t flags, uint8_t *outRideIndex, uint8_t *outRideColour); void ride_set_name_to_default(Ride * ride, rct_ride_entry * rideEntry); void ride_set_name_to_track_default(Ride *ride, rct_ride_entry * rideEntry); -void ride_clear_for_construction(sint32 rideIndex); +void ride_clear_for_construction(int32_t rideIndex); void ride_entrance_exit_place_provisional_ghost(); void ride_entrance_exit_remove_ghost(); void ride_restore_provisional_track_piece(); void ride_remove_provisional_track_piece(); -void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, sint32 num_images); -void invalidate_test_results(sint32 rideIndex); +void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, int32_t num_images); +void invalidate_test_results(int32_t rideIndex); void ride_select_next_section(); void ride_select_previous_section(); -void increment_turn_count_1_element(Ride* ride, uint8 type); -void increment_turn_count_2_elements(Ride* ride, uint8 type); -void increment_turn_count_3_elements(Ride* ride, uint8 type); -void increment_turn_count_4_plus_elements(Ride* ride, uint8 type); -sint32 get_turn_count_1_element(Ride* ride, uint8 type); -sint32 get_turn_count_2_elements(Ride* ride, uint8 type); -sint32 get_turn_count_3_elements(Ride* ride, uint8 type); -sint32 get_turn_count_4_plus_elements(Ride* ride, uint8 type); +void increment_turn_count_1_element(Ride* ride, uint8_t type); +void increment_turn_count_2_elements(Ride* ride, uint8_t type); +void increment_turn_count_3_elements(Ride* ride, uint8_t type); +void increment_turn_count_4_plus_elements(Ride* ride, uint8_t type); +int32_t get_turn_count_1_element(Ride* ride, uint8_t type); +int32_t get_turn_count_2_elements(Ride* ride, uint8_t type); +int32_t get_turn_count_3_elements(Ride* ride, uint8_t type); +int32_t get_turn_count_4_plus_elements(Ride* ride, uint8_t type); -uint8 ride_get_helix_sections(Ride *ride); +uint8_t ride_get_helix_sections(Ride *ride); bool ride_has_spinning_tunnel(Ride *ride); bool ride_has_water_splash(Ride *ride); bool ride_has_rapids(Ride *ride); @@ -1044,91 +1044,91 @@ bool ride_has_log_reverser(Ride *ride); bool ride_has_waterfall(Ride *ride); bool ride_has_whirlpool(Ride *ride); -bool ride_type_has_flag(sint32 rideType, sint32 flag); +bool ride_type_has_flag(int32_t rideType, int32_t flag); bool ride_is_powered_launched(Ride *ride); bool ride_is_block_sectioned(Ride *ride); -bool ride_has_any_track_elements(sint32 rideIndex); +bool ride_has_any_track_elements(int32_t rideIndex); void ride_all_has_any_track_elements(bool *rideIndexArray); void ride_construction_set_default_next_piece(); -bool track_block_get_next(CoordsXYE *input, CoordsXYE *output, sint32 *z, sint32 *direction); -bool track_block_get_next_from_zero(sint16 x, sint16 y, sint16 z_start, uint8 rideIndex, uint8 direction_start, CoordsXYE *output, sint32 *z, sint32 *direction, bool isGhost); +bool track_block_get_next(CoordsXYE *input, CoordsXYE *output, int32_t *z, int32_t *direction); +bool track_block_get_next_from_zero(int16_t x, int16_t y, int16_t z_start, uint8_t rideIndex, uint8_t direction_start, CoordsXYE *output, int32_t *z, int32_t *direction, bool isGhost); -bool track_block_get_previous(sint32 x, sint32 y, rct_tile_element *tileElement, track_begin_end *outTrackBeginEnd); -bool track_block_get_previous_from_zero(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8 direction, track_begin_end *outTrackBeginEnd); +bool track_block_get_previous(int32_t x, int32_t y, rct_tile_element *tileElement, track_begin_end *outTrackBeginEnd); +bool track_block_get_previous_from_zero(int16_t x, int16_t y, int16_t z, uint8_t rideIndex, uint8_t direction, track_begin_end *outTrackBeginEnd); void ride_get_start_of_track(CoordsXYE * output); void window_ride_construction_update_active_elements(); void ride_construction_remove_ghosts(); -money32 ride_entrance_exit_place_ghost(sint32 rideIndex, sint32 x, sint32 y, sint32 direction, sint32 placeType, sint32 stationNum); -void ride_get_entrance_or_exit_position_from_screen_position(sint32 x, sint32 y, sint32 *outX, sint32 *outY, sint32 *outDirection); +money32 ride_entrance_exit_place_ghost(int32_t rideIndex, int32_t x, int32_t y, int32_t direction, int32_t placeType, int32_t stationNum); +void ride_get_entrance_or_exit_position_from_screen_position(int32_t x, int32_t y, int32_t *outX, int32_t *outY, int32_t *outDirection); bool ride_select_backwards_from_front(); bool ride_select_forwards_from_back(); -money32 ride_remove_track_piece(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type, uint8 flags); +money32 ride_remove_track_piece(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t type, uint8_t flags); bool ride_are_all_possible_entrances_and_exits_built(Ride *ride); -void ride_fix_breakdown(sint32 rideIndex, sint32 reliabilityIncreaseFactor); +void ride_fix_breakdown(int32_t rideIndex, int32_t reliabilityIncreaseFactor); -void ride_entry_get_train_layout(sint32 rideEntryIndex, sint32 numCarsPerTrain, uint8 *trainLayout); -uint8 ride_entry_get_vehicle_at_position(sint32 rideEntryIndex, sint32 numCarsPerTrain, sint32 position); -void ride_update_max_vehicles(sint32 rideIndex); -uint64 ride_entry_get_supported_track_pieces(const rct_ride_entry * rideEntry); +void ride_entry_get_train_layout(int32_t rideEntryIndex, int32_t numCarsPerTrain, uint8_t *trainLayout); +uint8_t ride_entry_get_vehicle_at_position(int32_t rideEntryIndex, int32_t numCarsPerTrain, int32_t position); +void ride_update_max_vehicles(int32_t rideIndex); +uint64_t ride_entry_get_supported_track_pieces(const rct_ride_entry * rideEntry); -void ride_set_ride_entry(sint32 rideIndex, sint32 rideEntry); -void ride_set_num_vehicles(sint32 rideIndex, sint32 numVehicles); -void ride_set_num_cars_per_vehicle(sint32 rideIndex, sint32 numCarsPerVehicle); -void game_command_set_ride_vehicles(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); +void ride_set_ride_entry(int32_t rideIndex, int32_t rideEntry); +void ride_set_num_vehicles(int32_t rideIndex, int32_t numVehicles); +void ride_set_num_cars_per_vehicle(int32_t rideIndex, int32_t numCarsPerVehicle); +void game_command_set_ride_vehicles(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); -void game_command_place_ride_entrance_or_exit(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_remove_ride_entrance_or_exit(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); +void game_command_place_ride_entrance_or_exit(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_remove_ride_entrance_or_exit(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); -void ride_set_to_default_inspection_interval(sint32 rideIndex); +void ride_set_to_default_inspection_interval(int32_t rideIndex); -void sub_6CB945(sint32 rideIndex); -void ride_crash(uint8 rideIndex, uint8 vehicleIndex); +void sub_6CB945(int32_t rideIndex); +void ride_crash(uint8_t rideIndex, uint8_t vehicleIndex); void sub_6C94D8(); void ride_reset_all_names(); -const uint8* ride_seek_available_modes(Ride *ride); +const uint8_t* ride_seek_available_modes(Ride *ride); -void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type); +void window_ride_construction_mouseup_demolish_next_piece(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t type); -uint32 ride_customers_per_hour(const Ride *ride); -uint32 ride_customers_in_last_5_minutes(const Ride *ride); +uint32_t ride_customers_per_hour(const Ride *ride); +uint32_t ride_customers_in_last_5_minutes(const Ride *ride); rct_vehicle * ride_get_broken_vehicle(Ride *ride); void window_ride_construction_do_station_check(); void window_ride_construction_do_entrance_exit_check(); -void game_command_callback_place_ride_entrance_or_exit(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); +void game_command_callback_place_ride_entrance_or_exit(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); -void ride_delete(uint8 rideIndex); +void ride_delete(uint8_t rideIndex); void ride_renew(Ride * ride); money16 ride_get_price(Ride * ride); -rct_tile_element *get_station_platform(sint32 x, sint32 y, sint32 z, sint32 z_tolerance); +rct_tile_element *get_station_platform(int32_t x, int32_t y, int32_t z, int32_t z_tolerance); bool ride_has_adjacent_station(Ride *ride); bool ride_has_ratings(const Ride * ride); -const char * ride_type_get_enum_name(sint32 rideType); +const char * ride_type_get_enum_name(int32_t rideType); -uint8 ride_entry_get_first_non_null_ride_type(const rct_ride_entry * rideEntry); -bool ride_type_supports_boosters(uint8 rideType); -sint32 get_booster_speed(uint8 rideType, sint32 rawSpeed); +uint8_t ride_entry_get_first_non_null_ride_type(const rct_ride_entry * rideEntry); +bool ride_type_supports_boosters(uint8_t rideType); +int32_t get_booster_speed(uint8_t rideType, int32_t rawSpeed); void fix_invalid_vehicle_sprite_sizes(); -bool ride_entry_has_category(const rct_ride_entry * rideEntry, uint8 category); +bool ride_entry_has_category(const rct_ride_entry * rideEntry, uint8_t category); -sint32 ride_get_entry_index(sint32 rideType, sint32 rideSubType); +int32_t ride_get_entry_index(int32_t rideType, int32_t rideSubType); -void ride_action_modify(sint32 rideIndex, sint32 modifyType, sint32 flags); -void ride_stop_peeps_queuing(sint32 rideIndex); +void ride_action_modify(int32_t rideIndex, int32_t modifyType, int32_t flags); +void ride_stop_peeps_queuing(int32_t rideIndex); -LocationXY16 ride_get_rotated_coords(sint16 x, sint16 y, sint16 z); +LocationXY16 ride_get_rotated_coords(int16_t x, int16_t y, int16_t z); void determine_ride_entrance_and_exit_locations(); diff --git a/src/openrct2/ride/RideData.cpp b/src/openrct2/ride/RideData.cpp index 39302563ae..cd0eb8e6c3 100644 --- a/src/openrct2/ride/RideData.cpp +++ b/src/openrct2/ride/RideData.cpp @@ -129,7 +129,7 @@ const bool hasRunningTrack[RIDE_TYPE_COUNT] = { * * data generation script: https://gist.github.com/kevinburke/6bcf4a8fcc95faad7bac */ -const uint8 initialUpkeepCosts[RIDE_TYPE_COUNT] = { +const uint8_t initialUpkeepCosts[RIDE_TYPE_COUNT] = { 41, // 00 Spiral Roller coaster 40, // 01 Stand Up Coaster 40, // 02 Suspended Swinging @@ -223,7 +223,7 @@ const uint8 initialUpkeepCosts[RIDE_TYPE_COUNT] = { 42, // 5a LIM Launched Roller Coaster }; -const uint8 costPerTrackPiece[RIDE_TYPE_COUNT] = { +const uint8_t costPerTrackPiece[RIDE_TYPE_COUNT] = { 80, // 00 Spiral Roller coaster 80, // 01 Stand Up Coaster 80, // 02 Suspended Swinging @@ -320,7 +320,7 @@ const uint8 costPerTrackPiece[RIDE_TYPE_COUNT] = { /** * Data initially at 0x0097E3B4 */ -const uint8 costPerVehicle[RIDE_TYPE_COUNT] = { +const uint8_t costPerVehicle[RIDE_TYPE_COUNT] = { 10, // 00 Spiral Roller coaster 10, // 01 Stand Up Coaster 20, // 02 Suspended Swinging @@ -513,7 +513,7 @@ const bool chargeUpkeepForTrainLength[RIDE_TYPE_COUNT] = { }; /* Data at 0x0097E3B8 */ -const uint8 costPerStation[RIDE_TYPE_COUNT] = { +const uint8_t costPerStation[RIDE_TYPE_COUNT] = { 10, // 00 Spiral Roller coaster 10, // 01 Stand Up Coaster 10, // 02 Suspended Swinging @@ -608,7 +608,7 @@ const uint8 costPerStation[RIDE_TYPE_COUNT] = { }; // Data at 0x0097D21E -const uint8 rideBonusValue[RIDE_TYPE_COUNT] = { +const uint8_t rideBonusValue[RIDE_TYPE_COUNT] = { 85, // 00 Spiral Roller coaster 90, // 01 Stand Up Coaster 90, // 02 Suspended Swinging @@ -911,7 +911,7 @@ const rct_ride_name RideNaming[] = { * * rct2: 0x0097C8AC */ -const uint8 RideAvailableModes[] = { +const uint8_t RideAvailableModes[] = { RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 00 Spiral Roller coaster RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 01 Stand Up Coaster RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 02 Suspended Swinging @@ -1005,11 +1005,11 @@ const uint8 RideAvailableModes[] = { RIDE_MODE_POWERED_LAUNCH_PASSTROUGH, RIDE_MODE_POWERED_LAUNCH, RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED, 0xFF // 5a LIM Launched Roller Coaster }; -const uint8 AllRideModesAvailable[] = { +const uint8_t AllRideModesAvailable[] = { RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, RIDE_MODE_REVERSE_INCLINE_LAUNCHED_SHUTTLE, RIDE_MODE_POWERED_LAUNCH_PASSTROUGH, RIDE_MODE_SHUTTLE, RIDE_MODE_NORMAL, RIDE_MODE_BOAT_HIRE, RIDE_MODE_UPWARD_LAUNCH, RIDE_MODE_ROTATING_LIFT, RIDE_MODE_STATION_TO_STATION, RIDE_MODE_SINGLE_RIDE_PER_ADMISSION, RIDE_MODE_UNLIMITED_RIDES_PER_ADMISSION, RIDE_MODE_MAZE, RIDE_MODE_RACE, RIDE_MODE_BUMPERCAR, RIDE_MODE_SWING, RIDE_MODE_SHOP_STALL, RIDE_MODE_ROTATION, RIDE_MODE_FORWARD_ROTATION, RIDE_MODE_BACKWARD_ROTATION, RIDE_MODE_FILM_AVENGING_AVIATORS, RIDE_MODE_3D_FILM_MOUSE_TAILS, RIDE_MODE_SPACE_RINGS, RIDE_MODE_BEGINNERS, RIDE_MODE_LIM_POWERED_LAUNCH, RIDE_MODE_FILM_THRILL_RIDERS, RIDE_MODE_3D_FILM_STORM_CHASERS, RIDE_MODE_3D_FILM_SPACE_RAIDERS, RIDE_MODE_INTENSE, RIDE_MODE_BERSERK, RIDE_MODE_HAUNTED_HOUSE, RIDE_MODE_CIRCUS_SHOW, RIDE_MODE_DOWNWARD_LAUNCH, RIDE_MODE_CROOKED_HOUSE, RIDE_MODE_FREEFALL_DROP, RIDE_MODE_POWERED_LAUNCH, RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED, 0xFF }; -const uint8 RideAvailableBreakdowns[] = { +const uint8_t RideAvailableBreakdowns[] = { (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), // 00 Spiral Roller coaster (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), // 01 Stand Up Coaster (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), // 02 Suspended Swinging @@ -1452,14 +1452,14 @@ const rct_ride_entry_vehicle CableLiftVehicle = { }; /* rct2: 0x009A0AA0 */ -const uint16 RideFilmLength[3] = { +const uint16_t RideFilmLength[3] = { 5000, // MOUSE_TAILS 6000, // STORM_CHASERS 7000 // SPACE_RAIDERS }; /* rct2: 0x009A0AC4 */ -const uint16 RideCrookedHouseLength[1] = { +const uint16_t RideCrookedHouseLength[1] = { 600 }; @@ -1559,7 +1559,7 @@ const rct_ride_lift_data RideLiftData[] = { }; /** rct2: 0x0097D7CB */ -const sint32 RidePhotoItems[] = { +const int32_t RidePhotoItems[] = { SHOP_ITEM_PHOTO, // RIDE_TYPE_SPIRAL_ROLLER_COASTER SHOP_ITEM_PHOTO, // RIDE_TYPE_STAND_UP_ROLLER_COASTER SHOP_ITEM_PHOTO2, // RIDE_TYPE_SUSPENDED_SWINGING_COASTER @@ -2254,7 +2254,7 @@ const rct_ride_properties RideProperties[RIDE_TYPE_COUNT] = { }; /** rct2: 0x0097CC68 */ -const uint8 RideConstructionDefaultTrackType[] = { +const uint8_t RideConstructionDefaultTrackType[] = { TRACK_ELEM_END_STATION, // RIDE_TYPE_SPIRAL_ROLLER_COASTER TRACK_ELEM_END_STATION, // RIDE_TYPE_STAND_UP_ROLLER_COASTER TRACK_ELEM_END_STATION, // RIDE_TYPE_SUSPENDED_SWINGING_COASTER @@ -2348,7 +2348,7 @@ const uint8 RideConstructionDefaultTrackType[] = { TRACK_ELEM_END_STATION, // RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER }; -#define TRACK_COLOUR_PRESETS(...) {static_cast(Util::CountOf({__VA_ARGS__})), {__VA_ARGS__}} +#define TRACK_COLOUR_PRESETS(...) {static_cast(Util::CountOf({__VA_ARGS__})), {__VA_ARGS__}} #define DEFAULT_FLAT_RIDE_COLOUR_PRESET TRACK_COLOUR_PRESETS( { COLOUR_BRIGHT_RED, COLOUR_LIGHT_BLUE, COLOUR_YELLOW } ) #define DEFAULT_STALL_COLOUR_PRESET TRACK_COLOUR_PRESETS( { COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED } ) diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index 51750ade01..5fbcd1a2db 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -48,43 +48,43 @@ struct rct_ride_name_convention { }; struct rct_ride_entrance_definition { - uint32 sprite_index; - uint16 height; - uint16 scrolling_mode; - uint32 base_image_id; + uint32_t sprite_index; + uint16_t height; + uint16_t scrolling_mode; + uint32_t base_image_id; rct_string_id string_id; - uint16 colour_use_flags; + uint16_t colour_use_flags; }; struct rct_ride_data_4 { - uint8 price; - uint8 price_secondary; - uint16 flags; - uint8 default_music; - uint8 alternate_type; - uint8 pad[2] = {}; + uint8_t price; + uint8_t price_secondary; + uint16_t flags; + uint8_t default_music; + uint8_t alternate_type; + uint8_t pad[2] = {}; }; struct ride_cost { - uint16 track_price; - uint16 support_price; + uint16_t track_price; + uint16_t support_price; }; struct rct_ride_data_5 { - uint8 max_height; - uint8 clearance_height; - sint8 z_offset; - uint8 max_mass; - uint8 z; - uint8 price; - uint8 bonus_value; // Deprecated. Use rideBonusValue instead - uint8 pad = 0; + uint8_t max_height; + uint8_t clearance_height; + int8_t z_offset; + uint8_t max_mass; + uint8_t z; + uint8_t price; + uint8_t bonus_value; // Deprecated. Use rideBonusValue instead + uint8_t pad = 0; }; struct rct_ride_lift_data { - uint8 sound_id; - uint8 minimum_speed; - uint8 maximum_speed; + uint8_t sound_id; + uint8_t minimum_speed; + uint8_t maximum_speed; }; enum { @@ -113,37 +113,37 @@ enum { }; extern const bool hasRunningTrack[RIDE_TYPE_COUNT]; -extern const uint8 initialUpkeepCosts[RIDE_TYPE_COUNT]; -extern const uint8 costPerTrackPiece[RIDE_TYPE_COUNT]; +extern const uint8_t initialUpkeepCosts[RIDE_TYPE_COUNT]; +extern const uint8_t costPerTrackPiece[RIDE_TYPE_COUNT]; -extern const uint8 costPerVehicle[RIDE_TYPE_COUNT]; +extern const uint8_t costPerVehicle[RIDE_TYPE_COUNT]; extern const bool chargeUpkeepForTrainLength[RIDE_TYPE_COUNT]; -extern const uint8 costPerStation[RIDE_TYPE_COUNT]; -extern const uint8 rideBonusValue[RIDE_TYPE_COUNT]; +extern const uint8_t costPerStation[RIDE_TYPE_COUNT]; +extern const uint8_t rideBonusValue[RIDE_TYPE_COUNT]; extern const ride_component_name RideComponentNames[RIDE_COMPONENT_TYPE_COUNT]; extern const rct_ride_name_convention RideNameConvention[RIDE_TYPE_COUNT]; extern const rct_ride_name RideNaming[RIDE_TYPE_COUNT]; -extern const uint8 RideAvailableModes[]; -extern const uint8 AllRideModesAvailable[]; -extern const uint8 RideAvailableBreakdowns[]; +extern const uint8_t RideAvailableModes[]; +extern const uint8_t AllRideModesAvailable[]; +extern const uint8_t RideAvailableBreakdowns[]; extern const rct_ride_entrance_definition RideEntranceDefinitions[RIDE_ENTRANCE_STYLE_COUNT]; extern const rct_ride_lift_data RideLiftData[RIDE_TYPE_COUNT]; extern const rct_ride_data_4 RideData4[RIDE_TYPE_COUNT]; -extern const sint32 RidePhotoItems[RIDE_TYPE_COUNT]; +extern const int32_t RidePhotoItems[RIDE_TYPE_COUNT]; extern const ride_cost RideTrackCosts[RIDE_TYPE_COUNT]; extern const rct_ride_data_5 RideData5[RIDE_TYPE_COUNT]; extern const rct_ride_entry_vehicle CableLiftVehicle; -extern const uint16 RideFilmLength[3]; -extern const uint16 RideCrookedHouseLength[1]; +extern const uint16_t RideFilmLength[3]; +extern const uint16_t RideCrookedHouseLength[1]; extern const rating_tuple RideRatings[RIDE_TYPE_COUNT]; -extern const uint8 RideConstructionDefaultTrackType[RIDE_TYPE_COUNT]; +extern const uint8_t RideConstructionDefaultTrackType[RIDE_TYPE_COUNT]; extern const track_colour_preset_list RideColourPresets[RIDE_TYPE_COUNT]; diff --git a/src/openrct2/ride/RideGroupManager.cpp b/src/openrct2/ride/RideGroupManager.cpp index 9b8bf49f3a..e9bdde2331 100644 --- a/src/openrct2/ride/RideGroupManager.cpp +++ b/src/openrct2/ride/RideGroupManager.cpp @@ -108,11 +108,11 @@ bool RideGroup::IsInvented() const if (!ride_type_is_invented(this->RideType)) return false; - uint8 *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(this->RideType); + uint8_t *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(this->RideType); while (*rideEntryIndexPtr != RIDE_ENTRY_INDEX_NULL) { - uint8 rideEntryIndex = *rideEntryIndexPtr++; + uint8_t rideEntryIndex = *rideEntryIndexPtr++; if (!ride_entry_is_invented(rideEntryIndex)) continue; @@ -130,7 +130,7 @@ bool RideGroup::IsInvented() const return false; } -const RideGroup * RideGroupManager::GetRideGroup(const uint8 rideType, const rct_ride_entry * rideEntry) +const RideGroup * RideGroupManager::GetRideGroup(const uint8_t rideType, const rct_ride_entry * rideEntry) { switch (rideType) { @@ -164,7 +164,7 @@ const RideGroup * RideGroupManager::GetRideGroup(const uint8 rideType, const rct } } -bool RideGroupManager::RideTypeHasRideGroups(const uint8 rideType) +bool RideGroupManager::RideTypeHasRideGroups(const uint8_t rideType) { switch (rideType) { @@ -179,7 +179,7 @@ bool RideGroupManager::RideTypeHasRideGroups(const uint8 rideType) } } -const RideGroup * RideGroupManager::RideGroupFind(const uint8 rideType, const uint8 index) +const RideGroup * RideGroupManager::RideGroupFind(const uint8_t rideType, const uint8_t index) { if (index >= MAX_RIDE_GROUPS_PER_RIDE_TYPE) return nullptr; @@ -201,7 +201,7 @@ const RideGroup * RideGroupManager::RideGroupFind(const uint8 rideType, const ui } } -const std::vector RideGroupManager::GetPreferredRideEntryOrder(const uint8 rideType) +const std::vector RideGroupManager::GetPreferredRideEntryOrder(const uint8_t rideType) { // clang-format off static const std::vector preferredRideEntryOrder[] = @@ -308,7 +308,7 @@ const std::vector RideGroupManager::GetPreferredRideEntryOrder(con * which picture is shown on the new ride tab and which train type is selected * by default. */ -sint32 RideGroupManager::VehiclePreferenceCompare(const uint8 rideType, const char * a, const char * b) +int32_t RideGroupManager::VehiclePreferenceCompare(const uint8_t rideType, const char * a, const char * b) { std::vector rideEntryOrder = RideGroupManager::GetPreferredRideEntryOrder(rideType); for (const char * object : rideEntryOrder) @@ -325,7 +325,7 @@ sint32 RideGroupManager::VehiclePreferenceCompare(const uint8 rideType, const ch return 0; } -bool RideGroupManager::RideTypeIsIndependent(const uint8 rideType) +bool RideGroupManager::RideTypeIsIndependent(const uint8_t rideType) { switch (rideType) { @@ -428,7 +428,7 @@ bool RideGroupManager::RideTypeIsIndependent(const uint8 rideType) return true; } -const uint8 gRideCategories[] = { +const uint8_t gRideCategories[] = { RIDE_CATEGORY_ROLLERCOASTER, // Spiral Roller coaster RIDE_CATEGORY_ROLLERCOASTER, // Stand Up Coaster RIDE_CATEGORY_ROLLERCOASTER, // Suspended Swinging diff --git a/src/openrct2/ride/RideGroupManager.h b/src/openrct2/ride/RideGroupManager.h index 0344c8226b..3a2a5bbef1 100644 --- a/src/openrct2/ride/RideGroupManager.h +++ b/src/openrct2/ride/RideGroupManager.h @@ -16,13 +16,13 @@ #define MAX_RIDE_GROUPS_PER_RIDE_TYPE 2 -extern const uint8 gRideCategories[RIDE_TYPE_COUNT]; +extern const uint8_t gRideCategories[RIDE_TYPE_COUNT]; struct RideGroup { - uint8 RideType; - uint16 MaximumHeight; - uint64 AvailableTrackPieces; + uint8_t RideType; + uint16_t MaximumHeight; + uint64_t AvailableTrackPieces; rct_ride_name Naming; bool Equals(const RideGroup* otherRideGroup) const; @@ -32,11 +32,11 @@ struct RideGroup class RideGroupManager { public: - static const RideGroup * GetRideGroup(const uint8 trackType, const rct_ride_entry * rideEntry); - static bool RideTypeHasRideGroups(const uint8 trackType); - static const RideGroup * RideGroupFind(const uint8 rideType, const uint8 index); + static const RideGroup * GetRideGroup(const uint8_t trackType, const rct_ride_entry * rideEntry); + static bool RideTypeHasRideGroups(const uint8_t trackType); + static const RideGroup * RideGroupFind(const uint8_t rideType, const uint8_t index); - static const std::vector GetPreferredRideEntryOrder(const uint8 rideType); - static sint32 VehiclePreferenceCompare(const uint8 rideType, const char * a, const char * b); - static bool RideTypeIsIndependent(const uint8 rideType); + static const std::vector GetPreferredRideEntryOrder(const uint8_t rideType); + static int32_t VehiclePreferenceCompare(const uint8_t rideType, const char * a, const char * b); + static bool RideTypeIsIndependent(const uint8_t rideType); }; diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index f530cacefa..5cfb9eec3a 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -66,7 +66,7 @@ using ride_ratings_calculation = void (*)(Ride *ride); rct_ride_rating_calc_data gRideRatingsCalcData; -static ride_ratings_calculation ride_ratings_get_calculate_func(uint8 rideType); +static ride_ratings_calculation ride_ratings_get_calculate_func(uint8_t rideType); static void ride_ratings_update_state(); static void ride_ratings_update_state_0(); @@ -80,7 +80,7 @@ static void ride_ratings_calculate(Ride *ride); static void ride_ratings_calculate_value(Ride *ride); static void ride_ratings_score_close_proximity(rct_tile_element *inputTileElement); -static void ride_ratings_add(rating_tuple * rating, sint32 excitement, sint32 intensity, sint32 nausea); +static void ride_ratings_add(rating_tuple * rating, int32_t excitement, int32_t intensity, int32_t nausea); /** * This is a small hack function to keep calling the ride rating processor until @@ -143,7 +143,7 @@ static void ride_ratings_update_state() */ static void ride_ratings_update_state_0() { - sint32 currentRide = gRideRatingsCalcData.current_ride; + int32_t currentRide = gRideRatingsCalcData.current_ride; currentRide++; if (currentRide == 255) { @@ -164,7 +164,7 @@ static void ride_ratings_update_state_0() static void ride_ratings_update_state_1() { gRideRatingsCalcData.proximity_total = 0; - for (sint32 i = 0; i < PROXIMITY_COUNT; i++) { + for (int32_t i = 0; i < PROXIMITY_COUNT; i++) { gRideRatingsCalcData.proximity_scores[i] = 0; } gRideRatingsCalcData.num_brakes = 0; @@ -180,17 +180,17 @@ static void ride_ratings_update_state_1() */ static void ride_ratings_update_state_2() { - const sint32 rideIndex = gRideRatingsCalcData.current_ride; + const int32_t rideIndex = gRideRatingsCalcData.current_ride; Ride *ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_NULL || ride->status == RIDE_STATUS_CLOSED) { gRideRatingsCalcData.state = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; } - sint32 x = gRideRatingsCalcData.proximity_x / 32; - sint32 y = gRideRatingsCalcData.proximity_y / 32; - sint32 z = gRideRatingsCalcData.proximity_z / 8; - sint32 trackType = gRideRatingsCalcData.proximity_track_type; + int32_t x = gRideRatingsCalcData.proximity_x / 32; + int32_t y = gRideRatingsCalcData.proximity_y / 32; + int32_t z = gRideRatingsCalcData.proximity_z / 8; + int32_t trackType = gRideRatingsCalcData.proximity_track_type; rct_tile_element *tileElement = map_get_first_element_at(x, y); do { @@ -204,7 +204,7 @@ static void ride_ratings_update_state_2() (tile_element_get_track_sequence(tileElement) == 0 && trackType == track_element_get_type(tileElement))) { if (trackType == TRACK_ELEM_END_STATION) { - sint32 entranceIndex = tile_element_get_station(tileElement); + int32_t entranceIndex = tile_element_get_station(tileElement); gRideRatingsCalcData.station_flags &= ~RIDE_RATING_STATION_FLAG_NO_ENTRANCE; if (ride_get_entrance_location(rideIndex, entranceIndex).isNull()) { @@ -285,10 +285,10 @@ static void ride_ratings_update_state_5() return; } - sint32 x = gRideRatingsCalcData.proximity_x / 32; - sint32 y = gRideRatingsCalcData.proximity_y / 32; - sint32 z = gRideRatingsCalcData.proximity_z / 8; - sint32 trackType = gRideRatingsCalcData.proximity_track_type; + int32_t x = gRideRatingsCalcData.proximity_x / 32; + int32_t y = gRideRatingsCalcData.proximity_y / 32; + int32_t z = gRideRatingsCalcData.proximity_z / 8; + int32_t trackType = gRideRatingsCalcData.proximity_track_type; rct_tile_element *tileElement = map_get_first_element_at(x, y); do { @@ -332,7 +332,7 @@ static void ride_ratings_update_state_5() */ static void ride_ratings_begin_proximity_loop() { - const sint32 rideIndex = gRideRatingsCalcData.current_ride; + const int32_t rideIndex = gRideRatingsCalcData.current_ride; Ride *ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_NULL || ride->status == RIDE_STATUS_CLOSED) { gRideRatingsCalcData.state = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; @@ -344,7 +344,7 @@ static void ride_ratings_begin_proximity_loop() return; } - for (sint32 i = 0; i < MAX_STATIONS; i++) { + for (int32_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy != RCT_XY8_UNDEFINED) { gRideRatingsCalcData.station_flags &= ~RIDE_RATING_STATION_FLAG_NO_ENTRANCE; if (ride_get_entrance_location(rideIndex, i).isNull()) @@ -352,9 +352,9 @@ static void ride_ratings_begin_proximity_loop() gRideRatingsCalcData.station_flags |= RIDE_RATING_STATION_FLAG_NO_ENTRANCE; } - sint32 x = ride->station_starts[i].x * 32; - sint32 y = ride->station_starts[i].y * 32; - sint32 z = ride->station_heights[i] * 8; + int32_t x = ride->station_starts[i].x * 32; + int32_t y = ride->station_starts[i].y * 32; + int32_t z = ride->station_heights[i] * 8; gRideRatingsCalcData.proximity_x = x; gRideRatingsCalcData.proximity_y = y; @@ -370,7 +370,7 @@ static void ride_ratings_begin_proximity_loop() gRideRatingsCalcData.state = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; } -static void proximity_score_increment(sint32 type) +static void proximity_score_increment(int32_t type) { gRideRatingsCalcData.proximity_scores[type]++; } @@ -379,10 +379,10 @@ static void proximity_score_increment(sint32 type) * * rct2: 0x006B6207 */ -static void ride_ratings_score_close_proximity_in_direction(rct_tile_element *inputTileElement, sint32 direction) +static void ride_ratings_score_close_proximity_in_direction(rct_tile_element *inputTileElement, int32_t direction) { - sint32 x = gRideRatingsCalcData.proximity_x + CoordsDirectionDelta[direction].x; - sint32 y = gRideRatingsCalcData.proximity_y + CoordsDirectionDelta[direction].y; + int32_t x = gRideRatingsCalcData.proximity_x + CoordsDirectionDelta[direction].x; + int32_t y = gRideRatingsCalcData.proximity_y + CoordsDirectionDelta[direction].y; if (x < 0 || y < 0 || x >= (32 * 256) || y >= (32 * 256)) return; @@ -397,13 +397,13 @@ static void ride_ratings_score_close_proximity_in_direction(rct_tile_element *in } break; case TILE_ELEMENT_TYPE_PATH: - if (abs((sint32)inputTileElement->base_height - (sint32)tileElement->base_height) <= 2) { + if (abs((int32_t)inputTileElement->base_height - (int32_t)tileElement->base_height) <= 2) { proximity_score_increment(PROXIMITY_PATH_SIDE_CLOSE); } break; case TILE_ELEMENT_TYPE_TRACK: if (track_element_get_ride_index(inputTileElement) != track_element_get_ride_index(tileElement)) { - if (abs((sint32)inputTileElement->base_height - (sint32)tileElement->base_height) <= 2) { + if (abs((int32_t)inputTileElement->base_height - (int32_t)tileElement->base_height) <= 2) { proximity_score_increment(PROXIMITY_FOREIGN_TRACK_SIDE_CLOSE); } } @@ -423,14 +423,14 @@ static void ride_ratings_score_close_proximity_in_direction(rct_tile_element *in } -static void ride_ratings_score_close_proximity_loops_helper(rct_tile_element *inputTileElement, sint32 x, sint32 y) +static void ride_ratings_score_close_proximity_loops_helper(rct_tile_element *inputTileElement, int32_t x, int32_t y) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { switch (tileElement->GetType()) { case TILE_ELEMENT_TYPE_PATH: { - sint32 zDiff = (sint32)tileElement->base_height - (sint32)inputTileElement->base_height; + int32_t zDiff = (int32_t)tileElement->base_height - (int32_t)inputTileElement->base_height; if (zDiff >= 0 && zDiff <= 16) { proximity_score_increment(PROXIMITY_PATH_TROUGH_VERTICAL_LOOP); @@ -442,7 +442,7 @@ static void ride_ratings_score_close_proximity_loops_helper(rct_tile_element *in bool elementsAreAt90DegAngle = ((tileElement->GetDirection() ^ inputTileElement->GetDirection()) & 1) != 0; if (elementsAreAt90DegAngle) { - sint32 zDiff = (sint32)tileElement->base_height - (sint32)inputTileElement->base_height; + int32_t zDiff = (int32_t)tileElement->base_height - (int32_t)inputTileElement->base_height; if (zDiff >= 0 && zDiff <= 16) { proximity_score_increment(PROXIMITY_TRACK_THROUGH_VERTICAL_LOOP); @@ -464,13 +464,13 @@ static void ride_ratings_score_close_proximity_loops_helper(rct_tile_element *in */ static void ride_ratings_score_close_proximity_loops(rct_tile_element *inputTileElement) { - sint32 trackType = track_element_get_type(inputTileElement); + int32_t trackType = track_element_get_type(inputTileElement); if (trackType == TRACK_ELEM_LEFT_VERTICAL_LOOP || trackType == TRACK_ELEM_RIGHT_VERTICAL_LOOP) { - sint32 x = gRideRatingsCalcData.proximity_x; - sint32 y = gRideRatingsCalcData.proximity_y; + int32_t x = gRideRatingsCalcData.proximity_x; + int32_t y = gRideRatingsCalcData.proximity_y; ride_ratings_score_close_proximity_loops_helper(inputTileElement, x, y); - sint32 direction = tile_element_get_direction(inputTileElement); + int32_t direction = tile_element_get_direction(inputTileElement); x = gRideRatingsCalcData.proximity_x + CoordsDirectionDelta[direction].x; y = gRideRatingsCalcData.proximity_y + CoordsDirectionDelta[direction].y; ride_ratings_score_close_proximity_loops_helper(inputTileElement, x, y); @@ -488,11 +488,11 @@ static void ride_ratings_score_close_proximity(rct_tile_element *inputTileElemen } gRideRatingsCalcData.proximity_total++; - sint32 x = gRideRatingsCalcData.proximity_x; - sint32 y = gRideRatingsCalcData.proximity_y; + int32_t x = gRideRatingsCalcData.proximity_x; + int32_t y = gRideRatingsCalcData.proximity_y; rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { - sint32 waterHeight; + int32_t waterHeight; switch (tileElement->GetType()) { case TILE_ELEMENT_TYPE_SURFACE: gRideRatingsCalcData.proximity_base_height = tileElement->base_height; @@ -501,7 +501,7 @@ static void ride_ratings_score_close_proximity(rct_tile_element *inputTileElemen } waterHeight = surface_get_water_height(tileElement); if (waterHeight != 0) { - sint32 z = waterHeight * 16; + int32_t z = waterHeight * 16; if (z <= gRideRatingsCalcData.proximity_z) { proximity_score_increment(PROXIMITY_WATER_OVER); if (z == gRideRatingsCalcData.proximity_z) { @@ -542,9 +542,9 @@ static void ride_ratings_score_close_proximity(rct_tile_element *inputTileElemen break; case TILE_ELEMENT_TYPE_TRACK: { - sint32 trackType = track_element_get_type(tileElement); + int32_t trackType = track_element_get_type(tileElement); if (trackType == TRACK_ELEM_LEFT_VERTICAL_LOOP || trackType == TRACK_ELEM_RIGHT_VERTICAL_LOOP) { - sint32 sequence = tile_element_get_track_sequence(tileElement); + int32_t sequence = tile_element_get_track_sequence(tileElement); if (sequence == 3 || sequence == 6) { if (tileElement->base_height - inputTileElement->clearance_height <= 10) { proximity_score_increment(PROXIMITY_THROUGH_VERTICAL_LOOP); @@ -565,7 +565,7 @@ static void ride_ratings_score_close_proximity(rct_tile_element *inputTileElemen proximity_score_increment(PROXIMITY_FOREIGN_TRACK_TOUCH_ABOVE); } if (inputTileElement->clearance_height + 2 == tileElement->base_height) { - if ((uint8)(inputTileElement->clearance_height + 10) >= tileElement->base_height) { + if ((uint8_t)(inputTileElement->clearance_height + 10) >= tileElement->base_height) { proximity_score_increment(PROXIMITY_FOREIGN_TRACK_CLOSE_ABOVE); } } @@ -610,7 +610,7 @@ static void ride_ratings_score_close_proximity(rct_tile_element *inputTileElemen } // switch tileElement->GetType } while (!(tileElement++)->IsLastForTile()); - uint8 direction = tile_element_get_direction(inputTileElement); + uint8_t direction = tile_element_get_direction(inputTileElement); ride_ratings_score_close_proximity_in_direction(inputTileElement, (direction + 1) & 3); ride_ratings_score_close_proximity_in_direction(inputTileElement, (direction - 1) & 3); ride_ratings_score_close_proximity_loops(inputTileElement); @@ -645,7 +645,7 @@ static void ride_ratings_calculate(Ride *ride) static void ride_ratings_calculate_value(Ride *ride) { - struct row { sint32 months, multiplier, divisor, summand; }; + struct row { int32_t months, multiplier, divisor, summand; }; static const row age_table_new[] = { {5, 3, 2, 0}, // 1.5x {13, 6, 5, 0}, // 1.2x @@ -680,12 +680,12 @@ static void ride_ratings_calculate_value(Ride *ride) } // Start with the base ratings, multiplied by the ride type specific weights for excitement, intensity and nausea. - sint32 value = + int32_t value = (((ride->excitement * RideRatings[ride->type].excitement) * 32) >> 15) + (((ride->intensity * RideRatings[ride->type].intensity) * 32) >> 15) + (((ride->nausea * RideRatings[ride->type].nausea) * 32) >> 15); - sint32 monthsOld = 0; + int32_t monthsOld = 0; if (!gCheatsDisableRideValueAging) { monthsOld = gDateMonthsElapsed - ride->build_date; } @@ -717,9 +717,9 @@ static void ride_ratings_calculate_value(Ride *ride) } // Other ride of same type penalty - sint32 otherRidesOfSameType = 0; + int32_t otherRidesOfSameType = 0; Ride *ride2; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride2) { if (ride2->type == ride->type && ride2->status == RIDE_STATUS_OPEN) otherRidesOfSameType++; @@ -736,19 +736,19 @@ static void ride_ratings_calculate_value(Ride *ride) * inputs * - edi: ride ptr */ -static uint16 ride_compute_upkeep(Ride *ride) +static uint16_t ride_compute_upkeep(Ride *ride) { // data stored at 0x0057E3A8, incrementing 18 bytes at a time - uint16 upkeep = initialUpkeepCosts[ride->type]; + uint16_t upkeep = initialUpkeepCosts[ride->type]; - uint16 trackCost = costPerTrackPiece[ride->type]; - uint8 dl = ride->drops; + uint16_t trackCost = costPerTrackPiece[ride->type]; + uint8_t dl = ride->drops; dl = dl >> 6; dl = dl & 3; upkeep += trackCost * dl; - uint32 totalLength = ride_get_total_length(ride) >> 16; + uint32_t totalLength = ride_get_total_length(ride) >> 16; // The data originally here was 20's and 0's. The 20's all represented // rides that had tracks. The 0's were fixed rides like crooked house or @@ -757,7 +757,7 @@ static uint16 ride_compute_upkeep(Ride *ride) if (hasRunningTrack[ride->type]) { totalLength *= 20; } - upkeep += (uint16)(totalLength >> 10); + upkeep += (uint16_t)(totalLength >> 10); if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { // The original code read from a table starting at 0x0097E3AE and @@ -768,7 +768,7 @@ static uint16 ride_compute_upkeep(Ride *ride) } // Add maintenance cost for reverser track pieces - uint16 reverserMaintenanceCost = 80; + uint16_t reverserMaintenanceCost = 80; if (ride->type == RIDE_TYPE_REVERSER_ROLLER_COASTER) { reverserMaintenanceCost = 10; } @@ -830,14 +830,14 @@ static void ride_ratings_apply_adjustments(Ride *ride, rating_tuple *ratings) // Apply ride entry multipliers ride_ratings_add(ratings, - (((sint32)ratings->excitement * rideEntry->excitement_multiplier) >> 7), - (((sint32)ratings->intensity * rideEntry->intensity_multiplier) >> 7), - (((sint32)ratings->nausea * rideEntry->nausea_multiplier) >> 7)); + (((int32_t)ratings->excitement * rideEntry->excitement_multiplier) >> 7), + (((int32_t)ratings->intensity * rideEntry->intensity_multiplier) >> 7), + (((int32_t)ratings->nausea * rideEntry->nausea_multiplier) >> 7)); // Apply total air time #ifdef ORIGINAL_RATINGS if (RideData4[ride->type].flags & RIDE_TYPE_FLAG4_HAS_AIR_TIME) { - uint16 totalAirTime = ride->total_air_time; + uint16_t totalAirTime = ride->total_air_time; if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) { if (totalAirTime >= 96) { totalAirTime -= 96; @@ -851,11 +851,11 @@ static void ride_ratings_apply_adjustments(Ride *ride, rating_tuple *ratings) } #else if (RideData4[ride->type].flags & RIDE_TYPE_FLAG4_HAS_AIR_TIME) { - sint32 excitementModifier; - sint32 nauseaModifier; + int32_t excitementModifier; + int32_t nauseaModifier; if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) { // Limit airtime bonus for heartline twister coaster (see issues #2031 and #2064) - excitementModifier = std::min(ride->total_air_time, 96) / 8; + excitementModifier = std::min(ride->total_air_time, 96) / 8; } else { excitementModifier = ride->total_air_time / 8; } @@ -891,23 +891,23 @@ static void ride_ratings_apply_intensity_penalty(rating_tuple *ratings) static void set_unreliability_factor(Ride *ride) { // The bigger the difference in lift speed and minimum the higher the unreliability - uint8 lift_speed_adjustment = RideLiftData[ride->type].minimum_speed; + uint8_t lift_speed_adjustment = RideLiftData[ride->type].minimum_speed; ride->unreliability_factor += (ride->lift_hill_speed - lift_speed_adjustment) * 2; } -static uint32 get_proximity_score_helper_1(uint16 x, uint16 max, uint32 multiplier) +static uint32_t get_proximity_score_helper_1(uint16_t x, uint16_t max, uint32_t multiplier) { return (std::min(x, max) * multiplier) >> 16; } -static uint32 get_proximity_score_helper_2(uint16 x, uint16 additionIfNotZero, uint16 max, uint32 multiplier) +static uint32_t get_proximity_score_helper_2(uint16_t x, uint16_t additionIfNotZero, uint16_t max, uint32_t multiplier) { - uint32 result = x; + uint32_t result = x; if (result != 0) result += additionIfNotZero; - return (std::min(result, max) * multiplier) >> 16; + return (std::min(result, max) * multiplier) >> 16; } -static uint32 get_proximity_score_helper_3(uint16 x, uint16 resultIfNotZero) +static uint32_t get_proximity_score_helper_3(uint16_t x, uint16_t resultIfNotZero) { return x == 0 ? 0 : resultIfNotZero; } @@ -916,11 +916,11 @@ static uint32 get_proximity_score_helper_3(uint16 x, uint16 resultIfNotZero) * * rct2: 0x0065E277 */ -static uint32 ride_ratings_get_proximity_score() +static uint32_t ride_ratings_get_proximity_score() { - const uint16 * scores = gRideRatingsCalcData.proximity_scores; + const uint16_t * scores = gRideRatingsCalcData.proximity_scores; - uint32 result = 0; + uint32_t result = 0; result += get_proximity_score_helper_1(scores[PROXIMITY_WATER_OVER ] , 60, 0x00AAAA); result += get_proximity_score_helper_1(scores[PROXIMITY_WATER_TOUCH ] , 22, 0x0245D1); result += get_proximity_score_helper_1(scores[PROXIMITY_WATER_LOW ] , 10, 0x020000); @@ -954,21 +954,21 @@ static uint32 ride_ratings_get_proximity_score() * Calculates how much of the track is sheltered in eighths. * rct2: 0x0065E72D */ -static sint32 get_num_of_sheltered_eighths(Ride *ride) +static int32_t get_num_of_sheltered_eighths(Ride *ride) { - sint32 totalLength = ride_get_total_length(ride); - sint32 shelteredLength = ride->sheltered_length; - sint32 lengthEighth = totalLength / 8; - sint32 lengthCounter = lengthEighth; - sint32 numShelteredEighths = 0; - for (sint32 i = 0; i < 7; i++) { + int32_t totalLength = ride_get_total_length(ride); + int32_t shelteredLength = ride->sheltered_length; + int32_t lengthEighth = totalLength / 8; + int32_t lengthCounter = lengthEighth; + int32_t numShelteredEighths = 0; + for (int32_t i = 0; i < 7; i++) { if (shelteredLength >= lengthCounter) { lengthCounter += lengthEighth; numShelteredEighths++; } } - sint32 dh = numShelteredEighths; + int32_t dh = numShelteredEighths; rct_ride_entry *rideType = get_ride_entry(ride->subtype); if (rideType == nullptr) { @@ -982,9 +982,9 @@ static sint32 get_num_of_sheltered_eighths(Ride *ride) static rating_tuple get_flat_turns_rating(Ride* ride) { - sint32 no_3_plus_turns = get_turn_count_3_elements(ride, 0); - sint32 no_2_turns = get_turn_count_2_elements(ride, 0); - sint32 no_1_turns = get_turn_count_1_element(ride, 0); + int32_t no_3_plus_turns = get_turn_count_3_elements(ride, 0); + int32_t no_2_turns = get_turn_count_2_elements(ride, 0); + int32_t no_1_turns = get_turn_count_1_element(ride, 0); rating_tuple rating; rating.excitement = (no_3_plus_turns * 0x28000) >> 16; @@ -1008,9 +1008,9 @@ static rating_tuple get_flat_turns_rating(Ride* ride) */ static rating_tuple get_banked_turns_rating(Ride* ride) { - sint32 no_3_plus_turns = get_turn_count_3_elements(ride, 1); - sint32 no_2_turns = get_turn_count_2_elements(ride, 1); - sint32 no_1_turns = get_turn_count_1_element(ride, 1); + int32_t no_3_plus_turns = get_turn_count_3_elements(ride, 1); + int32_t no_2_turns = get_turn_count_2_elements(ride, 1); + int32_t no_1_turns = get_turn_count_1_element(ride, 1); rating_tuple rating; rating.excitement = (no_3_plus_turns * 0x3C000) >> 16; @@ -1035,10 +1035,10 @@ static rating_tuple get_banked_turns_rating(Ride* ride) static rating_tuple get_sloped_turns_rating(Ride* ride) { rating_tuple rating; - sint32 no_4_plus_turns = get_turn_count_4_plus_elements(ride, 2); - sint32 no_3_turns = get_turn_count_3_elements(ride, 2); - sint32 no_2_turns = get_turn_count_2_elements(ride, 2); - sint32 no_1_turns = get_turn_count_1_element(ride, 2); + int32_t no_4_plus_turns = get_turn_count_4_plus_elements(ride, 2); + int32_t no_3_turns = get_turn_count_3_elements(ride, 2); + int32_t no_2_turns = get_turn_count_2_elements(ride, 2); + int32_t no_1_turns = get_turn_count_1_element(ride, 2); rating.excitement = (std::min(no_4_plus_turns, 4) * 0x78000) >> 16; rating.excitement += (std::min(no_3_turns, 6) * 273066) >> 16; @@ -1054,18 +1054,18 @@ static rating_tuple get_sloped_turns_rating(Ride* ride) { * * rct2: 0x0065E0F2 */ -static rating_tuple get_inversions_ratings(uint8 inversions) { +static rating_tuple get_inversions_ratings(uint8_t inversions) { rating_tuple rating; - rating.excitement = (std::min(inversions, 6) * 0x1AAAAA) >> 16; + rating.excitement = (std::min(inversions, 6) * 0x1AAAAA) >> 16; rating.intensity = (inversions * 0x320000) >> 16; rating.nausea = (inversions * 0x15AAAA) >> 16; return rating; } -static rating_tuple get_special_track_elements_rating(uint8 type, Ride *ride) { - sint32 excitement = 0, intensity = 0, nausea = 0; +static rating_tuple get_special_track_elements_rating(uint8_t type, Ride *ride) { + int32_t excitement = 0, intensity = 0, nausea = 0; if (type == RIDE_TYPE_GHOST_TRAIN) { if (ride_has_spinning_tunnel(ride)) { excitement += 40; @@ -1095,14 +1095,14 @@ static rating_tuple get_special_track_elements_rating(uint8 type, Ride *ride) { nausea += 23; } } - uint8 helix_sections = ride_get_helix_sections(ride); - sint32 al = std::min(helix_sections, 9); + uint8_t helix_sections = ride_get_helix_sections(ride); + int32_t al = std::min(helix_sections, 9); excitement += (al * 254862) >> 16; - al = std::min(helix_sections, 11); + al = std::min(helix_sections, 11); intensity += (al * 148945) >> 16; - al = std::max(helix_sections - 5, 0); + al = std::max(helix_sections - 5, 0); al = std::min(al, 10); nausea += (al * 0x140000) >> 16; @@ -1116,7 +1116,7 @@ static rating_tuple get_special_track_elements_rating(uint8 type, Ride *ride) { */ static rating_tuple ride_ratings_get_turns_ratings(Ride *ride) { - sint32 excitement = 0, intensity = 0, nausea = 0; + int32_t excitement = 0, intensity = 0, nausea = 0; rating_tuple special_track_element_rating = get_special_track_elements_rating(ride->type, ride); excitement += special_track_element_rating.excitement; @@ -1153,15 +1153,15 @@ static rating_tuple ride_ratings_get_turns_ratings(Ride *ride) */ static rating_tuple ride_ratings_get_sheltered_ratings(Ride *ride) { - sint32 sheltered_length_shifted = (ride->sheltered_length) >> 16; - uint32 eax = std::min(sheltered_length_shifted, 1000); - sint32 excitement = (eax * 9175) >> 16; + int32_t sheltered_length_shifted = (ride->sheltered_length) >> 16; + uint32_t eax = std::min(sheltered_length_shifted, 1000); + int32_t excitement = (eax * 9175) >> 16; eax = std::min(sheltered_length_shifted, 2000); - sint32 intensity = (eax * 0x2666) >> 16; + int32_t intensity = (eax * 0x2666) >> 16; eax = std::min(sheltered_length_shifted, 1000); - sint32 nausea = (eax * 0x4000) >> 16; + int32_t nausea = (eax * 0x4000) >> 16; /*eax = (ride->var_11C * 30340) >> 16;*/ /*nausea += eax;*/ @@ -1176,8 +1176,8 @@ static rating_tuple ride_ratings_get_sheltered_ratings(Ride *ride) nausea += 15; } - uint8 lowerval = ride->num_sheltered_sections & 0x1F; - lowerval = std::min(lowerval, 11); + uint8_t lowerval = ride->num_sheltered_sections & 0x1F; + lowerval = std::min(lowerval, 11); excitement += (lowerval * 774516) >> 16; rating_tuple rating = { (ride_rating)excitement, (ride_rating)intensity, (ride_rating)nausea }; @@ -1241,7 +1241,7 @@ static rating_tuple ride_ratings_get_drop_ratings(Ride *ride) }; // Apply number of drops factor - sint32 drops = ride->drops & 0x3F; + int32_t drops = ride->drops & 0x3F; result.excitement += (std::min(9, drops) * 728177) >> 16; result.intensity += (drops * 928426) >> 16; result.nausea += (drops * 655360) >> 16; @@ -1259,10 +1259,10 @@ static rating_tuple ride_ratings_get_drop_ratings(Ride *ride) * Calculates a score based on the surrounding scenery. * rct2: 0x0065E557 */ -static sint32 ride_ratings_get_scenery_score(Ride *ride) +static int32_t ride_ratings_get_scenery_score(Ride *ride) { - sint8 i = ride_get_first_valid_station_start(ride); - sint32 x, y; + int8_t i = ride_get_first_valid_station_start(ride); + int32_t x, y; if (i == -1) { @@ -1282,7 +1282,7 @@ static sint32 ride_ratings_get_scenery_score(Ride *ride) y = location.y; } - sint32 z = tile_element_height(x * 32, y * 32) & 0xFFFF; + int32_t z = tile_element_height(x * 32, y * 32) & 0xFFFF; // Check if station is underground, returns a fixed mediocre score since you can't have scenery underground if (z > ride->station_heights[i] * 8) @@ -1291,16 +1291,16 @@ static sint32 ride_ratings_get_scenery_score(Ride *ride) } // Count surrounding scenery items - sint32 numSceneryItems = 0; - for (sint32 yy = std::max(y - 5, 0); yy <= std::min(y + 5, 255); yy++) { - for (sint32 xx = std::max(x - 5, 0); xx <= std::min(x + 5, 255); xx++) { + int32_t numSceneryItems = 0; + for (int32_t yy = std::max(y - 5, 0); yy <= std::min(y + 5, 255); yy++) { + for (int32_t xx = std::max(x - 5, 0); xx <= std::min(x + 5, 255); xx++) { // Count scenery items on this tile rct_tile_element *tileElement = map_get_first_element_at(xx, yy); do { if (tileElement->flags & (1 << 4)) continue; - sint32 type = tileElement->GetType(); + int32_t type = tileElement->GetType(); if (type == TILE_ELEMENT_TYPE_SMALL_SCENERY || type == TILE_ELEMENT_TYPE_LARGE_SCENERY) numSceneryItems++; } while (!(tileElement++)->IsLastForTile()); @@ -1312,7 +1312,7 @@ static sint32 ride_ratings_get_scenery_score(Ride *ride) #pragma region Ride rating calculation helpers -static void ride_ratings_set(rating_tuple *ratings, sint32 excitement, sint32 intensity, sint32 nausea) +static void ride_ratings_set(rating_tuple *ratings, int32_t excitement, int32_t intensity, int32_t nausea) { ratings->excitement = 0; ratings->intensity = 0; @@ -1323,17 +1323,17 @@ static void ride_ratings_set(rating_tuple *ratings, sint32 excitement, sint32 in /** * Add to a ride rating with overflow protection. */ -static void ride_ratings_add(rating_tuple * rating, sint32 excitement, sint32 intensity, sint32 nausea) +static void ride_ratings_add(rating_tuple * rating, int32_t excitement, int32_t intensity, int32_t nausea) { - sint32 newExcitement = rating->excitement + excitement; - sint32 newIntensity = rating->intensity + intensity; - sint32 newNausea = rating->nausea + nausea; - rating->excitement = Math::Clamp(0, newExcitement, INT16_MAX); - rating->intensity = Math::Clamp(0, newIntensity, INT16_MAX); - rating->nausea = Math::Clamp(0, newNausea, INT16_MAX); + int32_t newExcitement = rating->excitement + excitement; + int32_t newIntensity = rating->intensity + intensity; + int32_t newNausea = rating->nausea + nausea; + rating->excitement = Math::Clamp(0, newExcitement, INT16_MAX); + rating->intensity = Math::Clamp(0, newIntensity, INT16_MAX); + rating->nausea = Math::Clamp(0, newNausea, INT16_MAX); } -static void ride_ratings_apply_length(rating_tuple *ratings, Ride *ride, sint32 maxLength, sint32 excitementMultiplier) +static void ride_ratings_apply_length(rating_tuple *ratings, Ride *ride, int32_t maxLength, int32_t excitementMultiplier) { ride_ratings_add(ratings, (std::min(ride_get_total_length(ride) >> 16, maxLength) * excitementMultiplier) >> 16, @@ -1341,7 +1341,7 @@ static void ride_ratings_apply_length(rating_tuple *ratings, Ride *ride, sint32 0); } -static void ride_ratings_apply_synchronisation(rating_tuple *ratings, Ride *ride, sint32 excitement, sint32 intensity) +static void ride_ratings_apply_synchronisation(rating_tuple *ratings, Ride *ride, int32_t excitement, int32_t intensity) { if ((ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) && ride_has_adjacent_station(ride) @@ -1350,7 +1350,7 @@ static void ride_ratings_apply_synchronisation(rating_tuple *ratings, Ride *ride } } -static void ride_ratings_apply_train_length(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier) +static void ride_ratings_apply_train_length(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier) { ride_ratings_add(ratings, ((ride->num_cars_per_train - 1) * excitementMultiplier) >> 16, @@ -1358,25 +1358,25 @@ static void ride_ratings_apply_train_length(rating_tuple *ratings, Ride *ride, s 0); } -static void ride_ratings_apply_max_speed(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_max_speed(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { - sint32 modifier = ride->max_speed >> 16; + int32_t modifier = ride->max_speed >> 16; ride_ratings_add(ratings, (modifier * excitementMultiplier) >> 16, (modifier * intensityMultiplier) >> 16, (modifier * nauseaMultiplier) >> 16); } -static void ride_ratings_apply_average_speed(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier) +static void ride_ratings_apply_average_speed(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier) { - sint32 modifier = ride->average_speed >> 16; + int32_t modifier = ride->average_speed >> 16; ride_ratings_add(ratings, (modifier * excitementMultiplier) >> 16, (modifier * intensityMultiplier) >> 16, 0); } -static void ride_ratings_apply_duration(rating_tuple *ratings, Ride *ride, sint32 maxDuration, sint32 excitementMultiplier) +static void ride_ratings_apply_duration(rating_tuple *ratings, Ride *ride, int32_t maxDuration, int32_t excitementMultiplier) { ride_ratings_add(ratings, (std::min(ride_get_total_time(ride), maxDuration) * excitementMultiplier) >> 16, @@ -1384,7 +1384,7 @@ static void ride_ratings_apply_duration(rating_tuple *ratings, Ride *ride, sint3 0); } -static void ride_ratings_apply_gforces(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_gforces(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { rating_tuple subRating = ride_ratings_get_gforce_ratings(ride); ride_ratings_add(ratings, @@ -1393,7 +1393,7 @@ static void ride_ratings_apply_gforces(rating_tuple *ratings, Ride *ride, sint32 (subRating.nausea * nauseaMultiplier) >> 16); } -static void ride_ratings_apply_turns(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_turns(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { rating_tuple subRating = ride_ratings_get_turns_ratings(ride); ride_ratings_add(ratings, @@ -1402,7 +1402,7 @@ static void ride_ratings_apply_turns(rating_tuple *ratings, Ride *ride, sint32 e (subRating.nausea * nauseaMultiplier) >> 16); } -static void ride_ratings_apply_drops(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_drops(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { rating_tuple subRating = ride_ratings_get_drop_ratings(ride); ride_ratings_add(ratings, @@ -1411,7 +1411,7 @@ static void ride_ratings_apply_drops(rating_tuple *ratings, Ride *ride, sint32 e (subRating.nausea * nauseaMultiplier) >> 16); } -static void ride_ratings_apply_sheltered_ratings(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_sheltered_ratings(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { rating_tuple subRating = ride_ratings_get_sheltered_ratings(ride); ride_ratings_add(ratings, @@ -1420,7 +1420,7 @@ static void ride_ratings_apply_sheltered_ratings(rating_tuple *ratings, Ride *ri (subRating.nausea * nauseaMultiplier) >> 16); } -static void ride_ratings_apply_operation_option(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_operation_option(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { ride_ratings_add(ratings, (ride->operation_option * excitementMultiplier) >> 16, @@ -1428,7 +1428,7 @@ static void ride_ratings_apply_operation_option(rating_tuple *ratings, Ride *rid (ride->operation_option * nauseaMultiplier) >> 16); } -static void ride_ratings_apply_rotations(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier, sint32 intensityMultiplier, sint32 nauseaMultiplier) +static void ride_ratings_apply_rotations(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { ride_ratings_add(ratings, ride->rotations * excitementMultiplier, @@ -1436,7 +1436,7 @@ static void ride_ratings_apply_rotations(rating_tuple *ratings, Ride *ride, sint ride->rotations * nauseaMultiplier); } -static void ride_ratings_apply_proximity(rating_tuple *ratings, sint32 excitementMultiplier) +static void ride_ratings_apply_proximity(rating_tuple *ratings, int32_t excitementMultiplier) { ride_ratings_add(ratings, (ride_ratings_get_proximity_score() * excitementMultiplier) >> 16, @@ -1444,7 +1444,7 @@ static void ride_ratings_apply_proximity(rating_tuple *ratings, sint32 excitemen 0); } -static void ride_ratings_apply_scenery(rating_tuple *ratings, Ride *ride, sint32 excitementMultiplier) +static void ride_ratings_apply_scenery(rating_tuple *ratings, Ride *ride, int32_t excitementMultiplier) { ride_ratings_add(ratings, (ride_ratings_get_scenery_score(ride) * excitementMultiplier) >> 16, @@ -1452,7 +1452,7 @@ static void ride_ratings_apply_scenery(rating_tuple *ratings, Ride *ride, sint32 0); } -static void ride_ratings_apply_highest_drop_height_penalty(rating_tuple *ratings, Ride *ride, sint32 minHighestDropHeight, sint32 excitementPenalty, sint32 intensityPenalty, sint32 nauseaPenalty) +static void ride_ratings_apply_highest_drop_height_penalty(rating_tuple *ratings, Ride *ride, int32_t minHighestDropHeight, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { if (ride->highest_drop_height < minHighestDropHeight) { ratings->excitement /= excitementPenalty; @@ -1461,7 +1461,7 @@ static void ride_ratings_apply_highest_drop_height_penalty(rating_tuple *ratings } } -static void ride_ratings_apply_max_speed_penalty(rating_tuple *ratings, Ride *ride, sint32 minMaxSpeed, sint32 excitementPenalty, sint32 intensityPenalty, sint32 nauseaPenalty) +static void ride_ratings_apply_max_speed_penalty(rating_tuple *ratings, Ride *ride, int32_t minMaxSpeed, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { if (ride->max_speed < minMaxSpeed) { ratings->excitement /= excitementPenalty; @@ -1470,7 +1470,7 @@ static void ride_ratings_apply_max_speed_penalty(rating_tuple *ratings, Ride *ri } } -static void ride_ratings_apply_num_drops_penalty(rating_tuple *ratings, Ride *ride, sint32 minNumDrops, sint32 excitementPenalty, sint32 intensityPenalty, sint32 nauseaPenalty) +static void ride_ratings_apply_num_drops_penalty(rating_tuple *ratings, Ride *ride, int32_t minNumDrops, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { if ((ride->drops & 0x3F) < minNumDrops) { ratings->excitement /= excitementPenalty; @@ -1479,7 +1479,7 @@ static void ride_ratings_apply_num_drops_penalty(rating_tuple *ratings, Ride *ri } } -static void ride_ratings_apply_max_negative_g_penalty(rating_tuple *ratings, Ride *ride, sint32 maxMaxNegativeVerticalG, sint32 excitementPenalty, sint32 intensityPenalty, sint32 nauseaPenalty) +static void ride_ratings_apply_max_negative_g_penalty(rating_tuple *ratings, Ride *ride, int32_t maxMaxNegativeVerticalG, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { if (ride->max_negative_vertical_g >= maxMaxNegativeVerticalG) { ratings->excitement /= excitementPenalty; @@ -1488,7 +1488,7 @@ static void ride_ratings_apply_max_negative_g_penalty(rating_tuple *ratings, Rid } } -static void ride_ratings_apply_max_lateral_g_penalty(rating_tuple *ratings, Ride *ride, sint32 minMaxLateralG, sint32 excitementPenalty, sint32 intensityPenalty, sint32 nauseaPenalty) +static void ride_ratings_apply_max_lateral_g_penalty(rating_tuple *ratings, Ride *ride, int32_t minMaxLateralG, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { if (ride->max_lateral_g < minMaxLateralG) { ratings->excitement /= excitementPenalty; @@ -1510,7 +1510,7 @@ static void ride_ratings_apply_excessive_lateral_g_penalty(rating_tuple *ratings #endif } -static void ride_ratings_apply_first_length_penalty(rating_tuple *ratings, Ride *ride, sint32 minFirstLength, sint32 excitementPenalty, sint32 intensityPenalty, sint32 nauseaPenalty) +static void ride_ratings_apply_first_length_penalty(rating_tuple *ratings, Ride *ride, int32_t minFirstLength, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { if (ride->length[0] < minFirstLength) { ratings->excitement /= excitementPenalty; @@ -1760,7 +1760,7 @@ static void ride_ratings_calculate_miniature_railway(Ride *ride) ride->upkeep_cost = ride_compute_upkeep(ride); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - sint32 edx = get_num_of_sheltered_eighths(ride); + int32_t edx = get_num_of_sheltered_eighths(ride); if (((edx >> 8) & 0xFF) >= 4) ride->excitement /= 4; @@ -1796,7 +1796,7 @@ static void ride_ratings_calculate_monorail(Ride *ride) ride->upkeep_cost = ride_compute_upkeep(ride); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - sint32 edx = get_num_of_sheltered_eighths(ride); + int32_t edx = get_num_of_sheltered_eighths(ride); if (((edx >> 8) & 0xFF) >= 4) ride->excitement /= 4; @@ -2012,7 +2012,7 @@ static void ride_ratings_calculate_launched_freefall(Ride *ride) RIDE_RATING(0,45)); } - sint32 excitementModifier = ((ride_get_total_length(ride) >> 16) * 32768) >> 16; + int32_t excitementModifier = ((ride_get_total_length(ride) >> 16) * 32768) >> 16; ride_ratings_add(&ratings, excitementModifier, 0, 0); #ifdef ORIGINAL_RATINGS @@ -2025,7 +2025,7 @@ static void ride_ratings_calculate_launched_freefall(Ride *ride) // Fix #3282: When the ride mode is in downward launch mode, the intensity and // nausea were fixed regardless of how high the ride is. The following // calculation is based on roto-drop which is a similar mechanic. - sint32 lengthFactor = ((ride_get_total_length(ride) >> 16) * 209715) >> 16; + int32_t lengthFactor = ((ride_get_total_length(ride) >> 16) * 209715) >> 16; ride_ratings_add(&ratings, lengthFactor, lengthFactor * 2, lengthFactor * 2); } #endif @@ -2112,7 +2112,7 @@ static void ride_ratings_calculate_observation_tower(Ride *ride) ride->inversions &= 0x1F; ride->inversions |= 7 << 5; - sint32 edx = get_num_of_sheltered_eighths(ride); + int32_t edx = get_num_of_sheltered_eighths(ride); if (((edx >> 8) & 0xFF) >= 5) ride->excitement /= 4; } @@ -2277,7 +2277,7 @@ static void ride_ratings_calculate_chairlift(Ride *ride) ride->upkeep_cost = ride_compute_upkeep(ride); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - sint32 edx = get_num_of_sheltered_eighths(ride); + int32_t edx = get_num_of_sheltered_eighths(ride); if (((edx >> 8) & 0xFF) >= 4) ride->excitement /= 4; @@ -2341,7 +2341,7 @@ static void ride_ratings_calculate_maze(Ride *ride) rating_tuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1,30), RIDE_RATING(0,50), RIDE_RATING(0,00)); - sint32 size = std::min(ride->maze_tiles, 100); + int32_t size = std::min(ride->maze_tiles, 100); ride_ratings_add(&ratings, size, size * 2, @@ -2411,7 +2411,7 @@ static void ride_ratings_calculate_go_karts(Ride *ride) RIDE_RATING(0,50), 0); - sint32 lapsFactor = (ride->num_laps - 1) * 30; + int32_t lapsFactor = (ride->num_laps - 1) * 30; ride_ratings_add(&ratings, lapsFactor, lapsFactor / 2, @@ -2432,7 +2432,7 @@ static void ride_ratings_calculate_go_karts(Ride *ride) ride->upkeep_cost = ride_compute_upkeep(ride); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - sint32 edx = get_num_of_sheltered_eighths(ride); + int32_t edx = get_num_of_sheltered_eighths(ride); ride->inversions &= 0x1F; ride->inversions |= edx << 5; @@ -2854,7 +2854,7 @@ static void ride_ratings_calculate_reverse_freefall_coaster(Ride *ride) static void ride_ratings_calculate_lift(Ride *ride) { - sint32 totalLength; + int32_t totalLength; if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; @@ -3211,7 +3211,7 @@ static void ride_ratings_calculate_suspended_monorail(Ride *ride) ride->upkeep_cost = ride_compute_upkeep(ride); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - sint32 edx = get_num_of_sheltered_eighths(ride); + int32_t edx = get_num_of_sheltered_eighths(ride); if (((edx >> 8) & 0xFF) >= 4) ride->excitement /= 4; @@ -3235,7 +3235,7 @@ static void ride_ratings_calculate_reverser_roller_coaster(Ride *ride) ride_ratings_apply_max_speed(&ratings, ride, 44281, 88562, 35424); ride_ratings_apply_average_speed(&ratings, ride, 364088, 655360); - sint32 numReversers = std::min(gRideRatingsCalcData.num_reversers, 6); + int32_t numReversers = std::min(gRideRatingsCalcData.num_reversers, 6); ride_rating reverserRating = numReversers * RIDE_RATING(0,20); ride_ratings_add(&ratings, reverserRating, @@ -3688,7 +3688,7 @@ static void ride_ratings_calculate_roto_drop(Ride *ride) rating_tuple ratings; ride_ratings_set(&ratings, RIDE_RATING(2,80), RIDE_RATING(3,50), RIDE_RATING(3,50)); - sint32 lengthFactor = ((ride_get_total_length(ride) >> 16) * 209715) >> 16; + int32_t lengthFactor = ((ride_get_total_length(ride) >> 16) * 209715) >> 16; ride_ratings_add(&ratings, lengthFactor, lengthFactor * 2, @@ -4353,7 +4353,7 @@ static const ride_ratings_calculation ride_ratings_calculate_func_table[RIDE_TYP ride_ratings_calculate_lim_launched_roller_coaster, // LIM_LAUNCHED_ROLLER_COASTER }; -static ride_ratings_calculation ride_ratings_get_calculate_func(uint8 rideType) +static ride_ratings_calculation ride_ratings_get_calculate_func(uint8_t rideType) { return ride_ratings_calculate_func_table[rideType]; } diff --git a/src/openrct2/ride/RideRatings.h b/src/openrct2/ride/RideRatings.h index f4741bc8e9..422ac5ab24 100644 --- a/src/openrct2/ride/RideRatings.h +++ b/src/openrct2/ride/RideRatings.h @@ -16,7 +16,7 @@ using ride_rating = fixed16_2dp; // Convenience function for writing ride ratings. The result is a 16 bit signed // integer. To create the ride rating 3.65 type RIDE_RATING(3,65) #define RIDE_RATING(whole, fraction) FIXED_2DP(whole, fraction) -#define RIDE_RATING_UNDEFINED (ride_rating)(uint16)0xFFFF +#define RIDE_RATING_UNDEFINED (ride_rating)(uint16_t)0xFFFF #pragma pack(push, 1) @@ -35,21 +35,21 @@ enum { }; struct rct_ride_rating_calc_data { - uint16 proximity_x; - uint16 proximity_y; - uint16 proximity_z; - uint16 proximity_start_x; - uint16 proximity_start_y; - uint16 proximity_start_z; - uint8 current_ride; - uint8 state; - uint8 proximity_track_type; - uint8 proximity_base_height; - uint16 proximity_total; - uint16 proximity_scores[26]; - uint16 num_brakes; - uint16 num_reversers; - uint16 station_flags; + uint16_t proximity_x; + uint16_t proximity_y; + uint16_t proximity_z; + uint16_t proximity_start_x; + uint16_t proximity_start_y; + uint16_t proximity_start_z; + uint8_t current_ride; + uint8_t state; + uint8_t proximity_track_type; + uint8_t proximity_base_height; + uint16_t proximity_total; + uint16_t proximity_scores[26]; + uint16_t num_brakes; + uint16_t num_reversers; + uint16_t station_flags; }; extern rct_ride_rating_calc_data gRideRatingsCalcData; diff --git a/src/openrct2/ride/ShopItem.cpp b/src/openrct2/ride/ShopItem.cpp index 99543b909f..8b27fdd7fb 100644 --- a/src/openrct2/ride/ShopItem.cpp +++ b/src/openrct2/ride/ShopItem.cpp @@ -12,8 +12,8 @@ #include "../sprites.h" #include "ShopItem.h" -uint32 gSamePriceThroughoutParkA; -uint32 gSamePriceThroughoutParkB; +uint32_t gSamePriceThroughoutParkA; +uint32_t gSamePriceThroughoutParkB; /** rct2: 0x00982164 */ static const rct_shop_item_stats ShopItemStats[SHOP_ITEM_COUNT] = @@ -193,7 +193,7 @@ const rct_shop_item_string_types ShopItemStringIds[SHOP_ITEM_COUNT] = { STR_SHOP_ITEM_PRICE_LABEL_EMPTY_BOWL_BLUE, STR_SHOP_ITEM_SINGULAR_EMPTY_BOWL_BLUE, STR_SHOP_ITEM_PLURAL_EMPTY_BOWL_BLUE, STR_SHOP_ITEM_INDEFINITE_EMPTY_BOWL_BLUE, STR_SHOP_ITEM_DISPLAY_EMPTY_BOWL_BLUE }, }; -const uint32 ShopItemImage[SHOP_ITEM_COUNT] = +const uint32_t ShopItemImage[SHOP_ITEM_COUNT] = { SPR_SHOP_ITEM_BALLOON, SPR_SHOP_ITEM_TOY, @@ -251,31 +251,31 @@ const uint32 ShopItemImage[SHOP_ITEM_COUNT] = SPR_SHOP_ITEM_EMPTY_BOWL_BLUE, }; -money32 get_shop_item_cost(sint32 shopItem) +money32 get_shop_item_cost(int32_t shopItem) { return ShopItemStats[shopItem].cost; } -money16 get_shop_base_value(sint32 shopItem) +money16 get_shop_base_value(int32_t shopItem) { return ShopItemStats[shopItem].base_value; } -money16 get_shop_cold_value(sint32 shopItem) +money16 get_shop_cold_value(int32_t shopItem) { return ShopItemStats[shopItem].cold_value; } -money16 get_shop_hot_value(sint32 shopItem) +money16 get_shop_hot_value(int32_t shopItem) { return ShopItemStats[shopItem].hot_value; } -money32 shop_item_get_common_price(Ride* forRide, sint32 shopItem) +money32 shop_item_get_common_price(Ride* forRide, int32_t shopItem) { rct_ride_entry* rideEntry; Ride* ride; - sint32 i; + int32_t i; FOR_ALL_RIDES(i, ride) { @@ -304,14 +304,14 @@ money32 shop_item_get_common_price(Ride* forRide, sint32 shopItem) return MONEY32_UNDEFINED; } -bool shop_item_is_photo(sint32 shopItem) +bool shop_item_is_photo(int32_t shopItem) { return ( shopItem == SHOP_ITEM_PHOTO || shopItem == SHOP_ITEM_PHOTO2 || shopItem == SHOP_ITEM_PHOTO3 || shopItem == SHOP_ITEM_PHOTO4); } -bool shop_item_has_common_price(sint32 shopItem) +bool shop_item_has_common_price(int32_t shopItem) { if (shopItem < 32) { @@ -323,7 +323,7 @@ bool shop_item_has_common_price(sint32 shopItem) } } -bool shop_item_is_food_or_drink(sint32 shopItem) +bool shop_item_is_food_or_drink(int32_t shopItem) { switch (shopItem) { @@ -361,7 +361,7 @@ bool shop_item_is_food_or_drink(sint32 shopItem) } } -bool shop_item_is_food(sint32 shopItem) +bool shop_item_is_food(int32_t shopItem) { switch (shopItem) { @@ -391,7 +391,7 @@ bool shop_item_is_food(sint32 shopItem) } } -bool shop_item_is_drink(sint32 shopItem) +bool shop_item_is_drink(int32_t shopItem) { switch (shopItem) { @@ -409,7 +409,7 @@ bool shop_item_is_drink(sint32 shopItem) } } -bool shop_item_is_souvenir(sint32 shopItem) +bool shop_item_is_souvenir(int32_t shopItem) { switch (shopItem) { diff --git a/src/openrct2/ride/ShopItem.h b/src/openrct2/ride/ShopItem.h index aad7b3fa55..7d5cbd89d4 100644 --- a/src/openrct2/ride/ShopItem.h +++ b/src/openrct2/ride/ShopItem.h @@ -72,10 +72,10 @@ enum struct rct_shop_item_stats { - uint16 cost; - uint16 base_value; - uint16 hot_value; - uint16 cold_value; + uint16_t cost; + uint16_t base_value; + uint16_t hot_value; + uint16_t cold_value; }; struct rct_shop_item_string_types @@ -87,21 +87,21 @@ struct rct_shop_item_string_types rct_string_id display; // "Diamond Heights" Balloon }; -extern uint32 gSamePriceThroughoutParkA; -extern uint32 gSamePriceThroughoutParkB; +extern uint32_t gSamePriceThroughoutParkA; +extern uint32_t gSamePriceThroughoutParkB; extern const money8 DefaultShopItemPrice[SHOP_ITEM_COUNT]; extern const rct_shop_item_string_types ShopItemStringIds[SHOP_ITEM_COUNT]; -extern const uint32 ShopItemImage[SHOP_ITEM_COUNT]; +extern const uint32_t ShopItemImage[SHOP_ITEM_COUNT]; -money32 get_shop_item_cost(sint32 shopItem); -money16 get_shop_base_value(sint32 shopItem); -money16 get_shop_hot_value(sint32 shopItem); -money16 get_shop_cold_value(sint32 shopItem); -money32 shop_item_get_common_price(Ride *forRide, sint32 shopItem); -bool shop_item_is_photo(sint32 shopItem); -bool shop_item_has_common_price(sint32 shopItem); -bool shop_item_is_food_or_drink(sint32 shopItem); -bool shop_item_is_food(sint32 shopItem); -bool shop_item_is_drink(sint32 shopItem); -bool shop_item_is_souvenir(sint32 shopItem); +money32 get_shop_item_cost(int32_t shopItem); +money16 get_shop_base_value(int32_t shopItem); +money16 get_shop_hot_value(int32_t shopItem); +money16 get_shop_cold_value(int32_t shopItem); +money32 shop_item_get_common_price(Ride *forRide, int32_t shopItem); +bool shop_item_is_photo(int32_t shopItem); +bool shop_item_has_common_price(int32_t shopItem); +bool shop_item_is_food_or_drink(int32_t shopItem); +bool shop_item_is_food(int32_t shopItem); +bool shop_item_is_drink(int32_t shopItem); +bool shop_item_is_souvenir(int32_t shopItem); diff --git a/src/openrct2/ride/Station.cpp b/src/openrct2/ride/Station.cpp index 49f6a9c86c..8e8c42e429 100644 --- a/src/openrct2/ride/Station.cpp +++ b/src/openrct2/ride/Station.cpp @@ -13,18 +13,18 @@ #include "../scenario/Scenario.h" #include "../world/Sprite.h" -static void ride_update_station_blocksection(Ride * ride, sint32 stationIndex); -static void ride_update_station_bumpercar(Ride * ride, sint32 stationIndex); -static void ride_update_station_normal(Ride * ride, sint32 stationIndex); -static void ride_update_station_race(Ride * ride, sint32 stationIndex); +static void ride_update_station_blocksection(Ride * ride, int32_t stationIndex); +static void ride_update_station_bumpercar(Ride * ride, int32_t stationIndex); +static void ride_update_station_normal(Ride * ride, int32_t stationIndex); +static void ride_update_station_race(Ride * ride, int32_t stationIndex); static void ride_race_init_vehicle_speeds(Ride * ride); -static void ride_invalidate_station_start(Ride * ride, sint32 stationIndex, bool greenLight); +static void ride_invalidate_station_start(Ride * ride, int32_t stationIndex, bool greenLight); /** * * rct2: 0x006ABFFB */ -void ride_update_station(Ride * ride, sint32 stationIndex) +void ride_update_station(Ride * ride, int32_t stationIndex) { if (ride->station_starts[stationIndex].xy == RCT_XY8_UNDEFINED) return; @@ -51,7 +51,7 @@ void ride_update_station(Ride * ride, sint32 stationIndex) * * rct2: 0x006AC0A1 */ -static void ride_update_station_blocksection(Ride * ride, sint32 stationIndex) +static void ride_update_station_blocksection(Ride * ride, int32_t stationIndex) { rct_tile_element * tileElement = ride_get_station_start_track_element(ride, stationIndex); @@ -80,7 +80,7 @@ static void ride_update_station_blocksection(Ride * ride, sint32 stationIndex) * * rct2: 0x006AC12B */ -static void ride_update_station_bumpercar(Ride * ride, sint32 stationIndex) +static void ride_update_station_bumpercar(Ride * ride, int32_t stationIndex) { // Change of station depart flag should really call invalidate_station_start // but since dodgems do not have station lights there is no point. @@ -93,9 +93,9 @@ static void ride_update_station_bumpercar(Ride * ride, sint32 stationIndex) if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { - sint32 dx = ride->time_limit * 32; - sint32 dl = dx & 0xFF; - sint32 dh = (dx >> 8) & 0xFF; + int32_t dx = ride->time_limit * 32; + int32_t dl = dx & 0xFF; + int32_t dh = (dx >> 8) & 0xFF; for (size_t i = 0; i < ride->num_vehicles; i++) { rct_vehicle * vehicle = &(get_sprite(ride->vehicles[i])->vehicle); @@ -135,9 +135,9 @@ static void ride_update_station_bumpercar(Ride * ride, sint32 stationIndex) * * rct2: 0x006AC02C */ -static void ride_update_station_normal(Ride * ride, sint32 stationIndex) +static void ride_update_station_normal(Ride * ride, int32_t stationIndex) { - sint32 time = ride->station_depart[stationIndex] & STATION_DEPART_MASK; + int32_t time = ride->station_depart[stationIndex] & STATION_DEPART_MASK; if ((ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) || (ride->status == RIDE_STATUS_CLOSED && ride->num_riders == 0)) { @@ -169,7 +169,7 @@ static void ride_update_station_normal(Ride * ride, sint32 stationIndex) * * rct2: 0x006AC1DF */ -static void ride_update_station_race(Ride * ride, sint32 stationIndex) +static void ride_update_station_race(Ride * ride, int32_t stationIndex) { if (ride->status == RIDE_STATUS_CLOSED || (ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) @@ -184,7 +184,7 @@ static void ride_update_station_race(Ride * ride, sint32 stationIndex) if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { - sint32 numLaps = ride->num_laps; + int32_t numLaps = ride->num_laps; for (size_t i = 0; i < ride->num_vehicles; i++) { rct_vehicle * vehicle = &(get_sprite(ride->vehicles[i])->vehicle); @@ -288,10 +288,10 @@ static void ride_race_init_vehicle_speeds(Ride * ride) * * rct2: 0x006AC2C7 */ -static void ride_invalidate_station_start(Ride * ride, sint32 stationIndex, bool greenLight) +static void ride_invalidate_station_start(Ride * ride, int32_t stationIndex, bool greenLight) { - sint32 x = ride->station_starts[stationIndex].x * 32; - sint32 y = ride->station_starts[stationIndex].y * 32; + int32_t x = ride->station_starts[stationIndex].x * 32; + int32_t y = ride->station_starts[stationIndex].y * 32; rct_tile_element * tileElement = ride_get_station_start_track_element(ride, stationIndex); // If no station track found return @@ -304,11 +304,11 @@ static void ride_invalidate_station_start(Ride * ride, sint32 stationIndex, bool map_invalidate_tile_zoom1(x, y, tileElement->base_height * 8, tileElement->clearance_height * 8); } -rct_tile_element * ride_get_station_start_track_element(Ride * ride, sint32 stationIndex) +rct_tile_element * ride_get_station_start_track_element(Ride * ride, int32_t stationIndex) { - sint32 x = ride->station_starts[stationIndex].x; - sint32 y = ride->station_starts[stationIndex].y; - sint32 z = ride->station_heights[stationIndex]; + int32_t x = ride->station_starts[stationIndex].x; + int32_t y = ride->station_starts[stationIndex].y; + int32_t z = ride->station_heights[stationIndex]; // Find the station track element rct_tile_element * tileElement = map_get_first_element_at(x, y); @@ -323,7 +323,7 @@ rct_tile_element * ride_get_station_start_track_element(Ride * ride, sint32 stat return nullptr; } -rct_tile_element * ride_get_station_exit_element(sint32 x, sint32 y, sint32 z) +rct_tile_element * ride_get_station_exit_element(int32_t x, int32_t y, int32_t z) { // Find the station track element rct_tile_element * tileElement = map_get_first_element_at(x, y); @@ -337,9 +337,9 @@ rct_tile_element * ride_get_station_exit_element(sint32 x, sint32 y, sint32 z) return nullptr; } -sint8 ride_get_first_valid_station_exit(Ride * ride) +int8_t ride_get_first_valid_station_exit(Ride * ride) { - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { if (ride->exits[i].x != COORDS_NULL) { @@ -349,9 +349,9 @@ sint8 ride_get_first_valid_station_exit(Ride * ride) return -1; } -sint8 ride_get_first_valid_station_start(const Ride * ride) +int8_t ride_get_first_valid_station_start(const Ride * ride) { - for (sint8 i = 0; i < MAX_STATIONS; i++) + for (int8_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy != RCT_XY8_UNDEFINED) { @@ -361,9 +361,9 @@ sint8 ride_get_first_valid_station_start(const Ride * ride) return -1; } -sint8 ride_get_first_empty_station_start(const Ride * ride) +int8_t ride_get_first_empty_station_start(const Ride * ride) { - for (sint8 i = 0; i < MAX_STATIONS; i++) + for (int8_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED) { @@ -373,48 +373,48 @@ sint8 ride_get_first_empty_station_start(const Ride * ride) return -1; } -TileCoordsXYZD ride_get_entrance_location(const sint32 rideIndex, const sint32 stationIndex) +TileCoordsXYZD ride_get_entrance_location(const int32_t rideIndex, const int32_t stationIndex) { const Ride * ride = get_ride(rideIndex); return ride->entrances[stationIndex]; } -TileCoordsXYZD ride_get_exit_location(const sint32 rideIndex, const sint32 stationIndex) +TileCoordsXYZD ride_get_exit_location(const int32_t rideIndex, const int32_t stationIndex) { const Ride * ride = get_ride(rideIndex); return ride->exits[stationIndex]; } -TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const sint32 stationIndex) +TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const int32_t stationIndex) { return ride->entrances[stationIndex]; } -TileCoordsXYZD ride_get_exit_location(const Ride * ride, const sint32 stationIndex) +TileCoordsXYZD ride_get_exit_location(const Ride * ride, const int32_t stationIndex) { return ride->exits[stationIndex]; } void ride_clear_entrance_location( Ride * ride, - const sint32 stationIndex) + const int32_t stationIndex) { ride->entrances[stationIndex].x = COORDS_NULL; } void ride_clear_exit_location( Ride * ride, - const sint32 stationIndex) + const int32_t stationIndex) { ride->exits[stationIndex].x = COORDS_NULL; } -void ride_set_entrance_location(Ride * ride, const sint32 stationIndex, const TileCoordsXYZD location) +void ride_set_entrance_location(Ride * ride, const int32_t stationIndex, const TileCoordsXYZD location) { ride->entrances[stationIndex] = location; } -void ride_set_exit_location(Ride * ride, const sint32 stationIndex, const TileCoordsXYZD location) +void ride_set_exit_location(Ride * ride, const int32_t stationIndex, const TileCoordsXYZD location) { ride->exits[stationIndex] = location; } diff --git a/src/openrct2/ride/Station.h b/src/openrct2/ride/Station.h index 19f58608d1..a252f0dd00 100644 --- a/src/openrct2/ride/Station.h +++ b/src/openrct2/ride/Station.h @@ -12,18 +12,18 @@ #include "../common.h" #include "Ride.h" -void ride_update_station(Ride * ride, sint32 stationIndex); -sint8 ride_get_first_valid_station_exit(Ride * ride); -sint8 ride_get_first_valid_station_start(const Ride * ride); -sint8 ride_get_first_empty_station_start(const Ride * ride); +void ride_update_station(Ride * ride, int32_t stationIndex); +int8_t ride_get_first_valid_station_exit(Ride * ride); +int8_t ride_get_first_valid_station_start(const Ride * ride); +int8_t ride_get_first_empty_station_start(const Ride * ride); -TileCoordsXYZD ride_get_entrance_location(const sint32 rideIndex, const sint32 stationIndex); -TileCoordsXYZD ride_get_exit_location(const sint32 rideIndex, const sint32 stationIndex); -TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const sint32 stationIndex); -TileCoordsXYZD ride_get_exit_location(const Ride * ride, const sint32 stationIndex); +TileCoordsXYZD ride_get_entrance_location(const int32_t rideIndex, const int32_t stationIndex); +TileCoordsXYZD ride_get_exit_location(const int32_t rideIndex, const int32_t stationIndex); +TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const int32_t stationIndex); +TileCoordsXYZD ride_get_exit_location(const Ride * ride, const int32_t stationIndex); -void ride_clear_entrance_location(Ride * ride, const sint32 stationIndex); -void ride_clear_exit_location(Ride * ride, const sint32 stationIndex); +void ride_clear_entrance_location(Ride * ride, const int32_t stationIndex); +void ride_clear_exit_location(Ride * ride, const int32_t stationIndex); -void ride_set_entrance_location(Ride * ride, const sint32 stationIndex, const TileCoordsXYZD location); -void ride_set_exit_location(Ride * ride, const sint32 stationIndex, const TileCoordsXYZD location); +void ride_set_entrance_location(Ride * ride, const int32_t stationIndex, const TileCoordsXYZD location); +void ride_set_exit_location(Ride * ride, const int32_t stationIndex, const TileCoordsXYZD location); diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 9f318ecd5a..03e80da97e 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -34,7 +34,7 @@ #include "TrackData.h" #include "TrackDesign.h" -uint8 gTrackGroundFlags; +uint8_t gTrackGroundFlags; /** rct2: 0x00997C9D */ // clang-format off @@ -564,9 +564,9 @@ const rct_trackdefinition FlatRideTrackDefinitions[256] = /** * Helper method to determine if a connects to b by its bank and angle, not location. */ -sint32 track_is_connected_by_shape(rct_tile_element * a, rct_tile_element * b) +int32_t track_is_connected_by_shape(rct_tile_element * a, rct_tile_element * b) { - sint32 trackType, aBank, aAngle, bBank, bAngle; + int32_t trackType, aBank, aAngle, bBank, bAngle; trackType = track_element_get_type(a); aBank = TrackDefinitions[trackType].bank_end; @@ -581,26 +581,26 @@ sint32 track_is_connected_by_shape(rct_tile_element * a, rct_tile_element * b) return aBank == bBank && aAngle == bAngle; } -const rct_preview_track * get_track_def_from_ride(Ride * ride, sint32 trackType) +const rct_preview_track * get_track_def_from_ride(Ride * ride, int32_t trackType) { return ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? FlatRideTrackBlocks[trackType] : TrackBlocks[trackType]; } -const rct_track_coordinates * get_track_coord_from_ride(Ride * ride, sint32 trackType) +const rct_track_coordinates * get_track_coord_from_ride(Ride * ride, int32_t trackType) { return ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? &FlatTrackCoordinates[trackType] : &TrackCoordinates[trackType]; } -const rct_preview_track * get_track_def_from_ride_index(sint32 rideIndex, sint32 trackType) +const rct_preview_track * get_track_def_from_ride_index(int32_t rideIndex, int32_t trackType) { return get_track_def_from_ride(get_ride(rideIndex), trackType); } -static rct_tile_element * find_station_element(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 rideIndex) +static rct_tile_element * find_station_element(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex) { rct_tile_element * tileElement = map_get_first_element_at(x >> 5, y >> 5); do @@ -622,9 +622,9 @@ static rct_tile_element * find_station_element(sint32 x, sint32 y, sint32 z, sin return nullptr; } -static void ride_remove_station(Ride * ride, sint32 x, sint32 y, sint32 z) +static void ride_remove_station(Ride * ride, int32_t x, int32_t y, int32_t z) { - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { if (ride->station_starts[i].x == (x >> 5) && ride->station_starts[i].y == (y >> 5) && @@ -641,13 +641,13 @@ static void ride_remove_station(Ride * ride, sint32 x, sint32 y, sint32 z) * * rct2: 0x006C4D89 */ -static bool track_add_station_element(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 rideIndex, sint32 flags) +static bool track_add_station_element(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex, int32_t flags) { - sint32 stationX0 = x; - sint32 stationY0 = y; - sint32 stationX1 = x; - sint32 stationY1 = y; - sint32 stationLength = 1; + int32_t stationX0 = x; + int32_t stationY0 = y; + int32_t stationX1 = x; + int32_t stationY1 = y; + int32_t stationLength = 1; Ride * ride = get_ride(rideIndex); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_3)) @@ -659,7 +659,7 @@ static bool track_add_station_element(sint32 x, sint32 y, sint32 z, sint32 direc } if (flags & GAME_COMMAND_FLAG_APPLY) { - sint8 stationIndex = ride_get_first_empty_station_start(ride); + int8_t stationIndex = ride_get_first_empty_station_start(ride); assert(stationIndex != -1); ride->station_starts[stationIndex].x = (x >> 5); @@ -751,10 +751,10 @@ static bool track_add_station_element(sint32 x, sint32 y, sint32 z, sint32 direc stationElement = find_station_element(x, y, z, direction, rideIndex); if (stationElement != nullptr) { - sint32 targetTrackType; + int32_t targetTrackType; if (x == stationX1 && y == stationY1) { - sint8 stationIndex = ride_get_first_empty_station_start(ride); + int8_t stationIndex = ride_get_first_empty_station_start(ride); assert(stationIndex != -1); ride->station_starts[stationIndex].x = (x >> 5); @@ -795,16 +795,16 @@ static bool track_add_station_element(sint32 x, sint32 y, sint32 z, sint32 direc * * rct2: 0x006C494B */ -static bool track_remove_station_element(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 rideIndex, sint32 flags) +static bool track_remove_station_element(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex, int32_t flags) { - sint32 removeX = x; - sint32 removeY = y; - sint32 stationX0 = x; - sint32 stationY0 = y; - sint32 stationX1 = x; - sint32 stationY1 = y; - sint32 stationLength = 0; - sint32 byte_F441D1 = -1; + int32_t removeX = x; + int32_t removeY = y; + int32_t stationX0 = x; + int32_t stationY0 = y; + int32_t stationX1 = x; + int32_t stationY1 = y; + int32_t stationLength = 0; + int32_t byte_F441D1 = -1; Ride * ride = get_ride(rideIndex); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_3)) @@ -897,11 +897,11 @@ static bool track_remove_station_element(sint32 x, sint32 y, sint32 z, sint32 di stationElement = find_station_element(x, y, z, direction, rideIndex); if (stationElement != nullptr) { - sint32 targetTrackType; + int32_t targetTrackType; if (x == stationX1 && y == stationY1) { loc_6C4BF5:; - sint8 stationIndex = ride_get_first_empty_station_start(ride); + int8_t stationIndex = ride_get_first_empty_station_start(ride); assert(stationIndex != -1); ride->station_starts[stationIndex].x = (x >> 5); @@ -959,17 +959,17 @@ static bool track_remove_station_element(sint32 x, sint32 y, sint32 z, sint32 di return true; } -static money32 track_place(sint32 rideIndex, - sint32 type, - sint32 originX, - sint32 originY, - sint32 originZ, - sint32 direction, - sint32 brakeSpeed, - sint32 colour, - sint32 seatRotation, - sint32 liftHillAndAlternativeState, - sint32 flags) +static money32 track_place(int32_t rideIndex, + int32_t type, + int32_t originX, + int32_t originY, + int32_t originZ, + int32_t direction, + int32_t brakeSpeed, + int32_t colour, + int32_t seatRotation, + int32_t liftHillAndAlternativeState, + int32_t flags) { Ride * ride = get_ride(rideIndex); if (ride == nullptr) @@ -994,11 +994,11 @@ static money32 track_place(sint32 rideIndex, gCommandPosition.x = originX + 16; gCommandPosition.y = originY + 16; gCommandPosition.z = originZ; - sint16 trackpieceZ = originZ; + int16_t trackpieceZ = originZ; direction &= 3; gTrackGroundFlags = 0; - uint32 rideTypeFlags = RideProperties[ride->type].flags; + uint32_t rideTypeFlags = RideProperties[ride->type].flags; if ((ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) && type == TRACK_ELEM_END_STATION) { @@ -1015,7 +1015,7 @@ static money32 track_place(sint32 rideIndex, } } - const uint8 (* wallEdges)[16]; + const uint8_t (* wallEdges)[16]; if (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) { wallEdges = &FlatRideTrackSequenceElementAllowedWallEdges[type]; @@ -1055,12 +1055,12 @@ static money32 track_place(sint32 rideIndex, money32 cost = 0; const rct_preview_track * trackBlock = get_track_def_from_ride(ride, type); - uint32 num_elements = 0; + uint32_t num_elements = 0; // First check if any of the track pieces are outside the park for (; trackBlock->index != 0xFF; trackBlock++) { - sint32 offsetX = 0; - sint32 offsetY = 0; + int32_t offsetX = 0; + int32_t offsetY = 0; switch (direction) { @@ -1082,9 +1082,9 @@ static money32 track_place(sint32 rideIndex, break; } - sint32 x = originX + offsetX; - sint32 y = originY + offsetY; - sint32 z = originZ + trackBlock->z; + int32_t x = originX + offsetX; + int32_t y = originY + offsetY; + int32_t z = originZ + trackBlock->z; if (!map_is_location_owned(x, y, z) && !gCheatsSandboxMode) { @@ -1098,7 +1098,7 @@ static money32 track_place(sint32 rideIndex, { return MONEY32_UNDEFINED; } - const uint16 * trackFlags = (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) ? + const uint16_t * trackFlags = (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) ? FlatTrackFlags : TrackFlags; if (trackFlags[type] & TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT) @@ -1121,12 +1121,12 @@ static money32 track_place(sint32 rideIndex, // If that is not the case, then perform the remaining checks trackBlock = get_track_def_from_ride(ride, type); - for (sint32 blockIndex = 0; trackBlock->index != 0xFF; trackBlock++, blockIndex++) + for (int32_t blockIndex = 0; trackBlock->index != 0xFF; trackBlock++, blockIndex++) { - sint32 offsetX = 0; - sint32 offsetY = 0; - sint32 bl = trackBlock->var_08; - sint32 bh; + int32_t offsetX = 0; + int32_t offsetY = 0; + int32_t bl = trackBlock->var_08; + int32_t bh; switch (direction) { case 0: @@ -1164,9 +1164,9 @@ static money32 track_place(sint32 rideIndex, bl |= bh; break; } - sint32 x = originX + offsetX; - sint32 y = originY + offsetY; - sint32 z = originZ + trackBlock->z; + int32_t x = originX + offsetX; + int32_t y = originY + offsetY; + int32_t z = originZ + trackBlock->z; trackpieceZ = z; @@ -1176,9 +1176,9 @@ static money32 track_place(sint32 rideIndex, return MONEY32_UNDEFINED; } - sint32 baseZ = (originZ + trackBlock->z) / 8; + int32_t baseZ = (originZ + trackBlock->z) / 8; - sint32 clearanceZ = trackBlock->var_07; + int32_t clearanceZ = trackBlock->var_07; if (trackBlock->var_09 & (1 << 2) && RideData5[ride->type].clearance_height > 24) { clearanceZ += 24; @@ -1201,7 +1201,7 @@ static money32 track_place(sint32 rideIndex, if (!gCheatsDisableClearanceChecks || flags & GAME_COMMAND_FLAG_GHOST) { - uint8 crossingMode = (ride->type == RIDE_TYPE_MINIATURE_RAILWAY && type == TRACK_ELEM_FLAT) ? + uint8_t crossingMode = (ride->type == RIDE_TYPE_MINIATURE_RAILWAY && type == TRACK_ELEM_FLAT) ? CREATE_CROSSING_MODE_TRACK_OVER_PATH : CREATE_CROSSING_MODE_NONE; if (!map_can_construct_with_clear_at(x, y, baseZ, clearanceZ, &map_place_non_scenery_clear_func, bl, flags, &cost, crossingMode)) @@ -1220,9 +1220,9 @@ static money32 track_place(sint32 rideIndex, else { // Remove walls in the directions this track intersects - uint8 intersectingDirections = (*wallEdges)[blockIndex]; + uint8_t intersectingDirections = (*wallEdges)[blockIndex]; intersectingDirections ^= 0x0F; - for (sint32 i = 0; i < 4; i++) + for (int32_t i = 0; i < 4; i++) { if (intersectingDirections & (1 << i)) { @@ -1296,7 +1296,7 @@ static money32 track_place(sint32 rideIndex, { tileElement = map_get_surface_element_at({x, y}); - uint8 water_height = surface_get_water_height(tileElement) * 2; + uint8_t water_height = surface_get_water_height(tileElement) * 2; if (water_height == 0) { gGameCommandErrorText = STR_CAN_ONLY_BUILD_THIS_ON_WATER; @@ -1323,7 +1323,7 @@ static money32 track_place(sint32 rideIndex, } } - sint32 entranceDirections; + int32_t entranceDirections; if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) { entranceDirections = FlatRideTrackSequenceProperties[type][0]; @@ -1349,12 +1349,12 @@ static money32 track_place(sint32 rideIndex, !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsDisableClearanceChecks) { - uint8 _bl = entranceDirections; - for (sint32 dl = bitscanforward(_bl); dl != -1; dl = bitscanforward(_bl)) + uint8_t _bl = entranceDirections; + for (int32_t dl = bitscanforward(_bl); dl != -1; dl = bitscanforward(_bl)) { _bl &= ~(1 << dl); - sint32 temp_x = x, temp_y = y; - sint32 temp_direction = (direction + dl) & 3; + int32_t temp_x = x, temp_y = y; + int32_t temp_direction = (direction + dl) & 3; temp_x += CoordsDirectionDelta[temp_direction].x; temp_y += CoordsDirectionDelta[temp_direction].y; temp_direction ^= (1 << 1); @@ -1367,11 +1367,11 @@ static money32 track_place(sint32 rideIndex, tileElement = map_get_surface_element_at({x, y}); if (!gCheatsDisableSupportLimits) { - sint32 ride_height = clearanceZ - tileElement->base_height; + int32_t ride_height = clearanceZ - tileElement->base_height; if (ride_height >= 0) { - uint16 maxHeight; + uint16_t maxHeight; if (RideGroupManager::RideTypeIsIndependent(ride->type) && rideEntry->max_height != 0) { @@ -1396,7 +1396,7 @@ static money32 track_place(sint32 rideIndex, } } - sint32 _support_height = baseZ - tileElement->base_height; + int32_t _support_height = baseZ - tileElement->base_height; if (_support_height < 0) { _support_height = 10; @@ -1476,7 +1476,7 @@ static money32 track_place(sint32 rideIndex, assert(tileElement != nullptr); tileElement->clearance_height = clearanceZ; - uint8 map_type = direction; + uint8_t map_type = direction; map_type |= TILE_ELEMENT_TYPE_TRACK; if (liftHillAndAlternativeState & CONSTRUCTION_LIFT_HILL_SELECTED) { @@ -1588,20 +1588,20 @@ static money32 track_place(sint32 rideIndex, * rct2: 0x006C511D */ void game_command_place_track( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = track_place( *edx & 0xFF, (*edx >> 8) & 0xFF, - (sint16) (*eax & 0xFFFF), - (sint16) (*ecx & 0xFFFF), - (sint16) (*edi & 0xFFFF), + (int16_t) (*eax & 0xFFFF), + (int16_t) (*ecx & 0xFFFF), + (int16_t) (*edi & 0xFFFF), (*ebx >> 8) & 0xFF, (*edi >> 16) & 0xFF, (*edi >> 24) & 0x0F, @@ -1611,19 +1611,19 @@ void game_command_place_track( ); } -static money32 track_remove(uint8 type, - uint8 sequence, - sint16 originX, - sint16 originY, - sint16 originZ, - uint8 rotation, - uint8 flags) +static money32 track_remove(uint8_t type, + uint8_t sequence, + int16_t originX, + int16_t originY, + int16_t originZ, + uint8_t rotation, + uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION; gCommandPosition.x = originX + 16; gCommandPosition.y = originY + 16; gCommandPosition.z = originZ; - sint16 trackpieceZ = originZ; + int16_t trackpieceZ = originZ; switch (type) { @@ -1664,7 +1664,7 @@ static money32 track_remove(uint8 type, if (tileElement->IsGhost() != isGhost) continue; - uint8 track_type = track_element_get_type(tileElement); + uint8_t track_type = track_element_get_type(tileElement); switch (track_type) { case TRACK_ELEM_BEGIN_STATION: @@ -1692,7 +1692,7 @@ static money32 track_remove(uint8 type, return MONEY32_UNDEFINED; } - uint8 rideIndex = track_element_get_ride_index(tileElement); + uint8_t rideIndex = track_element_get_ride_index(tileElement); type = track_element_get_type(tileElement); bool isLiftHill = track_element_is_lift_hill(tileElement); @@ -1700,7 +1700,7 @@ static money32 track_remove(uint8 type, const rct_preview_track * trackBlock = get_track_def_from_ride(ride, type); trackBlock += tile_element_get_track_sequence(tileElement); - uint8 originDirection = tile_element_get_direction(tileElement); + uint8_t originDirection = tile_element_get_direction(tileElement); switch (originDirection) { case 0: @@ -1728,7 +1728,7 @@ static money32 track_remove(uint8 type, trackBlock = get_track_def_from_ride(ride, type); for (; trackBlock->index != 255; trackBlock++) { - sint16 x = originX, y = originY, z = originZ; + int16_t x = originX, y = originY, z = originZ; switch (originDirection) { @@ -1792,7 +1792,7 @@ static money32 track_remove(uint8 type, return MONEY32_UNDEFINED; } - sint32 entranceDirections; + int32_t entranceDirections; if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) { entranceDirections = FlatRideTrackSequenceProperties[type][0]; @@ -1816,7 +1816,7 @@ static money32 track_remove(uint8 type, return MONEY32_UNDEFINED; } - sint8 _support_height = tileElement->base_height - surfaceElement->base_height; + int8_t _support_height = tileElement->base_height - surfaceElement->base_height; if (_support_height < 0) { _support_height = 10; @@ -1929,7 +1929,7 @@ static money32 track_remove(uint8 type, * rct2: 0x006C5B69 */ void game_command_remove_track( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, [[maybe_unused]] sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, [[maybe_unused]] int32_t * ebp) { *ebx = track_remove( *edx & 0xFF, @@ -1947,19 +1947,19 @@ void game_command_remove_track( * rct2: 0x006C5AE9 */ void game_command_set_brakes_speed( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - sint32 x = (*eax & 0xFFFF); - sint32 y = (*ecx & 0xFFFF); - sint32 z = (*edi & 0xFFFF); - sint32 trackType = (*edx & 0xFF); - sint32 brakesSpeed = ((*ebx >> 8) & 0xFF); + int32_t x = (*eax & 0xFFFF); + int32_t y = (*ecx & 0xFFFF); + int32_t z = (*edi & 0xFFFF); + int32_t trackType = (*edx & 0xFF); + int32_t brakesSpeed = ((*ebx >> 8) & 0xFF); gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION; gCommandPosition.x = x + 16; @@ -2106,7 +2106,7 @@ void track_get_back(CoordsXYE * input, CoordsXYE * output) void track_get_front(CoordsXYE * input, CoordsXYE * output) { CoordsXYE lastTrack, currentTrack; - sint32 z, direction; + int32_t z, direction; bool result; lastTrack = *input; @@ -2197,14 +2197,14 @@ void track_element_set_inverted(rct_tile_element * tileElement, bool inverted) } } -sint32 track_get_actual_bank(rct_tile_element * tileElement, sint32 bank) +int32_t track_get_actual_bank(rct_tile_element * tileElement, int32_t bank) { Ride * ride = get_ride(track_element_get_ride_index(tileElement)); bool isInverted = track_element_is_inverted(tileElement); return track_get_actual_bank_2(ride->type, isInverted, bank); } -sint32 track_get_actual_bank_2(sint32 rideType, bool isInverted, sint32 bank) +int32_t track_get_actual_bank_2(int32_t rideType, bool isInverted, int32_t bank) { if (RideData4[rideType].flags & RIDE_TYPE_FLAG4_HAS_ALTERNATIVE_TRACK_TYPE) { @@ -2223,12 +2223,12 @@ sint32 track_get_actual_bank_2(sint32 rideType, bool isInverted, sint32 bank) return bank; } -sint32 track_get_actual_bank_3(rct_vehicle * vehicle, rct_tile_element * tileElement) +int32_t track_get_actual_bank_3(rct_vehicle * vehicle, rct_tile_element * tileElement) { bool isInverted = ((vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) > 0) ^ track_element_is_inverted(tileElement); - sint32 trackType = track_element_get_type(tileElement); - sint32 rideType = get_ride(track_element_get_ride_index(tileElement))->type; - sint32 bankStart = TrackDefinitions[trackType].bank_start; + int32_t trackType = track_element_get_type(tileElement); + int32_t rideType = get_ride(track_element_get_ride_index(tileElement))->type; + int32_t bankStart = TrackDefinitions[trackType].bank_start; return track_get_actual_bank_2(rideType, isInverted, bankStart); } @@ -2245,7 +2245,7 @@ bool track_element_is_station(rct_tile_element * trackElement) } } -bool track_element_is_covered(sint32 trackElementType) +bool track_element_is_covered(int32_t trackElementType) { switch (trackElementType) { @@ -2274,54 +2274,54 @@ bool track_element_is_covered(sint32 trackElementType) } } -bool track_element_is_booster(uint8 rideType, uint8 trackType) +bool track_element_is_booster(uint8_t rideType, uint8_t trackType) { // Boosters share their ID with the Spinning Control track. return rideType != RIDE_TYPE_STEEL_WILD_MOUSE && trackType == TRACK_ELEM_BOOSTER; } -bool track_element_has_speed_setting(uint8 trackType) +bool track_element_has_speed_setting(uint8_t trackType) { // This does not check if the element is really a Spinning Control track instead of a booster, // but this does not cause problems. return trackType == TRACK_ELEM_BRAKES || trackType == TRACK_ELEM_BOOSTER; } -uint8 track_element_get_seat_rotation(const rct_tile_element * tileElement) +uint8_t track_element_get_seat_rotation(const rct_tile_element * tileElement) { return tileElement->properties.track.colour >> 4; } -void track_element_set_seat_rotation(rct_tile_element * tileElement, uint8 seatRotation) +void track_element_set_seat_rotation(rct_tile_element * tileElement, uint8_t seatRotation) { tileElement->properties.track.colour &= 0x0F; tileElement->properties.track.colour |= (seatRotation << 4); } -uint8 track_element_get_colour_scheme(const rct_tile_element * tileElement) +uint8_t track_element_get_colour_scheme(const rct_tile_element * tileElement) { return tileElement->properties.track.colour & 0x3; } -void track_element_set_colour_scheme(rct_tile_element * tileElement, uint8 colourScheme) +void track_element_set_colour_scheme(rct_tile_element * tileElement, uint8_t colourScheme) { tileElement->properties.track.colour &= ~0x3; tileElement->properties.track.colour |= (colourScheme & 0x3); } -void tile_element_set_station(rct_tile_element * tileElement, uint32 stationIndex) +void tile_element_set_station(rct_tile_element * tileElement, uint32_t stationIndex) { tileElement->properties.track.sequence &= ~MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK; tileElement->properties.track.sequence |= (stationIndex << 4); } -sint32 tile_element_get_track_sequence(const rct_tile_element * tileElement) +int32_t tile_element_get_track_sequence(const rct_tile_element * tileElement) { return tileElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK; } -void tile_element_set_track_sequence(rct_tile_element * tileElement, sint32 trackSequence) +void tile_element_set_track_sequence(rct_tile_element * tileElement, int32_t trackSequence) { tileElement->properties.track.sequence &= ~MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK; tileElement->properties.track.sequence |= (trackSequence & MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK); @@ -2341,12 +2341,12 @@ void tile_element_set_green_light(rct_tile_element * tileElement, bool greenLigh } } -sint32 tile_element_get_brake_booster_speed(const rct_tile_element * tileElement) +int32_t tile_element_get_brake_booster_speed(const rct_tile_element * tileElement) { return (tileElement->properties.track.sequence >> 4) << 1; } -void tile_element_set_brake_booster_speed(rct_tile_element * tileElement, sint32 speed) +void tile_element_set_brake_booster_speed(rct_tile_element * tileElement, int32_t speed) { tileElement->properties.track.sequence = tile_element_get_track_sequence(tileElement) | ((speed >> 1) << 4); } @@ -2371,37 +2371,37 @@ void tile_element_decrement_onride_photo_timout(rct_tile_element * tileElement) } } -uint16 track_element_get_maze_entry(const rct_tile_element * tileElement) +uint16_t track_element_get_maze_entry(const rct_tile_element * tileElement) { return tileElement->properties.track.maze_entry; } -uint8 track_element_get_ride_index(const rct_tile_element * tileElement) +uint8_t track_element_get_ride_index(const rct_tile_element * tileElement) { return tileElement->properties.track.ride_index; } -void track_element_set_ride_index(rct_tile_element * tileElement, uint8 rideIndex) +void track_element_set_ride_index(rct_tile_element * tileElement, uint8_t rideIndex) { tileElement->properties.track.ride_index = rideIndex; } -uint8 track_element_get_type(const rct_tile_element * tileElement) +uint8_t track_element_get_type(const rct_tile_element * tileElement) { return tileElement->properties.track.type; } -void track_element_set_type(rct_tile_element * tileElement, uint8 type) +void track_element_set_type(rct_tile_element * tileElement, uint8_t type) { tileElement->properties.track.type = type; } -uint8 track_element_get_door_a_state(const rct_tile_element * tileElement) +uint8_t track_element_get_door_a_state(const rct_tile_element * tileElement) { return (tileElement->properties.track.colour & TRACK_ELEMENT_DOOR_A_MASK) >> 2; } -uint8 track_element_get_door_b_state(const rct_tile_element * tileElement) +uint8_t track_element_get_door_b_state(const rct_tile_element * tileElement) { return (tileElement->properties.track.colour & TRACK_ELEMENT_DOOR_B_MASK) >> 5; } diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index e9a0ef6016..d13c4fd191 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -16,13 +16,13 @@ #pragma pack(push, 1) struct rct_trackdefinition { - uint8 type; - uint8 vangle_end; - uint8 vangle_start; - uint8 bank_end; - uint8 bank_start; - sint8 preview_z_offset; - uint8 pad[2] = {}; + uint8_t type; + uint8_t vangle_end; + uint8_t vangle_start; + uint8_t bank_end; + uint8_t bank_start; + int8_t preview_z_offset; + uint8_t pad[2] = {}; }; assert_struct_size(rct_trackdefinition, 8); #pragma pack(pop) @@ -30,24 +30,24 @@ assert_struct_size(rct_trackdefinition, 8); /* size 0x0A */ struct rct_preview_track { - uint8 index; // 0x00 - sint16 x; // 0x01 - sint16 y; // 0x03 - sint16 z; // 0x05 - uint8 var_07; - uint8 var_08; - uint8 var_09; + uint8_t index; // 0x00 + int16_t x; // 0x01 + int16_t y; // 0x03 + int16_t z; // 0x05 + uint8_t var_07; + uint8_t var_08; + uint8_t var_09; }; /* size 0x0A */ struct rct_track_coordinates { - sint8 rotation_begin; // 0x00 - sint8 rotation_end; // 0x01 - sint16 z_begin; // 0x02 - sint16 z_end; // 0x04 - sint16 x; // 0x06 - sint16 y; // 0x08 + int8_t rotation_begin; // 0x00 + int8_t rotation_end; // 0x01 + int16_t z_begin; // 0x02 + int16_t z_end; // 0x04 + int16_t x; // 0x06 + int16_t y; // 0x08 }; enum @@ -510,8 +510,8 @@ struct track_circuit_iterator { CoordsXYE last; CoordsXYE current; - sint32 currentZ; - sint32 currentDirection; + int32_t currentZ; + int32_t currentDirection; rct_tile_element * first; bool firstIteration; bool looped; @@ -520,13 +520,13 @@ struct track_circuit_iterator extern const rct_trackdefinition FlatRideTrackDefinitions[256]; extern const rct_trackdefinition TrackDefinitions[256]; -extern uint8 gTrackGroundFlags; +extern uint8_t gTrackGroundFlags; -sint32 track_is_connected_by_shape(rct_tile_element * a, rct_tile_element * b); +int32_t track_is_connected_by_shape(rct_tile_element * a, rct_tile_element * b); -const rct_preview_track * get_track_def_from_ride(Ride * ride, sint32 trackType); -const rct_preview_track * get_track_def_from_ride_index(sint32 rideIndex, sint32 trackType); -const rct_track_coordinates * get_track_coord_from_ride(Ride * ride, sint32 trackType); +const rct_preview_track * get_track_def_from_ride(Ride * ride, int32_t trackType); +const rct_preview_track * get_track_def_from_ride_index(int32_t rideIndex, int32_t trackType); +const rct_track_coordinates * get_track_coord_from_ride(Ride * ride, int32_t trackType); void track_circuit_iterator_begin(track_circuit_iterator * it, CoordsXYE first); bool track_circuit_iterator_previous(track_circuit_iterator * it); @@ -537,7 +537,7 @@ void track_get_back(CoordsXYE * input, CoordsXYE * output); void track_get_front(CoordsXYE * input, CoordsXYE * output); bool track_element_is_block_start(rct_tile_element * trackElement); -bool track_element_is_covered(sint32 trackElementType); +bool track_element_is_covered(int32_t trackElementType); bool track_element_is_station(rct_tile_element * trackElement); bool track_element_is_lift_hill(const rct_tile_element * trackElement); void track_element_set_lift_hill(rct_tile_element * trackElement, bool on); @@ -547,39 +547,39 @@ void track_element_clear_cable_lift(rct_tile_element * trackElement); bool track_element_is_inverted(const rct_tile_element * tileElement); void track_element_set_inverted(rct_tile_element * tileElement, bool inverted); -sint32 track_get_actual_bank(rct_tile_element * tileElement, sint32 bank); -sint32 track_get_actual_bank_2(sint32 rideType, bool isInverted, sint32 bank); -sint32 track_get_actual_bank_3(rct_vehicle * vehicle, rct_tile_element * tileElement); +int32_t track_get_actual_bank(rct_tile_element * tileElement, int32_t bank); +int32_t track_get_actual_bank_2(int32_t rideType, bool isInverted, int32_t bank); +int32_t track_get_actual_bank_3(rct_vehicle * vehicle, rct_tile_element * tileElement); -void game_command_place_track(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -void game_command_remove_track(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); +void game_command_place_track(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +void game_command_remove_track(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); -void game_command_set_maze_track(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -money32 maze_set_track(uint16 x, uint16 y, uint16 z, uint8 flags, bool initialPlacement, uint8 direction, uint8 rideIndex, uint8 mode); +void game_command_set_maze_track(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +money32 maze_set_track(uint16_t x, uint16_t y, uint16_t z, uint8_t flags, bool initialPlacement, uint8_t direction, uint8_t rideIndex, uint8_t mode); -void game_command_set_brakes_speed(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -bool track_element_is_booster(uint8 rideType, uint8 trackType); -bool track_element_has_speed_setting(uint8 trackType); -uint8 track_element_get_seat_rotation(const rct_tile_element * tileElement); -void track_element_set_seat_rotation(rct_tile_element * tileElement, uint8 seatRotation); -uint8 track_element_get_colour_scheme(const rct_tile_element * tileElement); -void track_element_set_colour_scheme(rct_tile_element * tileElement, uint8 colourScheme); -sint32 tile_element_get_station(const rct_tile_element * tileElement); -void tile_element_set_station(rct_tile_element * tileElement, uint32 stationIndex); -sint32 tile_element_get_track_sequence(const rct_tile_element * tileElement); -void tile_element_set_track_sequence(rct_tile_element * tileElement, sint32 trackSequence); +void game_command_set_brakes_speed(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +bool track_element_is_booster(uint8_t rideType, uint8_t trackType); +bool track_element_has_speed_setting(uint8_t trackType); +uint8_t track_element_get_seat_rotation(const rct_tile_element * tileElement); +void track_element_set_seat_rotation(rct_tile_element * tileElement, uint8_t seatRotation); +uint8_t track_element_get_colour_scheme(const rct_tile_element * tileElement); +void track_element_set_colour_scheme(rct_tile_element * tileElement, uint8_t colourScheme); +int32_t tile_element_get_station(const rct_tile_element * tileElement); +void tile_element_set_station(rct_tile_element * tileElement, uint32_t stationIndex); +int32_t tile_element_get_track_sequence(const rct_tile_element * tileElement); +void tile_element_set_track_sequence(rct_tile_element * tileElement, int32_t trackSequence); bool tile_element_get_green_light(const rct_tile_element * tileElement); void tile_element_set_green_light(rct_tile_element * tileElement, bool greenLight); -sint32 tile_element_get_brake_booster_speed(const rct_tile_element *tileElement); -void tile_element_set_brake_booster_speed(rct_tile_element *tileElement, sint32 speed); +int32_t tile_element_get_brake_booster_speed(const rct_tile_element *tileElement); +void tile_element_set_brake_booster_speed(rct_tile_element *tileElement, int32_t speed); bool tile_element_is_taking_photo(const rct_tile_element * tileElement); void tile_element_set_onride_photo_timeout(rct_tile_element * tileElement); void tile_element_decrement_onride_photo_timout(rct_tile_element * tileElement); -uint16 track_element_get_maze_entry(const rct_tile_element * tileElement); -uint8 track_element_get_ride_index(const rct_tile_element * tileElement); -void track_element_set_ride_index(rct_tile_element * tileElement, uint8 rideIndex); -uint8 track_element_get_type(const rct_tile_element * tileElement); -void track_element_set_type(rct_tile_element * tileElement, uint8 rideIndex); +uint16_t track_element_get_maze_entry(const rct_tile_element * tileElement); +uint8_t track_element_get_ride_index(const rct_tile_element * tileElement); +void track_element_set_ride_index(rct_tile_element * tileElement, uint8_t rideIndex); +uint8_t track_element_get_type(const rct_tile_element * tileElement); +void track_element_set_type(rct_tile_element * tileElement, uint8_t rideIndex); -uint8 track_element_get_door_a_state(const rct_tile_element * tileElement); -uint8 track_element_get_door_b_state(const rct_tile_element * tileElement); +uint8_t track_element_get_door_a_state(const rct_tile_element * tileElement); +uint8_t track_element_get_door_b_state(const rct_tile_element * tileElement); diff --git a/src/openrct2/ride/TrackData.cpp b/src/openrct2/ride/TrackData.cpp index afb11852a1..503e198573 100644 --- a/src/openrct2/ride/TrackData.cpp +++ b/src/openrct2/ride/TrackData.cpp @@ -529,7 +529,7 @@ const rct_track_coordinates TrackCoordinates[256] = { }; /** rct2: 0x0099BA64 */ -const uint8 TrackSequenceProperties[][16] = { +const uint8_t TrackSequenceProperties[][16] = { { 0 }, /* TRACK_ELEM_END_STATION */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN | TRACK_SEQUENCE_FLAG_DISALLOW_DOORS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* TRACK_ELEM_BEGIN_STATION */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN | TRACK_SEQUENCE_FLAG_DISALLOW_DOORS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -789,7 +789,7 @@ const uint8 TrackSequenceProperties[][16] = { }; /** rct2: 0x0099CA64 */ -const uint8 FlatRideTrackSequenceProperties[][16] = { +const uint8_t FlatRideTrackSequenceProperties[][16] = { { 0 }, /* 1 */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 2 */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -1049,7 +1049,7 @@ const uint8 FlatRideTrackSequenceProperties[][16] = { }; // rct2: 0x0097C468 (0 - 31) and 0x0097C5D4 (32 - 63) -const uint64 RideTypePossibleTrackConfigurations[RIDE_TYPE_COUNT] = { +const uint64_t RideTypePossibleTrackConfigurations[RIDE_TYPE_COUNT] = { /* RIDE_TYPE_SPIRAL_ROLLER_COASTER */ (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_FLAT_ROLL_BANKING) | (1ULL << TRACK_SLOPE) | (1ULL << TRACK_SLOPE_STEEP) | (1ULL << TRACK_SLOPE_CURVE) | (1ULL << TRACK_SLOPE_CURVE_STEEP) | (1ULL << TRACK_S_BEND) | (1ULL << TRACK_CURVE_SMALL) | (1ULL << TRACK_CURVE) | (1ULL << TRACK_HELIX_SMALL) | (1ULL << TRACK_BRAKES) | (1ULL << TRACK_ON_RIDE_PHOTO) | (1ULL << TRACK_BLOCK_BRAKES) | (1ULL << TRACK_SLOPE_ROLL_BANKING) | (1ULL << TRACK_LIFT_HILL) | (1ULL << TRACK_LIFT_HILL_CURVED), /* RIDE_TYPE_STAND_UP_ROLLER_COASTER */ (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_LIFT_HILL) | (1ULL << TRACK_FLAT_ROLL_BANKING) | (1ULL << TRACK_VERTICAL_LOOP) | (1ULL << TRACK_SLOPE) | (1ULL << TRACK_SLOPE_STEEP) | (1ULL << TRACK_SLOPE_CURVE) | (1ULL << TRACK_S_BEND) | (1ULL << TRACK_CURVE_SMALL) | (1ULL << TRACK_CURVE) | (1ULL << TRACK_HALF_LOOP) | (1ULL << TRACK_CORKSCREW) | (1ULL << TRACK_HELIX_SMALL) | (1ULL << TRACK_BRAKES) | (1ULL << TRACK_ON_RIDE_PHOTO) | (1ULL << TRACK_BLOCK_BRAKES), /* RIDE_TYPE_SUSPENDED_SWINGING_COASTER */ (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_LIFT_HILL) | (1ULL << TRACK_SLOPE) | (1ULL << TRACK_SLOPE_STEEP) | (1ULL << TRACK_SLOPE_CURVE) | (1ULL << TRACK_S_BEND) | (1ULL << TRACK_CURVE_SMALL) | (1ULL << TRACK_CURVE) | (1ULL << TRACK_HELIX_LARGE_UNBANKED) | (1ULL << TRACK_BRAKES) | (1ULL << TRACK_BLOCK_BRAKES), @@ -5461,7 +5461,7 @@ const rct_preview_track *FlatRideTrackBlocks[256] = { FlatRideTrackBlocks255 }; -const uint8 TrackPieceLengths[256] = { +const uint8_t TrackPieceLengths[256] = { 32, // TRACK_ELEM_FLAT 32, // TRACK_ELEM_END_STATION 32, // TRACK_ELEM_BEGIN_STATION @@ -6481,7 +6481,7 @@ const track_descriptor gTrackDescriptors[142] = { #define CREATE_VEHICLE_INFO(VAR, ...) \ static constexpr const rct_vehicle_info VAR##_data [] = __VA_ARGS__ ; \ - static constexpr const rct_vehicle_info_list VAR = { static_cast(Util::CountOf(VAR##_data)), VAR##_data }; + static constexpr const rct_vehicle_info_list VAR = { static_cast(Util::CountOf(VAR##_data)), VAR##_data }; CREATE_VEHICLE_INFO(TrackVehicleInfo_8BE57A, { { 31, 16, 0, 0, 0, 0 }, { 30, 16, 0, 0, 0, 0 }, { 29, 16, 0, 0, 0, 0 }, { 28, 16, 0, 0, 0, 0 }, { 27, 16, 0, 0, 0, 0 }, @@ -29717,7 +29717,7 @@ constexpr const rct_vehicle_info_list * const * gTrackVehicleInfo[17] = { }; /** rct2: 0x00993D1C */ -const sint16 AlternativeTrackTypes[256] = { +const int16_t AlternativeTrackTypes[256] = { TRACK_ELEM_FLAT_COVERED, // TRACK_ELEM_FLAT -1, -1, @@ -30751,7 +30751,7 @@ const dodgems_track_size DodgemsTrackSize[] = { }; /** rct2: 0x0099EA1C */ -const uint8 TrackElementMirrorMap[] = { +const uint8_t TrackElementMirrorMap[] = { TRACK_ELEM_FLAT, TRACK_ELEM_END_STATION, TRACK_ELEM_BEGIN_STATION, @@ -31011,7 +31011,7 @@ const uint8 TrackElementMirrorMap[] = { }; /** rct2: 0x00999694 */ -const uint32 TrackHeightMarkerPositions[256] = { +const uint32_t TrackHeightMarkerPositions[256] = { (1 << 0), // TRACK_ELEM_FLAT (1 << 0), // TRACK_ELEM_END_STATION (1 << 0), // TRACK_ELEM_BEGIN_STATION @@ -31271,7 +31271,7 @@ const uint32 TrackHeightMarkerPositions[256] = { }; /** rct2: 0x00999A94 */ -const uint8 TrackSequenceElementAllowedWallEdges[][16] = { +const uint8_t TrackSequenceElementAllowedWallEdges[][16] = { { 0b1010, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // TRACK_ELEM_FLAT { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // TRACK_ELEM_END_STATION { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // TRACK_ELEM_BEGIN_STATION @@ -31531,7 +31531,7 @@ const uint8 TrackSequenceElementAllowedWallEdges[][16] = { }; /** rct2: 0x0099AA94 */ -const uint8 FlatRideTrackSequenceElementAllowedWallEdges[][16] = { +const uint8_t FlatRideTrackSequenceElementAllowedWallEdges[][16] = { { 0b1010, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -31788,7 +31788,7 @@ const uint8 FlatRideTrackSequenceElementAllowedWallEdges[][16] = { }; /** rct2: 0x0099443C */ -const uint16 FlatTrackFlags[] = { +const uint16_t FlatTrackFlags[] = { /* */ TRACK_ELEM_FLAG_ALLOW_LIFT_HILL, /* */ 0, /* */ 0, @@ -32046,7 +32046,7 @@ const uint16 FlatTrackFlags[] = { }; /** rct2: 0x0099423C */ -const uint16 TrackFlags[] = { +const uint16_t TrackFlags[] = { /* TRACK_ELEM_FLAT */ TRACK_ELEM_FLAG_ALLOW_LIFT_HILL, /* TRACK_ELEM_END_STATION */ 0, /* TRACK_ELEM_BEGIN_STATION */ 0, diff --git a/src/openrct2/ride/TrackData.h b/src/openrct2/ride/TrackData.h index 4f226ee7fb..9cd8487d3e 100644 --- a/src/openrct2/ride/TrackData.h +++ b/src/openrct2/ride/TrackData.h @@ -18,70 +18,70 @@ extern const rct_track_coordinates TrackCoordinates[256]; // 0x009972BB, 0x009972BC, 0x009972BD, 0x009972BF, 0x009972C1, 0x009972C3 extern const rct_track_coordinates FlatTrackCoordinates[253]; -extern const uint8 TrackSequenceProperties[256][16]; -extern const uint8 FlatRideTrackSequenceProperties[256][16]; +extern const uint8_t TrackSequenceProperties[256][16]; +extern const uint8_t FlatRideTrackSequenceProperties[256][16]; -extern const uint64 RideTypePossibleTrackConfigurations[RIDE_TYPE_COUNT]; +extern const uint64_t RideTypePossibleTrackConfigurations[RIDE_TYPE_COUNT]; extern const rct_preview_track * TrackBlocks[256]; extern const rct_preview_track * FlatRideTrackBlocks[256]; -extern const uint8 TrackPieceLengths[256]; +extern const uint8_t TrackPieceLengths[256]; struct track_curve_chain { - uint16 next; - uint16 previous; + uint16_t next; + uint16_t previous; }; extern const track_curve_chain gTrackCurveChain[256]; extern const track_curve_chain gFlatRideTrackCurveChain[256]; extern const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[RIDE_TYPE_COUNT]; -extern const uint32 * RideTypeTrackPaintFunctionsOld[RIDE_TYPE_COUNT]; +extern const uint32_t * RideTypeTrackPaintFunctionsOld[RIDE_TYPE_COUNT]; struct track_descriptor { bool starts_diagonal; - uint8 slope_start; - uint8 bank_start; - uint8 track_curve; - uint8 slope_end; - uint8 bank_end; - uint8 track_element; + uint8_t slope_start; + uint8_t bank_start; + uint8_t track_curve; + uint8_t slope_end; + uint8_t bank_end; + uint8_t track_element; }; extern const track_descriptor gTrackDescriptors[142]; struct rct_vehicle_info_list { - uint16 size; + uint16_t size; const rct_vehicle_info * info; }; extern const rct_vehicle_info_list * const * const gTrackVehicleInfo[17]; -extern const sint16 AlternativeTrackTypes[256]; +extern const int16_t AlternativeTrackTypes[256]; extern const money32 TrackPricing[256]; extern const money32 FlatRideTrackPricing[256]; struct dodgems_track_size { - uint8 left; - uint8 top; - uint8 right; - uint8 bottom; + uint8_t left; + uint8_t top; + uint8_t right; + uint8_t bottom; }; extern const dodgems_track_size DodgemsTrackSize[256]; -extern const uint8 TrackElementMirrorMap[256]; +extern const uint8_t TrackElementMirrorMap[256]; -extern const uint32 TrackHeightMarkerPositions[256]; +extern const uint32_t TrackHeightMarkerPositions[256]; -extern const uint8 TrackSequenceElementAllowedWallEdges[256][16]; -extern const uint8 FlatRideTrackSequenceElementAllowedWallEdges[256][16]; +extern const uint8_t TrackSequenceElementAllowedWallEdges[256][16]; +extern const uint8_t FlatRideTrackSequenceElementAllowedWallEdges[256][16]; -extern const uint16 FlatTrackFlags[256]; -extern const uint16 TrackFlags[256]; +extern const uint16_t FlatTrackFlags[256]; +extern const uint16_t TrackFlags[256]; diff --git a/src/openrct2/ride/TrackDataOld.cpp b/src/openrct2/ride/TrackDataOld.cpp index 2ee5bae73e..dee1aa0396 100644 --- a/src/openrct2/ride/TrackDataOld.cpp +++ b/src/openrct2/ride/TrackDataOld.cpp @@ -11,7 +11,7 @@ /** rct2: 0x008A42F4 */ // clang-format off -static constexpr const uint32 _OldSpiralRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSpiralRollerCoasterTrackPaintFunctions[256] = { 0x008A4ABC, // TRACK_ELEM_FLAT 0x008A4D0C, // TRACK_ELEM_END_STATION 0x008A4D1C, // TRACK_ELEM_BEGIN_STATION @@ -271,7 +271,7 @@ static constexpr const uint32 _OldSpiralRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x008A6DB0 */ -static constexpr const uint32 _OldStandUpRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldStandUpRollerCoasterTrackPaintFunctions[256] = { 0x008A7114, // TRACK_ELEM_FLAT 0x008A7384, // TRACK_ELEM_END_STATION 0x008A7394, // TRACK_ELEM_BEGIN_STATION @@ -531,7 +531,7 @@ static constexpr const uint32 _OldStandUpRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x008A85E4 */ -static constexpr const uint32 _OldSuspendedSwingingCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSuspendedSwingingCoasterTrackPaintFunctions[256] = { 0x008A8958, // TRACK_ELEM_FLAT 0x008A8AA8, // TRACK_ELEM_END_STATION 0x008A8AB8, // TRACK_ELEM_BEGIN_STATION @@ -791,7 +791,7 @@ static constexpr const uint32 _OldSuspendedSwingingCoasterTrackPaintFunctions[25 }; /** rct2: 0x008A8EE4 */ -static constexpr const uint32 _OldInvertedRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldInvertedRollerCoasterTrackPaintFunctions[256] = { 0x008A92E8, // TRACK_ELEM_FLAT 0x008A9558, // TRACK_ELEM_END_STATION 0x008A9568, // TRACK_ELEM_BEGIN_STATION @@ -1051,7 +1051,7 @@ static constexpr const uint32 _OldInvertedRollerCoasterTrackPaintFunctions[256] }; /** rct2: 0x008AAA0C */ -static constexpr const uint32 _OldJuniorRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldJuniorRollerCoasterTrackPaintFunctions[256] = { 0x008AAD80, // TRACK_ELEM_FLAT 0x008AAE70, // TRACK_ELEM_END_STATION 0x008AAE80, // TRACK_ELEM_BEGIN_STATION @@ -1311,7 +1311,7 @@ static constexpr const uint32 _OldJuniorRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x008ACE48 */ -static constexpr const uint32 _OldMiniatureRailwayTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMiniatureRailwayTrackPaintFunctions[256] = { 0x008AD0C0, // TRACK_ELEM_FLAT 0x008AD170, // TRACK_ELEM_END_STATION 0x008AD180, // TRACK_ELEM_BEGIN_STATION @@ -1571,7 +1571,7 @@ static constexpr const uint32 _OldMiniatureRailwayTrackPaintFunctions[256] = { }; /** rct2: 0x008ADF34 */ -static constexpr const uint32 _OldMonorailTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMonorailTrackPaintFunctions[256] = { 0x008AE1AC, // TRACK_ELEM_FLAT 0x008AE25C, // TRACK_ELEM_END_STATION 0x008AE26C, // TRACK_ELEM_BEGIN_STATION @@ -1831,7 +1831,7 @@ static constexpr const uint32 _OldMonorailTrackPaintFunctions[256] = { }; /** rct2: 0x008AFC24 */ -static constexpr const uint32 _OldMiniSuspendedCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMiniSuspendedCoasterTrackPaintFunctions[256] = { 0x008AFE9C, // TRACK_ELEM_FLAT 0x008AFF4C, // TRACK_ELEM_END_STATION 0x008AFF5C, // TRACK_ELEM_BEGIN_STATION @@ -2091,7 +2091,7 @@ static constexpr const uint32 _OldMiniSuspendedCoasterTrackPaintFunctions[256] = }; /** rct2: 0x008B0D60 */ -static constexpr const uint32 _OldBoatHireTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldBoatHireTrackPaintFunctions[256] = { 0x008B0E40, // TRACK_ELEM_FLAT 0x008B0E50, // TRACK_ELEM_END_STATION 0x008B0E60, // TRACK_ELEM_BEGIN_STATION @@ -2351,7 +2351,7 @@ static constexpr const uint32 _OldBoatHireTrackPaintFunctions[256] = { }; /** rct2: 0x008A534C */ -static constexpr const uint32 _OldWoodenWildMouseTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldWoodenWildMouseTrackPaintFunctions[256] = { 0x008A5464, // TRACK_ELEM_FLAT 0x008A5534, // TRACK_ELEM_END_STATION 0x008A5544, // TRACK_ELEM_BEGIN_STATION @@ -2611,7 +2611,7 @@ static constexpr const uint32 _OldWoodenWildMouseTrackPaintFunctions[256] = { }; /** rct2: 0x008A5634 */ -static constexpr const uint32 _OldSteeplechaseTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSteeplechaseTrackPaintFunctions[256] = { 0x008A59A8, // TRACK_ELEM_FLAT 0x008A5A58, // TRACK_ELEM_END_STATION 0x008A5A68, // TRACK_ELEM_BEGIN_STATION @@ -2871,7 +2871,7 @@ static constexpr const uint32 _OldSteeplechaseTrackPaintFunctions[256] = { }; /** rct2: 0x006F7000 */ -static constexpr const uint32 _OldCarRideTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldCarRideTrackPaintFunctions[256] = { 0x006F72C8, // TRACK_ELEM_FLAT 0x006F7338, // TRACK_ELEM_END_STATION 0x006F7348, // TRACK_ELEM_BEGIN_STATION @@ -3131,7 +3131,7 @@ static constexpr const uint32 _OldCarRideTrackPaintFunctions[256] = { }; /** rct2: 0x006FD0E8 */ -static constexpr const uint32 _OldLaunchedFreefallTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldLaunchedFreefallTrackPaintFunctions[256] = { 0, 0, 0, @@ -3391,7 +3391,7 @@ static constexpr const uint32 _OldLaunchedFreefallTrackPaintFunctions[256] = { }; /** rct2: 0x006FE240 */ -static constexpr const uint32 _OldBobsleighCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldBobsleighCoasterTrackPaintFunctions[256] = { 0x006FE5B4, // TRACK_ELEM_FLAT 0x006FE764, // TRACK_ELEM_END_STATION 0x006FE774, // TRACK_ELEM_BEGIN_STATION @@ -3651,7 +3651,7 @@ static constexpr const uint32 _OldBobsleighCoasterTrackPaintFunctions[256] = { }; /** rct2: 0x0070DC5C */ -static constexpr const uint32 _OldObservationTowerTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldObservationTowerTrackPaintFunctions[256] = { 0, 0, 0, @@ -3911,7 +3911,7 @@ static constexpr const uint32 _OldObservationTowerTrackPaintFunctions[256] = { }; /** rct2: 0x008A5B88 */ -static constexpr const uint32 _OldLoopingRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldLoopingRollerCoasterTrackPaintFunctions[256] = { 0x008A6370, // TRACK_ELEM_FLAT 0x008A6600, // TRACK_ELEM_END_STATION 0x008A6610, // TRACK_ELEM_BEGIN_STATION @@ -4171,7 +4171,7 @@ static constexpr const uint32 _OldLoopingRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x0070EDB4 */ -static constexpr const uint32 _OldDinghySlideTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldDinghySlideTrackPaintFunctions[256] = { 0x0070EF20, // TRACK_ELEM_FLAT 0x0070F030, // TRACK_ELEM_END_STATION 0x0070F040, // TRACK_ELEM_BEGIN_STATION @@ -4431,7 +4431,7 @@ static constexpr const uint32 _OldDinghySlideTrackPaintFunctions[256] = { }; /** rct2: 0x0071BC40 */ -static constexpr const uint32 _OldMineTrainCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMineTrainCoasterTrackPaintFunctions[256] = { 0x0071BFA4, // TRACK_ELEM_FLAT 0x0071C154, // TRACK_ELEM_END_STATION 0x0071C164, // TRACK_ELEM_BEGIN_STATION @@ -4691,7 +4691,7 @@ static constexpr const uint32 _OldMineTrainCoasterTrackPaintFunctions[256] = { }; /** rct2: 0x00743EC8 */ -static constexpr const uint32 _OldChairliftTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldChairliftTrackPaintFunctions[256] = { 0x00743FC8, // TRACK_ELEM_FLAT 0x00743F98, // TRACK_ELEM_END_STATION 0x00743FA8, // TRACK_ELEM_BEGIN_STATION @@ -4951,7 +4951,7 @@ static constexpr const uint32 _OldChairliftTrackPaintFunctions[256] = { }; /** rct2: 0x008A7784 */ -static constexpr const uint32 _OldCorkscrewRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldCorkscrewRollerCoasterTrackPaintFunctions[256] = { 0x008A7AF8, // TRACK_ELEM_FLAT 0x008A7D68, // TRACK_ELEM_END_STATION 0x008A7D78, // TRACK_ELEM_BEGIN_STATION @@ -5211,7 +5211,7 @@ static constexpr const uint32 _OldCorkscrewRollerCoasterTrackPaintFunctions[256] }; /** rct2: 0x008A81E8 */ -static constexpr const uint32 _OldMazeTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMazeTrackPaintFunctions[256] = { 0, 0, 0, @@ -5471,7 +5471,7 @@ static constexpr const uint32 _OldMazeTrackPaintFunctions[256] = { }; /** rct2: 0x0074840C */ -static constexpr const uint32 _OldSpiralSlideTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSpiralSlideTrackPaintFunctions[256] = { 0, 0, 0, @@ -5731,7 +5731,7 @@ static constexpr const uint32 _OldSpiralSlideTrackPaintFunctions[256] = { }; /** rct2: 0x0074A668 */ -static constexpr const uint32 _OldGoKartsTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldGoKartsTrackPaintFunctions[256] = { 0x0074A748, // TRACK_ELEM_FLAT 0x0074A7B8, // TRACK_ELEM_END_STATION 0x0074A7C8, // TRACK_ELEM_BEGIN_STATION @@ -5991,7 +5991,7 @@ static constexpr const uint32 _OldGoKartsTrackPaintFunctions[256] = { }; /** rct2: 0x0074DDEC */ -static constexpr const uint32 _OldLogFlumeTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldLogFlumeTrackPaintFunctions[256] = { 0x0074E0B0, // TRACK_ELEM_FLAT 0x0074E140, // TRACK_ELEM_END_STATION 0x0074E150, // TRACK_ELEM_BEGIN_STATION @@ -6251,7 +6251,7 @@ static constexpr const uint32 _OldLogFlumeTrackPaintFunctions[256] = { }; /** rct2: 0x0075745C */ -static constexpr const uint32 _OldRiverRapidsTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldRiverRapidsTrackPaintFunctions[256] = { 0x00757650, // TRACK_ELEM_FLAT 0x007576C0, // TRACK_ELEM_END_STATION 0x007576D0, // TRACK_ELEM_BEGIN_STATION @@ -6511,7 +6511,7 @@ static constexpr const uint32 _OldRiverRapidsTrackPaintFunctions[256] = { }; /** rct2: 0x0075C9D0 */ -static constexpr const uint32 _OldDodgemsTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldDodgemsTrackPaintFunctions[256] = { 0, 0, 0, @@ -6771,7 +6771,7 @@ static constexpr const uint32 _OldDodgemsTrackPaintFunctions[256] = { }; /** rct2: 0x008A83E0 */ -static constexpr const uint32 _OldPirateShipTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldPirateShipTrackPaintFunctions[256] = { 0, 0, 0, @@ -7031,7 +7031,7 @@ static constexpr const uint32 _OldPirateShipTrackPaintFunctions[256] = { }; /** rct2: 0x00760070 */ -static constexpr const uint32 _OldSwingingInverterShipTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSwingingInverterShipTrackPaintFunctions[256] = { 0, 0, 0, @@ -7295,7 +7295,7 @@ static constexpr const uint32 _OldSwingingInverterShipTrackPaintFunctions[256] = * * rct2: 0x00761160 */ -static constexpr const uint32 _OldShopTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldShopTrackPaintFunctions[256] = { 0, 0, 0, @@ -7555,7 +7555,7 @@ static constexpr const uint32 _OldShopTrackPaintFunctions[256] = { }; /** rct2: 0x0076190C */ -static constexpr const uint32 _OldMerryGoRoundTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMerryGoRoundTrackPaintFunctions[256] = { 0, 0, 0, @@ -7819,7 +7819,7 @@ static constexpr const uint32 _OldMerryGoRoundTrackPaintFunctions[256] = { * * rct2: 0x00762D44 */ -static constexpr const uint32 _OldFacilityTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldFacilityTrackPaintFunctions[256] = { 0, 0, 0, @@ -8079,7 +8079,7 @@ static constexpr const uint32 _OldFacilityTrackPaintFunctions[256] = { }; /** rct2: 0x008A8CC8 */ -static constexpr const uint32 _OldFerrisWheelTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldFerrisWheelTrackPaintFunctions[256] = { 0, 0, 0, @@ -8339,7 +8339,7 @@ static constexpr const uint32 _OldFerrisWheelTrackPaintFunctions[256] = { }; /** rct2: 0x00763520 */ -static constexpr const uint32 _OldMotionSimulatorTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMotionSimulatorTrackPaintFunctions[256] = { 0, 0, 0, @@ -8599,7 +8599,7 @@ static constexpr const uint32 _OldMotionSimulatorTrackPaintFunctions[256] = { }; /** rct2: 0x0076554C */ -static constexpr const uint32 _Old3DCinemaTrackPaintFunctions[256] = { +static constexpr const uint32_t _Old3DCinemaTrackPaintFunctions[256] = { 0, 0, 0, @@ -8859,7 +8859,7 @@ static constexpr const uint32 _Old3DCinemaTrackPaintFunctions[256] = { }; /** rct2: 0x0076659C */ -static constexpr const uint32 _OldTopSpinTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldTopSpinTrackPaintFunctions[256] = { 0, 0, 0, @@ -9119,7 +9119,7 @@ static constexpr const uint32 _OldTopSpinTrackPaintFunctions[256] = { }; /** rct2: 0x00767A40 */ -static constexpr const uint32 _OldSpaceRingsTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSpaceRingsTrackPaintFunctions[256] = { 0, 0, 0, @@ -9379,7 +9379,7 @@ static constexpr const uint32 _OldSpaceRingsTrackPaintFunctions[256] = { }; /** rct2: 0x00768BAC */ -static constexpr const uint32 _OldReverseFreefallCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldReverseFreefallCoasterTrackPaintFunctions[256] = { 0x00768DB4, // TRACK_ELEM_FLAT 0x00768DC4, // TRACK_ELEM_END_STATION 0x00768DD4, // TRACK_ELEM_BEGIN_STATION @@ -9639,7 +9639,7 @@ static constexpr const uint32 _OldReverseFreefallCoasterTrackPaintFunctions[256] }; /** rct2: 0x0076C5BC */ -static constexpr const uint32 _OldLiftTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldLiftTrackPaintFunctions[256] = { 0, 0, 0, @@ -9899,7 +9899,7 @@ static constexpr const uint32 _OldLiftTrackPaintFunctions[256] = { }; /** rct2: 0x008A9C08 */ -static constexpr const uint32 _OldVerticalDropRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldVerticalDropRollerCoasterTrackPaintFunctions[256] = { 0x008AA00C, // TRACK_ELEM_FLAT 0x008AA25C, // TRACK_ELEM_END_STATION 0x008AA26C, // TRACK_ELEM_BEGIN_STATION @@ -10159,7 +10159,7 @@ static constexpr const uint32 _OldVerticalDropRollerCoasterTrackPaintFunctions[2 }; /** rct2: 0x0076D658 */ -static constexpr const uint32 _OldTwistTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldTwistTrackPaintFunctions[256] = { 0, 0, 0, @@ -10419,7 +10419,7 @@ static constexpr const uint32 _OldTwistTrackPaintFunctions[256] = { }; /** rct2: 0x0076E7B0 */ -static constexpr const uint32 _OldHauntedHouseTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldHauntedHouseTrackPaintFunctions[256] = { 0, 0, 0, @@ -10679,7 +10679,7 @@ static constexpr const uint32 _OldHauntedHouseTrackPaintFunctions[256] = { }; /** rct2: 0x0076F8D4 */ -static constexpr const uint32 _OldCircusShowTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldCircusShowTrackPaintFunctions[256] = { 0, 0, 0, @@ -10939,7 +10939,7 @@ static constexpr const uint32 _OldCircusShowTrackPaintFunctions[256] = { }; /** rct2: 0x00770924 */ -static constexpr const uint32 _OldGhostTrainTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldGhostTrainTrackPaintFunctions[256] = { 0x00770BEC, // TRACK_ELEM_FLAT 0x00770C5C, // TRACK_ELEM_END_STATION 0x00770C6C, // TRACK_ELEM_BEGIN_STATION @@ -11199,7 +11199,7 @@ static constexpr const uint32 _OldGhostTrainTrackPaintFunctions[256] = { }; /** rct2: 0x008AB2A0 */ -static constexpr const uint32 _OldTwisterRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldTwisterRollerCoasterTrackPaintFunctions[256] = { 0x008AB6A4, // TRACK_ELEM_FLAT 0x008AB8F4, // TRACK_ELEM_END_STATION 0x008AB904, // TRACK_ELEM_BEGIN_STATION @@ -11459,7 +11459,7 @@ static constexpr const uint32 _OldTwisterRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x008AC164 */ -static constexpr const uint32 _OldWoodenRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldWoodenRollerCoasterTrackPaintFunctions[256] = { 0x008AC568, // TRACK_ELEM_FLAT 0x008AC7B8, // TRACK_ELEM_END_STATION 0x008AC7C8, // TRACK_ELEM_BEGIN_STATION @@ -11719,7 +11719,7 @@ static constexpr const uint32 _OldWoodenRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x00778124 */ -static constexpr const uint32 _OldSideFrictionRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSideFrictionRollerCoasterTrackPaintFunctions[256] = { 0x0077839C, // TRACK_ELEM_FLAT 0x007784AC, // TRACK_ELEM_END_STATION 0x007784BC, // TRACK_ELEM_BEGIN_STATION @@ -11979,7 +11979,7 @@ static constexpr const uint32 _OldSideFrictionRollerCoasterTrackPaintFunctions[2 }; /** rct2: 0x0078AE80 */ -static constexpr const uint32 _OldWildMouseTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldWildMouseTrackPaintFunctions[256] = { 0x0078B1E4, // TRACK_ELEM_FLAT 0x0078B2B4, // TRACK_ELEM_END_STATION 0x0078B2C4, // TRACK_ELEM_BEGIN_STATION @@ -12239,7 +12239,7 @@ static constexpr const uint32 _OldWildMouseTrackPaintFunctions[256] = { }; /** rct2: 0x00792978 */ -static constexpr const uint32 _OldMultiDimensionRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMultiDimensionRollerCoasterTrackPaintFunctions[256] = { 0x00792D88, // TRACK_ELEM_FLAT 0x00792F98, // TRACK_ELEM_END_STATION 0x00792FA8, // TRACK_ELEM_BEGIN_STATION @@ -12499,7 +12499,7 @@ static constexpr const uint32 _OldMultiDimensionRollerCoasterTrackPaintFunctions }; /** rct2: 0x007C6C00 */ -static constexpr const uint32 _OldFlyingRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldFlyingRollerCoasterTrackPaintFunctions[256] = { 0x007C6FF4, // TRACK_ELEM_FLAT 0x007C7244, // TRACK_ELEM_END_STATION 0x007C7254, // TRACK_ELEM_BEGIN_STATION @@ -12759,7 +12759,7 @@ static constexpr const uint32 _OldFlyingRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x00811184 */ -static constexpr const uint32 _OldVirginiaReelTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldVirginiaReelTrackPaintFunctions[256] = { 0x00811264, // TRACK_ELEM_FLAT 0x008112D4, // TRACK_ELEM_END_STATION 0x008112E4, // TRACK_ELEM_BEGIN_STATION @@ -13019,7 +13019,7 @@ static constexpr const uint32 _OldVirginiaReelTrackPaintFunctions[256] = { }; /** rct2: 0x008164AC */ -static constexpr const uint32 _OldSplashBoatsTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSplashBoatsTrackPaintFunctions[256] = { 0x00816584, // TRACK_ELEM_FLAT 0x00816614, // TRACK_ELEM_END_STATION 0x00816624, // TRACK_ELEM_BEGIN_STATION @@ -13279,7 +13279,7 @@ static constexpr const uint32 _OldSplashBoatsTrackPaintFunctions[256] = { }; /** rct2: 0x0081F268 */ -static constexpr const uint32 _OldMiniHelicoptersTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMiniHelicoptersTrackPaintFunctions[256] = { 0x0081F348, // TRACK_ELEM_FLAT 0x0081F3B8, // TRACK_ELEM_END_STATION 0x0081F3C8, // TRACK_ELEM_BEGIN_STATION @@ -13539,7 +13539,7 @@ static constexpr const uint32 _OldMiniHelicoptersTrackPaintFunctions[256] = { }; /** rct2: 0x008245A8 */ -static constexpr const uint32 _OldLayDownRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldLayDownRollerCoasterTrackPaintFunctions[256] = { 0x0082491C, // TRACK_ELEM_FLAT 0x00824B8C, // TRACK_ELEM_END_STATION 0x00824B9C, // TRACK_ELEM_BEGIN_STATION @@ -13799,7 +13799,7 @@ static constexpr const uint32 _OldLayDownRollerCoasterTrackPaintFunctions[256] = }; /** rct2: 0x0086347C */ -static constexpr const uint32 _OldSuspendedMonorailTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSuspendedMonorailTrackPaintFunctions[256] = { 0x008636F4, // TRACK_ELEM_FLAT 0x008637A4, // TRACK_ELEM_END_STATION 0x008637B4, // TRACK_ELEM_BEGIN_STATION @@ -14059,7 +14059,7 @@ static constexpr const uint32 _OldSuspendedMonorailTrackPaintFunctions[256] = { }; /** rct2: 0x0086E2F8 */ -static constexpr const uint32 _OldReverserRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldReverserRollerCoasterTrackPaintFunctions[256] = { 0x0086E65C, // TRACK_ELEM_FLAT 0x0086E70C, // TRACK_ELEM_END_STATION 0x0086E71C, // TRACK_ELEM_BEGIN_STATION @@ -14319,7 +14319,7 @@ static constexpr const uint32 _OldReverserRollerCoasterTrackPaintFunctions[256] }; /** rct2: 0x00876618 */ -static constexpr const uint32 _OldHeartlineTwisterCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldHeartlineTwisterCoasterTrackPaintFunctions[256] = { 0x0087694C, // TRACK_ELEM_FLAT 0x00876A1C, // TRACK_ELEM_END_STATION 0x00876A2C, // TRACK_ELEM_BEGIN_STATION @@ -14579,7 +14579,7 @@ static constexpr const uint32 _OldHeartlineTwisterCoasterTrackPaintFunctions[256 }; /** rct2: 0x0087EDC4 */ -static constexpr const uint32 _OldMiniGolfTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMiniGolfTrackPaintFunctions[256] = { 0x0087F10C, // TRACK_ELEM_FLAT 0x0087F17C, // TRACK_ELEM_END_STATION 0x0087F18C, // TRACK_ELEM_BEGIN_STATION @@ -14839,7 +14839,7 @@ static constexpr const uint32 _OldMiniGolfTrackPaintFunctions[256] = { }; /** rct2: 0x008AD280 */ -static constexpr const uint32 _OldGigaCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldGigaCoasterTrackPaintFunctions[256] = { 0x008AD674, // TRACK_ELEM_FLAT 0x008AD8C4, // TRACK_ELEM_END_STATION 0x008AD8D4, // TRACK_ELEM_BEGIN_STATION @@ -15099,7 +15099,7 @@ static constexpr const uint32 _OldGigaCoasterTrackPaintFunctions[256] = { }; /** rct2: 0x00886074 */ -static constexpr const uint32 _OldRoToDropTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldRoToDropTrackPaintFunctions[256] = { 0, 0, 0, @@ -15359,7 +15359,7 @@ static constexpr const uint32 _OldRoToDropTrackPaintFunctions[256] = { }; /** rct2: 0x00887208 */ -static constexpr const uint32 _OldFlyingSaucersTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldFlyingSaucersTrackPaintFunctions[256] = { 0, 0, 0, @@ -15619,7 +15619,7 @@ static constexpr const uint32 _OldFlyingSaucersTrackPaintFunctions[256] = { }; /** rct2: 0x00889C28 */ -static constexpr const uint32 _OldCrookedHouseTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldCrookedHouseTrackPaintFunctions[256] = { 0, 0, 0, @@ -15879,7 +15879,7 @@ static constexpr const uint32 _OldCrookedHouseTrackPaintFunctions[256] = { }; /** rct2: 0x0088AC88 */ -static constexpr const uint32 _OldMonorailCyclesTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMonorailCyclesTrackPaintFunctions[256] = { 0x0088AD48, // TRACK_ELEM_FLAT 0x0088AD58, // TRACK_ELEM_END_STATION 0x0088AD68, // TRACK_ELEM_BEGIN_STATION @@ -16139,7 +16139,7 @@ static constexpr const uint32 _OldMonorailCyclesTrackPaintFunctions[256] = { }; /** rct2: 0x008AE36C */ -static constexpr const uint32 _OldCompactInvertedCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldCompactInvertedCoasterTrackPaintFunctions[256] = { 0x008AE6E0, // TRACK_ELEM_FLAT 0x008AE950, // TRACK_ELEM_END_STATION 0x008AE960, // TRACK_ELEM_BEGIN_STATION @@ -16399,7 +16399,7 @@ static constexpr const uint32 _OldCompactInvertedCoasterTrackPaintFunctions[256] }; /** rct2: 0x008AEDE0 */ -static constexpr const uint32 _OldWaterCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldWaterCoasterTrackPaintFunctions[256] = { 0x008AF154, // TRACK_ELEM_FLAT 0x008AF2A4, // TRACK_ELEM_END_STATION 0x008AF2B4, // TRACK_ELEM_BEGIN_STATION @@ -16659,7 +16659,7 @@ static constexpr const uint32 _OldWaterCoasterTrackPaintFunctions[256] = { }; /** rct2: 0x008AF764 */ -static constexpr const uint32 _OldAirPoweredVerticalCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldAirPoweredVerticalCoasterTrackPaintFunctions[256] = { 0x008AFAD4, // TRACK_ELEM_FLAT 0x008AFAE4, // TRACK_ELEM_END_STATION 0x008AFAF4, // TRACK_ELEM_BEGIN_STATION @@ -16919,7 +16919,7 @@ static constexpr const uint32 _OldAirPoweredVerticalCoasterTrackPaintFunctions[2 }; /** rct2: 0x00890940 */ -static constexpr const uint32 _OldInvertedHairpinCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldInvertedHairpinCoasterTrackPaintFunctions[256] = { 0x00890CB4, // TRACK_ELEM_FLAT 0x00890D84, // TRACK_ELEM_END_STATION 0x00890D94, // TRACK_ELEM_BEGIN_STATION @@ -17179,7 +17179,7 @@ static constexpr const uint32 _OldInvertedHairpinCoasterTrackPaintFunctions[256] }; /** rct2: 0x00898384 */ -static constexpr const uint32 _OldMagicCarpetTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMagicCarpetTrackPaintFunctions[256] = { 0, 0, 0, @@ -17439,7 +17439,7 @@ static constexpr const uint32 _OldMagicCarpetTrackPaintFunctions[256] = { }; /** rct2: 0x008995D4 */ -static constexpr const uint32 _OldSubmarineRideTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldSubmarineRideTrackPaintFunctions[256] = { 0x008996B4, // TRACK_ELEM_FLAT 0x008996C4, // TRACK_ELEM_END_STATION 0x008996D4, // TRACK_ELEM_BEGIN_STATION @@ -17699,7 +17699,7 @@ static constexpr const uint32 _OldSubmarineRideTrackPaintFunctions[256] = { }; /** rct2: 0x0089B0C0 */ -static constexpr const uint32 _OldRiverRaftsTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldRiverRaftsTrackPaintFunctions[256] = { 0x0089B170, // TRACK_ELEM_FLAT 0x0089B1A0, // TRACK_ELEM_END_STATION 0x0089B1B0, // TRACK_ELEM_BEGIN_STATION @@ -17959,7 +17959,7 @@ static constexpr const uint32 _OldRiverRaftsTrackPaintFunctions[256] = { }; /** rct2: 0x008A13B4 */ -static constexpr const uint32 _OldEnterpriseTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldEnterpriseTrackPaintFunctions[256] = { 0, 0, 0, @@ -18219,7 +18219,7 @@ static constexpr const uint32 _OldEnterpriseTrackPaintFunctions[256] = { }; /** rct2: 0x008B005C */ -static constexpr const uint32 _OldInvertedImpulseCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldInvertedImpulseCoasterTrackPaintFunctions[256] = { 0x008B0460, // TRACK_ELEM_FLAT 0x008B0470, // TRACK_ELEM_END_STATION 0x008B0480, // TRACK_ELEM_BEGIN_STATION @@ -18479,7 +18479,7 @@ static constexpr const uint32 _OldInvertedImpulseCoasterTrackPaintFunctions[256] }; /** rct2: 0x008A46D8 */ -static constexpr const uint32 _OldMiniRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMiniRollerCoasterTrackPaintFunctions[256] = { 0x008A4ABC, // TRACK_ELEM_FLAT 0x008A4D0C, // TRACK_ELEM_END_STATION 0x008A4D1C, // TRACK_ELEM_BEGIN_STATION @@ -18739,7 +18739,7 @@ static constexpr const uint32 _OldMiniRollerCoasterTrackPaintFunctions[256] = { }; /** rct2: 0x008B0610 */ -static constexpr const uint32 _OldMineRideTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldMineRideTrackPaintFunctions[256] = { 0x008B08D0, // TRACK_ELEM_FLAT 0x008B0A80, // TRACK_ELEM_END_STATION 0x008B0A90, // TRACK_ELEM_BEGIN_STATION @@ -18999,7 +18999,7 @@ static constexpr const uint32 _OldMineRideTrackPaintFunctions[256] = { }; /** rct2: 0x008A5F6C */ -static constexpr const uint32 _OldLimLaunchedRollerCoasterTrackPaintFunctions[256] = { +static constexpr const uint32_t _OldLimLaunchedRollerCoasterTrackPaintFunctions[256] = { 0x008A6370, // TRACK_ELEM_FLAT 0x008A6D50, // TRACK_ELEM_END_STATION 0x008A6D60, // TRACK_ELEM_BEGIN_STATION @@ -19258,9 +19258,9 @@ static constexpr const uint32 _OldLimLaunchedRollerCoasterTrackPaintFunctions[25 0, }; -static constexpr const uint32 _null[256] = {0}; +static constexpr const uint32_t _null[256] = {0}; -const uint32 * RideTypeTrackPaintFunctionsOld[RIDE_TYPE_COUNT] = { +const uint32_t * RideTypeTrackPaintFunctionsOld[RIDE_TYPE_COUNT] = { _OldSpiralRollerCoasterTrackPaintFunctions, // RIDE_TYPE_SPIRAL_ROLLER_COASTER _OldStandUpRollerCoasterTrackPaintFunctions, // RIDE_TYPE_STAND_UP_ROLLER_COASTER _OldSuspendedSwingingCoasterTrackPaintFunctions, // RIDE_TYPE_SUSPENDED_SWINGING_COASTER diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 6b19d023b6..0fc5979b3a 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -45,10 +45,10 @@ struct map_backup rct_tile_element tile_elements[MAX_TILE_ELEMENTS]; rct_tile_element * tile_pointers[MAX_TILE_TILE_ELEMENT_POINTERS]; rct_tile_element * next_free_tile_element; - uint16 map_size_units; - uint16 map_size_units_minus_2; - uint16 map_size; - uint8 current_rotation; + uint16_t map_size_units; + uint16_t map_size_units_minus_2; + uint16_t map_size; + uint8_t current_rotation; }; rct_track_td6 * gActiveTrackDesign; @@ -58,11 +58,11 @@ LocationXYZ16 gTrackPreviewMax; LocationXYZ16 gTrackPreviewOrigin; bool byte_9D8150; -static uint8 _trackDesignPlaceOperation; +static uint8_t _trackDesignPlaceOperation; static bool _trackDesignDontPlaceScenery; static money32 _trackDesignPlaceCost; -static sint16 _trackDesignPlaceZ; -static sint16 _trackDesignPlaceSceneryZ; +static int16_t _trackDesignPlaceZ; +static int16_t _trackDesignPlaceSceneryZ; // Previously all flags in byte_F4414E static bool _trackDesignPlaceStateEntranceExitPlaced = false; @@ -70,7 +70,7 @@ static bool _trackDesignPlaceStateSceneryUnavailable = false; static bool _trackDesignPlaceStateHasScenery = false; static bool _trackDesignPlaceStatePlaceScenery = true; -static rct_track_td6 * track_design_open_from_buffer(uint8 * src, size_t srcLength); +static rct_track_td6 * track_design_open_from_buffer(uint8_t * src, size_t srcLength); static map_backup * track_design_preview_backup_map(); @@ -96,9 +96,9 @@ rct_track_td6 * track_design_open(const utf8 * path) } // Decode the track data - uint8 * decoded = (uint8 *) malloc(0x10000); + uint8_t * decoded = (uint8_t *) malloc(0x10000); size_t decodedLength = sawyercoding_decode_td6(buffer.data(), decoded, buffer.size()); - decoded = (uint8 *) realloc(decoded, decodedLength); + decoded = (uint8_t *) realloc(decoded, decodedLength); if (decoded == nullptr) { log_error("failed to realloc"); @@ -122,7 +122,7 @@ rct_track_td6 * track_design_open(const utf8 * path) return nullptr; } -static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) +static rct_track_td6 * track_design_open_from_td4(uint8_t * src, size_t srcLength) { rct_track_td4 * td4 = (rct_track_td4 *) calloc(1, sizeof(rct_track_td4)); if (td4 == nullptr) @@ -132,7 +132,7 @@ static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) return nullptr; } - uint8 version = (src[7] >> 2) & 3; + uint8_t version = (src[7] >> 2) & 3; if (version == 0) { memcpy(td4, src, 0x38); @@ -204,7 +204,7 @@ static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) td6->version_and_colour_scheme = td4->version_and_colour_scheme; // Vehicle colours - for (sint32 i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++) + for (int32_t i = 0; i < RCT1_MAX_TRAINS_PER_RIDE; i++) { // RCT1 had no third colour RCT1::RCT1VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( @@ -249,7 +249,7 @@ static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) } } // Set remaining vehicles to same colour as first vehicle - for (sint32 i = RCT1_MAX_TRAINS_PER_RIDE; i < MAX_VEHICLES_PER_RIDE; i++) + for (int32_t i = RCT1_MAX_TRAINS_PER_RIDE; i < MAX_VEHICLES_PER_RIDE; i++) { td6->vehicle_colours[i] = td6->vehicle_colours[0]; td6->vehicle_additional_colour[i] = td6->vehicle_additional_colour[0]; @@ -258,7 +258,7 @@ static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) // Track colours if (version == 0) { - for (sint32 i = 0; i < NUM_COLOUR_SCHEMES; i++) + for (int32_t i = 0; i < NUM_COLOUR_SCHEMES; i++) { td6->track_spine_colour[i] = RCT1::GetColour(td4->track_spine_colour_v0); td6->track_rail_colour[i] = RCT1::GetColour(td4->track_rail_colour_v0); @@ -279,7 +279,7 @@ static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) } else { - for (sint32 i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) + for (int32_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) { td6->track_spine_colour[i] = RCT1::GetColour(td4->track_spine_colour[i]); td6->track_rail_colour[i] = RCT1::GetColour(td4->track_rail_colour[i]); @@ -326,9 +326,9 @@ static rct_track_td6 * track_design_open_from_td4(uint8 * src, size_t srcLength) return td6; } -static rct_track_td6 * track_design_open_from_buffer(uint8 * src, size_t srcLength) +static rct_track_td6 * track_design_open_from_buffer(uint8_t * src, size_t srcLength) { - uint8 version = (src[7] >> 2) & 3; + uint8_t version = (src[7] >> 2) & 3; if (version == 0 || version == 1) { return track_design_open_from_td4(src, srcLength); @@ -481,7 +481,7 @@ static void track_design_mirror_scenery(rct_track_td6 * td6) rct_td6_scenery_element * scenery = td6->scenery_elements; for (; scenery != nullptr && scenery->scenery_object.end_flag != 0xFF; scenery++) { - uint8 entry_type, entry_index; + uint8_t entry_type, entry_index; if (!find_object_in_entry_group(&scenery->scenery_object, &entry_type, &entry_index)) { entry_type = object_entry_get_type(&scenery->scenery_object); @@ -496,7 +496,7 @@ static void track_design_mirror_scenery(rct_track_td6 * td6) { case OBJECT_TYPE_LARGE_SCENERY: { - sint16 x1 = 0, x2 = 0, y1 = 0, y2 = 0; + int16_t x1 = 0, x2 = 0, y1 = 0, y2 = 0; for (rct_large_scenery_tile * tile = scenery_entry->large_scenery.tiles; tile->x_offset != -1; tile++) { if (x1 > tile->x_offset) @@ -574,7 +574,7 @@ static void track_design_mirror_scenery(rct_track_td6 * td6) scenery->flags ^= (1 << 6); } - uint8 flags = scenery->flags; + uint8_t flags = scenery->flags; flags = ((flags & (1 << 3)) >> 2) | ((flags & (1 << 1)) << 2); scenery->flags &= 0xF5; scenery->flags |= flags; @@ -606,7 +606,7 @@ static void track_design_mirror_ride(rct_track_td6 * td6) } /** rct2: 0x00993EDC */ -static constexpr const uint8 maze_segment_mirror_map[] = { +static constexpr const uint8_t maze_segment_mirror_map[] = { 5, 4, 2, 7, 1, 0, 14, 3, 13, 12, 10, 15, 9, 8, 6, 11 }; @@ -630,9 +630,9 @@ static void track_design_mirror_maze(rct_track_td6 * td6) continue; } - uint16 maze_entry = maze->maze_entry; - uint16 new_entry = 0; - for (uint8 position = bitscanforward(maze_entry); position != 0xFF; position = bitscanforward(maze_entry)) + uint16_t maze_entry = maze->maze_entry; + uint16_t new_entry = 0; + for (uint8_t position = bitscanforward(maze_entry); position != 0xFF; position = bitscanforward(maze_entry)) { maze_entry &= ~(1 << position); new_entry |= (1 << maze_segment_mirror_map[position]); @@ -658,7 +658,7 @@ void track_design_mirror(rct_track_td6 * td6) track_design_mirror_scenery(td6); } -static void track_design_add_selection_tile(sint16 x, sint16 y) +static void track_design_add_selection_tile(int16_t x, int16_t y) { LocationXY16 * selectionTile = gMapSelectionTiles; // Subtract 2 because the tile gets incremented later on @@ -680,7 +680,7 @@ static void track_design_add_selection_tile(sint16 x, sint16 y) selectionTile->x = -1; } -static void track_design_update_max_min_coordinates(sint16 x, sint16 y, sint16 z) +static void track_design_update_max_min_coordinates(int16_t x, int16_t y, int16_t z) { gTrackPreviewMin.x = std::min(gTrackPreviewMin.x, x); gTrackPreviewMax.x = std::max(gTrackPreviewMax.x, x); @@ -694,10 +694,10 @@ static void track_design_update_max_min_coordinates(sint16 x, sint16 y, sint16 z * * rct2: 0x006D0964 */ -static sint32 -track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 originX, sint32 originY, sint32 originZ) +static int32_t +track_design_place_scenery(rct_td6_scenery_element * scenery_start, int32_t originX, int32_t originY, int32_t originZ) { - for (uint8 mode = 0; mode <= 1; mode++) + for (uint8_t mode = 0; mode <= 1; mode++) { if (scenery_start->scenery_object.end_flag != 0xFF) { @@ -711,8 +711,8 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi for (rct_td6_scenery_element * scenery = scenery_start; scenery->scenery_object.end_flag != 0xFF; scenery++) { - uint8 rotation = _currentTrackPieceDirection; - LocationXY8 tile = {(uint8) (originX / 32), (uint8) (originY / 32)}; + uint8_t rotation = _currentTrackPieceDirection; + LocationXY8 tile = {(uint8_t) (originX / 32), (uint8_t) (originY / 32)}; switch (rotation & 3) { case TILE_ELEMENT_DIRECTION_WEST: @@ -733,12 +733,12 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi break; } - LocationXY16 mapCoord = {(sint16) (tile.x * 32), (sint16) (tile.y * 32)}; + LocationXY16 mapCoord = {(int16_t) (tile.x * 32), (int16_t) (tile.y * 32)}; track_design_update_max_min_coordinates(mapCoord.x, mapCoord.y, originZ); if (_trackDesignPlaceOperation == PTD_OPERATION_DRAW_OUTLINES && mode == 0) { - uint8 new_tile = 1; + uint8_t new_tile = 1; LocationXY16 * selectionTile = gMapSelectionTiles; for (; selectionTile->x != -1; selectionTile++) { @@ -765,7 +765,7 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi if (_trackDesignPlaceOperation == PTD_OPERATION_CLEAR_OUTLINES && mode == 0) { - uint8 entry_type, entry_index; + uint8_t entry_type, entry_index; if (!find_object_in_entry_group(&scenery->scenery_object, &entry_type, &entry_index)) { entry_type = object_entry_get_type(&scenery->scenery_object); @@ -799,8 +799,8 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi entry_type = 0xFF; } } - sint32 z; - const uint32 flags = GAME_COMMAND_FLAG_APPLY | + int32_t z; + const uint32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; @@ -814,10 +814,10 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi rotation &= 3; //bh - uint8 quadrant = (scenery->flags >> 2) + _currentTrackPieceDirection; + uint8_t quadrant = (scenery->flags >> 2) + _currentTrackPieceDirection; quadrant &= 3; - uint8 bh = rotation | (quadrant << 6) | TILE_ELEMENT_TYPE_SMALL_SCENERY; + uint8_t bh = rotation | (quadrant << 6) | TILE_ELEMENT_TYPE_SMALL_SCENERY; rct_scenery_entry * small_scenery = get_small_scenery_entry(entry_index); if (!(!scenery_small_entry_has_flag(small_scenery, SMALL_SCENERY_FLAG_FULL_TILE) && @@ -877,7 +877,7 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi if (_trackDesignPlaceOperation == PTD_OPERATION_GET_PLACE_Z) { - sint32 z = scenery->z * 8 + _trackDesignPlaceZ; + int32_t z = scenery->z * 8 + _trackDesignPlaceZ; if (z < _trackDesignPlaceSceneryZ) { _trackDesignPlaceSceneryZ = z; @@ -892,7 +892,7 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi ) { - uint8 entry_type, entry_index; + uint8_t entry_type, entry_index; if (!find_object_in_entry_group(&scenery->scenery_object, &entry_type, &entry_index)) { entry_type = object_entry_get_type(&scenery->scenery_object); @@ -932,9 +932,9 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi } money32 cost; - sint16 z; - uint8 bl; - uint8 quadrant; + int16_t z; + uint8_t bl; + uint8_t quadrant; switch (entry_type) { @@ -1088,7 +1088,7 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi entry_index |= (1 << 7); } - uint8 bh = ((scenery->flags & 0xF) << rotation); + uint8_t bh = ((scenery->flags & 0xF) << rotation); bl = bh >> 4; bh = (bh | bl) & 0xF; bl = (((scenery->flags >> 5) + rotation) & 3) << 5; @@ -1174,7 +1174,7 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi return 1; } -static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, sint16 z, uint8 rideIndex) +static int32_t track_design_place_maze(rct_track_td6 * td6, int16_t x, int16_t y, int16_t z, uint8_t rideIndex) { if (_trackDesignPlaceOperation == PTD_OPERATION_DRAW_OUTLINES) { @@ -1191,9 +1191,9 @@ static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, s rct_td6_maze_element * maze_element = td6->maze_elements; for (; maze_element->all != 0; maze_element++) { - uint8 rotation = _currentTrackPieceDirection & 3; - sint16 tmpX = maze_element->x * 32; - sint16 tmpY = maze_element->y * 32; + uint8_t rotation = _currentTrackPieceDirection & 3; + int16_t tmpX = maze_element->x * 32; + int16_t tmpY = maze_element->y * 32; rotate_map_coordinates(&tmpX, &tmpY, rotation); CoordsXY mapCoord = { tmpX, tmpY }; mapCoord.x += x; @@ -1212,9 +1212,9 @@ static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, s _trackDesignPlaceOperation == PTD_OPERATION_GET_COST ) { - uint8 flags; + uint8_t flags; money32 cost = 0; - uint16 maze_entry; + uint16_t maze_entry; switch (maze_element->type) { case MAZE_ELEMENT_TYPE_ENTRANCE: @@ -1338,7 +1338,7 @@ static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, s } rct_tile_element * tile_element = map_get_surface_element_at(mapCoord); - sint16 map_height = tile_element->base_height * 8; + int16_t map_height = tile_element->base_height * 8; if (tile_element->properties.surface.slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) { map_height += 16; @@ -1350,7 +1350,7 @@ static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, s if (surface_get_water_height(tile_element) > 0) { - sint16 water_height = surface_get_water_height(tile_element); + int16_t water_height = surface_get_water_height(tile_element); water_height *= 16; if (water_height > map_height) { @@ -1358,7 +1358,7 @@ static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, s } } - sint16 temp_z = z + _trackDesignPlaceZ - map_height; + int16_t temp_z = z + _trackDesignPlaceZ - map_height; if (temp_z < 0) { _trackDesignPlaceZ -= temp_z; @@ -1377,7 +1377,7 @@ static sint32 track_design_place_maze(rct_track_td6 * td6, sint16 x, sint16 y, s return 1; } -static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sint16 z, uint8 rideIndex) +static bool track_design_place_ride(rct_track_td6 * td6, int16_t x, int16_t y, int16_t z, uint8_t rideIndex) { const rct_preview_track * * trackBlockArray = (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) ? TrackBlocks : FlatRideTrackBlocks; @@ -1395,13 +1395,13 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin _trackDesignPlaceZ = 0; _trackDesignPlaceCost = 0; - uint8 rotation = _currentTrackPieceDirection; + uint8_t rotation = _currentTrackPieceDirection; // Track elements rct_td6_track_element * track = td6->track_elements; for (; track->type != 0xFF; track++) { - uint8 trackType = track->type; + uint8_t trackType = track->type; if (trackType == TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP) { trackType = 0xFF; @@ -1424,8 +1424,8 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin { const rct_track_coordinates * trackCoordinates = &TrackCoordinates[trackType]; const rct_preview_track * trackBlock = trackBlockArray[trackType]; - sint32 tempZ = z - trackCoordinates->z_begin + trackBlock->z; - uint8 flags = + int32_t tempZ = z - trackCoordinates->z_begin + trackBlock->z; + uint8_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | @@ -1441,18 +1441,18 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin const rct_track_coordinates * trackCoordinates = &TrackCoordinates[trackType]; //di - sint16 tempZ = z - trackCoordinates->z_begin; - uint32 trackColour = (track->flags >> 4) & 0x3; - uint32 brakeSpeed = (track->flags & 0x0F) * 2; - uint32 seatRotation = track->flags & 0x0F; + int16_t tempZ = z - trackCoordinates->z_begin; + uint32_t trackColour = (track->flags >> 4) & 0x3; + uint32_t brakeSpeed = (track->flags & 0x0F) * 2; + uint32_t seatRotation = track->flags & 0x0F; - uint32 edi = + uint32_t edi = (brakeSpeed << 16) | (seatRotation << 28) | (trackColour << 24) | (tempZ & 0xFFFF); - sint32 edx = _currentRideIndex | (trackType << 8); + int32_t edx = _currentRideIndex | (trackType << 8); if (track->flags & TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT) { edx |= 0x10000; @@ -1462,7 +1462,7 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin edx |= 0x20000; } - uint8 flags = GAME_COMMAND_FLAG_APPLY; + uint8_t flags = GAME_COMMAND_FLAG_APPLY; if (_trackDesignPlaceOperation == PTD_OPERATION_GET_COST) { flags |= GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED; @@ -1491,11 +1491,11 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin } case PTD_OPERATION_GET_PLACE_Z: { - sint32 tempZ = z - TrackCoordinates[trackType].z_begin; + int32_t tempZ = z - TrackCoordinates[trackType].z_begin; for (const rct_preview_track * trackBlock = trackBlockArray[trackType]; trackBlock->index != 0xFF; trackBlock++) { - sint16 tmpX = x; - sint16 tmpY = y; + int16_t tmpX = x; + int16_t tmpY = y; map_offset_with_rotation(&tmpX, &tmpY, trackBlock->x, trackBlock->y, rotation); CoordsXY tile = { tmpX, tmpY }; if (tile.x < 0 || tile.y < 0 || tile.x >= (256 * 32) || tile.y >= (256 * 32)) @@ -1509,7 +1509,7 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin return false; } - sint32 height = tileElement->base_height * 8; + int32_t height = tileElement->base_height * 8; if (tileElement->properties.surface.slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) { height += 16; @@ -1519,12 +1519,12 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin } } - uint8 water_height = surface_get_water_height(tileElement) * 16; + uint8_t water_height = surface_get_water_height(tileElement) * 16; if (water_height > 0 && water_height > height) { height = water_height; } - sint32 heightDifference = tempZ + _trackDesignPlaceZ + trackBlock->z - height; + int32_t heightDifference = tempZ + _trackDesignPlaceZ + trackBlock->z - height; if (heightDifference < 0) { _trackDesignPlaceZ -= heightDifference; @@ -1575,7 +1575,7 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin case PTD_OPERATION_GET_COST: { rotation = (rotation + entrance->direction) & 3; - uint8 isExit = 0; + uint8_t isExit = 0; if (entrance->direction & (1 << 7)) { isExit = 1; @@ -1584,12 +1584,12 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin if (_trackDesignPlaceOperation != PTD_OPERATION_1) { LocationXY16 tile = { - (sint16) (x + CoordsDirectionDelta[rotation].x), - (sint16) (y + CoordsDirectionDelta[rotation].y) + (int16_t) (x + CoordsDirectionDelta[rotation].x), + (int16_t) (y + CoordsDirectionDelta[rotation].y) }; rct_tile_element * tile_element = map_get_first_element_at(tile.x >> 5, tile.y >> 5); z = gTrackPreviewOrigin.z / 8; - z += (entrance->z == (sint8) (uint8) 0x80) ? -1 : entrance->z; + z += (entrance->z == (int8_t) (uint8_t) 0x80) ? -1 : entrance->z; do { @@ -1602,8 +1602,8 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin continue; } - sint32 stationIndex = tile_element_get_station(tile_element); - uint8 bl = 1; + int32_t stationIndex = tile_element_get_station(tile_element); + uint8_t bl = 1; if (_trackDesignPlaceOperation == PTD_OPERATION_GET_COST) { bl = 41; @@ -1636,7 +1636,7 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin } else { - z = (entrance->z == (sint8) (uint8) 0x80) ? -1 : entrance->z; + z = (entrance->z == (int8_t) (uint8_t) 0x80) ? -1 : entrance->z; z *= 8; z += gTrackPreviewOrigin.z; z >>= 4; @@ -1681,7 +1681,7 @@ static bool track_design_place_ride(rct_track_td6 * td6, sint16 x, sint16 y, sin * bl == 6, Clear white outlined track. * rct2: 0x006D01B3 */ -sint32 place_virtual_track(rct_track_td6 * td6, uint8 ptdOperation, bool placeScenery, uint8 rideIndex, sint16 x, sint16 y, sint16 z) +int32_t place_virtual_track(rct_track_td6 * td6, uint8_t ptdOperation, bool placeScenery, uint8_t rideIndex, int16_t x, int16_t y, int16_t z) { // Previously byte_F4414E was cleared here _trackDesignPlaceStatePlaceScenery = placeScenery; @@ -1704,7 +1704,7 @@ sint32 place_virtual_track(rct_track_td6 * td6, uint8 ptdOperation, bool placeSc gTrackPreviewMax.z = z; _trackDesignPlaceSceneryZ = 0; - uint8 track_place_success = 0; + uint8_t track_place_success = 0; if (td6->type == RIDE_TYPE_MAZE) { track_place_success = track_design_place_maze(td6, x, y, z, rideIndex); @@ -1753,19 +1753,19 @@ sint32 place_virtual_track(rct_track_td6 * td6, uint8 ptdOperation, bool placeSc * ebx = ride_id * cost = edi */ -static bool track_design_place_preview(rct_track_td6 * td6, money32 * cost, uint8 * rideId, uint8 * flags) +static bool track_design_place_preview(rct_track_td6 * td6, money32 * cost, uint8_t * rideId, uint8_t * flags) { *flags = 0; - uint8 entry_type, entry_index; + uint8_t entry_type, entry_index; if (!find_object_in_entry_group(&td6->vehicle_object, &entry_type, &entry_index)) { entry_index = RIDE_ENTRY_INDEX_NULL; } - uint8 rideIndex; - uint8 colour; - uint8 rideCreateFlags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5; + uint8_t rideIndex; + uint8_t colour; + uint8_t rideCreateFlags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5; if (ride_create_command(td6->type, entry_index, rideCreateFlags, &rideIndex, &colour) == MONEY32_UNDEFINED) { return false; @@ -1783,7 +1783,7 @@ static bool track_design_place_preview(rct_track_td6 * td6, money32 * cost, uint ride->entrance_style = td6->entrance_style; - for (sint32 i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) + for (int32_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) { ride->track_colour_main[i] = td6->track_spine_colour[i]; ride->track_colour_additional[i] = td6->track_rail_colour[i]; @@ -1794,7 +1794,7 @@ static bool track_design_place_preview(rct_track_td6 * td6, money32 * cost, uint // in the preview window if (!ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_TRACK)) { - for (sint32 i = 0; i < RCT12_MAX_VEHICLE_COLOURS; i++) + for (int32_t i = 0; i < RCT12_MAX_VEHICLE_COLOURS; i++) { ride->vehicle_colours[i] = td6->vehicle_colours[i]; ride->vehicle_colours_extended[i] = td6->vehicle_additional_colour[i]; @@ -1802,13 +1802,13 @@ static bool track_design_place_preview(rct_track_td6 * td6, money32 * cost, uint } byte_9D8150 = true; - uint8 backup_rotation = _currentTrackPieceDirection; - uint32 backup_park_flags = gParkFlags; + uint8_t backup_rotation = _currentTrackPieceDirection; + uint32_t backup_park_flags = gParkFlags; gParkFlags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; - sint32 mapSize = gMapSize << 4; + int32_t mapSize = gMapSize << 4; _currentTrackPieceDirection = 0; - sint32 z = place_virtual_track(td6, PTD_OPERATION_GET_PLACE_Z, true, 0, mapSize, mapSize, 16); + int32_t z = place_virtual_track(td6, PTD_OPERATION_GET_PLACE_Z, true, 0, mapSize, mapSize, 16); if (_trackDesignPlaceStateHasScenery) { @@ -1854,7 +1854,7 @@ static bool track_design_place_preview(rct_track_td6 * td6, money32 * cost, uint } } -static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uint8 * outRideIndex) +static money32 place_track_design(int16_t x, int16_t y, int16_t z, uint8_t flags, uint8_t * outRideIndex) { *outRideIndex = 255; @@ -1878,7 +1878,7 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin } rct_object_entry * rideEntryObject = &td6->vehicle_object; - uint8 entryType, entryIndex; + uint8_t entryType, entryIndex; if (!find_object_in_entry_group(rideEntryObject, &entryType, &entryIndex)) { entryIndex = 0xFF; @@ -1895,11 +1895,11 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin const ObjectRepositoryItem * ori = object_repository_find_object_by_name(rideEntryObject->name); if (ori != nullptr) { - uint8 rideGroupIndex = ori->RideInfo.RideGroupIndex; + uint8_t rideGroupIndex = ori->RideInfo.RideGroupIndex; const RideGroup * td6RideGroup = RideGroupManager::RideGroupFind(td6->type, rideGroupIndex); - uint8 * availableRideEntries = get_ride_entry_indices_for_ride_type(td6->type); - for (uint8 * rei = availableRideEntries; *rei != RIDE_ENTRY_INDEX_NULL; rei++) + uint8_t * availableRideEntries = get_ride_entry_indices_for_ride_type(td6->type); + for (uint8_t * rei = availableRideEntries; *rei != RIDE_ENTRY_INDEX_NULL; rei++) { rct_ride_entry * ire = get_ride_entry(*rei); @@ -1918,8 +1918,8 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin } } - uint8 rideIndex; - uint8 rideColour; + uint8_t rideIndex; + uint8_t rideColour; money32 createRideResult = ride_create_command(td6->type, entryIndex, GAME_COMMAND_FLAG_APPLY, &rideIndex, &rideColour); if (createRideResult == MONEY32_UNDEFINED) @@ -1949,7 +1949,7 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin } else { - uint8 operation; + uint8_t operation; if (flags & GAME_COMMAND_FLAG_GHOST) { operation = PTD_OPERATION_4; @@ -1995,7 +1995,7 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin game_do_command(0, GAME_COMMAND_FLAG_APPLY | ((td6->lift_hill_speed_num_circuits & 0x1F) << 8), 0, rideIndex | (8 << 8), GAME_COMMAND_SET_RIDE_SETTING, 0, 0); - uint8 num_circuits = td6->lift_hill_speed_num_circuits >> 5; + uint8_t num_circuits = td6->lift_hill_speed_num_circuits >> 5; if (num_circuits == 0) { num_circuits = 1; @@ -2009,14 +2009,14 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin ride->entrance_style = td6->entrance_style; - for (sint32 i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) + for (int32_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) { ride->track_colour_main[i] = td6->track_spine_colour[i]; ride->track_colour_additional[i] = td6->track_rail_colour[i]; ride->track_colour_supports[i] = td6->track_support_colour[i]; } - for (sint32 i = 0; i < MAX_VEHICLES_PER_RIDE; i++) + for (int32_t i = 0; i < MAX_VEHICLES_PER_RIDE; i++) { ride->vehicle_colours[i].body_colour = td6->vehicle_colours[i].body_colour; ride->vehicle_colours[i].trim_colour = td6->vehicle_colours[i].trim_colour; @@ -2030,7 +2030,7 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin return cost; } -static money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, sint16 x, sint16 y, sint16 z) +static money32 place_maze_design(uint8_t flags, uint8_t rideIndex, uint16_t mazeEntry, int16_t x, int16_t y, int16_t z) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION; gCommandPosition.x = x + 8; @@ -2076,11 +2076,11 @@ static money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, if (!gCheatsDisableSupportLimits) { rct_tile_element * tileElement = map_get_surface_element_at({x, y}); - uint8 supportZ = (z + 32) >> 3; + uint8_t supportZ = (z + 32) >> 3; if (supportZ > tileElement->base_height) { - uint8 supportHeight = (supportZ - tileElement->base_height) / 2; - uint8 maxSupportHeight = RideData5[RIDE_TYPE_MAZE].max_height; + uint8_t supportHeight = (supportZ - tileElement->base_height) / 2; + uint8_t maxSupportHeight = RideData5[RIDE_TYPE_MAZE].max_height; if (supportHeight > maxSupportHeight) { gGameCommandErrorText = STR_TOO_HIGH_FOR_SUPPORTS; @@ -2093,17 +2093,17 @@ static money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, // Clearance checks if (!gCheatsDisableClearanceChecks) { - sint32 fx = floor2(x, 32); - sint32 fy = floor2(y, 32); - sint32 fz0 = z >> 3; - sint32 fz1 = fz0 + 4; + int32_t fx = floor2(x, 32); + int32_t fy = floor2(y, 32); + int32_t fz0 = z >> 3; + int32_t fz1 = fz0 + 4; if (!map_can_construct_with_clear_at(fx, fy, fz0, fz1, &map_place_non_scenery_clear_func, 15, flags, &cost, CREATE_CROSSING_MODE_NONE)) { return MONEY32_UNDEFINED; } - uint8 elctgaw = gMapGroundFlags; + uint8_t elctgaw = gMapGroundFlags; if (elctgaw & ELEMENT_IS_UNDERWATER) { gGameCommandErrorText = STR_RIDE_CANT_BUILD_THIS_UNDERWATER; @@ -2140,9 +2140,9 @@ static money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, } // Place track element - sint32 fx = floor2(x, 32); - sint32 fy = floor2(y, 32); - sint32 fz = z >> 3; + int32_t fx = floor2(x, 32); + int32_t fy = floor2(y, 32); + int32_t fz = z >> 3; rct_tile_element * tileElement = tile_element_insert(fx >> 5, fy >> 5, fz, 15); tileElement->clearance_height = fz + 4; tileElement->type = TILE_ELEMENT_TYPE_TRACK; @@ -2174,19 +2174,19 @@ static money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, * rct2: 0x006D13FE */ void game_command_place_track_design( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - sint16 x = *eax & 0xFFFF; - sint16 y = *ecx & 0xFFFF; - sint16 z = *edi & 0xFFFF; - uint8 flags = *ebx; - uint8 rideIndex; + int16_t x = *eax & 0xFFFF; + int16_t y = *ecx & 0xFFFF; + int16_t z = *edi & 0xFFFF; + uint8_t flags = *ebx; + uint8_t rideIndex; *ebx = place_track_design(x, y, z, flags, &rideIndex); *edi = rideIndex; } @@ -2196,7 +2196,7 @@ void game_command_place_track_design( * rct2: 0x006CDEE4 */ void game_command_place_maze_design( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, [[maybe_unused]] sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, [[maybe_unused]] int32_t * ebp) { *ebx = place_maze_design( *ebx & 0xFF, @@ -2214,7 +2214,7 @@ void game_command_place_maze_design( * * rct2: 0x006D1EF0 */ -void track_design_draw_preview(rct_track_td6 * td6, uint8 * pixels) +void track_design_draw_preview(rct_track_td6 * td6, uint8_t * pixels) { // Make a copy of the map map_backup * mapBackup = track_design_preview_backup_map(); @@ -2230,8 +2230,8 @@ void track_design_draw_preview(rct_track_td6 * td6, uint8 * pixels) } money32 cost; - uint8 rideIndex; - uint8 flags; + uint8_t rideIndex; + uint8_t flags; if (!track_design_place_preview(td6, &cost, &rideIndex, &flags)) { memset(pixels, 0, TRACK_PREVIEW_IMAGE_SIZE * 4); @@ -2246,9 +2246,9 @@ void track_design_draw_preview(rct_track_td6 * td6, uint8 * pixels) centre.y = (gTrackPreviewMin.y + gTrackPreviewMax.y) / 2 + 16; centre.z = (gTrackPreviewMin.z + gTrackPreviewMax.z) / 2; - sint32 size_x = gTrackPreviewMax.x - gTrackPreviewMin.x; - sint32 size_y = gTrackPreviewMax.y - gTrackPreviewMin.y; - sint32 size_z = gTrackPreviewMax.z - gTrackPreviewMin.z; + int32_t size_x = gTrackPreviewMax.x - gTrackPreviewMin.x; + int32_t size_y = gTrackPreviewMax.y - gTrackPreviewMin.y; + int32_t size_z = gTrackPreviewMax.z - gTrackPreviewMin.z; // Special case for flat rides - Z-axis info is irrelevant // and must be zeroed out lest the preview be off-centre @@ -2258,7 +2258,7 @@ void track_design_draw_preview(rct_track_td6 * td6, uint8 * pixels) size_z = 0; } - sint32 zoom_level = 1; + int32_t zoom_level = 1; if (size_x < size_y) { @@ -2298,7 +2298,7 @@ void track_design_draw_preview(rct_track_td6 * td6, uint8 * pixels) dpi.bits = pixels; CoordsXY offset = {size_x / 2, size_y / 2}; - for (uint8 i = 0; i < 4; i++) + for (uint8_t i = 0; i < 4; i++) { gCurrentRotation = i; @@ -2306,10 +2306,10 @@ void track_design_draw_preview(rct_track_td6 * td6, uint8 * pixels) pos2d.x -= offset.x; pos2d.y -= offset.y; - sint32 left = pos2d.x; - sint32 top = pos2d.y; - sint32 right = left + size_x; - sint32 bottom = top + size_y; + int32_t left = pos2d.x; + int32_t top = pos2d.y; + int32_t right = left + size_x; + int32_t bottom = top + size_y; view.view_x = left; view.view_y = top; @@ -2388,7 +2388,7 @@ static void track_design_preview_clear_map() gMapSizeMinus2 = (264 * 32) - 2; gMapSize = 256; - for (sint32 i = 0; i < MAX_TILE_TILE_ELEMENT_POINTERS; i++) + for (int32_t i = 0; i < MAX_TILE_TILE_ELEMENT_POINTERS; i++) { rct_tile_element * tile_element = &gTileElements[i]; tile_element->type = TILE_ELEMENT_TYPE_SURFACE; diff --git a/src/openrct2/ride/TrackDesign.h b/src/openrct2/ride/TrackDesign.h index 9d8262d923..4d3740a408 100644 --- a/src/openrct2/ride/TrackDesign.h +++ b/src/openrct2/ride/TrackDesign.h @@ -23,15 +23,15 @@ /* Maze Element entry size: 0x04 */ struct rct_td6_maze_element { union { - uint32 all; + uint32_t all; struct { - sint8 x; - sint8 y; + int8_t x; + int8_t y; union { - uint16 maze_entry; + uint16_t maze_entry; struct{ - uint8 direction; - uint8 type; + uint8_t direction; + uint8_t type; }; }; }; @@ -41,29 +41,29 @@ assert_struct_size(rct_td6_maze_element, 0x04); /* Track Element entry size: 0x02 */ struct rct_td6_track_element { - uint8 type; // 0x00 - uint8 flags; // 0x01 + uint8_t type; // 0x00 + uint8_t flags; // 0x01 }; assert_struct_size(rct_td6_track_element, 0x02); /* Track Entrance entry size: 0x06 */ struct rct_td6_entrance_element { - sint8 z; // 0x00 - uint8 direction; // 0x01 - sint16 x; // 0x02 - sint16 y; // 0x04 + int8_t z; // 0x00 + uint8_t direction; // 0x01 + int16_t x; // 0x02 + int16_t y; // 0x04 }; assert_struct_size(rct_td6_entrance_element, 0x06); /* Track Scenery entry size: 0x16 */ struct rct_td6_scenery_element { rct_object_entry scenery_object; // 0x00 - sint8 x; // 0x10 - sint8 y; // 0x11 - sint8 z; // 0x12 - uint8 flags; // 0x13 direction quadrant tertiary colour - uint8 primary_colour; // 0x14 - uint8 secondary_colour; // 0x15 + int8_t x; // 0x10 + int8_t y; // 0x11 + int8_t z; // 0x12 + uint8_t flags; // 0x13 direction quadrant tertiary colour + uint8_t primary_colour; // 0x14 + uint8_t secondary_colour; // 0x15 }; assert_struct_size(rct_td6_scenery_element, 0x16); @@ -72,65 +72,65 @@ assert_struct_size(rct_td6_scenery_element, 0x16); * size: 0x4E72B */ struct rct_track_td6 { - uint8 type; // 0x00 - uint8 vehicle_type; + uint8_t type; // 0x00 + uint8_t vehicle_type; union{ // After loading the track this is converted to // a cost but before its a flags register money32 cost; // 0x02 - uint32 flags; // 0x02 + uint32_t flags; // 0x02 }; union{ // After loading the track this is converted to // a flags register - uint8 ride_mode; // 0x06 - uint8 track_flags; // 0x06 + uint8_t ride_mode; // 0x06 + uint8_t track_flags; // 0x06 }; - uint8 version_and_colour_scheme; // 0x07 0b0000_VVCC + uint8_t version_and_colour_scheme; // 0x07 0b0000_VVCC rct_vehicle_colour vehicle_colours[RCT2_MAX_CARS_PER_TRAIN]; // 0x08 union{ - uint8 pad_48; - uint8 track_spine_colour_rct1; // 0x48 + uint8_t pad_48; + uint8_t track_spine_colour_rct1; // 0x48 }; union{ - uint8 entrance_style; // 0x49 - uint8 track_rail_colour_rct1; // 0x49 + uint8_t entrance_style; // 0x49 + uint8_t track_rail_colour_rct1; // 0x49 }; union{ - uint8 total_air_time; // 0x4A - uint8 track_support_colour_rct1; // 0x4A + uint8_t total_air_time; // 0x4A + uint8_t track_support_colour_rct1; // 0x4A }; - uint8 depart_flags; // 0x4B - uint8 number_of_trains; // 0x4C - uint8 number_of_cars_per_train; // 0x4D - uint8 min_waiting_time; // 0x4E - uint8 max_waiting_time; // 0x4F - uint8 operation_setting; - sint8 max_speed; // 0x51 - sint8 average_speed; // 0x52 - uint16 ride_length; // 0x53 - uint8 max_positive_vertical_g; // 0x55 - sint8 max_negative_vertical_g; // 0x56 - uint8 max_lateral_g; // 0x57 + uint8_t depart_flags; // 0x4B + uint8_t number_of_trains; // 0x4C + uint8_t number_of_cars_per_train; // 0x4D + uint8_t min_waiting_time; // 0x4E + uint8_t max_waiting_time; // 0x4F + uint8_t operation_setting; + int8_t max_speed; // 0x51 + int8_t average_speed; // 0x52 + uint16_t ride_length; // 0x53 + uint8_t max_positive_vertical_g; // 0x55 + int8_t max_negative_vertical_g; // 0x56 + uint8_t max_lateral_g; // 0x57 union { - uint8 inversions; // 0x58 - uint8 holes; // 0x58 + uint8_t inversions; // 0x58 + uint8_t holes; // 0x58 }; - uint8 drops; // 0x59 - uint8 highest_drop_height; // 0x5A - uint8 excitement; // 0x5B - uint8 intensity; // 0x5C - uint8 nausea; // 0x5D + uint8_t drops; // 0x59 + uint8_t highest_drop_height; // 0x5A + uint8_t excitement; // 0x5B + uint8_t intensity; // 0x5C + uint8_t nausea; // 0x5D money16 upkeep_cost; // 0x5E - uint8 track_spine_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x60 - uint8 track_rail_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x64 - uint8 track_support_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x68 - uint32 flags2; // 0x6C + uint8_t track_spine_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x60 + uint8_t track_rail_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x64 + uint8_t track_support_colour[RCT12_NUM_COLOUR_SCHEMES]; // 0x68 + uint32_t flags2; // 0x6C rct_object_entry vehicle_object; // 0x70 - uint8 space_required_x; // 0x80 - uint8 space_required_y; // 0x81 - uint8 vehicle_additional_colour[RCT2_MAX_CARS_PER_TRAIN]; // 0x82 - uint8 lift_hill_speed_num_circuits; // 0xA2 0bCCCL_LLLL + uint8_t space_required_x; // 0x80 + uint8_t space_required_y; // 0x81 + uint8_t vehicle_additional_colour[RCT2_MAX_CARS_PER_TRAIN]; // 0x82 + uint8_t lift_hill_speed_num_circuits; // 0xA2 0bCCCL_LLLL void *elements; // 0xA3 (data starts here in file) size_t elementsSize; @@ -148,7 +148,7 @@ assert_struct_size(rct_track_td6, 0xbf); #pragma pack(pop) // Only written to in RCT2, not used in OpenRCT2. All of these are elements that had to be invented in RCT1. -enum : uint32 +enum : uint32_t { TRACK_FLAGS_CONTAINS_VERTICAL_LOOP = (1 << 7), TRACK_FLAGS_CONTAINS_INLINE_TWIST = (1 << 17), @@ -160,7 +160,7 @@ enum : uint32 TRACK_FLAGS_CONTAINS_LARGE_HALF_LOOP = (1u << 31), }; -enum : uint32 +enum : uint32_t { TRACK_FLAGS2_CONTAINS_LOG_FLUME_REVERSER = (1 << 1), TRACK_FLAGS2_SIX_FLAGS_RIDE_DEPRECATED = (1u << 31) // Not used anymore. @@ -203,22 +203,22 @@ extern LocationXYZ16 gTrackPreviewOrigin; extern bool byte_9D8150; extern bool gTrackDesignSaveMode; -extern uint8 gTrackDesignSaveRideIndex; +extern uint8_t gTrackDesignSaveRideIndex; rct_track_td6 *track_design_open(const utf8 *path); void track_design_dispose(rct_track_td6 *td6); void track_design_mirror(rct_track_td6 *td6); -sint32 place_virtual_track(rct_track_td6 *td6, uint8 ptdOperation, bool placeScenery, uint8 rideIndex, sint16 x, sint16 y, sint16 z); +int32_t place_virtual_track(rct_track_td6 *td6, uint8_t ptdOperation, bool placeScenery, uint8_t rideIndex, int16_t x, int16_t y, int16_t z); -void game_command_place_track_design(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_place_maze_design(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); +void game_command_place_track_design(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_place_maze_design(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); /////////////////////////////////////////////////////////////////////////////// // Track design preview /////////////////////////////////////////////////////////////////////////////// -void track_design_draw_preview(rct_track_td6 *td6, uint8 *pixels); +void track_design_draw_preview(rct_track_td6 *td6, uint8_t *pixels); /////////////////////////////////////////////////////////////////////////////// // Track design saving @@ -226,9 +226,9 @@ void track_design_draw_preview(rct_track_td6 *td6, uint8 *pixels); void track_design_save_init(); void track_design_save_reset_scenery(); bool track_design_save_contains_tile_element(const rct_tile_element * tileElement); -void track_design_save_select_nearby_scenery(sint32 rideIndex); -void track_design_save_select_tile_element(sint32 interactionType, sint32 x, sint32 y, rct_tile_element *tileElement, bool collect); -bool track_design_save(uint8 rideIndex); +void track_design_save_select_nearby_scenery(int32_t rideIndex); +void track_design_save_select_tile_element(int32_t interactionType, int32_t x, int32_t y, rct_tile_element *tileElement, bool collect); +bool track_design_save(uint8_t rideIndex); bool track_design_save_to_file(const utf8 *path); bool track_design_are_entrance_and_exit_placed(); diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index a84ead4962..a7c6ccc00f 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -34,9 +34,9 @@ struct TrackRepositoryItem { std::string Name; std::string Path; - uint8 RideType = 0; + uint8_t RideType = 0; std::string ObjectEntry; - uint32 Flags = 0; + uint32_t Flags = 0; }; enum TRACK_REPO_ITEM_FLAGS @@ -55,8 +55,8 @@ std::string GetNameFromTrackPath(const std::string &path) class TrackDesignFileIndex final : public FileIndex { private: - static constexpr uint32 MAGIC_NUMBER = 0x58444954; // TIDX - static constexpr uint16 VERSION = 2; + static constexpr uint32_t MAGIC_NUMBER = 0x58444954; // TIDX + static constexpr uint16_t VERSION = 2; static constexpr auto PATTERN = "*.td4;*.td6"; public: @@ -74,7 +74,7 @@ public: } public: - std::tuple Create(sint32, const std::string &path) const override + std::tuple Create(int32_t, const std::string &path) const override { auto td6 = track_design_open(path.c_str()); if (td6 != nullptr) @@ -113,9 +113,9 @@ protected: TrackRepositoryItem item; item.Name = stream->ReadStdString(); item.Path = stream->ReadStdString(); - item.RideType = stream->ReadValue(); + item.RideType = stream->ReadValue(); item.ObjectEntry = stream->ReadStdString(); - item.Flags = stream->ReadValue(); + item.Flags = stream->ReadValue(); return item; } @@ -152,7 +152,7 @@ public: * * @param entry The entry name to count the track list of. Leave empty to count track list for the non-separated types (e.g. Hyper-Twister, Car Ride) */ - size_t GetCountForObjectEntry(uint8 rideType, const std::string &entry) const override + size_t GetCountForObjectEntry(uint8_t rideType, const std::string &entry) const override { size_t count = 0; const auto repo = GetContext()->GetObjectRepository(); @@ -181,7 +181,7 @@ public: return count; } - size_t GetCountForRideGroup(uint8 rideType, const RideGroup * rideGroup) const override + size_t GetCountForRideGroup(uint8_t rideType, const RideGroup * rideGroup) const override { size_t count = 0; const auto repo = GetContext()->GetObjectRepository(); @@ -194,7 +194,7 @@ public: } const ObjectRepositoryItem * ori = repo->FindObject(item.ObjectEntry.c_str()); - uint8 rideGroupIndex = (ori != nullptr) ? ori->RideInfo.RideGroupIndex : 0; + uint8_t rideGroupIndex = (ori != nullptr) ? ori->RideInfo.RideGroupIndex : 0; const RideGroup * itemRideGroup = RideGroupManager::RideGroupFind(rideType, rideGroupIndex); if (itemRideGroup != nullptr && itemRideGroup->Equals(rideGroup)) @@ -210,7 +210,7 @@ public: * * @param entry The entry name to build a track list for. Leave empty to build track list for the non-separated types (e.g. Hyper-Twister, Car Ride) */ - std::vector GetItemsForObjectEntry(uint8 rideType, const std::string &entry) const override + std::vector GetItemsForObjectEntry(uint8_t rideType, const std::string &entry) const override { std::vector refs; const auto repo = GetContext()->GetObjectRepository(); @@ -243,7 +243,7 @@ public: return refs; } - std::vector GetItemsForRideGroup(uint8 rideType, const RideGroup * rideGroup) const override + std::vector GetItemsForRideGroup(uint8_t rideType, const RideGroup * rideGroup) const override { std::vector refs; const auto repo = GetContext()->GetObjectRepository(); @@ -256,7 +256,7 @@ public: } const ObjectRepositoryItem * ori = repo->FindObject(item.ObjectEntry.c_str()); - uint8 rideGroupIndex = (ori != nullptr) ? ori->RideInfo.RideGroupIndex : 0; + uint8_t rideGroupIndex = (ori != nullptr) ? ori->RideInfo.RideGroupIndex : 0; const RideGroup * itemRideGroup = RideGroupManager::RideGroupFind(rideType, rideGroupIndex); if (itemRideGroup != nullptr && itemRideGroup->Equals(rideGroup)) @@ -271,7 +271,7 @@ public: return refs; } - void Scan(sint32 language) override + void Scan(int32_t language) override { _items.clear(); auto trackDesigns = _fileIndex.LoadOrBuild(language); diff --git a/src/openrct2/ride/TrackDesignRepository.h b/src/openrct2/ride/TrackDesignRepository.h index b3b565e732..d9f651c1c4 100644 --- a/src/openrct2/ride/TrackDesignRepository.h +++ b/src/openrct2/ride/TrackDesignRepository.h @@ -32,14 +32,14 @@ interface ITrackDesignRepository virtual ~ITrackDesignRepository() = default; virtual size_t GetCount() const abstract; - virtual size_t GetCountForObjectEntry(uint8 rideType, const std::string &entry) const abstract; - virtual size_t GetCountForRideGroup(uint8 rideType, const RideGroup * rideGroup) const abstract; - virtual std::vector GetItemsForObjectEntry(uint8 rideType, + virtual size_t GetCountForObjectEntry(uint8_t rideType, const std::string &entry) const abstract; + virtual size_t GetCountForRideGroup(uint8_t rideType, const RideGroup * rideGroup) const abstract; + virtual std::vector GetItemsForObjectEntry(uint8_t rideType, const std::string &entry) const abstract; - virtual std::vector GetItemsForRideGroup(uint8 rideType, + virtual std::vector GetItemsForRideGroup(uint8_t rideType, const RideGroup * rideGroup) const abstract; - virtual void Scan(sint32 language) abstract; + virtual void Scan(int32_t language) abstract; virtual bool Delete(const std::string &path) abstract; virtual std::string Rename(const std::string &path, const std::string &newName) abstract; virtual std::string Install(const std::string &path) abstract; diff --git a/src/openrct2/ride/TrackDesignSave.cpp b/src/openrct2/ride/TrackDesignSave.cpp index 30dc31af3a..532604192f 100644 --- a/src/openrct2/ride/TrackDesignSave.cpp +++ b/src/openrct2/ride/TrackDesignSave.cpp @@ -37,7 +37,7 @@ #define TRACK_TD6_MAX_ELEMENTS 8192 bool gTrackDesignSaveMode = false; -uint8 gTrackDesignSaveRideIndex = 255; +uint8_t gTrackDesignSaveRideIndex = 255; static size_t _trackSavedTileElementsCount; static rct_tile_element *_trackSavedTileElements[TRACK_MAX_SAVED_TILE_ELEMENTS]; @@ -46,16 +46,16 @@ static size_t _trackSavedTileElementsDescCount; static rct_td6_scenery_element _trackSavedTileElementsDesc[TRACK_MAX_SAVED_TILE_ELEMENTS]; static rct_track_td6 *_trackDesign; -static uint8 _trackSaveDirection; +static uint8_t _trackSaveDirection; -static bool track_design_save_should_select_scenery_around(sint32 rideIndex, rct_tile_element *tileElement); -static void track_design_save_select_nearby_scenery_for_tile(sint32 rideIndex, sint32 cx, sint32 cy); -static bool track_design_save_add_tile_element(sint32 interactionType, sint32 x, sint32 y, rct_tile_element *tileElement); -static void track_design_save_remove_tile_element(sint32 interactionType, sint32 x, sint32 y, rct_tile_element *tileElement); +static bool track_design_save_should_select_scenery_around(int32_t rideIndex, rct_tile_element *tileElement); +static void track_design_save_select_nearby_scenery_for_tile(int32_t rideIndex, int32_t cx, int32_t cy); +static bool track_design_save_add_tile_element(int32_t interactionType, int32_t x, int32_t y, rct_tile_element *tileElement); +static void track_design_save_remove_tile_element(int32_t interactionType, int32_t x, int32_t y, rct_tile_element *tileElement); static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6); -static rct_track_td6 *track_design_save_to_td6(uint8 rideIndex); -static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td6); -static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track_td6 *td6); +static rct_track_td6 *track_design_save_to_td6(uint8_t rideIndex); +static bool track_design_save_to_td6_for_maze(uint8_t rideIndex, rct_track_td6 *td6); +static bool track_design_save_to_td6_for_tracked_ride(uint8_t rideIndex, rct_track_td6 *td6); void track_design_save_init() { @@ -70,7 +70,7 @@ void track_design_save_init() * * rct2: 0x006D2B07 */ -void track_design_save_select_tile_element(sint32 interactionType, sint32 x, sint32 y, rct_tile_element *tileElement, bool collect) +void track_design_save_select_tile_element(int32_t interactionType, int32_t x, int32_t y, rct_tile_element *tileElement, bool collect) { if (track_design_save_contains_tile_element(tileElement)) { if (!collect) { @@ -92,12 +92,12 @@ void track_design_save_select_tile_element(sint32 interactionType, sint32 x, sin * * rct2: 0x006D303D */ -void track_design_save_select_nearby_scenery(sint32 rideIndex) +void track_design_save_select_nearby_scenery(int32_t rideIndex) { rct_tile_element *tileElement; - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { tileElement = map_get_first_element_at(x, y); do { if (track_design_save_should_select_scenery_around(rideIndex, tileElement)) { @@ -120,7 +120,7 @@ void track_design_save_reset_scenery() gfx_invalidate_screen(); } -static void track_design_save_callback(sint32 result, [[maybe_unused]] const utf8 * path) +static void track_design_save_callback(int32_t result, [[maybe_unused]] const utf8 * path) { free(_trackDesign->track_elements); free(_trackDesign->entrance_elements); @@ -137,7 +137,7 @@ static void track_design_save_callback(sint32 result, [[maybe_unused]] const utf * * rct2: 0x006D2804, 0x006D264D */ -bool track_design_save(uint8 rideIndex) +bool track_design_save(uint8_t rideIndex) { Ride* ride = get_ride(rideIndex); @@ -188,9 +188,9 @@ bool track_design_save_contains_tile_element(const rct_tile_element * tileElemen return false; } -static sint32 tile_element_get_total_element_count(rct_tile_element *tileElement) +static int32_t tile_element_get_total_element_count(rct_tile_element *tileElement) { - sint32 elementCount; + int32_t elementCount; rct_scenery_entry *sceneryEntry; rct_large_scenery_tile *tile; @@ -207,7 +207,7 @@ static sint32 tile_element_get_total_element_count(rct_tile_element *tileElement do { tile++; elementCount++; - } while (tile->x_offset != (sint16)(uint16)0xFFFF); + } while (tile->x_offset != (int16_t)(uint16_t)0xFFFF); return elementCount; default: @@ -240,7 +240,7 @@ static bool track_design_save_can_add_tile_element(rct_tile_element *tileElement * * rct2: 0x006D2F4C */ -static void track_design_save_push_tile_element(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_push_tile_element(int32_t x, int32_t y, rct_tile_element *tileElement) { if (_trackSavedTileElementsCount < TRACK_MAX_SAVED_TILE_ELEMENTS) { _trackSavedTileElements[_trackSavedTileElementsCount++] = tileElement; @@ -252,7 +252,7 @@ static void track_design_save_push_tile_element(sint32 x, sint32 y, rct_tile_ele * * rct2: 0x006D2FA7 */ -static void track_design_save_push_tile_element_desc(const rct_object_entry * entry, sint32 x, sint32 y, sint32 z, uint8 flags, uint8 primaryColour, uint8 secondaryColour) +static void track_design_save_push_tile_element_desc(const rct_object_entry * entry, int32_t x, int32_t y, int32_t z, uint8_t flags, uint8_t primaryColour, uint8_t secondaryColour) { rct_td6_scenery_element *item = &_trackSavedTileElementsDesc[_trackSavedTileElementsDescCount++]; item->scenery_object = *entry; @@ -264,29 +264,29 @@ static void track_design_save_push_tile_element_desc(const rct_object_entry * en item->secondary_colour = secondaryColour; } -static void track_design_save_add_scenery(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_add_scenery(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 entryType = tileElement->properties.scenery.type; + int32_t entryType = tileElement->properties.scenery.type; auto entry = object_entry_get_entry(OBJECT_TYPE_SMALL_SCENERY, entryType); - uint8 flags = 0; + uint8_t flags = 0; flags |= tileElement->type & 3; flags |= (tileElement->type & 0xC0) >> 4; - uint8 primaryColour = scenery_small_get_primary_colour(tileElement); - uint8 secondaryColour = scenery_small_get_secondary_colour(tileElement); + uint8_t primaryColour = scenery_small_get_primary_colour(tileElement); + uint8_t secondaryColour = scenery_small_get_secondary_colour(tileElement); track_design_save_push_tile_element(x, y, tileElement); track_design_save_push_tile_element_desc(entry, x, y, tileElement->base_height, flags, primaryColour, secondaryColour); } -static void track_design_save_add_large_scenery(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_add_large_scenery(int32_t x, int32_t y, rct_tile_element *tileElement) { rct_large_scenery_tile *sceneryTiles, *tile; - sint32 x0, y0, z0, z; - sint32 direction, sequence; + int32_t x0, y0, z0, z; + int32_t direction, sequence; - sint32 entryType = scenery_large_get_type(tileElement); + int32_t entryType = scenery_large_get_type(tileElement); auto entry = object_entry_get_entry(OBJECT_TYPE_LARGE_SCENERY, entryType); sceneryTiles = get_large_scenery_entry(entryType)->large_scenery.tiles; @@ -301,8 +301,8 @@ static void track_design_save_add_large_scenery(sint32 x, sint32 y, rct_tile_ele // Iterate through each tile of the large scenery element sequence = 0; for (tile = sceneryTiles; tile->x_offset != -1; tile++, sequence++) { - sint16 offsetX = tile->x_offset; - sint16 offsetY = tile->y_offset; + int16_t offsetX = tile->x_offset; + int16_t offsetY = tile->y_offset; rotate_map_coordinates(&offsetX, &offsetY, direction); x = x0 + offsetX; @@ -313,9 +313,9 @@ static void track_design_save_add_large_scenery(sint32 x, sint32 y, rct_tile_ele { if (sequence == 0) { - uint8 flags = tileElement->type & 3; - uint8 primaryColour = scenery_large_get_primary_colour(tileElement); - uint8 secondaryColour = scenery_large_get_secondary_colour(tileElement); + uint8_t flags = tileElement->type & 3; + uint8_t primaryColour = scenery_large_get_primary_colour(tileElement); + uint8_t secondaryColour = scenery_large_get_secondary_colour(tileElement); track_design_save_push_tile_element_desc(entry, x, y, z, flags, primaryColour, secondaryColour); } @@ -324,28 +324,28 @@ static void track_design_save_add_large_scenery(sint32 x, sint32 y, rct_tile_ele } } -static void track_design_save_add_wall(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_add_wall(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 entryType = tileElement->properties.wall.type; + int32_t entryType = tileElement->properties.wall.type; auto entry = object_entry_get_entry(OBJECT_TYPE_WALLS, entryType); - uint8 flags = 0; + uint8_t flags = 0; flags |= tileElement->type & 3; flags |= wall_get_tertiary_colour(tileElement) << 2; - uint8 secondaryColour = wall_get_secondary_colour(tileElement); - uint8 primaryColour = wall_get_primary_colour(tileElement); + uint8_t secondaryColour = wall_get_secondary_colour(tileElement); + uint8_t primaryColour = wall_get_primary_colour(tileElement); track_design_save_push_tile_element(x, y, tileElement); track_design_save_push_tile_element_desc(entry, x, y, tileElement->base_height, flags, primaryColour, secondaryColour); } -static void track_design_save_add_footpath(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_add_footpath(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 entryType = tileElement->properties.path.type >> 4; + int32_t entryType = tileElement->properties.path.type >> 4; auto entry = object_entry_get_entry(OBJECT_TYPE_PATHS, entryType); - uint8 flags = 0; + uint8_t flags = 0; flags |= tileElement->properties.path.edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK; flags |= (tileElement->properties.path.type & FOOTPATH_PROPERTIES_FLAG_IS_SLOPED) << 2; flags |= (tileElement->properties.path.type & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) << 5; @@ -359,7 +359,7 @@ static void track_design_save_add_footpath(sint32 x, sint32 y, rct_tile_element * * rct2: 0x006D2B3C */ -static bool track_design_save_add_tile_element(sint32 interactionType, sint32 x, sint32 y, rct_tile_element *tileElement) +static bool track_design_save_add_tile_element(int32_t interactionType, int32_t x, int32_t y, rct_tile_element *tileElement) { if (!track_design_save_can_add_tile_element(tileElement)) { return false; @@ -387,7 +387,7 @@ static bool track_design_save_add_tile_element(sint32 interactionType, sint32 x, * * rct2: 0x006D2F78 */ -static void track_design_save_pop_tile_element(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_pop_tile_element(int32_t x, int32_t y, rct_tile_element *tileElement) { map_invalidate_tile_full(x, y); @@ -418,7 +418,7 @@ static void track_design_save_pop_tile_element(sint32 x, sint32 y, rct_tile_elem * * rct2: 0x006D2FDD */ -static void track_design_save_pop_tile_element_desc(const rct_object_entry *entry, sint32 x, sint32 y, sint32 z, uint8 flags) +static void track_design_save_pop_tile_element_desc(const rct_object_entry *entry, int32_t x, int32_t y, int32_t z, uint8_t flags) { size_t removeIndex = SIZE_MAX; for (size_t i = 0; i < _trackSavedTileElementsDescCount; i++) { @@ -445,12 +445,12 @@ static void track_design_save_pop_tile_element_desc(const rct_object_entry *entr } } -static void track_design_save_remove_scenery(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_remove_scenery(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 entryType = tileElement->properties.scenery.type; + int32_t entryType = tileElement->properties.scenery.type; auto entry = object_entry_get_entry(OBJECT_TYPE_SMALL_SCENERY, entryType); - uint8 flags = 0; + uint8_t flags = 0; flags |= tileElement->type & 3; flags |= (tileElement->type & 0xC0) >> 4; @@ -458,13 +458,13 @@ static void track_design_save_remove_scenery(sint32 x, sint32 y, rct_tile_elemen track_design_save_pop_tile_element_desc(entry, x, y, tileElement->base_height, flags); } -static void track_design_save_remove_large_scenery(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_remove_large_scenery(int32_t x, int32_t y, rct_tile_element *tileElement) { rct_large_scenery_tile *sceneryTiles, *tile; - sint32 x0, y0, z0, z; - sint32 direction, sequence; + int32_t x0, y0, z0, z; + int32_t direction, sequence; - sint32 entryType = scenery_large_get_type(tileElement); + int32_t entryType = scenery_large_get_type(tileElement); auto entry = object_entry_get_entry(OBJECT_TYPE_LARGE_SCENERY, entryType); sceneryTiles = get_large_scenery_entry(entryType)->large_scenery.tiles; @@ -479,8 +479,8 @@ static void track_design_save_remove_large_scenery(sint32 x, sint32 y, rct_tile_ // Iterate through each tile of the large scenery element sequence = 0; for (tile = sceneryTiles; tile->x_offset != -1; tile++, sequence++) { - sint16 offsetX = tile->x_offset; - sint16 offsetY = tile->y_offset; + int16_t offsetX = tile->x_offset; + int16_t offsetY = tile->y_offset; rotate_map_coordinates(&offsetX, &offsetY, direction); x = x0 + offsetX; @@ -491,7 +491,7 @@ static void track_design_save_remove_large_scenery(sint32 x, sint32 y, rct_tile_ { if (sequence == 0) { - uint8 flags = tileElement->type & 3; + uint8_t flags = tileElement->type & 3; track_design_save_pop_tile_element_desc(entry, x, y, z, flags); } track_design_save_pop_tile_element(x, y, tileElement); @@ -499,12 +499,12 @@ static void track_design_save_remove_large_scenery(sint32 x, sint32 y, rct_tile_ } } -static void track_design_save_remove_wall(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_remove_wall(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 entryType = tileElement->properties.wall.type; + int32_t entryType = tileElement->properties.wall.type; auto entry = object_entry_get_entry(OBJECT_TYPE_WALLS, entryType); - uint8 flags = 0; + uint8_t flags = 0; flags |= tileElement->type & 3; flags |= wall_get_tertiary_colour(tileElement) << 2; @@ -512,12 +512,12 @@ static void track_design_save_remove_wall(sint32 x, sint32 y, rct_tile_element * track_design_save_pop_tile_element_desc(entry, x, y, tileElement->base_height, flags); } -static void track_design_save_remove_footpath(sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_remove_footpath(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 entryType = tileElement->properties.path.type >> 4; + int32_t entryType = tileElement->properties.path.type >> 4; auto entry = object_entry_get_entry(OBJECT_TYPE_PATHS, entryType); - uint8 flags = 0; + uint8_t flags = 0; flags |= tileElement->properties.path.edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK; flags |= (tileElement->properties.path.type & FOOTPATH_PROPERTIES_FLAG_IS_SLOPED) << 2; flags |= (tileElement->properties.path.type & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) << 5; @@ -531,7 +531,7 @@ static void track_design_save_remove_footpath(sint32 x, sint32 y, rct_tile_eleme * * rct2: 0x006D2B3C */ -static void track_design_save_remove_tile_element(sint32 interactionType, sint32 x, sint32 y, rct_tile_element *tileElement) +static void track_design_save_remove_tile_element(int32_t interactionType, int32_t x, int32_t y, rct_tile_element *tileElement) { switch (interactionType) { case VIEWPORT_INTERACTION_ITEM_SCENERY: @@ -549,7 +549,7 @@ static void track_design_save_remove_tile_element(sint32 interactionType, sint32 } } -static bool track_design_save_should_select_scenery_around(sint32 rideIndex, rct_tile_element *tileElement) +static bool track_design_save_should_select_scenery_around(int32_t rideIndex, rct_tile_element *tileElement) { switch (tileElement->GetType()) { case TILE_ELEMENT_TYPE_PATH: @@ -572,15 +572,15 @@ static bool track_design_save_should_select_scenery_around(sint32 rideIndex, rct return false; } -static void track_design_save_select_nearby_scenery_for_tile(sint32 rideIndex, sint32 cx, sint32 cy) +static void track_design_save_select_nearby_scenery_for_tile(int32_t rideIndex, int32_t cx, int32_t cy) { rct_tile_element *tileElement; - for (sint32 y = cy - TRACK_NEARBY_SCENERY_DISTANCE; y <= cy + TRACK_NEARBY_SCENERY_DISTANCE; y++) { - for (sint32 x = cx - TRACK_NEARBY_SCENERY_DISTANCE; x <= cx + TRACK_NEARBY_SCENERY_DISTANCE; x++) { + for (int32_t y = cy - TRACK_NEARBY_SCENERY_DISTANCE; y <= cy + TRACK_NEARBY_SCENERY_DISTANCE; y++) { + for (int32_t x = cx - TRACK_NEARBY_SCENERY_DISTANCE; x <= cx + TRACK_NEARBY_SCENERY_DISTANCE; x++) { tileElement = map_get_first_element_at(x, y); do { - sint32 interactionType = VIEWPORT_INTERACTION_ITEM_NONE; + int32_t interactionType = VIEWPORT_INTERACTION_ITEM_NONE; switch (tileElement->GetType()) { case TILE_ELEMENT_TYPE_PATH: if (!(tileElement->type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE)) @@ -616,7 +616,7 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) size_t totalSceneryElementsSize = _trackSavedTileElementsDescCount * sizeof(rct_td6_scenery_element); td6->scenery_elements = (rct_td6_scenery_element *)malloc(totalSceneryElementsSize + 1); memcpy(td6->scenery_elements, _trackSavedTileElementsDesc, totalSceneryElementsSize); - *((uint8*)&td6->scenery_elements[_trackSavedTileElementsDescCount]) = 0xFF; + *((uint8_t*)&td6->scenery_elements[_trackSavedTileElementsDescCount]) = 0xFF; // Run an element loop for (size_t i = 0; i < _trackSavedTileElementsDescCount; i++) { @@ -625,14 +625,14 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) switch (object_entry_get_type(&scenery->scenery_object)) { case OBJECT_TYPE_PATHS: { - uint8 slope = (scenery->flags & 0x60) >> 5; + uint8_t slope = (scenery->flags & 0x60) >> 5; slope -= _trackSaveDirection; scenery->flags &= 0x9F; scenery->flags |= ((slope & 3) << 5); // Direction of connection on path - uint8 direction = scenery->flags & 0xF; + uint8_t direction = scenery->flags & 0xF; // Rotate the direction by the track direction direction = ((direction << 4) >> _trackSaveDirection); @@ -642,7 +642,7 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) } case OBJECT_TYPE_WALLS: { - uint8 direction = scenery->flags & 3; + uint8_t direction = scenery->flags & 3; direction -= _trackSaveDirection; scenery->flags &= 0xFC; @@ -651,8 +651,8 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) } default: { - uint8 direction = scenery->flags & 3; - uint8 quadrant = (scenery->flags & 0x0C) >> 2; + uint8_t direction = scenery->flags & 3; + uint8_t quadrant = (scenery->flags & 0x0C) >> 2; direction -= _trackSaveDirection; quadrant -= _trackSaveDirection; @@ -663,8 +663,8 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) } } - sint16 x = ((uint8)scenery->x) * 32 - gTrackPreviewOrigin.x; - sint16 y = ((uint8)scenery->y) * 32 - gTrackPreviewOrigin.y; + int16_t x = ((uint8_t)scenery->x) * 32 - gTrackPreviewOrigin.x; + int16_t y = ((uint8_t)scenery->y) * 32 - gTrackPreviewOrigin.y; rotate_map_coordinates(&x, &y, (0 - _trackSaveDirection) & 3); x /= 32; y /= 32; @@ -675,10 +675,10 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) return false; } - scenery->x = (sint8)x; - scenery->y = (sint8)y; + scenery->x = (int8_t)x; + scenery->y = (int8_t)y; - sint32 z = scenery->z * 8 - gTrackPreviewOrigin.z; + int32_t z = scenery->z * 8 - gTrackPreviewOrigin.z; z /= 8; if (z > 127 || z < -126) { context_show_error(STR_CANT_SAVE_TRACK_DESIGN, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY); @@ -695,7 +695,7 @@ static bool track_design_save_copy_scenery_to_td6(rct_track_td6 *td6) * * rct2: 0x006CE44F */ -static rct_track_td6 *track_design_save_to_td6(uint8 rideIndex) +static rct_track_td6 *track_design_save_to_td6(uint8_t rideIndex) { rct_track_td6 *td6 = (rct_track_td6 *)calloc(1, sizeof(rct_track_td6)); Ride *ride = get_ride(rideIndex); @@ -712,13 +712,13 @@ static rct_track_td6 *track_design_save_to_td6(uint8 rideIndex) (ride->colour_scheme_type & 3) | (1 << 3); // Version .TD6 - for (sint32 i = 0; i < RCT12_MAX_VEHICLES_PER_RIDE; i++) + for (int32_t i = 0; i < RCT12_MAX_VEHICLES_PER_RIDE; i++) { td6->vehicle_colours[i] = ride->vehicle_colours[i]; td6->vehicle_additional_colour[i] = ride->vehicle_colours_extended[i]; } - for (sint32 i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) + for (int32_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++) { td6->track_spine_colour[i] = ride->track_colour_main[i]; td6->track_rail_colour[i] = ride->track_colour_additional[i]; @@ -736,8 +736,8 @@ static rct_track_td6 *track_design_save_to_td6(uint8 rideIndex) (ride->num_circuits << 5); td6->entrance_style = ride->entrance_style; - td6->max_speed = (sint8)(ride->max_speed / 65536); - td6->average_speed = (sint8)(ride->average_speed / 65536); + td6->max_speed = (int8_t)(ride->max_speed / 65536); + td6->average_speed = (int8_t)(ride->average_speed / 65536); td6->ride_length = ride_get_total_length(ride) / 65536; td6->max_positive_vertical_g = ride->max_positive_vertical_g / 32; td6->max_negative_vertical_g = ride->max_negative_vertical_g / 32; @@ -746,11 +746,11 @@ static rct_track_td6 *track_design_save_to_td6(uint8 rideIndex) td6->drops = ride->drops; td6->highest_drop_height = ride->highest_drop_height; - uint16 total_air_time = (ride->total_air_time * 123) / 1024; + uint16_t total_air_time = (ride->total_air_time * 123) / 1024; if (total_air_time > 255) { total_air_time = 0; } - td6->total_air_time = (uint8)total_air_time; + td6->total_air_time = (uint8_t)total_air_time; td6->excitement = ride->ratings.excitement / 10; td6->intensity = ride->ratings.intensity / 10; @@ -778,12 +778,12 @@ static rct_track_td6 *track_design_save_to_td6(uint8 rideIndex) * * rct2: 0x006CEAAE */ -static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td6) +static bool track_design_save_to_td6_for_maze(uint8_t rideIndex, rct_track_td6 *td6) { rct_tile_element *tileElement = nullptr; bool mapFound = false; - sint16 startX = 0; - sint16 startY = 0; + int16_t startX = 0; + int16_t startY = 0; for (startY = 0; startY < 8192; startY += 32) { for (startX = 0; startX < 8192; startX += 32) { tileElement = map_get_first_element_at(startX >> 5, startY >> 5); @@ -809,7 +809,7 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td return false; } - gTrackPreviewOrigin = { startX, startY, (sint16)(tileElement->base_height * 8) }; + gTrackPreviewOrigin = { startX, startY, (int16_t)(tileElement->base_height * 8) }; size_t numMazeElements = 0; td6->maze_elements = (rct_td6_maze_element *)calloc(8192, sizeof(rct_td6_maze_element)); @@ -818,7 +818,7 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td // x is defined here as we can start the search // on tile start_x, start_y but then the next row // must restart on 0 - for (sint16 y = startY, x = startX; y < 8192; y += 32) { + for (int16_t y = startY, x = startX; y < 8192; y += 32) { for (; x < 8192; x += 32) { tileElement = map_get_first_element_at(x / 32, y / 32); do { @@ -851,8 +851,8 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td return false; } - sint16 x = location.x * 32; - sint16 y = location.y * 32; + int16_t x = location.x * 32; + int16_t y = location.y * 32; tileElement = map_get_first_element_at(location.x, location.y); do { @@ -862,11 +862,11 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td } while (!(tileElement++)->IsLastForTile()); // Add something that stops this from walking off the end - uint8 entrance_direction = tile_element_get_direction(tileElement); + uint8_t entrance_direction = tile_element_get_direction(tileElement); maze->direction = entrance_direction; maze->type = 8; - maze->x = (sint8)((x - startX) / 32); - maze->y = (sint8)((y - startY) / 32); + maze->x = (int8_t)((x - startX) / 32); + maze->y = (int8_t)((y - startY) / 32); maze++; numMazeElements++; @@ -888,11 +888,11 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td } while (!(tileElement++)->IsLastForTile()); // Add something that stops this from walking off the end - uint8 exit_direction = tile_element_get_direction(tileElement); + uint8_t exit_direction = tile_element_get_direction(tileElement); maze->direction = exit_direction; maze->type = 0x80; - maze->x = (sint8)((x - startX) / 32); - maze->y = (sint8)((y - startY) / 32); + maze->x = (int8_t)((x - startX) / 32); + maze->y = (int8_t)((y - startY) / 32); maze++; maze->all = 0; maze++; @@ -907,7 +907,7 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td td6->maze_elements = (rct_td6_maze_element *)realloc(td6->maze_elements, numMazeElements * sizeof(rct_td6_maze_element)); // Save global vars as they are still used by scenery - sint16 startZ = gTrackPreviewOrigin.z; + int16_t startZ = gTrackPreviewOrigin.z; place_virtual_track(td6, PTD_OPERATION_DRAW_OUTLINES, true, 0, 4096, 4096, 0); gTrackPreviewOrigin = { startX, startY, startZ }; @@ -924,7 +924,7 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td * * rct2: 0x006CE68D */ -static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track_td6 *td6) +static bool track_design_save_to_td6_for_tracked_ride(uint8_t rideIndex, rct_track_td6 *td6) { Ride *ride = get_ride(rideIndex); CoordsXYE trackElement; @@ -936,9 +936,9 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track ride_get_start_of_track(&trackElement); - sint32 z = trackElement.element->base_height * 8; - uint8 track_type = track_element_get_type(trackElement.element); - uint8 direction = tile_element_get_direction(trackElement.element); + int32_t z = trackElement.element->base_height * 8; + uint8_t track_type = track_element_get_type(trackElement.element); + uint8_t direction = tile_element_get_direction(trackElement.element); _trackSaveDirection = direction; if (sub_6C683D(&trackElement.x, &trackElement.y, &z, direction, track_type, 0, &trackElement.element, 0)) { @@ -952,9 +952,9 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track // start. rct_tile_element *initialMap = trackElement.element; - sint16 start_x = trackElement.x; - sint16 start_y = trackElement.y; - sint16 start_z = z + trackCoordinates->z_begin; + int16_t start_x = trackElement.x; + int16_t start_y = trackElement.y; + int16_t start_z = z + trackCoordinates->z_begin; gTrackPreviewOrigin = { start_x, start_y, start_z }; size_t numTrackElements = 0; @@ -966,7 +966,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track track->type = TRACK_ELEM_255_ALIAS; } - uint8 bh; + uint8_t bh; if (track_element_has_speed_setting(track->type)) { bh = tile_element_get_brake_booster_speed(trackElement.element) >> 1; @@ -976,7 +976,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track bh = track_element_get_seat_rotation(trackElement.element); } - uint8 flags = (trackElement.element->type & (1 << 7)) | bh; + uint8_t flags = (trackElement.element->type & (1 << 7)) | bh; flags |= track_element_get_colour_scheme(trackElement.element) << 4; if ( RideData4[ride->type].flags & RIDE_TYPE_FLAG4_HAS_ALTERNATIVE_TRACK_TYPE && @@ -1013,15 +1013,15 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track while (trackElement.element != initialMap); td6->track_elements = (rct_td6_track_element *)realloc(td6->track_elements, numTrackElements * sizeof(rct_td6_track_element) + 1); - *((uint8*)&td6->track_elements[numTrackElements]) = 0xFF; + *((uint8_t*)&td6->track_elements[numTrackElements]) = 0xFF; size_t numEntranceElements = 0; td6->entrance_elements = (rct_td6_entrance_element *)calloc(32, sizeof(rct_td6_entrance_element)); rct_td6_entrance_element *entrance = td6->entrance_elements; // First entrances, second exits - for (sint32 i = 0; i < 2; i++) { - for (sint32 station_index = 0; station_index < RCT12_MAX_STATIONS_PER_RIDE; station_index++) { + for (int32_t i = 0; i < 2; i++) { + for (int32_t station_index = 0; station_index < RCT12_MAX_STATIONS_PER_RIDE; station_index++) { z = ride->station_heights[station_index]; TileCoordsXYZD location; @@ -1035,8 +1035,8 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track continue; } - sint16 x = location.x * 32; - sint16 y = location.y * 32; + int16_t x = location.x * 32; + int16_t y = location.y * 32; rct_tile_element *tile_element = map_get_first_element_at(x >> 5, y >> 5); do { @@ -1045,7 +1045,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track } while (!(tile_element++)->IsLastForTile()); // Add something that stops this from walking off the end - uint8 entrance_direction = tile_element_get_direction(tile_element); + uint8_t entrance_direction = tile_element_get_direction(tile_element); entrance_direction -= _trackSaveDirection; entrance_direction &= TILE_ELEMENT_DIRECTION_MASK; entrance->direction = entrance_direction; @@ -1082,7 +1082,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track } } td6->entrance_elements = (rct_td6_entrance_element *)realloc(td6->entrance_elements, numEntranceElements * sizeof(rct_td6_entrance_element) + 1); - *((uint8*)&td6->entrance_elements[numEntranceElements]) = 0xFF; + *((uint8_t*)&td6->entrance_elements[numEntranceElements]) = 0xFF; place_virtual_track(td6, PTD_OPERATION_DRAW_OUTLINES, true, 0, 4096, 4096, 0); @@ -1174,7 +1174,7 @@ bool track_design_save_to_file(const utf8 *path) { rct_track_td6 *td6 = _trackDesign; const rct_td6_maze_element EndMarkerForMaze = {}; - const uint8 EndMarker = 0xFF; + const uint8_t EndMarker = 0xFF; window_close_construction_windows(); @@ -1194,9 +1194,9 @@ bool track_design_save_to_file(const utf8 *path) auto_buffer_write(&td6Buffer, &EndMarker, sizeof(EndMarker)); // Encode TD6 data - uint8 *encodedData = (uint8 *)malloc(0x8000); + uint8_t *encodedData = (uint8_t *)malloc(0x8000); assert(td6Buffer.ptr != nullptr); - size_t encodedDataLength = sawyercoding_encode_td6((uint8*)td6Buffer.ptr, encodedData, td6Buffer.length); + size_t encodedDataLength = sawyercoding_encode_td6((uint8_t*)td6Buffer.ptr, encodedData, td6Buffer.length); // Save encoded TD6 data to file bool result; diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index e8175ab923..39030867ae 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -42,28 +42,28 @@ static LocationXY16 loc_7667AE[] = { { -1, 0 }, }; -const uint8 track_map_2x2[][4] = { +const uint8_t track_map_2x2[][4] = { {0, 1, 2, 3}, {1, 3, 0, 2}, {3, 2, 1, 0}, {2, 0, 3, 1} }; -const uint8 edges_2x2[] = { +const uint8_t edges_2x2[] = { EDGE_NE | EDGE_NW, EDGE_NE | EDGE_SE, EDGE_SW | EDGE_NW, EDGE_SW | EDGE_SE, }; -const uint8 track_map_3x3[][9] = { +const uint8_t track_map_3x3[][9] = { {0, 1, 2, 3, 4, 5, 6, 7, 8}, {0, 3, 5, 7, 2, 8, 1, 6, 4}, {0, 7, 8, 6, 5, 4, 3, 1, 2}, {0, 6, 4, 1, 8, 2, 7, 3, 5} }; -const uint8 edges_3x3[] = { +const uint8_t edges_3x3[] = { 0, EDGE_NE | EDGE_NW, EDGE_NE, @@ -75,14 +75,14 @@ const uint8 edges_3x3[] = { EDGE_SW, }; -const uint8 track_map_4x4[][16] = { +const uint8_t track_map_4x4[][16] = { {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12}, {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, {12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3}, }; -const uint8 edges_4x4[] = { +const uint8_t edges_4x4[] = { EDGE_NE | EDGE_NW, EDGE_NE, EDGE_NE, @@ -101,35 +101,35 @@ const uint8 edges_4x4[] = { EDGE_SW | EDGE_SE }; -const uint8 track_map_1x4[][4] = { +const uint8_t track_map_1x4[][4] = { {0, 1, 2, 3}, {2, 3, 0, 1}, {2, 3, 0, 1}, {0, 1, 2, 3}, }; -const uint32 floorSpritesCork[] = { +const uint32_t floorSpritesCork[] = { SPR_FLOOR_CORK_SE_SW, SPR_FLOOR_CORK_SW, SPR_FLOOR_CORK_SE, SPR_FLOOR_CORK }; -const uint32 fenceSpritesRope[] = { +const uint32_t fenceSpritesRope[] = { SPR_FENCE_ROPE_NE, SPR_FENCE_ROPE_SE, SPR_FENCE_ROPE_SW, SPR_FENCE_ROPE_NW }; -const uint32 fenceSpritesMetalB[] = { +const uint32_t fenceSpritesMetalB[] = { SPR_FENCE_METAL_B_NE, SPR_FENCE_METAL_B_SE, SPR_FENCE_METAL_B_SW, SPR_FENCE_METAL_B_NW }; -const uint32 trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3] = { +const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3] = { { SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, @@ -149,14 +149,14 @@ const uint32 trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3] = { } }; -const uint32 trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4] = { +const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4] = { SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_SW_NW, SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_NW_NE, SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_NE_SE, SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_QUARTER_TURN_1_TILE_SE_SW, }; -static constexpr const uint32 trackSpritesGhostTrainSpinningTunnel[2][2][4] = { +static constexpr const uint32_t trackSpritesGhostTrainSpinningTunnel[2][2][4] = { { { SPR_GHOST_TRAIN_SPINNING_TUNNEL_BACK_SW_NE_FRAME_0, @@ -200,7 +200,7 @@ enum // clang-format on bool track_paint_util_has_fence( - enum edge_t edge, LocationXY16 position, const rct_tile_element * tileElement, Ride * ride, uint8 rotation) + enum edge_t edge, LocationXY16 position, const rct_tile_element * tileElement, Ride * ride, uint8_t rotation) { LocationXY16 offset = { 0, 0 }; switch (edge) @@ -219,10 +219,10 @@ bool track_paint_util_has_fence( break; } - sint32 entranceX = (position.x / 32) + offset.x; - sint32 entranceY = (position.y / 32) + offset.y; + int32_t entranceX = (position.x / 32) + offset.x; + int32_t entranceY = (position.y / 32) + offset.y; - sint32 entranceId = tile_element_get_station(tileElement); + int32_t entranceId = tile_element_get_station(tileElement); const TileCoordsXYZD entrance = ride_get_entrance_location(ride, entranceId); const TileCoordsXYZD exit = ride_get_exit_location(ride, entranceId); @@ -230,10 +230,10 @@ bool track_paint_util_has_fence( (exit.x != entranceX || exit.y != entranceY)); } -void track_paint_util_paint_floor(paint_session * session, uint8 edges, uint32 colourFlags, uint16 height, - const uint32 floorSprites[4]) +void track_paint_util_paint_floor(paint_session * session, uint8_t edges, uint32_t colourFlags, uint16_t height, + const uint32_t floorSprites[4]) { - uint32 imageId; + uint32_t imageId; if (edges & EDGE_SW && edges & EDGE_SE) { @@ -257,16 +257,16 @@ void track_paint_util_paint_floor(paint_session * session, uint8 edges, uint32 c void track_paint_util_paint_fences( paint_session * session, - uint8 edges, + uint8_t edges, LocationXY16 position, const rct_tile_element * tileElement, Ride * ride, - uint32 colourFlags, - uint16 height, - const uint32 fenceSprites[4], - uint8 rotation) + uint32_t colourFlags, + uint16_t height, + const uint32_t fenceSprites[4], + uint8_t rotation) { - uint32 imageId; + uint32_t imageId; if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation)) { @@ -304,19 +304,19 @@ bool track_paint_util_should_paint_supports(LocationXY16 position) static void track_paint_util_draw_station_impl( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, - uint16 coverHeight, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, + uint16_t coverHeight, const rct_tile_element * tileElement, - sint32 fenceOffsetA, - sint32 fenceOffsetB); + int32_t fenceOffsetA, + int32_t fenceOffsetB); void track_paint_util_draw_station( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement) { track_paint_util_draw_station_impl(session, rideIndex, direction, height, height, tileElement, 5, 7); @@ -324,22 +324,22 @@ void track_paint_util_draw_station( void track_paint_util_draw_station_2( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, - sint32 fenceOffsetA, - sint32 fenceOffsetB) + int32_t fenceOffsetA, + int32_t fenceOffsetB) { track_paint_util_draw_station_impl(session, rideIndex, direction, height, height, tileElement, fenceOffsetA, fenceOffsetB); } void track_paint_util_draw_station_3( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, - uint16 coverHeight, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, + uint16_t coverHeight, const rct_tile_element * tileElement) { track_paint_util_draw_station_impl(session, rideIndex, direction, height, coverHeight, tileElement, 5, 7); @@ -347,13 +347,13 @@ void track_paint_util_draw_station_3( static void track_paint_util_draw_station_impl( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, - uint16 coverHeight, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, + uint16_t coverHeight, const rct_tile_element * tileElement, - sint32 fenceOffsetA, - sint32 fenceOffsetB) + int32_t fenceOffsetA, + int32_t fenceOffsetB) { LocationXY16 position = session->MapPosition; Ride * ride = get_ride(rideIndex); @@ -361,7 +361,7 @@ static void track_paint_util_draw_station_impl( const bool hasGreenLight = tile_element_get_green_light(tileElement); bool hasFence; - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -558,11 +558,11 @@ static void track_paint_util_draw_station_impl( void track_paint_util_draw_station_inverted( paint_session * session, - uint8 rideIndex, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - uint8 stationVariant) + uint8_t stationVariant) { LocationXY16 position = session->MapPosition; Ride * ride = get_ride(rideIndex); @@ -570,7 +570,7 @@ void track_paint_util_draw_station_inverted( const bool hasGreenLight = tile_element_get_green_light(tileElement); bool hasFence; - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -766,52 +766,52 @@ void track_paint_util_draw_station_inverted( } bool track_paint_util_draw_station_covers(paint_session * session, enum edge_t edge, bool hasFence, - const rct_ride_entrance_definition * entranceStyle, uint16 height) + const rct_ride_entrance_definition * entranceStyle, uint16_t height) { return track_paint_util_draw_station_covers_2(session, edge, hasFence, entranceStyle, height, STATION_VARIANT_BASIC); } bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t edge, bool hasFence, - const rct_ride_entrance_definition * entranceStyle, uint16 height, - uint8 stationVariant) + const rct_ride_entrance_definition * entranceStyle, uint16_t height, + uint8_t stationVariant) { if (!(session->Unk141E9DB & (G141E9DB_FLAG_1 | G141E9DB_FLAG_2))) { return false; } - static constexpr const sint16 heights[][2] = { + static constexpr const int16_t heights[][2] = { { 22, 0 }, { 30, 0 }, { 46, 0 }, }; - uint32 imageId; - uint32 baseImageId = entranceStyle->base_image_id; - sint32 imageOffset = 0; + uint32_t imageId; + uint32_t baseImageId = entranceStyle->base_image_id; + int32_t imageOffset = 0; LocationXYZ16 offset, bounds = { 0, 0, 0 }, boundsOffset = { 0, 0, 0 }; - offset = LocationXYZ16{ 0, 0, static_cast(height) }; + offset = LocationXYZ16{ 0, 0, static_cast(height) }; switch (edge) { case EDGE_NE: bounds = LocationXYZ16{ 1, 30, heights[stationVariant][0] }; - boundsOffset = LocationXYZ16{ 0, 1, static_cast(height + 1) }; + boundsOffset = LocationXYZ16{ 0, 1, static_cast(height + 1) }; imageOffset = hasFence ? SPR_STATION_COVER_OFFSET_SE_NW_BACK_1 : SPR_STATION_COVER_OFFSET_SE_NW_BACK_0; break; case EDGE_SE: bounds = LocationXYZ16{ 32, 32, 0 }; - boundsOffset = LocationXYZ16{ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; + boundsOffset = LocationXYZ16{ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; imageOffset = SPR_STATION_COVER_OFFSET_NE_SW_FRONT; break; case EDGE_SW: bounds = LocationXYZ16{ 32, 32, 0 }; - boundsOffset = LocationXYZ16{ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; + boundsOffset = LocationXYZ16{ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; imageOffset = SPR_STATION_COVER_OFFSET_SE_NW_FRONT; break; case EDGE_NW: bounds = LocationXYZ16{ 30, 1, heights[stationVariant][0] }; - boundsOffset = LocationXYZ16{ 1, 0, static_cast(height + 1) }; + boundsOffset = LocationXYZ16{ 1, 0, static_cast(height + 1) }; imageOffset = hasFence ? SPR_STATION_COVER_OFFSET_NE_SW_BACK_1 : SPR_STATION_COVER_OFFSET_NE_SW_BACK_0; break; } @@ -835,35 +835,35 @@ bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t { imageId = (baseImageId & ~IMAGE_TYPE_TRANSPARENT) + imageOffset; sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, (int8_t)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z); - uint32 edi = session->TrackColours[SCHEME_TRACK] & (0b11111 << 19); + uint32_t edi = session->TrackColours[SCHEME_TRACK] & (0b11111 << 19); // weird jump imageId = (baseImageId | edi) + ((1 << 23) | (1 << 24) | (1 << 25)) + imageOffset + 12; sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, (int8_t)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z); return true; } imageId = (baseImageId + imageOffset) | session->TrackColours[SCHEME_TRACK]; sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, (int8_t)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z); return true; } void track_paint_util_draw_station_platform( - paint_session * session, Ride * ride, uint8 direction, sint32 height, sint32 zOffset, const rct_tile_element * tileElement) + paint_session * session, Ride * ride, uint8_t direction, int32_t height, int32_t zOffset, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; if (direction & 1) { bool hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation); - uint32 imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE) | + uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE) | session->TrackColours[SCHEME_SUPPORTS]; sub_98196C(session, imageId, 0, 0, 8, 32, 1, height + zOffset); track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, entranceStyle, height); @@ -882,7 +882,7 @@ void track_paint_util_draw_station_platform( else { bool hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, session->CurrentRotation); - uint32 imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW) | + uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW) | session->TrackColours[SCHEME_SUPPORTS]; sub_98196C(session, imageId, 0, 0, 32, 8, 1, height + zOffset); track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, entranceStyle, height); @@ -905,13 +905,13 @@ void track_paint_util_draw_pier( Ride * ride, const rct_ride_entrance_definition * entranceStyle, LocationXY16 position, - uint8 direction, - sint32 height, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - uint8 rotation) + uint8_t rotation) { bool hasFence; - uint32 imageId; + uint32_t imageId; if (direction & 1) { @@ -953,13 +953,13 @@ void track_paint_util_draw_pier( } } -void track_paint_util_draw_station_metal_supports(paint_session * session, uint8 direction, uint16 height, uint32 colour) +void track_paint_util_draw_station_metal_supports(paint_session * session, uint8_t direction, uint16_t height, uint32_t colour) { track_paint_util_draw_station_metal_supports_2(session, direction, height, colour, 3); } -void track_paint_util_draw_station_metal_supports_2(paint_session * session, uint8 direction, uint16 height, uint32 colour, - uint8 type) +void track_paint_util_draw_station_metal_supports_2(paint_session * session, uint8_t direction, uint16_t height, uint32_t colour, + uint8_t type) { if (direction & 1) { @@ -1019,16 +1019,16 @@ const LocationXYZ16 defaultRightHelixUpSmallQuarterBoundOffsets[4][3][2] = { }, }; -static constexpr const sint8 right_helix_up_small_quarter_tiles_sprite_map[] = { 0, -1, 1, 2 }; +static constexpr const int8_t right_helix_up_small_quarter_tiles_sprite_map[] = { 0, -1, 1, 2 }; -void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * session, const sint8 thickness[2], sint16 height, - sint32 direction, uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][3][2], +void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * session, const int8_t thickness[2], int16_t height, + int32_t direction, uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][3][2], const LocationXY16 offsets[4][3][2], const LocationXY16 boundsLengths[4][3][2], const LocationXYZ16 boundsOffsets[4][3][2]) { - sint32 index = right_helix_up_small_quarter_tiles_sprite_map[trackSequence]; + int32_t index = right_helix_up_small_quarter_tiles_sprite_map[trackSequence]; if (index < 0) { return; @@ -1036,26 +1036,26 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s if (sprites[direction][index][0] != 0) { - uint32 imageId = sprites[direction][index][0] | colourFlags; + uint32_t imageId = sprites[direction][index][0] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][0]); LocationXY16 boundsLength = boundsLengths[direction][index][0]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][0]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness[0], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } if (sprites[direction][index][1] != 0) { - uint32 imageId = sprites[direction][index][1] | colourFlags; + uint32_t imageId = sprites[direction][index][1] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][1]); LocationXY16 boundsLength = boundsLengths[direction][index][1]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][1]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness[1], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } } @@ -1122,15 +1122,15 @@ const LocationXY16 defaultRightHelixUpLargeQuarterBoundLengths[4][5][2] = { }, }; -static constexpr const sint8 right_helix_up_large_quarter_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; -void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * session, const sint8 thickness[2], sint16 height, - sint32 direction, uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][5][2], +static constexpr const int8_t right_helix_up_large_quarter_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; +void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * session, const int8_t thickness[2], int16_t height, + int32_t direction, uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][5][2], const LocationXY16 offsets[4][5][2], const LocationXY16 boundsLengths[4][5][2], const LocationXYZ16 boundsOffsets[4][5][2]) { - sint32 index = right_helix_up_large_quarter_sprite_map[trackSequence]; + int32_t index = right_helix_up_large_quarter_sprite_map[trackSequence]; if (index < 0) { return; @@ -1138,26 +1138,26 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * s if (sprites[direction][index][0] != 0) { - uint32 imageId = sprites[direction][index][0] | colourFlags; + uint32_t imageId = sprites[direction][index][0] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][0]); LocationXY16 boundsLength = boundsLengths[direction][index][0]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][0]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness[0], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } if (sprites[direction][index][1] != 0) { - uint32 imageId = sprites[direction][index][1] | colourFlags; + uint32_t imageId = sprites[direction][index][1] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][1]); LocationXY16 boundsLength = boundsLengths[direction][index][1]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][1]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness[1], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } } @@ -1270,7 +1270,7 @@ const LocationXYZ16 defaultRightEighthToDiagBoundOffsets[4][4] = { }, }; -const sint8 defaultEighthToDiagThickness[4][4] = { +const int8_t defaultEighthToDiagThickness[4][4] = { { 1, 1, @@ -1297,29 +1297,29 @@ const sint8 defaultEighthToDiagThickness[4][4] = { }, }; -const uint8 mapLeftEighthTurnToOrthogonal[] = { 4, 2, 3, 1, 0 }; +const uint8_t mapLeftEighthTurnToOrthogonal[] = { 4, 2, 3, 1, 0 }; -static constexpr const sint8 eighth_to_diag_sprite_map[] = { 0, 1, 2, -1, 3 }; -void track_paint_util_eighth_to_diag_tiles_paint(paint_session * session, const sint8 thickness[4][4], sint16 height, - sint32 direction, uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][4], const LocationXY16 offsets[4][4], +static constexpr const int8_t eighth_to_diag_sprite_map[] = { 0, 1, 2, -1, 3 }; +void track_paint_util_eighth_to_diag_tiles_paint(paint_session * session, const int8_t thickness[4][4], int16_t height, + int32_t direction, uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][4], const LocationXY16 offsets[4][4], const LocationXY16 boundsLengths[4][4], const LocationXYZ16 boundsOffsets[4][4]) { - sint32 index = eighth_to_diag_sprite_map[trackSequence]; + int32_t index = eighth_to_diag_sprite_map[trackSequence]; if (index < 0) { return; } - uint32 imageId = sprites[direction][index] | colourFlags; + uint32_t imageId = sprites[direction][index] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index]); LocationXY16 boundsLength = boundsLengths[direction][index]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[direction][index], height, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness[direction][index], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } @@ -1337,36 +1337,36 @@ const LocationXY16 defaultDiagBoundLengths[4] = { { 32, 32 }, }; -static constexpr const sint8 diag_sprite_map[4][4] = { +static constexpr const int8_t diag_sprite_map[4][4] = { { -1, 0, -1, -1 }, { -1, -1, -1, 0 }, { -1, -1, 0, -1 }, { 0, -1, -1, -1 }, }; -void track_paint_util_diag_tiles_paint(paint_session * session, sint8 thickness, sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4], +void track_paint_util_diag_tiles_paint(paint_session * session, int8_t thickness, int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4], const LocationXY16 offsets[4], const LocationXY16 boundsLengths[4], const LocationXYZ16 boundsOffsets[4]) { - sint32 index = diag_sprite_map[direction][trackSequence]; + int32_t index = diag_sprite_map[direction][trackSequence]; if (index < 0) { return; } - uint32 imageId = sprites[direction] | colourFlags; + uint32_t imageId = sprites[direction] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction]); LocationXY16 boundsLength = boundsLengths[direction]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } -const uint8 mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[] = { 6, 4, 5, 3, 1, 2, 0 }; +const uint8_t mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[] = { 6, 4, 5, 3, 1, 2, 0 }; const LocationXY16 defaultRightQuarterTurn5TilesOffsets[4][5] = { { @@ -1461,65 +1461,65 @@ const LocationXY16 defaultRightQuarterTurn5TilesBoundLengths[4][5] = { }, }; -static constexpr const sint8 right_quarter_turn_5_tiles_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; -void track_paint_util_right_quarter_turn_5_tiles_paint(paint_session * session, sint8 thickness, sint16 height, - sint32 direction, uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][5], const LocationXY16 offsets[4][5], +static constexpr const int8_t right_quarter_turn_5_tiles_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; +void track_paint_util_right_quarter_turn_5_tiles_paint(paint_session * session, int8_t thickness, int16_t height, + int32_t direction, uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][5], const LocationXY16 offsets[4][5], const LocationXY16 boundsLengths[4][5], const LocationXYZ16 boundsOffsets[4][5]) { - sint32 index = right_quarter_turn_5_tiles_sprite_map[trackSequence]; + int32_t index = right_quarter_turn_5_tiles_sprite_map[trackSequence]; if (index < 0) { return; } - uint32 imageId = sprites[direction][index] | colourFlags; + uint32_t imageId = sprites[direction][index] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index]); LocationXY16 boundsLength = boundsLengths[direction][index]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } -void track_paint_util_right_quarter_turn_5_tiles_paint_2(paint_session * session, sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5]) +void track_paint_util_right_quarter_turn_5_tiles_paint_2(paint_session * session, int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[][5]) { - sint8 sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; + int8_t sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; if (sprite < 0) { return; } const sprite_bb * spriteBB = &sprites[direction][sprite]; - uint32 imageId = spriteBB->sprite_id | colourFlags; + uint32_t imageId = spriteBB->sprite_id | colourFlags; sub_98197C( - session, imageId, (sint8)spriteBB->offset.x, (sint8)spriteBB->offset.y, spriteBB->bb_size.x, spriteBB->bb_size.y, - (sint8)spriteBB->bb_size.z, height + spriteBB->offset.z, spriteBB->bb_offset.x, spriteBB->bb_offset.y, + session, imageId, (int8_t)spriteBB->offset.x, (int8_t)spriteBB->offset.y, spriteBB->bb_size.x, spriteBB->bb_size.y, + (int8_t)spriteBB->bb_size.z, height + spriteBB->offset.z, spriteBB->bb_offset.x, spriteBB->bb_offset.y, height + spriteBB->bb_offset.z); } -void track_paint_util_right_quarter_turn_5_tiles_paint_3(paint_session * session, sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5]) +void track_paint_util_right_quarter_turn_5_tiles_paint_3(paint_session * session, int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[][5]) { - sint8 sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; + int8_t sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; if (sprite < 0) { return; } const sprite_bb * spriteBB = &sprites[direction][sprite]; - uint32 imageId = spriteBB->sprite_id | colourFlags; + uint32_t imageId = spriteBB->sprite_id | colourFlags; sub_98196C( - session, imageId, (sint8)spriteBB->offset.x, (sint8)spriteBB->offset.y, spriteBB->bb_size.x, spriteBB->bb_size.y, - (sint8)spriteBB->bb_size.z, height + spriteBB->offset.z); + session, imageId, (int8_t)spriteBB->offset.x, (int8_t)spriteBB->offset.y, spriteBB->bb_size.x, spriteBB->bb_size.y, + (int8_t)spriteBB->bb_size.z, height + spriteBB->offset.z); } -void track_paint_util_right_quarter_turn_5_tiles_tunnel(paint_session * session, sint16 height, uint8 direction, - uint8 trackSequence, uint8 tunnelType) +void track_paint_util_right_quarter_turn_5_tiles_tunnel(paint_session * session, int16_t height, uint8_t direction, + uint8_t trackSequence, uint8_t tunnelType) { if (direction == 0 && trackSequence == 0) { @@ -1539,23 +1539,23 @@ void track_paint_util_right_quarter_turn_5_tiles_tunnel(paint_session * session, } } -void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(paint_session * session, sint16 height, uint8 direction, - uint8 trackSequence) +void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(paint_session * session, int16_t height, uint8_t direction, + uint8_t trackSequence) { if (trackSequence != 1 && trackSequence != 4) { - static constexpr const uint8 supportTypes[][7] = { + static constexpr const uint8_t supportTypes[][7] = { { 0, 0xFF, 4, 2, 0xFF, 4, 1 }, { 1, 0xFF, 5, 3, 0xFF, 5, 0 }, { 0, 0xFF, 2, 4, 0xFF, 2, 1 }, { 1, 0xFF, 3, 5, 0xFF, 3, 0 }, }; - uint8 supportType = supportTypes[direction][trackSequence]; + uint8_t supportType = supportTypes[direction][trackSequence]; wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], NULL); } } -const uint8 mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[] = { 3, 1, 2, 0 }; +const uint8_t mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[] = { 3, 1, 2, 0 }; const LocationXY16 defaultRightQuarterTurn3TilesOffsets[4][3] = { { @@ -1626,51 +1626,51 @@ const LocationXY16 defaultRightQuarterTurn3TilesBoundLengths[4][3] = { }, }; -static constexpr const sint8 right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 }; -void track_paint_util_right_quarter_turn_3_tiles_paint(paint_session * session, sint8 thickness, sint16 height, - sint32 direction, uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][3], const LocationXY16 offsets[4][3], +static constexpr const int8_t right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 }; +void track_paint_util_right_quarter_turn_3_tiles_paint(paint_session * session, int8_t thickness, int16_t height, + int32_t direction, uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][3], const LocationXY16 offsets[4][3], const LocationXY16 boundsLengths[4][3], const LocationXYZ16 boundsOffsets[4][3]) { - sint32 index = right_quarter_turn_3_tiles_sprite_map[trackSequence]; + int32_t index = right_quarter_turn_3_tiles_sprite_map[trackSequence]; if (index < 0) { return; } - uint32 imageId = sprites[direction][index] | colourFlags; + uint32_t imageId = sprites[direction][index] | colourFlags; LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index]); LocationXY16 boundsLength = boundsLengths[direction][index]; LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } -void track_paint_util_right_quarter_turn_3_tiles_paint_2(paint_session * session, sint8 thickness, sint16 height, - sint32 direction, uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][3]) +void track_paint_util_right_quarter_turn_3_tiles_paint_2(paint_session * session, int8_t thickness, int16_t height, + int32_t direction, uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][3]) { track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(session, thickness, height, direction, trackSequence, colourFlags, sprites, 0); } -void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(paint_session * session, sint8 thickness, - sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, - const uint32 sprites[4][3], - sint32 heightOffset) +void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(paint_session * session, int8_t thickness, + int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, + const uint32_t sprites[4][3], + int32_t heightOffset) { - sint8 sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence]; + int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence]; if (sprite < 0) { return; } - uint32 imageId = sprites[(direction + 1) % 4][sprite] | colourFlags; + uint32_t imageId = sprites[(direction + 1) % 4][sprite] | colourFlags; switch (direction) { @@ -1736,41 +1736,41 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(pain } } -void track_paint_util_right_quarter_turn_3_tiles_paint_3(paint_session * session, sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, +void track_paint_util_right_quarter_turn_3_tiles_paint_3(paint_session * session, int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[4][3]) { - sint8 sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence]; + int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence]; if (sprite < 0) { return; } const sprite_bb * spriteBB = &sprites[direction][sprite]; sub_98197C( - session, spriteBB->sprite_id | colourFlags, (sint8)spriteBB->offset.x, (sint8)spriteBB->offset.y, spriteBB->bb_size.x, - spriteBB->bb_size.y, (sint8)spriteBB->bb_size.z, spriteBB->offset.z + height, spriteBB->bb_offset.x, + session, spriteBB->sprite_id | colourFlags, (int8_t)spriteBB->offset.x, (int8_t)spriteBB->offset.y, spriteBB->bb_size.x, + spriteBB->bb_size.y, (int8_t)spriteBB->bb_size.z, spriteBB->offset.z + height, spriteBB->bb_offset.x, spriteBB->bb_offset.y, height + spriteBB->bb_offset.z); } -void track_paint_util_right_quarter_turn_3_tiles_paint_4(paint_session * session, sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, +void track_paint_util_right_quarter_turn_3_tiles_paint_4(paint_session * session, int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[4][3]) { - sint8 sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence]; + int8_t sprite = right_quarter_turn_3_tiles_sprite_map[trackSequence]; if (sprite < 0) { return; } const sprite_bb * spriteBB = &sprites[direction][sprite]; - uint32 imageId = spriteBB->sprite_id | colourFlags; + uint32_t imageId = spriteBB->sprite_id | colourFlags; sub_98196C( - session, imageId, (sint8)spriteBB->offset.x, (sint8)spriteBB->offset.y, spriteBB->bb_size.x, spriteBB->bb_size.y, - (sint8)spriteBB->bb_size.z, height + spriteBB->offset.z); + session, imageId, (int8_t)spriteBB->offset.x, (int8_t)spriteBB->offset.y, spriteBB->bb_size.x, spriteBB->bb_size.y, + (int8_t)spriteBB->bb_size.z, height + spriteBB->offset.z); } -void track_paint_util_right_quarter_turn_3_tiles_tunnel(paint_session * session, sint16 height, uint8 direction, - uint8 trackSequence, uint8 tunnelType) +void track_paint_util_right_quarter_turn_3_tiles_tunnel(paint_session * session, int16_t height, uint8_t direction, + uint8_t trackSequence, uint8_t tunnelType) { if (direction == 0 && trackSequence == 0) { @@ -1793,8 +1793,8 @@ void track_paint_util_right_quarter_turn_3_tiles_tunnel(paint_session * session, } } -void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(paint_session * session, sint16 height, uint8 direction, - uint8 trackSequence, uint8 tunnelType0, uint8 tunnelType3) +void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(paint_session * session, int16_t height, uint8_t direction, + uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3) { if (direction == 0 && trackSequence == 0) { @@ -1814,8 +1814,8 @@ void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(paint_session } } -void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(paint_session * session, sint16 height, uint8 direction, - uint8 trackSequence, uint8 tunnelType0, uint8 tunnelType3) +void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(paint_session * session, int16_t height, uint8_t direction, + uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3) { if (direction == 0 && trackSequence == 0) { @@ -1835,26 +1835,26 @@ void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(paint_sessio } } -static constexpr const sint8 left_quarter_turn_3_tiles_sprite_map[] = { 2, -1, 1, 0 }; -void track_paint_util_left_quarter_turn_3_tiles_paint(paint_session * session, sint8 thickness, sint16 height, sint32 direction, - uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3]) +static constexpr const int8_t left_quarter_turn_3_tiles_sprite_map[] = { 2, -1, 1, 0 }; +void track_paint_util_left_quarter_turn_3_tiles_paint(paint_session * session, int8_t thickness, int16_t height, int32_t direction, + uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3]) { track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(session, thickness, height, direction, trackSequence, colourFlags, sprites, 0); } -void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(paint_session * session, sint8 thickness, - sint16 height, sint32 direction, uint8 trackSequence, - uint32 colourFlags, const uint32 sprites[4][3], - sint32 heightOffset) +void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(paint_session * session, int8_t thickness, + int16_t height, int32_t direction, uint8_t trackSequence, + uint32_t colourFlags, const uint32_t sprites[4][3], + int32_t heightOffset) { - sint8 sprite = left_quarter_turn_3_tiles_sprite_map[trackSequence]; + int8_t sprite = left_quarter_turn_3_tiles_sprite_map[trackSequence]; if (sprite < 0) { return; } - uint32 imageId = sprites[(direction + 1) % 4][sprite] | colourFlags; + uint32_t imageId = sprites[(direction + 1) % 4][sprite] | colourFlags; switch (direction) { @@ -1920,26 +1920,26 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(paint_s } } -// void track_paint_util_left_quarter_turn_3_tiles_paint_2(sint16 height, sint32 direction, uint8 rotation, uint8 trackSequence, -// uint32 colourFlags, const sprite_bb sprites[][5]) +// void track_paint_util_left_quarter_turn_3_tiles_paint_2(int16_t height, int32_t direction, uint8_t rotation, uint8_t trackSequence, +// uint32_t colourFlags, const sprite_bb sprites[][5]) // { -// sint8 sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; +// int8_t sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; // if (sprite < 0) { // return; // } // // const sprite_bb *spriteBB = &sprites[direction][sprite]; -// uint32 imageId = spriteBB->SpriteId | colourFlags; +// uint32_t imageId = spriteBB->SpriteId | colourFlags; // sub_98197C(session, imageId, -// (sint8)spriteBB->offset.x, (sint8)spriteBB->offset.y, -// spriteBB->bb_size.x, spriteBB->bb_size.y, (sint8)spriteBB->bb_size.z, +// (int8_t)spriteBB->offset.x, (int8_t)spriteBB->offset.y, +// spriteBB->bb_size.x, spriteBB->bb_size.y, (int8_t)spriteBB->bb_size.z, // height + spriteBB->offset.z, // spriteBB->bb_offset.x, spriteBB->bb_offset.y, height + spriteBB->bb_offset.z, // rotation); // } -void track_paint_util_left_quarter_turn_3_tiles_tunnel(paint_session * session, sint16 height, uint8 tunnelType, - uint8 direction, uint8 trackSequence) +void track_paint_util_left_quarter_turn_3_tiles_tunnel(paint_session * session, int16_t height, uint8_t tunnelType, + uint8_t direction, uint8_t trackSequence) { if (direction == 0 && trackSequence == 0) { @@ -1962,11 +1962,11 @@ void track_paint_util_left_quarter_turn_3_tiles_tunnel(paint_session * session, } } -void track_paint_util_left_quarter_turn_1_tile_paint(paint_session * session, sint8 thickness, sint16 height, - sint16 boundBoxZOffset, sint32 direction, uint32 colourFlags, - const uint32 * sprites) +void track_paint_util_left_quarter_turn_1_tile_paint(paint_session * session, int8_t thickness, int16_t height, + int16_t boundBoxZOffset, int32_t direction, uint32_t colourFlags, + const uint32_t * sprites) { - uint32 imageId = sprites[direction] | colourFlags; + uint32_t imageId = sprites[direction] | colourFlags; switch (direction) { @@ -1985,15 +1985,15 @@ void track_paint_util_left_quarter_turn_1_tile_paint(paint_session * session, si } } -void track_paint_util_right_quarter_turn_1_tile_tunnel(paint_session * session, uint8 direction, uint16 baseHeight, - sint8 startOffset, uint8 startTunnel, sint8 endOffset, uint8 endTunnel) +void track_paint_util_right_quarter_turn_1_tile_tunnel(paint_session * session, uint8_t direction, uint16_t baseHeight, + int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel) { track_paint_util_left_quarter_turn_1_tile_tunnel(session, (direction + 3) % 4, baseHeight, endOffset, endTunnel, startOffset, startTunnel); } -void track_paint_util_left_quarter_turn_1_tile_tunnel(paint_session * session, uint8 direction, uint16 baseHeight, - sint8 startOffset, uint8 startTunnel, sint8 endOffset, uint8 endTunnel) +void track_paint_util_left_quarter_turn_1_tile_tunnel(paint_session * session, uint8_t direction, uint16_t baseHeight, + int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel) { switch (direction) { @@ -2010,18 +2010,18 @@ void track_paint_util_left_quarter_turn_1_tile_tunnel(paint_session * session, u } } -void track_paint_util_spinning_tunnel_paint(paint_session * session, sint8 thickness, sint16 height, uint8 direction) +void track_paint_util_spinning_tunnel_paint(paint_session * session, int8_t thickness, int16_t height, uint8_t direction) { - sint32 frame = gScenarioTicks >> 2 & 3; - uint32 colourFlags = session->TrackColours[SCHEME_SUPPORTS]; + int32_t frame = gScenarioTicks >> 2 & 3; + uint32_t colourFlags = session->TrackColours[SCHEME_SUPPORTS]; - uint32 colourFlags2 = session->TrackColours[SCHEME_TRACK]; + uint32_t colourFlags2 = session->TrackColours[SCHEME_TRACK]; if (colourFlags2 & IMAGE_TYPE_REMAP_2_PLUS) { colourFlags |= colourFlags2 & (IMAGE_TYPE_REMAP_2_PLUS | (0x1F << 24)); } - uint32 imageId = trackSpritesGhostTrainSpinningTunnel[direction & 1][0][frame] | colourFlags; + uint32_t imageId = trackSpritesGhostTrainSpinningTunnel[direction & 1][0][frame] | colourFlags; if (direction == 0 || direction == 2) { sub_98199C(session, imageId, 0, 0, 28, 20, thickness, height, 2, 6, height); @@ -2043,9 +2043,9 @@ void track_paint_util_spinning_tunnel_paint(paint_session * session, sint8 thick } void track_paint_util_onride_photo_small_paint( - paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement) + paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_ON_RIDE_PHOTO_SIGN_SMALL_SW_NE, SPR_ON_RIDE_PHOTO_CAMERA_SMALL_S, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_SMALL_S }, { SPR_ON_RIDE_PHOTO_SIGN_SMALL_NW_SE, SPR_ON_RIDE_PHOTO_CAMERA_SMALL_W, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_SMALL_W }, { SPR_ON_RIDE_PHOTO_SIGN_SMALL_NE_SW, SPR_ON_RIDE_PHOTO_CAMERA_SMALL_N, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_SMALL_N }, @@ -2053,8 +2053,8 @@ void track_paint_util_onride_photo_small_paint( }; bool takingPhoto = tile_element_is_taking_photo(tileElement); - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_MISC]; - uint32 flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session->TrackColours[SCHEME_MISC]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_MISC]; + uint32_t flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session->TrackColours[SCHEME_MISC]; switch (direction) { case 0: @@ -2081,9 +2081,9 @@ void track_paint_util_onride_photo_small_paint( } void track_paint_util_onride_photo_paint( - paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement) + paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_ON_RIDE_PHOTO_SIGN_SW_NE, SPR_ON_RIDE_PHOTO_CAMERA_S, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_S }, { SPR_ON_RIDE_PHOTO_SIGN_NW_SE, SPR_ON_RIDE_PHOTO_CAMERA_W, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_W }, { SPR_ON_RIDE_PHOTO_SIGN_NE_SW, SPR_ON_RIDE_PHOTO_CAMERA_N, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_N }, @@ -2091,8 +2091,8 @@ void track_paint_util_onride_photo_paint( }; bool takingPhoto = tile_element_is_taking_photo(tileElement); - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_MISC]; - uint32 flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session->TrackColours[SCHEME_MISC]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_MISC]; + uint32_t flashImageId = imageIds[direction][takingPhoto ? 2 : 1] | session->TrackColours[SCHEME_MISC]; switch (direction) { case 0: @@ -2118,7 +2118,7 @@ void track_paint_util_onride_photo_paint( } } -static constexpr const uint16 RightVerticalLoopSegments[] = { +static constexpr const uint16_t RightVerticalLoopSegments[] = { SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, @@ -2131,7 +2131,7 @@ static constexpr const uint16 RightVerticalLoopSegments[] = { SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, }; -void track_paint_util_right_vertical_loop_segments(paint_session * session, uint8 direction, uint8 trackSequence) +void track_paint_util_right_vertical_loop_segments(paint_session * session, uint8_t direction, uint8_t trackSequence) { if (trackSequence > 9) { @@ -2143,7 +2143,7 @@ void track_paint_util_right_vertical_loop_segments(paint_session * session, uint session, paint_util_rotate_segments(RightVerticalLoopSegments[trackSequence], direction), 0xFFFF, 0); } -void track_paint_util_left_corkscrew_up_supports(paint_session * session, uint8 direction, uint16 height) +void track_paint_util_left_corkscrew_up_supports(paint_session * session, uint8_t direction, uint16_t height) { // TODO: Figure out which of these looks best, and use one to keep a consistent world if (direction == 2) @@ -2165,9 +2165,9 @@ void track_paint_util_left_corkscrew_up_supports(paint_session * session, uint8 * * rct2: 0x006C4794 */ -void track_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement) +void track_paint(paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement) { - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); Ride * ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_NULL) { @@ -2188,17 +2188,17 @@ void track_paint(paint_session * session, uint8 direction, sint32 height, const if ((!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex) && !(gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { - sint32 trackType = track_element_get_type(tileElement); - sint32 trackSequence = tile_element_get_track_sequence(tileElement); - sint32 trackColourScheme = track_element_get_colour_scheme(tileElement); + int32_t trackType = track_element_get_type(tileElement); + int32_t trackSequence = tile_element_get_track_sequence(tileElement); + int32_t trackColourScheme = track_element_get_colour_scheme(tileElement); if ((gCurrentViewportFlags & VIEWPORT_FLAG_TRACK_HEIGHTS) && dpi->zoom_level == 0) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; if (TrackHeightMarkerPositions[trackType] & (1 << trackSequence)) { - uint16 ax = RideData5[ride->type].z_offset; - uint32 ebx = 0x20381689 + (height + 8) / 16; + uint16_t ax = RideData5[ride->type].z_offset; + uint32_t ebx = 0x20381689 + (height + 8) / 16; ebx += get_height_marker_offset(); ebx -= gMapBaseZ; sub_98197C(session, ebx, 16, 16, 1, 1, 0, height + ax + 3, 1000, 1000, 2047); @@ -2220,7 +2220,7 @@ void track_paint(paint_session * session, uint8 direction, sint32 height, const } if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) { - uint32 ghost_id = CONSTRUCTION_MARKER; + uint32_t ghost_id = CONSTRUCTION_MARKER; session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; session->TrackColours[SCHEME_TRACK] = ghost_id; session->TrackColours[SCHEME_SUPPORTS] = ghost_id; diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index f9ce96c84b..dff25e2e87 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -16,16 +16,16 @@ #include "../paint/Paint.h" #include "../world/Map.h" -extern const uint8 track_map_2x2[][4]; -extern const uint8 edges_2x2[]; +extern const uint8_t track_map_2x2[][4]; +extern const uint8_t edges_2x2[]; -extern const uint8 track_map_3x3[][9]; -extern const uint8 edges_3x3[]; +extern const uint8_t track_map_3x3[][9]; +extern const uint8_t edges_3x3[]; -extern const uint8 track_map_4x4[][16]; -extern const uint8 edges_4x4[]; +extern const uint8_t track_map_4x4[][16]; +extern const uint8_t edges_4x4[]; -extern const uint8 track_map_1x4[][4]; +extern const uint8_t track_map_1x4[][4]; enum { SPR_FLOOR_PLANKS = 3395, @@ -235,20 +235,20 @@ enum { MAZE_ENTRY_FLAG_15 = (1 << 15), }; -extern const uint32 floorSpritesCork[]; +extern const uint32_t floorSpritesCork[]; -extern const uint32 fenceSpritesRope[]; -extern const uint32 fenceSpritesMetalB[]; +extern const uint32_t fenceSpritesRope[]; +extern const uint32_t fenceSpritesMetalB[]; -extern const uint32 trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3]; -extern const uint32 trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4]; +extern const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3]; +extern const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile[4]; -extern const uint8 mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[]; +extern const uint8_t mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[]; extern const LocationXY16 defaultRightQuarterTurn5TilesOffsets[4][5]; extern const LocationXYZ16 defaultRightQuarterTurn5TilesBoundOffsets[4][5]; extern const LocationXY16 defaultRightQuarterTurn5TilesBoundLengths[4][5]; -extern const uint8 mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[]; +extern const uint8_t mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[]; extern const LocationXY16 defaultRightQuarterTurn3TilesOffsets[4][3]; extern const LocationXYZ16 defaultRightQuarterTurn3TilesBoundOffsets[4][3]; extern const LocationXY16 defaultRightQuarterTurn3TilesBoundLengths[4][3]; @@ -263,187 +263,187 @@ extern const LocationXYZ16 defaultLeftEighthToDiagBoundOffsets[4][4]; extern const LocationXY16 defaultLeftEighthToDiagBoundLengths[4][4]; extern const LocationXYZ16 defaultRightEighthToDiagBoundOffsets[4][4]; extern const LocationXY16 defaultRightEighthToDiagBoundLengths[4][4]; -extern const sint8 defaultEighthToDiagThickness[4][4]; +extern const int8_t defaultEighthToDiagThickness[4][4]; extern const LocationXY16 defaultDiagBoundLengths[4]; extern const LocationXY16 defaultDiagTileOffsets[4]; -extern const uint8 mapLeftEighthTurnToOrthogonal[5]; +extern const uint8_t mapLeftEighthTurnToOrthogonal[5]; extern const size_t mini_golf_peep_animation_lengths[]; bool track_paint_util_has_fence( - enum edge_t edge, LocationXY16 position, const rct_tile_element * tileElement, Ride * ride, uint8 rotation); -void track_paint_util_paint_floor(paint_session * session, uint8 edges, uint32 colourFlags, uint16 height, const uint32 floorSprites[4]); + enum edge_t edge, LocationXY16 position, const rct_tile_element * tileElement, Ride * ride, uint8_t rotation); +void track_paint_util_paint_floor(paint_session * session, uint8_t edges, uint32_t colourFlags, uint16_t height, const uint32_t floorSprites[4]); void track_paint_util_paint_fences( paint_session * session, - uint8 edges, + uint8_t edges, LocationXY16 position, const rct_tile_element * tileElement, Ride * ride, - uint32 colourFlags, - uint16 height, - const uint32 fenceSprites[4], - uint8 rotation); -bool track_paint_util_draw_station_covers(paint_session * session, enum edge_t edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint16 height); -bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint16 height, uint8 stationVariant); + uint32_t colourFlags, + uint16_t height, + const uint32_t fenceSprites[4], + uint8_t rotation); +bool track_paint_util_draw_station_covers(paint_session * session, enum edge_t edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint16_t height); +bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint16_t height, uint8_t stationVariant); void track_paint_util_draw_station_platform( - paint_session * session, Ride * ride, uint8 direction, sint32 height, sint32 zOffset, const rct_tile_element * tileElement); + paint_session * session, Ride * ride, uint8_t direction, int32_t height, int32_t zOffset, const rct_tile_element * tileElement); void track_paint_util_draw_station( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement); void track_paint_util_draw_station_2( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, - sint32 fenceOffsetA, - sint32 fenceOffsetB); + int32_t fenceOffsetA, + int32_t fenceOffsetB); void track_paint_util_draw_station_3( paint_session * session, - uint8 rideIndex, - uint8 direction, - uint16 height, - uint16 coverHeight, + uint8_t rideIndex, + uint8_t direction, + uint16_t height, + uint16_t coverHeight, const rct_tile_element * tileElement); void track_paint_util_draw_station_inverted( paint_session * session, - uint8 rideIndex, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - uint8 stationVariant); + uint8_t stationVariant); bool track_paint_util_should_paint_supports(LocationXY16 position); void track_paint_util_draw_pier( paint_session * session, Ride * ride, const rct_ride_entrance_definition * entranceStyle, LocationXY16 position, - uint8 direction, - sint32 height, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - uint8 rotation); -void track_paint_util_draw_station_metal_supports(paint_session * session, uint8 direction, uint16 height, uint32 colour); -void track_paint_util_draw_station_metal_supports_2(paint_session * session, uint8 direction, uint16 height, uint32 colour, uint8 type); + uint8_t rotation); +void track_paint_util_draw_station_metal_supports(paint_session * session, uint8_t direction, uint16_t height, uint32_t colour); +void track_paint_util_draw_station_metal_supports_2(paint_session * session, uint8_t direction, uint16_t height, uint32_t colour, uint8_t type); -void track_paint_util_right_quarter_turn_5_tiles_paint(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][5], const LocationXY16 offsets[4][5], const LocationXY16 boundsLengths[4][5], const LocationXYZ16 boundsOffsets[4][5]); -void track_paint_util_right_quarter_turn_5_tiles_paint_2(paint_session * session, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5]); -void track_paint_util_right_quarter_turn_5_tiles_paint_3(paint_session * session, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5]); -void track_paint_util_right_quarter_turn_5_tiles_tunnel(paint_session * session, sint16 height, uint8 direction, uint8 trackSequence, uint8 tunnelType); -void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(paint_session * session, sint16 height, uint8 direction, uint8 trackSequence); -void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(paint_session * session, sint16 height, uint8 direction, uint8 trackSequence, uint8 tunnelType0, uint8 tunnelType3); -void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(paint_session * session, sint16 height, uint8 direction, uint8 trackSequence, uint8 tunnelType0, uint8 tunnelType3); -void track_paint_util_right_quarter_turn_3_tiles_paint(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], const LocationXY16 offsets[4][3], const LocationXY16 boundsLengths[4][3], const LocationXYZ16 boundsOffsets[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_paint_2(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], sint32 heightOffset); -void track_paint_util_right_quarter_turn_3_tiles_paint_3(paint_session * session, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_paint_4(paint_session * session, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_tunnel(paint_session * session, sint16 height, uint8 direction, uint8 trackSequence, uint8 tunnelType); -void track_paint_util_left_quarter_turn_3_tiles_paint(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3]); -void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], sint32 heightOffset); -void track_paint_util_left_quarter_turn_3_tiles_tunnel(paint_session * session, sint16 height, uint8 tunnelType, uint8 direction, uint8 trackSequence); -void track_paint_util_left_quarter_turn_1_tile_paint(paint_session * session, sint8 thickness, sint16 height, sint16 boundBoxZOffset, sint32 direction, uint32 colourFlags, const uint32 * sprites); -void track_paint_util_spinning_tunnel_paint(paint_session * session, sint8 thickness, sint16 height, uint8 direction); +void track_paint_util_right_quarter_turn_5_tiles_paint(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][5], const LocationXY16 offsets[4][5], const LocationXY16 boundsLengths[4][5], const LocationXYZ16 boundsOffsets[4][5]); +void track_paint_util_right_quarter_turn_5_tiles_paint_2(paint_session * session, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[][5]); +void track_paint_util_right_quarter_turn_5_tiles_paint_3(paint_session * session, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[][5]); +void track_paint_util_right_quarter_turn_5_tiles_tunnel(paint_session * session, int16_t height, uint8_t direction, uint8_t trackSequence, uint8_t tunnelType); +void track_paint_util_right_quarter_turn_5_tiles_wooden_supports(paint_session * session, int16_t height, uint8_t direction, uint8_t trackSequence); +void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(paint_session * session, int16_t height, uint8_t direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3); +void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(paint_session * session, int16_t height, uint8_t direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3); +void track_paint_util_right_quarter_turn_3_tiles_paint(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3], const LocationXY16 offsets[4][3], const LocationXY16 boundsLengths[4][3], const LocationXYZ16 boundsOffsets[4][3]); +void track_paint_util_right_quarter_turn_3_tiles_paint_2(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3]); +void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3], int32_t heightOffset); +void track_paint_util_right_quarter_turn_3_tiles_paint_3(paint_session * session, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[4][3]); +void track_paint_util_right_quarter_turn_3_tiles_paint_4(paint_session * session, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const sprite_bb sprites[4][3]); +void track_paint_util_right_quarter_turn_3_tiles_tunnel(paint_session * session, int16_t height, uint8_t direction, uint8_t trackSequence, uint8_t tunnelType); +void track_paint_util_left_quarter_turn_3_tiles_paint(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3]); +void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3], int32_t heightOffset); +void track_paint_util_left_quarter_turn_3_tiles_tunnel(paint_session * session, int16_t height, uint8_t tunnelType, uint8_t direction, uint8_t trackSequence); +void track_paint_util_left_quarter_turn_1_tile_paint(paint_session * session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, int32_t direction, uint32_t colourFlags, const uint32_t * sprites); +void track_paint_util_spinning_tunnel_paint(paint_session * session, int8_t thickness, int16_t height, uint8_t direction); void track_paint_util_onride_photo_small_paint( - paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement); + paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement); void track_paint_util_onride_photo_paint( - paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tileElement); -void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * session, const sint8 thickness[2], sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3][2], const LocationXY16 offsets[4][3][2], const LocationXY16 boundsLengths[4][3][2], const LocationXYZ16 boundsOffsets[4][3][2]); -void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * session, const sint8 thickness[2], sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][5][2], const LocationXY16 offsets[4][5][2], const LocationXY16 boundsLengths[4][5][2], const LocationXYZ16 boundsOffsets[4][5][2]); -void track_paint_util_eighth_to_diag_tiles_paint(paint_session * session, const sint8 thickness[4][4], sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][4], const LocationXY16 offsets[4][4], const LocationXY16 boundsLengths[4][4], const LocationXYZ16 boundsOffsets[4][4]); -void track_paint_util_diag_tiles_paint(paint_session * session, sint8 thickness, sint16 height, sint32 direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4], const LocationXY16 offsets[4], const LocationXY16 boundsLengths[4], const LocationXYZ16 boundsOffsets[4]); + paint_session * session, uint8_t direction, int32_t height, const rct_tile_element * tileElement); +void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * session, const int8_t thickness[2], int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][3][2], const LocationXY16 offsets[4][3][2], const LocationXY16 boundsLengths[4][3][2], const LocationXYZ16 boundsOffsets[4][3][2]); +void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * session, const int8_t thickness[2], int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][5][2], const LocationXY16 offsets[4][5][2], const LocationXY16 boundsLengths[4][5][2], const LocationXYZ16 boundsOffsets[4][5][2]); +void track_paint_util_eighth_to_diag_tiles_paint(paint_session * session, const int8_t thickness[4][4], int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4][4], const LocationXY16 offsets[4][4], const LocationXY16 boundsLengths[4][4], const LocationXYZ16 boundsOffsets[4][4]); +void track_paint_util_diag_tiles_paint(paint_session * session, int8_t thickness, int16_t height, int32_t direction, uint8_t trackSequence, uint32_t colourFlags, const uint32_t sprites[4], const LocationXY16 offsets[4], const LocationXY16 boundsLengths[4], const LocationXYZ16 boundsOffsets[4]); -void track_paint_util_left_quarter_turn_1_tile_tunnel(paint_session * session, uint8 direction, uint16 baseHeight, sint8 startOffset, uint8 startTunnel, sint8 endOffset, uint8 endTunnel); -void track_paint_util_right_quarter_turn_1_tile_tunnel(paint_session * session, uint8 direction, uint16 baseHeight, sint8 startOffset, uint8 startTunnel, sint8 endOffset, uint8 endTunnel); +void track_paint_util_left_quarter_turn_1_tile_tunnel(paint_session * session, uint8_t direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel); +void track_paint_util_right_quarter_turn_1_tile_tunnel(paint_session * session, uint8_t direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel); -void track_paint_util_right_vertical_loop_segments(paint_session * session, uint8 direction, uint8 trackSequence); +void track_paint_util_right_vertical_loop_segments(paint_session * session, uint8_t direction, uint8_t trackSequence); -void track_paint_util_left_corkscrew_up_supports(paint_session * session, uint8 direction, uint16 height); +void track_paint_util_left_corkscrew_up_supports(paint_session * session, uint8_t direction, uint16_t height); using TRACK_PAINT_FUNCTION = void (*)( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement); -using TRACK_PAINT_FUNCTION_GETTER = TRACK_PAINT_FUNCTION (*)(sint32 trackType, sint32 direction); +using TRACK_PAINT_FUNCTION_GETTER = TRACK_PAINT_FUNCTION (*)(int32_t trackType, int32_t direction); -TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_monorail(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_boat_hire(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_car_ride(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_maze(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_spiral_slide(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_go_karts(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_dodgems(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_pirate_ship(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_swinging_inverter_ship(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_ferris_wheel(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_motionsimulator(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_topspin(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_space_rings(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_lift(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_shop(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_merry_go_round(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_facility(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_twist(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_haunted_house(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_circus_show(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_ghost_train(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_mini_helicopters(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_flying_saucers(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_crooked_house(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_monorail_cycles(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(sint32 trackType, sint32 direction); -TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(sint32 trackType, sint32 direction); +TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_monorail(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_boat_hire(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_car_ride(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_maze(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_spiral_slide(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_go_karts(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_dodgems(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_pirate_ship(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_swinging_inverter_ship(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_ferris_wheel(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_motionsimulator(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_topspin(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_space_rings(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_lift(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_shop(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_merry_go_round(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_facility(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_twist(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_haunted_house(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_circus_show(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_ghost_train(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_wooden_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_mini_helicopters(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_flying_saucers(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_crooked_house(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_monorail_cycles(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(int32_t trackType, int32_t direction); +TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(int32_t trackType, int32_t direction); #endif diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index b9a69e2f17..a1dbca73ef 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -73,13 +73,13 @@ static void vehicle_update_waiting_for_cable_lift(rct_vehicle * vehicle); static void vehicle_update_travelling_cable_lift(rct_vehicle * vehicle); static void vehicle_update_crash_setup(rct_vehicle * vehicle); static void vehicle_update_collision_setup(rct_vehicle * vehicle); -static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle); +static int32_t vehicle_update_motion_dodgems(rct_vehicle * vehicle); static void vehicle_update_additional_animation(rct_vehicle * vehicle); -static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sint16 x, sint16 y, sint16 z, - uint16 * otherVehicleIndex); -static sint32 vehicle_get_sound_priority_factor(rct_vehicle* vehicle); +static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, int16_t x, int16_t y, int16_t z, + uint16_t * otherVehicleIndex); +static int32_t vehicle_get_sound_priority_factor(rct_vehicle* vehicle); static void vehicle_update_sound(rct_vehicle * vehicle); -static sint32 vehicle_update_scream_sound(rct_vehicle * vehicle); +static int32_t vehicle_update_scream_sound(rct_vehicle * vehicle); static void vehicle_kill_all_passengers(rct_vehicle * vehicle); static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle); @@ -94,26 +94,26 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle); rct_vehicle * gCurrentVehicle; -static uint8 _vehicleBreakdown; -uint8 _vehicleStationIndex; -uint32 _vehicleMotionTrackFlags; -sint32 _vehicleVelocityF64E08; -sint32 _vehicleVelocityF64E0C; -sint32 _vehicleUnkF64E10; -uint8 _vehicleVAngleEndF64E36; -uint8 _vehicleBankEndF64E37; -uint8 _vehicleF64E2C; +static uint8_t _vehicleBreakdown; +uint8_t _vehicleStationIndex; +uint32_t _vehicleMotionTrackFlags; +int32_t _vehicleVelocityF64E08; +int32_t _vehicleVelocityF64E0C; +int32_t _vehicleUnkF64E10; +uint8_t _vehicleVAngleEndF64E36; +uint8_t _vehicleBankEndF64E37; +uint8_t _vehicleF64E2C; rct_vehicle * _vehicleFrontVehicle; LocationXYZ16 unk_F64E20; // clang-format off -static constexpr const uint8 byte_9A3A14[] = { SOUND_SCREAM_8, SOUND_SCREAM_1 }; -static constexpr const uint8 byte_9A3A16[] = { SOUND_SCREAM_1, SOUND_SCREAM_6 }; -static constexpr const uint8 byte_9A3A18[] = { +static constexpr const uint8_t byte_9A3A14[] = { SOUND_SCREAM_8, SOUND_SCREAM_1 }; +static constexpr const uint8_t byte_9A3A16[] = { SOUND_SCREAM_1, SOUND_SCREAM_6 }; +static constexpr const uint8_t byte_9A3A18[] = { SOUND_SCREAM_3, SOUND_SCREAM_1, SOUND_SCREAM_5, SOUND_SCREAM_6, SOUND_SCREAM_7, SOUND_SCREAM_2, SOUND_SCREAM_4 }; -static constexpr const uint8 _soundParams[SOUND_MAXID][2] = +static constexpr const uint8_t _soundParams[SOUND_MAXID][2] = { { 1, 0 }, // SOUND_LIFT_1 { 1, 0 }, // SOUND_TRACK_FRICTION_1 @@ -180,7 +180,7 @@ static constexpr const uint8 _soundParams[SOUND_MAXID][2] = { 0, 0 } // SOUND_62 }; -static constexpr const uint8 SpaceRingsTimeToSpriteMap[] = +static constexpr const uint8_t SpaceRingsTimeToSpriteMap[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, @@ -314,7 +314,7 @@ static constexpr const uint8 SpaceRingsTimeToSpriteMap[] = 255 }; -static constexpr const sint8 SwingingTimeToSpriteMap_0[] = +static constexpr const int8_t SwingingTimeToSpriteMap_0[] = { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, @@ -322,7 +322,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_0[] = -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_1[] = +static constexpr const int8_t SwingingTimeToSpriteMap_1[] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, @@ -330,7 +330,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_1[] = -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -1, -1, -1, -1, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_2[] = +static constexpr const int8_t SwingingTimeToSpriteMap_2[] = { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, @@ -339,7 +339,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_2[] = -6, -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_3[] = +static constexpr const int8_t SwingingTimeToSpriteMap_3[] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, @@ -348,7 +348,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_3[] = -9, -8, -8, -8, -8, -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -5, -5, -5, -5, -4, -4, -4, -3, -3, -2, -2, -1, -1, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_4[] = +static constexpr const int8_t SwingingTimeToSpriteMap_4[] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, @@ -359,7 +359,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_4[] = -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_5[] = +static constexpr const int8_t SwingingTimeToSpriteMap_5[] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, @@ -374,7 +374,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_5[] = -11, -11, -11, -10, -10, -10, -10, -9, -9, -9, -9, -8, -8, -8, -8, -7, -7, -7, -7, -6, -6, -6, -6, -5, -5, -5, -5, -4, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_6[] = +static constexpr const int8_t SwingingTimeToSpriteMap_6[] = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, @@ -392,7 +392,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_6[] = -13, -13, -12, -12, -12, -11, -11, -11, -10, -10, -10, -9, -9, -9, -8, -8, -8, -7, -7, -7, -6, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_7[] = +static constexpr const int8_t SwingingTimeToSpriteMap_7[] = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, @@ -404,7 +404,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_7[] = -14, -14, -13, -13, -13, -12, -12, -12, -11, -11, -11, -10, -10, -10, -9, -9, -9, -8, -8, -8, -7, -7, -7, -6, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_8[] = +static constexpr const int8_t SwingingTimeToSpriteMap_8[] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, @@ -415,7 +415,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_8[] = 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_9[] = +static constexpr const int8_t SwingingTimeToSpriteMap_9[] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, @@ -426,7 +426,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_9[] = 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_10[] = +static constexpr const int8_t SwingingTimeToSpriteMap_10[] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, @@ -442,7 +442,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_10[] = 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 0, 0, -128 }; -static constexpr const sint8 SwingingTimeToSpriteMap_11[] = +static constexpr const int8_t SwingingTimeToSpriteMap_11[] = { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, @@ -452,7 +452,7 @@ static constexpr const sint8 SwingingTimeToSpriteMap_11[] = }; /** rct2: 0x0099F9D0 */ -static constexpr const sint8 * SwingingTimeToSpriteMaps[] = { +static constexpr const int8_t * SwingingTimeToSpriteMaps[] = { SwingingTimeToSpriteMap_0, SwingingTimeToSpriteMap_1, SwingingTimeToSpriteMap_2, @@ -469,9 +469,9 @@ static constexpr const sint8 * SwingingTimeToSpriteMaps[] = { struct unk_9a36c4 { - sint16 x; - sint16 y; - uint32 distance; + int16_t x; + int16_t y; + uint32_t distance; }; /** rct2: 0x009A36C4 */ @@ -526,7 +526,7 @@ static constexpr const LocationXY16 Unk9A37C4[] = }; /** rct2: 0x009A37E4 */ -static constexpr const sint32 Unk9A37E4[] = +static constexpr const int32_t Unk9A37E4[] = { 2147483647, 2106585154, @@ -591,7 +591,7 @@ static constexpr const sint32 Unk9A37E4[] = }; /** rct2: 0x009A38D4 */ -static constexpr const sint32 Unk9A38D4[] = +static constexpr const int32_t Unk9A38D4[] = { 0, 417115092, @@ -656,7 +656,7 @@ static constexpr const sint32 Unk9A38D4[] = }; /** rct2: 0x009A39C4 */ -static constexpr const sint32 Unk9A39C4[] = +static constexpr const int32_t Unk9A39C4[] = { 2147483647, 2096579710, @@ -689,13 +689,13 @@ static constexpr const LocationXY16 AvoidCollisionMoveOffset[] = }; -static constexpr const uint8 DoorOpenSoundIds[] = +static constexpr const uint8_t DoorOpenSoundIds[] = { SOUND_DOOR_OPEN, SOUND_62 }; -static constexpr const uint8 DoorCloseSoundIds[] = +static constexpr const uint8_t DoorCloseSoundIds[] = { SOUND_DOOR_CLOSE, SOUND_62 @@ -703,7 +703,7 @@ static constexpr const uint8 DoorCloseSoundIds[] = static const struct { - sint8 x, y, z; + int8_t x, y, z; } SteamParticleOffsets[] = { { -11, 0, 22 }, @@ -758,13 +758,13 @@ static const struct // clang-format on -static bool vehicle_move_info_valid(sint32 cd, sint32 typeAndDirection, sint32 offset) +static bool vehicle_move_info_valid(int32_t cd, int32_t typeAndDirection, int32_t offset) { - if (cd >= static_cast(Util::CountOf(gTrackVehicleInfo))) + if (cd >= static_cast(Util::CountOf(gTrackVehicleInfo))) { return false; } - sint32 size = 0; + int32_t size = 0; switch (cd) { case 0: @@ -808,7 +808,7 @@ static bool vehicle_move_info_valid(sint32 cd, sint32 typeAndDirection, sint32 o return true; } -const rct_vehicle_info * vehicle_get_move_info(sint32 cd, sint32 typeAndDirection, sint32 offset) +const rct_vehicle_info * vehicle_get_move_info(int32_t cd, int32_t typeAndDirection, int32_t offset) { if (!vehicle_move_info_valid(cd, typeAndDirection, offset)) { @@ -818,7 +818,7 @@ const rct_vehicle_info * vehicle_get_move_info(sint32 cd, sint32 typeAndDirectio return &gTrackVehicleInfo[cd][typeAndDirection]->info[offset]; } -uint16 vehicle_get_move_info_size(sint32 cd, sint32 typeAndDirection) +uint16_t vehicle_get_move_info_size(int32_t cd, int32_t typeAndDirection) { if (!vehicle_move_info_valid(cd, typeAndDirection, 0)) { @@ -827,7 +827,7 @@ uint16 vehicle_get_move_info_size(sint32 cd, sint32 typeAndDirection) return gTrackVehicleInfo[cd][typeAndDirection]->size; } -rct_vehicle * try_get_vehicle(uint16 spriteIndex) +rct_vehicle * try_get_vehicle(uint16_t spriteIndex) { rct_sprite * sprite = try_get_sprite(spriteIndex); if (sprite == nullptr) @@ -842,9 +842,9 @@ static void vehicle_invalidate(rct_vehicle * vehicle) invalidate_sprite_2((rct_sprite *)vehicle); } -static sint32 get_train_mass(rct_vehicle * first_vehicle) +static int32_t get_train_mass(rct_vehicle * first_vehicle) { - sint32 totalMass = 0; + int32_t totalMass = 0; for (rct_vehicle * vehicle = first_vehicle; vehicle != nullptr;) @@ -878,10 +878,10 @@ static void vehicle_update_sound_params(rct_vehicle * vehicle) if (vehicle->sprite_left == LOCATION_NULL) return; - sint16 left = g_music_tracking_viewport->view_x; - sint16 bottom = g_music_tracking_viewport->view_y; - sint16 quarter_w = g_music_tracking_viewport->view_width / 4; - sint16 quarter_h = g_music_tracking_viewport->view_height / 4; + int16_t left = g_music_tracking_viewport->view_x; + int16_t bottom = g_music_tracking_viewport->view_y; + int16_t quarter_w = g_music_tracking_viewport->view_width / 4; + int16_t quarter_h = g_music_tracking_viewport->view_height / 4; if (window_get_classification(gWindowAudioExclusive) == WC_MAIN_WINDOW) { @@ -892,8 +892,8 @@ static void vehicle_update_sound_params(rct_vehicle * vehicle) if (left >= vehicle->sprite_right || bottom >= vehicle->sprite_bottom) return; - sint16 right = g_music_tracking_viewport->view_width + left; - sint16 top = g_music_tracking_viewport->view_height + bottom; + int16_t right = g_music_tracking_viewport->view_width + left; + int16_t top = g_music_tracking_viewport->view_height + bottom; if (window_get_classification(gWindowAudioExclusive) == WC_MAIN_WINDOW) { @@ -904,7 +904,7 @@ static void vehicle_update_sound_params(rct_vehicle * vehicle) if (right < vehicle->sprite_left || top < vehicle->sprite_top) return; - uint16 sound_priority = vehicle_get_sound_priority_factor(vehicle); + uint16_t sound_priority = vehicle_get_sound_priority_factor(vehicle); rct_vehicle_sound_params * soundParam; // Find a sound param of lower priority to use for (soundParam = &gVehicleSoundParamsList[0]; @@ -930,31 +930,31 @@ static void vehicle_update_sound_params(rct_vehicle * vehicle) } soundParam->priority = sound_priority; - sint32 pan_x = + int32_t pan_x = (vehicle->sprite_left / 2) + (vehicle->sprite_right / 2) - g_music_tracking_viewport->view_x; pan_x >>= g_music_tracking_viewport->zoom; pan_x += g_music_tracking_viewport->x; - uint16 screenwidth = context_get_width(); + uint16_t screenwidth = context_get_width(); if (screenwidth < 64) { screenwidth = 64; } soundParam->pan_x = ((((pan_x * 65536) / screenwidth) - 0x8000) >> 4); - sint32 pan_y = + int32_t pan_y = (vehicle->sprite_top / 2) + (vehicle->sprite_bottom / 2) - g_music_tracking_viewport->view_y; pan_y >>= g_music_tracking_viewport->zoom; pan_y += g_music_tracking_viewport->y; - uint16 screenheight = context_get_height(); + uint16_t screenheight = context_get_height(); if (screenheight < 64) { screenheight = 64; } soundParam->pan_y = ((((pan_y * 65536) / screenheight) - 0x8000) >> 4); - sint32 frequency = std::abs(vehicle->velocity); + int32_t frequency = std::abs(vehicle->velocity); rct_ride_entry * ride_type = get_ride_entry(vehicle->ride_subtype); if (ride_type != nullptr) @@ -970,7 +970,7 @@ static void vehicle_update_sound_params(rct_vehicle * vehicle) frequency >>= 14; frequency += 11025; frequency += 16 * vehicle->sound_vector_factor; - soundParam->frequency = (uint16)frequency; + soundParam->frequency = (uint16_t)frequency; soundParam->id = vehicle->sprite_index; soundParam->volume = 0; @@ -990,10 +990,10 @@ static void vehicle_update_sound_params(rct_vehicle * vehicle) * * rct2: 0x006BC2F3 */ -static sint32 vehicle_get_sound_priority_factor(rct_vehicle * vehicle) +static int32_t vehicle_get_sound_priority_factor(rct_vehicle * vehicle) { - sint32 mass = get_train_mass(vehicle); - sint32 result = mass + (std::abs(vehicle->velocity) >> 13); + int32_t mass = get_train_mass(vehicle); + int32_t result = mass + (std::abs(vehicle->velocity) >> 13); rct_vehicle_sound * vehicle_sound = &gVehicleSoundList[0]; while (vehicle_sound->id != vehicle->sprite_index) @@ -1028,44 +1028,44 @@ static void vehicle_sounds_update_window_setup() g_music_tracking_viewport = viewport; gWindowAudioExclusive = window; - const uint8 ZoomToVolume[MAX_ZOOM_LEVEL + 1] = { 0, 35, 70, 70 }; + const uint8_t ZoomToVolume[MAX_ZOOM_LEVEL + 1] = { 0, 35, 70, 70 }; gVolumeAdjustZoom = ZoomToVolume[viewport->zoom]; } -static uint8 vehicle_sounds_update_get_pan_volume(rct_vehicle_sound_params * sound_params) +static uint8_t vehicle_sounds_update_get_pan_volume(rct_vehicle_sound_params * sound_params) { - uint8 vol1 = 0xFF; - uint8 vol2 = 0xFF; + uint8_t vol1 = 0xFF; + uint8_t vol2 = 0xFF; - sint16 pan_y = std::abs(sound_params->pan_y); - pan_y = std::min((sint16)0xFFF, pan_y); + int16_t pan_y = std::abs(sound_params->pan_y); + pan_y = std::min((int16_t)0xFFF, pan_y); pan_y -= 0x800; if (pan_y > 0) { pan_y = (0x400 - pan_y) / 4; vol1 = LOBYTE(pan_y); - if ((sint8)HIBYTE(pan_y) != 0) + if ((int8_t)HIBYTE(pan_y) != 0) { vol1 = 0xFF; - if ((sint8)HIBYTE(pan_y) < 0) + if ((int8_t)HIBYTE(pan_y) < 0) { vol1 = 0; } } } - sint16 pan_x = std::abs(sound_params->pan_x); - pan_x = std::min((sint16)0xFFF, pan_x); + int16_t pan_x = std::abs(sound_params->pan_x); + pan_x = std::min((int16_t)0xFFF, pan_x); pan_x -= 0x800; if (pan_x > 0) { pan_x = (0x400 - pan_x) / 4; vol2 = LOBYTE(pan_x); - if ((sint8)HIBYTE(pan_x) != 0) + if ((int8_t)HIBYTE(pan_x) != 0) { vol2 = 0xFF; - if ((sint8)HIBYTE(pan_x) < 0) + if ((int8_t)HIBYTE(pan_x) < 0) { vol2 = 0; } @@ -1113,9 +1113,9 @@ static rct_vehicle_sound * vehicle_sounds_update_get_vehicle_sound(rct_vehicle_s } // Track Noises -static void vehicle_sounds_update_sound_1(rct_vehicle * vehicle, rct_vehicle_sound_params * sound_params, rct_vehicle_sound * sound, uint8 panVol) +static void vehicle_sounds_update_sound_1(rct_vehicle * vehicle, rct_vehicle_sound_params * sound_params, rct_vehicle_sound * sound, uint8_t panVol) { - sint32 volume = vehicle->sound1_volume; + int32_t volume = vehicle->sound1_volume; volume *= panVol; volume = volume / 8; volume = std::max(volume - 0x1FFF, -10000); @@ -1143,13 +1143,13 @@ static void vehicle_sounds_update_sound_1(rct_vehicle * vehicle, rct_vehicle_sou sound->sound1_pan = sound_params->pan_x; sound->sound1_volume = volume; sound->sound1_freq = sound_params->frequency; - uint16 frequency = sound_params->frequency; + uint16_t frequency = sound_params->frequency; if (_soundParams[vehicle->sound1_id][1] & 2) { frequency = (frequency / 2) + 4000; } - uint8 looping = _soundParams[vehicle->sound1_id][0]; - sint32 pan = sound_params->pan_x; + uint8_t looping = _soundParams[vehicle->sound1_id][0]; + int32_t pan = sound_params->pan_x; sound->sound1_channel = Mixer_Play_Effect(vehicle->sound1_id, looping ? MIXER_LOOP_INFINITE : MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(pan), DStoMixerRate(frequency), 0); @@ -1168,7 +1168,7 @@ static void vehicle_sounds_update_sound_1(rct_vehicle * vehicle, rct_vehicle_sou if (!(gCurrentTicks & 3) && sound_params->frequency != sound->sound1_freq) { sound->sound1_freq = sound_params->frequency; - uint16 frequency = sound_params->frequency; + uint16_t frequency = sound_params->frequency; if (_soundParams[vehicle->sound1_id][1] & 2) { frequency = (frequency / 2) + 4000; @@ -1178,9 +1178,9 @@ static void vehicle_sounds_update_sound_1(rct_vehicle * vehicle, rct_vehicle_sou } // Other noises (e.g. Screams) -static void vehicle_sounds_update_sound_2(rct_vehicle * vehicle, rct_vehicle_sound_params * sound_params, rct_vehicle_sound * sound, uint8 panVol) +static void vehicle_sounds_update_sound_2(rct_vehicle * vehicle, rct_vehicle_sound_params * sound_params, rct_vehicle_sound * sound, uint8_t panVol) { - sint32 volume = vehicle->sound2_volume; + int32_t volume = vehicle->sound2_volume; volume *= panVol; volume = volume / 8; volume = std::max(volume - 0x1FFF, -10000); @@ -1208,15 +1208,15 @@ static void vehicle_sounds_update_sound_2(rct_vehicle * vehicle, rct_vehicle_sou sound->sound2_pan = sound_params->pan_x; sound->sound2_volume = volume; sound->sound2_freq = sound_params->frequency; - uint16 frequency = sound_params->frequency; + uint16_t frequency = sound_params->frequency; if (_soundParams[vehicle->sound2_id][1] & 1) { frequency = 12649; } frequency = std::min((frequency * 2) - 3248, 25700); - uint8 looping = _soundParams[vehicle->sound2_id][0]; - sint32 pan = sound_params->pan_x; + uint8_t looping = _soundParams[vehicle->sound2_id][0]; + int32_t pan = sound_params->pan_x; sound->sound2_channel = Mixer_Play_Effect(vehicle->sound2_id, looping ? MIXER_LOOP_INFINITE : MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(pan), DStoMixerRate(frequency), 0); @@ -1237,7 +1237,7 @@ static void vehicle_sounds_update_sound_2(rct_vehicle * vehicle, rct_vehicle_sou sound->sound2_freq = sound_params->frequency; if (!(_soundParams[vehicle->sound2_id][1] & 1)) { - uint16 frequency = (sound_params->frequency * 2) - 3248; + uint16_t frequency = (sound_params->frequency * 2) - 3248; if (frequency > 25700) { frequency = 25700; @@ -1259,7 +1259,7 @@ void vehicle_sounds_update() vehicle_sounds_update_window_setup(); gVehicleSoundParamsListEnd = &gVehicleSoundParamsList[0]; - for (uint16 i = gSpriteListHead[SPRITE_LIST_TRAIN]; i != SPRITE_INDEX_NULL; i = get_sprite(i)->vehicle.next) + for (uint16_t i = gSpriteListHead[SPRITE_LIST_TRAIN]; i != SPRITE_INDEX_NULL; i = get_sprite(i)->vehicle.next) { vehicle_update_sound_params(&get_sprite(i)->vehicle); } @@ -1299,7 +1299,7 @@ void vehicle_sounds_update() vehicleSoundParams < gVehicleSoundParamsListEnd; vehicleSoundParams++) { - uint8 panVol = vehicle_sounds_update_get_pan_volume(vehicleSoundParams); + uint8_t panVol = vehicle_sounds_update_get_pan_volume(vehicleSoundParams); rct_vehicle_sound * vehicleSound = vehicle_sounds_update_get_vehicle_sound(vehicleSoundParams); // No free vehicle sound slots (RCT2 corrupts the pointer here) @@ -1307,7 +1307,7 @@ void vehicle_sounds_update() continue; // Move the Sound Volume towards the SoundsParam Volume - sint32 tempvolume = vehicleSound->volume; + int32_t tempvolume = vehicleSound->volume; if (tempvolume != vehicleSoundParams->volume) { if (tempvolume < vehicleSoundParams->volume) @@ -1334,7 +1334,7 @@ void vehicle_sounds_update() */ void vehicle_update_all() { - uint16 sprite_index; + uint16_t sprite_index; rct_vehicle * vehicle; if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) @@ -1362,7 +1362,7 @@ static bool vehicle_close_restraints(rct_vehicle * vehicle) { Ride * ride = get_ride(vehicle->ride); bool restraintsClosed = true; - uint16 vehicle_id = vehicle->sprite_index; + uint16_t vehicle_id = vehicle->sprite_index; do { @@ -1412,8 +1412,8 @@ static bool vehicle_close_restraints(rct_vehicle * vehicle) */ static bool vehicle_open_restraints(rct_vehicle * vehicle) { - sint32 restraintsOpen = true; - uint16 vehicle_id = vehicle->sprite_index; + int32_t restraintsOpen = true; + uint16_t vehicle_id = vehicle->sprite_index; do { @@ -1451,7 +1451,7 @@ static bool vehicle_open_restraints(rct_vehicle * vehicle) // Note will look odd if spinning right. vehicle->spin_speed = VEHICLE_STOPPING_SPIN_SPEED; } - sint16 value = vehicle->spin_speed / 256; + int16_t value = vehicle->spin_speed / 256; vehicle->spin_sprite += value; vehicle->spin_speed -= value; @@ -1536,16 +1536,16 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) return; } - uint8 stationId = ride->current_test_station; + uint8_t stationId = ride->current_test_station; if (!ride_get_entrance_location(ride, stationId).isNull()) { - uint8 test_segment = ride->current_test_segment; + uint8_t test_segment = ride->current_test_segment; ride->average_speed_test_timeout++; if (ride->average_speed_test_timeout >= 32) ride->average_speed_test_timeout = 0; - sint32 velocity = abs(vehicle->velocity); + int32_t velocity = abs(vehicle->velocity); if (velocity > ride->max_speed) { ride->max_speed = velocity; @@ -1553,19 +1553,19 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) if (ride->average_speed_test_timeout == 0 && velocity > 0x8000) { - ride->average_speed = add_clamp_sint32(ride->average_speed, velocity); + ride->average_speed = add_clamp_int32_t(ride->average_speed, velocity); ride->time[test_segment]++; } - sint32 distance = abs(((vehicle->velocity + vehicle->acceleration) >> 10) * 42); + int32_t distance = abs(((vehicle->velocity + vehicle->acceleration) >> 10) * 42); if (vehicle->var_CE == 0) { - ride->length[test_segment] = add_clamp_sint32(ride->length[test_segment], distance); + ride->length[test_segment] = add_clamp_int32_t(ride->length[test_segment], distance); } if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_G_FORCES)) { - sint32 vertical_g, lateral_g; + int32_t vertical_g, lateral_g; vehicle_get_g_forces(vehicle, &vertical_g, &lateral_g); vertical_g += ride->previous_vertical_g; @@ -1595,7 +1595,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) } // If we have already evaluated this track piece skip to next section - uint16 map_location = (vehicle->track_x / 32) | ((vehicle->track_y / 32) << 8); + uint16_t map_location = (vehicle->track_x / 32) | ((vehicle->track_y / 32) << 8); if (vehicle->track_z / 8 != ride->cur_test_track_z || map_location != ride->cur_test_track_location.xy) { ride->cur_test_track_z = vehicle->track_z / 8; @@ -1604,7 +1604,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) if (ride_get_entrance_location(ride, ride->current_test_station).isNull()) return; - uint16 track_elem_type = vehicle->track_type / 4; + uint16_t track_elem_type = vehicle->track_type / 4; if (track_elem_type == TRACK_ELEM_POWERED_LIFT || (vehicle->update_flags & VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) { if (!(ride->testing_flags & RIDE_TESTING_POWERED_LIFT)) @@ -1650,9 +1650,9 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) } // ax - uint16 track_flags = TrackFlags[track_elem_type]; + uint16_t track_flags = TrackFlags[track_elem_type]; - uint32 testing_flags = ride->testing_flags; + uint32_t testing_flags = ride->testing_flags; if (testing_flags & RIDE_TESTING_TURN_LEFT && track_flags & TRACK_ELEM_FLAG_TURN_LEFT) { // 0x800 as this is masked to CURRENT_TURN_COUNT_MASK @@ -1669,7 +1669,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) ride->testing_flags &= ~(RIDE_TESTING_TURN_LEFT | RIDE_TESTING_TURN_RIGHT | RIDE_TESTING_TURN_BANKED | RIDE_TESTING_TURN_SLOPED); - uint8 turn_type = 1; + uint8_t turn_type = 1; if (!(testing_flags & RIDE_TESTING_TURN_BANKED)) { turn_type = 2; @@ -1733,13 +1733,13 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) { ride->testing_flags &= ~RIDE_TESTING_DROP_DOWN; - sint16 z = vehicle->z / 8 - ride->start_drop_height; + int16_t z = vehicle->z / 8 - ride->start_drop_height; if (z < 0) { z = abs(z); if (z > ride->highest_drop_height) { - ride->highest_drop_height = (uint8)z; + ride->highest_drop_height = (uint8_t)z; } } } @@ -1749,7 +1749,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) ride->testing_flags &= ~RIDE_TESTING_DROP_UP; ride->testing_flags |= RIDE_TESTING_DROP_DOWN; - uint8 drops = ride->drops & 0x3F; + uint8_t drops = ride->drops & 0x3F; if (drops != 0x3F) drops++; ride->drops &= ~0x3F; @@ -1765,13 +1765,13 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) { ride->testing_flags &= ~RIDE_TESTING_DROP_UP; - sint16 z = vehicle->z / 8 - ride->start_drop_height; + int16_t z = vehicle->z / 8 - ride->start_drop_height; if (z < 0) { z = abs(z); if (z > ride->highest_drop_height) { - ride->highest_drop_height = (uint8)z; + ride->highest_drop_height = (uint8_t)z; } } } @@ -1781,7 +1781,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) ride->testing_flags &= ~RIDE_TESTING_DROP_DOWN; ride->testing_flags |= RIDE_TESTING_DROP_UP; - uint8 drops = ride->drops & 0x3F; + uint8_t drops = ride->drops & 0x3F; if (drops != 0x3F) drops++; ride->drops &= ~0x3F; @@ -1792,7 +1792,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) if (track_flags & TRACK_ELEM_FLAG_NORMAL_TO_INVERSION) { - uint8 inversions = ride->inversions & 0x1F; + uint8_t inversions = ride->inversions & 0x1F; if (inversions != 0x1F) inversions++; @@ -1802,7 +1802,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) if (track_flags & TRACK_ELEM_FLAG_HELIX) { - uint8 helixes = ride_get_helix_sections(ride); + uint8_t helixes = ride_get_helix_sections(ride); if (helixes != 0x1F) helixes++; @@ -1814,7 +1814,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) if (ride_get_entrance_location(ride, ride->current_test_station).isNull()) return; - sint16 x, y, z; + int16_t x, y, z; x = vehicle->x; y = vehicle->y; z = vehicle->z; @@ -1875,7 +1875,7 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) { ride->testing_flags |= RIDE_TESTING_SHELTERED; - uint8 num_sheltered_sections = ride->num_sheltered_sections & 0x1F; + uint8_t num_sheltered_sections = ride->num_sheltered_sections & 0x1F; if (num_sheltered_sections != 0x1F) num_sheltered_sections++; ride->num_sheltered_sections &= ~0x1F; @@ -1892,14 +1892,14 @@ static void vehicle_update_measurements(rct_vehicle * vehicle) } } - sint32 distance = ((vehicle->velocity + vehicle->acceleration) >> 10) * 42; + int32_t distance = ((vehicle->velocity + vehicle->acceleration) >> 10) * 42; if (distance < 0) return; - ride->sheltered_length = add_clamp_sint32(ride->sheltered_length, distance); + ride->sheltered_length = add_clamp_int32_t(ride->sheltered_length, distance); } -static uint16 sub_6D7AC0(sint32 currentSoundId, sint32 currentVolume, sint32 targetSoundId, sint32 targetVolume) +static uint16_t sub_6D7AC0(int32_t currentSoundId, int32_t currentVolume, int32_t targetSoundId, int32_t targetVolume) { if (currentSoundId != 255) { @@ -2041,7 +2041,7 @@ static void vehicle_update(rct_vehicle * vehicle) static void vehicle_update_moving_to_end_of_station(rct_vehicle * vehicle) { Ride * ride = get_ride(vehicle->ride); - sint32 flags, station; + int32_t flags, station; switch (ride->mode) { @@ -2151,7 +2151,7 @@ static void vehicle_update_moving_to_end_of_station(rct_vehicle * vehicle) * * rct2: 0x006D7FB4 */ -static void train_ready_to_depart(rct_vehicle * vehicle, uint8 num_peeps_on_train, uint8 num_used_seats) +static void train_ready_to_depart(rct_vehicle * vehicle, uint8_t num_peeps_on_train, uint8_t num_used_seats) { if (num_peeps_on_train != num_used_seats) @@ -2180,7 +2180,7 @@ static void train_ready_to_depart(rct_vehicle * vehicle, uint8 num_peeps_on_trai if (ride->mode == RIDE_MODE_FORWARD_ROTATION || ride->mode == RIDE_MODE_BACKWARD_ROTATION) { - uint8 peep = ((-vehicle->vehicle_sprite_type) / 8) & 0xF; + uint8_t peep = ((-vehicle->vehicle_sprite_type) / 8) & 0xF; if (vehicle->peep[peep] != SPRITE_INDEX_NULL) { ride->train_at_station[vehicle->current_station] = 0xFF; @@ -2207,9 +2207,9 @@ static void train_ready_to_depart(rct_vehicle * vehicle, uint8 num_peeps_on_trai vehicle_invalidate_window(vehicle); } -static int ride_get_train_index_from_vehicle(Ride * ride, uint16 spriteIndex) +static int ride_get_train_index_from_vehicle(Ride * ride, uint16_t spriteIndex) { - uint32 trainIndex = 0; + uint32_t trainIndex = 0; while (ride->vehicles[trainIndex] != spriteIndex) { trainIndex++; @@ -2274,9 +2274,9 @@ static void vehicle_update_waiting_for_passengers(rct_vehicle * vehicle) vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART; // 0xF64E31, 0xF64E32, 0xF64E33 - uint8 num_peeps_on_train = 0, num_used_seats_on_train = 0, num_seats_on_train = 0; + uint8_t num_peeps_on_train = 0, num_used_seats_on_train = 0, num_seats_on_train = 0; - for (uint16 sprite_id = vehicle->sprite_index; sprite_id != SPRITE_INDEX_NULL;) + for (uint16_t sprite_id = vehicle->sprite_index; sprite_id != SPRITE_INDEX_NULL;) { rct_vehicle * train_vehicle = GET_VEHICLE(sprite_id); @@ -2362,14 +2362,14 @@ static void vehicle_update_waiting_for_passengers(rct_vehicle * vehicle) return; } - uint8 load = ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD_MASK; + uint8_t load = ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD_MASK; if (load == 3) { train_ready_to_depart(vehicle, num_peeps_on_train, num_used_seats_on_train); return; } - uint8 three_quater_seats = (3 * num_seats_on_train) / 4; + uint8_t three_quater_seats = (3 * num_seats_on_train) / 4; if (three_quater_seats != 0 && num_peeps_on_train >= three_quater_seats) { vehicle->update_flags |= VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART; @@ -2508,7 +2508,7 @@ static void vehicle_update_waiting_to_depart(rct_vehicle * vehicle) { if (ride->mode == RIDE_MODE_FORWARD_ROTATION || ride->mode == RIDE_MODE_BACKWARD_ROTATION) { - uint8 seat = ((-vehicle->vehicle_sprite_type) >> 3) & 0xF; + uint8_t seat = ((-vehicle->vehicle_sprite_type) >> 3) & 0xF; if (vehicle->peep[seat * 2] == SPRITE_INDEX_NULL) { if (vehicle->num_peeps == 0) @@ -2529,7 +2529,7 @@ static void vehicle_update_waiting_to_depart(rct_vehicle * vehicle) } else { - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; for (rct_vehicle * curVehicle; spriteId != SPRITE_INDEX_NULL; spriteId = curVehicle->next_vehicle_on_train) { curVehicle = GET_VEHICLE(spriteId); @@ -2575,15 +2575,15 @@ static void vehicle_update_waiting_to_depart(rct_vehicle * vehicle) if (ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) { CoordsXYE track; - sint32 z; - sint32 direction; + int32_t z; + int32_t direction; if (track_block_get_next_from_zero( vehicle->track_x, vehicle->track_y, vehicle->track_z, vehicle->ride, - (uint8)(vehicle->track_direction & 0x3), + (uint8_t)(vehicle->track_direction & 0x3), &track, &z, &direction, @@ -2728,9 +2728,9 @@ static void vehicle_update_waiting_to_depart(rct_vehicle * vehicle) #pragma pack(push, 1) struct rct_synchronised_vehicle { - uint8 ride_id; - uint8 station_id; - uint16 vehicle_id; + uint8_t ride_id; + uint8_t station_id; + uint16_t vehicle_id; }; assert_struct_size(rct_synchronised_vehicle, 4); #pragma pack(pop) @@ -2747,7 +2747,7 @@ static rct_synchronised_vehicle * _lastSynchronisedVehicle = nullptr; * to synchronise to the vehicle synchronisation list. * rct2: 0x006DE1A4 */ -static bool try_add_synchronised_station(sint32 x, sint32 y, sint32 z) +static bool try_add_synchronised_station(int32_t x, int32_t y, int32_t z) { // make sure we are in map bounds if (x < 0 || y < 0 || (x >> 5) > (MAXIMUM_MAP_SIZE_TECHNICAL - 1) || (y >> 5) > (MAXIMUM_MAP_SIZE_TECHNICAL - 1)) @@ -2763,7 +2763,7 @@ static bool try_add_synchronised_station(sint32 x, sint32 y, sint32 z) return false; } - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); Ride * ride = get_ride(rideIndex); if (!(ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { @@ -2775,7 +2775,7 @@ static bool try_add_synchronised_station(sint32 x, sint32 y, sint32 z) * to sync with adjacent stations, so it will return true. * Still to determine if a vehicle to sync can be identified. */ - sint32 stationIndex = tile_element_get_station(tileElement); + int32_t stationIndex = tile_element_get_station(tileElement); rct_synchronised_vehicle * sv = _lastSynchronisedVehicle; sv->ride_id = rideIndex; @@ -2799,9 +2799,9 @@ static bool try_add_synchronised_station(sint32 x, sint32 y, sint32 z) } // Look for a vehicle on this station waiting to depart. - for (sint32 i = 0; i < ride->num_vehicles; i++) + for (int32_t i = 0; i < ride->num_vehicles; i++) { - uint16 spriteIndex = ride->vehicles[i]; + uint16_t spriteIndex = ride->vehicles[i]; if (spriteIndex == SPRITE_INDEX_NULL) { continue; @@ -2849,11 +2849,11 @@ static bool try_add_synchronised_station(sint32 x, sint32 y, sint32 z) static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) { Ride * ride = get_ride(vehicle->ride); - sint32 station = vehicle->current_station; + int32_t station = vehicle->current_station; LocationXY8 location = ride->station_starts[station]; - sint32 x = location.x * 32; - sint32 y = location.y * 32; - sint32 z = ride->station_heights[station]; + int32_t x = location.x * 32; + int32_t y = location.y * 32; + int32_t z = ride->station_heights[station]; rct_tile_element * tileElement = map_get_track_element_at(x, y, z); if (tileElement == nullptr) @@ -2869,9 +2869,9 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) * is found we allow for space between that and the next. */ - sint32 direction = (tileElement->type + 1) & 3; - sint32 spaceBetween; - sint32 maxCheckDistance = RIDE_ADJACENCY_CHECK_DISTANCE; + int32_t direction = (tileElement->type + 1) & 3; + int32_t spaceBetween; + int32_t maxCheckDistance = RIDE_ADJACENCY_CHECK_DISTANCE; spaceBetween = maxCheckDistance; while (_lastSynchronisedVehicle < &_synchronisedVehicles[SYNCHRONISED_VEHICLE_COUNT - 1]) @@ -2930,7 +2930,7 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) if (!(sv_ride->station_depart[sv->station_id] & STATION_DEPART_FLAG)) { sv = _synchronisedVehicles; - uint8 rideId = 0xFF; + uint8_t rideId = 0xFF; for (; sv < _lastSynchronisedVehicle; sv++) { if (rideId == 0xFF) @@ -2946,7 +2946,7 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) /* Here all the of sync-ed stations are from the same ride */ ride = get_ride(rideId); - for (sint32 i = 0; i < ride->num_vehicles; i++) + for (int32_t i = 0; i < ride->num_vehicles; i++) { rct_vehicle * v = GET_VEHICLE(ride->vehicles[i]); if (v->status != VEHICLE_STATUS_WAITING_TO_DEPART && v->velocity != 0) @@ -2969,20 +2969,20 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) // Sync condition: there are at least 3 stations to sync return false; } - uint8 someRideIndex = _synchronisedVehicles[0].ride_id; - // uint8 currentStation = _synchronisedVehicles[0].station_id + uint8_t someRideIndex = _synchronisedVehicles[0].ride_id; + // uint8_t currentStation = _synchronisedVehicles[0].station_id if (someRideIndex != vehicle->ride) { // Sync condition: the first station to sync is a different ride return false; } - sint32 numTrainsAtStation = 0; - sint32 numTravelingTrains = 0; - sint32 currentStation = sv->station_id; - for (sint32 i = 0; i < sv_ride->num_vehicles; i++) + int32_t numTrainsAtStation = 0; + int32_t numTravelingTrains = 0; + int32_t currentStation = sv->station_id; + for (int32_t i = 0; i < sv_ride->num_vehicles; i++) { - uint16 spriteIndex = sv_ride->vehicles[i]; + uint16_t spriteIndex = sv_ride->vehicles[i]; if (spriteIndex != SPRITE_INDEX_NULL) { rct_vehicle * otherVehicle = GET_VEHICLE(spriteIndex); @@ -3004,7 +3004,7 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) } } - sint32 totalTrains = numTrainsAtStation + numTravelingTrains; + int32_t totalTrains = numTrainsAtStation + numTravelingTrains; if (totalTrains != sv_ride->num_vehicles || numTravelingTrains >= sv_ride->num_vehicles / 2) { // if (numArrivingTrains > 0 || numTravelingTrains >= sv_ride->num_vehicles / 2) { @@ -3045,11 +3045,11 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) */ void vehicle_peep_easteregg_here_we_are(const rct_vehicle * vehicle) { - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; do { vehicle = GET_VEHICLE(spriteId); - for (sint32 i = 0; i < vehicle->num_peeps; ++i) + for (int32_t i = 0; i < vehicle->num_peeps; ++i) { rct_peep * peep = GET_PEEP(vehicle->peep[i]); if (peep->peep_flags & PEEP_FLAGS_HERE_WE_ARE) @@ -3071,22 +3071,22 @@ void vehicle_update_test_finish(rct_vehicle * vehicle) vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_TESTING; ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - for (sint32 i = ride->num_stations - 1; i >= 1; i--) + for (int32_t i = ride->num_stations - 1; i >= 1; i--) { if (ride->time[i - 1] != 0) continue; - uint16 oldTime = ride->time[i - 1]; + uint16_t oldTime = ride->time[i - 1]; ride->time[i - 1] = ride->time[i]; ride->time[i] = oldTime; - sint32 oldLength = ride->length[i - 1]; + int32_t oldLength = ride->length[i - 1]; ride->length[i - 1] = ride->length[i]; ride->length[i] = oldLength; } - uint32 totalTime = 0; - for (uint8 i = 0; i < ride->num_stations; ++i) + uint32_t totalTime = 0; + for (uint8_t i = 0; i < ride->num_stations; ++i) { totalTime += ride->time[i]; } @@ -3178,8 +3178,8 @@ static void vehicle_update_travelling_boat_hire_setup(rct_vehicle * vehicle) vehicle->track_x = vehicle->x & 0xFFE0; vehicle->track_y = vehicle->y & 0xFFE0; - LocationXY8 location = { static_cast((vehicle->track_x + CoordsDirectionDelta[vehicle->sprite_direction >> 3].x) / 32), - static_cast((vehicle->track_y + CoordsDirectionDelta[vehicle->sprite_direction >> 3].y) / + LocationXY8 location = { static_cast((vehicle->track_x + CoordsDirectionDelta[vehicle->sprite_direction >> 3].x) / 32), + static_cast((vehicle->track_y + CoordsDirectionDelta[vehicle->sprite_direction >> 3].y) / 32) }; vehicle->boat_location = location; @@ -3202,8 +3202,8 @@ static void vehicle_update_departing_boat_hire(rct_vehicle * vehicle) Ride * ride = get_ride(vehicle->ride); ride->station_depart[vehicle->current_station] &= STATION_DEPART_FLAG; - uint8 waitingTime = std::max(ride->min_waiting_time, static_cast(3)); - waitingTime = std::min(waitingTime, static_cast(127)); + uint8_t waitingTime = std::max(ride->min_waiting_time, static_cast(3)); + waitingTime = std::min(waitingTime, static_cast(127)); ride->station_depart[vehicle->current_station] |= waitingTime; vehicle_update_travelling_boat_hire_setup(vehicle); } @@ -3245,7 +3245,7 @@ static void vehicle_update_departing(rct_vehicle * vehicle) if (rideEntry->flags & RIDE_ENTRY_FLAG_PLAY_DEPART_SOUND) { - uint8 soundId = (rideEntry->vehicles[0].sound_range == 4) ? SOUND_TRAM : SOUND_TRAIN_CHUGGING; + uint8_t soundId = (rideEntry->vehicles[0].sound_range == 4) ? SOUND_TRAM : SOUND_TRAIN_CHUGGING; audio_play_sound_at_location(soundId, vehicle->x, vehicle->y, vehicle->z); } @@ -3323,7 +3323,7 @@ static void vehicle_update_departing(rct_vehicle * vehicle) break; } - uint32 flags = vehicle_update_track_motion(vehicle, nullptr); + uint32_t flags = vehicle_update_track_motion(vehicle, nullptr); if (flags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_8) { @@ -3363,7 +3363,7 @@ static void vehicle_update_departing(rct_vehicle * vehicle) vehicle->sound2_flags |= VEHICLE_SOUND2_FLAGS_LIFT_HILL; if (ride->mode != RIDE_MODE_REVERSE_INCLINE_LAUNCHED_SHUTTLE) { - sint32 speed = ride->lift_hill_speed * 31079; + int32_t speed = ride->lift_hill_speed * 31079; if (vehicle->velocity <= speed) { vehicle->acceleration = 15539; @@ -3381,7 +3381,7 @@ static void vehicle_update_departing(rct_vehicle * vehicle) } else { - sint32 speed = ride->lift_hill_speed * -31079; + int32_t speed = ride->lift_hill_speed * -31079; if (vehicle->velocity >= speed) { vehicle->acceleration = -15539; @@ -3474,11 +3474,11 @@ static void vehicle_finish_departing(rct_vehicle * vehicle) { ride->station_depart[vehicle->current_station] &= STATION_DEPART_FLAG; - uint8 waitingTime = 3; + uint8_t waitingTime = 3; if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) { - waitingTime = std::max(ride->min_waiting_time, static_cast(3)); - waitingTime = std::min(waitingTime, static_cast(127)); + waitingTime = std::max(ride->min_waiting_time, static_cast(3)); + waitingTime = std::min(waitingTime, static_cast(127)); } ride->station_depart[vehicle->current_station] |= waitingTime; @@ -3514,7 +3514,7 @@ static void vehicle_check_if_missing(rct_vehicle * vehicle) if (ride->lifecycle_flags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE) return; - uint16 limit = ride->type == RIDE_TYPE_BOAT_HIRE ? 15360 : 9600; + uint16_t limit = ride->type == RIDE_TYPE_BOAT_HIRE ? 15360 : 9600; if (vehicle->lost_time_out <= limit) return; @@ -3523,15 +3523,15 @@ static void vehicle_check_if_missing(rct_vehicle * vehicle) set_format_arg(0, rct_string_id, RideComponentNames[RideNameConvention[ride->type].vehicle].number); - uint8 vehicleIndex = 0; + uint8_t vehicleIndex = 0; for (; vehicleIndex < ride->num_vehicles; ++vehicleIndex) if (ride->vehicles[vehicleIndex] == vehicle->sprite_index) break; vehicleIndex++; - set_format_arg(2, uint16, vehicleIndex); + set_format_arg(2, uint16_t, vehicleIndex); set_format_arg(4, rct_string_id, ride->name); - set_format_arg(6, uint32, ride->name_arguments); + set_format_arg(6, uint32_t, ride->name_arguments); set_format_arg(10, rct_string_id, RideComponentNames[RideNameConvention[ride->type].station].singular); news_item_add_to_queue(NEWS_ITEM_RIDE, STR_NEWS_VEHICLE_HAS_STALLED, vehicle->ride); @@ -3574,7 +3574,7 @@ static void vehicle_update_collision_setup(rct_vehicle * vehicle) vehicle_kill_all_passengers(vehicle); rct_vehicle * lastVehicle = vehicle; - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; for (rct_vehicle * train; spriteId != SPRITE_INDEX_NULL; spriteId = train->next_vehicle_on_train) { train = GET_VEHICLE(spriteId); @@ -3586,7 +3586,7 @@ static void vehicle_update_collision_setup(rct_vehicle * vehicle) sprite_misc_explosion_cloud_create(train->x, train->y, train->z); - for (sint32 i = 0; i < 10; i++) + for (int32_t i = 0; i < 10; i++) { crashed_vehicle_particle_create(train->colours, train->x, train->y, train->z); } @@ -3626,26 +3626,26 @@ static void vehicle_update_crash_setup(rct_vehicle * vehicle) vehicle->status = VEHICLE_STATUS_CRASHING; vehicle_invalidate_window(vehicle); - sint32 num_peeps = vehicle_get_total_num_peeps(vehicle); + int32_t num_peeps = vehicle_get_total_num_peeps(vehicle); if (num_peeps != 0) { audio_play_sound_at_location(SOUND_HAUNTED_HOUSE_SCREAM_2, vehicle->x, vehicle->y, vehicle->z); } - sint32 edx = vehicle->velocity >> 10; + int32_t edx = vehicle->velocity >> 10; rct_vehicle * lastVehicle = vehicle; - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; for (rct_vehicle * trainVehicle; spriteId != SPRITE_INDEX_NULL; spriteId = trainVehicle->next_vehicle_on_train) { trainVehicle = GET_VEHICLE(spriteId); lastVehicle = trainVehicle; trainVehicle->sub_state = 0; - sint32 x = stru_9A3AC4[trainVehicle->sprite_direction / 2].x; - sint32 y = stru_9A3AC4[trainVehicle->sprite_direction / 2].y; + int32_t x = stru_9A3AC4[trainVehicle->sprite_direction / 2].x; + int32_t y = stru_9A3AC4[trainVehicle->sprite_direction / 2].y; - sint32 ecx = Unk9A37E4[trainVehicle->vehicle_sprite_type] >> 15; + int32_t ecx = Unk9A37E4[trainVehicle->vehicle_sprite_type] >> 15; x *= ecx; y *= ecx; x >>= 16; @@ -3706,7 +3706,7 @@ static void vehicle_update_travelling(rct_vehicle * vehicle) return; } - uint32 flags = vehicle_update_track_motion(vehicle, nullptr); + uint32_t flags = vehicle_update_track_motion(vehicle, nullptr); bool skipCheck = false; if (flags & (VEHICLE_UPDATE_MOTION_TRACK_FLAG_8 | VEHICLE_UPDATE_MOTION_TRACK_FLAG_9) && @@ -3867,7 +3867,7 @@ static void vehicle_update_travelling(rct_vehicle * vehicle) */ static void vehicle_update_arriving(rct_vehicle * vehicle) { - uint8 unkF64E35 = 1; + uint8_t unkF64E35 = 1; Ride * ride = get_ride(vehicle->ride); switch (ride->mode) @@ -3920,7 +3920,7 @@ static void vehicle_update_arriving(rct_vehicle * vehicle) goto loc_6D8E36; } - sint32 velocity_diff = vehicle->velocity; + int32_t velocity_diff = vehicle->velocity; if (velocity_diff >= 1572864) velocity_diff /= 8; else @@ -3953,7 +3953,7 @@ static void vehicle_update_arriving(rct_vehicle * vehicle) goto loc_6D8E36; } - sint32 velocity_diff = vehicle->velocity; + int32_t velocity_diff = vehicle->velocity; if (velocity_diff < -1572864) velocity_diff /= 8; else @@ -3988,7 +3988,7 @@ static void vehicle_update_arriving(rct_vehicle * vehicle) } } - uint32 flags; + uint32_t flags; loc_6D8E36: flags = vehicle_update_track_motion(vehicle, nullptr); if (flags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_COLLISION && unkF64E35 == 0) @@ -4104,7 +4104,7 @@ static void vehicle_update_unloading_passengers(rct_vehicle * vehicle) Ride * ride = get_ride(vehicle->ride); if (ride->mode == RIDE_MODE_FORWARD_ROTATION || ride->mode == RIDE_MODE_BACKWARD_ROTATION) { - uint8 seat = ((-vehicle->vehicle_sprite_type) >> 3) & 0xF; + uint8_t seat = ((-vehicle->vehicle_sprite_type) >> 3) & 0xF; if (vehicle->restraints_position == 255 && (vehicle->peep[seat * 2] != SPRITE_INDEX_NULL)) { vehicle->next_free_seat -= 2; @@ -4140,7 +4140,7 @@ static void vehicle_update_unloading_passengers(rct_vehicle * vehicle) return; } - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; for (rct_vehicle * train; spriteId != SPRITE_INDEX_NULL; spriteId = train->next_vehicle_on_train) { train = GET_VEHICLE(spriteId); @@ -4151,7 +4151,7 @@ static void vehicle_update_unloading_passengers(rct_vehicle * vehicle) continue; train->next_free_seat = 0; - for (uint8 peepIndex = 0; peepIndex < train->num_peeps; peepIndex++) + for (uint8_t peepIndex = 0; peepIndex < train->num_peeps; peepIndex++) { rct_peep * peep = GET_PEEP(train->peep[peepIndex]); peep->SetState(PEEP_STATE_LEAVING_RIDE); @@ -4163,7 +4163,7 @@ static void vehicle_update_unloading_passengers(rct_vehicle * vehicle) if (vehicle->sub_state != 1) return; - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; for (rct_vehicle * train; spriteId != SPRITE_INDEX_NULL; spriteId = train->next_vehicle_on_train) { train = GET_VEHICLE(spriteId); @@ -4252,7 +4252,7 @@ static void vehicle_update_travelling_cable_lift(rct_vehicle * vehicle) { vehicle->acceleration = 4398; } - sint32 flags = vehicle_update_track_motion(vehicle, nullptr); + int32_t flags = vehicle_update_track_motion(vehicle, nullptr); if (flags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_11) { @@ -4276,11 +4276,11 @@ static void vehicle_update_travelling_cable_lift(rct_vehicle * vehicle) // This is slightly different to the vanilla function ride->station_depart[vehicle->current_station] &= STATION_DEPART_FLAG; - uint8 waitingTime = 3; + uint8_t waitingTime = 3; if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) { - waitingTime = std::max(ride->min_waiting_time, static_cast(3)); - waitingTime = std::min(waitingTime, static_cast(127)); + waitingTime = std::max(ride->min_waiting_time, static_cast(3)); + waitingTime = std::min(waitingTime, static_cast(127)); } ride->station_depart[vehicle->current_station] |= waitingTime; @@ -4296,7 +4296,7 @@ static void vehicle_update_travelling_boat(rct_vehicle * vehicle) vehicle_update_motion_boat_hire(vehicle); } -static void loc_6DA9F9(rct_vehicle * vehicle, sint32 x, sint32 y, sint32 bx, sint32 dx) +static void loc_6DA9F9(rct_vehicle * vehicle, int32_t x, int32_t y, int32_t bx, int32_t dx) { vehicle->remaining_distance = 0; if (!vehicle_update_motion_collision_detection(vehicle, x, y, vehicle->z, nullptr)) @@ -4352,10 +4352,10 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) { // loc_6DA7A5 vehicle->var_35++; - sint32 x = (vehicle->boat_location.x * 32) + 16; - sint32 y = (vehicle->boat_location.y * 32) + 16; - sint32 z; - uint8 bl; + int32_t x = (vehicle->boat_location.x * 32) + 16; + int32_t y = (vehicle->boat_location.y * 32) + 16; + int32_t z; + uint8_t bl; x -= vehicle->x; if (x >= 0) @@ -4431,10 +4431,10 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) if (!(vehicle->var_35 & (1 << 0))) { - uint8 spriteDirection = vehicle->sprite_direction; + uint8_t spriteDirection = vehicle->sprite_direction; if (spriteDirection != vehicle->var_34) { - uint8 dl = (vehicle->var_34 + 16 - spriteDirection) & 0x1E; + uint8_t dl = (vehicle->var_34 + 16 - spriteDirection) & 0x1E; if (dl >= 16) { spriteDirection += 2; @@ -4456,7 +4456,7 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) } } - sint32 edi = (vehicle->sprite_direction | (vehicle->var_35 & 1)) & 0x1F; + int32_t edi = (vehicle->sprite_direction | (vehicle->var_35 & 1)) & 0x1F; x = vehicle->x + Unk9A36C4[edi].x; y = vehicle->y + Unk9A36C4[edi].y; z = vehicle->z; @@ -4472,8 +4472,8 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) break; } - sint32 flooredX = floor2(x, 32); - sint32 flooredY = floor2(y, 32); + int32_t flooredX = floor2(x, 32); + int32_t flooredY = floor2(y, 32); if (flooredX != vehicle->track_x || flooredY != vehicle->track_y) { if (!vehicle_boat_is_location_accessible(TileCoordsXYZ(CoordsXYZ{x, y, vehicle->track_z}))) @@ -4508,7 +4508,7 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) if (!(ride->boat_hire_return_direction & 1)) { - uint16 bp = y & 0x1F; + uint16_t bp = y & 0x1F; if (bp == 16) { loc_6DA9F9(vehicle, x, y, flooredX, flooredY); @@ -4528,7 +4528,7 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) else { // loc_6DA9A2: - uint16 bp = x & 0x1F; + uint16_t bp = x & 0x1F; if (bp == 16) { loc_6DA9F9(vehicle, x, y, flooredX, flooredY); @@ -4575,7 +4575,7 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) // loc_6DAAC9: { - sint32 edx = vehicle->velocity >> 8; + int32_t edx = vehicle->velocity >> 8; edx = (edx * edx); if (vehicle->velocity < 0) { @@ -4584,14 +4584,14 @@ static void vehicle_update_motion_boat_hire(rct_vehicle * vehicle) edx >>= 5; // Hack to fix people messing with boat hire - sint32 mass = vehicle->mass == 0 ? 1 : vehicle->mass; + int32_t mass = vehicle->mass == 0 ? 1 : vehicle->mass; - sint32 eax = ((vehicle->velocity >> 1) + edx) / mass; - sint32 ecx = -eax; + int32_t eax = ((vehicle->velocity >> 1) + edx) / mass; + int32_t ecx = -eax; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_POWERED) { eax = vehicle->speed << 14; - sint32 ebx = (vehicle->speed * mass) >> 2; + int32_t ebx = (vehicle->speed * mass) >> 2; if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE) { eax = -eax; @@ -4614,10 +4614,10 @@ static void vehicle_update_boat_location(rct_vehicle * vehicle) { Ride * ride = get_ride(vehicle->ride); LocationXY8 returnPosition = ride->boat_hire_return_position; - uint8 returnDirection = ride->boat_hire_return_direction & 3; + uint8_t returnDirection = ride->boat_hire_return_direction & 3; - LocationXY8 location = { static_cast((vehicle->x + CoordsDirectionDelta[returnDirection].x) / 32), - static_cast((vehicle->y + CoordsDirectionDelta[returnDirection].y) / 32) }; + LocationXY8 location = { static_cast((vehicle->x + CoordsDirectionDelta[returnDirection].x) / 32), + static_cast((vehicle->y + CoordsDirectionDelta[returnDirection].y) / 32) }; if (location.xy == returnPosition.xy) { @@ -4627,8 +4627,8 @@ static void vehicle_update_boat_location(rct_vehicle * vehicle) } vehicle->sub_state = 0; - uint8 curDirection = ((vehicle->sprite_direction + 19) >> 3) & 3; - uint8 randDirection = scenario_rand() & 3; + uint8_t curDirection = ((vehicle->sprite_direction + 19) >> 3) & 3; + uint8_t randDirection = scenario_rand() & 3; rct_ride_entry * rideEntry = get_ride_entry(vehicle->ride_subtype); if (!(rideEntry->flags & RIDE_ENTRY_FLAG_7) || vehicle->lost_time_out > 1920) @@ -4636,8 +4636,8 @@ static void vehicle_update_boat_location(rct_vehicle * vehicle) if (scenario_rand() & 1) { LocationXY16 destLocation = { - static_cast(returnPosition.x * 32 - CoordsDirectionDelta[returnDirection].x + 16), - static_cast(returnPosition.y * 32 - CoordsDirectionDelta[returnDirection].y + 16) + static_cast(returnPosition.x * 32 - CoordsDirectionDelta[returnDirection].x + 16), + static_cast(returnPosition.y * 32 - CoordsDirectionDelta[returnDirection].y + 16) }; destLocation.x -= vehicle->x; @@ -4654,7 +4654,7 @@ static void vehicle_update_boat_location(rct_vehicle * vehicle) } } - static constexpr const sint8 rotations[] = { 0, 1, -1, 2 }; + static constexpr const int8_t rotations[] = { 0, 1, -1, 2 }; for (auto rotation : rotations) { if (randDirection + rotation == curDirection) @@ -4662,8 +4662,8 @@ static void vehicle_update_boat_location(rct_vehicle * vehicle) continue; } - sint16 x = vehicle->track_x + CoordsDirectionDelta[(randDirection + rotation) & 3].x; - sint16 y = vehicle->track_y + CoordsDirectionDelta[(randDirection + rotation) & 3].y; + int16_t x = vehicle->track_x + CoordsDirectionDelta[(randDirection + rotation) & 3].x; + int16_t y = vehicle->track_y + CoordsDirectionDelta[(randDirection + rotation) & 3].y; if (!vehicle_boat_is_location_accessible(TileCoordsXYZ(CoordsXYZ{x, y, vehicle->track_z}))) { @@ -4674,8 +4674,8 @@ static void vehicle_update_boat_location(rct_vehicle * vehicle) return; } - sint16 x = vehicle->track_x + CoordsDirectionDelta[curDirection & 3].x; - sint16 y = vehicle->track_y + CoordsDirectionDelta[curDirection & 3].y; + int16_t x = vehicle->track_x + CoordsDirectionDelta[curDirection & 3].x; + int16_t y = vehicle->track_y + CoordsDirectionDelta[curDirection & 3].y; vehicle->boat_location.x = x / 32; vehicle->boat_location.y = y / 32; } @@ -4691,7 +4691,7 @@ static bool vehicle_boat_is_location_accessible(const TileCoordsXYZ &location) { if (tileElement->GetType() == TILE_ELEMENT_TYPE_SURFACE) { - sint32 waterZ = surface_get_water_height(tileElement) * 2; + int32_t waterZ = surface_get_water_height(tileElement) * 2; if (location.z != waterZ) { return false; @@ -4720,7 +4720,7 @@ static void vehicle_update_swinging(rct_vehicle * vehicle) // SubState for this ride means swinging state // 0 == first swing // 3 == full swing - uint8 swingState = vehicle->sub_state; + uint8_t swingState = vehicle->sub_state; if (rideEntry->flags & RIDE_ENTRY_FLAG_ALTERNATIVE_SWING_MODE_1) { swingState += 4; @@ -4728,18 +4728,18 @@ static void vehicle_update_swinging(rct_vehicle * vehicle) swingState += 4; } - const sint8 * spriteMap = SwingingTimeToSpriteMaps[swingState]; - sint8 spriteType = spriteMap[vehicle->current_time + 1]; + const int8_t * spriteMap = SwingingTimeToSpriteMaps[swingState]; + int8_t spriteType = spriteMap[vehicle->current_time + 1]; // 0x80 indicates that a complete swing has been // completed and the next swing can start if (spriteType != -128) { vehicle->current_time++; - if ((uint8)spriteType != vehicle->vehicle_sprite_type) + if ((uint8_t)spriteType != vehicle->vehicle_sprite_type) { // Used to know which sprite to draw - vehicle->vehicle_sprite_type = (uint8)spriteType; + vehicle->vehicle_sprite_type = (uint8_t)spriteType; vehicle_invalidate(vehicle); } return; @@ -4792,7 +4792,7 @@ static void vehicle_update_ferris_wheel_rotating(rct_vehicle * vehicle) if ((vehicle->ferris_wheel_var_1 -= 1) != 0) return; - sint8 ferris_wheel_var_0 = vehicle->ferris_wheel_var_0; + int8_t ferris_wheel_var_0 = vehicle->ferris_wheel_var_0; if (ferris_wheel_var_0 == 3) { @@ -4813,7 +4813,7 @@ static void vehicle_update_ferris_wheel_rotating(rct_vehicle * vehicle) vehicle->ferris_wheel_var_1 = ferris_wheel_var_0; } - uint8 rotation = vehicle->vehicle_sprite_type; + uint8_t rotation = vehicle->vehicle_sprite_type; if (ride->mode == RIDE_MODE_FORWARD_ROTATION) rotation++; else @@ -4827,7 +4827,7 @@ static void vehicle_update_ferris_wheel_rotating(rct_vehicle * vehicle) vehicle_invalidate(vehicle); - uint8 subState = vehicle->sub_state; + uint8_t subState = vehicle->sub_state; if (ride->mode == RIDE_MODE_FORWARD_ROTATION) subState++; else @@ -4881,7 +4881,7 @@ static void vehicle_update_simulator_operating(rct_vehicle * vehicle) assert(vehicle->current_time >= -1); assert(vehicle->current_time < MotionSimulatorTimeToSpriteMapCount); - uint8 al = MotionSimulatorTimeToSpriteMap[vehicle->current_time + 1]; + uint8_t al = MotionSimulatorTimeToSpriteMap[vehicle->current_time + 1]; if (al != 0xFF) { vehicle->current_time++; @@ -4914,7 +4914,7 @@ static void vehicle_update_rotating(rct_vehicle * vehicle) return; } - const uint8 * timeToSpriteMap; + const uint8_t * timeToSpriteMap; if (rideEntry->flags & RIDE_ENTRY_FLAG_ALTERNATIVE_ROTATION_MODE_1) { timeToSpriteMap = Rotation1TimeToSpriteMaps[vehicle->sub_state]; @@ -4928,17 +4928,17 @@ static void vehicle_update_rotating(rct_vehicle * vehicle) timeToSpriteMap = Rotation3TimeToSpriteMaps[vehicle->sub_state]; } - sint32 time = vehicle->current_time; + int32_t time = vehicle->current_time; if (_vehicleBreakdown == BREAKDOWN_CONTROL_FAILURE) { time += (ride->breakdown_sound_modifier >> 6) + 1; } time++; - uint8 sprite = timeToSpriteMap[(uint32)time]; + uint8_t sprite = timeToSpriteMap[(uint32_t)time]; if (sprite != 0xFF) { - vehicle->current_time = (uint16)time; + vehicle->current_time = (uint16_t)time; if (sprite == vehicle->vehicle_sprite_type) return; vehicle->vehicle_sprite_type = sprite; @@ -4999,7 +4999,7 @@ static void vehicle_update_space_rings_operating(rct_vehicle * vehicle) if (_vehicleBreakdown == 0) return; - uint8 spriteType = SpaceRingsTimeToSpriteMap[vehicle->current_time + 1]; + uint8_t spriteType = SpaceRingsTimeToSpriteMap[vehicle->current_time + 1]; if (spriteType != 255) { vehicle->current_time++; @@ -5084,7 +5084,7 @@ static void vehicle_update_crooked_house_operating(rct_vehicle * vehicle) return; // Originally used an array of size 1 at 0x009A0AC4 and passed the sub state into it. - if ((uint16)(vehicle->current_time + 1) > 600) + if ((uint16_t)(vehicle->current_time + 1) > 600) { vehicle->status = VEHICLE_STATUS_ARRIVING; vehicle_invalidate_window(vehicle); @@ -5106,7 +5106,7 @@ static void vehicle_update_top_spin_operating(rct_vehicle * vehicle) return; const top_spin_time_to_sprite_map * sprite_map = TopSpinTimeToSpriteMaps[vehicle->sub_state]; - uint8 rotation = sprite_map[vehicle->current_time + 1].arm_rotation; + uint8_t rotation = sprite_map[vehicle->current_time + 1].arm_rotation; if (rotation != 0xFF) { vehicle->current_time = vehicle->current_time + 1; @@ -5136,7 +5136,7 @@ static void vehicle_update_top_spin_operating(rct_vehicle * vehicle) */ static void vehicle_update_showing_film(rct_vehicle * vehicle) { - sint32 currentTime, totalTime; + int32_t currentTime, totalTime; if (_vehicleBreakdown == 0) return; @@ -5165,7 +5165,7 @@ static void vehicle_update_doing_circus_show(rct_vehicle * vehicle) if (_vehicleBreakdown == 0) return; - sint32 currentTime = vehicle->current_time + 1; + int32_t currentTime = vehicle->current_time + 1; if (currentTime <= 5000) { vehicle->current_time = currentTime; @@ -5184,7 +5184,7 @@ static void vehicle_update_doing_circus_show(rct_vehicle * vehicle) * rct2: 0x0068B8BD * @returns the map element that the vehicle will collide with or NULL if no collisions. */ -static rct_tile_element * vehicle_check_collision(sint16 x, sint16 y, sint16 z) +static rct_tile_element * vehicle_check_collision(int16_t x, int16_t y, int16_t z) { rct_tile_element * tileElement = map_get_first_element_at(x / 32, y / 32); if (tileElement == nullptr) @@ -5192,7 +5192,7 @@ static rct_tile_element * vehicle_check_collision(sint16 x, sint16 y, sint16 z) return nullptr; } - uint8 bl; + uint8_t bl; if ((x & 0x1F) >= 16) { bl = 1; @@ -5227,9 +5227,9 @@ static rct_tile_element * vehicle_check_collision(sint16 x, sint16 y, sint16 z) */ static void vehicle_kill_all_passengers(rct_vehicle * vehicle) { - uint16 numFatalities = 0; + uint16_t numFatalities = 0; - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; for (rct_vehicle * curVehicle; spriteId != SPRITE_INDEX_NULL; spriteId = curVehicle->next_vehicle_on_train) { curVehicle = GET_VEHICLE(spriteId); @@ -5237,9 +5237,9 @@ static void vehicle_kill_all_passengers(rct_vehicle * vehicle) } Ride * ride = get_ride(vehicle->ride); - set_format_arg(0, uint16, numFatalities); + set_format_arg(0, uint16_t, numFatalities); - uint8 crashType = numFatalities == 0 ? RIDE_CRASH_TYPE_NO_FATALITIES : RIDE_CRASH_TYPE_FATALITIES; + uint8_t crashType = numFatalities == 0 ? RIDE_CRASH_TYPE_NO_FATALITIES : RIDE_CRASH_TYPE_FATALITIES; if (crashType >= ride->last_crash_type) ride->last_crash_type = crashType; @@ -5247,7 +5247,7 @@ static void vehicle_kill_all_passengers(rct_vehicle * vehicle) if (numFatalities != 0) { set_format_arg(2, rct_string_id, ride->name); - set_format_arg(4, uint32, ride->name_arguments); + set_format_arg(4, uint32_t, ride->name_arguments); news_item_add_to_queue(NEWS_ITEM_RIDE, STR_X_PEOPLE_DIED_ON_X, vehicle->ride); if (gParkRatingCasualtyPenalty < 500) @@ -5267,7 +5267,7 @@ static void vehicle_kill_all_passengers(rct_vehicle * vehicle) if (curVehicle->num_peeps == 0) continue; - for (uint8 i = 0; i < curVehicle->num_peeps; i++) + for (uint8_t i = 0; i < curVehicle->num_peeps; i++) { rct_peep * peep = GET_PEEP(curVehicle->peep[i]); if (peep->outside_of_park == 0) @@ -5325,7 +5325,7 @@ static void vehicle_crash_on_land(rct_vehicle * vehicle) sprite_misc_explosion_cloud_create(vehicle->x, vehicle->y, vehicle->z); sprite_misc_explosion_flare_create(vehicle->x, vehicle->y, vehicle->z); - uint8 numParticles = std::min(vehicle->sprite_width, static_cast(7)); + uint8_t numParticles = std::min(vehicle->sprite_width, static_cast(7)); while (numParticles-- != 0) crashed_vehicle_particle_create(vehicle->colours, vehicle->x, vehicle->y, vehicle->z); @@ -5386,7 +5386,7 @@ static void vehicle_crash_on_water(rct_vehicle * vehicle) crash_splash_create(vehicle->x + 11, vehicle->y + 8, vehicle->z); crash_splash_create(vehicle->x - 4, vehicle->y + 8, vehicle->z); - for (sint32 i = 0; i < 10; ++i) + for (int32_t i = 0; i < 10; ++i) crashed_vehicle_particle_create(vehicle->colours, vehicle->x - 4, vehicle->y + 8, vehicle->z); vehicle->flags |= SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE; @@ -5408,7 +5408,7 @@ static void vehicle_crash_on_water(rct_vehicle * vehicle) */ static void vehicle_update_crash(rct_vehicle * vehicle) { - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; rct_vehicle * curVehicle; do { @@ -5446,10 +5446,10 @@ static void vehicle_update_crash(rct_vehicle * vehicle) continue; } - sint32 z = tile_element_height(curVehicle->x, curVehicle->y); - sint16 waterHeight = (z >> 16) & 0xFFFF; - z = (sint16)(z & 0xFFFF); - sint16 zDiff; + int32_t z = tile_element_height(curVehicle->x, curVehicle->y); + int16_t waterHeight = (z >> 16) & 0xFFFF; + z = (int16_t)(z & 0xFFFF); + int16_t zDiff; if (waterHeight != 0) { zDiff = curVehicle->z - waterHeight; @@ -5471,12 +5471,12 @@ static void vehicle_update_crash(rct_vehicle * vehicle) LocationXYZ16 curPosition = {curVehicle->x, curVehicle->y, curVehicle->z}; - curPosition.x += (sint8)(curVehicle->crash_x >> 8); - curPosition.y += (sint8)(curVehicle->crash_y >> 8); - curPosition.z += (sint8)(curVehicle->crash_z >> 8); - curVehicle->track_x = (sint16)(curVehicle->crash_x << 8); - curVehicle->track_y = (sint16)(curVehicle->crash_y << 8); - curVehicle->track_z = (sint16)(curVehicle->crash_z << 8); + curPosition.x += (int8_t)(curVehicle->crash_x >> 8); + curPosition.y += (int8_t)(curVehicle->crash_y >> 8); + curPosition.z += (int8_t)(curVehicle->crash_z >> 8); + curVehicle->track_x = (int16_t)(curVehicle->crash_x << 8); + curVehicle->track_y = (int16_t)(curVehicle->crash_y << 8); + curVehicle->track_z = (int16_t)(curVehicle->crash_z << 8); if (curPosition.x > 0x1FFF || curPosition.y > 0x1FFF) { @@ -5502,10 +5502,10 @@ static void vehicle_update_sound(rct_vehicle * vehicle) Ride * ride; rct_ride_entry * rideEntry; // frictionVolume (bl) should be set before hand - uint8 frictionVolume = 255, frictionId = 255; + uint8_t frictionVolume = 255, frictionId = 255; // bh screamVolume should be set before hand - uint8 screamId = 255, screamVolume = 255; - uint16 soundIdVolume; + uint8_t screamId = 255, screamVolume = 255; + uint16_t soundIdVolume; ride = get_ride(vehicle->ride); rideEntry = get_ride_entry(vehicle->ride_subtype); @@ -5517,7 +5517,7 @@ static void vehicle_update_sound(rct_vehicle * vehicle) rct_ride_entry_vehicle * vehicleEntry = &rideEntry->vehicles[vehicle->vehicle_type]; - sint32 ecx = abs(vehicle->velocity) - 0x10000; + int32_t ecx = abs(vehicle->velocity) - 0x10000; if (ecx >= 0) { frictionId = vehicleEntry->friction_sound_id; @@ -5599,8 +5599,8 @@ static void vehicle_update_sound(rct_vehicle * vehicle) vehicle->sound2_volume = (soundIdVolume >> 8) & 0xFF; //Calculate Sound Vector (used for sound frequency calcs) - sint32 soundDirection = SpriteDirectionToSoundDirection[vehicle->sprite_direction]; - sint32 soundVector = ((vehicle->velocity >> 14) * soundDirection) >> 14; + int32_t soundDirection = SpriteDirectionToSoundDirection[vehicle->sprite_direction]; + int32_t soundVector = ((vehicle->velocity >> 14) * soundDirection) >> 14; soundVector = Math::Clamp(-127, soundVector, 127); vehicle->sound_vector_factor = soundVector & 0xFF; @@ -5610,10 +5610,10 @@ static void vehicle_update_sound(rct_vehicle * vehicle) * * rct2: 0x006D796B */ -static sint32 vehicle_update_scream_sound(rct_vehicle * vehicle) +static int32_t vehicle_update_scream_sound(rct_vehicle * vehicle) { - uint32 r; - uint16 spriteIndex; + uint32_t r; + uint16_t spriteIndex; rct_ride_entry * rideEntry; rct_vehicle * vehicle2; @@ -5621,7 +5621,7 @@ static sint32 vehicle_update_scream_sound(rct_vehicle * vehicle) rct_ride_entry_vehicle * vehicleEntry = &rideEntry->vehicles[vehicle->vehicle_type]; - sint32 totalNumPeeps = vehicle_get_total_num_peeps(vehicle); + int32_t totalNumPeeps = vehicle_get_total_num_peeps(vehicle); if (totalNumPeeps == 0) return 255; @@ -5668,7 +5668,7 @@ produceScream: if (vehicle->scream_sound_id == 255) { r = scenario_rand(); - if (totalNumPeeps >= (sint32)(r % 16)) + if (totalNumPeeps >= (int32_t)(r % 16)) { switch (vehicleEntry->sound_range) { @@ -5701,11 +5701,11 @@ produceScream: * dx: lateralG * esi: vehicle */ -void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint32 * lateralG) +void vehicle_get_g_forces(const rct_vehicle * vehicle, int32_t * verticalG, int32_t * lateralG) { - sint32 gForceVert = (((sint64)0x280000) * Unk9A37E4[vehicle->vehicle_sprite_type]) >> 32; - gForceVert = (((sint64)gForceVert) * Unk9A39C4[vehicle->bank_rotation]) >> 32; - sint32 lateralFactor = 0, vertFactor = 0; + int32_t gForceVert = (((int64_t)0x280000) * Unk9A37E4[vehicle->vehicle_sprite_type]) >> 32; + gForceVert = (((int64_t)gForceVert) * Unk9A39C4[vehicle->bank_rotation]) >> 32; + int32_t lateralFactor = 0, vertFactor = 0; // Note shr has meant some of the below functions cast a known negative number to // unsigned. Possibly an original bug but will be left implemented. @@ -5938,7 +5938,7 @@ void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint3 break; case TRACK_ELEM_HALF_LOOP_UP: case TRACK_ELEM_FLYER_HALF_LOOP_UP: - vertFactor = (((uint16)(-(vehicle->track_progress - 155))) / 2) + 28; + vertFactor = (((uint16_t)(-(vehicle->track_progress - 155))) / 2) + 28; // 6d763E break; case TRACK_ELEM_HALF_LOOP_DOWN: @@ -6118,7 +6118,7 @@ void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint3 break; case TRACK_ELEM_LEFT_LARGE_HALF_LOOP_UP: case TRACK_ELEM_RIGHT_LARGE_HALF_LOOP_UP: - vertFactor = (((uint16)(-(vehicle->track_progress - 311))) / 4) + 46; + vertFactor = (((uint16_t)(-(vehicle->track_progress - 311))) / 4) + 46; // 6d7666 break; case TRACK_ELEM_RIGHT_LARGE_HALF_LOOP_DOWN: @@ -6167,7 +6167,7 @@ void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint3 case TRACK_ELEM_90_DEG_TO_INVERTED_FLAT_QUARTER_LOOP_UP: case TRACK_ELEM_MULTIDIM_90_DEG_UP_TO_INVERTED_FLAT_QUARTER_LOOP: case 255: - vertFactor = (((uint16)(-(vehicle->track_progress - 137))) / 4) + 55; + vertFactor = (((uint16_t)(-(vehicle->track_progress - 137))) / 4) + 55; // 6D7614 break; case TRACK_ELEM_AIR_THRUST_TOP_CAP: @@ -6200,7 +6200,7 @@ void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint3 break; } - sint32 gForceLateral = 0; + int32_t gForceLateral = 0; if (vertFactor != 0) { @@ -6218,15 +6218,15 @@ void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint3 gForceLateral >>= 16; if (verticalG != nullptr) - *verticalG = (sint16)(gForceVert & 0xFFFF); + *verticalG = (int16_t)(gForceVert & 0xFFFF); if (lateralG != nullptr) - *lateralG = (sint16)(gForceLateral & 0xFFFF); + *lateralG = (int16_t)(gForceLateral & 0xFFFF); } void vehicle_set_map_toolbar(const rct_vehicle * vehicle) { Ride * ride; - sint32 vehicleIndex; + int32_t vehicleIndex; ride = get_ride(vehicle->ride); @@ -6242,16 +6242,16 @@ void vehicle_set_map_toolbar(const rct_vehicle * vehicle) set_map_tooltip_format_arg(0, rct_string_id, STR_RIDE_MAP_TIP); set_map_tooltip_format_arg(2, rct_string_id, STR_MAP_TOOLTIP_STRINGID_STRINGID); set_map_tooltip_format_arg(4, rct_string_id, ride->name); - set_map_tooltip_format_arg(6, uint32, ride->name_arguments); + set_map_tooltip_format_arg(6, uint32_t, ride->name_arguments); set_map_tooltip_format_arg(10, rct_string_id, RideComponentNames[RideNameConvention[ride->type].vehicle].capitalised); - set_map_tooltip_format_arg(12, uint16, vehicleIndex + 1); + set_map_tooltip_format_arg(12, uint16_t, vehicleIndex + 1); rct_string_id formatSecondary; - sint32 arg1; + int32_t arg1; ride_get_status(vehicle->ride, &formatSecondary, &arg1); set_map_tooltip_format_arg(14, rct_string_id, formatSecondary); // TODO: odd cast - set_map_tooltip_format_arg(16, uint32, (uint16)arg1); + set_map_tooltip_format_arg(16, uint32_t, (uint16_t)arg1); } rct_vehicle* vehicle_get_head(const rct_vehicle* vehicle) @@ -6272,7 +6272,7 @@ rct_vehicle* vehicle_get_head(const rct_vehicle* vehicle) rct_vehicle* vehicle_get_tail(const rct_vehicle* vehicle) { - uint16 spriteIndex; + uint16_t spriteIndex; while ((spriteIndex = vehicle->next_vehicle_on_train) != SPRITE_INDEX_NULL) { @@ -6282,7 +6282,7 @@ rct_vehicle* vehicle_get_tail(const rct_vehicle* vehicle) return const_cast(vehicle); } -sint32 vehicle_is_used_in_pairs(const rct_vehicle * vehicle) +int32_t vehicle_is_used_in_pairs(const rct_vehicle * vehicle) { return vehicle->num_seats & VEHICLE_SEAT_PAIR_FLAG; } @@ -6291,12 +6291,12 @@ sint32 vehicle_is_used_in_pairs(const rct_vehicle * vehicle) * * rct2: 0x006DA44E */ -static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) +static int32_t vehicle_update_motion_dodgems(rct_vehicle * vehicle) { _vehicleMotionTrackFlags = 0; Ride * ride = get_ride(vehicle->ride); - sint32 nextVelocity = vehicle->velocity + vehicle->acceleration; + int32_t nextVelocity = vehicle->velocity + vehicle->acceleration; if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN) && ride->breakdown_reason_pending == BREAKDOWN_SAFETY_CUT_OUT) { @@ -6339,11 +6339,11 @@ static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) } } - uint16 collideSprite = 0xFFFF; + uint16_t collideSprite = 0xFFFF; if (vehicle->dodgems_collision_direction != 0) { - uint8 oldCollisionDirection = vehicle->dodgems_collision_direction & 0x1E; + uint8_t oldCollisionDirection = vehicle->dodgems_collision_direction & 0x1E; vehicle->dodgems_collision_direction = 0; LocationXYZ16 location = { vehicle->x, vehicle->y, vehicle->z }; @@ -6375,7 +6375,7 @@ static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) while (true) { vehicle->var_35++; - uint8 direction = vehicle->sprite_direction; + uint8_t direction = vehicle->sprite_direction; direction |= vehicle->var_35 & 1; LocationXYZ16 location = unk_F64E20; @@ -6397,10 +6397,10 @@ static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) if (vehicle->remaining_distance >= 13962) { - sint32 oldVelocity = vehicle->velocity; + int32_t oldVelocity = vehicle->velocity; vehicle->remaining_distance = 0; vehicle->velocity = 0; - uint8 direction = vehicle->sprite_direction | 1; + uint8_t direction = vehicle->sprite_direction | 1; if (collideSprite != 0xFFFF) { @@ -6428,8 +6428,8 @@ static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) vehicle_invalidate(vehicle); } - sint32 eax = vehicle->velocity / 2; - sint32 edx = vehicle->velocity >> 8; + int32_t eax = vehicle->velocity / 2; + int32_t edx = vehicle->velocity >> 8; edx *= edx; if (vehicle->velocity < 0) edx = -edx; @@ -6445,8 +6445,8 @@ static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) return _vehicleMotionTrackFlags; } - sint32 ebx = (vehicle->speed * vehicle->mass) >> 2; - sint32 _eax = vehicle->speed << 14; + int32_t ebx = (vehicle->speed * vehicle->mass) >> 2; + int32_t _eax = vehicle->speed << 14; if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE) { _eax = -_eax; @@ -6463,15 +6463,15 @@ static sint32 vehicle_update_motion_dodgems(rct_vehicle * vehicle) * * rct2: 0x006DD365 */ -bool vehicle_update_dodgems_collision(rct_vehicle * vehicle, sint16 x, sint16 y, uint16 * spriteId) +bool vehicle_update_dodgems_collision(rct_vehicle * vehicle, int16_t x, int16_t y, uint16_t * spriteId) { - uint16 bp = (vehicle->var_44 * 30) >> 9; - uint32 trackType = vehicle->track_type >> 2; + uint16_t bp = (vehicle->var_44 * 30) >> 9; + uint32_t trackType = vehicle->track_type >> 2; - sint16 rideLeft = vehicle->track_x + DodgemsTrackSize[trackType].left; - sint16 rideRight = vehicle->track_x + DodgemsTrackSize[trackType].right; - sint16 rideTop = vehicle->track_y + DodgemsTrackSize[trackType].top; - sint16 rideBottom = vehicle->track_y + DodgemsTrackSize[trackType].bottom; + int16_t rideLeft = vehicle->track_x + DodgemsTrackSize[trackType].left; + int16_t rideRight = vehicle->track_x + DodgemsTrackSize[trackType].right; + int16_t rideTop = vehicle->track_y + DodgemsTrackSize[trackType].top; + int16_t rideBottom = vehicle->track_y + DodgemsTrackSize[trackType].bottom; if (x - bp < rideLeft || y - bp < rideTop || x + bp > rideRight || y + bp > rideBottom) { @@ -6480,15 +6480,15 @@ bool vehicle_update_dodgems_collision(rct_vehicle * vehicle, sint16 x, sint16 y, return true; } - LocationXY8 location = { static_cast(x / 32), static_cast(y / 32) }; + LocationXY8 location = { static_cast(x / 32), static_cast(y / 32) }; - uint8 rideIndex = vehicle->ride; + uint8_t rideIndex = vehicle->ride; for (auto xy_offset : Unk9A37C4) { location.x += xy_offset.x; location.y += xy_offset.y; - uint16 spriteIdx = sprite_get_first_in_quadrant(location.x * 32, location.y * 32); + uint16_t spriteIdx = sprite_get_first_in_quadrant(location.x * 32, location.y * 32); while (spriteIdx != SPRITE_INDEX_NULL) { rct_vehicle * vehicle2 = GET_VEHICLE(spriteIdx); @@ -6503,15 +6503,15 @@ bool vehicle_update_dodgems_collision(rct_vehicle * vehicle, sint16 x, sint16 y, if (vehicle2->ride != rideIndex) continue; - sint32 distX = abs(x - vehicle2->x); + int32_t distX = abs(x - vehicle2->x); if (distX > 32768) continue; - sint32 distY = abs(y - vehicle2->y); + int32_t distY = abs(y - vehicle2->y); if (distY > 32768) continue; - sint32 ecx = (vehicle->var_44 + vehicle2->var_44) / 2; + int32_t ecx = (vehicle->var_44 + vehicle2->var_44) / 2; ecx *= 30; ecx >>= 8; if (std::max(distX, distY) < ecx) @@ -6533,7 +6533,7 @@ bool vehicle_update_dodgems_collision(rct_vehicle * vehicle, sint16 x, sint16 y, static void vehicle_update_track_motion_up_stop_check(rct_vehicle * vehicle) { rct_ride_entry_vehicle * vehicleEntry = vehicle_get_vehicle_entry(vehicle); - sint32 verticalG, lateralG; + int32_t verticalG, lateralG; if (vehicleEntry == nullptr) { @@ -6543,7 +6543,7 @@ static void vehicle_update_track_motion_up_stop_check(rct_vehicle * vehicle) // No up stops (coaster types) if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_NO_UPSTOP_WHEELS) { - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; if (!track_element_is_covered(trackType)) { vehicle_get_g_forces(vehicle, &verticalG, &lateralG); @@ -6572,7 +6572,7 @@ static void vehicle_update_track_motion_up_stop_check(rct_vehicle * vehicle) else if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_NO_UPSTOP_BOBSLEIGH) { // No up stops bobsleigh type - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; if (!track_element_is_covered(trackType)) { vehicle_get_g_forces(vehicle, &verticalG, &lateralG); @@ -6676,7 +6676,7 @@ static void check_and_apply_block_section_stop_site(rct_vehicle * vehicle) // Is chair lift type if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_CHAIRLIFT) { - sint32 velocity = ride->speed << 16; + int32_t velocity = ride->speed << 16; if (_vehicleBreakdown == 0) { velocity = 0; @@ -6685,7 +6685,7 @@ static void check_and_apply_block_section_stop_site(rct_vehicle * vehicle) vehicle->acceleration = 0; } - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; rct_tile_element * trackElement = map_get_track_element_at_of_type(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType); @@ -6734,7 +6734,7 @@ static void check_and_apply_block_section_stop_site(rct_vehicle * vehicle) */ static void update_velocity(rct_vehicle * vehicle) { - sint32 nextVelocity = vehicle->acceleration + vehicle->velocity; + int32_t nextVelocity = vehicle->acceleration + vehicle->velocity; if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_ZERO_VELOCITY) { nextVelocity = 0; @@ -6760,14 +6760,14 @@ static void update_velocity(rct_vehicle * vehicle) static void vehicle_update_block_brakes_open_previous_section(rct_vehicle * vehicle, rct_tile_element * tileElement) { - sint32 x = vehicle->track_x; - sint32 y = vehicle->track_y; - sint32 z = vehicle->track_z; + int32_t x = vehicle->track_x; + int32_t y = vehicle->track_y; + int32_t z = vehicle->track_z; track_begin_end trackBeginEnd, slowTrackBeginEnd; rct_tile_element slowTileElement = *tileElement; bool counter = true; - sint32 slowX = x; - sint32 slowY = y; + int32_t slowX = x; + int32_t slowY = y; do { if (!track_block_get_previous(x, y, tileElement, &trackBeginEnd)) @@ -6813,7 +6813,7 @@ static void vehicle_update_block_brakes_open_previous_section(rct_vehicle * vehi tileElement->flags &= ~TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED; map_invalidate_element(x, y, tileElement); - sint32 trackType = track_element_get_type(tileElement); + int32_t trackType = track_element_get_type(tileElement); if (trackType == TRACK_ELEM_BLOCK_BRAKES || trackType == TRACK_ELEM_END_STATION) { Ride * ride = get_ride(vehicle->ride); @@ -6824,9 +6824,9 @@ static void vehicle_update_block_brakes_open_previous_section(rct_vehicle * vehi } } -static sint32 vehicle_get_swing_amount(rct_vehicle * vehicle) +static int32_t vehicle_get_swing_amount(rct_vehicle * vehicle) { - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; switch (trackType) { case TRACK_ELEM_LEFT_QUARTER_TURN_5_TILES: @@ -6950,9 +6950,9 @@ static sint32 vehicle_get_swing_amount(rct_vehicle * vehicle) */ static void vehicle_update_swinging_car(rct_vehicle * vehicle) { - sint32 dword_F64E08 = abs(_vehicleVelocityF64E08); + int32_t dword_F64E08 = abs(_vehicleVelocityF64E08); vehicle->var_4E += (-vehicle->swinging_car_var_0) >> 6; - sint32 swingAmount = vehicle_get_swing_amount(vehicle); + int32_t swingAmount = vehicle_get_swing_amount(vehicle); if (swingAmount < 0) { vehicle->var_4E -= dword_F64E08 >> (-swingAmount); @@ -6967,7 +6967,7 @@ static void vehicle_update_swinging_car(rct_vehicle * vehicle) { return; } - sint16 dx = 3185; + int16_t dx = 3185; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_21) { dx = 5006; @@ -6976,14 +6976,14 @@ static void vehicle_update_swinging_car(rct_vehicle * vehicle) { dx = 1820; } - sint16 cx = -dx; + int16_t cx = -dx; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SLIDE_SWING) { dx = 5370; cx = -5370; - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; switch (trackType) { case TRACK_ELEM_BANKED_LEFT_QUARTER_TURN_5_TILES: @@ -7021,7 +7021,7 @@ static void vehicle_update_swinging_car(rct_vehicle * vehicle) vehicle->swinging_car_var_0 += vehicle->var_4E; vehicle->var_4E -= vehicle->var_4E >> 5; - sint16 ax = vehicle->swinging_car_var_0; + int16_t ax = vehicle->swinging_car_var_0; if (ax > dx) { ax = dx; @@ -7034,7 +7034,7 @@ static void vehicle_update_swinging_car(rct_vehicle * vehicle) } vehicle->swinging_car_var_0 = ax; - uint8 swingSprite = 11; + uint8_t swingSprite = 11; if (ax >= -10012) { swingSprite = 12; @@ -7109,7 +7109,7 @@ enum R9_SPIN }; -static const uint8 TrackTypeToSpinFunction[256] = { +static const uint8_t TrackTypeToSpinFunction[256] = { NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, L8_SPIN, R8_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, NO_SPIN, @@ -7157,10 +7157,10 @@ static void vehicle_update_spinning_car(rct_vehicle * vehicle) { return; } - sint32 spinningInertia = vehicleEntry->spinning_inertia; - sint32 trackType = vehicle->track_type >> 2; - sint32 dword_F64E08 = _vehicleVelocityF64E08; - sint32 spinSpeed; + int32_t spinningInertia = vehicleEntry->spinning_inertia; + int32_t trackType = vehicle->track_type >> 2; + int32_t dword_F64E08 = _vehicleVelocityF64E08; + int32_t spinSpeed; // An L spin adds to the spin speed, R does the opposite // The number indicates how much right shift of the velocity will become spin // The bigger the number the less change in spin. @@ -7245,7 +7245,7 @@ static void vehicle_update_spinning_car(rct_vehicle * vehicle) break; } - spinSpeed = Math::Clamp(static_cast(-VEHICLE_MAX_SPIN_SPEED), vehicle->spin_speed, static_cast(VEHICLE_MAX_SPIN_SPEED)); + spinSpeed = Math::Clamp(static_cast(-VEHICLE_MAX_SPIN_SPEED), vehicle->spin_speed, static_cast(VEHICLE_MAX_SPIN_SPEED)); vehicle->spin_speed = spinSpeed; vehicle->spin_sprite += spinSpeed >> 8; // Note this actually increases the spin speed if going right! @@ -7257,7 +7257,7 @@ static void vehicle_update_spinning_car(rct_vehicle * vehicle) * * rct2: 0x006734B2 */ -static void steam_particle_create(sint16 x, sint16 y, sint16 z) +static void steam_particle_create(int16_t x, int16_t y, int16_t z) { rct_tile_element * tileElement = map_get_surface_element_at({x, y}); if (tileElement != nullptr && z > tileElement->base_height * 8) @@ -7283,10 +7283,10 @@ static void steam_particle_create(sint16 x, sint16 y, sint16 z) */ static void vehicle_update_additional_animation(rct_vehicle * vehicle) { - uint8 al, ah; - uint32 eax; + uint8_t al, ah; + uint32_t eax; - uint32 * var_C8 = (uint32 *)&vehicle->var_C8; + uint32_t * var_C8 = (uint32_t *)&vehicle->var_C8; rct_ride_entry_vehicle * vehicleEntry = vehicle_get_vehicle_entry(vehicle); if (vehicleEntry == nullptr) { @@ -7310,7 +7310,7 @@ static void vehicle_update_additional_animation(rct_vehicle * vehicle) if (ride->entrance_style == RIDE_ENTRANCE_STYLE_PLAIN || (vehicle->status != VEHICLE_STATUS_MOVING_TO_END_OF_STATION && vehicle->status != VEHICLE_STATUS_ARRIVING)) { - sint32 index = vehicle->sprite_direction >> 1; + int32_t index = vehicle->sprite_direction >> 1; if (vehicle->vehicle_sprite_type == 2) { index += 16; @@ -7432,10 +7432,10 @@ static void vehicle_update_additional_animation(rct_vehicle * vehicle) static void vehicle_play_scenery_door_open_sound(rct_vehicle * vehicle, rct_tile_element * tileElement) { rct_scenery_entry * wallEntry = get_wall_entry(tileElement->properties.wall.type); - sint32 doorSoundType = wall_entry_get_door_sound(wallEntry); + int32_t doorSoundType = wall_entry_get_door_sound(wallEntry); if (doorSoundType != 0) { - sint32 soundId = DoorOpenSoundIds[doorSoundType - 1]; + int32_t soundId = DoorOpenSoundIds[doorSoundType - 1]; if (soundId != 255) { audio_play_sound_at_location(soundId, vehicle->x, vehicle->track_y, vehicle->track_z); @@ -7450,10 +7450,10 @@ static void vehicle_play_scenery_door_open_sound(rct_vehicle * vehicle, rct_tile static void vehicle_play_scenery_door_close_sound(rct_vehicle * vehicle, rct_tile_element * tileElement) { rct_scenery_entry * wallEntry = get_wall_entry(tileElement->properties.wall.type); - sint32 doorSoundType = wall_entry_get_door_sound(wallEntry); + int32_t doorSoundType = wall_entry_get_door_sound(wallEntry); if (doorSoundType != 0) { - sint32 soundId = DoorCloseSoundIds[doorSoundType - 1]; + int32_t soundId = DoorCloseSoundIds[doorSoundType - 1]; if (soundId != 255) { audio_play_sound_at_location(soundId, vehicle->x, vehicle->track_y, vehicle->track_z); @@ -7467,17 +7467,17 @@ static void vehicle_play_scenery_door_close_sound(rct_vehicle * vehicle, rct_til */ static void vehicle_update_scenery_door(rct_vehicle * vehicle) { - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; const rct_preview_track * trackBlock = TrackBlocks[trackType]; while ((trackBlock + 1)->index != 255) { trackBlock++; } const rct_track_coordinates * trackCoordinates = &TrackCoordinates[trackType]; - sint32 x = floor2(vehicle->x, 32); - sint32 y = floor2(vehicle->y, 32); - sint32 z = (vehicle->track_z - trackBlock->z + trackCoordinates->z_end) >> 3; - sint32 direction = (vehicle->track_direction + trackCoordinates->rotation_end) & 3; + int32_t x = floor2(vehicle->x, 32); + int32_t y = floor2(vehicle->y, 32); + int32_t z = (vehicle->track_z - trackBlock->z + trackCoordinates->z_end) >> 3; + int32_t direction = (vehicle->track_direction + trackCoordinates->rotation_end) & 3; rct_tile_element * tileElement = map_get_wall_element_at(x, y, z, direction); if (tileElement == nullptr) @@ -7507,18 +7507,18 @@ static void vehicle_update_scenery_door(rct_vehicle * vehicle) static bool loc_6DB38B(rct_vehicle * vehicle, rct_tile_element * tileElement) { // Get bank - sint32 bankStart = track_get_actual_bank_3(vehicle, tileElement); + int32_t bankStart = track_get_actual_bank_3(vehicle, tileElement); // Get vangle - sint32 trackType = track_element_get_type(tileElement); - sint32 vangleStart = TrackDefinitions[trackType].vangle_start; + int32_t trackType = track_element_get_type(tileElement); + int32_t vangleStart = TrackDefinitions[trackType].vangle_start; return vangleStart == _vehicleVAngleEndF64E36 && bankStart == _vehicleBankEndF64E37; } static void loc_6DB481(rct_vehicle * vehicle) { - uint16 probability = 0x8000; + uint16_t probability = 0x8000; if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_6) { vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_6; @@ -7550,13 +7550,13 @@ static void vehicle_trigger_on_ride_photo(rct_vehicle * vehicle, rct_tile_elemen */ static void vehicle_update_handle_scenery_door(rct_vehicle * vehicle) { - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; const rct_preview_track * trackBlock = TrackBlocks[trackType]; const rct_track_coordinates * trackCoordinates = &TrackCoordinates[trackType]; - sint32 x = vehicle->track_x; - sint32 y = vehicle->track_y; - sint32 z = (vehicle->track_z - trackBlock->z + trackCoordinates->z_begin) >> 3; - sint32 direction = (vehicle->track_direction + trackCoordinates->rotation_begin) & 3; + int32_t x = vehicle->track_x; + int32_t y = vehicle->track_y; + int32_t z = (vehicle->track_z - trackBlock->z + trackCoordinates->z_begin) >> 3; + int32_t direction = (vehicle->track_direction + trackCoordinates->rotation_begin) & 3; direction ^= 2; rct_tile_element * tileElement = map_get_wall_element_at(x, y, z, direction); @@ -7597,7 +7597,7 @@ static void vehicle_update_play_water_splash_sound() static void vehicle_update_handle_water_splash(rct_vehicle * vehicle) { rct_ride_entry * rideEntry = get_ride_entry(vehicle->ride_subtype); - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; if (!(rideEntry->flags & RIDE_ENTRY_FLAG_PLAY_SPLASH_SOUND)) { @@ -7649,9 +7649,9 @@ static void vehicle_update_handle_water_splash(rct_vehicle * vehicle) static void vehicle_update_reverser_car_bogies(rct_vehicle * vehicle) { const rct_vehicle_info * moveInfo = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, vehicle->track_progress); - sint32 x = vehicle->track_x + moveInfo->x; - sint32 y = vehicle->track_y + moveInfo->y; - sint32 z = vehicle->z; + int32_t x = vehicle->track_x + moveInfo->x; + int32_t y = vehicle->track_y + moveInfo->y; + int32_t z = vehicle->z; sprite_move(x, y, z, (rct_sprite *)vehicle); } @@ -7664,8 +7664,8 @@ static void vehicle_update_reverser_car_bogies(rct_vehicle * vehicle) * @param z (dx) * @param otherVehicleIndex (bp) */ -static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sint16 x, sint16 y, sint16 z, - uint16 * otherVehicleIndex) +static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, int16_t x, int16_t y, int16_t z, + uint16_t * otherVehicleIndex) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_1) return false; @@ -7689,35 +7689,35 @@ static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sin if (vehicle == collideVehicle) return false; - sint32 x_diff = abs(x - collideVehicle->x); + int32_t x_diff = abs(x - collideVehicle->x); if (x_diff > 0x7FFF) return false; - sint32 y_diff = abs(y - collideVehicle->y); + int32_t y_diff = abs(y - collideVehicle->y); if (y_diff > 0x7FFF) return false; - sint32 z_diff = abs(z - collideVehicle->z); + int32_t z_diff = abs(z - collideVehicle->z); if (x_diff + y_diff + z_diff > 0xFFFF) return false; - uint16 ecx = std::min(vehicle->var_44 + collideVehicle->var_44, 560); + uint16_t ecx = std::min(vehicle->var_44 + collideVehicle->var_44, 560); ecx = ((ecx >> 1) * 30) >> 8; if (x_diff + y_diff + z_diff >= ecx) return false; - uint8 direction = (vehicle->sprite_direction - collideVehicle->sprite_direction + 7) & 0x1F; + uint8_t direction = (vehicle->sprite_direction - collideVehicle->sprite_direction + 7) & 0x1F; if (direction >= 0xF) return false; return true; } - LocationXY8 location = { static_cast(x / 32), static_cast(y / 32) }; + LocationXY8 location = { static_cast(x / 32), static_cast(y / 32) }; bool mayCollide = false; - uint16 collideId = SPRITE_INDEX_NULL; + uint16_t collideId = SPRITE_INDEX_NULL; rct_vehicle * collideVehicle = nullptr; for (auto xy_offset : Unk9A37C4) { @@ -7734,7 +7734,7 @@ static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sin if (collideVehicle->sprite_identifier != SPRITE_IDENTIFIER_VEHICLE) continue; - sint32 z_diff = abs(collideVehicle->z - z); + int32_t z_diff = abs(collideVehicle->z - z); if (z_diff > 16) continue; @@ -7749,23 +7749,23 @@ static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sin if (!(collideType->flags & VEHICLE_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION)) continue; - uint32 x_diff = abs(collideVehicle->x - x); + uint32_t x_diff = abs(collideVehicle->x - x); if (x_diff > 0x7FFF) continue; - uint32 y_diff = abs(collideVehicle->y - y); + uint32_t y_diff = abs(collideVehicle->y - y); if (y_diff > 0x7FFF) continue; - uint8 cl = std::min(vehicle->var_CD, collideVehicle->var_CD); - uint8 ch = std::max(vehicle->var_CD, collideVehicle->var_CD); + uint8_t cl = std::min(vehicle->var_CD, collideVehicle->var_CD); + uint8_t ch = std::max(vehicle->var_CD, collideVehicle->var_CD); if (cl != ch) { if (cl == 5 && ch == 6) continue; } - uint32 ecx = vehicle->var_44 + collideVehicle->var_44; + uint32_t ecx = vehicle->var_44 + collideVehicle->var_44; ecx = ((ecx >> 1) * 30) >> 8; if (x_diff + y_diff >= ecx) @@ -7777,15 +7777,15 @@ static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sin break; } - uint8 direction = (vehicle->sprite_direction - collideVehicle->sprite_direction - 6) & 0x1F; + uint8_t direction = (vehicle->sprite_direction - collideVehicle->sprite_direction - 6) & 0x1F; if (direction < 0x14) continue; - uint32 offsetSpriteDirection = (vehicle->sprite_direction + 4) & 31; - uint32 offsetDirection = offsetSpriteDirection >> 3; - uint32 next_x_diff = abs(x + AvoidCollisionMoveOffset[offsetDirection].x - collideVehicle->x); - uint32 next_y_diff = abs(y + AvoidCollisionMoveOffset[offsetDirection].y - collideVehicle->y); + uint32_t offsetSpriteDirection = (vehicle->sprite_direction + 4) & 31; + uint32_t offsetDirection = offsetSpriteDirection >> 3; + uint32_t next_x_diff = abs(x + AvoidCollisionMoveOffset[offsetDirection].x - collideVehicle->x); + uint32_t next_y_diff = abs(y + AvoidCollisionMoveOffset[offsetDirection].y - collideVehicle->y); if (next_x_diff + next_y_diff < x_diff + y_diff) { @@ -7893,7 +7893,7 @@ static void sub_6DBF3E(rct_vehicle * vehicle) return; } - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; if (!(TrackSequenceProperties[trackType][0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { return; @@ -7923,7 +7923,7 @@ static void sub_6DBF3E(rct_vehicle * vehicle) if (vehicle->track_progress > 3 && !(vehicle->update_flags & VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE)) { CoordsXYE input, output; - sint32 outputZ, outputDirection; + int32_t outputZ, outputDirection; input.x = vehicle->track_x; input.y = vehicle->track_y; @@ -7945,7 +7945,7 @@ static void sub_6DBF3E(rct_vehicle * vehicle) return; } - uint16 ax = vehicle->track_progress; + uint16_t ax = vehicle->track_progress; if (_vehicleVelocityF64E08 < 0) { if (ax <= 22) @@ -7955,7 +7955,7 @@ static void sub_6DBF3E(rct_vehicle * vehicle) } else { - uint16 cx = 17; + uint16_t cx = 17; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_CHAIRLIFT) { cx = 6; @@ -7976,7 +7976,7 @@ static void sub_6DBF3E(rct_vehicle * vehicle) * * rct2: 0x006DB08C */ -static bool vehicle_update_track_motion_forwards_get_new_track(rct_vehicle * vehicle, uint16 trackType, Ride * ride, +static bool vehicle_update_track_motion_forwards_get_new_track(rct_vehicle * vehicle, uint16_t trackType, Ride * ride, rct_ride_entry * rideEntry) { registers regs = {}; @@ -8053,7 +8053,7 @@ loc_6DB32A: loc_6DB358: { CoordsXYE xyElement; - sint32 z, direction; + int32_t z, direction; xyElement.x = vehicle->track_x; xyElement.y = vehicle->track_y; xyElement.element = tileElement; @@ -8084,7 +8084,7 @@ loc_6DB358: // Update VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES flag vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES; { - sint32 rideType = get_ride(track_element_get_ride_index(tileElement))->type; + int32_t rideType = get_ride(track_element_get_ride_index(tileElement))->type; if (RideData4[rideType].flags & RIDE_TYPE_FLAG4_HAS_ALTERNATIVE_TRACK_TYPE) { if (track_element_is_inverted(tileElement)) @@ -8123,7 +8123,7 @@ loc_6DB41D: if (vehicle->var_CD != 0 && vehicle->var_CD < 5) { - LocationXY8 curLocation = { static_cast(regs.ax >> 5), static_cast(regs.cx >> 5) }; + LocationXY8 curLocation = { static_cast(regs.ax >> 5), static_cast(regs.cx >> 5) }; regs.dx >>= 3; if (curLocation.xy == ride->chairlift_bullwheel_location[1].xy && regs.dl == ride->chairlift_bullwheel_z[1]) @@ -8157,7 +8157,7 @@ loc_6DB41D: vehicle_trigger_on_ride_photo(vehicle, tileElement); } { - uint16 rideType = get_ride(track_element_get_ride_index(tileElement))->type; + uint16_t rideType = get_ride(track_element_get_ride_index(tileElement))->type; if (trackType == TRACK_ELEM_ROTATION_CONTROL_TOGGLE && rideType == RIDE_TYPE_STEEL_WILD_MOUSE) { vehicle->update_flags ^= VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE; @@ -8180,7 +8180,7 @@ static bool vehicle_update_track_motion_forwards(rct_vehicle * vehicle, rct_ride loc_6DAEB9: regs.edi = vehicle->track_type; regs.cx = vehicle->track_type >> 2; - sint32 trackType = vehicle->track_type >> 2; + int32_t trackType = vehicle->track_type >> 2; if (trackType == TRACK_ELEM_HEARTLINE_TRANSFER_UP || trackType == TRACK_ELEM_HEARTLINE_TRANSFER_DOWN) { if (vehicle->track_progress == 80) @@ -8272,7 +8272,7 @@ loc_6DAEB9: const rct_vehicle_info * moveInfo = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, 0); // Track Total Progress is in the two bytes before the move info list - uint16 trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); + uint16_t trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); if (regs.ax >= trackTotalProgress) { vehicle_update_crossings(vehicle); @@ -8291,9 +8291,9 @@ loc_6DAEB9: moveInfo = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, vehicle->track_progress); trackType = vehicle->track_type >> 2; { - sint16 x = vehicle->track_x + moveInfo->x; - sint16 y = vehicle->track_y + moveInfo->y; - sint16 z = vehicle->track_z + moveInfo->z + RideData5[ride->type].z_offset; + int16_t x = vehicle->track_x + moveInfo->x; + int16_t y = vehicle->track_y + moveInfo->y; + int16_t z = vehicle->track_z + moveInfo->z + RideData5[ride->type].z_offset; regs.ebx = 0; if (x != unk_F64E20.x) @@ -8351,7 +8351,7 @@ loc_6DAEB9: if (_vehicleVelocityF64E08 >= 0) { regs.bp = vehicle->prev_vehicle_on_ride; - if (vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16 *)®s.bp)) + if (vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16_t *)®s.bp)) { goto loc_6DB967; } @@ -8404,7 +8404,7 @@ loc_6DB967: } else { - sint32 newHeadVelocity = vehicle->velocity >> 1; + int32_t newHeadVelocity = vehicle->velocity >> 1; vehicle->velocity = head->velocity >> 1; head->velocity = newHeadVelocity; } @@ -8416,8 +8416,8 @@ loc_6DB967: * * rct2: 0x006DBAA6 */ -static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle * vehicle, uint16 trackType, Ride * ride, - uint16 * progress) +static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle * vehicle, uint16_t trackType, Ride * ride, + uint16_t * progress) { _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_start; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_start; @@ -8428,11 +8428,11 @@ static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle * ve return false; bool nextTileBackwards = true; - sint32 direction; + int32_t direction; // loc_6DBB08:; - sint16 x = vehicle->track_x; - sint16 y = vehicle->track_y; - sint16 z = 0; + int16_t x = vehicle->track_x; + int16_t y = vehicle->track_y; + int16_t z = 0; switch (vehicle->var_CD) { @@ -8469,9 +8469,9 @@ static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle * ve } bool isInverted = ((vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) > 0) ^ track_element_is_inverted(tileElement); - sint32 bank = TrackDefinitions[trackType].bank_end; + int32_t bank = TrackDefinitions[trackType].bank_end; bank = track_get_actual_bank_2(ride->type, isInverted, bank); - sint32 vAngle = TrackDefinitions[trackType].vangle_end; + int32_t vAngle = TrackDefinitions[trackType].vangle_end; if (_vehicleVAngleEndF64E36 != vAngle || _vehicleBankEndF64E37 != bank) { return false; @@ -8497,7 +8497,7 @@ static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle * ve // loc_6DBB4F:; CoordsXYE input; CoordsXYE output; - sint32 outputZ; + int32_t outputZ; input.x = x; input.y = y; @@ -8572,7 +8572,7 @@ static bool vehicle_update_track_motion_backwards_get_new_track(rct_vehicle * ve vehicle->brake_speed = tile_element_get_brake_booster_speed(tileElement); // There are two bytes before the move info list - uint16 trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); + uint16_t trackTotalProgress = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); *progress = trackTotalProgress - 1; return true; } @@ -8587,10 +8587,10 @@ static bool vehicle_update_track_motion_backwards(rct_vehicle * vehicle, rct_rid registers regs = {}; loc_6DBA33:; - uint16 trackType = vehicle->track_type >> 2; + uint16_t trackType = vehicle->track_type >> 2; if (trackType == TRACK_ELEM_FLAT && ride->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) { - sint32 unkVelocity = _vehicleVelocityF64E08; + int32_t unkVelocity = _vehicleVelocityF64E08; if (unkVelocity < -524288) { unkVelocity = abs(unkVelocity); @@ -8624,7 +8624,7 @@ loc_6DBA33:; { vehicle_update_crossings(vehicle); - if (!vehicle_update_track_motion_backwards_get_new_track(vehicle, trackType, ride, (uint16 *)®s.ax)) + if (!vehicle_update_track_motion_backwards_get_new_track(vehicle, trackType, ride, (uint16_t *)®s.ax)) { goto loc_6DBE5E; } @@ -8635,9 +8635,9 @@ loc_6DBA33:; { const rct_vehicle_info * moveInfo = vehicle_get_move_info(vehicle->var_CD, vehicle->track_type, vehicle->track_progress); - sint16 x = vehicle->track_x + moveInfo->x; - sint16 y = vehicle->track_y + moveInfo->y; - sint16 z = vehicle->track_z + moveInfo->z + RideData5[ride->type].z_offset; + int16_t x = vehicle->track_x + moveInfo->x; + int16_t y = vehicle->track_y + moveInfo->y; + int16_t z = vehicle->track_z + moveInfo->z + RideData5[ride->type].z_offset; regs.ebx = 0; if (x != unk_F64E20.x) @@ -8674,7 +8674,7 @@ loc_6DBA33:; if (_vehicleVelocityF64E08 < 0) { regs.bp = vehicle->next_vehicle_on_ride; - if (vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16 *)®s.bp)) + if (vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16_t *)®s.bp)) { goto loc_6DBE7F; } @@ -8727,7 +8727,7 @@ loc_6DBE7F: } else { - sint32 v3Velocity = v3->velocity; + int32_t v3Velocity = v3->velocity; v3->velocity = v4->velocity >> 1; v4->velocity = v3Velocity >> 1; _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_2; @@ -8741,7 +8741,7 @@ loc_6DBE7F: * * */ -static sint32 vehicle_update_track_motion_mini_golf(rct_vehicle * vehicle, sint32 * outStation) +static int32_t vehicle_update_track_motion_mini_golf(rct_vehicle * vehicle, int32_t * outStation) { registers regs = {}; @@ -8792,7 +8792,7 @@ loc_6DC462: loc_6DC476: if (vehicle->mini_golf_flags & (1 << 2)) { - uint8 nextFrame = vehicle->animation_frame + 1; + uint8_t nextFrame = vehicle->animation_frame + 1; if (nextFrame < mini_golf_peep_animation_lengths[vehicle->mini_golf_current_animation]) { vehicle->animation_frame = nextFrame; @@ -8869,8 +8869,8 @@ loc_6DC476: // There are two bytes before the move info list { - uint16 unk16_v34 = vehicle->track_progress + 1; - uint16 unk16 = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); + uint16_t unk16_v34 = vehicle->track_progress + 1; + uint16_t unk16 = vehicle_get_move_info_size(vehicle->var_CD, vehicle->track_type); if (unk16_v34 < unk16) { regs.ax = unk16_v34; @@ -8879,17 +8879,17 @@ loc_6DC476: } { - uint16 trackType = vehicle->track_type >> 2; + uint16_t trackType = vehicle->track_type >> 2; _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_end; tileElement = map_get_track_element_at_of_type_seq(vehicle->track_x, vehicle->track_y, vehicle->track_z >> 3, trackType, 0); } - sint16 x, y, z; - sint32 direction; + int16_t x, y, z; + int32_t direction; { CoordsXYE input, output; - sint32 outZ, outDirection; + int32_t outZ, outDirection; input.x = vehicle->track_x; input.y = vehicle->track_y; input.element = tileElement; @@ -8910,7 +8910,7 @@ loc_6DC476: } { - sint32 rideType = get_ride(track_element_get_ride_index(tileElement))->type; + int32_t rideType = get_ride(track_element_get_ride_index(tileElement))->type; vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES; if (RideData4[rideType].flags & RIDE_TYPE_FLAG4_HAS_ALTERNATIVE_TRACK_TYPE) { @@ -8968,7 +8968,7 @@ loc_6DC743: } else { - uint16 rand16 = scenario_rand() & 0xFFFF; + uint16_t rand16 = scenario_rand() & 0xFFFF; regs.bl = 14; if (rand16 <= 0xA000) { @@ -8983,7 +8983,7 @@ loc_6DC743: vehicle->track_progress++; break; case 1: // loc_6DC7ED - vehicle->var_D3 = (uint8)moveInfo->z; + vehicle->var_D3 = (uint8_t)moveInfo->z; vehicle->track_progress++; break; case 2: // loc_6DC800 @@ -9018,7 +9018,7 @@ loc_6DC743: } } } - vehicle->mini_golf_current_animation = (uint8)z; + vehicle->mini_golf_current_animation = (uint8_t)z; vehicle->animation_frame = 0; vehicle->track_progress++; break; @@ -9086,7 +9086,7 @@ loc_6DC743: if (_vehicleVelocityF64E08 >= 0) { regs.bp = vehicle->prev_vehicle_on_ride; - vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16 *)®s.bp); + vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16_t *)®s.bp); } } goto loc_6DC99A; @@ -9129,13 +9129,13 @@ loc_6DCA7A: loc_6DCA9A: regs.ax = vehicle->track_progress - 1; - if ((uint16)regs.ax != 0xFFFF) + if ((uint16_t)regs.ax != 0xFFFF) { goto loc_6DCC2C; } { - uint16 trackType = vehicle->track_type >> 2; + uint16_t trackType = vehicle->track_type >> 2; _vehicleVAngleEndF64E36 = TrackDefinitions[trackType].vangle_end; _vehicleBankEndF64E37 = TrackDefinitions[trackType].bank_end; @@ -9161,7 +9161,7 @@ loc_6DCA9A: } { - sint32 rideType = get_ride(track_element_get_ride_index(tileElement))->type; + int32_t rideType = get_ride(track_element_get_ride_index(tileElement))->type; vehicle->update_flags &= ~VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES; if (RideData4[rideType].flags & RIDE_TYPE_FLAG4_HAS_ALTERNATIVE_TRACK_TYPE) { @@ -9245,7 +9245,7 @@ loc_6DCC2C: if (_vehicleVelocityF64E08 >= 0) { regs.bp = vehicle->var_44; - if (vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16 *)®s.bp)) + if (vehicle_update_motion_collision_detection(vehicle, x, y, z, (uint16_t *)®s.bp)) { goto loc_6DCD6B; } @@ -9301,7 +9301,7 @@ loc_6DCE02: goto loc_6DCEB2; } { - uint16 trackType = vehicle->track_type >> 2; + uint16_t trackType = vehicle->track_type >> 2; if (!(TrackSequenceProperties[trackType][0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { goto loc_6DCEB2; @@ -9339,13 +9339,13 @@ loc_6DCE68: regs.al = vehicle->track_x >> 5; regs.ah = vehicle->track_y >> 5; regs.dl = vehicle->track_z >> 3; - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { - if ((uint16)regs.ax != ride->station_starts[i].xy) + if ((uint16_t)regs.ax != ride->station_starts[i].xy) { continue; } - if ((uint16)regs.dl != ride->station_heights[i]) + if ((uint16_t)regs.dl != ride->station_heights[i]) { continue; } @@ -9360,11 +9360,11 @@ loc_6DCEB2: if (_vehicleVelocityF64E08 >= 0) { regs.si = vehicle->next_vehicle_on_train; - if ((uint16)regs.si == SPRITE_INDEX_NULL) + if ((uint16_t)regs.si == SPRITE_INDEX_NULL) { goto loc_6DCEFF; } - vehicle = GET_VEHICLE((uint16)regs.si); + vehicle = GET_VEHICLE((uint16_t)regs.si); goto loc_6DC40E; } @@ -9389,11 +9389,11 @@ loc_6DCEFF: regs.bp += vehicle->mass; regs.eax += vehicle->acceleration; regs.si = vehicle->next_vehicle_on_train; - if ((uint16)regs.si == SPRITE_INDEX_NULL) + if ((uint16_t)regs.si == SPRITE_INDEX_NULL) { break; } - vehicle = GET_VEHICLE((uint16)regs.si); + vehicle = GET_VEHICLE((uint16_t)regs.si); } vehicle = gCurrentVehicle; @@ -9452,7 +9452,7 @@ loc_6DCEFF: if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SPINNING) { - vehicle->spin_speed = Math::Clamp(static_cast(-VEHICLE_MAX_SPIN_SPEED_WATER_RIDE), vehicle->spin_speed, static_cast(VEHICLE_MAX_SPIN_SPEED_WATER_RIDE)); + vehicle->spin_speed = Math::Clamp(static_cast(-VEHICLE_MAX_SPIN_SPEED_WATER_RIDE), vehicle->spin_speed, static_cast(VEHICLE_MAX_SPIN_SPEED_WATER_RIDE)); } if (vehicle->vehicle_sprite_type != 0) @@ -9491,7 +9491,7 @@ loc_6DD069: * * rct2: 0x006DC1E4 */ -static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * vehicle, rct_ride_entry_vehicle * vehicleEntry, uint32 totalMass, sint32 * acceleration) +static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * vehicle, rct_ride_entry_vehicle * vehicleEntry, uint32_t totalMass, int32_t * acceleration) { if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_POWERED_RIDE_UNRESTRICTED_GRAVITY) { @@ -9518,8 +9518,8 @@ static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * HALF_SPEED }; - uint8 speedModifier = FULL_SPEED; - uint16 trackType = vehicle->track_direction >> 2; + uint8_t speedModifier = FULL_SPEED; + uint16_t trackType = vehicle->track_direction >> 2; if (trackType == TRACK_ELEM_LEFT_QUARTER_TURN_1_TILE) { @@ -9530,7 +9530,7 @@ static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * speedModifier = (vehicle->var_CD == 6) ? HALF_SPEED : THREE_QUARTER_SPEED; } - uint8 speed = vehicle->speed; + uint8_t speed = vehicle->speed; switch (speedModifier) { case HALF_SPEED: @@ -9541,8 +9541,8 @@ static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * break; } - sint32 poweredAcceleration = speed << 14; - sint32 quarterForce = (speed * totalMass) >> 2; + int32_t poweredAcceleration = speed << 14; + int32_t quarterForce = (speed * totalMass) >> 2; if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE) { poweredAcceleration = -poweredAcceleration; @@ -9568,8 +9568,8 @@ static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SPINNING) { - vehicle->spin_speed = Math::Clamp(static_cast(-VEHICLE_MAX_SPIN_SPEED_WATER_RIDE), - vehicle->spin_speed, static_cast(VEHICLE_MAX_SPIN_SPEED_WATER_RIDE)); + vehicle->spin_speed = Math::Clamp(static_cast(-VEHICLE_MAX_SPIN_SPEED_WATER_RIDE), + vehicle->spin_speed, static_cast(VEHICLE_MAX_SPIN_SPEED_WATER_RIDE)); } if (vehicle->vehicle_sprite_type != 0) @@ -9604,7 +9604,7 @@ static void vehicle_update_track_motion_powered_ride_acceleration(rct_vehicle * * * rct2: 0x006DAB4C */ -sint32 vehicle_update_track_motion(rct_vehicle * vehicle, sint32 * outStation) +int32_t vehicle_update_track_motion(rct_vehicle * vehicle, int32_t * outStation) { registers regs = {}; @@ -9639,7 +9639,7 @@ sint32 vehicle_update_track_motion(rct_vehicle * vehicle, sint32 * outStation) // backwards. _vehicleFrontVehicle = vehicle; - uint16 spriteId = vehicle->sprite_index; + uint16_t spriteId = vehicle->sprite_index; while (spriteId != SPRITE_INDEX_NULL) { rct_vehicle * car = GET_VEHICLE(spriteId); @@ -9748,13 +9748,13 @@ sint32 vehicle_update_track_motion(rct_vehicle * vehicle, sint32 * outStation) vehicleEntry = vehicle_get_vehicle_entry(vehicle); // eax - sint32 totalAcceleration = 0; + int32_t totalAcceleration = 0; // ebp - sint32 totalMass = 0; + int32_t totalMass = 0; // Not used regs.dx = 0; // ebx - sint32 numVehicles = 0; + int32_t numVehicles = 0; for (;;) { @@ -9764,7 +9764,7 @@ sint32 vehicle_update_track_motion(rct_vehicle * vehicle, sint32 * outStation) totalMass += vehicle->mass; totalAcceleration += vehicle->acceleration; - uint16 spriteIndex = vehicle->next_vehicle_on_train; + uint16_t spriteIndex = vehicle->next_vehicle_on_train; if (spriteIndex == SPRITE_INDEX_NULL) { break; @@ -9779,7 +9779,7 @@ sint32 vehicle_update_track_motion(rct_vehicle * vehicle, sint32 * outStation) regs.eax += 511; } regs.eax >>= 9; - sint32 acceleration = regs.eax; + int32_t acceleration = regs.eax; regs.eax = vehicle->velocity; if (regs.eax < 0) { @@ -9871,10 +9871,10 @@ rct_ride_entry_vehicle * vehicle_get_vehicle_entry(const rct_vehicle * vehicle) return &rideEntry->vehicles[vehicle->vehicle_type]; } -sint32 vehicle_get_total_num_peeps(const rct_vehicle * vehicle) +int32_t vehicle_get_total_num_peeps(const rct_vehicle * vehicle) { - uint16 spriteIndex; - sint32 numPeeps = 0; + uint16_t spriteIndex; + int32_t numPeeps = 0; for (;;) { numPeeps += vehicle->num_peeps; @@ -9924,7 +9924,7 @@ void vehicle_update_crossings(const rct_vehicle * vehicle) CoordsXYE xyElement; track_begin_end output; - sint32 z, direction; + int32_t z, direction; xyElement.x = frontVehicle->track_x; xyElement.y = frontVehicle->track_y; @@ -9936,8 +9936,8 @@ void vehicle_update_crossings(const rct_vehicle * vehicle) if (xyElement.element && vehicle->status != VEHICLE_STATUS_ARRIVING) { - sint16 autoReserveAhead = 4 + abs(vehicle->velocity) / 150000; - sint16 crossingBonus = 0; + int16_t autoReserveAhead = 4 + abs(vehicle->velocity) / 150000; + int16_t crossingBonus = 0; bool playedClaxon = false; // vehicle positions mean we have to take larger @@ -10013,7 +10013,7 @@ void vehicle_update_crossings(const rct_vehicle * vehicle) if (xyElement.element) { - uint8 freeCount = travellingForwards? 3 : 1; + uint8_t freeCount = travellingForwards? 3 : 1; while (freeCount-- > 0) { diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index fffcbbf8d7..907d930c76 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -17,8 +17,8 @@ #include "../world/Location.hpp" struct rct_vehicle_colour { - uint8 body_colour; - uint8 trim_colour; + uint8_t body_colour; + uint8_t trim_colour; }; #ifdef __TESTPAINT__ @@ -29,55 +29,55 @@ struct rct_vehicle_colour { * size: 0x65 */ struct rct_ride_entry_vehicle { - uint16 rotation_frame_mask; // 0x00 , 0x1A - uint8 num_vertical_frames; // 0x02 , 0x1C, Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2) - uint8 num_horizontal_frames; // 0x03 , 0x1D, Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2) - uint32 spacing; // 0x04 , 0x1E - uint16 car_mass; // 0x08 , 0x22 - sint8 tab_height; // 0x0A , 0x24 - uint8 num_seats; // 0x0B , 0x25 - uint16 sprite_flags; // 0x0C , 0x26 - uint8 sprite_width; // 0x0E , 0x28 - uint8 sprite_height_negative; // 0x0F , 0x29 - uint8 sprite_height_positive; // 0x10 , 0x2A - uint8 animation; // 0x11 , 0x2B - uint32 flags; // 0x12 , 0x2C - uint16 base_num_frames; // 0x16 , 0x30, The number of sprites for a flat non-banked track piece. - uint32 base_image_id; // 0x18 , 0x32, Following image_id's populated during loading - uint32 restraint_image_id; // 0x1C , 0x36 - uint32 gentle_slope_image_id; // 0x20 , 0x3A - uint32 steep_slope_image_id; // 0x24 , 0x3E - uint32 vertical_slope_image_id; // 0x28 , 0x42 - uint32 diagonal_slope_image_id; // 0x2C , 0x46 - uint32 banked_image_id; // 0x30 , 0x4A - uint32 inline_twist_image_id; // 0x34 , 0x4E - uint32 flat_to_gentle_bank_image_id; // 0x38 , 0x52 - uint32 diagonal_to_gentle_slope_bank_image_id; // 0x3C , 0x56 - uint32 gentle_slope_to_bank_image_id; // 0x40 , 0x5A - uint32 gentle_slope_bank_turn_image_id; // 0x44 , 0x5E - uint32 flat_bank_to_gentle_slope_image_id; // 0x48 , 0x62 + uint16_t rotation_frame_mask; // 0x00 , 0x1A + uint8_t num_vertical_frames; // 0x02 , 0x1C, Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2) + uint8_t num_horizontal_frames; // 0x03 , 0x1D, Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2) + uint32_t spacing; // 0x04 , 0x1E + uint16_t car_mass; // 0x08 , 0x22 + int8_t tab_height; // 0x0A , 0x24 + uint8_t num_seats; // 0x0B , 0x25 + uint16_t sprite_flags; // 0x0C , 0x26 + uint8_t sprite_width; // 0x0E , 0x28 + uint8_t sprite_height_negative; // 0x0F , 0x29 + uint8_t sprite_height_positive; // 0x10 , 0x2A + uint8_t animation; // 0x11 , 0x2B + uint32_t flags; // 0x12 , 0x2C + uint16_t base_num_frames; // 0x16 , 0x30, The number of sprites for a flat non-banked track piece. + uint32_t base_image_id; // 0x18 , 0x32, Following image_id's populated during loading + uint32_t restraint_image_id; // 0x1C , 0x36 + uint32_t gentle_slope_image_id; // 0x20 , 0x3A + uint32_t steep_slope_image_id; // 0x24 , 0x3E + uint32_t vertical_slope_image_id; // 0x28 , 0x42 + uint32_t diagonal_slope_image_id; // 0x2C , 0x46 + uint32_t banked_image_id; // 0x30 , 0x4A + uint32_t inline_twist_image_id; // 0x34 , 0x4E + uint32_t flat_to_gentle_bank_image_id; // 0x38 , 0x52 + uint32_t diagonal_to_gentle_slope_bank_image_id; // 0x3C , 0x56 + uint32_t gentle_slope_to_bank_image_id; // 0x40 , 0x5A + uint32_t gentle_slope_bank_turn_image_id; // 0x44 , 0x5E + uint32_t flat_bank_to_gentle_slope_image_id; // 0x48 , 0x62 union { - uint32 curved_lift_hill_image_id; // 0x4C , 0x66 - uint32 corkscrew_image_id; // 0x4C , 0x66 + uint32_t curved_lift_hill_image_id; // 0x4C , 0x66 + uint32_t corkscrew_image_id; // 0x4C , 0x66 }; - uint32 no_vehicle_images; // 0x50 , 0x6A - uint8 no_seating_rows; // 0x54 , 0x6E - uint8 spinning_inertia; // 0x55 , 0x6F - uint8 spinning_friction; // 0x56 , 0x70 - uint8 friction_sound_id; // 0x57 , 0x71 - uint8 log_flume_reverser_vehicle_type; // 0x58 , 0x72 - uint8 sound_range; // 0x59 , 0x73 - uint8 double_sound_frequency; // 0x5A , 0x74 (Doubles the velocity when working out the sound frequency {used on go karts}) - uint8 powered_acceleration; // 0x5B , 0x75 - uint8 powered_max_speed; // 0x5C , 0x76 - uint8 car_visual; // 0x5D , 0x77 - uint8 effect_visual; - uint8 draw_order; - uint8 num_vertical_frames_override; // 0x60 , 0x7A, A custom number that can be used rather than letting RCT2 determine it. Needs the VEHICLE_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES flag to be set. - uint8 peep_loading_waypoint_segments; // 0x61 new - uint8 pad_62[6] = {}; // 0x62 , 0x7B + uint32_t no_vehicle_images; // 0x50 , 0x6A + uint8_t no_seating_rows; // 0x54 , 0x6E + uint8_t spinning_inertia; // 0x55 , 0x6F + uint8_t spinning_friction; // 0x56 , 0x70 + uint8_t friction_sound_id; // 0x57 , 0x71 + uint8_t log_flume_reverser_vehicle_type; // 0x58 , 0x72 + uint8_t sound_range; // 0x59 , 0x73 + uint8_t double_sound_frequency; // 0x5A , 0x74 (Doubles the velocity when working out the sound frequency {used on go karts}) + uint8_t powered_acceleration; // 0x5B , 0x75 + uint8_t powered_max_speed; // 0x5C , 0x76 + uint8_t car_visual; // 0x5D , 0x77 + uint8_t effect_visual; + uint8_t draw_order; + uint8_t num_vertical_frames_override; // 0x60 , 0x7A, A custom number that can be used rather than letting RCT2 determine it. Needs the VEHICLE_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES flag to be set. + uint8_t peep_loading_waypoint_segments; // 0x61 new + uint8_t pad_62[6] = {}; // 0x62 , 0x7B std::vector> peep_loading_waypoints = {}; - std::vector peep_loading_positions = {}; // previously 0x61 , 0x7B + std::vector peep_loading_positions = {}; // previously 0x61 , 0x7B }; #ifdef __TESTPAINT__ #pragma pack(pop) @@ -91,131 +91,131 @@ static_assert(sizeof(rct_ride_entry_vehicle) % 8 == 0, "Invalid struct size"); #endif struct rct_vehicle { - uint8 sprite_identifier; // 0x00 - uint8 is_child; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t is_child; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; // 0x1E - uint8 vehicle_sprite_type; // 0x1F - uint8 bank_rotation; // 0x20 - uint8 pad_21[3]; - sint32 remaining_distance; // 0x24 - sint32 velocity; // 0x28 - sint32 acceleration; // 0x2C - uint8 ride; // 0x30 - uint8 vehicle_type; // 0x31 + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; // 0x1E + uint8_t vehicle_sprite_type; // 0x1F + uint8_t bank_rotation; // 0x20 + uint8_t pad_21[3]; + int32_t remaining_distance; // 0x24 + int32_t velocity; // 0x28 + int32_t acceleration; // 0x2C + uint8_t ride; // 0x30 + uint8_t vehicle_type; // 0x31 rct_vehicle_colour colours; // 0x32 union { - uint16 track_progress; // 0x34 + uint16_t track_progress; // 0x34 struct { - sint8 var_34; - uint8 var_35; + int8_t var_34; + uint8_t var_35; }; }; union { - sint16 track_direction; // 0x36 (0000 0000 0000 0011) - sint16 track_type; // 0x36 (0000 0011 1111 1100) + int16_t track_direction; // 0x36 (0000 0000 0000 0011) + int16_t track_type; // 0x36 (0000 0011 1111 1100) LocationXY8 boat_location; // 0x36 }; - uint16 track_x; // 0x38 - uint16 track_y; // 0x3A - uint16 track_z; // 0x3C - uint16 next_vehicle_on_train; // 0x3E + uint16_t track_x; // 0x38 + uint16_t track_y; // 0x3A + uint16_t track_z; // 0x3C + uint16_t next_vehicle_on_train; // 0x3E // The previous vehicle on the same train or the last vehicle on the previous or only train. - uint16 prev_vehicle_on_ride; // 0x40 + uint16_t prev_vehicle_on_ride; // 0x40 // The next vehicle on the same train or the first vehicle on the next or only train - uint16 next_vehicle_on_ride; // 0x42 + uint16_t next_vehicle_on_ride; // 0x42 - uint16 var_44; - uint16 mass; // 0x46 - uint16 update_flags; // 0x48 - uint8 swing_sprite; - uint8 current_station; // 0x4B + uint16_t var_44; + uint16_t mass; // 0x46 + uint16_t update_flags; // 0x48 + uint8_t swing_sprite; + uint8_t current_station; // 0x4B union { - sint16 swinging_car_var_0; // 0x4C - sint16 current_time; // 0x4C + int16_t swinging_car_var_0; // 0x4C + int16_t current_time; // 0x4C struct { - sint8 ferris_wheel_var_0; // 0x4C - sint8 ferris_wheel_var_1; // 0x4D + int8_t ferris_wheel_var_0; // 0x4C + int8_t ferris_wheel_var_1; // 0x4D }; }; union { - sint16 var_4E; - sint16 crash_z; // 0x4E + int16_t var_4E; + int16_t crash_z; // 0x4E }; - uint8 status; // 0x50 - uint8 sub_state; // 0x51 - uint16 peep[32]; // 0x52 - uint8 peep_tshirt_colours[32]; // 0x92 - uint8 num_seats; // 0xB2 - uint8 num_peeps; // 0xB3 - uint8 next_free_seat; // 0xB4 - uint8 restraints_position; // 0xB5 0 == Close, 255 == Open + uint8_t status; // 0x50 + uint8_t sub_state; // 0x51 + uint16_t peep[32]; // 0x52 + uint8_t peep_tshirt_colours[32]; // 0x92 + uint8_t num_seats; // 0xB2 + uint8_t num_peeps; // 0xB3 + uint8_t next_free_seat; // 0xB4 + uint8_t restraints_position; // 0xB5 0 == Close, 255 == Open union { - sint16 spin_speed; // 0xB6 - sint16 crash_x; // 0xB6 + int16_t spin_speed; // 0xB6 + int16_t crash_x; // 0xB6 }; - uint16 sound2_flags; // 0xB8 - uint8 spin_sprite; // 0xBA lowest 3 bits not used for sprite selection (divide by 8 to use) - uint8 sound1_id; // 0xBB - uint8 sound1_volume; // 0xBC - uint8 sound2_id; // 0xBD - uint8 sound2_volume; // 0xBE - sint8 sound_vector_factor; + uint16_t sound2_flags; // 0xB8 + uint8_t spin_sprite; // 0xBA lowest 3 bits not used for sprite selection (divide by 8 to use) + uint8_t sound1_id; // 0xBB + uint8_t sound1_volume; // 0xBC + uint8_t sound2_id; // 0xBD + uint8_t sound2_volume; // 0xBE + int8_t sound_vector_factor; union { - uint16 var_C0; - sint16 crash_y; // 0xC0 - uint16 time_waiting; // 0xC0 - uint16 cable_lift_target; // 0xC0 + uint16_t var_C0; + int16_t crash_y; // 0xC0 + uint16_t time_waiting; // 0xC0 + uint16_t cable_lift_target; // 0xC0 }; - uint8 speed; // 0xC2 - uint8 powered_acceleration; // 0xC3 + uint8_t speed; // 0xC2 + uint8_t powered_acceleration; // 0xC3 union { - uint8 dodgems_collision_direction; // 0xC4 - uint8 var_C4; + uint8_t dodgems_collision_direction; // 0xC4 + uint8_t var_C4; }; - uint8 animation_frame; // 0xC5 - uint8 pad_C6[0x2]; - uint16 var_C8; - uint16 var_CA; - uint8 scream_sound_id; // 0xCC - uint8 var_CD; + uint8_t animation_frame; // 0xC5 + uint8_t pad_C6[0x2]; + uint16_t var_C8; + uint16_t var_CA; + uint8_t scream_sound_id; // 0xCC + uint8_t var_CD; union { - uint8 var_CE; - uint8 num_laps; // 0xCE + uint8_t var_CE; + uint8_t num_laps; // 0xCE }; union { - uint8 var_CF; - uint8 brake_speed; // 0xCF + uint8_t var_CF; + uint8_t brake_speed; // 0xCF }; - uint16 lost_time_out; // 0xD0 - sint8 vertical_drop_countdown; // 0xD1 - uint8 var_D3; - uint8 mini_golf_current_animation; - uint8 mini_golf_flags; // 0xD5 - uint8 ride_subtype; // 0xD6 - uint8 colours_extended; // 0xD7 - uint8 seat_rotation; // 0xD8 - uint8 target_seat_rotation; // 0xD9 + uint16_t lost_time_out; // 0xD0 + int8_t vertical_drop_countdown; // 0xD1 + uint8_t var_D3; + uint8_t mini_golf_current_animation; + uint8_t mini_golf_flags; // 0xD5 + uint8_t ride_subtype; // 0xD6 + uint8_t colours_extended; // 0xD7 + uint8_t seat_rotation; // 0xD8 + uint8_t target_seat_rotation; // 0xD9 }; struct train_ref { @@ -225,15 +225,15 @@ struct train_ref { // Size: 0x09 struct rct_vehicle_info { - sint16 x; // 0x00 - sint16 y; // 0x02 - sint16 z; // 0x04 - uint8 direction; // 0x06 - uint8 vehicle_sprite_type; // 0x07 - uint8 bank_rotation; // 0x08 + int16_t x; // 0x00 + int16_t y; // 0x02 + int16_t z; // 0x04 + uint8_t direction; // 0x06 + uint8_t vehicle_sprite_type; // 0x07 + uint8_t bank_rotation; // 0x08 }; -enum : uint32 +enum : uint32_t { VEHICLE_ENTRY_FLAG_POWERED_RIDE_UNRESTRICTED_GRAVITY = 1 << 0, // Set on powered vehicles that do not slow down when going down a hill VEHICLE_ENTRY_FLAG_NO_UPSTOP_WHEELS = 1 << 1, @@ -316,7 +316,7 @@ enum { VEHICLE_STATUS_STOPPED_BY_BLOCK_BRAKES }; -enum : uint32 +enum : uint32_t { VEHICLE_UPDATE_FLAG_ON_LIFT_HILL = (1 << 0), VEHICLE_UPDATE_FLAG_1 = (1 << 1), @@ -334,7 +334,7 @@ enum : uint32 VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE = (1 << 13) // After passing a rotation toggle track piece this will enable }; -enum : uint32 +enum : uint32_t { VEHICLE_SPRITE_FLAG_FLAT = (1 << 0), VEHICLE_SPRITE_FLAG_GENTLE_SLOPES = (1 << 1), @@ -374,7 +374,7 @@ enum { VEHICLE_VISUAL_SUBMARINE }; -enum : uint32 +enum : uint32_t { VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION = 1 << 0, VEHICLE_UPDATE_MOTION_TRACK_FLAG_1 = 1 << 1, @@ -420,34 +420,34 @@ enum #define VEHICLE_SEAT_PAIR_FLAG 0x80 #define VEHICLE_SEAT_NUM_MASK 0x7F -rct_vehicle * try_get_vehicle(uint16 spriteIndex); +rct_vehicle * try_get_vehicle(uint16_t spriteIndex); void vehicle_update_all(); void vehicle_sounds_update(); -void vehicle_get_g_forces(const rct_vehicle *vehicle, sint32 *verticalG, sint32 *lateralG); +void vehicle_get_g_forces(const rct_vehicle *vehicle, int32_t *verticalG, int32_t *lateralG); void vehicle_set_map_toolbar(const rct_vehicle *vehicle); -sint32 vehicle_is_used_in_pairs(const rct_vehicle *vehicle); -sint32 vehicle_update_track_motion(rct_vehicle *vehicle, sint32 *outStation); +int32_t vehicle_is_used_in_pairs(const rct_vehicle *vehicle); +int32_t vehicle_update_track_motion(rct_vehicle *vehicle, int32_t *outStation); rct_ride_entry_vehicle *vehicle_get_vehicle_entry(const rct_vehicle *vehicle); -sint32 vehicle_get_total_num_peeps(const rct_vehicle *vehicle); +int32_t vehicle_get_total_num_peeps(const rct_vehicle *vehicle); void vehicle_invalidate_window(rct_vehicle *vehicle); void vehicle_update_test_finish(rct_vehicle* vehicle); void vehicle_test_reset(rct_vehicle* vehicle); void vehicle_peep_easteregg_here_we_are(const rct_vehicle* vehicle); rct_vehicle *vehicle_get_head(const rct_vehicle *vehicle); rct_vehicle* vehicle_get_tail(const rct_vehicle* vehicle); -const rct_vehicle_info *vehicle_get_move_info(sint32 cd, sint32 typeAndDirection, sint32 offset); -uint16 vehicle_get_move_info_size(sint32 cd, sint32 typeAndDirection); -bool vehicle_update_dodgems_collision(rct_vehicle *vehicle, sint16 x, sint16 y, uint16 *spriteId); +const rct_vehicle_info *vehicle_get_move_info(int32_t cd, int32_t typeAndDirection, int32_t offset); +uint16_t vehicle_get_move_info_size(int32_t cd, int32_t typeAndDirection); +bool vehicle_update_dodgems_collision(rct_vehicle *vehicle, int16_t x, int16_t y, uint16_t *spriteId); extern rct_vehicle *gCurrentVehicle; -extern uint8 _vehicleStationIndex; -extern uint32 _vehicleMotionTrackFlags; -extern sint32 _vehicleVelocityF64E08; -extern sint32 _vehicleVelocityF64E0C; -extern sint32 _vehicleUnkF64E10; -extern uint8 _vehicleVAngleEndF64E36; -extern uint8 _vehicleBankEndF64E37; -extern uint8 _vehicleF64E2C; +extern uint8_t _vehicleStationIndex; +extern uint32_t _vehicleMotionTrackFlags; +extern int32_t _vehicleVelocityF64E08; +extern int32_t _vehicleVelocityF64E0C; +extern int32_t _vehicleUnkF64E10; +extern uint8_t _vehicleVAngleEndF64E36; +extern uint8_t _vehicleBankEndF64E37; +extern uint8_t _vehicleF64E2C; extern rct_vehicle * _vehicleFrontVehicle; extern LocationXYZ16 unk_F64E20; diff --git a/src/openrct2/ride/VehicleData.cpp b/src/openrct2/ride/VehicleData.cpp index 903d68b8af..8b136b1e63 100644 --- a/src/openrct2/ride/VehicleData.cpp +++ b/src/openrct2/ride/VehicleData.cpp @@ -12,7 +12,7 @@ // clang-format off /** rct2: 0x0099F100 */ -static constexpr const uint8 Rotation1TimeToSpriteMap_0[] = { +static constexpr const uint8_t Rotation1TimeToSpriteMap_0[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -65,7 +65,7 @@ static constexpr const uint8 Rotation1TimeToSpriteMap_0[] = { }; /** rct2: 0x0099F422 */ -static constexpr const uint8 Rotation1TimeToSpriteMap_1[] = { +static constexpr const uint8_t Rotation1TimeToSpriteMap_1[] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, @@ -109,7 +109,7 @@ static constexpr const uint8 Rotation1TimeToSpriteMap_1[] = { }; /** rct2: 0x0099F6AB */ -static constexpr const uint8 Rotation1TimeToSpriteMap_2[] = { +static constexpr const uint8_t Rotation1TimeToSpriteMap_2[] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, @@ -162,14 +162,14 @@ static constexpr const uint8 Rotation1TimeToSpriteMap_2[] = { }; /** rct2: 0x0099F0F4 */ -const uint8 * Rotation1TimeToSpriteMaps[] = { +const uint8_t * Rotation1TimeToSpriteMaps[] = { Rotation1TimeToSpriteMap_0, Rotation1TimeToSpriteMap_1, Rotation1TimeToSpriteMap_2, }; /** rct2: 0x009A2434 */ -static constexpr const uint8 Rotation2TimeToSpriteMap_0[] = { +static constexpr const uint8_t Rotation2TimeToSpriteMap_0[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, @@ -211,7 +211,7 @@ static constexpr const uint8 Rotation2TimeToSpriteMap_0[] = { }; /** rct2: 0x009A26A6 */ -static constexpr const uint8 Rotation2TimeToSpriteMap_1[] = { +static constexpr const uint8_t Rotation2TimeToSpriteMap_1[] = { 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, 47, 48, 48, 46, 46, 47, @@ -222,7 +222,7 @@ static constexpr const uint8 Rotation2TimeToSpriteMap_1[] = { }; /** rct2: 0x009A270E */ -static constexpr const uint8 Rotation2TimeToSpriteMap_2[] = { +static constexpr const uint8_t Rotation2TimeToSpriteMap_2[] = { 43, 43, 44, 44, 45, 45, 43, 43, 44, 44, 45, 45, 43, 43, 44, 44, 45, 45, 40, 40, 41, 41, 42, 42, 40, 40, 41, 41, 42, 42, 40, 40, 41, 41, 42, 42, 37, 37, 38, 38, 39, 39, 37, 37, 38, 38, 39, 39, 37, 37, 38, @@ -255,14 +255,14 @@ static constexpr const uint8 Rotation2TimeToSpriteMap_2[] = { }; /** rct2: 0x009A2428 */ -const uint8 * Rotation2TimeToSpriteMaps[] = { +const uint8_t * Rotation2TimeToSpriteMaps[] = { Rotation2TimeToSpriteMap_0, Rotation2TimeToSpriteMap_1, Rotation2TimeToSpriteMap_2, }; /** rct2: 0x0099EB28 */ -static constexpr const uint8 Rotation3TimeToSpriteMap_0[] = { +static constexpr const uint8_t Rotation3TimeToSpriteMap_0[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -299,7 +299,7 @@ static constexpr const uint8 Rotation3TimeToSpriteMap_0[] = { }; /** rct2: 0x0099ED49 */ -static constexpr const uint8 Rotation3TimeToSpriteMap_1[] = { +static constexpr const uint8_t Rotation3TimeToSpriteMap_1[] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, @@ -327,7 +327,7 @@ static constexpr const uint8 Rotation3TimeToSpriteMap_1[] = { }; /** rct2: 0x0099EED1 */ -static constexpr const uint8 Rotation3TimeToSpriteMap_2[] = { +static constexpr const uint8_t Rotation3TimeToSpriteMap_2[] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, @@ -364,7 +364,7 @@ static constexpr const uint8 Rotation3TimeToSpriteMap_2[] = { }; /** rct2: 0x0099EB1C */ -const uint8 * Rotation3TimeToSpriteMaps[] = { +const uint8_t * Rotation3TimeToSpriteMaps[] = { Rotation3TimeToSpriteMap_0, Rotation3TimeToSpriteMap_1, Rotation3TimeToSpriteMap_2, @@ -709,7 +709,7 @@ const top_spin_time_to_sprite_map * TopSpinTimeToSpriteMaps[] = { }; /** rct2: 0x009A0434 */ -const uint8 MotionSimulatorTimeToSpriteMap[] = { +const uint8_t MotionSimulatorTimeToSpriteMap[] = { 0, 0, 0, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, @@ -792,10 +792,10 @@ const uint8 MotionSimulatorTimeToSpriteMap[] = { 0xFF, }; -const sint32 MotionSimulatorTimeToSpriteMapCount = static_cast(Util::CountOf(MotionSimulatorTimeToSpriteMap)); +const int32_t MotionSimulatorTimeToSpriteMapCount = static_cast(Util::CountOf(MotionSimulatorTimeToSpriteMap)); /** rct2: 0x009A2930 */ -const sint32 dword_9A2930[] = { +const int32_t dword_9A2930[] = { 0, // 0000 8716, // 0001 8716, // 0010 @@ -815,7 +815,7 @@ const sint32 dword_9A2930[] = { }; /** rct2: 0x009A2970 */ -const sint32 dword_9A2970[] = { +const int32_t dword_9A2970[] = { 0, // 0 -124548, // 1 -243318, // 2 @@ -879,7 +879,7 @@ const sint32 dword_9A2970[] = { }; /** rct2: 0x009A3684 */ -const sint32 SpriteDirectionToSoundDirection[] = { +const int32_t SpriteDirectionToSoundDirection[] = { -0x4000, // 0 -0x3000, // 1 -0x2000, // 2 diff --git a/src/openrct2/ride/VehicleData.h b/src/openrct2/ride/VehicleData.h index 668fb9df00..b8ba2105d7 100644 --- a/src/openrct2/ride/VehicleData.h +++ b/src/openrct2/ride/VehicleData.h @@ -12,23 +12,23 @@ #include "../common.h" -extern const uint8 * Rotation1TimeToSpriteMaps[]; -extern const uint8 * Rotation2TimeToSpriteMaps[]; -extern const uint8 * Rotation3TimeToSpriteMaps[]; +extern const uint8_t * Rotation1TimeToSpriteMaps[]; +extern const uint8_t * Rotation2TimeToSpriteMaps[]; +extern const uint8_t * Rotation3TimeToSpriteMaps[]; struct top_spin_time_to_sprite_map { - uint8 arm_rotation; - uint8 bank_rotation; + uint8_t arm_rotation; + uint8_t bank_rotation; }; extern const top_spin_time_to_sprite_map * TopSpinTimeToSpriteMaps[]; -extern const uint8 MotionSimulatorTimeToSpriteMap[]; -extern const sint32 MotionSimulatorTimeToSpriteMapCount; +extern const uint8_t MotionSimulatorTimeToSpriteMap[]; +extern const int32_t MotionSimulatorTimeToSpriteMapCount; -extern const sint32 dword_9A2930[]; -extern const sint32 dword_9A2970[]; +extern const int32_t dword_9A2930[]; +extern const int32_t dword_9A2970[]; -extern const sint32 SpriteDirectionToSoundDirection[]; +extern const int32_t SpriteDirectionToSoundDirection[]; #endif diff --git a/src/openrct2/ride/VehiclePaint.cpp b/src/openrct2/ride/VehiclePaint.cpp index fad3af5c79..7264e7ec7b 100644 --- a/src/openrct2/ride/VehiclePaint.cpp +++ b/src/openrct2/ride/VehiclePaint.cpp @@ -886,11 +886,11 @@ const vehicle_boundbox VehicleBoundboxes[16][224] = { // clang-format on // 6D5214 -static void vehicle_sprite_paint(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 ecx, sint32 z, +static void vehicle_sprite_paint(paint_session * session, const rct_vehicle * vehicle, int32_t ebx, int32_t ecx, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 baseImage_id = ebx; + int32_t baseImage_id = ebx; if (vehicleEntry->draw_order >= Util::CountOf(VehicleBoundboxes)) { return; @@ -905,7 +905,7 @@ static void vehicle_sprite_paint(paint_session * session, const rct_vehicle * ve { baseImage_id += vehicle->animation_frame; } - sint32 image_id = + int32_t image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS; paint_struct * ps = sub_98197C( session, image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z); @@ -917,7 +917,7 @@ static void vehicle_sprite_paint(paint_session * session, const rct_vehicle * ve if (dpi->zoom_level < 2 && vehicle->num_peeps > 0 && vehicleEntry->no_seating_rows > 0) { baseImage_id += vehicleEntry->no_vehicle_images; - for (sint32 i = 0; i < 8; i++) + for (int32_t i = 0; i < 8; i++) { if (vehicle->num_peeps > (i * 2) && vehicleEntry->no_seating_rows > i) { @@ -938,17 +938,17 @@ static void vehicle_sprite_paint(paint_session * session, const rct_vehicle * ve } // 6D520E -static void vehicle_sprite_paint_6D520E(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 ecx, sint32 z, +static void vehicle_sprite_paint_6D520E(paint_session * session, const rct_vehicle * vehicle, int32_t ebx, int32_t ecx, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicle_sprite_paint(session, vehicle, ebx + vehicle->swing_sprite, ecx, z, vehicleEntry); } // 6D51EB -static void vehicle_sprite_paint_6D51EB(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 z, +static void vehicle_sprite_paint_6D51EB(paint_session * session, const rct_vehicle * vehicle, int32_t ebx, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 ecx = ebx / 2; + int32_t ecx = ebx / 2; if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_11) { ebx = ebx / 2; @@ -962,7 +962,7 @@ static void vehicle_sprite_paint_6D51EB(paint_session * session, const rct_vehic } // 6D51DE -static void vehicle_sprite_paint_6D51DE(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 z, +static void vehicle_sprite_paint_6D51DE(paint_session * session, const rct_vehicle * vehicle, int32_t ebx, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->restraints_position < 64) @@ -980,7 +980,7 @@ static void vehicle_sprite_paint_6D51DE(paint_session * session, const rct_vehic vehicle_sprite_paint_6D51EB(session, vehicle, ebx, z, vehicleEntry); return; } - sint32 ecx = ebx / 2; + int32_t ecx = ebx / 2; ebx = ebx / 8; ebx += ((vehicle->restraints_position - 64) / 64) * 4; ebx *= vehicleEntry->base_num_frames; @@ -989,20 +989,20 @@ static void vehicle_sprite_paint_6D51DE(paint_session * session, const rct_vehic } // 6D51DE -static void vehicle_sprite_0_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicle_sprite_paint_6D51DE(session, vehicle, imageDirection, z, vehicleEntry); } // 6D4EE7 -static void vehicle_sprite_0_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection / 4) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection / 4) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1012,13 +1012,13 @@ static void vehicle_sprite_0_1(paint_session * session, const rct_vehicle * vehi } // 6D4F34 -static void vehicle_sprite_0_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_2(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = (imageDirection / 2) + 108; - sint32 ebx = ((imageDirection + 16) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = (imageDirection / 2) + 108; + int32_t ebx = ((imageDirection + 16) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1028,13 +1028,13 @@ static void vehicle_sprite_0_2(paint_session * session, const rct_vehicle * vehi } // 6D4F0C -static void vehicle_sprite_0_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1044,13 +1044,13 @@ static void vehicle_sprite_0_3(paint_session * session, const rct_vehicle * vehi } // 6D4F5C -static void vehicle_sprite_0_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_4(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 108; - sint32 ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 108; + int32_t ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1060,7 +1060,7 @@ static void vehicle_sprite_0_4(paint_session * session, const rct_vehicle * vehi } // 6D4F84 -static void vehicle_sprite_0_5(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_5(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1069,8 +1069,8 @@ static void vehicle_sprite_0_5(paint_session * session, const rct_vehicle * vehi } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = (imageDirection / 8) + 124; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = (imageDirection / 8) + 124; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1080,7 +1080,7 @@ static void vehicle_sprite_0_5(paint_session * session, const rct_vehicle * vehi } // 6D4FE4 -static void vehicle_sprite_0_6(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_6(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1089,8 +1089,8 @@ static void vehicle_sprite_0_6(paint_session * session, const rct_vehicle * vehi } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = (imageDirection / 8) + 128; - sint32 ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = (imageDirection / 8) + 128; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1100,7 +1100,7 @@ static void vehicle_sprite_0_6(paint_session * session, const rct_vehicle * vehi } // 6D5055 -static void vehicle_sprite_0_7(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_7(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1109,8 +1109,8 @@ static void vehicle_sprite_0_7(paint_session * session, const rct_vehicle * vehi } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = (imageDirection / 8) + 132; - sint32 ebx = (((imageDirection / 8) + 16) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = (imageDirection / 8) + 132; + int32_t ebx = (((imageDirection / 8) + 16) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1120,7 +1120,7 @@ static void vehicle_sprite_0_7(paint_session * session, const rct_vehicle * vehi } // 6D50C6 -static void vehicle_sprite_0_8(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_8(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1129,8 +1129,8 @@ static void vehicle_sprite_0_8(paint_session * session, const rct_vehicle * vehi } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = (imageDirection / 8) + 136; - sint32 ebx = (((imageDirection / 8) + 24) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = (imageDirection / 8) + 136; + int32_t ebx = (((imageDirection / 8) + 24) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1140,7 +1140,7 @@ static void vehicle_sprite_0_8(paint_session * session, const rct_vehicle * vehi } // 6D5137 -static void vehicle_sprite_0_9(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_9(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1149,8 +1149,8 @@ static void vehicle_sprite_0_9(paint_session * session, const rct_vehicle * vehi } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = (imageDirection / 8) + 140; - sint32 ebx = (((imageDirection / 8) + 32) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = (imageDirection / 8) + 140; + int32_t ebx = (((imageDirection / 8) + 32) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1160,7 +1160,7 @@ static void vehicle_sprite_0_9(paint_session * session, const rct_vehicle * vehi } // 6D4FB1 -static void vehicle_sprite_0_10(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_10(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1169,8 +1169,8 @@ static void vehicle_sprite_0_10(paint_session * session, const rct_vehicle * veh } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 124; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 124; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1180,7 +1180,7 @@ static void vehicle_sprite_0_10(paint_session * session, const rct_vehicle * veh } // 6D501B -static void vehicle_sprite_0_11(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_11(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1189,8 +1189,8 @@ static void vehicle_sprite_0_11(paint_session * session, const rct_vehicle * veh } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 128; - sint32 ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 128; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1200,7 +1200,7 @@ static void vehicle_sprite_0_11(paint_session * session, const rct_vehicle * veh } // 6D508C -static void vehicle_sprite_0_12(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_12(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1209,8 +1209,8 @@ static void vehicle_sprite_0_12(paint_session * session, const rct_vehicle * veh } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 132; - sint32 ebx = (((imageDirection / 8) + 20) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 132; + int32_t ebx = (((imageDirection / 8) + 20) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1220,7 +1220,7 @@ static void vehicle_sprite_0_12(paint_session * session, const rct_vehicle * veh } // 6D50FD -static void vehicle_sprite_0_13(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_13(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1229,8 +1229,8 @@ static void vehicle_sprite_0_13(paint_session * session, const rct_vehicle * veh } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 136; - sint32 ebx = (((imageDirection / 8) + 28) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 136; + int32_t ebx = (((imageDirection / 8) + 28) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1240,7 +1240,7 @@ static void vehicle_sprite_0_13(paint_session * session, const rct_vehicle * veh } // 6D516E -static void vehicle_sprite_0_14(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_14(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1249,8 +1249,8 @@ static void vehicle_sprite_0_14(paint_session * session, const rct_vehicle * veh } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_INLINE_TWISTS) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 140; - sint32 ebx = (((imageDirection / 8) + 36) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 140; + int32_t ebx = (((imageDirection / 8) + 36) * vehicleEntry->base_num_frames) + vehicleEntry->inline_twist_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1260,14 +1260,14 @@ static void vehicle_sprite_0_14(paint_session * session, const rct_vehicle * veh } // 6D4EE4 -static void vehicle_sprite_0_16(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_16(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection / 4) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection / 4) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1277,14 +1277,14 @@ static void vehicle_sprite_0_16(paint_session * session, const rct_vehicle * veh } // 6D4F31 -static void vehicle_sprite_0_17(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_17(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = (imageDirection / 2) + 108; - sint32 ebx = ((imageDirection + 16) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = (imageDirection / 2) + 108; + int32_t ebx = ((imageDirection + 16) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1294,14 +1294,14 @@ static void vehicle_sprite_0_17(paint_session * session, const rct_vehicle * veh } // 6D4F09 -static void vehicle_sprite_0_18(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_18(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1311,14 +1311,14 @@ static void vehicle_sprite_0_18(paint_session * session, const rct_vehicle * veh } // 6D4F59 -static void vehicle_sprite_0_19(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_19(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 108; - sint32 ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 108; + int32_t ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->banked_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1328,7 +1328,7 @@ static void vehicle_sprite_0_19(paint_session * session, const rct_vehicle * veh } // 6D51D7 -static void vehicle_sprite_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3DE4: @@ -1398,13 +1398,13 @@ static void vehicle_sprite_0(paint_session * session, const rct_vehicle * vehicl } // 6D4614 -static void vehicle_sprite_1_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1414,13 +1414,13 @@ static void vehicle_sprite_1_0(paint_session * session, const rct_vehicle * vehi } // 6D4662 -static void vehicle_sprite_1_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1430,13 +1430,13 @@ static void vehicle_sprite_1_1(paint_session * session, const rct_vehicle * vehi } // 6D46DB -static void vehicle_sprite_1_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_2(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1446,13 +1446,13 @@ static void vehicle_sprite_1_2(paint_session * session, const rct_vehicle * vehi } // 6D467D -static void vehicle_sprite_1_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1462,13 +1462,13 @@ static void vehicle_sprite_1_3(paint_session * session, const rct_vehicle * vehi } // 6D46FD -static void vehicle_sprite_1_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_4(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1478,7 +1478,7 @@ static void vehicle_sprite_1_4(paint_session * session, const rct_vehicle * vehi } // 6D460D -static void vehicle_sprite_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3C04: @@ -1548,21 +1548,21 @@ static void vehicle_sprite_1(paint_session * session, const rct_vehicle * vehicl } // 6D4791 -static void vehicle_sprite_2_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) { if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES) { - sint32 ecx = (imageDirection / 2) + 16; - sint32 ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; + int32_t ecx = (imageDirection / 2) + 16; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { - sint32 ecx = (imageDirection / 2) + 16; - sint32 ebx = ((imageDirection + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; + int32_t ecx = (imageDirection / 2) + 16; + int32_t ebx = ((imageDirection + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -1573,13 +1573,13 @@ static void vehicle_sprite_2_0(paint_session * session, const rct_vehicle * vehi } // 6D4833 -static void vehicle_sprite_2_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = (imageDirection / 2) + 16; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ecx = (imageDirection / 2) + 16; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1589,22 +1589,22 @@ static void vehicle_sprite_2_1(paint_session * session, const rct_vehicle * vehi } // 6D48D6 -static void vehicle_sprite_2_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_2(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) { - sint32 ecx = imageDirection / 2; + int32_t ecx = imageDirection / 2; if (vehicleEntry->draw_order < 5) { ecx += 108; - sint32 ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx += 16; - sint32 ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -1615,13 +1615,13 @@ static void vehicle_sprite_2_2(paint_session * session, const rct_vehicle * vehi } // 6D4858 -static void vehicle_sprite_2_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = (imageDirection / 2) + 16; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ecx = (imageDirection / 2) + 16; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1631,22 +1631,22 @@ static void vehicle_sprite_2_3(paint_session * session, const rct_vehicle * vehi } // 6D4910 -static void vehicle_sprite_2_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_4(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) { - sint32 ecx = imageDirection / 2; + int32_t ecx = imageDirection / 2; if (vehicleEntry->draw_order < 5) { ecx = (ecx ^ 8) + 108; - sint32 ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx += 16; - sint32 ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 32) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -1657,7 +1657,7 @@ static void vehicle_sprite_2_4(paint_session * session, const rct_vehicle * vehi } // 6D476C -static void vehicle_sprite_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3CA4: @@ -1727,7 +1727,7 @@ static void vehicle_sprite_2(paint_session * session, const rct_vehicle * vehicl } // 6D49DC -static void vehicle_sprite_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (!(vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES)) @@ -1736,14 +1736,14 @@ static void vehicle_sprite_3(paint_session * session, const rct_vehicle * vehicl } else { - sint32 ecx = (imageDirection / 4) + 32; - sint32 ebx = ((imageDirection / 4) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; + int32_t ecx = (imageDirection / 4) + 32; + int32_t ebx = ((imageDirection / 4) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } // 6D4A31 -static void vehicle_sprite_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_4(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (!(vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES)) @@ -1752,20 +1752,20 @@ static void vehicle_sprite_4(paint_session * session, const rct_vehicle * vehicl } else { - sint32 ecx = (imageDirection / 2) + 40; - sint32 ebx = ((imageDirection + 16) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; + int32_t ecx = (imageDirection / 2) + 40; + int32_t ebx = ((imageDirection + 16) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } // 6D463D -static void vehicle_sprite_5_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1775,13 +1775,13 @@ static void vehicle_sprite_5_0(paint_session * session, const rct_vehicle * vehi } // 6D469B -static void vehicle_sprite_5_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1791,13 +1791,13 @@ static void vehicle_sprite_5_1(paint_session * session, const rct_vehicle * vehi } // 6D4722 -static void vehicle_sprite_5_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_2(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1807,13 +1807,13 @@ static void vehicle_sprite_5_2(paint_session * session, const rct_vehicle * vehi } // 6D46B9 -static void vehicle_sprite_5_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->flat_to_gentle_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1823,13 +1823,13 @@ static void vehicle_sprite_5_3(paint_session * session, const rct_vehicle * vehi } // 6D4747 -static void vehicle_sprite_5_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_4(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->flat_bank_to_gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1839,7 +1839,7 @@ static void vehicle_sprite_5_4(paint_session * session, const rct_vehicle * vehi } // 6D4636 -static void vehicle_sprite_5(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3C54: @@ -1909,21 +1909,21 @@ static void vehicle_sprite_5(paint_session * session, const rct_vehicle * vehicl } // 6D47E4 -static void vehicle_sprite_6_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) { if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 16; - sint32 ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 16; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { - sint32 ecx = ((imageDirection / 2) ^ 8) + 16; - sint32 ebx = ((imageDirection + 40) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 16; + int32_t ebx = ((imageDirection + 40) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -1934,13 +1934,13 @@ static void vehicle_sprite_6_0(paint_session * session, const rct_vehicle * vehi } // 6D4880 -static void vehicle_sprite_6_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 16; - sint32 ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 16; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1950,22 +1950,22 @@ static void vehicle_sprite_6_1(paint_session * session, const rct_vehicle * vehi } // 6D4953 -static void vehicle_sprite_6_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_2(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) { - sint32 ecx = imageDirection / 2; + int32_t ecx = imageDirection / 2; if (vehicleEntry->draw_order < 5) { ecx += 108; - sint32 ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx = (ecx ^ 8) + 16; - sint32 ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 64) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -1976,13 +1976,13 @@ static void vehicle_sprite_6_2(paint_session * session, const rct_vehicle * vehi } // 6D48AB -static void vehicle_sprite_6_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 16; - sint32 ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 16; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_to_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -1992,22 +1992,22 @@ static void vehicle_sprite_6_3(paint_session * session, const rct_vehicle * vehi } // 6D4996 -static void vehicle_sprite_6_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_4(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) { - sint32 ecx = imageDirection / 2; + int32_t ecx = imageDirection / 2; if (vehicleEntry->draw_order < 5) { ecx = (ecx ^ 8) + 108; - sint32 ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else { ecx = (ecx ^ 8) + 16; - sint32 ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; + int32_t ebx = ((imageDirection + 96) * vehicleEntry->base_num_frames) + vehicleEntry->gentle_slope_bank_turn_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } } @@ -2018,7 +2018,7 @@ static void vehicle_sprite_6_4(paint_session * session, const rct_vehicle * vehi } // 6D47DD -static void vehicle_sprite_6(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3CF4: @@ -2088,13 +2088,13 @@ static void vehicle_sprite_6(paint_session * session, const rct_vehicle * vehicl } // 6D4A05 -static void vehicle_sprite_7(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_7(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES) { - sint32 ecx = ((imageDirection / 4) ^ 4) + 32; - sint32 ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; + int32_t ecx = ((imageDirection / 4) ^ 4) + 32; + int32_t ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2104,13 +2104,13 @@ static void vehicle_sprite_7(paint_session * session, const rct_vehicle * vehicl } // 6D4A59 -static void vehicle_sprite_8(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_8(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 40; - sint32 ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 40; + int32_t ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2120,13 +2120,13 @@ static void vehicle_sprite_8(paint_session * session, const rct_vehicle * vehicl } // 6D4A81 -static void vehicle_sprite_9(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_9(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 56; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 56; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2136,13 +2136,13 @@ static void vehicle_sprite_9(paint_session * session, const rct_vehicle * vehicl } // 6D4AE8 -static void vehicle_sprite_10(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_10(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 2) + 60; - sint32 ebx = ((imageDirection + 8) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 2) + 60; + int32_t ebx = ((imageDirection + 8) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2152,13 +2152,13 @@ static void vehicle_sprite_10(paint_session * session, const rct_vehicle * vehic } // 6D4B57 -static void vehicle_sprite_11(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_11(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 76; - sint32 ebx = (((imageDirection / 8) + 72) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 76; + int32_t ebx = (((imageDirection / 8) + 72) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2168,13 +2168,13 @@ static void vehicle_sprite_11(paint_session * session, const rct_vehicle * vehic } // 6D4BB7 -static void vehicle_sprite_12(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_12(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 80; - sint32 ebx = (((imageDirection / 8) + 80) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 80; + int32_t ebx = (((imageDirection / 8) + 80) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2184,13 +2184,13 @@ static void vehicle_sprite_12(paint_session * session, const rct_vehicle * vehic } // 6D4C17 -static void vehicle_sprite_13(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_13(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 84; - sint32 ebx = (((imageDirection / 8) + 88) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 84; + int32_t ebx = (((imageDirection / 8) + 88) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2200,13 +2200,13 @@ static void vehicle_sprite_13(paint_session * session, const rct_vehicle * vehic } // 6D4C77 -static void vehicle_sprite_14(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_14(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 88; - sint32 ebx = (((imageDirection / 8) + 96) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 88; + int32_t ebx = (((imageDirection / 8) + 96) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2216,13 +2216,13 @@ static void vehicle_sprite_14(paint_session * session, const rct_vehicle * vehic } // 6D4CD7 -static void vehicle_sprite_15(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_15(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 92; - sint32 ebx = (((imageDirection / 8) + 104) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 92; + int32_t ebx = (((imageDirection / 8) + 104) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2232,13 +2232,13 @@ static void vehicle_sprite_15(paint_session * session, const rct_vehicle * vehic } // 6D4D37 -static void vehicle_sprite_16(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_16(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 96; - sint32 ebx = (((imageDirection / 8) + 112) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = (imageDirection / 8) + 96; + int32_t ebx = (((imageDirection / 8) + 112) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2248,7 +2248,7 @@ static void vehicle_sprite_16(paint_session * session, const rct_vehicle * vehic } // 6D4AA3 -static void vehicle_sprite_17(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_17(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2261,8 +2261,8 @@ static void vehicle_sprite_17(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 56; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 56; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2272,7 +2272,7 @@ static void vehicle_sprite_17(paint_session * session, const rct_vehicle * vehic } // 6D4B0D -static void vehicle_sprite_18(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_18(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2286,8 +2286,8 @@ static void vehicle_sprite_18(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 60; - sint32 ebx = ((imageDirection + 40) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 60; + int32_t ebx = ((imageDirection + 40) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2297,7 +2297,7 @@ static void vehicle_sprite_18(paint_session * session, const rct_vehicle * vehic } // 6D4B80 -static void vehicle_sprite_19(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_19(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2306,8 +2306,8 @@ static void vehicle_sprite_19(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 76; - sint32 ebx = (((imageDirection / 8) + 76) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 76; + int32_t ebx = (((imageDirection / 8) + 76) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2317,7 +2317,7 @@ static void vehicle_sprite_19(paint_session * session, const rct_vehicle * vehic } // 6D4BE0 -static void vehicle_sprite_20(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_20(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2326,8 +2326,8 @@ static void vehicle_sprite_20(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 80; - sint32 ebx = (((imageDirection / 8) + 84) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 80; + int32_t ebx = (((imageDirection / 8) + 84) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2337,7 +2337,7 @@ static void vehicle_sprite_20(paint_session * session, const rct_vehicle * vehic } // 6D4C40 -static void vehicle_sprite_21(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_21(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2346,8 +2346,8 @@ static void vehicle_sprite_21(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 84; - sint32 ebx = (((imageDirection / 8) + 92) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 84; + int32_t ebx = (((imageDirection / 8) + 92) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2357,7 +2357,7 @@ static void vehicle_sprite_21(paint_session * session, const rct_vehicle * vehic } // 6D4CA0 -static void vehicle_sprite_22(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_22(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2366,8 +2366,8 @@ static void vehicle_sprite_22(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 88; - sint32 ebx = (((imageDirection / 8) + 100) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 88; + int32_t ebx = (((imageDirection / 8) + 100) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2377,7 +2377,7 @@ static void vehicle_sprite_22(paint_session * session, const rct_vehicle * vehic } // 6D4D00 -static void vehicle_sprite_23(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_23(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2386,8 +2386,8 @@ static void vehicle_sprite_23(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 92; - sint32 ebx = (((imageDirection / 8) + 108) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 92; + int32_t ebx = (((imageDirection / 8) + 108) * vehicleEntry->base_num_frames) + vehicleEntry->vertical_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2397,7 +2397,7 @@ static void vehicle_sprite_23(paint_session * session, const rct_vehicle * vehic } // 6D51A5 -static void vehicle_sprite_24(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_24(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2406,9 +2406,9 @@ static void vehicle_sprite_24(paint_session * session, const rct_vehicle * vehic } if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_CORKSCREWS) { - sint32 eax = ((vehicle->vehicle_sprite_type - 24) * 4); - sint32 ecx = (imageDirection / 8) + eax + 144; - sint32 ebx = (((imageDirection / 8) + eax) * vehicleEntry->base_num_frames) + vehicleEntry->corkscrew_image_id; + int32_t eax = ((vehicle->vehicle_sprite_type - 24) * 4); + int32_t ecx = (imageDirection / 8) + eax + 144; + int32_t ebx = (((imageDirection / 8) + eax) * vehicleEntry->base_num_frames) + vehicleEntry->corkscrew_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2418,13 +2418,13 @@ static void vehicle_sprite_24(paint_session * session, const rct_vehicle * vehic } // 6D4D67 -static void vehicle_sprite_50_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2434,13 +2434,13 @@ static void vehicle_sprite_50_0(paint_session * session, const rct_vehicle * veh } // 6D4DB5 -static void vehicle_sprite_50_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = ((imageDirection / 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2450,13 +2450,13 @@ static void vehicle_sprite_50_1(paint_session * session, const rct_vehicle * veh } // 6D4DD3 -static void vehicle_sprite_50_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2466,7 +2466,7 @@ static void vehicle_sprite_50_3(paint_session * session, const rct_vehicle * veh } // 6D4D60 -static void vehicle_sprite_50(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3D44: @@ -2536,13 +2536,13 @@ static void vehicle_sprite_50(paint_session * session, const rct_vehicle * vehic } // 6D4E3A -static void vehicle_sprite_51(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_51(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 100; - sint32 ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; + int32_t ecx = (imageDirection / 8) + 100; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2552,13 +2552,13 @@ static void vehicle_sprite_51(paint_session * session, const rct_vehicle * vehic } // 6D4E8F -static void vehicle_sprite_52(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_52(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) { - sint32 ecx = (imageDirection / 8) + 104; - sint32 ebx = (((imageDirection / 8) + 16) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; + int32_t ecx = (imageDirection / 8) + 104; + int32_t ebx = (((imageDirection / 8) + 16) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2568,13 +2568,13 @@ static void vehicle_sprite_52(paint_session * session, const rct_vehicle * vehic } // 6D4D90 -static void vehicle_sprite_53_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53_0(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 4) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2584,13 +2584,13 @@ static void vehicle_sprite_53_0(paint_session * session, const rct_vehicle * veh } // 6D4DF4 -static void vehicle_sprite_53_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53_1(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2600,13 +2600,13 @@ static void vehicle_sprite_53_1(paint_session * session, const rct_vehicle * veh } // 6D4E15 -static void vehicle_sprite_53_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53_3(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) { - sint32 ecx = imageDirection / 2; - sint32 ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; + int32_t ecx = imageDirection / 2; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_to_gentle_slope_bank_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2616,7 +2616,7 @@ static void vehicle_sprite_53_3(paint_session * session, const rct_vehicle * veh } // 6D4D89 -static void vehicle_sprite_53(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3D94: @@ -2686,13 +2686,13 @@ static void vehicle_sprite_53(paint_session * session, const rct_vehicle * vehic } // 6D4E63 -static void vehicle_sprite_54(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_54(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 100; - sint32 ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 100; + int32_t ebx = (((imageDirection / 8) + 12) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2702,13 +2702,13 @@ static void vehicle_sprite_54(paint_session * session, const rct_vehicle * vehic } // 6D4EB8 -static void vehicle_sprite_55(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_55(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) { - sint32 ecx = ((imageDirection / 8) ^ 2) + 104; - sint32 ebx = (((imageDirection / 8) + 20) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; + int32_t ecx = ((imageDirection / 8) ^ 2) + 104; + int32_t ebx = (((imageDirection / 8) + 20) * vehicleEntry->base_num_frames) + vehicleEntry->diagonal_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2718,7 +2718,7 @@ static void vehicle_sprite_55(paint_session * session, const rct_vehicle * vehic } // 6D47DA -static void vehicle_sprite_56(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_56(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -2726,14 +2726,14 @@ static void vehicle_sprite_56(paint_session * session, const rct_vehicle * vehic } // 6D4A02 -static void vehicle_sprite_57(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_57(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES) { - sint32 ecx = ((imageDirection / 4) ^ 4) + 32; - sint32 ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; + int32_t ecx = ((imageDirection / 4) ^ 4) + 32; + int32_t ebx = (((imageDirection / 4) + 8) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2743,14 +2743,14 @@ static void vehicle_sprite_57(paint_session * session, const rct_vehicle * vehic } // 6D4A56 -static void vehicle_sprite_58(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_58(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES) { - sint32 ecx = ((imageDirection / 2) ^ 8) + 40; - sint32 ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; + int32_t ecx = ((imageDirection / 2) ^ 8) + 40; + int32_t ebx = ((imageDirection + 48) * vehicleEntry->base_num_frames) + vehicleEntry->steep_slope_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2760,13 +2760,13 @@ static void vehicle_sprite_58(paint_session * session, const rct_vehicle * vehic } // 6D4773 -static void vehicle_sprite_59(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_59(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection, int32_t z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_CURVED_LIFT_HILL) { - sint32 ecx = (imageDirection / 2) + 16; - sint32 ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->curved_lift_hill_image_id; + int32_t ecx = (imageDirection / 2) + 16; + int32_t ebx = (imageDirection * vehicleEntry->base_num_frames) + vehicleEntry->curved_lift_hill_image_id; vehicle_sprite_paint_6D520E(session, vehicle, ebx, ecx, z, vehicleEntry); } else @@ -2779,8 +2779,8 @@ static void vehicle_sprite_59(paint_session * session, const rct_vehicle * vehic using vehicle_sprite_func = void (*)( paint_session * session, const rct_vehicle * vehicle, - sint32 imageDirection, - sint32 z, + int32_t imageDirection, + int32_t z, const rct_ride_entry_vehicle * vehicleEntry); // clang-format off @@ -2852,7 +2852,7 @@ static constexpr const vehicle_sprite_func vehicle_sprite_funcs[] = { * * rct2: 0x006D5600 */ -static void vehicle_visual_splash1_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) +static void vehicle_visual_splash1_effect(paint_session * session, int32_t z, const rct_vehicle * vehicle) { if ((vehicle->track_type >> 2) != TRACK_ELEM_WATER_SPLASH) { @@ -2870,7 +2870,7 @@ static void vehicle_visual_splash1_effect(paint_session * session, sint32 z, con { return; } - sint32 image_id = + int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z); } @@ -2879,7 +2879,7 @@ static void vehicle_visual_splash1_effect(paint_session * session, sint32 z, con * * rct2: 0x006D5696 */ -static void vehicle_visual_splash2_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) +static void vehicle_visual_splash2_effect(paint_session * session, int32_t z, const rct_vehicle * vehicle) { if (vehicle->sprite_direction & 7) { @@ -2893,7 +2893,7 @@ static void vehicle_visual_splash2_effect(paint_session * session, sint32 z, con { return; } - sint32 image_id = + int32_t image_id = 29046 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z); } @@ -2902,7 +2902,7 @@ static void vehicle_visual_splash2_effect(paint_session * session, sint32 z, con * * rct2: 0x006D57EE */ -static void vehicle_visual_splash3_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) +static void vehicle_visual_splash3_effect(paint_session * session, int32_t z, const rct_vehicle * vehicle) { if (vehicle->sprite_direction & 7) { @@ -2916,7 +2916,7 @@ static void vehicle_visual_splash3_effect(paint_session * session, sint32 z, con { return; } - sint32 image_id = + int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z); } @@ -2925,7 +2925,7 @@ static void vehicle_visual_splash3_effect(paint_session * session, sint32 z, con * * rct2: 0x006D5783 */ -static void vehicle_visual_splash4_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) +static void vehicle_visual_splash4_effect(paint_session * session, int32_t z, const rct_vehicle * vehicle) { rct_vehicle * vehicle2 = GET_VEHICLE(vehicle->prev_vehicle_on_ride); if (vehicle2->velocity <= 0x50000) @@ -2940,7 +2940,7 @@ static void vehicle_visual_splash4_effect(paint_session * session, sint32 z, con { return; } - sint32 image_id = + int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z); } @@ -2949,7 +2949,7 @@ static void vehicle_visual_splash4_effect(paint_session * session, sint32 z, con * * rct2: 0x006D5701 */ -static void vehicle_visual_splash5_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) +static void vehicle_visual_splash5_effect(paint_session * session, int32_t z, const rct_vehicle * vehicle) { rct_vehicle * vehicle2 = GET_VEHICLE(vehicle->prev_vehicle_on_ride); if (vehicle2->velocity <= 0x50000) @@ -2968,12 +2968,12 @@ static void vehicle_visual_splash5_effect(paint_session * session, sint32 z, con { return; } - sint32 image_id = + int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z); } -void vehicle_visual_splash_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle, +void vehicle_visual_splash_effect(paint_session * session, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { switch (vehicleEntry->effect_visual) @@ -3005,7 +3005,7 @@ void vehicle_visual_splash_effect(paint_session * session, sint32 z, const rct_v * * rct2: 0x006D45F8 */ -void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint32 z, const rct_vehicle * vehicle, +void vehicle_visual_default(paint_session * session, int32_t imageDirection, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->vehicle_sprite_type < Util::CountOf(vehicle_sprite_funcs)) @@ -3018,18 +3018,18 @@ void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint * * rct2: 0x006D4244 */ -void vehicle_paint(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection) +void vehicle_paint(paint_session * session, const rct_vehicle * vehicle, int32_t imageDirection) { rct_ride_entry * rideEntry = 0; const rct_ride_entry_vehicle * vehicleEntry; - sint32 x = vehicle->x; - sint32 y = vehicle->y; - sint32 z = vehicle->z; + int32_t x = vehicle->x; + int32_t y = vehicle->y; + int32_t z = vehicle->z; if (vehicle->flags & SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE) { - uint32 ebx = 22965 + vehicle->animation_frame; + uint32_t ebx = 22965 + vehicle->animation_frame; sub_98197C(session, ebx, 0, 0, 1, 1, 0, z, 0, 0, z + 2); return; } diff --git a/src/openrct2/ride/VehiclePaint.h b/src/openrct2/ride/VehiclePaint.h index c742731114..d7dbc680c9 100644 --- a/src/openrct2/ride/VehiclePaint.h +++ b/src/openrct2/ride/VehiclePaint.h @@ -17,29 +17,29 @@ struct rct_ride_entry_vehicle; struct rct_vehicle; struct vehicle_boundbox { - sint8 offset_x; - sint8 offset_y; - sint8 offset_z; - uint8 length_x; - uint8 length_y; - uint8 length_z; + int8_t offset_x; + int8_t offset_y; + int8_t offset_z; + uint8_t length_x; + uint8_t length_y; + uint8_t length_z; }; extern const vehicle_boundbox VehicleBoundboxes[16][224]; -void vehicle_paint(paint_session * session, const rct_vehicle *vehicle, sint32 imageDirection); +void vehicle_paint(paint_session * session, const rct_vehicle *vehicle, int32_t imageDirection); -void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_observation_tower(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_reverser(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_splash_effect(paint_session * session, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_submarine(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle); -void vehicle_visual_mini_golf_ball(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle); +void vehicle_visual_default(paint_session * session, int32_t imageDirection, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_roto_drop(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_observation_tower(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_river_rapids(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_reverser(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_launched_freefall(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_splash_effect(paint_session * session, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_virginia_reel(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_submarine(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_mini_golf_player(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle); +void vehicle_visual_mini_golf_ball(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle *vehicle); #endif diff --git a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp index 28a10f6147..e0e0dbeed2 100644 --- a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp @@ -162,10 +162,10 @@ enum SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 = 22333, }; -static uint32 air_powered_vertical_rc_get_support_colour(paint_session * session) +static uint32_t air_powered_vertical_rc_get_support_colour(paint_session * session) { - uint32 colourFlags = session->TrackColours[SCHEME_SUPPORTS]; - uint32 trackColour = session->TrackColours[SCHEME_TRACK]; + uint32_t colourFlags = session->TrackColours[SCHEME_SUPPORTS]; + uint32_t trackColour = session->TrackColours[SCHEME_TRACK]; if (trackColour & IMAGE_TYPE_REMAP_2_PLUS) { colourFlags |= (trackColour & 0x9F000000); @@ -176,20 +176,20 @@ static uint32 air_powered_vertical_rc_get_support_colour(paint_session * session /** rct2: 0x008AFAD4 */ static void air_powered_vertical_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE, }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -202,13 +202,13 @@ static void air_powered_vertical_rc_track_flat( static void air_powered_vertical_rc_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_AIR_POWERED_VERTICAL_RC_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, { SPR_AIR_POWERED_VERTICAL_RC_STATION_NW_SE, SPR_STATION_BASE_B_NW_SE }, { SPR_AIR_POWERED_VERTICAL_RC_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, @@ -233,10 +233,10 @@ static void air_powered_vertical_rc_track_station( static void air_powered_vertical_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][5] = { @@ -317,10 +317,10 @@ static void air_powered_vertical_rc_track_right_quarter_turn_5( static void air_powered_vertical_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -331,20 +331,20 @@ static void air_powered_vertical_rc_track_left_quarter_turn_5( /** rct2: 0x008AFB74 */ static void air_powered_vertical_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_SW_NE }, { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_NW_SE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_NW_SE }, { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_NE_SW, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_NE_SW }, { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_SE_NW, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (direction == 0 || direction == 1) @@ -364,20 +364,20 @@ static void air_powered_vertical_rc_track_flat_to_left_bank( /** rct2: 0x008AFB84 */ static void air_powered_vertical_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_RIGHT_BANK_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_SW_NE }, { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_RIGHT_BANK_NW_SE, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_NW_SE }, { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_RIGHT_BANK_NE_SW, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_NE_SW }, { SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_RIGHT_BANK_SE_NW, SPR_AIR_POWERED_VERTICAL_RC_FLAT_TO_LEFT_BANK_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (direction == 2 || direction == 3) @@ -396,10 +396,10 @@ static void air_powered_vertical_rc_track_flat_to_right_bank( static void air_powered_vertical_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { air_powered_vertical_rc_track_flat_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -409,10 +409,10 @@ static void air_powered_vertical_rc_track_left_bank_to_flat( /** rct2: 0x008AFBA4 */ static void air_powered_vertical_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { air_powered_vertical_rc_track_flat_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -420,10 +420,10 @@ static void air_powered_vertical_rc_track_right_bank_to_flat( static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][5] = { @@ -462,13 +462,13 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( if (direction == 1 && trackSequence == 6) { - uint32 imageId = + uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_NW_SW_PART_4 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); } else if (direction == 3 && trackSequence == 0) { - uint32 imageId = + uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); } @@ -518,10 +518,10 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( static void air_powered_vertical_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -532,20 +532,20 @@ static void air_powered_vertical_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008AFBD4 */ static void air_powered_vertical_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_AIR_POWERED_VERTICAL_RC_LEFT_BANK_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_LEFT_BANK_NW_SE, SPR_AIR_POWERED_VERTICAL_RC_LEFT_BANK_NE_SW, SPR_AIR_POWERED_VERTICAL_RC_LEFT_BANK_SE_NW, }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 1) { sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); @@ -565,10 +565,10 @@ static void air_powered_vertical_rc_track_left_bank( static void air_powered_vertical_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { air_powered_vertical_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -576,20 +576,20 @@ static void air_powered_vertical_rc_track_right_bank( static void air_powered_vertical_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_AIR_POWERED_VERTICAL_RC_BRAKES_NW_SE, SPR_AIR_POWERED_VERTICAL_RC_BRAKES_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_BRAKES_NW_SE, SPR_AIR_POWERED_VERTICAL_RC_BRAKES_SW_NE, }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -602,13 +602,13 @@ static void air_powered_vertical_rc_track_brakes( static void air_powered_vertical_rc_track_vertical_slope_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 trackImageIds[7][4] = { + static constexpr const uint32_t trackImageIds[7][4] = { { SPR_AIR_POWERED_VERTICAL_RC_SLOPE_SW_NE_0, SPR_AIR_POWERED_VERTICAL_RC_SLOPE_NW_SE_0, @@ -648,7 +648,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up( }, }; - static constexpr const uint32 supportImageIds[7][4] = { + static constexpr const uint32_t supportImageIds[7][4] = { { 22264, SPR_AIR_POWERED_VERTICAL_RC_SLOPE_SUPPORTS_NW_SE_0, @@ -693,13 +693,13 @@ static void air_powered_vertical_rc_track_vertical_slope_up( }, }; - static constexpr const sint8 bbHeights03[] = { 1, 6, 14, 37, 76 }; - static constexpr const sint8 bbHeights12[] = { 1, 6, 14, 27, 59 }; - static constexpr const sint32 supportHeights[] = { 48, 64, 128, 176, 208, 240, 240 }; + static constexpr const int8_t bbHeights03[] = { 1, 6, 14, 37, 76 }; + static constexpr const int8_t bbHeights12[] = { 1, 6, 14, 27, 59 }; + static constexpr const int32_t supportHeights[] = { 48, 64, 128, 176, 208, 240, 240 }; - uint32 supportsImageId = supportImageIds[trackSequence][direction] | air_powered_vertical_rc_get_support_colour(session); - uint32 trackImageId = trackImageIds[trackSequence][direction] | session->TrackColours[SCHEME_TRACK]; - sint8 bbHeight; + uint32_t supportsImageId = supportImageIds[trackSequence][direction] | air_powered_vertical_rc_get_support_colour(session); + uint32_t trackImageId = trackImageIds[trackSequence][direction] | session->TrackColours[SCHEME_TRACK]; + int8_t bbHeight; bool isDirection03 = (direction == 0 || direction == 3); switch (trackSequence) { @@ -767,7 +767,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up( case 5: if (wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr)) { - uint32 floorImageId; + uint32_t floorImageId; if (direction & 1) { floorImageId = SPR_FLOOR_PLANKS_90_DEG | session->TrackColours[SCHEME_SUPPORTS]; @@ -809,20 +809,20 @@ static void air_powered_vertical_rc_track_vertical_slope_up( static void air_powered_vertical_rc_track_vertical_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_SW_NE_SEQ_0, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_SW_NE_SEQ_1 }, { SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_NW_SE_SEQ_0, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_NW_SE_SEQ_1 }, { SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_NE_SW_SEQ_0, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_NE_SW_SEQ_1 }, { SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_SE_NW_SEQ_0, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_UP_SE_NW_SEQ_1 }, }; - uint32 imageId; + uint32_t imageId; switch (trackSequence) { case 0: @@ -850,10 +850,10 @@ static void air_powered_vertical_rc_track_vertical_up( static void air_powered_vertical_rc_track_vertical_top( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -863,7 +863,7 @@ static void air_powered_vertical_rc_track_vertical_top( return; } - static constexpr const uint32 imageIds[4][6] = { + static constexpr const uint32_t imageIds[4][6] = { { SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_TOP_SUPPORT_SW_NE, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_TOP_TRACK_SW_NE_SEQ_0, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_TOP_TRACK_SW_NE_SEQ_1, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_TOP_TRACK_SW_NE_SEQ_2, SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_TOP_SUPPORT_NE_SW, @@ -874,7 +874,7 @@ static void air_powered_vertical_rc_track_vertical_top( SPR_AIR_POWERED_VERTICAL_RC_VERTICAL_TOP_TRACK_NW_SE_SEQ_3 }, }; - uint32 imageIdS, imageIdT; + uint32_t imageIdS, imageIdT; switch (trackSequence) { case 0: @@ -937,10 +937,10 @@ static void air_powered_vertical_rc_track_vertical_top( static void air_powered_vertical_rc_track_vertical_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { air_powered_vertical_rc_track_vertical_up(session, rideIndex, trackSequence ^ 1, (direction + 2) & 3, height, tileElement); @@ -948,17 +948,17 @@ static void air_powered_vertical_rc_track_vertical_down( static void air_powered_vertical_rc_track_vertical_slope_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { air_powered_vertical_rc_track_vertical_slope_up(session, rideIndex, 6 - trackSequence, (direction + 2) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/BobsleighCoaster.cpp b/src/openrct2/ride/coaster/BobsleighCoaster.cpp index 02bbc7b10d..0106e14f0c 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x006FE5B4 */ static void bobsleigh_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -84,13 +84,13 @@ static void bobsleigh_rc_track_flat( static void bobsleigh_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { 14580, SPR_STATION_BASE_B_SW_NE }, { 14581, SPR_STATION_BASE_B_NW_SE }, { 14580, SPR_STATION_BASE_B_SW_NE }, @@ -111,10 +111,10 @@ static void bobsleigh_rc_track_station( /** rct2: 0x006FE5C4 */ static void bobsleigh_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -201,10 +201,10 @@ static void bobsleigh_rc_track_25_deg_up( /** rct2: 0x006FE5D4 */ static void bobsleigh_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -291,10 +291,10 @@ static void bobsleigh_rc_track_flat_to_25_deg_up( /** rct2: 0x006FE5E4 */ static void bobsleigh_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -381,10 +381,10 @@ static void bobsleigh_rc_track_25_deg_up_to_flat( /** rct2: 0x006FE5F4 */ static void bobsleigh_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -393,10 +393,10 @@ static void bobsleigh_rc_track_25_deg_down( /** rct2: 0x006FE604 */ static void bobsleigh_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -405,10 +405,10 @@ static void bobsleigh_rc_track_flat_to_25_deg_down( /** rct2: 0x006FE614 */ static void bobsleigh_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -417,10 +417,10 @@ static void bobsleigh_rc_track_25_deg_down_to_flat( /** rct2: 0x006FE624 */ static void bobsleigh_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -616,10 +616,10 @@ static void bobsleigh_rc_track_left_quarter_turn_5( /** rct2: 0x006FE634 */ static void bobsleigh_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -629,10 +629,10 @@ static void bobsleigh_rc_track_right_quarter_turn_5( /** rct2: 0x006FE644 */ static void bobsleigh_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -675,10 +675,10 @@ static void bobsleigh_rc_track_flat_to_left_bank( /** rct2: 0x006FE654 */ static void bobsleigh_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -721,10 +721,10 @@ static void bobsleigh_rc_track_flat_to_right_bank( /** rct2: 0x006FE664 */ static void bobsleigh_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -767,10 +767,10 @@ static void bobsleigh_rc_track_left_bank_to_flat( /** rct2: 0x006FE674 */ static void bobsleigh_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -813,10 +813,10 @@ static void bobsleigh_rc_track_right_bank_to_flat( /** rct2: 0x006FE684 */ static void bobsleigh_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1012,10 +1012,10 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( /** rct2: 0x006FE694 */ static void bobsleigh_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1025,10 +1025,10 @@ static void bobsleigh_rc_track_banked_right_quarter_turn_5( /** rct2: 0x006FE6A4 */ static void bobsleigh_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1078,10 +1078,10 @@ static void bobsleigh_rc_track_left_bank_to_25_deg_up( /** rct2: 0x006FE6B4 */ static void bobsleigh_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1131,10 +1131,10 @@ static void bobsleigh_rc_track_right_bank_to_25_deg_up( /** rct2: 0x006FE6C4 */ static void bobsleigh_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1184,10 +1184,10 @@ static void bobsleigh_rc_track_25_deg_up_to_left_bank( /** rct2: 0x006FE6D4 */ static void bobsleigh_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1237,10 +1237,10 @@ static void bobsleigh_rc_track_25_deg_up_to_right_bank( /** rct2: 0x006FE6E4 */ static void bobsleigh_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1249,10 +1249,10 @@ static void bobsleigh_rc_track_left_bank_to_25_deg_down( /** rct2: 0x006FE6F4 */ static void bobsleigh_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1261,10 +1261,10 @@ static void bobsleigh_rc_track_right_bank_to_25_deg_down( /** rct2: 0x006FE704 */ static void bobsleigh_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1273,10 +1273,10 @@ static void bobsleigh_rc_track_25_deg_down_to_left_bank( /** rct2: 0x006FE714 */ static void bobsleigh_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1285,10 +1285,10 @@ static void bobsleigh_rc_track_25_deg_down_to_right_bank( /** rct2: 0x006FE724 */ static void bobsleigh_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1331,10 +1331,10 @@ static void bobsleigh_rc_track_left_bank( /** rct2: 0x006FE734 */ static void bobsleigh_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bobsleigh_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1343,10 +1343,10 @@ static void bobsleigh_rc_track_right_bank( /** rct2: 0x006FE744 */ static void bobsleigh_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1508,10 +1508,10 @@ static void bobsleigh_rc_track_s_bend_left( /** rct2: 0x006FE754 */ static void bobsleigh_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1673,10 +1673,10 @@ static void bobsleigh_rc_track_s_bend_right( /** rct2: 0x006FE794 */ static void bobsleigh_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1801,10 +1801,10 @@ static void bobsleigh_rc_track_left_quarter_turn_3( /** rct2: 0x006FE7A4 */ static void bobsleigh_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1814,10 +1814,10 @@ static void bobsleigh_rc_track_right_quarter_turn_3( /** rct2: 0x006FE7B4 */ static void bobsleigh_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1942,10 +1942,10 @@ static void bobsleigh_rc_track_left_quarter_turn_3_bank( /** rct2: 0x006FE7C4 */ static void bobsleigh_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1955,10 +1955,10 @@ static void bobsleigh_rc_track_right_quarter_turn_3_bank( /** rct2: 0x006FE7D4 */ static void bobsleigh_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2201,10 +2201,10 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( /** rct2: 0x006FE7E4 */ static void bobsleigh_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2447,10 +2447,10 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( /** rct2: 0x006FE7F4 */ static void bobsleigh_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -2466,10 +2466,10 @@ static void bobsleigh_rc_track_left_half_banked_helix_down_small( /** rct2: 0x006FE804 */ static void bobsleigh_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -2485,10 +2485,10 @@ static void bobsleigh_rc_track_right_half_banked_helix_down_small( /** rct2: 0x006FE814 */ static void bobsleigh_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2873,10 +2873,10 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( /** rct2: 0x006FE824 */ static void bobsleigh_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3261,10 +3261,10 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( /** rct2: 0x006FE834 */ static void bobsleigh_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3280,10 +3280,10 @@ static void bobsleigh_rc_track_left_half_banked_helix_down_large( /** rct2: 0x006FE844 */ static void bobsleigh_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3299,10 +3299,10 @@ static void bobsleigh_rc_track_right_half_banked_helix_down_large( /** rct2: 0x006FE854 */ static void bobsleigh_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3335,10 +3335,10 @@ static void bobsleigh_rc_track_brakes( /** rct2: 0x006FE864 */ static void bobsleigh_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3370,10 +3370,10 @@ static void bobsleigh_rc_track_block_brakes( static void bobsleigh_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3423,7 +3423,7 @@ static void bobsleigh_rc_track_on_ride_photo( paint_util_set_general_support_height(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.cpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.cpp index 5690cc384f..f220f55c38 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.cpp +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.cpp @@ -22,12 +22,12 @@ void bolliger_mabillard_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -83,14 +83,14 @@ void bolliger_mabillard_track_flat( void bolliger_mabillard_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 17154, 17150, SPR_STATION_BASE_A_SW_NE }, { 17155, 17151, SPR_STATION_BASE_A_NW_SE }, { 17154, 17150, SPR_STATION_BASE_A_SW_NE }, @@ -122,12 +122,12 @@ void bolliger_mabillard_track_station( void bolliger_mabillard_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -196,12 +196,12 @@ void bolliger_mabillard_track_25_deg_up( void bolliger_mabillard_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -270,12 +270,12 @@ void bolliger_mabillard_track_60_deg_up( void bolliger_mabillard_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -344,12 +344,12 @@ void bolliger_mabillard_track_flat_to_25_deg_up( void bolliger_mabillard_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -426,12 +426,12 @@ void bolliger_mabillard_track_25_deg_up_to_60_deg_up( void bolliger_mabillard_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -508,12 +508,12 @@ void bolliger_mabillard_track_60_deg_up_to_25_deg_up( void bolliger_mabillard_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -582,36 +582,36 @@ void bolliger_mabillard_track_25_deg_up_to_flat( void bolliger_mabillard_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); } void bolliger_mabillard_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); } void bolliger_mabillard_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -619,12 +619,12 @@ void bolliger_mabillard_track_flat_to_25_deg_down( void bolliger_mabillard_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -632,12 +632,12 @@ void bolliger_mabillard_track_25_deg_down_to_60_deg_down( void bolliger_mabillard_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -645,12 +645,12 @@ void bolliger_mabillard_track_60_deg_down_to_25_deg_down( void bolliger_mabillard_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -658,12 +658,12 @@ void bolliger_mabillard_track_25_deg_down_to_flat( void bolliger_mabillard_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -817,12 +817,12 @@ void bolliger_mabillard_track_left_quarter_turn_5( void bolliger_mabillard_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; bolliger_mabillard_track_left_quarter_turn_5(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement, @@ -831,12 +831,12 @@ void bolliger_mabillard_track_right_quarter_turn_5( void bolliger_mabillard_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -873,12 +873,12 @@ void bolliger_mabillard_track_flat_to_left_bank( void bolliger_mabillard_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -915,12 +915,12 @@ void bolliger_mabillard_track_flat_to_right_bank( void bolliger_mabillard_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -957,12 +957,12 @@ void bolliger_mabillard_track_left_bank_to_flat( void bolliger_mabillard_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -999,12 +999,12 @@ void bolliger_mabillard_track_right_bank_to_flat( void bolliger_mabillard_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -1165,12 +1165,12 @@ void bolliger_mabillard_track_banked_left_quarter_turn_5( void bolliger_mabillard_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; bolliger_mabillard_track_banked_left_quarter_turn_5(session, rideIndex, trackSequence, (direction - 1) & 3, height, @@ -1179,12 +1179,12 @@ void bolliger_mabillard_track_banked_right_quarter_turn_5( void bolliger_mabillard_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -1228,12 +1228,12 @@ void bolliger_mabillard_track_left_bank_to_25_deg_up( void bolliger_mabillard_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -1277,12 +1277,12 @@ void bolliger_mabillard_track_right_bank_to_25_deg_up( void bolliger_mabillard_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -1326,12 +1326,12 @@ void bolliger_mabillard_track_25_deg_up_to_left_bank( void bolliger_mabillard_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -1375,12 +1375,12 @@ void bolliger_mabillard_track_25_deg_up_to_right_bank( void bolliger_mabillard_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -1388,12 +1388,12 @@ void bolliger_mabillard_track_left_bank_to_25_deg_down( void bolliger_mabillard_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -1401,12 +1401,12 @@ void bolliger_mabillard_track_right_bank_to_25_deg_down( void bolliger_mabillard_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -1414,12 +1414,12 @@ void bolliger_mabillard_track_25_deg_down_to_left_bank( void bolliger_mabillard_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -1427,12 +1427,12 @@ void bolliger_mabillard_track_25_deg_down_to_right_bank( void bolliger_mabillard_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -1465,24 +1465,24 @@ void bolliger_mabillard_track_left_bank( void bolliger_mabillard_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); } void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -1631,12 +1631,12 @@ void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -1785,12 +1785,12 @@ void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( void bolliger_mabillard_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; bolliger_mabillard_track_right_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -1799,12 +1799,12 @@ void bolliger_mabillard_track_left_quarter_turn_5_25_deg_down( void bolliger_mabillard_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; bolliger_mabillard_track_left_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, @@ -1813,12 +1813,12 @@ void bolliger_mabillard_track_right_quarter_turn_5_25_deg_down( void bolliger_mabillard_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -1942,12 +1942,12 @@ void bolliger_mabillard_track_s_bend_left( void bolliger_mabillard_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2071,12 +2071,12 @@ void bolliger_mabillard_track_s_bend_right( void bolliger_mabillard_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2300,12 +2300,12 @@ void bolliger_mabillard_track_left_vertical_loop( void bolliger_mabillard_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2497,12 +2497,12 @@ void bolliger_mabillard_track_right_vertical_loop( void bolliger_mabillard_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2601,12 +2601,12 @@ void bolliger_mabillard_track_left_quarter_turn_3( void bolliger_mabillard_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; bolliger_mabillard_track_left_quarter_turn_3(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement, @@ -2615,12 +2615,12 @@ void bolliger_mabillard_track_right_quarter_turn_3( void bolliger_mabillard_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2723,12 +2723,12 @@ void bolliger_mabillard_track_left_quarter_turn_3_bank( void bolliger_mabillard_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; bolliger_mabillard_track_left_quarter_turn_3_bank(session, rideIndex, trackSequence, (direction - 1) & 3, height, @@ -2737,12 +2737,12 @@ void bolliger_mabillard_track_right_quarter_turn_3_bank( void bolliger_mabillard_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2812,12 +2812,12 @@ void bolliger_mabillard_track_left_quarter_turn_3_25_deg_up( void bolliger_mabillard_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -2890,12 +2890,12 @@ void bolliger_mabillard_track_right_quarter_turn_3_25_deg_up( void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; bolliger_mabillard_track_right_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -2904,12 +2904,12 @@ void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down( void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; bolliger_mabillard_track_left_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, @@ -2918,12 +2918,12 @@ void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down( void bolliger_mabillard_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -3124,12 +3124,12 @@ void bolliger_mabillard_track_left_half_banked_helix_up_small( void bolliger_mabillard_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -3330,12 +3330,12 @@ void bolliger_mabillard_track_right_half_banked_helix_up_small( void bolliger_mabillard_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (trackSequence >= 4) { @@ -3349,12 +3349,12 @@ void bolliger_mabillard_track_left_half_banked_helix_down_small( void bolliger_mabillard_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (trackSequence >= 4) { @@ -3368,12 +3368,12 @@ void bolliger_mabillard_track_right_half_banked_helix_down_small( void bolliger_mabillard_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -3684,12 +3684,12 @@ void bolliger_mabillard_track_left_half_banked_helix_up_large( void bolliger_mabillard_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4006,12 +4006,12 @@ void bolliger_mabillard_track_right_half_banked_helix_up_large( void bolliger_mabillard_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (trackSequence >= 7) { @@ -4025,12 +4025,12 @@ void bolliger_mabillard_track_left_half_banked_helix_down_large( void bolliger_mabillard_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (trackSequence >= 7) { @@ -4044,12 +4044,12 @@ void bolliger_mabillard_track_right_half_banked_helix_down_large( void bolliger_mabillard_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4085,12 +4085,12 @@ void bolliger_mabillard_track_left_quarter_turn_1_60_deg_up( void bolliger_mabillard_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4126,12 +4126,12 @@ void bolliger_mabillard_track_right_quarter_turn_1_60_deg_up( void bolliger_mabillard_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement, supportType); @@ -4139,12 +4139,12 @@ void bolliger_mabillard_track_left_quarter_turn_1_60_deg_down( void bolliger_mabillard_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement, supportType); @@ -4152,12 +4152,12 @@ void bolliger_mabillard_track_right_quarter_turn_1_60_deg_down( void bolliger_mabillard_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4184,12 +4184,12 @@ void bolliger_mabillard_track_brakes( void bolliger_mabillard_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4229,12 +4229,12 @@ void bolliger_mabillard_track_25_deg_up_left_banked( void bolliger_mabillard_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4274,12 +4274,12 @@ void bolliger_mabillard_track_25_deg_up_right_banked( void bolliger_mabillard_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4320,12 +4320,12 @@ void bolliger_mabillard_track_on_ride_photo( void bolliger_mabillard_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -4333,12 +4333,12 @@ void bolliger_mabillard_track_25_deg_down_left_banked( void bolliger_mabillard_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -4346,12 +4346,12 @@ void bolliger_mabillard_track_25_deg_down_right_banked( void bolliger_mabillard_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4387,24 +4387,24 @@ void bolliger_mabillard_track_90_deg_up( void bolliger_mabillard_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); } void bolliger_mabillard_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4444,12 +4444,12 @@ void bolliger_mabillard_track_60_deg_up_to_90_deg_up( void bolliger_mabillard_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -4457,12 +4457,12 @@ void bolliger_mabillard_track_90_deg_down_to_60_deg_down( void bolliger_mabillard_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -4499,12 +4499,12 @@ void bolliger_mabillard_track_90_deg_up_to_60_deg_up( void bolliger_mabillard_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4543,12 +4543,12 @@ void bolliger_mabillard_track_60_deg_down_to_90_deg_down( void bolliger_mabillard_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4672,12 +4672,12 @@ void bolliger_mabillard_track_left_eighth_to_diag( void bolliger_mabillard_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4801,12 +4801,12 @@ void bolliger_mabillard_track_right_eighth_to_diag( void bolliger_mabillard_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; bolliger_mabillard_track_right_eighth_to_diag(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, @@ -4815,12 +4815,12 @@ void bolliger_mabillard_track_left_eighth_to_orthogonal( void bolliger_mabillard_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; bolliger_mabillard_track_left_eighth_to_diag(session, rideIndex, trackSequence, (direction + 3) & 3, height, tileElement, @@ -4829,12 +4829,12 @@ void bolliger_mabillard_track_right_eighth_to_orthogonal( void bolliger_mabillard_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -4958,12 +4958,12 @@ void bolliger_mabillard_track_left_eighth_bank_to_diag( void bolliger_mabillard_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5087,12 +5087,12 @@ void bolliger_mabillard_track_right_eighth_bank_to_diag( void bolliger_mabillard_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; bolliger_mabillard_track_right_eighth_bank_to_diag(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -5101,12 +5101,12 @@ void bolliger_mabillard_track_left_eighth_bank_to_orthogonal( void bolliger_mabillard_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; bolliger_mabillard_track_left_eighth_bank_to_diag(session, rideIndex, trackSequence, (direction + 3) & 3, height, @@ -5115,12 +5115,12 @@ void bolliger_mabillard_track_right_eighth_bank_to_orthogonal( void bolliger_mabillard_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5249,12 +5249,12 @@ void bolliger_mabillard_track_diag_flat( void bolliger_mabillard_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5383,12 +5383,12 @@ void bolliger_mabillard_track_diag_25_deg_up( void bolliger_mabillard_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5517,12 +5517,12 @@ void bolliger_mabillard_track_diag_60_deg_up( void bolliger_mabillard_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5651,12 +5651,12 @@ void bolliger_mabillard_track_diag_flat_to_25_deg_up( void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5785,12 +5785,12 @@ void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -5919,12 +5919,12 @@ void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( void bolliger_mabillard_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6053,12 +6053,12 @@ void bolliger_mabillard_track_diag_25_deg_up_to_flat( void bolliger_mabillard_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6187,12 +6187,12 @@ void bolliger_mabillard_track_diag_25_deg_down( void bolliger_mabillard_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6321,12 +6321,12 @@ void bolliger_mabillard_track_diag_60_deg_down( void bolliger_mabillard_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6453,12 +6453,12 @@ void bolliger_mabillard_track_diag_flat_to_25_deg_down( void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6587,12 +6587,12 @@ void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6721,12 +6721,12 @@ void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( void bolliger_mabillard_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6855,12 +6855,12 @@ void bolliger_mabillard_track_diag_25_deg_down_to_flat( void bolliger_mabillard_track_diag_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -6989,12 +6989,12 @@ void bolliger_mabillard_track_diag_flat_to_60_deg_up( void bolliger_mabillard_track_diag_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7123,12 +7123,12 @@ void bolliger_mabillard_track_diag_60_deg_up_to_flat( void bolliger_mabillard_track_diag_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7257,12 +7257,12 @@ void bolliger_mabillard_track_diag_flat_to_60_deg_down( void bolliger_mabillard_track_diag_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7391,12 +7391,12 @@ void bolliger_mabillard_track_diag_60_deg_down_to_flat( void bolliger_mabillard_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7465,12 +7465,12 @@ void bolliger_mabillard_track_diag_flat_to_left_bank( void bolliger_mabillard_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7539,12 +7539,12 @@ void bolliger_mabillard_track_diag_flat_to_right_bank( void bolliger_mabillard_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7613,12 +7613,12 @@ void bolliger_mabillard_track_diag_left_bank_to_flat( void bolliger_mabillard_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7687,12 +7687,12 @@ void bolliger_mabillard_track_diag_right_bank_to_flat( void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7761,12 +7761,12 @@ void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7835,12 +7835,12 @@ void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7909,12 +7909,12 @@ void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -7983,12 +7983,12 @@ void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8055,12 +8055,12 @@ void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8127,12 +8127,12 @@ void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8201,12 +8201,12 @@ void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8275,12 +8275,12 @@ void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( void bolliger_mabillard_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8347,12 +8347,12 @@ void bolliger_mabillard_track_diag_left_bank( void bolliger_mabillard_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8419,12 +8419,12 @@ void bolliger_mabillard_track_diag_right_bank( void bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8496,12 +8496,12 @@ void bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up( void bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8576,12 +8576,12 @@ void bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up( void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8656,12 +8656,12 @@ void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank( void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8733,12 +8733,12 @@ void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank( void bolliger_mabillard_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -8765,12 +8765,12 @@ void bolliger_mabillard_track_block_brakes( void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8843,12 +8843,12 @@ void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -8924,12 +8924,12 @@ void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, @@ -8938,12 +8938,12 @@ void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down( void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, @@ -8952,12 +8952,12 @@ void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down( void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -9109,12 +9109,12 @@ void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -9266,12 +9266,12 @@ void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, @@ -9280,12 +9280,12 @@ void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down( void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, @@ -9294,12 +9294,12 @@ void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down( void bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9341,12 +9341,12 @@ void bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( void bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9388,12 +9388,12 @@ void bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( void bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9435,12 +9435,12 @@ void bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( void bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9482,12 +9482,12 @@ void bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( void bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9495,12 +9495,12 @@ void bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down( void bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9508,12 +9508,12 @@ void bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down( void bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9521,12 +9521,12 @@ void bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down( void bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9534,12 +9534,12 @@ void bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down( void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9579,12 +9579,12 @@ void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9624,12 +9624,12 @@ void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up( void bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9669,12 +9669,12 @@ void bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( void bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9714,12 +9714,12 @@ void bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat( void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9727,12 +9727,12 @@ void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down( void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9740,12 +9740,12 @@ void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down( void bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9753,12 +9753,12 @@ void bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat( void bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9766,12 +9766,12 @@ void bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat( void bolliger_mabillard_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9813,12 +9813,12 @@ void bolliger_mabillard_track_flat_to_left_banked_25_deg_up( void bolliger_mabillard_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9860,12 +9860,12 @@ void bolliger_mabillard_track_flat_to_right_banked_25_deg_up( void bolliger_mabillard_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9907,12 +9907,12 @@ void bolliger_mabillard_track_left_banked_25_deg_up_to_flat( void bolliger_mabillard_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -9954,12 +9954,12 @@ void bolliger_mabillard_track_right_banked_25_deg_up_to_flat( void bolliger_mabillard_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9967,12 +9967,12 @@ void bolliger_mabillard_track_flat_to_left_banked_25_deg_down( void bolliger_mabillard_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9980,12 +9980,12 @@ void bolliger_mabillard_track_flat_to_right_banked_25_deg_down( void bolliger_mabillard_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -9993,12 +9993,12 @@ void bolliger_mabillard_track_left_banked_25_deg_down_to_flat( void bolliger_mabillard_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -10006,12 +10006,12 @@ void bolliger_mabillard_track_right_banked_25_deg_down_to_flat( void bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10051,12 +10051,12 @@ void bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( void bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10096,12 +10096,12 @@ void bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( void bolliger_mabillard_track_left_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement, supportType); @@ -10109,12 +10109,12 @@ void bolliger_mabillard_track_left_quarter_turn_1_90_deg_down( void bolliger_mabillard_track_right_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement, supportType); @@ -10123,12 +10123,12 @@ void bolliger_mabillard_track_right_quarter_turn_1_90_deg_down( /* The following track elements used to be specific to the Vertical Roller Coaster */ void bolliger_mabillard_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -10199,12 +10199,12 @@ void bolliger_mabillard_track_flat_to_60_deg_up( void bolliger_mabillard_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { if (track_element_is_lift_hill(tileElement)) { @@ -10275,12 +10275,12 @@ void bolliger_mabillard_track_60_deg_up_to_flat( void bolliger_mabillard_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_60_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -10288,12 +10288,12 @@ void bolliger_mabillard_track_flat_to_60_deg_down( void bolliger_mabillard_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_flat_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -10301,12 +10301,12 @@ void bolliger_mabillard_track_60_deg_down_to_flat( void bolliger_mabillard_track_brake_for_drop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -10348,12 +10348,12 @@ void bolliger_mabillard_track_brake_for_drop( /* The following track elements used to be specific to the Steel Twister */ void bolliger_mabillard_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10461,24 +10461,24 @@ void bolliger_mabillard_track_half_loop_up( void bolliger_mabillard_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_half_loop_up(session, rideIndex, 3 - trackSequence, direction, height, tileElement, supportType); } void bolliger_mabillard_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10576,12 +10576,12 @@ void bolliger_mabillard_track_left_corkscrew_up( void bolliger_mabillard_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10680,12 +10680,12 @@ void bolliger_mabillard_track_right_corkscrew_up( void bolliger_mabillard_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 1) & 3, height, tileElement, supportType); @@ -10693,12 +10693,12 @@ void bolliger_mabillard_track_left_corkscrew_down( void bolliger_mabillard_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction - 1) & 3, height, tileElement, supportType); @@ -10706,12 +10706,12 @@ void bolliger_mabillard_track_right_corkscrew_down( void bolliger_mabillard_track_flat_to_60_deg_up_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10846,12 +10846,12 @@ void bolliger_mabillard_track_flat_to_60_deg_up_long_base( /** rct2: 0x008AC104 */ void bolliger_mabillard_track_60_deg_up_to_flat_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -10985,12 +10985,12 @@ void bolliger_mabillard_track_60_deg_up_to_flat_long_base( void bolliger_mabillard_track_flat_to_60_deg_down_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_flat_to_60_deg_up_long_base(session, rideIndex, 3 - trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -10998,12 +10998,12 @@ void bolliger_mabillard_track_flat_to_60_deg_down_long_base( void bolliger_mabillard_track_60_deg_up_to_flat_long_base122( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_60_deg_up_to_flat_long_base(session, rideIndex, 3 - trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -11011,12 +11011,12 @@ void bolliger_mabillard_track_60_deg_up_to_flat_long_base122( void bolliger_mabillard_track_left_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -11142,12 +11142,12 @@ void bolliger_mabillard_track_left_barrel_roll_up_to_down( void bolliger_mabillard_track_right_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -11273,12 +11273,12 @@ void bolliger_mabillard_track_right_barrel_roll_up_to_down( void bolliger_mabillard_track_left_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_barrel_roll_up_to_down(session, rideIndex, 2 - trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -11286,12 +11286,12 @@ void bolliger_mabillard_track_left_barrel_roll_down_to_up( void bolliger_mabillard_track_right_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_barrel_roll_up_to_down(session, rideIndex, 2 - trackSequence, (direction + 2) & 3, height, tileElement, supportType); @@ -11299,12 +11299,12 @@ void bolliger_mabillard_track_right_barrel_roll_down_to_up( void bolliger_mabillard_track_powered_lift( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (direction) { @@ -11341,12 +11341,12 @@ void bolliger_mabillard_track_powered_lift( void bolliger_mabillard_track_left_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -11545,12 +11545,12 @@ void bolliger_mabillard_track_left_large_half_loop_up( void bolliger_mabillard_track_right_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -11749,12 +11749,12 @@ void bolliger_mabillard_track_right_large_half_loop_up( void bolliger_mabillard_track_right_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_right_large_half_loop_up(session, rideIndex, 6 - trackSequence, direction, height, tileElement, supportType); @@ -11762,12 +11762,12 @@ void bolliger_mabillard_track_right_large_half_loop_down( void bolliger_mabillard_track_left_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_left_large_half_loop_up(session, rideIndex, 6 - trackSequence, direction, height, tileElement, supportType); @@ -11775,12 +11775,12 @@ void bolliger_mabillard_track_left_large_half_loop_down( void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { switch (trackSequence) { @@ -11865,12 +11865,12 @@ void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( void bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up(session, rideIndex, 2 - trackSequence, direction, height, tileElement, supportType); @@ -11878,18 +11878,18 @@ void bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down( void bolliger_mabillard_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType) + int32_t supportType) { // These offsets could be moved to the g2.dat file when that supports offsets. - sint8 ne_sw_offsetX = 8; - sint8 ne_sw_offsetY = -17; - sint8 nw_se_offsetX = -17; - sint8 nw_se_offsetY = 8; + int8_t ne_sw_offsetX = 8; + int8_t ne_sw_offsetY = -17; + int8_t nw_se_offsetX = -17; + int8_t nw_se_offsetY = 8; switch (direction) { diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.h b/src/openrct2/ride/coaster/BolligerMabillardTrack.h index 9fad5f187b..f484a98fb4 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.h +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.h @@ -16,1438 +16,1438 @@ struct rct_tile_element; void bolliger_mabillard_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); /* Previously specific to the Vertical RC */ void bolliger_mabillard_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_brake_for_drop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_diag_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); /* Previously specific to the Steel Twister */ void bolliger_mabillard_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_60_deg_up_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_up_to_flat_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_flat_to_60_deg_down_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_60_deg_up_to_flat_long_base122( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_powered_lift( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_right_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_left_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); void bolliger_mabillard_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement, - sint32 supportType); + int32_t supportType); diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index 80e0ad530c..ee4e4ff477 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008AE6E0 */ static void compact_inverted_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -76,13 +76,13 @@ static void compact_inverted_rc_track_flat( /** rct2: 0x008AE950, 0x008AE960, 0x008AE970 */ static void compact_inverted_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, @@ -105,10 +105,10 @@ static void compact_inverted_rc_track_station( /** rct2: 0x008AE6F0 */ static void compact_inverted_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -195,10 +195,10 @@ static void compact_inverted_rc_track_25_deg_up( /** rct2: 0x008AE700 */ static void compact_inverted_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -261,10 +261,10 @@ static void compact_inverted_rc_track_60_deg_up( /** rct2: 0x008AE710 */ static void compact_inverted_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -351,10 +351,10 @@ static void compact_inverted_rc_track_flat_to_25_deg_up( /** rct2: 0x008AE720 */ static void compact_inverted_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -425,10 +425,10 @@ static void compact_inverted_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008AE730 */ static void compact_inverted_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -523,10 +523,10 @@ static void compact_inverted_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008AE740 */ static void compact_inverted_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -613,10 +613,10 @@ static void compact_inverted_rc_track_25_deg_up_to_flat( /** rct2: 0x008AE750 */ static void compact_inverted_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -625,10 +625,10 @@ static void compact_inverted_rc_track_25_deg_down( /** rct2: 0x008AE760 */ static void compact_inverted_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -637,10 +637,10 @@ static void compact_inverted_rc_track_60_deg_down( /** rct2: 0x008AE770 */ static void compact_inverted_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -649,10 +649,10 @@ static void compact_inverted_rc_track_flat_to_25_deg_down( /** rct2: 0x008AE780 */ static void compact_inverted_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -662,10 +662,10 @@ static void compact_inverted_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008AE790 */ static void compact_inverted_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -675,10 +675,10 @@ static void compact_inverted_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008AE7A0 */ static void compact_inverted_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -687,10 +687,10 @@ static void compact_inverted_rc_track_25_deg_down_to_flat( /** rct2: 0x008AE7B0 */ static void compact_inverted_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -849,10 +849,10 @@ static void compact_inverted_rc_track_left_quarter_turn_5( /** rct2: 0x008AE7C0 */ static void compact_inverted_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -862,10 +862,10 @@ static void compact_inverted_rc_track_right_quarter_turn_5( /** rct2: 0x008AE7D0 */ static void compact_inverted_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -905,10 +905,10 @@ static void compact_inverted_rc_track_flat_to_left_bank( /** rct2: 0x008AE7E0 */ static void compact_inverted_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -948,10 +948,10 @@ static void compact_inverted_rc_track_flat_to_right_bank( /** rct2: 0x008AE7F0 */ static void compact_inverted_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -991,10 +991,10 @@ static void compact_inverted_rc_track_left_bank_to_flat( /** rct2: 0x008AE800 */ static void compact_inverted_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1034,10 +1034,10 @@ static void compact_inverted_rc_track_right_bank_to_flat( /** rct2: 0x008AE810 */ static void compact_inverted_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1196,10 +1196,10 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008AE820 */ static void compact_inverted_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1210,10 +1210,10 @@ static void compact_inverted_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008AE830 */ static void compact_inverted_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1277,10 +1277,10 @@ static void compact_inverted_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008AE840 */ static void compact_inverted_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1344,10 +1344,10 @@ static void compact_inverted_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008AE850 */ static void compact_inverted_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1411,10 +1411,10 @@ static void compact_inverted_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008AE860 */ static void compact_inverted_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1478,10 +1478,10 @@ static void compact_inverted_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008AE870 */ static void compact_inverted_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -1491,10 +1491,10 @@ static void compact_inverted_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008AE880 */ static void compact_inverted_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -1504,10 +1504,10 @@ static void compact_inverted_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008AE890 */ static void compact_inverted_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -1517,10 +1517,10 @@ static void compact_inverted_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008AE8A0 */ static void compact_inverted_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -1530,10 +1530,10 @@ static void compact_inverted_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008AE8B0 */ static void compact_inverted_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1573,10 +1573,10 @@ static void compact_inverted_rc_track_left_bank( /** rct2: 0x008AE8C0 */ static void compact_inverted_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1585,10 +1585,10 @@ static void compact_inverted_rc_track_right_bank( /** rct2: 0x008AE8D0 */ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1732,10 +1732,10 @@ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008AE8E0 */ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1879,10 +1879,10 @@ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008AE8F0 */ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1893,10 +1893,10 @@ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008AE900 */ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1907,10 +1907,10 @@ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008AE910 */ static void compact_inverted_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2064,10 +2064,10 @@ static void compact_inverted_rc_track_s_bend_left( /** rct2: 0x008AE920 */ static void compact_inverted_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2221,10 +2221,10 @@ static void compact_inverted_rc_track_s_bend_right( /** rct2: 0x008AE930 */ static void compact_inverted_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2496,10 +2496,10 @@ static void compact_inverted_rc_track_left_vertical_loop( /** rct2: 0x008AE940 */ static void compact_inverted_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2771,10 +2771,10 @@ static void compact_inverted_rc_track_right_vertical_loop( /** rct2: 0x008AE980 */ static void compact_inverted_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2882,10 +2882,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3( /** rct2: 0x008AE990 */ static void compact_inverted_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2895,10 +2895,10 @@ static void compact_inverted_rc_track_right_quarter_turn_3( /** rct2: 0x008AE9A0 */ static void compact_inverted_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3007,10 +3007,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008AE9B0 */ static void compact_inverted_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3021,10 +3021,10 @@ static void compact_inverted_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008AE9C0 */ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3104,10 +3104,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AE9D0 */ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3187,10 +3187,10 @@ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AE9E0 */ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3201,10 +3201,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008AE9F0 */ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3215,10 +3215,10 @@ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008AEA00 */ static void compact_inverted_rc_track_left_twist_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3314,10 +3314,10 @@ static void compact_inverted_rc_track_left_twist_down_to_up( /** rct2: 0x008AEA10 */ static void compact_inverted_rc_track_right_twist_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3413,10 +3413,10 @@ static void compact_inverted_rc_track_right_twist_down_to_up( /** rct2: 0x008AEA20 */ static void compact_inverted_rc_track_left_twist_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3512,10 +3512,10 @@ static void compact_inverted_rc_track_left_twist_up_to_down( /** rct2: 0x008AEA30 */ static void compact_inverted_rc_track_right_twist_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3611,10 +3611,10 @@ static void compact_inverted_rc_track_right_twist_up_to_down( /** rct2: 0x008AEA40 */ static void compact_inverted_rc_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3751,10 +3751,10 @@ static void compact_inverted_rc_track_half_loop_up( /** rct2: 0x008AEA50 */ static void compact_inverted_rc_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_half_loop_up(session, rideIndex, 3 - trackSequence, direction, height, tileElement); @@ -3763,10 +3763,10 @@ static void compact_inverted_rc_track_half_loop_down( /** rct2: 0x008AEA60 */ static void compact_inverted_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3873,10 +3873,10 @@ static void compact_inverted_rc_track_left_corkscrew_up( /** rct2: 0x008AEA70 */ static void compact_inverted_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3983,10 +3983,10 @@ static void compact_inverted_rc_track_right_corkscrew_up( /** rct2: 0x008AEA80 */ static void compact_inverted_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_right_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 1) & 3, height, @@ -3996,10 +3996,10 @@ static void compact_inverted_rc_track_left_corkscrew_down( /** rct2: 0x008AEA90 */ static void compact_inverted_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_left_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction - 1) & 3, height, tileElement); @@ -4008,10 +4008,10 @@ static void compact_inverted_rc_track_right_corkscrew_down( /** rct2: 0x008AEAD0 */ static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4049,10 +4049,10 @@ static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008AEAB0 */ static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4090,10 +4090,10 @@ static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008AEAC0 */ static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -4103,10 +4103,10 @@ static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008AEAE0 */ static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, @@ -4116,10 +4116,10 @@ static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008AEAA0 */ static void compact_inverted_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4151,10 +4151,10 @@ static void compact_inverted_rc_track_brakes( /** rct2: 0x008AEAF0 */ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4318,10 +4318,10 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( /** rct2: 0x008AEB00 */ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4485,10 +4485,10 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( /** rct2: 0x008AEB10 */ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4652,10 +4652,10 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( /** rct2: 0x008AEB20 */ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4819,10 +4819,10 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( /** rct2: 0x008AEB30 */ static void compact_inverted_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4873,10 +4873,10 @@ static void compact_inverted_rc_track_on_ride_photo( /** rct2: 0x008AEDB0 */ static void compact_inverted_rc_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4939,10 +4939,10 @@ static void compact_inverted_rc_track_90_deg_up( /** rct2: 0x008AEDC0 */ static void compact_inverted_rc_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4951,10 +4951,10 @@ static void compact_inverted_rc_track_90_deg_down( /** rct2: 0x008AED70 */ static void compact_inverted_rc_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5021,10 +5021,10 @@ static void compact_inverted_rc_track_60_deg_up_to_90_deg_up( /** rct2: 0x008AED80 */ static void compact_inverted_rc_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { compact_inverted_rc_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -5034,10 +5034,10 @@ static void compact_inverted_rc_track_90_deg_down_to_60_deg_down( /** rct2: 0x008AED90 */ static void compact_inverted_rc_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -5101,10 +5101,10 @@ static void compact_inverted_rc_track_90_deg_up_to_60_deg_up( /** rct2: 0x008AEDA0 */ static void compact_inverted_rc_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5170,10 +5170,10 @@ static void compact_inverted_rc_track_60_deg_down_to_90_deg_down( /** rct2: 0x008AEB40 */ static void compact_inverted_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5319,10 +5319,10 @@ static void compact_inverted_rc_track_left_eighth_to_diag( /** rct2: 0x008AEB50 */ static void compact_inverted_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5468,10 +5468,10 @@ static void compact_inverted_rc_track_right_eighth_to_diag( /** rct2: 0x008AEB60 */ static void compact_inverted_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5481,10 +5481,10 @@ static void compact_inverted_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008AEB70 */ static void compact_inverted_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5494,10 +5494,10 @@ static void compact_inverted_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008AED30 */ static void compact_inverted_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5644,10 +5644,10 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008AED40 */ static void compact_inverted_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5794,10 +5794,10 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008AED50 */ static void compact_inverted_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5808,10 +5808,10 @@ static void compact_inverted_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008AED60 */ static void compact_inverted_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5822,10 +5822,10 @@ static void compact_inverted_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008AEB80 */ static void compact_inverted_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5957,10 +5957,10 @@ static void compact_inverted_rc_track_diag_flat( /** rct2: 0x008AEBB0 */ static void compact_inverted_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6092,10 +6092,10 @@ static void compact_inverted_rc_track_diag_25_deg_up( /** rct2: 0x008AEC10 */ static void compact_inverted_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6175,10 +6175,10 @@ static void compact_inverted_rc_track_diag_60_deg_up( /** rct2: 0x008AEB90 */ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6310,10 +6310,10 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008AEBF0 */ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6393,10 +6393,10 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008AEC00 */ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6476,10 +6476,10 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008AEBA0 */ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6611,10 +6611,10 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008AEBE0 */ static void compact_inverted_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6746,10 +6746,10 @@ static void compact_inverted_rc_track_diag_25_deg_down( /** rct2: 0x008AEC40 */ static void compact_inverted_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6829,10 +6829,10 @@ static void compact_inverted_rc_track_diag_60_deg_down( /** rct2: 0x008AEBC0 */ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6961,10 +6961,10 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008AEC20 */ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7044,10 +7044,10 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008AEC30 */ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7127,10 +7127,10 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008AEBD0 */ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7262,10 +7262,10 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008AEC70 */ static void compact_inverted_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7346,10 +7346,10 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank( /** rct2: 0x008AEC80 */ static void compact_inverted_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7430,10 +7430,10 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank( /** rct2: 0x008AEC90 */ static void compact_inverted_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7514,10 +7514,10 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat( /** rct2: 0x008AECA0 */ static void compact_inverted_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7598,10 +7598,10 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat( /** rct2: 0x008AECD0 */ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7681,10 +7681,10 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008AECE0 */ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7764,10 +7764,10 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008AECB0 */ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7847,10 +7847,10 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008AECC0 */ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7930,10 +7930,10 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008AECF0 */ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8010,10 +8010,10 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008AED00 */ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8090,10 +8090,10 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008AED10 */ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8173,10 +8173,10 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008AED20 */ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8256,10 +8256,10 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008AEC50 */ static void compact_inverted_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8340,10 +8340,10 @@ static void compact_inverted_rc_track_diag_left_bank( /** rct2: 0x008AEC60 */ static void compact_inverted_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8424,10 +8424,10 @@ static void compact_inverted_rc_track_diag_right_bank( /** rct2: 0x008AEAA0 */ static void compact_inverted_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8456,7 +8456,7 @@ static void compact_inverted_rc_track_block_brakes( paint_util_set_general_support_height(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index 10c36af482..954606d79a 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008A7AF8 */ static void corkscrew_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -83,13 +83,13 @@ static void corkscrew_rc_track_flat( /** rct2: 0x008A7D68, 0x008A7D78, 0x008A7D88 */ static void corkscrew_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 16236, 16232, SPR_STATION_BASE_A_SW_NE }, { 16237, 16233, SPR_STATION_BASE_A_NW_SE }, { 16236, 16232, SPR_STATION_BASE_A_SW_NE }, @@ -118,10 +118,10 @@ static void corkscrew_rc_track_station( /** rct2: 0x008A7B08 */ static void corkscrew_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -192,10 +192,10 @@ static void corkscrew_rc_track_25_deg_up( /** rct2: 0x008A7B18 */ static void corkscrew_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -266,10 +266,10 @@ static void corkscrew_rc_track_60_deg_up( /** rct2: 0x008A7B28 */ static void corkscrew_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -340,10 +340,10 @@ static void corkscrew_rc_track_flat_to_25_deg_up( /** rct2: 0x008A7B38 */ static void corkscrew_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -422,10 +422,10 @@ static void corkscrew_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008A7B48 */ static void corkscrew_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -504,10 +504,10 @@ static void corkscrew_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008A7B58 */ static void corkscrew_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -578,10 +578,10 @@ static void corkscrew_rc_track_25_deg_up_to_flat( /** rct2: 0x008A7B68 */ static void corkscrew_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -590,10 +590,10 @@ static void corkscrew_rc_track_25_deg_down( /** rct2: 0x008A7B78 */ static void corkscrew_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -602,10 +602,10 @@ static void corkscrew_rc_track_60_deg_down( /** rct2: 0x008A7B88 */ static void corkscrew_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -614,10 +614,10 @@ static void corkscrew_rc_track_flat_to_25_deg_down( /** rct2: 0x008A7B98 */ static void corkscrew_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -626,10 +626,10 @@ static void corkscrew_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A7BA8 */ static void corkscrew_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -638,10 +638,10 @@ static void corkscrew_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A7BB8 */ static void corkscrew_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -650,10 +650,10 @@ static void corkscrew_rc_track_25_deg_down_to_flat( /** rct2: 0x008A7BC8 */ static void corkscrew_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -809,10 +809,10 @@ static void corkscrew_rc_track_left_quarter_turn_5( /** rct2: 0x008A7BD8 */ static void corkscrew_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -822,10 +822,10 @@ static void corkscrew_rc_track_right_quarter_turn_5( /** rct2: 0x008A7BE8 */ static void corkscrew_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -864,10 +864,10 @@ static void corkscrew_rc_track_flat_to_left_bank( /** rct2: 0x008A7BF8 */ static void corkscrew_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -906,10 +906,10 @@ static void corkscrew_rc_track_flat_to_right_bank( /** rct2: 0x008A7C08 */ static void corkscrew_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -948,10 +948,10 @@ static void corkscrew_rc_track_left_bank_to_flat( /** rct2: 0x008A7C18 */ static void corkscrew_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -990,10 +990,10 @@ static void corkscrew_rc_track_right_bank_to_flat( /** rct2: 0x008A7C28 */ static void corkscrew_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1153,10 +1153,10 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008A7C38 */ static void corkscrew_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1166,10 +1166,10 @@ static void corkscrew_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008A7C48 */ static void corkscrew_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1215,10 +1215,10 @@ static void corkscrew_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008A7C58 */ static void corkscrew_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1264,10 +1264,10 @@ static void corkscrew_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008A7C68 */ static void corkscrew_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1313,10 +1313,10 @@ static void corkscrew_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008A7C78 */ static void corkscrew_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1362,10 +1362,10 @@ static void corkscrew_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008A7C88 */ static void corkscrew_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1374,10 +1374,10 @@ static void corkscrew_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008A7C98 */ static void corkscrew_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1386,10 +1386,10 @@ static void corkscrew_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008A7CA8 */ static void corkscrew_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1398,10 +1398,10 @@ static void corkscrew_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008A7CB8 */ static void corkscrew_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1410,10 +1410,10 @@ static void corkscrew_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008A7CC8 */ static void corkscrew_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1448,10 +1448,10 @@ static void corkscrew_rc_track_left_bank( /** rct2: 0x008A7CD8 */ static void corkscrew_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1460,10 +1460,10 @@ static void corkscrew_rc_track_right_bank( /** rct2: 0x008A7CE8 */ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1614,10 +1614,10 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008A7CF8 */ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1768,10 +1768,10 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008A7D08 */ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1782,10 +1782,10 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008A7D18 */ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1796,10 +1796,10 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008A7D28 */ static void corkscrew_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1925,10 +1925,10 @@ static void corkscrew_rc_track_s_bend_left( /** rct2: 0x008A7D38 */ static void corkscrew_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2054,10 +2054,10 @@ static void corkscrew_rc_track_s_bend_right( /** rct2: 0x008A7D48 */ static void corkscrew_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2283,10 +2283,10 @@ static void corkscrew_rc_track_left_vertical_loop( /** rct2: 0x008A7D58 */ static void corkscrew_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2480,10 +2480,10 @@ static void corkscrew_rc_track_right_vertical_loop( /** rct2: 0x008A7D98 */ static void corkscrew_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2584,10 +2584,10 @@ static void corkscrew_rc_track_left_quarter_turn_3( /** rct2: 0x008A7DA8 */ static void corkscrew_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2597,10 +2597,10 @@ static void corkscrew_rc_track_right_quarter_turn_3( /** rct2: 0x008A7DB8 */ static void corkscrew_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2705,10 +2705,10 @@ static void corkscrew_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008A7DC8 */ static void corkscrew_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2718,10 +2718,10 @@ static void corkscrew_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008A7DD8 */ static void corkscrew_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2793,10 +2793,10 @@ static void corkscrew_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008A7DE8 */ static void corkscrew_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2871,10 +2871,10 @@ static void corkscrew_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008A7DF8 */ static void corkscrew_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2885,10 +2885,10 @@ static void corkscrew_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008A7E08 */ static void corkscrew_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2899,10 +2899,10 @@ static void corkscrew_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008A7E18 */ static void corkscrew_rc_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3012,10 +3012,10 @@ static void corkscrew_rc_track_half_loop_up( /** rct2: 0x008A7E28 */ static void corkscrew_rc_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_half_loop_up(session, rideIndex, 3 - trackSequence, direction, height, tileElement); @@ -3024,10 +3024,10 @@ static void corkscrew_rc_track_half_loop_down( /** rct2: 0x008A7E38 */ static void corkscrew_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3127,10 +3127,10 @@ static void corkscrew_rc_track_left_corkscrew_up( /** rct2: 0x008A7E48 */ static void corkscrew_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3231,10 +3231,10 @@ static void corkscrew_rc_track_right_corkscrew_up( /** rct2: 0x008A7E58 */ static void corkscrew_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_right_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 1) & 3, height, tileElement); @@ -3243,10 +3243,10 @@ static void corkscrew_rc_track_left_corkscrew_down( /** rct2: 0x008A7E68 */ static void corkscrew_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_left_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction - 1) & 3, height, tileElement); @@ -3255,10 +3255,10 @@ static void corkscrew_rc_track_right_corkscrew_down( /** rct2: 0x008A7E78 */ static void corkscrew_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3461,10 +3461,10 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008A7E88 */ static void corkscrew_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3667,10 +3667,10 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008A7E98 */ static void corkscrew_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3686,10 +3686,10 @@ static void corkscrew_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008A7EA8 */ static void corkscrew_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3705,10 +3705,10 @@ static void corkscrew_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008A7EB8 */ static void corkscrew_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4021,10 +4021,10 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008A7EC8 */ static void corkscrew_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4337,10 +4337,10 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008A7ED8 */ static void corkscrew_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4356,10 +4356,10 @@ static void corkscrew_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008A7EE8 */ static void corkscrew_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4375,10 +4375,10 @@ static void corkscrew_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008A7F18 */ static void corkscrew_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4416,10 +4416,10 @@ static void corkscrew_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008A7EF8 */ static void corkscrew_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4457,10 +4457,10 @@ static void corkscrew_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008A7F08 */ static void corkscrew_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -4470,10 +4470,10 @@ static void corkscrew_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008A7F28 */ static void corkscrew_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, @@ -4483,10 +4483,10 @@ static void corkscrew_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008A7F38 */ static void corkscrew_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4515,10 +4515,10 @@ static void corkscrew_rc_track_brakes( /** rct2: 0x008A7F48 */ static void corkscrew_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4561,10 +4561,10 @@ static void corkscrew_rc_track_on_ride_photo( /** rct2: 0x008A8198 */ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4700,10 +4700,10 @@ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( /** rct2: 0x008A81A8 */ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4839,10 +4839,10 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( /** rct2: 0x008A81B8 */ static void corkscrew_rc_track_flat_to_60_deg_down_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_flat_to_60_deg_up_long_base(session, rideIndex, 3 - trackSequence, (direction + 2) & 3, height, @@ -4852,10 +4852,10 @@ static void corkscrew_rc_track_flat_to_60_deg_down_long_base( /** rct2: 0x008A81C8 */ static void corkscrew_rc_track_60_deg_up_to_flat_long_base122( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { corkscrew_rc_track_60_deg_up_to_flat_long_base(session, rideIndex, 3 - trackSequence, (direction + 2) & 3, height, @@ -4865,10 +4865,10 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base122( /** rct2: 0x008A7F68 */ static void corkscrew_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4994,10 +4994,10 @@ static void corkscrew_rc_track_left_eighth_to_diag( /** rct2: 0x008A7F78 */ static void corkscrew_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5123,10 +5123,10 @@ static void corkscrew_rc_track_right_eighth_to_diag( /** rct2: 0x008A7F88 */ static void corkscrew_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5136,10 +5136,10 @@ static void corkscrew_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008A7F98 */ static void corkscrew_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5149,10 +5149,10 @@ static void corkscrew_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008A7FA8 */ static void corkscrew_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5278,10 +5278,10 @@ static void corkscrew_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008A7FB8 */ static void corkscrew_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5407,10 +5407,10 @@ static void corkscrew_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008A7FC8 */ static void corkscrew_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5420,10 +5420,10 @@ static void corkscrew_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008A7FD8 */ static void corkscrew_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5433,10 +5433,10 @@ static void corkscrew_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008A7F58 */ static void corkscrew_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5575,10 +5575,10 @@ static void corkscrew_rc_track_diag_flat( /** rct2: 0x008A8008 */ static void corkscrew_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5717,10 +5717,10 @@ static void corkscrew_rc_track_diag_25_deg_up( /** rct2: 0x008A8068 */ static void corkscrew_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5859,10 +5859,10 @@ static void corkscrew_rc_track_diag_60_deg_up( /** rct2: 0x008A7FE8 */ static void corkscrew_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6001,10 +6001,10 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008A8048 */ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6143,10 +6143,10 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008A8058 */ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6285,10 +6285,10 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008A7FF8 */ static void corkscrew_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6427,10 +6427,10 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008A8038 */ static void corkscrew_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6569,10 +6569,10 @@ static void corkscrew_rc_track_diag_25_deg_down( /** rct2: 0x008A8098 */ static void corkscrew_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6711,10 +6711,10 @@ static void corkscrew_rc_track_diag_60_deg_down( /** rct2: 0x008A8018 */ static void corkscrew_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6851,10 +6851,10 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008A8078 */ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6993,10 +6993,10 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008A8088 */ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7135,10 +7135,10 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008A8028 */ static void corkscrew_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7277,10 +7277,10 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008A80C8 */ static void corkscrew_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7351,10 +7351,10 @@ static void corkscrew_rc_track_diag_flat_to_left_bank( /** rct2: 0x008A80D8 */ static void corkscrew_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7425,10 +7425,10 @@ static void corkscrew_rc_track_diag_flat_to_right_bank( /** rct2: 0x008A80E8 */ static void corkscrew_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7499,10 +7499,10 @@ static void corkscrew_rc_track_diag_left_bank_to_flat( /** rct2: 0x008A80F8 */ static void corkscrew_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7573,10 +7573,10 @@ static void corkscrew_rc_track_diag_right_bank_to_flat( /** rct2: 0x008A8128 */ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7647,10 +7647,10 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008A8138 */ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7721,10 +7721,10 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008A8108 */ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7795,10 +7795,10 @@ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008A8118 */ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7869,10 +7869,10 @@ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008A8148 */ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7941,10 +7941,10 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008A8158 */ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8013,10 +8013,10 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008A8168 */ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8087,10 +8087,10 @@ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008A8178 */ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8161,10 +8161,10 @@ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008A80A8 */ static void corkscrew_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8233,10 +8233,10 @@ static void corkscrew_rc_track_diag_left_bank( /** rct2: 0x008A80B8 */ static void corkscrew_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8305,10 +8305,10 @@ static void corkscrew_rc_track_diag_right_bank( /** rct2: 0x008A8188 */ static void corkscrew_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8333,10 +8333,10 @@ static void corkscrew_rc_track_block_brakes( static void corkscrew_rc_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!is_csg_loaded()) @@ -8345,10 +8345,10 @@ static void corkscrew_rc_track_booster( return; } - uint32 sprite_ne_sw_behind = SPR_CSG_BEGIN + 56213; - uint32 sprite_nw_se_behind = SPR_CSG_BEGIN + 56214; - uint32 sprite_ne_sw_after = SPR_CSG_BEGIN + 56215; - uint32 sprite_nw_se_after = SPR_CSG_BEGIN + 56216; + uint32_t sprite_ne_sw_behind = SPR_CSG_BEGIN + 56213; + uint32_t sprite_nw_se_behind = SPR_CSG_BEGIN + 56214; + uint32_t sprite_ne_sw_after = SPR_CSG_BEGIN + 56215; + uint32_t sprite_nw_se_after = SPR_CSG_BEGIN + 56216; switch (direction) { @@ -8377,7 +8377,7 @@ static void corkscrew_rc_track_booster( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index a31e25856c..5ad4390174 100644 --- a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x007C6FF4 */ static void flying_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -134,15 +134,15 @@ static void flying_rc_track_flat( /** rct2: 0x007C7244, 0x007C7254, 0x007C7264 */ static void flying_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_inverted(tileElement)) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, @@ -159,7 +159,7 @@ static void flying_rc_track_station( } else { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 17154, 17150, SPR_STATION_BASE_A_SW_NE }, { 17155, 17151, SPR_STATION_BASE_A_NW_SE }, { 17154, 17150, SPR_STATION_BASE_A_SW_NE }, @@ -190,10 +190,10 @@ static void flying_rc_track_station( /** rct2: 0x007C7004 */ static void flying_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -321,10 +321,10 @@ static void flying_rc_track_25_deg_up( /** rct2: 0x007C7014 */ static void flying_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -403,10 +403,10 @@ static void flying_rc_track_60_deg_up( /** rct2: 0x007C7024 */ static void flying_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -534,10 +534,10 @@ static void flying_rc_track_flat_to_25_deg_up( /** rct2: 0x007C7034 */ static void flying_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -624,10 +624,10 @@ static void flying_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x007C7044 */ static void flying_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -738,10 +738,10 @@ static void flying_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x007C7054 */ static void flying_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -869,10 +869,10 @@ static void flying_rc_track_25_deg_up_to_flat( /** rct2: 0x007C7064 */ static void flying_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -881,10 +881,10 @@ static void flying_rc_track_25_deg_down( /** rct2: 0x007C7074 */ static void flying_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -893,10 +893,10 @@ static void flying_rc_track_60_deg_down( /** rct2: 0x007C7084 */ static void flying_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -905,10 +905,10 @@ static void flying_rc_track_flat_to_25_deg_down( /** rct2: 0x007C7094 */ static void flying_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -917,10 +917,10 @@ static void flying_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x007C70A4 */ static void flying_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -929,10 +929,10 @@ static void flying_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x007C70B4 */ static void flying_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -941,10 +941,10 @@ static void flying_rc_track_25_deg_down_to_flat( /** rct2: 0x007C70C4 */ static void flying_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1268,10 +1268,10 @@ static void flying_rc_track_left_quarter_turn_5( /** rct2: 0x007C70D4 */ static void flying_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1281,10 +1281,10 @@ static void flying_rc_track_right_quarter_turn_5( /** rct2: 0x007C70E4 */ static void flying_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1362,10 +1362,10 @@ static void flying_rc_track_flat_to_left_bank( /** rct2: 0x007C70F4 */ static void flying_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1443,10 +1443,10 @@ static void flying_rc_track_flat_to_right_bank( /** rct2: 0x007C7104 */ static void flying_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1524,10 +1524,10 @@ static void flying_rc_track_left_bank_to_flat( /** rct2: 0x007C7114 */ static void flying_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1605,10 +1605,10 @@ static void flying_rc_track_right_bank_to_flat( /** rct2: 0x007C7124 */ static void flying_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1936,10 +1936,10 @@ static void flying_rc_track_banked_left_quarter_turn_5( /** rct2: 0x007C7134 */ static void flying_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1949,10 +1949,10 @@ static void flying_rc_track_banked_right_quarter_turn_5( /** rct2: 0x007C7144 */ static void flying_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2061,10 +2061,10 @@ static void flying_rc_track_left_bank_to_25_deg_up( /** rct2: 0x007C7154 */ static void flying_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2173,10 +2173,10 @@ static void flying_rc_track_right_bank_to_25_deg_up( /** rct2: 0x007C7164 */ static void flying_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2285,10 +2285,10 @@ static void flying_rc_track_25_deg_up_to_left_bank( /** rct2: 0x007C7174 */ static void flying_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2397,10 +2397,10 @@ static void flying_rc_track_25_deg_up_to_right_bank( /** rct2: 0x007C7184 */ static void flying_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2409,10 +2409,10 @@ static void flying_rc_track_left_bank_to_25_deg_down( /** rct2: 0x007C7194 */ static void flying_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2421,10 +2421,10 @@ static void flying_rc_track_right_bank_to_25_deg_down( /** rct2: 0x007C71A4 */ static void flying_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2433,10 +2433,10 @@ static void flying_rc_track_25_deg_down_to_left_bank( /** rct2: 0x007C71B4 */ static void flying_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2445,10 +2445,10 @@ static void flying_rc_track_25_deg_down_to_right_bank( /** rct2: 0x007C71C4 */ static void flying_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2522,10 +2522,10 @@ static void flying_rc_track_left_bank( /** rct2: 0x007C71D4 */ static void flying_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2534,10 +2534,10 @@ static void flying_rc_track_right_bank( /** rct2: 0x007C71E4 */ static void flying_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2856,10 +2856,10 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x007C71F4 */ static void flying_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3178,10 +3178,10 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x007C7204 */ static void flying_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -3191,10 +3191,10 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x007C7214 */ static void flying_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -3204,10 +3204,10 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x007C7224 */ static void flying_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3499,10 +3499,10 @@ static void flying_rc_track_s_bend_left( /** rct2: 0x007C7234 */ static void flying_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3794,10 +3794,10 @@ static void flying_rc_track_s_bend_right( /** rct2: 0x007C7274 */ static void flying_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4007,10 +4007,10 @@ static void flying_rc_track_left_quarter_turn_3( /** rct2: 0x007C7284 */ static void flying_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -4020,10 +4020,10 @@ static void flying_rc_track_right_quarter_turn_3( /** rct2: 0x007C7294 */ static void flying_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4237,10 +4237,10 @@ static void flying_rc_track_left_quarter_turn_3_bank( /** rct2: 0x007C72A4 */ static void flying_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -4250,10 +4250,10 @@ static void flying_rc_track_right_quarter_turn_3_bank( /** rct2: 0x007C72B4 */ static void flying_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4413,10 +4413,10 @@ static void flying_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x007C72C4 */ static void flying_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4582,10 +4582,10 @@ static void flying_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x007C72D4 */ static void flying_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -4595,10 +4595,10 @@ static void flying_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x007C72E4 */ static void flying_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -4608,10 +4608,10 @@ static void flying_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x007C7314 */ static void flying_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4818,10 +4818,10 @@ static void flying_rc_track_left_half_banked_helix_up_small( /** rct2: 0x007C7324 */ static void flying_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5028,10 +5028,10 @@ static void flying_rc_track_right_half_banked_helix_up_small( /** rct2: 0x007C7334 */ static void flying_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -5047,10 +5047,10 @@ static void flying_rc_track_left_half_banked_helix_down_small( /** rct2: 0x007C7344 */ static void flying_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -5065,10 +5065,10 @@ static void flying_rc_track_right_half_banked_helix_down_small( /** rct2: 0x007C7354 */ static void flying_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5389,10 +5389,10 @@ static void flying_rc_track_left_half_banked_helix_up_large( /** rct2: 0x007C7364 */ static void flying_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5713,10 +5713,10 @@ static void flying_rc_track_right_half_banked_helix_up_large( /** rct2: 0x007C7374 */ static void flying_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -5732,10 +5732,10 @@ static void flying_rc_track_left_half_banked_helix_down_large( /** rct2: 0x007C7384 */ static void flying_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -5750,10 +5750,10 @@ static void flying_rc_track_right_half_banked_helix_down_large( /** rct2: 0x007C73B4 */ static void flying_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5825,10 +5825,10 @@ static void flying_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x007C7394 */ static void flying_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5899,10 +5899,10 @@ static void flying_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x007C73A4 */ static void flying_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement); @@ -5911,10 +5911,10 @@ static void flying_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x007C73C4 */ static void flying_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -5923,10 +5923,10 @@ static void flying_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x007C73D4 */ static void flying_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5986,10 +5986,10 @@ static void flying_rc_track_brakes( /** rct2: 0x007C7674 */ static void flying_rc_track_left_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6155,10 +6155,10 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( /** rct2: 0x007C7684 */ static void flying_rc_track_right_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6324,10 +6324,10 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( /** rct2: 0x007C7694 */ static void flying_rc_track_left_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6493,10 +6493,10 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( /** rct2: 0x007C76A4 */ static void flying_rc_track_right_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6662,10 +6662,10 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( /** rct2: 0x007C78B4 */ static void flying_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6768,10 +6768,10 @@ static void flying_rc_track_25_deg_up_left_banked( /** rct2: 0x007C78C4 */ static void flying_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6874,10 +6874,10 @@ static void flying_rc_track_25_deg_up_right_banked( /** rct2: 0x007C73E4 */ static void flying_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6977,10 +6977,10 @@ static void flying_rc_track_on_ride_photo( /** rct2: 0x007C78D4 */ static void flying_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -6989,10 +6989,10 @@ static void flying_rc_track_25_deg_down_left_banked( /** rct2: 0x007C78E4 */ static void flying_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -7001,10 +7001,10 @@ static void flying_rc_track_25_deg_down_right_banked( /** rct2: 0x007C7404 */ static void flying_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7283,10 +7283,10 @@ static void flying_rc_track_left_eighth_to_diag( /** rct2: 0x007C7414 */ static void flying_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7565,10 +7565,10 @@ static void flying_rc_track_right_eighth_to_diag( /** rct2: 0x007C7424 */ static void flying_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7578,10 +7578,10 @@ static void flying_rc_track_left_eighth_to_orthogonal( /** rct2: 0x007C7434 */ static void flying_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7591,10 +7591,10 @@ static void flying_rc_track_right_eighth_to_orthogonal( /** rct2: 0x007C7444 */ static void flying_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7873,10 +7873,10 @@ static void flying_rc_track_left_eighth_bank_to_diag( /** rct2: 0x007C7454 */ static void flying_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8155,10 +8155,10 @@ static void flying_rc_track_right_eighth_bank_to_diag( /** rct2: 0x007C7464 */ static void flying_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -8168,10 +8168,10 @@ static void flying_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x007C7474 */ static void flying_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -8181,10 +8181,10 @@ static void flying_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x007C73F4 */ static void flying_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8453,10 +8453,10 @@ static void flying_rc_track_diag_flat( /** rct2: 0x007C74A4 */ static void flying_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8725,10 +8725,10 @@ static void flying_rc_track_diag_25_deg_up( /** rct2: 0x007C7504 */ static void flying_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8945,10 +8945,10 @@ static void flying_rc_track_diag_60_deg_up( /** rct2: 0x007C7484 */ static void flying_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9217,10 +9217,10 @@ static void flying_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x007C74E4 */ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9437,10 +9437,10 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x007C74F4 */ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9657,10 +9657,10 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x007C7494 */ static void flying_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9929,10 +9929,10 @@ static void flying_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x007C74D4 */ static void flying_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10149,10 +10149,10 @@ static void flying_rc_track_diag_25_deg_down( /** rct2: 0x007C7534 */ static void flying_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10369,10 +10369,10 @@ static void flying_rc_track_diag_60_deg_down( /** rct2: 0x007C74B4 */ static void flying_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10582,10 +10582,10 @@ static void flying_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x007C7514 */ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10802,10 +10802,10 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x007C7524 */ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11022,10 +11022,10 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x007C74C4 */ static void flying_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11242,10 +11242,10 @@ static void flying_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x007C7564 */ static void flying_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11399,10 +11399,10 @@ static void flying_rc_track_diag_flat_to_left_bank( /** rct2: 0x007C7574 */ static void flying_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11556,10 +11556,10 @@ static void flying_rc_track_diag_flat_to_right_bank( /** rct2: 0x007C7584 */ static void flying_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11713,10 +11713,10 @@ static void flying_rc_track_diag_left_bank_to_flat( /** rct2: 0x007C7594 */ static void flying_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11870,10 +11870,10 @@ static void flying_rc_track_diag_right_bank_to_flat( /** rct2: 0x007C75C4 */ static void flying_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12026,10 +12026,10 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x007C75D4 */ static void flying_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12182,10 +12182,10 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x007C75A4 */ static void flying_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12338,10 +12338,10 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x007C75B4 */ static void flying_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12494,10 +12494,10 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x007C75E4 */ static void flying_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12643,10 +12643,10 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x007C75F4 */ static void flying_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12792,10 +12792,10 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x007C7604 */ static void flying_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12948,10 +12948,10 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x007C7614 */ static void flying_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -13104,10 +13104,10 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x007C7544 */ static void flying_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -13259,10 +13259,10 @@ static void flying_rc_track_diag_left_bank( /** rct2: 0x007C7554 */ static void flying_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -13414,10 +13414,10 @@ static void flying_rc_track_diag_right_bank( /** rct2: 0x007C7624 */ static void flying_rc_track_left_flyer_twist_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13528,10 +13528,10 @@ static void flying_rc_track_left_flyer_twist_up( /** rct2: 0x007C7634 */ static void flying_rc_track_right_flyer_twist_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13642,10 +13642,10 @@ static void flying_rc_track_right_flyer_twist_up( /** rct2: 0x007C7644 */ static void flying_rc_track_left_flyer_twist_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13756,10 +13756,10 @@ static void flying_rc_track_left_flyer_twist_down( /** rct2: 0x007C7654 */ static void flying_rc_track_right_flyer_twist_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13870,10 +13870,10 @@ static void flying_rc_track_right_flyer_twist_down( /** rct2: 0x007C72F4 */ static void flying_rc_track_flyer_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13993,10 +13993,10 @@ static void flying_rc_track_flyer_half_loop_up( /** rct2: 0x007C7304 */ static void flying_rc_track_flyer_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14116,10 +14116,10 @@ static void flying_rc_track_flyer_half_loop_down( /** rct2: 0x007C7664 */ static void flying_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -14176,10 +14176,10 @@ static void flying_rc_track_block_brakes( /** rct2: 0x007C76B4 */ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -14342,10 +14342,10 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x007C76C4 */ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -14514,10 +14514,10 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x007C76D4 */ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -14528,10 +14528,10 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x007C76E4 */ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -14542,10 +14542,10 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x007C76F4 */ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -14867,10 +14867,10 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x007C7704 */ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15192,10 +15192,10 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x007C7714 */ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -15206,10 +15206,10 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x007C7724 */ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -15220,10 +15220,10 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x007C7734 */ static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15328,10 +15328,10 @@ static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x007C7744 */ static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15436,10 +15436,10 @@ static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x007C7754 */ static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15544,10 +15544,10 @@ static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x007C7764 */ static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15652,10 +15652,10 @@ static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x007C7774 */ static void flying_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -15665,10 +15665,10 @@ static void flying_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x007C7784 */ static void flying_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -15678,10 +15678,10 @@ static void flying_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x007C7794 */ static void flying_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -15691,10 +15691,10 @@ static void flying_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x007C77A4 */ static void flying_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -15704,10 +15704,10 @@ static void flying_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x007C77B4 */ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15810,10 +15810,10 @@ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x007C77C4 */ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -15916,10 +15916,10 @@ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x007C77F4 */ static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -16022,10 +16022,10 @@ static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x007C7804 */ static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -16128,10 +16128,10 @@ static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x007C7814 */ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -16141,10 +16141,10 @@ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x007C7824 */ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -16154,10 +16154,10 @@ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x007C77D4 */ static void flying_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -16167,10 +16167,10 @@ static void flying_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x007C77E4 */ static void flying_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -16180,10 +16180,10 @@ static void flying_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x007C7834 */ static void flying_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -16288,10 +16288,10 @@ static void flying_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x007C7844 */ static void flying_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -16396,10 +16396,10 @@ static void flying_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x007C7854 */ static void flying_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -16504,10 +16504,10 @@ static void flying_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x007C7864 */ static void flying_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -16612,10 +16612,10 @@ static void flying_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x007C7874 */ static void flying_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -16624,10 +16624,10 @@ static void flying_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x007C7884 */ static void flying_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -16636,10 +16636,10 @@ static void flying_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x007C7894 */ static void flying_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -16648,16 +16648,16 @@ static void flying_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x007C78A4 */ static void flying_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { flying_rc_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index d99b28587e..40e351552e 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008AD674 */ static void giga_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -102,13 +102,13 @@ static void giga_rc_track_flat( static void giga_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 18084, 18076, SPR_STATION_BASE_A_SW_NE }, { 18085, 18077, SPR_STATION_BASE_A_NW_SE }, { 18084, 18076, SPR_STATION_BASE_A_SW_NE }, @@ -137,10 +137,10 @@ static void giga_rc_track_station( /** rct2: 0x008AD684 */ static void giga_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -237,10 +237,10 @@ static void giga_rc_track_25_deg_up( /** rct2: 0x008AD694 */ static void giga_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -311,10 +311,10 @@ static void giga_rc_track_60_deg_up( /** rct2: 0x008AD6A4 */ static void giga_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -411,10 +411,10 @@ static void giga_rc_track_flat_to_25_deg_up( /** rct2: 0x008AD6B4 */ static void giga_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -493,10 +493,10 @@ static void giga_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008AD6C4 */ static void giga_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -575,10 +575,10 @@ static void giga_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008AD6D4 */ static void giga_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_cable_lift(tileElement)) @@ -675,10 +675,10 @@ static void giga_rc_track_25_deg_up_to_flat( /** rct2: 0x008AD6E4 */ static void giga_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -687,10 +687,10 @@ static void giga_rc_track_25_deg_down( /** rct2: 0x008AD6F4 */ static void giga_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -699,10 +699,10 @@ static void giga_rc_track_60_deg_down( /** rct2: 0x008AD704 */ static void giga_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -711,10 +711,10 @@ static void giga_rc_track_flat_to_25_deg_down( /** rct2: 0x008AD714 */ static void giga_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -723,10 +723,10 @@ static void giga_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008AD724 */ static void giga_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -735,10 +735,10 @@ static void giga_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008AD734 */ static void giga_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -747,10 +747,10 @@ static void giga_rc_track_25_deg_down_to_flat( /** rct2: 0x008AD744 */ static void giga_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -906,10 +906,10 @@ static void giga_rc_track_left_quarter_turn_5( /** rct2: 0x008AD754 */ static void giga_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -919,10 +919,10 @@ static void giga_rc_track_right_quarter_turn_5( /** rct2: 0x008AD764 */ static void giga_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -961,10 +961,10 @@ static void giga_rc_track_flat_to_left_bank( /** rct2: 0x008AD774 */ static void giga_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1003,10 +1003,10 @@ static void giga_rc_track_flat_to_right_bank( /** rct2: 0x008AD784 */ static void giga_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1045,10 +1045,10 @@ static void giga_rc_track_left_bank_to_flat( /** rct2: 0x008AD794 */ static void giga_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1087,10 +1087,10 @@ static void giga_rc_track_right_bank_to_flat( /** rct2: 0x008AD7A4 */ static void giga_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1250,10 +1250,10 @@ static void giga_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008AD7B4 */ static void giga_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1263,10 +1263,10 @@ static void giga_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008AD7C4 */ static void giga_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1312,10 +1312,10 @@ static void giga_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008AD7D4 */ static void giga_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1361,10 +1361,10 @@ static void giga_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008AD7E4 */ static void giga_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1410,10 +1410,10 @@ static void giga_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008AD7F4 */ static void giga_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1459,10 +1459,10 @@ static void giga_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008AD804 */ static void giga_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1471,10 +1471,10 @@ static void giga_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008AD814 */ static void giga_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1483,10 +1483,10 @@ static void giga_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008AD824 */ static void giga_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1495,10 +1495,10 @@ static void giga_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008AD834 */ static void giga_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1507,10 +1507,10 @@ static void giga_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008AD844 */ static void giga_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1545,10 +1545,10 @@ static void giga_rc_track_left_bank( /** rct2: 0x008AD854 */ static void giga_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1557,10 +1557,10 @@ static void giga_rc_track_right_bank( /** rct2: 0x008AD864 */ static void giga_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1711,10 +1711,10 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008AD874 */ static void giga_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1865,10 +1865,10 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008AD884 */ static void giga_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1878,10 +1878,10 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008AD894 */ static void giga_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1891,10 +1891,10 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008AD8A4 */ static void giga_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2020,10 +2020,10 @@ static void giga_rc_track_s_bend_left( /** rct2: 0x008AD8B4 */ static void giga_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2149,10 +2149,10 @@ static void giga_rc_track_s_bend_right( /** rct2: 0x008AD8F4 */ static void giga_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2253,10 +2253,10 @@ static void giga_rc_track_left_quarter_turn_3( /** rct2: 0x008AD904 */ static void giga_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2266,10 +2266,10 @@ static void giga_rc_track_right_quarter_turn_3( /** rct2: 0x008AD914 */ static void giga_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2374,10 +2374,10 @@ static void giga_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008AD924 */ static void giga_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2387,10 +2387,10 @@ static void giga_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008AD934 */ static void giga_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2462,10 +2462,10 @@ static void giga_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AD944 */ static void giga_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2540,10 +2540,10 @@ static void giga_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AD954 */ static void giga_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2553,10 +2553,10 @@ static void giga_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008AD964 */ static void giga_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2566,10 +2566,10 @@ static void giga_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008AD974 */ static void giga_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2772,10 +2772,10 @@ static void giga_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008AD984 */ static void giga_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2978,10 +2978,10 @@ static void giga_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008AD994 */ static void giga_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -2996,10 +2996,10 @@ static void giga_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008AD9A4 */ static void giga_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3014,10 +3014,10 @@ static void giga_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008AD9B4 */ static void giga_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3330,10 +3330,10 @@ static void giga_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008AD9C4 */ static void giga_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3652,10 +3652,10 @@ static void giga_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008AD9D4 */ static void giga_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3670,10 +3670,10 @@ static void giga_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008AD9E4 */ static void giga_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3688,10 +3688,10 @@ static void giga_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008ADA14 */ static void giga_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3729,10 +3729,10 @@ static void giga_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008AD9F4 */ static void giga_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3770,10 +3770,10 @@ static void giga_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008ADA04 */ static void giga_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement); @@ -3782,10 +3782,10 @@ static void giga_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008ADA24 */ static void giga_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -3794,10 +3794,10 @@ static void giga_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008ADA34 */ static void giga_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3830,10 +3830,10 @@ static void giga_rc_track_brakes( /** rct2: 0x008ADC84 */ static void giga_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3875,10 +3875,10 @@ static void giga_rc_track_25_deg_up_left_banked( /** rct2: 0x008ADC94 */ static void giga_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3920,10 +3920,10 @@ static void giga_rc_track_25_deg_up_right_banked( /** rct2: 0x008ADA44 */ static void giga_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3966,10 +3966,10 @@ static void giga_rc_track_on_ride_photo( /** rct2: 0x008ADCA4 */ static void giga_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -3978,10 +3978,10 @@ static void giga_rc_track_25_deg_down_left_banked( /** rct2: 0x008ADCB4 */ static void giga_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -3990,10 +3990,10 @@ static void giga_rc_track_25_deg_down_right_banked( /** rct2: 0x008ADED4 */ static void giga_rc_track_flat_to_60_deg_up_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4253,10 +4253,10 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( /** rct2: 0x008ADEE4 */ static void giga_rc_track_60_deg_up_to_flat_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4392,10 +4392,10 @@ static void giga_rc_track_60_deg_up_to_flat_long_base( /** rct2: 0x008ADEF4 */ static void giga_rc_track_flat_to_60_deg_down_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_flat_to_60_deg_up_long_base(session, rideIndex, 3 - trackSequence, (direction + 2) & 3, height, tileElement); @@ -4404,10 +4404,10 @@ static void giga_rc_track_flat_to_60_deg_down_long_base( /** rct2: 0x008ADF04 */ static void giga_rc_track_60_deg_up_to_flat_long_base122( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_60_deg_up_to_flat_long_base(session, rideIndex, 3 - trackSequence, (direction + 2) & 3, height, tileElement); @@ -4416,10 +4416,10 @@ static void giga_rc_track_60_deg_up_to_flat_long_base122( /** rct2: 0x008ADF14 */ static void giga_rc_track_cable_lift_hill( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4578,10 +4578,10 @@ static void giga_rc_track_cable_lift_hill( /** rct2: 0x008ADA64 */ static void giga_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4707,10 +4707,10 @@ static void giga_rc_track_left_eighth_to_diag( /** rct2: 0x008ADA74 */ static void giga_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4836,10 +4836,10 @@ static void giga_rc_track_right_eighth_to_diag( /** rct2: 0x008ADA84 */ static void giga_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4849,10 +4849,10 @@ static void giga_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008ADA94 */ static void giga_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4862,10 +4862,10 @@ static void giga_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008ADAA4 */ static void giga_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4991,10 +4991,10 @@ static void giga_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008ADAB4 */ static void giga_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5120,10 +5120,10 @@ static void giga_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008ADAC4 */ static void giga_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5133,10 +5133,10 @@ static void giga_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008ADAD4 */ static void giga_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5146,10 +5146,10 @@ static void giga_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008ADA54 */ static void giga_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5288,10 +5288,10 @@ static void giga_rc_track_diag_flat( /** rct2: 0x008ADB04 */ static void giga_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5430,10 +5430,10 @@ static void giga_rc_track_diag_25_deg_up( /** rct2: 0x008ADB64 */ static void giga_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5502,10 +5502,10 @@ static void giga_rc_track_diag_60_deg_up( /** rct2: 0x008ADAE4 */ static void giga_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5644,10 +5644,10 @@ static void giga_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008ADB44 */ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5716,10 +5716,10 @@ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008ADB54 */ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5788,10 +5788,10 @@ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008ADAF4 */ static void giga_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5930,10 +5930,10 @@ static void giga_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008ADB34 */ static void giga_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6072,10 +6072,10 @@ static void giga_rc_track_diag_25_deg_down( /** rct2: 0x008ADB94 */ static void giga_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6144,10 +6144,10 @@ static void giga_rc_track_diag_60_deg_down( /** rct2: 0x008ADB14 */ static void giga_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6284,10 +6284,10 @@ static void giga_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008ADB74 */ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6356,10 +6356,10 @@ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008ADB84 */ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6428,10 +6428,10 @@ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008ADB24 */ static void giga_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6570,10 +6570,10 @@ static void giga_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008ADBC4 */ static void giga_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6644,10 +6644,10 @@ static void giga_rc_track_diag_flat_to_left_bank( /** rct2: 0x008ADBD4 */ static void giga_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6718,10 +6718,10 @@ static void giga_rc_track_diag_flat_to_right_bank( /** rct2: 0x008ADBE4 */ static void giga_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6792,10 +6792,10 @@ static void giga_rc_track_diag_left_bank_to_flat( /** rct2: 0x008ADBF4 */ static void giga_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6866,10 +6866,10 @@ static void giga_rc_track_diag_right_bank_to_flat( /** rct2: 0x008ADC24 */ static void giga_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6940,10 +6940,10 @@ static void giga_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008ADC34 */ static void giga_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7014,10 +7014,10 @@ static void giga_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008ADC04 */ static void giga_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7088,10 +7088,10 @@ static void giga_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008ADC14 */ static void giga_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7162,10 +7162,10 @@ static void giga_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008ADC44 */ static void giga_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7234,10 +7234,10 @@ static void giga_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008ADC54 */ static void giga_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7306,10 +7306,10 @@ static void giga_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008ADC64 */ static void giga_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7380,10 +7380,10 @@ static void giga_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008ADC74 */ static void giga_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7454,10 +7454,10 @@ static void giga_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008ADBA4 */ static void giga_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7526,10 +7526,10 @@ static void giga_rc_track_diag_left_bank( /** rct2: 0x008ADBB4 */ static void giga_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7598,10 +7598,10 @@ static void giga_rc_track_diag_right_bank( /** rct2: 0x008ADEC4 */ static void giga_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -7634,10 +7634,10 @@ static void giga_rc_track_block_brakes( /** rct2: 0x008ADCC4 */ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7712,10 +7712,10 @@ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ADCD4 */ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7793,10 +7793,10 @@ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ADCE4 */ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -7807,10 +7807,10 @@ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008ADCF4 */ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -7821,10 +7821,10 @@ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008ADD04 */ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7978,10 +7978,10 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ADD14 */ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8135,10 +8135,10 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ADD24 */ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -8149,10 +8149,10 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008ADD34 */ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -8163,10 +8163,10 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008ADD44 */ static void giga_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8210,10 +8210,10 @@ static void giga_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008ADD54 */ static void giga_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8257,10 +8257,10 @@ static void giga_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008ADD64 */ static void giga_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8304,10 +8304,10 @@ static void giga_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ADD74 */ static void giga_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8351,10 +8351,10 @@ static void giga_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ADD84 */ static void giga_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8364,10 +8364,10 @@ static void giga_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008ADD94 */ static void giga_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8377,10 +8377,10 @@ static void giga_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008ADDA4 */ static void giga_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8390,10 +8390,10 @@ static void giga_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008ADDB4 */ static void giga_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8403,10 +8403,10 @@ static void giga_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008ADDC4 */ static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8448,10 +8448,10 @@ static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008ADDD4 */ static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8493,10 +8493,10 @@ static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008ADE04 */ static void giga_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8538,10 +8538,10 @@ static void giga_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008ADE14 */ static void giga_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8583,10 +8583,10 @@ static void giga_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008ADE24 */ static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8596,10 +8596,10 @@ static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008ADE34 */ static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8609,10 +8609,10 @@ static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x008ADDE4 */ static void giga_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8622,10 +8622,10 @@ static void giga_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008ADDF4 */ static void giga_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8635,10 +8635,10 @@ static void giga_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x008ADE44 */ static void giga_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8682,10 +8682,10 @@ static void giga_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008ADE54 */ static void giga_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8729,10 +8729,10 @@ static void giga_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008ADE64 */ static void giga_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8776,10 +8776,10 @@ static void giga_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008ADE74 */ static void giga_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8823,10 +8823,10 @@ static void giga_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008ADE84 */ static void giga_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8835,10 +8835,10 @@ static void giga_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008ADE94 */ static void giga_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8847,10 +8847,10 @@ static void giga_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008ADEA4 */ static void giga_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8859,10 +8859,10 @@ static void giga_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008ADEB4 */ static void giga_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { giga_rc_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8870,17 +8870,17 @@ static void giga_rc_track_right_banked_25_deg_down_to_flat( static void giga_rc_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { // These offsets could be moved to the g2.dat file when that supports offsets. - sint8 ne_sw_offsetX = 7; - sint8 ne_sw_offsetY = -15; - sint8 nw_se_offsetX = -15; - sint8 nw_se_offsetY = 7; + int8_t ne_sw_offsetX = 7; + int8_t ne_sw_offsetY = -15; + int8_t nw_se_offsetX = -15; + int8_t nw_se_offsetY = 7; switch (direction) { @@ -8905,7 +8905,7 @@ static void giga_rc_track_booster( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp index 035d2c41a0..a919cdcb4f 100644 --- a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x0087694C */ static void heartline_twister_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -91,13 +91,13 @@ static void heartline_twister_rc_track_flat( static void heartline_twister_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 19732, SPR_STATION_BASE_B_SW_NE }, { 19733, SPR_STATION_BASE_B_NW_SE }, { 19732, SPR_STATION_BASE_B_SW_NE }, @@ -118,10 +118,10 @@ static void heartline_twister_rc_track_station( /** rct2: 0x0087695C */ static void heartline_twister_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -207,10 +207,10 @@ static void heartline_twister_rc_track_25_deg_up( /** rct2: 0x008769FC */ static void heartline_twister_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -296,10 +296,10 @@ static void heartline_twister_rc_track_60_deg_up( /** rct2: 0x0087696C */ static void heartline_twister_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -385,10 +385,10 @@ static void heartline_twister_rc_track_flat_to_25_deg_up( /** rct2: 0x008769BC */ static void heartline_twister_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -474,10 +474,10 @@ static void heartline_twister_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008769CC */ static void heartline_twister_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -563,10 +563,10 @@ static void heartline_twister_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x0087697C */ static void heartline_twister_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -652,10 +652,10 @@ static void heartline_twister_rc_track_25_deg_up_to_flat( /** rct2: 0x0087698C */ static void heartline_twister_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { heartline_twister_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -664,10 +664,10 @@ static void heartline_twister_rc_track_25_deg_down( /** rct2: 0x00876A0C */ static void heartline_twister_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { heartline_twister_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -676,10 +676,10 @@ static void heartline_twister_rc_track_60_deg_down( /** rct2: 0x0087699C */ static void heartline_twister_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { heartline_twister_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -688,10 +688,10 @@ static void heartline_twister_rc_track_flat_to_25_deg_down( /** rct2: 0x008769DC */ static void heartline_twister_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { heartline_twister_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -701,10 +701,10 @@ static void heartline_twister_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008769EC */ static void heartline_twister_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { heartline_twister_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -714,10 +714,10 @@ static void heartline_twister_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008769AC */ static void heartline_twister_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { heartline_twister_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -726,10 +726,10 @@ static void heartline_twister_rc_track_25_deg_down_to_flat( /** rct2: 0x00876A6C */ static void heartline_twister_rc_track_heartline_transfer_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -908,10 +908,10 @@ static void heartline_twister_rc_track_heartline_transfer_up( /** rct2: 0x00876A7C */ static void heartline_twister_rc_track_heartline_transfer_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1090,10 +1090,10 @@ static void heartline_twister_rc_track_heartline_transfer_down( /** rct2: 0x00876A4C */ static void heartline_twister_rc_track_left_heartline_roll( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1316,10 +1316,10 @@ static void heartline_twister_rc_track_left_heartline_roll( /** rct2: 0x00876A5C */ static void heartline_twister_rc_track_right_heartline_roll( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1539,7 +1539,7 @@ static void heartline_twister_rc_track_right_heartline_roll( } } -TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp index 59db15d4b9..a644d49fa4 100644 --- a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x00890CB4 */ static void inverted_hairpin_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -82,13 +82,13 @@ static void inverted_hairpin_rc_track_flat( /** rct2: 0x00890D84, 0x00890D94, 0x00890DA4 */ static void inverted_hairpin_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 17028, SPR_STATION_INVERTED_BAR_0_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 17029, SPR_STATION_INVERTED_BAR_0_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 17028, SPR_STATION_INVERTED_BAR_0_SW_NE }, @@ -111,10 +111,10 @@ static void inverted_hairpin_rc_track_station( /** rct2: 0x00890CC4 */ static void inverted_hairpin_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -201,10 +201,10 @@ static void inverted_hairpin_rc_track_25_deg_up( /** rct2: 0x00890CD4 */ static void inverted_hairpin_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -267,10 +267,10 @@ static void inverted_hairpin_rc_track_60_deg_up( /** rct2: 0x00890CE4 */ static void inverted_hairpin_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -357,10 +357,10 @@ static void inverted_hairpin_rc_track_flat_to_25_deg_up( /** rct2: 0x00890CF4 */ static void inverted_hairpin_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -431,10 +431,10 @@ static void inverted_hairpin_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x00890D04 */ static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -529,10 +529,10 @@ static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x00890D14 */ static void inverted_hairpin_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -619,10 +619,10 @@ static void inverted_hairpin_rc_track_25_deg_up_to_flat( /** rct2: 0x00890D24 */ static void inverted_hairpin_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -631,10 +631,10 @@ static void inverted_hairpin_rc_track_25_deg_down( /** rct2: 0x00890D34 */ static void inverted_hairpin_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -643,10 +643,10 @@ static void inverted_hairpin_rc_track_60_deg_down( /** rct2: 0x00890D44 */ static void inverted_hairpin_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -655,10 +655,10 @@ static void inverted_hairpin_rc_track_flat_to_25_deg_down( /** rct2: 0x00890D54 */ static void inverted_hairpin_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -668,10 +668,10 @@ static void inverted_hairpin_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x00890D64 */ static void inverted_hairpin_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -681,10 +681,10 @@ static void inverted_hairpin_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x00890D74 */ static void inverted_hairpin_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -693,10 +693,10 @@ static void inverted_hairpin_rc_track_25_deg_down_to_flat( /** rct2: 0x00890DB4 */ static void inverted_hairpin_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -805,10 +805,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3( /** rct2: 0x00890DC4 */ static void inverted_hairpin_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -818,10 +818,10 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3( /** rct2: 0x00890DD4 */ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -901,10 +901,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x00890DE4 */ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -984,10 +984,10 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x00890DF4 */ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -998,10 +998,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x00890E04 */ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1012,10 +1012,10 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x00890E64 */ static void inverted_hairpin_rc_track_left_quarter_turn_1( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1062,10 +1062,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_1( /** rct2: 0x00890E74 */ static void inverted_hairpin_rc_track_right_quarter_turn_1( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_left_quarter_turn_1(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -1074,10 +1074,10 @@ static void inverted_hairpin_rc_track_right_quarter_turn_1( /** rct2: 0x00890E24 */ static void inverted_hairpin_rc_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -1148,10 +1148,10 @@ static void inverted_hairpin_rc_track_flat_to_60_deg_up( /** rct2: 0x00890E34 */ static void inverted_hairpin_rc_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -1243,10 +1243,10 @@ static void inverted_hairpin_rc_track_60_deg_up_to_flat( /** rct2: 0x00890E44 */ static void inverted_hairpin_rc_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_60_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1255,10 +1255,10 @@ static void inverted_hairpin_rc_track_flat_to_60_deg_down( /** rct2: 0x00890E54 */ static void inverted_hairpin_rc_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_hairpin_rc_track_flat_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1267,10 +1267,10 @@ static void inverted_hairpin_rc_track_60_deg_down_to_flat( /** rct2: 0x00890E14 */ static void inverted_hairpin_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1302,10 +1302,10 @@ static void inverted_hairpin_rc_track_brakes( /** rct2: 0x00890E84 */ static void inverted_hairpin_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1334,7 +1334,7 @@ static void inverted_hairpin_rc_track_block_brakes( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp index 7b13513f23..d74221320d 100644 --- a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008B0460 */ static void inverted_impulse_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -57,13 +57,13 @@ static void inverted_impulse_rc_track_flat( /** rct2: 0x008B0470, 0x008B0480, 0x008B0490 */ static void inverted_impulse_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 19662, SPR_STATION_INVERTED_BAR_B_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 19663, SPR_STATION_INVERTED_BAR_B_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 19662, SPR_STATION_INVERTED_BAR_B_SW_NE }, @@ -86,10 +86,10 @@ static void inverted_impulse_rc_track_station( /** rct2: 0x008B04A0 */ static void inverted_impulse_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -151,10 +151,10 @@ static void inverted_impulse_rc_track_25_deg_up( /** rct2: 0x008B04B0 */ static void inverted_impulse_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -192,10 +192,10 @@ static void inverted_impulse_rc_track_60_deg_up( /** rct2: 0x008B04C0 */ static void inverted_impulse_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -254,10 +254,10 @@ static void inverted_impulse_rc_track_flat_to_25_deg_up( /** rct2: 0x008B04D0 */ static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -299,10 +299,10 @@ static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008B04E0 */ static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -344,10 +344,10 @@ static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008B04F0 */ static void inverted_impulse_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -406,10 +406,10 @@ static void inverted_impulse_rc_track_25_deg_up_to_flat( /** rct2: 0x008B0500 */ static void inverted_impulse_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -418,10 +418,10 @@ static void inverted_impulse_rc_track_25_deg_down( /** rct2: 0x008B0510 */ static void inverted_impulse_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -430,10 +430,10 @@ static void inverted_impulse_rc_track_60_deg_down( /** rct2: 0x008B0520 */ static void inverted_impulse_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -442,10 +442,10 @@ static void inverted_impulse_rc_track_flat_to_25_deg_down( /** rct2: 0x008B0530 */ static void inverted_impulse_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -455,10 +455,10 @@ static void inverted_impulse_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008B0540 */ static void inverted_impulse_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -468,10 +468,10 @@ static void inverted_impulse_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008B0550 */ static void inverted_impulse_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -480,10 +480,10 @@ static void inverted_impulse_rc_track_25_deg_down_to_flat( /** rct2: 0x008B05A0 */ static void inverted_impulse_rc_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -521,10 +521,10 @@ static void inverted_impulse_rc_track_90_deg_up( /** rct2: 0x008B05B0 */ static void inverted_impulse_rc_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -533,10 +533,10 @@ static void inverted_impulse_rc_track_90_deg_down( /** rct2: 0x008B0560 */ static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -578,10 +578,10 @@ static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up( /** rct2: 0x008B0570 */ static void inverted_impulse_rc_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -591,10 +591,10 @@ static void inverted_impulse_rc_track_90_deg_down_to_60_deg_down( /** rct2: 0x008B0580 */ static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -633,10 +633,10 @@ static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up( /** rct2: 0x008B0590 */ static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -677,10 +677,10 @@ static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down( /** rct2: 0x008B05C0 */ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -724,10 +724,10 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up( /** rct2: 0x008B05D0 */ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -771,10 +771,10 @@ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up( /** rct2: 0x008B05E0 */ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -784,17 +784,17 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_down( /** rct2: 0x008B05F0 */ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index 0c102725da..3137fa1ba9 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008A92E8 */ static void inverted_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -75,13 +75,13 @@ static void inverted_rc_track_flat( /** rct2: 0x008A9558, 0x008A9568, 0x008A9578 */ static void inverted_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, @@ -104,10 +104,10 @@ static void inverted_rc_track_station( /** rct2: 0x008A92F8 */ static void inverted_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -194,10 +194,10 @@ static void inverted_rc_track_25_deg_up( /** rct2: 0x008A9308 */ static void inverted_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -235,10 +235,10 @@ static void inverted_rc_track_60_deg_up( /** rct2: 0x008A9318 */ static void inverted_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -325,10 +325,10 @@ static void inverted_rc_track_flat_to_25_deg_up( /** rct2: 0x008A9328 */ static void inverted_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -370,10 +370,10 @@ static void inverted_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008A9338 */ static void inverted_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -439,10 +439,10 @@ static void inverted_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008A9348 */ static void inverted_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -529,10 +529,10 @@ static void inverted_rc_track_25_deg_up_to_flat( /** rct2: 0x008A9358 */ static void inverted_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -541,10 +541,10 @@ static void inverted_rc_track_25_deg_down( /** rct2: 0x008A9368 */ static void inverted_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -553,10 +553,10 @@ static void inverted_rc_track_60_deg_down( /** rct2: 0x008A9378 */ static void inverted_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -565,10 +565,10 @@ static void inverted_rc_track_flat_to_25_deg_down( /** rct2: 0x008A9388 */ static void inverted_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -577,10 +577,10 @@ static void inverted_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A9398 */ static void inverted_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -589,10 +589,10 @@ static void inverted_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A93A8 */ static void inverted_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -601,10 +601,10 @@ static void inverted_rc_track_25_deg_down_to_flat( /** rct2: 0x008A93B8 */ static void inverted_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -761,10 +761,10 @@ static void inverted_rc_track_left_quarter_turn_5( /** rct2: 0x008A93C8 */ static void inverted_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -774,10 +774,10 @@ static void inverted_rc_track_right_quarter_turn_5( /** rct2: 0x008A93D8 */ static void inverted_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -816,10 +816,10 @@ static void inverted_rc_track_flat_to_left_bank( /** rct2: 0x008A93E8 */ static void inverted_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -858,10 +858,10 @@ static void inverted_rc_track_flat_to_right_bank( /** rct2: 0x008A93F8 */ static void inverted_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -900,10 +900,10 @@ static void inverted_rc_track_left_bank_to_flat( /** rct2: 0x008A9408 */ static void inverted_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -942,10 +942,10 @@ static void inverted_rc_track_right_bank_to_flat( /** rct2: 0x008A9418 */ static void inverted_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1102,10 +1102,10 @@ static void inverted_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008A9428 */ static void inverted_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1115,10 +1115,10 @@ static void inverted_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008A9438 */ static void inverted_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1182,10 +1182,10 @@ static void inverted_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008A9448 */ static void inverted_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1249,10 +1249,10 @@ static void inverted_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008A9458 */ static void inverted_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1316,10 +1316,10 @@ static void inverted_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008A9468 */ static void inverted_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1383,10 +1383,10 @@ static void inverted_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008A9478 */ static void inverted_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1395,10 +1395,10 @@ static void inverted_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008A9488 */ static void inverted_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1407,10 +1407,10 @@ static void inverted_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008A9498 */ static void inverted_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1419,10 +1419,10 @@ static void inverted_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008A94A8 */ static void inverted_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1431,10 +1431,10 @@ static void inverted_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008A94B8 */ static void inverted_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1473,10 +1473,10 @@ static void inverted_rc_track_left_bank( /** rct2: 0x008A94C8 */ static void inverted_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1485,10 +1485,10 @@ static void inverted_rc_track_right_bank( /** rct2: 0x008A94D8 */ static void inverted_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1630,10 +1630,10 @@ static void inverted_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008A94E8 */ static void inverted_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1775,10 +1775,10 @@ static void inverted_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008A94F8 */ static void inverted_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1789,10 +1789,10 @@ static void inverted_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008A9508 */ static void inverted_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1802,10 +1802,10 @@ static void inverted_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008A9518 */ static void inverted_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1957,10 +1957,10 @@ static void inverted_rc_track_s_bend_left( /** rct2: 0x008A9528 */ static void inverted_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2112,10 +2112,10 @@ static void inverted_rc_track_s_bend_right( /** rct2: 0x008A9538 */ static void inverted_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2387,10 +2387,10 @@ static void inverted_rc_track_left_vertical_loop( /** rct2: 0x008A9548 */ static void inverted_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2662,10 +2662,10 @@ static void inverted_rc_track_right_vertical_loop( /** rct2: 0x008A9588 */ static void inverted_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2771,10 +2771,10 @@ static void inverted_rc_track_left_quarter_turn_3( /** rct2: 0x008A9598 */ static void inverted_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2784,10 +2784,10 @@ static void inverted_rc_track_right_quarter_turn_3( /** rct2: 0x008A95A8 */ static void inverted_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2894,10 +2894,10 @@ static void inverted_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008A95B8 */ static void inverted_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2907,10 +2907,10 @@ static void inverted_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008A95C8 */ static void inverted_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2988,10 +2988,10 @@ static void inverted_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008A95D8 */ static void inverted_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3069,10 +3069,10 @@ static void inverted_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008A95E8 */ static void inverted_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3083,10 +3083,10 @@ static void inverted_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008A95F8 */ static void inverted_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3096,10 +3096,10 @@ static void inverted_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008A9608 */ static void inverted_rc_track_left_twist_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3193,10 +3193,10 @@ static void inverted_rc_track_left_twist_down_to_up( /** rct2: 0x008A9618 */ static void inverted_rc_track_right_twist_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3290,10 +3290,10 @@ static void inverted_rc_track_right_twist_down_to_up( /** rct2: 0x008A9628 */ static void inverted_rc_track_left_twist_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3387,10 +3387,10 @@ static void inverted_rc_track_left_twist_up_to_down( /** rct2: 0x008A9638 */ static void inverted_rc_track_right_twist_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3484,10 +3484,10 @@ static void inverted_rc_track_right_twist_up_to_down( /** rct2: 0x008A9648 */ static void inverted_rc_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3624,10 +3624,10 @@ static void inverted_rc_track_half_loop_up( /** rct2: 0x008A9658 */ static void inverted_rc_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_half_loop_up(session, rideIndex, 3 - trackSequence, direction, height, tileElement); @@ -3636,10 +3636,10 @@ static void inverted_rc_track_half_loop_down( /** rct2: 0x008A9668 */ static void inverted_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3744,10 +3744,10 @@ static void inverted_rc_track_left_corkscrew_up( /** rct2: 0x008A9678 */ static void inverted_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3852,10 +3852,10 @@ static void inverted_rc_track_right_corkscrew_up( /** rct2: 0x008A9688 */ static void inverted_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 1) & 3, height, tileElement); @@ -3864,10 +3864,10 @@ static void inverted_rc_track_left_corkscrew_down( /** rct2: 0x008A9698 */ static void inverted_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction - 1) & 3, height, tileElement); @@ -3876,10 +3876,10 @@ static void inverted_rc_track_right_corkscrew_down( /** rct2: 0x008A96D8 */ static void inverted_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3917,10 +3917,10 @@ static void inverted_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008A96B8 */ static void inverted_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3958,10 +3958,10 @@ static void inverted_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008A96C8 */ static void inverted_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -3971,10 +3971,10 @@ static void inverted_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008A96E8 */ static void inverted_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -3983,10 +3983,10 @@ static void inverted_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008A96A8 */ static void inverted_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4017,10 +4017,10 @@ static void inverted_rc_track_brakes( /** rct2: 0x008A96F8 */ static void inverted_rc_track_left_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4182,10 +4182,10 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( /** rct2: 0x008A9708 */ static void inverted_rc_track_right_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4347,10 +4347,10 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( /** rct2: 0x008A9718 */ static void inverted_rc_track_left_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4512,10 +4512,10 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( /** rct2: 0x008A9728 */ static void inverted_rc_track_right_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4677,10 +4677,10 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( /** rct2: 0x008A9A38 */ static void inverted_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4742,10 +4742,10 @@ static void inverted_rc_track_25_deg_up_left_banked( /** rct2: 0x008A9A48 */ static void inverted_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4807,10 +4807,10 @@ static void inverted_rc_track_25_deg_up_right_banked( /** rct2: 0x008A9738 */ static void inverted_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4853,10 +4853,10 @@ static void inverted_rc_track_on_ride_photo( /** rct2: 0x008A9A58 */ static void inverted_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4865,10 +4865,10 @@ static void inverted_rc_track_25_deg_down_left_banked( /** rct2: 0x008A9A68 */ static void inverted_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4877,10 +4877,10 @@ static void inverted_rc_track_25_deg_down_right_banked( /** rct2: 0x008A9748 */ static void inverted_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5025,10 +5025,10 @@ static void inverted_rc_track_left_eighth_to_diag( /** rct2: 0x008A9758 */ static void inverted_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5173,10 +5173,10 @@ static void inverted_rc_track_right_eighth_to_diag( /** rct2: 0x008A9768 */ static void inverted_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5186,10 +5186,10 @@ static void inverted_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008A9778 */ static void inverted_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5199,10 +5199,10 @@ static void inverted_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008A9938 */ static void inverted_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5348,10 +5348,10 @@ static void inverted_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008A9948 */ static void inverted_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5497,10 +5497,10 @@ static void inverted_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008A9958 */ static void inverted_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5510,10 +5510,10 @@ static void inverted_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008A9968 */ static void inverted_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5523,10 +5523,10 @@ static void inverted_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008A9788 */ static void inverted_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5658,10 +5658,10 @@ static void inverted_rc_track_diag_flat( /** rct2: 0x008A97B8 */ static void inverted_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5793,10 +5793,10 @@ static void inverted_rc_track_diag_25_deg_up( /** rct2: 0x008A9818 */ static void inverted_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5876,10 +5876,10 @@ static void inverted_rc_track_diag_60_deg_up( /** rct2: 0x008A9798 */ static void inverted_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6011,10 +6011,10 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008A97F8 */ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6094,10 +6094,10 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008A9808 */ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6177,10 +6177,10 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008A97A8 */ static void inverted_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6312,10 +6312,10 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008A97E8 */ static void inverted_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6447,10 +6447,10 @@ static void inverted_rc_track_diag_25_deg_down( /** rct2: 0x008A9848 */ static void inverted_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6530,10 +6530,10 @@ static void inverted_rc_track_diag_60_deg_down( /** rct2: 0x008A97C8 */ static void inverted_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6662,10 +6662,10 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008A9828 */ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6745,10 +6745,10 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008A9838 */ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6828,10 +6828,10 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008A97D8 */ static void inverted_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6963,10 +6963,10 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008A9878 */ static void inverted_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7047,10 +7047,10 @@ static void inverted_rc_track_diag_flat_to_left_bank( /** rct2: 0x008A9888 */ static void inverted_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7131,10 +7131,10 @@ static void inverted_rc_track_diag_flat_to_right_bank( /** rct2: 0x008A9898 */ static void inverted_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7215,10 +7215,10 @@ static void inverted_rc_track_diag_left_bank_to_flat( /** rct2: 0x008A98A8 */ static void inverted_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7299,10 +7299,10 @@ static void inverted_rc_track_diag_right_bank_to_flat( /** rct2: 0x008A98D8 */ static void inverted_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7382,10 +7382,10 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008A98E8 */ static void inverted_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7465,10 +7465,10 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008A98B8 */ static void inverted_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7548,10 +7548,10 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008A98C8 */ static void inverted_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7631,10 +7631,10 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008A98F8 */ static void inverted_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7711,10 +7711,10 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008A9908 */ static void inverted_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7791,10 +7791,10 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008A9918 */ static void inverted_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7874,10 +7874,10 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008A9928 */ static void inverted_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7957,10 +7957,10 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008A9858 */ static void inverted_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8041,10 +8041,10 @@ static void inverted_rc_track_diag_left_bank( /** rct2: 0x008A9868 */ static void inverted_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8125,10 +8125,10 @@ static void inverted_rc_track_diag_right_bank( /** rct2: 0x008A9978 */ static void inverted_rc_track_left_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8327,10 +8327,10 @@ static void inverted_rc_track_left_large_half_loop_up( /** rct2: 0x008A9988 */ static void inverted_rc_track_right_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8529,10 +8529,10 @@ static void inverted_rc_track_right_large_half_loop_up( /** rct2: 0x008A9998 */ static void inverted_rc_track_right_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_large_half_loop_up(session, rideIndex, 6 - trackSequence, direction, height, tileElement); @@ -8541,10 +8541,10 @@ static void inverted_rc_track_right_large_half_loop_down( /** rct2: 0x008A99A8 */ static void inverted_rc_track_left_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_large_half_loop_up(session, rideIndex, 6 - trackSequence, direction, height, tileElement); @@ -8553,10 +8553,10 @@ static void inverted_rc_track_left_large_half_loop_down( /** rct2: 0x008A96A8 */ static void inverted_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8587,10 +8587,10 @@ static void inverted_rc_track_block_brakes( /** rct2: 0x008A9A78 */ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8668,10 +8668,10 @@ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008A9A88 */ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8749,10 +8749,10 @@ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008A9A98 */ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -8763,10 +8763,10 @@ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008A9AA8 */ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -8777,10 +8777,10 @@ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008A9BB8 */ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8922,10 +8922,10 @@ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008A9BC8 */ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9067,10 +9067,10 @@ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008A9BD8 */ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -9081,10 +9081,10 @@ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008A9BE8 */ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -9095,10 +9095,10 @@ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008A9AB8 */ static void inverted_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9160,10 +9160,10 @@ static void inverted_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008A9AC8 */ static void inverted_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9225,10 +9225,10 @@ static void inverted_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008A9AD8 */ static void inverted_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9290,10 +9290,10 @@ static void inverted_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008A9AE8 */ static void inverted_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9355,10 +9355,10 @@ static void inverted_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008A9AF8 */ static void inverted_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9368,10 +9368,10 @@ static void inverted_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008A9B08 */ static void inverted_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9381,10 +9381,10 @@ static void inverted_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008A9B18 */ static void inverted_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9394,10 +9394,10 @@ static void inverted_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008A9B28 */ static void inverted_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9407,10 +9407,10 @@ static void inverted_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008A9B38 */ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9472,10 +9472,10 @@ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008A9B48 */ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9537,10 +9537,10 @@ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008A9B58 */ static void inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9602,10 +9602,10 @@ static void inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008A9B68 */ static void inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9667,10 +9667,10 @@ static void inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008A9B78 */ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, @@ -9680,10 +9680,10 @@ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008A9B88 */ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9693,10 +9693,10 @@ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x008A9B98 */ static void inverted_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, @@ -9706,10 +9706,10 @@ static void inverted_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008A9BA8 */ static void inverted_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9719,10 +9719,10 @@ static void inverted_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x008A99B8 */ static void inverted_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9784,10 +9784,10 @@ static void inverted_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008A99C8 */ static void inverted_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9849,10 +9849,10 @@ static void inverted_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008A99D8 */ static void inverted_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9914,10 +9914,10 @@ static void inverted_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008A99E8 */ static void inverted_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9979,10 +9979,10 @@ static void inverted_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008A99F8 */ static void inverted_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -9992,10 +9992,10 @@ static void inverted_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008A9A08 */ static void inverted_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -10004,10 +10004,10 @@ static void inverted_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008A9A18 */ static void inverted_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -10017,16 +10017,16 @@ static void inverted_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008A9A28 */ static void inverted_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { inverted_rc_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 12c0010188..cd3e7656fc 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -637,7 +637,7 @@ enum SPR_JUNIOR_RC_BOOSTER_NE_SW = SPR_G2_BEGIN + 86, }; -static constexpr const uint32 junior_rc_track_pieces_flat[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_flat[3][4] = { { SPR_JUNIOR_RC_FLAT_SW_NE, SPR_JUNIOR_RC_FLAT_NW_SE, SPR_JUNIOR_RC_FLAT_SW_NE, SPR_JUNIOR_RC_FLAT_NW_SE }, { SPR_JUNIOR_RC_FLAT_CHAIN_SW_NE, SPR_JUNIOR_RC_FLAT_CHAIN_NW_SE, SPR_JUNIOR_RC_FLAT_CHAIN_SW_NE, SPR_JUNIOR_RC_FLAT_CHAIN_NW_SE }, @@ -649,20 +649,20 @@ static constexpr const uint32 junior_rc_track_pieces_flat[3][4] = { }, }; -static constexpr const uint32 junior_rc_track_pieces_block_brake[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_block_brake[2][4] = { { SPR_JUNIOR_RC_FLAT_BLOCK_SW_NE, SPR_JUNIOR_RC_FLAT_BLOCK_NW_SE, SPR_JUNIOR_RC_FLAT_BLOCK_SW_NE, SPR_JUNIOR_RC_FLAT_BLOCK_NW_SE }, { SPR_JUNIOR_RC_FLAT_BLOCK_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_BLOCK_NW_SE_BRAKED, SPR_JUNIOR_RC_FLAT_BLOCK_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_BLOCK_NW_SE_BRAKED }, }; -static constexpr const uint32 junior_rc_track_pieces_station[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_station[2][4] = { { SPR_JUNIOR_RC_STATION_SW_NE, SPR_JUNIOR_RC_STATION_NW_SE, SPR_JUNIOR_RC_STATION_SW_NE, SPR_JUNIOR_RC_STATION_NW_SE }, { SPR_JUNIOR_RC_FLAT_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_NW_SE_BRAKED, SPR_JUNIOR_RC_FLAT_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_NW_SE_BRAKED }, }; -static constexpr const uint32 junior_rc_track_pieces_25_deg_up[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up[3][4] = { { SPR_JUNIOR_RC_25_DEG_SW_NE, SPR_JUNIOR_RC_25_DEG_NW_SE, SPR_JUNIOR_RC_25_DEG_NE_SW, SPR_JUNIOR_RC_25_DEG_SE_NW }, { SPR_JUNIOR_RC_25_DEG_CHAIN_SW_NE, SPR_JUNIOR_RC_25_DEG_CHAIN_NW_SE, SPR_JUNIOR_RC_25_DEG_CHAIN_NE_SW, SPR_JUNIOR_RC_25_DEG_CHAIN_SE_NW }, @@ -674,7 +674,7 @@ static constexpr const uint32 junior_rc_track_pieces_25_deg_up[3][4] = { }, }; -static constexpr const uint32 junior_rc_track_pieces_flat_to_25_deg_up[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_flat_to_25_deg_up[3][4] = { { SPR_JUNIOR_RC_FLAT_TO_25_DEG_UP_SW_NE, SPR_JUNIOR_RC_FLAT_TO_25_DEG_UP_NW_SE, SPR_JUNIOR_RC_FLAT_TO_25_DEG_UP_NE_SW, SPR_JUNIOR_RC_FLAT_TO_25_DEG_UP_SE_NW }, { SPR_JUNIOR_RC_FLAT_TO_25_DEG_UP_CHAIN_SW_NE, SPR_JUNIOR_RC_FLAT_TO_25_DEG_UP_CHAIN_NW_SE, @@ -687,7 +687,7 @@ static constexpr const uint32 junior_rc_track_pieces_flat_to_25_deg_up[3][4] = { }, }; -static constexpr const uint32 junior_rc_track_pieces_25_deg_up_to_flat[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_flat[3][4] = { { SPR_JUNIOR_RC_25_DEG_UP_TO_FLAT_SW_NE, SPR_JUNIOR_RC_25_DEG_UP_TO_FLAT_NW_SE, SPR_JUNIOR_RC_25_DEG_UP_TO_FLAT_NE_SW, SPR_JUNIOR_RC_25_DEG_UP_TO_FLAT_SE_NW }, { SPR_JUNIOR_RC_25_DEG_UP_TO_FLAT_CHAIN_SW_NE, SPR_JUNIOR_RC_25_DEG_UP_TO_FLAT_CHAIN_NW_SE, @@ -700,21 +700,21 @@ static constexpr const uint32 junior_rc_track_pieces_25_deg_up_to_flat[3][4] = { }, }; -static constexpr const uint32 junior_rc_track_pieces_flat_to_left_bank[4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_flat_to_left_bank[4][2] = { { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SW_NE_FRONT }, { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NW_SE_FRONT }, { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_NE_SW, 0 }, { SPR_JUNIOR_RC_FLAT_TO_LEFT_BANK_SE_NW, 0 } }; -static constexpr const uint32 junior_rc_track_pieces_flat_to_right_bank[4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_flat_to_right_bank[4][2] = { { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SW_NE, 0 }, { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NW_SE, 0 }, { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NE_SW, SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_NE_SW_FRONT }, { SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SE_NW, SPR_JUNIOR_RC_FLAT_TO_RIGHT_BANK_SE_NW_FRONT } }; -static constexpr const uint32 junior_rc_track_pieces_flat_quarter_turn_5_tiles[4][5] = { +static constexpr const uint32_t junior_rc_track_pieces_flat_quarter_turn_5_tiles[4][5] = { { SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, SPR_JUNIOR_RC_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, @@ -745,7 +745,7 @@ static constexpr const uint32 junior_rc_track_pieces_flat_quarter_turn_5_tiles[4 } }; -static constexpr const uint32 junior_rc_track_pieces_banked_quarter_turn_5_tiles[4][5] = { +static constexpr const uint32_t junior_rc_track_pieces_banked_quarter_turn_5_tiles[4][5] = { { SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_0, SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SW_SE_PART_1, @@ -776,38 +776,38 @@ static constexpr const uint32 junior_rc_track_pieces_banked_quarter_turn_5_tiles } }; -static constexpr const uint32 junior_rc_track_pieces_left_banked_to_25_deg_up[4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_left_banked_to_25_deg_up[4][2] = { { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SW_NE, SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SW_NE_FRONT }, { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NW_SE, SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NW_SE_FRONT }, { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_NE_SW, 0 }, { SPR_JUNIOR_RC_LEFT_BANK_TO_25_DEG_UP_SE_NW, 0 } }; -static constexpr const uint32 junior_rc_track_pieces_right_banked_to_25_deg_up[4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_banked_to_25_deg_up[4][2] = { { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SW_NE, 0 }, { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NW_SE, 0 }, { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NE_SW, SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_NE_SW_FRONT }, { SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SE_NW, SPR_JUNIOR_RC_RIGHT_BANK_TO_25_DEG_UP_SE_NW_FRONT } }; -static constexpr const uint32 junior_rc_track_pieces_25_deg_up_to_left_bank[4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_left_bank[4][2] = { { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SW_NE_FRONT }, { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NW_SE_FRONT }, { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_NE_SW, 0 }, { SPR_JUNIOR_RC_25_DEG_UP_TO_LEFT_BANK_SE_NW, 0 } }; -static constexpr const uint32 junior_rc_track_pieces_25_deg_up_to_right_bank[4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_right_bank[4][2] = { { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SW_NE, 0 }, { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NW_SE, 0 }, { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NE_SW, SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_NE_SW_FRONT }, { SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SE_NW, SPR_JUNIOR_RC_25_DEG_UP_TO_RIGHT_BANK_SE_NW_FRONT } }; -static constexpr const uint32 junior_rc_track_pieces_left_bank[4] = { SPR_JUNIOR_RC_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_LEFT_BANK_NW_SE, +static constexpr const uint32_t junior_rc_track_pieces_left_bank[4] = { SPR_JUNIOR_RC_LEFT_BANK_SW_NE, SPR_JUNIOR_RC_LEFT_BANK_NW_SE, SPR_JUNIOR_RC_LEFT_BANK_NE_SW, SPR_JUNIOR_RC_LEFT_BANK_SE_NW }; -static constexpr const uint32 junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[2][4][5] = { +static constexpr const uint32_t junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[2][4][5] = { { { SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_0, SPR_JUNIOR_RC_LEFT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_1, @@ -896,7 +896,7 @@ static constexpr const LocationXY16 junior_rc_left_quarter_turn_5_tiles_25_deg_u { 0, 6 }, } }; -static constexpr const uint32 junior_rc_track_pieces_right_quarter_turn_5_tiles_25_deg_up[2][4][5] = { +static constexpr const uint32_t junior_rc_track_pieces_right_quarter_turn_5_tiles_25_deg_up[2][4][5] = { { { SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_0, SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_5_TILES_25_DEG_UP_SW_SE_PART_1, @@ -955,7 +955,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_quarter_turn_5_tiles_ } } }; -static constexpr const uint32 junior_rc_track_pieces_s_bend_left[2][4] = { { +static constexpr const uint32_t junior_rc_track_pieces_s_bend_left[2][4] = { { SPR_JUNIOR_RC_S_BEND_LEFT_SW_NE_PART_0, SPR_JUNIOR_RC_S_BEND_LEFT_SW_NE_PART_1, SPR_JUNIOR_RC_S_BEND_LEFT_SW_NE_PART_2, @@ -968,7 +968,7 @@ static constexpr const uint32 junior_rc_track_pieces_s_bend_left[2][4] = { { SPR_JUNIOR_RC_S_BEND_LEFT_SE_NW_PART_0, } }; -static constexpr const uint32 junior_rc_track_pieces_s_bend_right[2][4] = { { +static constexpr const uint32_t junior_rc_track_pieces_s_bend_right[2][4] = { { SPR_JUNIOR_RC_S_BEND_RIGHT_SW_NE_PART_0, SPR_JUNIOR_RC_S_BEND_RIGHT_SW_NE_PART_1, SPR_JUNIOR_RC_S_BEND_RIGHT_SW_NE_PART_2, @@ -981,7 +981,7 @@ static constexpr const uint32 junior_rc_track_pieces_s_bend_right[2][4] = { { SPR_JUNIOR_RC_S_BEND_RIGHT_SE_NW_PART_0, } }; -static constexpr const uint32 junior_rc_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t junior_rc_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_JUNIOR_RC_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_JUNIOR_RC_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_JUNIOR_RC_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_JUNIOR_RC_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_JUNIOR_RC_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -992,7 +992,7 @@ static constexpr const uint32 junior_rc_track_pieces_flat_quarter_turn_3_tiles[4 SPR_JUNIOR_RC_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static constexpr const uint32 junior_rc_track_pieces_banked_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t junior_rc_track_pieces_banked_quarter_turn_3_tiles[4][3] = { { SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -1003,7 +1003,7 @@ static constexpr const uint32 junior_rc_track_pieces_banked_quarter_turn_3_tiles SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static constexpr const uint32 junior_rc_track_pieces_right_quarter_turn_3_tiles_25_deg_up[2][4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_quarter_turn_3_tiles_25_deg_up[2][4][2] = { { { SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_UP_SW_SE_PART_0, SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_UP_SW_SE_PART_1 }, { SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_UP_NW_SW_PART_0, @@ -1022,7 +1022,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_quarter_turn_3_tiles_ SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_UP_CHAIN_SE_NE_PART_1 } } }; -static constexpr const uint32 junior_rc_track_pieces_right_quarter_turn_3_tiles_25_deg_down[2][4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_quarter_turn_3_tiles_25_deg_down[2][4][2] = { { { SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_DOWN_SW_SE_PART_0, SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_DOWN_SW_SE_PART_1 }, { SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_DOWN_NW_SW_PART_0, @@ -1041,7 +1041,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_quarter_turn_3_tiles_ SPR_JUNIOR_RC_RIGHT_QUARTER_TURN_3_TILES_25_DEG_DOWN_CHAIN_SE_NE_PART_1 } } }; -static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_up_small_quarter_tiles[4][3][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_half_banked_helix_up_small_quarter_tiles[4][3][2] = { { { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_UP_SMALL_SW_SE_PART_0 }, { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_UP_SMALL_SW_SE_PART_1 }, @@ -1060,7 +1060,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_up_ { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_UP_SMALL_SE_NE_PART_2 } } }; -static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_down_small_quarter_tiles[4][3][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_half_banked_helix_down_small_quarter_tiles[4][3][2] = { { { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_DOWN_SMALL_SW_SE_PART_0 }, { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_DOWN_SMALL_SW_SE_PART_1 }, @@ -1079,7 +1079,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_dow { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_DOWN_SMALL_SE_NE_PART_2 } } }; -static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_up_large_quarter_tiles[4][5][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_half_banked_helix_up_large_quarter_tiles[4][5][2] = { { { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_UP_LARGE_SW_SE_PART_0 }, { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_UP_LARGE_SW_SE_PART_1 }, @@ -1106,7 +1106,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_up_ { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_UP_LARGE_SE_NE_PART_4 } } }; -static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_down_large_quarter_tiles[4][5][2] = { +static constexpr const uint32_t junior_rc_track_pieces_right_half_banked_helix_down_large_quarter_tiles[4][5][2] = { { { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_DOWN_LARGE_SW_SE_PART_0 }, { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_DOWN_LARGE_SW_SE_PART_1 }, @@ -1133,10 +1133,10 @@ static constexpr const uint32 junior_rc_track_pieces_right_half_banked_helix_dow { SPR_JUNIOR_RC_RIGHT_HALF_BANKED_HELIX_DOWN_LARGE_SE_NE_PART_4 } } }; -static constexpr const uint32 junior_rc_track_pieces_brake[4] = { SPR_JUNIOR_RC_FLAT_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_NW_SE_BRAKED, +static constexpr const uint32_t junior_rc_track_pieces_brake[4] = { SPR_JUNIOR_RC_FLAT_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_NW_SE_BRAKED, SPR_JUNIOR_RC_FLAT_SW_NE_BRAKED, SPR_JUNIOR_RC_FLAT_NW_SE_BRAKED }; -static constexpr const uint32 junior_rc_track_pieces_left_eight_to_diag[4][4] = { +static constexpr const uint32_t junior_rc_track_pieces_left_eight_to_diag[4][4] = { { SPR_JUNIOR_RC_EIGHT_TO_DIAG_SW_N_PART_0, SPR_JUNIOR_RC_EIGHT_TO_DIAG_SW_N_PART_1, @@ -1163,7 +1163,7 @@ static constexpr const uint32 junior_rc_track_pieces_left_eight_to_diag[4][4] = }, }; -static constexpr const uint32 junior_rc_track_pieces_right_eight_to_diag[4][4] = { +static constexpr const uint32_t junior_rc_track_pieces_right_eight_to_diag[4][4] = { { SPR_JUNIOR_RC_EIGHT_TO_DIAG_SW_E_PART_0, SPR_JUNIOR_RC_EIGHT_TO_DIAG_SW_E_PART_1, @@ -1190,7 +1190,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_eight_to_diag[4][4] = }, }; -static constexpr const uint32 junior_rc_track_pieces_left_eight_to_diag_bank[4][4] = { +static constexpr const uint32_t junior_rc_track_pieces_left_eight_to_diag_bank[4][4] = { { SPR_JUNIOR_RC_EIGHT_TO_DIAG_BANK_SW_N_PART_0, SPR_JUNIOR_RC_EIGHT_TO_DIAG_BANK_SW_N_PART_1, @@ -1217,7 +1217,7 @@ static constexpr const uint32 junior_rc_track_pieces_left_eight_to_diag_bank[4][ }, }; -static constexpr const uint32 junior_rc_track_pieces_right_eight_to_diag_bank[4][4] = { +static constexpr const uint32_t junior_rc_track_pieces_right_eight_to_diag_bank[4][4] = { { SPR_JUNIOR_RC_EIGHT_TO_DIAG_BANK_SW_E_PART_0, SPR_JUNIOR_RC_EIGHT_TO_DIAG_BANK_SW_E_PART_1, @@ -1244,7 +1244,7 @@ static constexpr const uint32 junior_rc_track_pieces_right_eight_to_diag_bank[4] }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat[3][4] = { { SPR_JUNIOR_RC_DIAG_FLAT_W_E, SPR_JUNIOR_RC_DIAG_FLAT_N_S, SPR_JUNIOR_RC_DIAG_FLAT_E_W, SPR_JUNIOR_RC_DIAG_FLAT_S_N }, { SPR_JUNIOR_RC_DIAG_FLAT_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_FLAT_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_FLAT_CHAIN_E_W, SPR_JUNIOR_RC_DIAG_FLAT_CHAIN_S_N }, @@ -1252,7 +1252,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_flat[3][4] = { SPR_WATER_RC_DIAG_FLAT_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_up[3][4] = { { SPR_JUNIOR_RC_DIAG_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_S_N }, { SPR_JUNIOR_RC_DIAG_25_DEG_UP_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_CHAIN_E_W, @@ -1261,7 +1261,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up[3][4] = { SPR_WATER_RC_DIAG_25_DEG_UP_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_25_deg_up[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat_to_25_deg_up[3][4] = { { SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_S_N }, { SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_CHAIN_N_S, @@ -1270,14 +1270,14 @@ static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_25_deg_up[3][4 SPR_WATER_RC_DIAG_FLAT_TO_25_DEG_UP_CHAIN_E_W, SPR_WATER_RC_DIAG_FLAT_TO_25_DEG_UP_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_60_deg_up[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat_to_60_deg_up[2][4] = { { SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_S_N }, { SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_CHAIN_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up_to_flat[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_up_to_flat[3][4] = { { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_S_N }, { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_CHAIN_N_S, @@ -1286,14 +1286,14 @@ static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up_to_flat[3][4 SPR_WATER_RC_DIAG_25_DEG_UP_TO_FLAT_CHAIN_E_W, SPR_WATER_RC_DIAG_25_DEG_UP_TO_FLAT_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_up_to_flat[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_up_to_flat[2][4] = { { SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_W_E, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_N_S, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_S_N }, { SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_CHAIN_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_down[3][4] = { { SPR_JUNIOR_RC_DIAG_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_S_N, @@ -1314,7 +1314,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down[3][4] = { }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_25_deg_down[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat_to_25_deg_down[3][4] = { { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_FLAT_S_N, @@ -1335,7 +1335,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_25_deg_down[3] }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_60_deg_down[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat_to_60_deg_down[2][4] = { { SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_FLAT_S_N, @@ -1350,7 +1350,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_60_deg_down[2] }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down_to_flat[3][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_down_to_flat[3][4] = { { SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_25_DEG_UP_S_N, @@ -1371,7 +1371,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down_to_flat[3] }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_down_to_flat[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_down_to_flat[2][4] = { { SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_60_DEG_UP_S_N, @@ -1386,105 +1386,105 @@ static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_down_to_flat[2] }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_left_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat_to_left_bank[4] = { SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_N_S, SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_flat_to_right_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_flat_to_right_bank[4] = { SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_N_S, SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_right_bank_to_flat[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_right_bank_to_flat[4] = { SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_S_N, SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_diag_left_bank_to_flat[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_left_bank_to_flat[4] = { SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W, SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_S_N, SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_W_E, SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_diag_left_bank_to_25_deg_up[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_left_bank_to_25_deg_up[4] = { SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_right_bank_to_25_deg_up[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_right_bank_to_25_deg_up[4] = { SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up_to_left_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_up_to_left_bank[4] = { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up_to_right_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_up_to_right_bank[4] = { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_right_bank_to_25_deg_down[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_right_bank_to_25_deg_down[4] = { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_S_N, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_diag_left_bank_to_25_deg_down[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_left_bank_to_25_deg_down[4] = { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_S_N, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down_to_right_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_down_to_right_bank[4] = { SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_S_N, SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down_to_left_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_down_to_left_bank[4] = { SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_S_N, SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_diag_left_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_left_bank[4] = { SPR_JUNIOR_RC_DIAG_LEFT_BANK_W_E, SPR_JUNIOR_RC_DIAG_LEFT_BANK_N_S, SPR_JUNIOR_RC_DIAG_LEFT_BANK_E_W, SPR_JUNIOR_RC_DIAG_LEFT_BANK_S_N, }; -static constexpr const uint32 junior_rc_track_pieces_diag_right_bank[4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_right_bank[4] = { SPR_JUNIOR_RC_DIAG_LEFT_BANK_E_W, SPR_JUNIOR_RC_DIAG_LEFT_BANK_S_N, SPR_JUNIOR_RC_DIAG_LEFT_BANK_W_E, SPR_JUNIOR_RC_DIAG_LEFT_BANK_N_S, }; -static constexpr const uint32 junior_rc_track_pieces_flat_to_60_deg_up[2][4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_flat_to_60_deg_up[2][4][2] = { { { SPR_JUNIOR_RC_FLAT_TO_60_DEG_UP_SW_NE, 0 }, { SPR_JUNIOR_RC_FLAT_TO_60_DEG_UP_NW_SE, SPR_JUNIOR_RC_FLAT_TO_60_DEG_UP_NW_SE_PART_0_2 }, @@ -1499,7 +1499,7 @@ static constexpr const uint32 junior_rc_track_pieces_flat_to_60_deg_up[2][4][2] }, }; -static constexpr const uint32 junior_rc_track_pieces_60_deg_up_to_flat[2][4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_60_deg_up_to_flat[2][4][2] = { { { SPR_JUNIOR_RC_60_DEG_UP_TO_FLAT_SW_NE, 0 }, { SPR_JUNIOR_RC_60_DEG_UP_TO_FLAT_NW_SE, SPR_JUNIOR_RC_60_DEG_UP_TO_FLAT_NW_SE_PART_0_2 }, @@ -1514,13 +1514,13 @@ static constexpr const uint32 junior_rc_track_pieces_60_deg_up_to_flat[2][4][2] }, }; -static constexpr const uint32 junior_rc_track_pieces_60_deg_up[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_60_deg_up[2][4] = { { SPR_JUNIOR_RC_60_DEG_SW_NE, SPR_JUNIOR_RC_60_DEG_NW_SE, SPR_JUNIOR_RC_60_DEG_NE_SW, SPR_JUNIOR_RC_60_DEG_SE_NW }, { SPR_JUNIOR_RC_60_DEG_CHAIN_SW_NE, SPR_JUNIOR_RC_60_DEG_CHAIN_NW_SE, SPR_JUNIOR_RC_60_DEG_CHAIN_NE_SW, SPR_JUNIOR_RC_60_DEG_CHAIN_SE_NW }, }; -static constexpr const uint32 junior_rc_track_pieces_25_deg_up_to_60_deg_up[2][4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_25_deg_up_to_60_deg_up[2][4][2] = { { { SPR_JUNIOR_RC_25_DEG_TO_60_DEG_UP_SW_NE, 0 }, { SPR_JUNIOR_RC_25_DEG_TO_60_DEG_UP_NW_SE, SPR_JUNIOR_RC_25_DEG_TO_60_DEG_UP_NW_SE_PART_0_2 }, @@ -1535,7 +1535,7 @@ static constexpr const uint32 junior_rc_track_pieces_25_deg_up_to_60_deg_up[2][4 }, }; -static constexpr const uint32 junior_rc_track_pieces_60_deg_up_to_25_deg_up[2][4][2] = { +static constexpr const uint32_t junior_rc_track_pieces_60_deg_up_to_25_deg_up[2][4][2] = { { { SPR_JUNIOR_RC_60_DEG_TO_25_DEG_UP_SW_NE, 0 }, { SPR_JUNIOR_RC_60_DEG_TO_25_DEG_UP_NW_SE, SPR_JUNIOR_RC_60_DEG_TO_25_DEG_UP_NW_SE_PART_0_2 }, @@ -1550,14 +1550,14 @@ static constexpr const uint32 junior_rc_track_pieces_60_deg_up_to_25_deg_up[2][4 } }; -static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_up[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_up[2][4] = { { SPR_JUNIOR_RC_DIAG_60_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_60_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_60_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_S_N }, { SPR_JUNIOR_RC_DIAG_60_DEG_UP_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_60_DEG_UP_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_60_DEG_UP_CHAIN_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_down[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_down[2][4] = { { SPR_JUNIOR_RC_DIAG_60_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_S_N, @@ -1572,21 +1572,21 @@ static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_down[2][4] = { }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_up_to_60_deg_up[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_up_to_60_deg_up[2][4] = { { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_S_N }, { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_CHAIN_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[2][4] = { { SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_W_E, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_N_S, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_S_N }, { SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_CHAIN_W_E, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_CHAIN_N_S, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_CHAIN_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_CHAIN_S_N }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[2][4] = { { SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_60_DEG_UP_TO_25_DEG_UP_S_N, @@ -1601,7 +1601,7 @@ static constexpr const uint32 junior_rc_track_pieces_diag_25_deg_down_to_60_deg_ }, }; -static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_down_to_25_deg_down[2][4] = { +static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_down_to_25_deg_down[2][4] = { { SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_E_W, SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_60_DEG_UP_S_N, @@ -1619,14 +1619,14 @@ static constexpr const uint32 junior_rc_track_pieces_diag_60_deg_down_to_25_deg_ void junior_rc_paint_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 imageId = junior_rc_track_pieces_flat[chainType][direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = junior_rc_track_pieces_flat[chainType][direction] | session->TrackColours[SCHEME_TRACK]; sub_98196C_rotated(session, direction, imageId, 0, 6, 32, 20, 1, height); paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0); @@ -1643,14 +1643,14 @@ void junior_rc_paint_track_flat( void junior_rc_paint_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, - uint8 rideType) + uint8_t rideType) { - uint32 imageId; + uint32_t imageId; bool isBraked = (bool)(tileElement->flags & TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED); @@ -1706,23 +1706,23 @@ void junior_rc_paint_station( void junior_rc_paint_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 imageId = junior_rc_track_pieces_25_deg_up[chainType][direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = junior_rc_track_pieces_25_deg_up[chainType][direction] | session->TrackColours[SCHEME_TRACK]; sub_98196C_rotated(session, direction, imageId, 0, 6, 32, 20, 1, height); - sint8 tunnel_height[4] = { -8, 8, 8, -8 }; - uint8 tunnel_type[4] = { TUNNEL_1, TUNNEL_2, TUNNEL_2, TUNNEL_1 }; + int8_t tunnel_height[4] = { -8, 8, 8, -8 }; + uint8_t tunnel_type[4] = { TUNNEL_1, TUNNEL_2, TUNNEL_2, TUNNEL_1 }; paint_util_push_tunnel_rotated(session, direction, height + tunnel_height[direction], tunnel_type[direction]); if (track_paint_util_should_paint_supports(session->MapPosition)) { - sint32 supportType = (direction & 1) ? 2 : 1; + int32_t supportType = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, supportType, 4, 8, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -1733,14 +1733,14 @@ void junior_rc_paint_track_25_deg_up( void junior_rc_paint_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 imageId = junior_rc_track_pieces_flat_to_25_deg_up[chainType][direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = junior_rc_track_pieces_flat_to_25_deg_up[chainType][direction] | session->TrackColours[SCHEME_TRACK]; sub_98196C_rotated(session, direction, imageId, 0, 6, 32, 20, 1, height); if (direction == 0 || direction == 3) @@ -1754,8 +1754,8 @@ void junior_rc_paint_track_flat_to_25_deg_up( if (track_paint_util_should_paint_supports(session->MapPosition)) { - sint32 supportType = (direction & 1) ? 2 : 1; - uint16 ax = (direction == 0) ? 5 : 3; + int32_t supportType = (direction & 1) ? 2 : 1; + uint16_t ax = (direction == 0) ? 5 : 3; metal_a_supports_paint_setup(session, supportType, 4, ax, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -1766,18 +1766,18 @@ void junior_rc_paint_track_flat_to_25_deg_up( void junior_rc_paint_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 imageId = junior_rc_track_pieces_25_deg_up_to_flat[chainType][direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = junior_rc_track_pieces_25_deg_up_to_flat[chainType][direction] | session->TrackColours[SCHEME_TRACK]; sub_98196C_rotated(session, direction, imageId, 0, 6, 32, 20, 1, height); - uint8 tunnelType; - sint16 tunnelHeight; + uint8_t tunnelType; + int16_t tunnelHeight; if (direction == 1 || direction == 2) { tunnelType = TUNNEL_12; @@ -1800,7 +1800,7 @@ void junior_rc_paint_track_25_deg_up_to_flat( if (track_paint_util_should_paint_supports(session->MapPosition)) { - sint32 supportType = (direction & 1) ? 2 : 1; + int32_t supportType = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, supportType, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -1809,7 +1809,7 @@ void junior_rc_paint_track_25_deg_up_to_flat( paint_util_set_general_support_height(session, height + 40, 0x20); } -static constexpr const sint8 junior_rc_track_right_quarter_turn_5_tiles_support_height_offset[][7] = { +static constexpr const int8_t junior_rc_track_right_quarter_turn_5_tiles_support_height_offset[][7] = { { 0, 0, 0, 0, 0, 0, -1 }, { -1, 0, 0, 0, 0, 0, 0 }, { 0 }, @@ -1818,10 +1818,10 @@ static constexpr const sint8 junior_rc_track_right_quarter_turn_5_tiles_support_ static void junior_rc_right_quarter_turn_5_tiles_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_5_tiles_paint( @@ -1829,7 +1829,7 @@ static void junior_rc_right_quarter_turn_5_tiles_paint_setup( junior_rc_track_pieces_flat_quarter_turn_5_tiles, defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, defaultRightQuarterTurn5TilesBoundOffsets); - sint32 supportHeight = height + junior_rc_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; + int32_t supportHeight = height + junior_rc_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; switch (trackSequence) { case 0: @@ -1893,15 +1893,15 @@ static void junior_rc_right_quarter_turn_5_tiles_paint_setup( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint8 junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[] = { 6, 4, 5, 3, 1, 2, 0 }; +static constexpr const uint8_t junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[] = { 6, 4, 5, 3, 1, 2, 0 }; /* rct2: 0x0051917A */ static void junior_rc_left_quarter_turn_5_tiles_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; @@ -1914,13 +1914,13 @@ static void junior_rc_left_quarter_turn_5_tiles_paint_setup( */ static void junior_rc_flat_to_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; image_id = junior_rc_track_pieces_flat_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction & 1) @@ -1953,7 +1953,7 @@ static void junior_rc_flat_to_left_bank_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -1967,13 +1967,13 @@ static void junior_rc_flat_to_left_bank_paint_setup( */ static void junior_rc_flat_to_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; image_id = junior_rc_track_pieces_flat_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction & 1) @@ -2006,7 +2006,7 @@ static void junior_rc_flat_to_right_bank_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -2017,10 +2017,10 @@ static void junior_rc_flat_to_right_bank_paint_setup( static void junior_rc_left_bank_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_flat_to_right_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2028,10 +2028,10 @@ static void junior_rc_left_bank_to_flat_paint_setup( static void junior_rc_right_bank_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_flat_to_left_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2102,13 +2102,13 @@ static constexpr const LocationXYZ16 junior_rc_banked_right_quarter_turn_5_tiles /* rct2: 0x008AB010, 0x0052304C */ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 thickness = 1; + uint8_t thickness = 1; if (direction == 2 && (trackSequence == 0 || trackSequence == 6)) { thickness = 26; @@ -2120,16 +2120,16 @@ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( if (direction == 1 && trackSequence == 6) { - uint32 imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); } else if (direction == 3 && trackSequence == 0) { - uint32 imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); } - sint32 supportHeight = height; + int32_t supportHeight = height; switch (trackSequence) { case 0: @@ -2196,10 +2196,10 @@ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( /* rct2: 0x008AB000 */ static void junior_rc_banked_left_quarter_turn_5_tiles_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; @@ -2212,13 +2212,13 @@ static void junior_rc_banked_left_quarter_turn_5_tiles_paint_setup( */ static void junior_rc_left_bank_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; image_id = junior_rc_track_pieces_left_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction & 1) @@ -2247,7 +2247,7 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 3, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -2277,13 +2277,13 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup( */ static void junior_rc_right_bank_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; image_id = junior_rc_track_pieces_right_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction & 1) @@ -2312,7 +2312,7 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 3, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -2342,16 +2342,16 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup( */ static void junior_rc_25_deg_up_to_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; - uint8 tunnelType; - sint16 tunnelHeight; + uint8_t tunnelType; + int16_t tunnelHeight; if (direction == 1 || direction == 2) { tunnelType = TUNNEL_12; @@ -2394,7 +2394,7 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -2408,16 +2408,16 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup( */ static void junior_rc_25_deg_up_to_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; - uint8 tunnelType; - sint16 tunnelHeight; + uint8_t tunnelType; + int16_t tunnelHeight; if (direction == 1 || direction == 2) { tunnelType = TUNNEL_12; @@ -2460,7 +2460,7 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -2474,10 +2474,10 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup( */ static void junior_rc_left_bank_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_25_deg_up_to_right_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2488,10 +2488,10 @@ static void junior_rc_left_bank_to_25_deg_down_paint_setup( */ static void junior_rc_right_bank_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_25_deg_up_to_left_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2502,10 +2502,10 @@ static void junior_rc_right_bank_to_25_deg_down_paint_setup( */ static void junior_rc_25_deg_down_to_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_right_bank_to_25_deg_up_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2516,10 +2516,10 @@ static void junior_rc_25_deg_down_to_left_bank_paint_setup( */ static void junior_rc_25_deg_down_to_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_left_bank_to_25_deg_up_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2544,18 +2544,18 @@ static constexpr const LocationXY16 junior_rc_left_bank_bound_offsets[4] = { */ static void junior_rc_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; image_id = junior_rc_track_pieces_left_bank[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C( session, image_id, 0, 0, junior_rc_left_bank_bound_lengths[direction].x, junior_rc_left_bank_bound_lengths[direction].y, - (sint8)junior_rc_left_bank_bound_lengths[direction].z, height, junior_rc_left_bank_bound_offsets[direction].x, + (int8_t)junior_rc_left_bank_bound_lengths[direction].z, height, junior_rc_left_bank_bound_offsets[direction].x, junior_rc_left_bank_bound_offsets[direction].y, height); if (direction & 1) @@ -2570,7 +2570,7 @@ static void junior_rc_left_bank_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -2584,10 +2584,10 @@ static void junior_rc_left_bank_paint_setup( */ static void junior_rc_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_left_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -2595,10 +2595,10 @@ static void junior_rc_right_bank_paint_setup( void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -2607,7 +2607,7 @@ void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[chainType], junior_rc_left_quarter_turn_5_tiles_25_deg_up_offsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); - uint8 supportSpecial[4] = { 8, 8, 8, 3 }; + uint8_t supportSpecial[4] = { 8, 8, 8, 3 }; switch (trackSequence) { case 0: @@ -2677,10 +2677,10 @@ void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -2689,7 +2689,7 @@ void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( junior_rc_track_pieces_right_quarter_turn_5_tiles_25_deg_up[chainType], defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); - uint8 supportSpecial[4] = { 11, 8, 8, 7 }; + uint8_t supportSpecial[4] = { 11, 8, 8, 7 }; switch (trackSequence) { case 0: @@ -2759,10 +2759,10 @@ void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( /* rct2: 0x008AAE10, 0x00519D88, 0x00519DAC, 0x00519DD0, 0x00519DF4 */ static void junior_rc_left_quarter_turn_5_tiles_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -2774,10 +2774,10 @@ static void junior_rc_left_quarter_turn_5_tiles_25_deg_up_paint_setup( /* rct2: 0x008AAE20, 0x00519E18, 0x0051A148, 0x0051A452, 0x0051A738 */ static void junior_rc_right_quarter_turn_5_tiles_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -2789,10 +2789,10 @@ static void junior_rc_right_quarter_turn_5_tiles_25_deg_up_paint_setup( /* rct2: 0x008AAE30, 0x0051AA42, 0x0051AA68, 0x0051AA8C, 0x0051AAB0 */ static void junior_rc_left_quarter_turn_5_tiles_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_right_quarter_turn_5_tiles_25_deg_up_paint_setup( @@ -2803,10 +2803,10 @@ static void junior_rc_left_quarter_turn_5_tiles_25_deg_down_paint_setup( /* rct2: 0x008AAE40, 0x0051AAD4, 0x0051AE04, 0x0051B10E, 0x0051B3F4 */ static void junior_rc_right_quarter_turn_5_tiles_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_left_quarter_turn_5_tiles_25_deg_up_paint_setup( @@ -2817,10 +2817,10 @@ static void junior_rc_right_quarter_turn_5_tiles_25_deg_down_paint_setup( /* rct2: 0x008AAE50, 0x0051B6FE, 0x0051B946, 0x0051BB8E, 0x0051BBA8 */ static void junior_rc_s_bend_left_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -2842,16 +2842,16 @@ static void junior_rc_s_bend_left_paint_setup( { 32, 20 }, }; - uint32 imageId = junior_rc_track_pieces_s_bend_left[(direction & 1)][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = junior_rc_track_pieces_s_bend_left[(direction & 1)][trackSequence] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 1, height); + sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 1, height); } else { - sub_98196C(session, imageId, (sint8)offset.y, (sint8)offset.x, bounds.y, bounds.x, 1, height); + sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 1, height); } if (direction == 0 || direction == 2) @@ -2898,7 +2898,7 @@ static void junior_rc_s_bend_left_paint_setup( } } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -2922,10 +2922,10 @@ static void junior_rc_s_bend_left_paint_setup( /* rct2: 0x008AAE60, 0x0051BBC0, 0x0051BE06, 0x0051C04E, 0x0051C068 */ static void junior_rc_s_bend_right_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -2947,16 +2947,16 @@ static void junior_rc_s_bend_right_paint_setup( { 32, 20 }, }; - uint32 imageId = junior_rc_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = junior_rc_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 1, height); + sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 1, height); } else { - sub_98196C(session, imageId, (sint8)offset.y, (sint8)offset.x, bounds.y, bounds.x, 1, height); + sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 1, height); } if (direction == 0 || direction == 2) @@ -3003,7 +3003,7 @@ static void junior_rc_s_bend_right_paint_setup( } } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3027,10 +3027,10 @@ static void junior_rc_s_bend_right_paint_setup( /** rct2: 0x008AAEB0, 0x0051C0E0, 0x0051C2C1, 0x0051C47F, 0x0051C61D */ static void junior_rc_right_quarter_turn_3_tiles_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_3_tiles_paint( @@ -3039,7 +3039,7 @@ static void junior_rc_right_quarter_turn_3_tiles_paint_setup( defaultRightQuarterTurn3TilesBoundLengths, nullptr); track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); - uint8 supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; + uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; switch (trackSequence) { case 0: @@ -3049,7 +3049,7 @@ static void junior_rc_right_quarter_turn_3_tiles_paint_setup( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3070,10 +3070,10 @@ static void junior_rc_right_quarter_turn_3_tiles_paint_setup( /** rct2: 0x008AAEA0 */ static void junior_rc_left_quarter_turn_3_tiles_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3130,13 +3130,13 @@ static constexpr const LocationXYZ16 junior_rc_right_quarter_turn_3_tiles_bank_o /** rct2: 0x008AA0D0, 0x00523EA0, 0x005240CC, 0x0052430F, 0x00524500*/ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 thickness[4][4] = { { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 26, 1, 1, 26 }, { 1, 1, 1, 1 } }; + uint8_t thickness[4][4] = { { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 26, 1, 1, 26 }, { 1, 1, 1, 1 } }; track_paint_util_right_quarter_turn_3_tiles_paint( session, thickness[direction][trackSequence], height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], @@ -3146,16 +3146,16 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( if (direction == 1 && trackSequence == 3) { - uint32 imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_2_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_2_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); } else if (direction == 3 && trackSequence == 0) { - uint32 imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); } - uint8 supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; + uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; switch (trackSequence) { case 0: @@ -3165,7 +3165,7 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3185,14 +3185,14 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 imageId = 0; + uint32_t imageId = 0; LocationXY16 offset = {}; LocationXY16 boundsLength = {}; LocationXY16 boundsOffset = {}; @@ -3216,7 +3216,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( } if (imageId != 0) sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, 1, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 1, height, boundsOffset.x, boundsOffset.y, height); if (direction == 0 && trackSequence == 0) @@ -3239,7 +3239,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( paint_util_push_tunnel_right(session, height - 8, TUNNEL_1); } - uint8 supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; + uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; switch (trackSequence) { case 0: @@ -3249,7 +3249,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3269,14 +3269,14 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 imageId = 0; + uint32_t imageId = 0; LocationXY16 offset = {}; LocationXY16 boundsLength = {}; LocationXY16 boundsOffset = {}; @@ -3300,7 +3300,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( } if (imageId != 0) sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, 1, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 1, height, boundsOffset.x, boundsOffset.y, height); if (direction == 0 && trackSequence == 0) @@ -3323,7 +3323,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( paint_util_push_tunnel_right(session, height + 8, TUNNEL_2); } - uint8 supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; + uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; switch (trackSequence) { case 0: @@ -3333,7 +3333,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3354,10 +3354,10 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( /** rct2: 0x008AA0C0 */ static void junior_rc_left_quarter_turn_3_tiles_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3368,10 +3368,10 @@ static void junior_rc_left_quarter_turn_3_tiles_bank_paint_setup( /** rct2: 0x008AAED0, 0x0051C83C, 0x0051C9EC, 0x0051CB76, 0x0051CCDC*/ static void junior_rc_right_quarter_turn_3_tiles_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -3383,10 +3383,10 @@ static void junior_rc_right_quarter_turn_3_tiles_25_deg_up_paint_setup( /** rct2: 0x008AAEF0, 0x0051CEC8, 0x0051D078, 0x0051D202, 0x0051D368*/ static void junior_rc_right_quarter_turn_3_tiles_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -3395,15 +3395,15 @@ static void junior_rc_right_quarter_turn_3_tiles_25_deg_down_paint_setup( isChained ? JUNIOR_RC_CHAIN_FRICTION_WHEELS : JUNIOR_RC_CHAIN_NONE); } -static constexpr const uint8 junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[] = { 3, 1, 2, 0 }; +static constexpr const uint8_t junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[] = { 3, 1, 2, 0 }; /** rct2: 0x008AAEC0 */ static void junior_rc_left_quarter_turn_3_tiles_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; @@ -3414,10 +3414,10 @@ static void junior_rc_left_quarter_turn_3_tiles_25_deg_up_paint_setup( /** rct2: 0x008AAEE0 */ static void junior_rc_left_quarter_turn_3_tiles_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; @@ -3428,13 +3428,13 @@ static void junior_rc_left_quarter_turn_3_tiles_25_deg_down_paint_setup( /** rct2: 0x008AB0F0, 0x0052B3A4, 0x0052B5F8, 0x0052B863, 0x0052BA78 */ static void junior_rc_right_half_banked_helix_up_small_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 thickness[2] = { 1, 26 }; + const int8_t thickness[2] = { 1, 26 }; if (trackSequence > 3) { @@ -3478,7 +3478,7 @@ static void junior_rc_right_half_banked_helix_up_small_paint_setup( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3498,13 +3498,13 @@ static void junior_rc_right_half_banked_helix_up_small_paint_setup( /** rct2: 0x008AB110, 0x0052BD80, 0x0052BFD4, 0x0052C23B, 0x0052C450 */ static void junior_rc_right_half_banked_helix_down_small_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 thickness[2] = { 1, 26 }; + const int8_t thickness[2] = { 1, 26 }; if (trackSequence > 3) { @@ -3548,7 +3548,7 @@ static void junior_rc_right_half_banked_helix_down_small_paint_setup( paint_util_push_tunnel_right(session, height + 8, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3568,10 +3568,10 @@ static void junior_rc_right_half_banked_helix_down_small_paint_setup( /** rct2: 0x008AB0E0 */ static void junior_rc_left_half_banked_helix_up_small_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence > 3) @@ -3588,10 +3588,10 @@ static void junior_rc_left_half_banked_helix_up_small_paint_setup( /** rct2: 0x008AB100 */ static void junior_rc_left_half_banked_helix_down_small_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence > 3) @@ -3608,13 +3608,13 @@ static void junior_rc_left_half_banked_helix_down_small_paint_setup( /** rct2: 0x008AB130, 0x0052C7BC, 0x0052CB6B, 0x0052CF32, 0x0052D2B3 */ static void junior_rc_right_half_banked_helix_up_large_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 thickness[2] = { 1, 26 }; + const int8_t thickness[2] = { 1, 26 }; if (trackSequence > 6) { @@ -3694,13 +3694,13 @@ static void junior_rc_right_half_banked_helix_up_large_paint_setup( /** rct2: 0x008AB150, 0x0052D778, 0x0052DB27, 0x0052DEEA, 0x0052E26B */ static void junior_rc_right_half_banked_helix_down_large_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 thickness[2] = { 1, 26 }; + const int8_t thickness[2] = { 1, 26 }; if (trackSequence > 6) { @@ -3780,10 +3780,10 @@ static void junior_rc_right_half_banked_helix_down_large_paint_setup( /** rct2: 0x008AB120 */ static void junior_rc_left_half_banked_helix_up_large_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence > 6) @@ -3800,10 +3800,10 @@ static void junior_rc_left_half_banked_helix_up_large_paint_setup( /** rct2: 0x008AB140 */ static void junior_rc_left_half_banked_helix_down_large_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence > 6) @@ -3822,13 +3822,13 @@ static void junior_rc_left_half_banked_helix_down_large_paint_setup( */ static void junior_rc_brake_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; image_id = junior_rc_track_pieces_brake[direction] | session->TrackColours[SCHEME_TRACK]; if (direction & 1) @@ -3847,7 +3847,7 @@ static void junior_rc_brake_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -3861,13 +3861,13 @@ static void junior_rc_brake_paint_setup( */ static void junior_rc_block_brake_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id; + uint32_t image_id; bool isBraked = (bool)(tileElement->flags & TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED); @@ -3888,7 +3888,7 @@ static void junior_rc_block_brake_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - sint32 edi = (direction & 1) ? 2 : 1; + int32_t edi = (direction & 1) ? 2 : 1; metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -3900,10 +3900,10 @@ static void junior_rc_block_brake_paint_setup( /** rct2: 0x008AAF80 */ static void junior_rc_left_eighth_to_diag_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_eighth_to_diag_tiles_paint( @@ -3940,7 +3940,7 @@ static void junior_rc_left_eighth_to_diag_paint_setup( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -3967,10 +3967,10 @@ static void junior_rc_left_eighth_to_diag_paint_setup( /** rct2: 0x008AAF90 */ static void junior_rc_right_eighth_to_diag_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_eighth_to_diag_tiles_paint( @@ -4007,7 +4007,7 @@ static void junior_rc_right_eighth_to_diag_paint_setup( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -4034,13 +4034,13 @@ static void junior_rc_right_eighth_to_diag_paint_setup( /** rct2: 0x008AAFA0 */ static void junior_rc_left_eighth_to_orthogonal_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 map[] = { 4, 2, 3, 1, 0 }; + const uint8_t map[] = { 4, 2, 3, 1, 0 }; trackSequence = map[trackSequence]; junior_rc_right_eighth_to_diag_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); } @@ -4048,13 +4048,13 @@ static void junior_rc_left_eighth_to_orthogonal_paint_setup( /** rct2: 0x008AAFB0 */ static void junior_rc_right_eighth_to_orthogonal_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 map[] = { 4, 2, 3, 1, 0 }; + const uint8_t map[] = { 4, 2, 3, 1, 0 }; trackSequence = map[trackSequence]; junior_rc_left_eighth_to_diag_paint_setup(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); } @@ -4113,7 +4113,7 @@ static constexpr const LocationXYZ16 junior_rc_left_eighth_to_diag_bank_bound_of }, }; -static constexpr const sint8 junior_rc_left_eighth_to_diag_bank_thickness[4][4] = { +static constexpr const int8_t junior_rc_left_eighth_to_diag_bank_thickness[4][4] = { { 26, 1, @@ -4143,10 +4143,10 @@ static constexpr const sint8 junior_rc_left_eighth_to_diag_bank_thickness[4][4] /** rct2: 0x008AB160 */ static void junior_rc_left_eighth_to_diag_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_eighth_to_diag_tiles_paint( @@ -4183,7 +4183,7 @@ static void junior_rc_left_eighth_to_diag_bank_paint_setup( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -4261,7 +4261,7 @@ static constexpr const LocationXYZ16 junior_rc_right_eighth_to_diag_bank_bound_o }, }; -static constexpr const sint8 junior_rc_right_eighth_to_diag_bank_thickness[4][4] = { +static constexpr const int8_t junior_rc_right_eighth_to_diag_bank_thickness[4][4] = { { 1, 1, @@ -4291,10 +4291,10 @@ static constexpr const sint8 junior_rc_right_eighth_to_diag_bank_thickness[4][4] /** rct2: 0x008AB170 */ static void junior_rc_right_eighth_to_diag_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_eighth_to_diag_tiles_paint( @@ -4331,7 +4331,7 @@ static void junior_rc_right_eighth_to_diag_bank_paint_setup( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -4358,13 +4358,13 @@ static void junior_rc_right_eighth_to_diag_bank_paint_setup( /** rct2: 0x008AB180 */ static void junior_rc_left_eighth_to_orthogonal_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 map[] = { 4, 2, 3, 1, 0 }; + const uint8_t map[] = { 4, 2, 3, 1, 0 }; trackSequence = map[trackSequence]; junior_rc_right_eighth_to_diag_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); } @@ -4372,30 +4372,30 @@ static void junior_rc_left_eighth_to_orthogonal_bank_paint_setup( /** rct2: 0x008AB190 */ static void junior_rc_right_eighth_to_orthogonal_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 map[] = { 4, 2, 3, 1, 0 }; + const uint8_t map[] = { 4, 2, 3, 1, 0 }; trackSequence = map[trackSequence]; junior_rc_left_eighth_to_diag_bank_paint_setup(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); } -static constexpr const sint32 junior_rc_diag_blocked_segments[] = { SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4 | SEGMENT_BC, +static constexpr const int32_t junior_rc_diag_blocked_segments[] = { SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4 | SEGMENT_BC, SEGMENT_C4 | SEGMENT_CC | SEGMENT_C8 | SEGMENT_B4, SEGMENT_D0 | SEGMENT_C4 | SEGMENT_C0 | SEGMENT_D4, SEGMENT_D0 | SEGMENT_C4 | SEGMENT_B8 | SEGMENT_C8 }; -static constexpr const uint8 junior_rc_diag_support_segment[] = { 1, 0, 2, 3 }; +static constexpr const uint8_t junior_rc_diag_support_segment[] = { 1, 0, 2, 3 }; void junior_rc_paint_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4410,17 +4410,17 @@ void junior_rc_paint_track_diag_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } void junior_rc_paint_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4434,17 +4434,17 @@ void junior_rc_paint_track_diag_25_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } void junior_rc_paint_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4458,17 +4458,17 @@ void junior_rc_paint_track_diag_flat_to_25_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } void junior_rc_paint_track_diag_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4485,17 +4485,17 @@ void junior_rc_paint_track_diag_flat_to_60_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 64, 0x20); } void junior_rc_paint_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4509,17 +4509,17 @@ void junior_rc_paint_track_diag_25_deg_up_to_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } void junior_rc_paint_track_diag_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4536,17 +4536,17 @@ void junior_rc_paint_track_diag_60_deg_up_to_flat( height + 13, session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 64, 0x20); } void junior_rc_paint_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4561,17 +4561,17 @@ void junior_rc_paint_track_diag_25_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } void junior_rc_paint_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4585,17 +4585,17 @@ void junior_rc_paint_track_diag_flat_to_25_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } void junior_rc_paint_track_diag_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4612,17 +4612,17 @@ void junior_rc_paint_track_diag_flat_to_60_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } void junior_rc_paint_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4636,17 +4636,17 @@ void junior_rc_paint_track_diag_25_deg_down_to_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } void junior_rc_paint_track_diag_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -4663,7 +4663,7 @@ void junior_rc_paint_track_diag_60_deg_down_to_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -4671,10 +4671,10 @@ void junior_rc_paint_track_diag_60_deg_down_to_flat( /** rct2: 0x008AAF10 */ static void junior_rc_diag_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4685,10 +4685,10 @@ static void junior_rc_diag_flat_paint_setup( /** rct2: 0x008AAF40 */ static void junior_rc_diag_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4699,10 +4699,10 @@ static void junior_rc_diag_25_deg_up_paint_setup( /** rct2: 0x008AAF20 */ static void junior_rc_diag_flat_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4712,10 +4712,10 @@ static void junior_rc_diag_flat_to_25_deg_up_paint_setup( static void junior_rc_diag_flat_to_60_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4726,10 +4726,10 @@ static void junior_rc_diag_flat_to_60_deg_up_paint_setup( /** rct2: 0x008AAF30 */ static void junior_rc_diag_25_deg_up_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4739,10 +4739,10 @@ static void junior_rc_diag_25_deg_up_to_flat_paint_setup( static void junior_rc_diag_60_deg_up_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4753,10 +4753,10 @@ static void junior_rc_diag_60_deg_up_to_flat_paint_setup( /** rct2: 0x008AAF70 */ static void junior_rc_diag_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4767,10 +4767,10 @@ static void junior_rc_diag_25_deg_down_paint_setup( /** rct2: 0x008AAF50 */ static void junior_rc_diag_flat_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4780,10 +4780,10 @@ static void junior_rc_diag_flat_to_25_deg_down_paint_setup( static void junior_rc_diag_flat_to_60_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4794,10 +4794,10 @@ static void junior_rc_diag_flat_to_60_deg_down_paint_setup( /** rct2: 0x008AAF60 */ static void junior_rc_diag_25_deg_down_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4807,10 +4807,10 @@ static void junior_rc_diag_25_deg_down_to_flat_paint_setup( static void junior_rc_diag_60_deg_down_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -4821,10 +4821,10 @@ static void junior_rc_diag_60_deg_down_to_flat_paint_setup( /** rct2: 0x008AB1C0 */ static void junior_rc_diag_flat_to_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -4833,7 +4833,7 @@ static void junior_rc_diag_flat_to_left_bank_paint_setup( if (direction == 0 && trackSequence == 1) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); } @@ -4844,7 +4844,7 @@ static void junior_rc_diag_flat_to_left_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -4852,10 +4852,10 @@ static void junior_rc_diag_flat_to_left_bank_paint_setup( /** rct2: 0x008AB1D0 */ static void junior_rc_diag_flat_to_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -4864,7 +4864,7 @@ static void junior_rc_diag_flat_to_right_bank_paint_setup( if (direction == 2 && trackSequence == 2) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); } @@ -4875,7 +4875,7 @@ static void junior_rc_diag_flat_to_right_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -4883,10 +4883,10 @@ static void junior_rc_diag_flat_to_right_bank_paint_setup( /** rct2: 0x008AB1E0 */ static void junior_rc_diag_left_bank_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -4895,7 +4895,7 @@ static void junior_rc_diag_left_bank_to_flat_paint_setup( if (direction == 0 && trackSequence == 1) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); } @@ -4906,7 +4906,7 @@ static void junior_rc_diag_left_bank_to_flat_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -4914,10 +4914,10 @@ static void junior_rc_diag_left_bank_to_flat_paint_setup( /** rct2: 0x008AB1F0 */ static void junior_rc_diag_right_bank_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -4926,7 +4926,7 @@ static void junior_rc_diag_right_bank_to_flat_paint_setup( if (direction == 2 && trackSequence == 2) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); } @@ -4937,7 +4937,7 @@ static void junior_rc_diag_right_bank_to_flat_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -4945,10 +4945,10 @@ static void junior_rc_diag_right_bank_to_flat_paint_setup( /** rct2: 0x008AB220 */ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -4957,7 +4957,7 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup( if (direction == 0 && trackSequence == 1) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -4967,7 +4967,7 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } @@ -4975,10 +4975,10 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup( /** rct2: 0x008AB230 */ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -4987,7 +4987,7 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup( if (direction == 2 && trackSequence == 2) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -4997,7 +4997,7 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } @@ -5005,10 +5005,10 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup( /** rct2: 0x008AB200 */ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -5017,7 +5017,7 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup( if (direction == 0 && trackSequence == 1) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -5027,7 +5027,7 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -5035,10 +5035,10 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup( /** rct2: 0x008AB210 */ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -5047,7 +5047,7 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup( if (direction == 2 && trackSequence == 2) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -5057,7 +5057,7 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -5065,10 +5065,10 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup( /** rct2: 0x008AB200 */ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -5077,7 +5077,7 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup( if (direction == 0 && trackSequence == 1) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -5087,7 +5087,7 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -5095,10 +5095,10 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup( /** rct2: 0x008AB210 */ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -5107,7 +5107,7 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup( if (direction == 2 && trackSequence == 2) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -5117,7 +5117,7 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -5125,10 +5125,10 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup( /** rct2: 0x008AB220 */ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -5137,7 +5137,7 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup( if (direction == 0 && trackSequence == 1) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -5147,7 +5147,7 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } @@ -5155,10 +5155,10 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup( /** rct2: 0x008AB230 */ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_diag_tiles_paint( @@ -5167,7 +5167,7 @@ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup( if (direction == 2 && trackSequence == 2) { - uint32 imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); } @@ -5177,7 +5177,7 @@ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } @@ -5199,13 +5199,13 @@ static constexpr const LocationXYZ16 junior_rc_diag_right_bank_bound_offsets[4] /** rct2: 0x008AB1A0 */ static void junior_rc_diag_left_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 thickness = direction == 0 ? 0 : 1; + uint8_t thickness = direction == 0 ? 0 : 1; track_paint_util_diag_tiles_paint( session, thickness, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, @@ -5218,7 +5218,7 @@ static void junior_rc_diag_left_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -5226,13 +5226,13 @@ static void junior_rc_diag_left_bank_paint_setup( /** rct2: 0x008AB1B0 */ static void junior_rc_diag_right_bank_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 thickness = direction == 2 ? 0 : 1; + uint8_t thickness = direction == 2 ? 0 : 1; track_paint_util_diag_tiles_paint( session, thickness, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, @@ -5245,7 +5245,7 @@ static void junior_rc_diag_right_bank_paint_setup( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -5264,7 +5264,7 @@ static constexpr const LocationXY16 junior_rc_60_deg_up_tile_offsets[4] = { { 6, 0 }, }; -static constexpr const sint8 junior_rc_60_deg_up_bound_thickness[4] = { 1, 75, 75, 1 }; +static constexpr const int8_t junior_rc_60_deg_up_bound_thickness[4] = { 1, 75, 75, 1 }; static constexpr const LocationXY16 junior_rc_60_deg_up_bound_lengths[4] = { { 32, 20 }, @@ -5275,20 +5275,20 @@ static constexpr const LocationXY16 junior_rc_60_deg_up_bound_lengths[4] = { void junior_rc_paint_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 image_id = session->TrackColours[SCHEME_TRACK]; + uint32_t image_id = session->TrackColours[SCHEME_TRACK]; image_id |= junior_rc_track_pieces_60_deg_up[chainType][direction]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_tile_offsets[direction].x, - (sint8)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_60_deg_up_bound_lengths[direction].x, + session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, + (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_60_deg_up_bound_lengths[direction].x, junior_rc_60_deg_up_bound_lengths[direction].y, junior_rc_60_deg_up_bound_thickness[direction], height, junior_rc_60_deg_up_bound_offsets[direction].x, junior_rc_60_deg_up_bound_offsets[direction].y, height); @@ -5310,7 +5310,7 @@ void junior_rc_paint_track_60_deg_up( const LocationXY16 pos = session->MapPosition; - sint8 support[4] = { 35, 29, 25, 32 }; + int8_t support[4] = { 35, 29, 25, 32 }; if (track_paint_util_should_paint_supports(pos)) { metal_a_supports_paint_setup(session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, @@ -5324,10 +5324,10 @@ void junior_rc_paint_track_60_deg_up( static void junior_rc_60_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5337,10 +5337,10 @@ static void junior_rc_60_deg_up_paint_setup( static void junior_rc_60_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_60_deg_up_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -5353,7 +5353,7 @@ static constexpr const LocationXY16 junior_rc_25_deg_up_to_60_deg_up_bound_lengt { { 20, 32 }, { 0, 0 } }, }; -static constexpr const sint8 junior_rc_25_deg_up_to_60_deg_up_bound_thickness[4] = { 1, 43, 43, 1 }; +static constexpr const int8_t junior_rc_25_deg_up_to_60_deg_up_bound_thickness[4] = { 1, 43, 43, 1 }; static constexpr const LocationXY16 junior_rc_25_deg_up_to_60_deg_up_bound_offsets[4][2] = { { { 0, 6 }, { 0, 0 } }, @@ -5364,20 +5364,20 @@ static constexpr const LocationXY16 junior_rc_25_deg_up_to_60_deg_up_bound_offse void junior_rc_paint_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 image_id = session->TrackColours[SCHEME_TRACK]; + uint32_t image_id = session->TrackColours[SCHEME_TRACK]; image_id |= junior_rc_track_pieces_25_deg_up_to_60_deg_up[chainType][direction][0]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_tile_offsets[direction].x, - (sint8)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, + session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, + (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].x, @@ -5390,8 +5390,8 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( image_id |= junior_rc_track_pieces_25_deg_up_to_60_deg_up[chainType][direction][1]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_tile_offsets[direction].x, - (sint8)junior_rc_60_deg_up_tile_offsets[direction].y, + session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, + (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, @@ -5417,7 +5417,7 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( const LocationXY16 pos = session->MapPosition; - sint8 support[4] = { 12, 12, 12, 14 }; + int8_t support[4] = { 12, 12, 12, 14 }; if (track_paint_util_should_paint_supports(pos)) { metal_a_supports_paint_setup(session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, @@ -5431,10 +5431,10 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( static void junior_rc_25_deg_up_to_60_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5444,10 +5444,10 @@ static void junior_rc_25_deg_up_to_60_deg_up_paint_setup( static void junior_rc_60_deg_down_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_25_deg_up_to_60_deg_up_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -5455,20 +5455,20 @@ static void junior_rc_60_deg_down_to_25_deg_down_paint_setup( void junior_rc_paint_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { - uint32 image_id = session->TrackColours[SCHEME_TRACK]; + uint32_t image_id = session->TrackColours[SCHEME_TRACK]; image_id |= junior_rc_track_pieces_60_deg_up_to_25_deg_up[chainType][direction][0]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_tile_offsets[direction].x, - (sint8)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, + session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, + (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].x, @@ -5481,8 +5481,8 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up( image_id |= junior_rc_track_pieces_60_deg_up_to_25_deg_up[chainType][direction][1]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_tile_offsets[direction].x, - (sint8)junior_rc_60_deg_up_tile_offsets[direction].y, + session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, + (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, @@ -5521,10 +5521,10 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up( static void junior_rc_60_deg_up_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5534,10 +5534,10 @@ static void junior_rc_60_deg_up_to_25_deg_up_paint_setup( static void junior_rc_25_deg_down_to_60_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_60_deg_up_to_25_deg_up_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -5545,10 +5545,10 @@ static void junior_rc_25_deg_down_to_60_deg_down_paint_setup( void junior_rc_paint_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -5562,17 +5562,17 @@ void junior_rc_paint_track_diag_60_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 104, 0x20); } void junior_rc_paint_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -5586,17 +5586,17 @@ void junior_rc_paint_track_diag_60_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 104, 0x20); } void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -5610,17 +5610,17 @@ void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 72, 0x20); } void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -5645,17 +5645,17 @@ void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 72, 0x20); } void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -5680,17 +5680,17 @@ void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 72, 0x20); } void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType) { @@ -5705,17 +5705,17 @@ void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 72, 0x20); } static void junior_rc_diag_60_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5725,10 +5725,10 @@ static void junior_rc_diag_60_deg_up_paint_setup( static void junior_rc_diag_60_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5738,10 +5738,10 @@ static void junior_rc_diag_60_deg_down_paint_setup( static void junior_rc_diag_25_deg_up_to_60_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5751,10 +5751,10 @@ static void junior_rc_diag_25_deg_up_to_60_deg_up_paint_setup( static void junior_rc_diag_60_deg_up_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5764,10 +5764,10 @@ static void junior_rc_diag_60_deg_up_to_25_deg_up_paint_setup( static void junior_rc_diag_25_deg_down_to_60_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5777,10 +5777,10 @@ static void junior_rc_diag_25_deg_down_to_60_deg_down_paint_setup( static void junior_rc_diag_60_deg_down_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5795,7 +5795,7 @@ static constexpr const LocationXY16 junior_rc_flat_to_60_deg_up_bound_lengths[4] { { 24, 32 }, { 0, 0 } }, }; -static constexpr const sint8 junior_rc_flat_to_60_deg_up_bound_thickness[4] = { 1, 43, 43, 1 }; +static constexpr const int8_t junior_rc_flat_to_60_deg_up_bound_thickness[4] = { 1, 43, 43, 1 }; static constexpr const LocationXY16 junior_rc_flat_to_60_deg_up_bound_offsets[4][2] = { { { 0, 4 }, { 0, 0 } }, @@ -5820,21 +5820,21 @@ static constexpr const LocationXY16 junior_rc_60_deg_up_to_flat_tile_offsets[4][ static void junior_rc_flat_to_60_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id = session->TrackColours[SCHEME_TRACK]; + uint32_t image_id = session->TrackColours[SCHEME_TRACK]; bool isChained = tileElement->type & (1 << 7); image_id |= junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][0]; sub_98197C( - session, image_id, (sint8)junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].x, - (sint8)junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].y, + session, image_id, (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].x, + (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].y, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height + 24, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].x, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].y, @@ -5847,8 +5847,8 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( image_id |= junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][1]; sub_98197C( - session, image_id, (sint8)junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].x, - (sint8)junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].y, + session, image_id, (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].x, + (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].y, junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height, junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].x, @@ -5873,7 +5873,7 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( const LocationXY16 pos = session->MapPosition; - sint8 support[4] = { 12, 12, 12, 14 }; + int8_t support[4] = { 12, 12, 12, 14 }; if (track_paint_util_should_paint_supports(pos)) { metal_a_supports_paint_setup(session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, @@ -5887,10 +5887,10 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( static void junior_rc_60_deg_down_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_flat_to_60_deg_up_paint_setup(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -5898,22 +5898,22 @@ static void junior_rc_60_deg_down_to_flat_paint_setup( static void junior_rc_60_deg_up_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id = session->TrackColours[SCHEME_TRACK]; + uint32_t image_id = session->TrackColours[SCHEME_TRACK]; bool isChained = tileElement->type & (1 << 7); image_id |= junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][0]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].x, - (sint8)junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].y, + session, image_id, (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].x, + (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].y, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height + 24, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].x, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].y, @@ -5926,8 +5926,8 @@ static void junior_rc_60_deg_up_to_flat_paint_setup( image_id |= junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][1]; sub_98197C( - session, image_id, (sint8)junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].x, - (sint8)junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].y, + session, image_id, (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].x, + (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].y, junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height, junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].x, @@ -5965,10 +5965,10 @@ static void junior_rc_60_deg_up_to_flat_paint_setup( static void junior_rc_flat_to_60_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_60_deg_up_to_flat_paint_setup(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -5977,10 +5977,10 @@ static void junior_rc_flat_to_60_deg_down_paint_setup( /* rct2: 0x00518394 */ static void junior_rc_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -5991,10 +5991,10 @@ static void junior_rc_flat_paint_setup( /* rct2: 0x00515629, 0x00514D22, 0x005151B9 */ static void paint_junior_rc_station_track( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_station(session, rideIndex, trackSequence, direction, height, tileElement, RIDE_TYPE_JUNIOR_ROLLER_COASTER); @@ -6003,10 +6003,10 @@ static void paint_junior_rc_station_track( /* rct2: 0x0051881E */ static void junior_rc_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -6017,10 +6017,10 @@ static void junior_rc_25_deg_up_paint_setup( /* rct2: 0x00518B42 */ static void junior_rc_flat_to_25_deg_up_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -6031,10 +6031,10 @@ static void junior_rc_flat_to_25_deg_up_paint_setup( /* rct2: 0x00518E56 */ static void junior_rc_25_deg_up_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -6045,10 +6045,10 @@ static void junior_rc_25_deg_up_to_flat_paint_setup( /* rct2: 0x005189B0 */ static void junior_rc_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { @@ -6058,10 +6058,10 @@ static void junior_rc_25_deg_down_paint_setup( /* rct2: 0x00518FE8 */ static void junior_rc_flat_to_25_deg_down_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { @@ -6071,10 +6071,10 @@ static void junior_rc_flat_to_25_deg_down_paint_setup( /* rct2: 0x00518CCC */ static void junior_rc_25_deg_down_to_flat_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { @@ -6083,16 +6083,16 @@ static void junior_rc_25_deg_down_to_flat_paint_setup( static void junior_rc_booster_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - sint32 XoffsetNESW = 12; - sint32 YoffsetNESW = -10; - sint32 XoffsetNWSE = 10; - sint32 YoffsetNWSE = -10; + int32_t XoffsetNESW = 12; + int32_t YoffsetNESW = -10; + int32_t XoffsetNWSE = 10; + int32_t YoffsetNWSE = -10; if (direction & 1) { @@ -6114,7 +6114,7 @@ static void junior_rc_booster_paint_setup( const LocationXY16 pos = session->MapPosition; if (track_paint_util_should_paint_supports(pos)) { - uint8 supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; + uint8_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; metal_a_supports_paint_setup(session, supportType, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } @@ -6124,7 +6124,7 @@ static void junior_rc_booster_paint_setup( } /* 0x008AAA0C */ -TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.h b/src/openrct2/ride/coaster/JuniorRollerCoaster.h index 241451c639..e6b3042bd0 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.h +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.h @@ -22,238 +22,238 @@ enum JUNIOR_RC_CHAINTYPE void junior_rc_paint_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, - uint8 rideType); + uint8_t rideType); void junior_rc_paint_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); void junior_rc_paint_track_diag_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - uint16 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + uint16_t height, const rct_tile_element * tileElement, JUNIOR_RC_CHAINTYPE chainType); diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp index 0840145b91..effafe9d33 100644 --- a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x0082491C */ static void lay_down_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -134,15 +134,15 @@ static void lay_down_rc_track_flat( /** rct2: 0x00824B8C, 0x00824B9C, 0x00824BAC */ static void lay_down_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_inverted(tileElement)) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, @@ -161,7 +161,7 @@ static void lay_down_rc_track_station( } else { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 16236, 16232, SPR_STATION_BASE_A_SW_NE }, { 16237, 16233, SPR_STATION_BASE_A_NW_SE }, { 16236, 16232, SPR_STATION_BASE_A_SW_NE }, @@ -191,10 +191,10 @@ static void lay_down_rc_track_station( /** rct2: 0x0082492C */ static void lay_down_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -352,10 +352,10 @@ static void lay_down_rc_track_25_deg_up( /** rct2: 0x0082493C */ static void lay_down_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -464,10 +464,10 @@ static void lay_down_rc_track_60_deg_up( /** rct2: 0x0082494C */ static void lay_down_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -625,10 +625,10 @@ static void lay_down_rc_track_flat_to_25_deg_up( /** rct2: 0x0082495C */ static void lay_down_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -749,10 +749,10 @@ static void lay_down_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x0082496C */ static void lay_down_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -897,10 +897,10 @@ static void lay_down_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x0082497C */ static void lay_down_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1058,10 +1058,10 @@ static void lay_down_rc_track_25_deg_up_to_flat( /** rct2: 0x0082498C */ static void lay_down_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1070,10 +1070,10 @@ static void lay_down_rc_track_25_deg_down( /** rct2: 0x0082499C */ static void lay_down_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1082,10 +1082,10 @@ static void lay_down_rc_track_60_deg_down( /** rct2: 0x008249AC */ static void lay_down_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1094,10 +1094,10 @@ static void lay_down_rc_track_flat_to_25_deg_down( /** rct2: 0x008249BC */ static void lay_down_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1106,10 +1106,10 @@ static void lay_down_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008249CC */ static void lay_down_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1118,10 +1118,10 @@ static void lay_down_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008249DC */ static void lay_down_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1130,10 +1130,10 @@ static void lay_down_rc_track_25_deg_down_to_flat( /** rct2: 0x008249EC */ static void lay_down_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1457,10 +1457,10 @@ static void lay_down_rc_track_left_quarter_turn_5( /** rct2: 0x008249FC */ static void lay_down_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1470,10 +1470,10 @@ static void lay_down_rc_track_right_quarter_turn_5( /** rct2: 0x00824A0C */ static void lay_down_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1551,10 +1551,10 @@ static void lay_down_rc_track_flat_to_left_bank( /** rct2: 0x00824A1C */ static void lay_down_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1632,10 +1632,10 @@ static void lay_down_rc_track_flat_to_right_bank( /** rct2: 0x00824A2C */ static void lay_down_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1713,10 +1713,10 @@ static void lay_down_rc_track_left_bank_to_flat( /** rct2: 0x00824A3C */ static void lay_down_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1794,10 +1794,10 @@ static void lay_down_rc_track_right_bank_to_flat( /** rct2: 0x00824A4C */ static void lay_down_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2125,10 +2125,10 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( /** rct2: 0x00824A5C */ static void lay_down_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -2138,10 +2138,10 @@ static void lay_down_rc_track_banked_right_quarter_turn_5( /** rct2: 0x00824A6C */ static void lay_down_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2250,10 +2250,10 @@ static void lay_down_rc_track_left_bank_to_25_deg_up( /** rct2: 0x00824A7C */ static void lay_down_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2362,10 +2362,10 @@ static void lay_down_rc_track_right_bank_to_25_deg_up( /** rct2: 0x00824A8C */ static void lay_down_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2474,10 +2474,10 @@ static void lay_down_rc_track_25_deg_up_to_left_bank( /** rct2: 0x00824A9C */ static void lay_down_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2586,10 +2586,10 @@ static void lay_down_rc_track_25_deg_up_to_right_bank( /** rct2: 0x00824AAC */ static void lay_down_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2598,10 +2598,10 @@ static void lay_down_rc_track_left_bank_to_25_deg_down( /** rct2: 0x00824ABC */ static void lay_down_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2610,10 +2610,10 @@ static void lay_down_rc_track_right_bank_to_25_deg_down( /** rct2: 0x00824ACC */ static void lay_down_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2622,10 +2622,10 @@ static void lay_down_rc_track_25_deg_down_to_left_bank( /** rct2: 0x00824ADC */ static void lay_down_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2634,10 +2634,10 @@ static void lay_down_rc_track_25_deg_down_to_right_bank( /** rct2: 0x00824AEC */ static void lay_down_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2711,10 +2711,10 @@ static void lay_down_rc_track_left_bank( /** rct2: 0x00824AFC */ static void lay_down_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2723,10 +2723,10 @@ static void lay_down_rc_track_right_bank( /** rct2: 0x00824B0C */ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3045,10 +3045,10 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x00824B1C */ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3367,10 +3367,10 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x00824B2C */ static void lay_down_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -3381,10 +3381,10 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x00824B3C */ static void lay_down_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -3394,10 +3394,10 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x00824B4C */ static void lay_down_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3689,10 +3689,10 @@ static void lay_down_rc_track_s_bend_left( /** rct2: 0x00824B5C */ static void lay_down_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3984,10 +3984,10 @@ static void lay_down_rc_track_s_bend_right( /** rct2: 0x00824B6C */ static void lay_down_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4243,10 +4243,10 @@ static void lay_down_rc_track_left_vertical_loop( /** rct2: 0x00824B7C */ static void lay_down_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4458,10 +4458,10 @@ static void lay_down_rc_track_right_vertical_loop( /** rct2: 0x00824BBC */ static void lay_down_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4671,10 +4671,10 @@ static void lay_down_rc_track_left_quarter_turn_3( /** rct2: 0x00824BCC */ static void lay_down_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -4684,10 +4684,10 @@ static void lay_down_rc_track_right_quarter_turn_3( /** rct2: 0x00824BDC */ static void lay_down_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4901,10 +4901,10 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( /** rct2: 0x00824BEC */ static void lay_down_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -4914,10 +4914,10 @@ static void lay_down_rc_track_right_quarter_turn_3_bank( /** rct2: 0x00824BFC */ static void lay_down_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5077,10 +5077,10 @@ static void lay_down_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x00824C0C */ static void lay_down_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5246,10 +5246,10 @@ static void lay_down_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x00824C1C */ static void lay_down_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -5260,10 +5260,10 @@ static void lay_down_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x00824C2C */ static void lay_down_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -5273,10 +5273,10 @@ static void lay_down_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x00824C9C */ static void lay_down_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5483,10 +5483,10 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( /** rct2: 0x00824CAC */ static void lay_down_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5693,10 +5693,10 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( /** rct2: 0x00824CBC */ static void lay_down_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -5712,10 +5712,10 @@ static void lay_down_rc_track_left_half_banked_helix_down_small( /** rct2: 0x00824CCC */ static void lay_down_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -5731,10 +5731,10 @@ static void lay_down_rc_track_right_half_banked_helix_down_small( /** rct2: 0x00824CDC */ static void lay_down_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6055,10 +6055,10 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( /** rct2: 0x00824CEC */ static void lay_down_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6379,10 +6379,10 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( /** rct2: 0x00824CFC */ static void lay_down_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -6398,10 +6398,10 @@ static void lay_down_rc_track_left_half_banked_helix_down_large( /** rct2: 0x00824D0C */ static void lay_down_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -6417,10 +6417,10 @@ static void lay_down_rc_track_right_half_banked_helix_down_large( /** rct2: 0x00824D3C */ static void lay_down_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6491,10 +6491,10 @@ static void lay_down_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x00824D1C */ static void lay_down_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6566,10 +6566,10 @@ static void lay_down_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x00824D2C */ static void lay_down_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -6579,10 +6579,10 @@ static void lay_down_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x00824D4C */ static void lay_down_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -6591,10 +6591,10 @@ static void lay_down_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x00824D5C */ static void lay_down_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6654,10 +6654,10 @@ static void lay_down_rc_track_brakes( /** rct2: 0x00824D6C */ static void lay_down_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6757,10 +6757,10 @@ static void lay_down_rc_track_on_ride_photo( /** rct2: 0x00824D8C */ static void lay_down_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7039,10 +7039,10 @@ static void lay_down_rc_track_left_eighth_to_diag( /** rct2: 0x00824D9C */ static void lay_down_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7321,10 +7321,10 @@ static void lay_down_rc_track_right_eighth_to_diag( /** rct2: 0x00824DAC */ static void lay_down_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7334,10 +7334,10 @@ static void lay_down_rc_track_left_eighth_to_orthogonal( /** rct2: 0x00824DBC */ static void lay_down_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7347,10 +7347,10 @@ static void lay_down_rc_track_right_eighth_to_orthogonal( /** rct2: 0x00824DCC */ static void lay_down_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7629,10 +7629,10 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( /** rct2: 0x00824DDC */ static void lay_down_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7911,10 +7911,10 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( /** rct2: 0x00824DEC */ static void lay_down_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7924,10 +7924,10 @@ static void lay_down_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x00824DFC */ static void lay_down_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7937,10 +7937,10 @@ static void lay_down_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x00824D7C */ static void lay_down_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8209,10 +8209,10 @@ static void lay_down_rc_track_diag_flat( /** rct2: 0x00824E2C */ static void lay_down_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8481,10 +8481,10 @@ static void lay_down_rc_track_diag_25_deg_up( /** rct2: 0x00824E8C */ static void lay_down_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8701,10 +8701,10 @@ static void lay_down_rc_track_diag_60_deg_up( /** rct2: 0x00824E0C */ static void lay_down_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8973,10 +8973,10 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x00824E6C */ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9193,10 +9193,10 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x00824E7C */ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9413,10 +9413,10 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x00824E1C */ static void lay_down_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9685,10 +9685,10 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x00824E5C */ static void lay_down_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9905,10 +9905,10 @@ static void lay_down_rc_track_diag_25_deg_down( /** rct2: 0x00824EBC */ static void lay_down_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10125,10 +10125,10 @@ static void lay_down_rc_track_diag_60_deg_down( /** rct2: 0x00824E3C */ static void lay_down_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10338,10 +10338,10 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x00824E9C */ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10558,10 +10558,10 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x00824EAC */ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10778,10 +10778,10 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x00824E4C */ static void lay_down_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10998,10 +10998,10 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x00824EEC */ static void lay_down_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11155,10 +11155,10 @@ static void lay_down_rc_track_diag_flat_to_left_bank( /** rct2: 0x00824EFC */ static void lay_down_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11312,10 +11312,10 @@ static void lay_down_rc_track_diag_flat_to_right_bank( /** rct2: 0x00824F0C */ static void lay_down_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11469,10 +11469,10 @@ static void lay_down_rc_track_diag_left_bank_to_flat( /** rct2: 0x00824F1C */ static void lay_down_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11626,10 +11626,10 @@ static void lay_down_rc_track_diag_right_bank_to_flat( /** rct2: 0x00824F4C */ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11782,10 +11782,10 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x00824F5C */ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11938,10 +11938,10 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x00824F2C */ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12094,10 +12094,10 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x00824F3C */ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12250,10 +12250,10 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x00824F6C */ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12399,10 +12399,10 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x00824F7C */ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12548,10 +12548,10 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x00824F8C */ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12704,10 +12704,10 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x00824F9C */ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12860,10 +12860,10 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x00824ECC */ static void lay_down_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -13015,10 +13015,10 @@ static void lay_down_rc_track_diag_left_bank( /** rct2: 0x00824EDC */ static void lay_down_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -13170,10 +13170,10 @@ static void lay_down_rc_track_diag_right_bank( /** rct2: 0x00824FAC */ static void lay_down_rc_track_left_flyer_twist_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13280,10 +13280,10 @@ static void lay_down_rc_track_left_flyer_twist_up( /** rct2: 0x00824FBC */ static void lay_down_rc_track_right_flyer_twist_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13390,10 +13390,10 @@ static void lay_down_rc_track_right_flyer_twist_up( /** rct2: 0x00824FCC */ static void lay_down_rc_track_left_flyer_twist_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13500,10 +13500,10 @@ static void lay_down_rc_track_left_flyer_twist_down( /** rct2: 0x00824FDC */ static void lay_down_rc_track_right_flyer_twist_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13610,10 +13610,10 @@ static void lay_down_rc_track_right_flyer_twist_down( /** rct2: 0x00824C3C */ static void lay_down_rc_track_flyer_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13733,10 +13733,10 @@ static void lay_down_rc_track_flyer_half_loop_up( /** rct2: 0x00824C4C */ static void lay_down_rc_track_flyer_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13856,10 +13856,10 @@ static void lay_down_rc_track_flyer_half_loop_down( /** rct2: 0x00824C5C */ static void lay_down_rc_track_left_flyer_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -13975,10 +13975,10 @@ static void lay_down_rc_track_left_flyer_corkscrew_up( /** rct2: 0x00824C6C */ static void lay_down_rc_track_right_flyer_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14081,10 +14081,10 @@ static void lay_down_rc_track_right_flyer_corkscrew_up( /** rct2: 0x00824C7C */ static void lay_down_rc_track_left_flyer_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14187,10 +14187,10 @@ static void lay_down_rc_track_left_flyer_corkscrew_down( /** rct2: 0x00824C8C */ static void lay_down_rc_track_right_flyer_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lay_down_rc_track_left_flyer_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 3) % 4, height, tileElement); @@ -14199,10 +14199,10 @@ static void lay_down_rc_track_right_flyer_corkscrew_down( /** rct2: 0x00824FEC */ static void lay_down_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -14258,10 +14258,10 @@ static void lay_down_rc_track_block_brakes( static void lay_down_rc_track_left_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14424,10 +14424,10 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( static void lay_down_rc_track_right_quarter_banked_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14590,10 +14590,10 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( static void lay_down_rc_track_left_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14756,10 +14756,10 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( static void lay_down_rc_track_right_quarter_banked_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -14920,7 +14920,7 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( } } -TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp index 2973762b9b..abe73a93a1 100644 --- a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp @@ -22,13 +22,13 @@ /** rct2: 0x008A6D50, 0x008A6D60, 0x008A6D70 */ static void lim_launched_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 15018, 15020, SPR_STATION_BASE_B_SW_NE }, { 15019, 15021, SPR_STATION_BASE_B_NW_SE }, { 15018, 15020, SPR_STATION_BASE_B_SW_NE }, @@ -57,10 +57,10 @@ static void lim_launched_rc_track_station( /** rct2: 0x008A65E0 */ static void lim_launched_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -278,10 +278,10 @@ static void lim_launched_rc_track_left_vertical_loop( /** rct2: 0x008A65F0 */ static void lim_launched_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -467,10 +467,10 @@ static void lim_launched_rc_track_right_vertical_loop( /** rct2: 0x008A6D10 */ static void lim_launched_rc_track_left_twist_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -595,10 +595,10 @@ static void lim_launched_rc_track_left_twist_down_to_up( /** rct2: 0x008A6D20 */ static void lim_launched_rc_track_right_twist_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -723,10 +723,10 @@ static void lim_launched_rc_track_right_twist_down_to_up( /** rct2: 0x008A6D30 */ static void lim_launched_rc_track_left_twist_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -851,10 +851,10 @@ static void lim_launched_rc_track_left_twist_up_to_down( /** rct2: 0x008A6D40 */ static void lim_launched_rc_track_right_twist_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -979,10 +979,10 @@ static void lim_launched_rc_track_right_twist_up_to_down( /** rct2: 0x008A6CD0 */ static void lim_launched_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1082,10 +1082,10 @@ static void lim_launched_rc_track_left_corkscrew_up( /** rct2: 0x008A6CE0 */ static void lim_launched_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1186,10 +1186,10 @@ static void lim_launched_rc_track_right_corkscrew_up( /** rct2: 0x008A6CF0 */ static void lim_launched_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_right_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 1) & 3, height, tileElement); @@ -1198,10 +1198,10 @@ static void lim_launched_rc_track_left_corkscrew_down( /** rct2: 0x008A6D00 */ static void lim_launched_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_left_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction - 1) & 3, height, tileElement); @@ -1210,10 +1210,10 @@ static void lim_launched_rc_track_right_corkscrew_down( /** rct2: 0x008A6D80 */ static void lim_launched_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1242,10 +1242,10 @@ static void lim_launched_rc_track_brakes( /** rct2: 0x008A6C10 */ static void lim_launched_rc_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1283,10 +1283,10 @@ static void lim_launched_rc_track_90_deg_up( /** rct2: 0x008A6C20 */ static void lim_launched_rc_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1295,10 +1295,10 @@ static void lim_launched_rc_track_90_deg_down( /** rct2: 0x008A6C30 */ static void lim_launched_rc_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1340,10 +1340,10 @@ static void lim_launched_rc_track_60_deg_up_to_90_deg_up( /** rct2: 0x008A6C40 */ static void lim_launched_rc_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1352,10 +1352,10 @@ static void lim_launched_rc_track_90_deg_down_to_60_deg_down( /** rct2: 0x008A6C50 */ static void lim_launched_rc_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1394,10 +1394,10 @@ static void lim_launched_rc_track_90_deg_up_to_60_deg_up( /** rct2: 0x008A6C60 */ static void lim_launched_rc_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1438,10 +1438,10 @@ static void lim_launched_rc_track_60_deg_down_to_90_deg_down( /** rct2: 0x008A6C70 */ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1528,10 +1528,10 @@ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( /** rct2: 0x008A6C80 */ static void lim_launched_rc_track_inverted_flat_to_90_deg_quarter_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up(session, rideIndex, 2 - trackSequence, direction, height, @@ -1541,10 +1541,10 @@ static void lim_launched_rc_track_inverted_flat_to_90_deg_quarter_loop_down( /** rct2: 0x008A6D90 */ static void lim_launched_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1572,10 +1572,10 @@ static void lim_launched_rc_track_block_brakes( static void lim_launched_rc_track_left_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1617,10 +1617,10 @@ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_up( /** rct2: 0x008A6CA0 */ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1662,10 +1662,10 @@ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up( /** rct2: 0x008A6CB0 */ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_right_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, @@ -1675,17 +1675,17 @@ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_down( /** rct2: 0x008A6CC0 */ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { lim_launched_rc_track_left_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index 4aee08b94a..8f96818cb3 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -25,10 +25,10 @@ /** rct2: 0x008A6370 */ static void looping_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -85,16 +85,16 @@ static void looping_rc_track_flat( static void looping_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint32 stationTrackNESW = is_csg_loaded() ? LOOPING_RC_BOOSTER_NE_SW : 15016; - const uint32 stationTrackNWSE = is_csg_loaded() ? LOOPING_RC_BOOSTER_NW_SE : 15017; + const uint32_t stationTrackNESW = is_csg_loaded() ? LOOPING_RC_BOOSTER_NE_SW : 15016; + const uint32_t stationTrackNWSE = is_csg_loaded() ? LOOPING_RC_BOOSTER_NW_SE : 15017; - static const uint32 imageIds[4][2] = { + static const uint32_t imageIds[4][2] = { { stationTrackNESW, SPR_STATION_BASE_B_SW_NE }, { stationTrackNWSE, SPR_STATION_BASE_B_NW_SE }, { stationTrackNESW, SPR_STATION_BASE_B_SW_NE }, @@ -115,10 +115,10 @@ static void looping_rc_track_station( /** rct2: 0x008A6380 */ static void looping_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -189,10 +189,10 @@ static void looping_rc_track_25_deg_up( /** rct2: 0x008A6390 */ static void looping_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -263,10 +263,10 @@ static void looping_rc_track_60_deg_up( /** rct2: 0x008A63A0 */ static void looping_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -337,10 +337,10 @@ static void looping_rc_track_flat_to_25_deg_up( /** rct2: 0x008A63B0 */ static void looping_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -419,10 +419,10 @@ static void looping_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008A63C0 */ static void looping_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -501,10 +501,10 @@ static void looping_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008A63D0 */ static void looping_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -575,10 +575,10 @@ static void looping_rc_track_25_deg_up_to_flat( /** rct2: 0x008A63E0 */ static void looping_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -587,10 +587,10 @@ static void looping_rc_track_25_deg_down( /** rct2: 0x008A63F0 */ static void looping_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -599,10 +599,10 @@ static void looping_rc_track_60_deg_down( /** rct2: 0x008A6400 */ static void looping_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -611,10 +611,10 @@ static void looping_rc_track_flat_to_25_deg_down( /** rct2: 0x008A6410 */ static void looping_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -623,10 +623,10 @@ static void looping_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A6420 */ static void looping_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -635,10 +635,10 @@ static void looping_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A6430 */ static void looping_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -647,10 +647,10 @@ static void looping_rc_track_25_deg_down_to_flat( /** rct2: 0x008A6440 */ static void looping_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -806,10 +806,10 @@ static void looping_rc_track_left_quarter_turn_5( /** rct2: 0x008A6450 */ static void looping_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -819,10 +819,10 @@ static void looping_rc_track_right_quarter_turn_5( /** rct2: 0x008A6460 */ static void looping_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -861,10 +861,10 @@ static void looping_rc_track_flat_to_left_bank( /** rct2: 0x008A6470 */ static void looping_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -903,10 +903,10 @@ static void looping_rc_track_flat_to_right_bank( /** rct2: 0x008A6480 */ static void looping_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -945,10 +945,10 @@ static void looping_rc_track_left_bank_to_flat( /** rct2: 0x008A6490 */ static void looping_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -987,10 +987,10 @@ static void looping_rc_track_right_bank_to_flat( /** rct2: 0x008A64A0 */ static void looping_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1150,10 +1150,10 @@ static void looping_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008A64B0 */ static void looping_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1163,10 +1163,10 @@ static void looping_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008A64C0 */ static void looping_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1212,10 +1212,10 @@ static void looping_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008A64D0 */ static void looping_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1261,10 +1261,10 @@ static void looping_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008A64E0 */ static void looping_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1310,10 +1310,10 @@ static void looping_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008A64F0 */ static void looping_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1359,10 +1359,10 @@ static void looping_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008A6500 */ static void looping_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1371,10 +1371,10 @@ static void looping_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008A6510 */ static void looping_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1383,10 +1383,10 @@ static void looping_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008A6520 */ static void looping_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1395,10 +1395,10 @@ static void looping_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008A6530 */ static void looping_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1407,10 +1407,10 @@ static void looping_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008A6540 */ static void looping_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1445,10 +1445,10 @@ static void looping_rc_track_left_bank( /** rct2: 0x008A6550 */ static void looping_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1457,10 +1457,10 @@ static void looping_rc_track_right_bank( /** rct2: 0x008A6560 */ static void looping_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1611,10 +1611,10 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008A6570 */ static void looping_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1765,10 +1765,10 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008A6580 */ static void looping_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1778,10 +1778,10 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008A6590 */ static void looping_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1791,10 +1791,10 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008A65A0 */ static void looping_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1920,10 +1920,10 @@ static void looping_rc_track_s_bend_left( /** rct2: 0x008A65B0 */ static void looping_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2049,10 +2049,10 @@ static void looping_rc_track_s_bend_right( /** rct2: 0x008A65C0 */ static void looping_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2292,10 +2292,10 @@ static void looping_rc_track_left_vertical_loop( /** rct2: 0x008A65D0 */ static void looping_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2509,10 +2509,10 @@ static void looping_rc_track_right_vertical_loop( /** rct2: 0x008A6630 */ static void looping_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2613,10 +2613,10 @@ static void looping_rc_track_left_quarter_turn_3( /** rct2: 0x008A6640 */ static void looping_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2626,10 +2626,10 @@ static void looping_rc_track_right_quarter_turn_3( /** rct2: 0x008A6650 */ static void looping_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2734,10 +2734,10 @@ static void looping_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008A6660 */ static void looping_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2747,10 +2747,10 @@ static void looping_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008A6670 */ static void looping_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2822,10 +2822,10 @@ static void looping_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008A6680 */ static void looping_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2900,10 +2900,10 @@ static void looping_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008A6690 */ static void looping_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2913,10 +2913,10 @@ static void looping_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008A66A0 */ static void looping_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2926,10 +2926,10 @@ static void looping_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008A66B0 */ static void looping_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3132,10 +3132,10 @@ static void looping_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008A66C0 */ static void looping_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3338,10 +3338,10 @@ static void looping_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008A66D0 */ static void looping_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3357,10 +3357,10 @@ static void looping_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008A66E0 */ static void looping_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3376,10 +3376,10 @@ static void looping_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008A66F0 */ static void looping_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3692,10 +3692,10 @@ static void looping_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008A6700 */ static void looping_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4008,10 +4008,10 @@ static void looping_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008A6710 */ static void looping_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4027,10 +4027,10 @@ static void looping_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008A6720 */ static void looping_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4046,10 +4046,10 @@ static void looping_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008A6750 */ static void looping_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4087,10 +4087,10 @@ static void looping_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008A6730 */ static void looping_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4128,10 +4128,10 @@ static void looping_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008A6740 */ static void looping_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement); @@ -4140,10 +4140,10 @@ static void looping_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008A6760 */ static void looping_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -4152,10 +4152,10 @@ static void looping_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008A6770 */ static void looping_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4188,10 +4188,10 @@ static void looping_rc_track_brakes( /** rct2: 0x008A6A40 */ static void looping_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4233,10 +4233,10 @@ static void looping_rc_track_25_deg_up_left_banked( /** rct2: 0x008A6A50 */ static void looping_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4278,10 +4278,10 @@ static void looping_rc_track_25_deg_up_right_banked( /** rct2: 0x008A6780 */ static void looping_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4328,10 +4328,10 @@ static void looping_rc_track_on_ride_photo( /** rct2: 0x008A6A60 */ static void looping_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4340,10 +4340,10 @@ static void looping_rc_track_25_deg_down_left_banked( /** rct2: 0x008A6A70 */ static void looping_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4352,10 +4352,10 @@ static void looping_rc_track_25_deg_down_right_banked( /** rct2: 0x008A6860 */ static void looping_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4481,10 +4481,10 @@ static void looping_rc_track_left_eighth_to_diag( /** rct2: 0x008A6870 */ static void looping_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4610,10 +4610,10 @@ static void looping_rc_track_right_eighth_to_diag( /** rct2: 0x008A6880 */ static void looping_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4623,10 +4623,10 @@ static void looping_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008A6890 */ static void looping_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4636,10 +4636,10 @@ static void looping_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008A68A0 */ static void looping_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4765,10 +4765,10 @@ static void looping_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008A68B0 */ static void looping_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4894,10 +4894,10 @@ static void looping_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008A68C0 */ static void looping_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4907,10 +4907,10 @@ static void looping_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008A68D0 */ static void looping_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4920,10 +4920,10 @@ static void looping_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008A6790 */ static void looping_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5062,10 +5062,10 @@ static void looping_rc_track_diag_flat( /** rct2: 0x008A67C0 */ static void looping_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5204,10 +5204,10 @@ static void looping_rc_track_diag_25_deg_up( /** rct2: 0x008A67F0 */ static void looping_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5346,10 +5346,10 @@ static void looping_rc_track_diag_60_deg_up( /** rct2: 0x008A67A0 */ static void looping_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5488,10 +5488,10 @@ static void looping_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008A67D0 */ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5630,10 +5630,10 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008A67E0 */ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5772,10 +5772,10 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008A67B0 */ static void looping_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5914,10 +5914,10 @@ static void looping_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008A6820 */ static void looping_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6056,10 +6056,10 @@ static void looping_rc_track_diag_25_deg_down( /** rct2: 0x008A6850 */ static void looping_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6198,10 +6198,10 @@ static void looping_rc_track_diag_60_deg_down( /** rct2: 0x008A6800 */ static void looping_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6338,10 +6338,10 @@ static void looping_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008A6830 */ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6480,10 +6480,10 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008A6840 */ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6622,10 +6622,10 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008A6810 */ static void looping_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6764,10 +6764,10 @@ static void looping_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008A6900 */ static void looping_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6838,10 +6838,10 @@ static void looping_rc_track_diag_flat_to_left_bank( /** rct2: 0x008A6910 */ static void looping_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6912,10 +6912,10 @@ static void looping_rc_track_diag_flat_to_right_bank( /** rct2: 0x008A6920 */ static void looping_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6986,10 +6986,10 @@ static void looping_rc_track_diag_left_bank_to_flat( /** rct2: 0x008A6930 */ static void looping_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7060,10 +7060,10 @@ static void looping_rc_track_diag_right_bank_to_flat( /** rct2: 0x008A6960 */ static void looping_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7134,10 +7134,10 @@ static void looping_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008A6970 */ static void looping_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7208,10 +7208,10 @@ static void looping_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008A6940 */ static void looping_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7282,10 +7282,10 @@ static void looping_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008A6950 */ static void looping_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7356,10 +7356,10 @@ static void looping_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008A6980 */ static void looping_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7428,10 +7428,10 @@ static void looping_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008A6990 */ static void looping_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7500,10 +7500,10 @@ static void looping_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008A69A0 */ static void looping_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7574,10 +7574,10 @@ static void looping_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008A69B0 */ static void looping_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7648,10 +7648,10 @@ static void looping_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008A68E0 */ static void looping_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7720,10 +7720,10 @@ static void looping_rc_track_diag_left_bank( /** rct2: 0x008A68F0 */ static void looping_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7792,10 +7792,10 @@ static void looping_rc_track_diag_right_bank( /** rct2: 0x008A6C00 */ static void looping_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -7828,10 +7828,10 @@ static void looping_rc_track_block_brakes( /** rct2: 0x008A6BC0 */ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7906,10 +7906,10 @@ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008A6BD0 */ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7987,10 +7987,10 @@ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008A6BE0 */ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -8001,10 +8001,10 @@ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008A6BF0 */ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -8015,10 +8015,10 @@ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008A6B80 */ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8172,10 +8172,10 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008A6B90 */ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8329,10 +8329,10 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008A6BA0 */ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -8343,10 +8343,10 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008A6BB0 */ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -8357,10 +8357,10 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008A6A80 */ static void looping_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8404,10 +8404,10 @@ static void looping_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008A6A90 */ static void looping_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8451,10 +8451,10 @@ static void looping_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008A6AA0 */ static void looping_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8498,10 +8498,10 @@ static void looping_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008A6AB0 */ static void looping_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8545,10 +8545,10 @@ static void looping_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008A6AC0 */ static void looping_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8558,10 +8558,10 @@ static void looping_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008A6AD0 */ static void looping_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8571,10 +8571,10 @@ static void looping_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008A6AE0 */ static void looping_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8584,10 +8584,10 @@ static void looping_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008A6AF0 */ static void looping_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8597,10 +8597,10 @@ static void looping_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008A6B00 */ static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8642,10 +8642,10 @@ static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008A6B10 */ static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8687,10 +8687,10 @@ static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008A6B40 */ static void looping_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8732,10 +8732,10 @@ static void looping_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008A6B50 */ static void looping_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8777,10 +8777,10 @@ static void looping_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008A6B60 */ static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8790,10 +8790,10 @@ static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008A6B70 */ static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8803,10 +8803,10 @@ static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x008A6B20 */ static void looping_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8816,10 +8816,10 @@ static void looping_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008A6B30 */ static void looping_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8829,10 +8829,10 @@ static void looping_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x008A69C0 */ static void looping_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8876,10 +8876,10 @@ static void looping_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008A69D0 */ static void looping_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8923,10 +8923,10 @@ static void looping_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008A69E0 */ static void looping_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8970,10 +8970,10 @@ static void looping_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008A69F0 */ static void looping_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -9017,10 +9017,10 @@ static void looping_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008A6A00 */ static void looping_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -9029,10 +9029,10 @@ static void looping_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008A6A10 */ static void looping_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -9041,10 +9041,10 @@ static void looping_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008A6A20 */ static void looping_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -9053,10 +9053,10 @@ static void looping_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008A6A30 */ static void looping_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { looping_rc_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -9064,10 +9064,10 @@ static void looping_rc_track_right_banked_25_deg_down_to_flat( static void looping_rc_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!is_csg_loaded()) @@ -9097,7 +9097,7 @@ static void looping_rc_track_booster( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/MineRide.cpp b/src/openrct2/ride/coaster/MineRide.cpp index 511e4e83a4..f5a0a0db6c 100644 --- a/src/openrct2/ride/coaster/MineRide.cpp +++ b/src/openrct2/ride/coaster/MineRide.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008B08D0 */ static void mine_ride_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -58,13 +58,13 @@ static void mine_ride_track_flat( static void mine_ride_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 19338, SPR_STATION_BASE_A_SW_NE }, { 19339, SPR_STATION_BASE_A_NW_SE }, { 19338, SPR_STATION_BASE_A_SW_NE }, @@ -85,10 +85,10 @@ static void mine_ride_track_station( /** rct2: 0x008B08E0 */ static void mine_ride_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -144,10 +144,10 @@ static void mine_ride_track_25_deg_up( /** rct2: 0x008B08F0 */ static void mine_ride_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -203,10 +203,10 @@ static void mine_ride_track_flat_to_25_deg_up( /** rct2: 0x008B0900 */ static void mine_ride_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -262,10 +262,10 @@ static void mine_ride_track_25_deg_up_to_flat( /** rct2: 0x008B0910 */ static void mine_ride_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -274,10 +274,10 @@ static void mine_ride_track_25_deg_down( /** rct2: 0x008B0920 */ static void mine_ride_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -286,10 +286,10 @@ static void mine_ride_track_flat_to_25_deg_down( /** rct2: 0x008B0930 */ static void mine_ride_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -298,10 +298,10 @@ static void mine_ride_track_25_deg_down_to_flat( /** rct2: 0x008B0940 */ static void mine_ride_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -467,10 +467,10 @@ static void mine_ride_track_left_quarter_turn_5( /** rct2: 0x008B0950 */ static void mine_ride_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -480,10 +480,10 @@ static void mine_ride_track_right_quarter_turn_5( /** rct2: 0x008B0960 */ static void mine_ride_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -536,10 +536,10 @@ static void mine_ride_track_flat_to_left_bank( /** rct2: 0x008B0970 */ static void mine_ride_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -592,10 +592,10 @@ static void mine_ride_track_flat_to_right_bank( /** rct2: 0x008B0980 */ static void mine_ride_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -648,10 +648,10 @@ static void mine_ride_track_left_bank_to_flat( /** rct2: 0x008B0990 */ static void mine_ride_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -704,10 +704,10 @@ static void mine_ride_track_right_bank_to_flat( /** rct2: 0x008B09A0 */ static void mine_ride_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -877,10 +877,10 @@ static void mine_ride_track_banked_left_quarter_turn_5( /** rct2: 0x008B09B0 */ static void mine_ride_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -890,10 +890,10 @@ static void mine_ride_track_banked_right_quarter_turn_5( /** rct2: 0x008B09C0 */ static void mine_ride_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -953,10 +953,10 @@ static void mine_ride_track_left_bank_to_25_deg_up( /** rct2: 0x008B09D0 */ static void mine_ride_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1016,10 +1016,10 @@ static void mine_ride_track_right_bank_to_25_deg_up( /** rct2: 0x008B09E0 */ static void mine_ride_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1079,10 +1079,10 @@ static void mine_ride_track_25_deg_up_to_left_bank( /** rct2: 0x008B09F0 */ static void mine_ride_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1142,10 +1142,10 @@ static void mine_ride_track_25_deg_up_to_right_bank( /** rct2: 0x008B0A00 */ static void mine_ride_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1154,10 +1154,10 @@ static void mine_ride_track_left_bank_to_25_deg_down( /** rct2: 0x008B0A10 */ static void mine_ride_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1166,10 +1166,10 @@ static void mine_ride_track_right_bank_to_25_deg_down( /** rct2: 0x008B0A20 */ static void mine_ride_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1178,10 +1178,10 @@ static void mine_ride_track_25_deg_down_to_left_bank( /** rct2: 0x008B0A30 */ static void mine_ride_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1190,10 +1190,10 @@ static void mine_ride_track_25_deg_down_to_right_bank( /** rct2: 0x008B0A40 */ static void mine_ride_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1242,10 +1242,10 @@ static void mine_ride_track_left_bank( /** rct2: 0x008B0A50 */ static void mine_ride_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_ride_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1254,10 +1254,10 @@ static void mine_ride_track_right_bank( /** rct2: 0x008B0A60 */ static void mine_ride_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1395,10 +1395,10 @@ static void mine_ride_track_s_bend_left( /** rct2: 0x008B0A70 */ static void mine_ride_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1536,10 +1536,10 @@ static void mine_ride_track_s_bend_right( /** rct2: 0x008B0AB0 */ static void mine_ride_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1650,10 +1650,10 @@ static void mine_ride_track_left_quarter_turn_3( /** rct2: 0x008B0AC0 */ static void mine_ride_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1663,10 +1663,10 @@ static void mine_ride_track_right_quarter_turn_3( /** rct2: 0x008B0AD0 */ static void mine_ride_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1781,10 +1781,10 @@ static void mine_ride_track_left_quarter_turn_3_bank( /** rct2: 0x008B0AE0 */ static void mine_ride_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1794,10 +1794,10 @@ static void mine_ride_track_right_quarter_turn_3_bank( /** rct2: 0x008B0AF0 */ static void mine_ride_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2020,10 +2020,10 @@ static void mine_ride_track_left_half_banked_helix_up_small( /** rct2: 0x008B0B00 */ static void mine_ride_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2246,10 +2246,10 @@ static void mine_ride_track_right_half_banked_helix_up_small( /** rct2: 0x008B0B10 */ static void mine_ride_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -2265,10 +2265,10 @@ static void mine_ride_track_left_half_banked_helix_down_small( /** rct2: 0x008B0B20 */ static void mine_ride_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -2283,10 +2283,10 @@ static void mine_ride_track_right_half_banked_helix_down_small( /** rct2: 0x008B0B30 */ static void mine_ride_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2619,10 +2619,10 @@ static void mine_ride_track_left_half_banked_helix_up_large( /** rct2: 0x008B0B40 */ static void mine_ride_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2955,10 +2955,10 @@ static void mine_ride_track_right_half_banked_helix_up_large( /** rct2: 0x008B0B50 */ static void mine_ride_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -2974,10 +2974,10 @@ static void mine_ride_track_left_half_banked_helix_down_large( /** rct2: 0x008B0B60 */ static void mine_ride_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -2992,10 +2992,10 @@ static void mine_ride_track_right_half_banked_helix_down_large( /** rct2: 0x008B0B70 */ static void mine_ride_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3038,10 +3038,10 @@ static void mine_ride_track_on_ride_photo( /** rct2: 0x008B0B90 */ static void mine_ride_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3174,10 +3174,10 @@ static void mine_ride_track_left_eighth_to_diag( /** rct2: 0x008B0BA0 */ static void mine_ride_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3310,10 +3310,10 @@ static void mine_ride_track_right_eighth_to_diag( /** rct2: 0x008B0BB0 */ static void mine_ride_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -3323,10 +3323,10 @@ static void mine_ride_track_left_eighth_to_orthogonal( /** rct2: 0x008B0BC0 */ static void mine_ride_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -3336,10 +3336,10 @@ static void mine_ride_track_right_eighth_to_orthogonal( /** rct2: 0x008B0BD0 */ static void mine_ride_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3472,10 +3472,10 @@ static void mine_ride_track_left_eighth_bank_to_diag( /** rct2: 0x008B0BE0 */ static void mine_ride_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3608,10 +3608,10 @@ static void mine_ride_track_right_eighth_bank_to_diag( /** rct2: 0x008B0BF0 */ static void mine_ride_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -3621,10 +3621,10 @@ static void mine_ride_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008B0C00 */ static void mine_ride_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -3634,10 +3634,10 @@ static void mine_ride_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008B0B80 */ static void mine_ride_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3708,10 +3708,10 @@ static void mine_ride_track_diag_flat( /** rct2: 0x008B0C30 */ static void mine_ride_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3782,10 +3782,10 @@ static void mine_ride_track_diag_25_deg_up( /** rct2: 0x008B0C10 */ static void mine_ride_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3856,10 +3856,10 @@ static void mine_ride_track_diag_flat_to_25_deg_up( /** rct2: 0x008B0C20 */ static void mine_ride_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3930,10 +3930,10 @@ static void mine_ride_track_diag_25_deg_up_to_flat( /** rct2: 0x008B0C60 */ static void mine_ride_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4004,10 +4004,10 @@ static void mine_ride_track_diag_25_deg_down( /** rct2: 0x008B0C40 */ static void mine_ride_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4076,10 +4076,10 @@ static void mine_ride_track_diag_flat_to_25_deg_down( /** rct2: 0x008B0C50 */ static void mine_ride_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4150,10 +4150,10 @@ static void mine_ride_track_diag_25_deg_down_to_flat( /** rct2: 0x008B0C90 */ static void mine_ride_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4226,10 +4226,10 @@ static void mine_ride_track_diag_flat_to_left_bank( /** rct2: 0x008B0CA0 */ static void mine_ride_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4302,10 +4302,10 @@ static void mine_ride_track_diag_flat_to_right_bank( /** rct2: 0x008B0CB0 */ static void mine_ride_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4378,10 +4378,10 @@ static void mine_ride_track_diag_left_bank_to_flat( /** rct2: 0x008B0CC0 */ static void mine_ride_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4454,10 +4454,10 @@ static void mine_ride_track_diag_right_bank_to_flat( /** rct2: 0x008B0CF0 */ static void mine_ride_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4530,10 +4530,10 @@ static void mine_ride_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008B0D00 */ static void mine_ride_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4606,10 +4606,10 @@ static void mine_ride_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008B0CD0 */ static void mine_ride_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4682,10 +4682,10 @@ static void mine_ride_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008B0CE0 */ static void mine_ride_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4758,10 +4758,10 @@ static void mine_ride_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008B0D10 */ static void mine_ride_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4832,10 +4832,10 @@ static void mine_ride_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008B0D20 */ static void mine_ride_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4906,10 +4906,10 @@ static void mine_ride_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008B0D30 */ static void mine_ride_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4982,10 +4982,10 @@ static void mine_ride_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008B0D40 */ static void mine_ride_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5058,10 +5058,10 @@ static void mine_ride_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008B0C70 */ static void mine_ride_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5132,10 +5132,10 @@ static void mine_ride_track_diag_left_bank( /** rct2: 0x008B0C80 */ static void mine_ride_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5203,7 +5203,7 @@ static void mine_ride_track_diag_right_bank( } } -TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/MineTrainCoaster.cpp b/src/openrct2/ride/coaster/MineTrainCoaster.cpp index 5f1e29f8f2..ed803cd0e5 100644 --- a/src/openrct2/ride/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/ride/coaster/MineTrainCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x0071BFA4 */ static void mine_train_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -80,13 +80,13 @@ static void mine_train_rc_track_flat( /** rct2: 0x0071C154, 0x0071C164, 0x0071C174 */ static void mine_train_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 20064, 20060, SPR_STATION_BASE_B_SW_NE }, { 20065, 20061, SPR_STATION_BASE_B_NW_SE }, { 20064, 20060, SPR_STATION_BASE_B_SW_NE }, @@ -115,10 +115,10 @@ static void mine_train_rc_track_station( /** rct2: 0x0071BFB4 */ static void mine_train_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -188,10 +188,10 @@ static void mine_train_rc_track_25_deg_up( /** rct2: 0x0071BFC4 */ static void mine_train_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -232,10 +232,10 @@ static void mine_train_rc_track_60_deg_up( /** rct2: 0x0071BFD4 */ static void mine_train_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -305,10 +305,10 @@ static void mine_train_rc_track_flat_to_25_deg_up( /** rct2: 0x0071BFE4 */ static void mine_train_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -353,10 +353,10 @@ static void mine_train_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x0071BFF4 */ static void mine_train_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -401,10 +401,10 @@ static void mine_train_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x0071C004 */ static void mine_train_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -474,10 +474,10 @@ static void mine_train_rc_track_25_deg_up_to_flat( /** rct2: 0x0071C014 */ static void mine_train_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -486,10 +486,10 @@ static void mine_train_rc_track_25_deg_down( /** rct2: 0x0071C024 */ static void mine_train_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -498,10 +498,10 @@ static void mine_train_rc_track_60_deg_down( /** rct2: 0x0071C034 */ static void mine_train_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -510,10 +510,10 @@ static void mine_train_rc_track_flat_to_25_deg_down( /** rct2: 0x0071C044 */ static void mine_train_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -522,10 +522,10 @@ static void mine_train_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x0071C054 */ static void mine_train_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -534,10 +534,10 @@ static void mine_train_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x0071C064 */ static void mine_train_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -546,10 +546,10 @@ static void mine_train_rc_track_25_deg_down_to_flat( /** rct2: 0x0071C0B4 */ static void mine_train_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -723,10 +723,10 @@ static void mine_train_rc_track_left_quarter_turn_5( /** rct2: 0x0071C0C4 */ static void mine_train_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -736,10 +736,10 @@ static void mine_train_rc_track_right_quarter_turn_5( /** rct2: 0x0071C074 */ static void mine_train_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -777,10 +777,10 @@ static void mine_train_rc_track_flat_to_left_bank( /** rct2: 0x0071C084 */ static void mine_train_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -818,10 +818,10 @@ static void mine_train_rc_track_flat_to_right_bank( /** rct2: 0x0071C094 */ static void mine_train_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -859,10 +859,10 @@ static void mine_train_rc_track_left_bank_to_flat( /** rct2: 0x0071C0A4 */ static void mine_train_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -900,10 +900,10 @@ static void mine_train_rc_track_right_bank_to_flat( /** rct2: 0x0071C0D4 */ static void mine_train_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1083,10 +1083,10 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( /** rct2: 0x0071C0E4 */ static void mine_train_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1096,10 +1096,10 @@ static void mine_train_rc_track_banked_right_quarter_turn_5( /** rct2: 0x0071C204 */ static void mine_train_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1144,10 +1144,10 @@ static void mine_train_rc_track_left_bank_to_25_deg_up( /** rct2: 0x0071C214 */ static void mine_train_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1192,10 +1192,10 @@ static void mine_train_rc_track_right_bank_to_25_deg_up( /** rct2: 0x0071C224 */ static void mine_train_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1240,10 +1240,10 @@ static void mine_train_rc_track_25_deg_up_to_left_bank( /** rct2: 0x0071C234 */ static void mine_train_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1288,10 +1288,10 @@ static void mine_train_rc_track_25_deg_up_to_right_bank( /** rct2: 0x0071C244 */ static void mine_train_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1300,10 +1300,10 @@ static void mine_train_rc_track_left_bank_to_25_deg_down( /** rct2: 0x0071C254 */ static void mine_train_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1312,10 +1312,10 @@ static void mine_train_rc_track_right_bank_to_25_deg_down( /** rct2: 0x0071C264 */ static void mine_train_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1324,10 +1324,10 @@ static void mine_train_rc_track_25_deg_down_to_left_bank( /** rct2: 0x0071C274 */ static void mine_train_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1336,10 +1336,10 @@ static void mine_train_rc_track_25_deg_down_to_right_bank( /** rct2: 0x0071C304 */ static void mine_train_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1373,10 +1373,10 @@ static void mine_train_rc_track_left_bank( /** rct2: 0x0071C314 */ static void mine_train_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mine_train_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1385,10 +1385,10 @@ static void mine_train_rc_track_right_bank( /** rct2: 0x0071C0F4 */ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1567,10 +1567,10 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x0071C104 */ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1749,10 +1749,10 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x0071C114 */ static void mine_train_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1763,10 +1763,10 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x0071C124 */ static void mine_train_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1777,10 +1777,10 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x0071C134 */ static void mine_train_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1914,10 +1914,10 @@ static void mine_train_rc_track_s_bend_left( /** rct2: 0x0071C144 */ static void mine_train_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2051,10 +2051,10 @@ static void mine_train_rc_track_s_bend_right( /** rct2: 0x0071C184 */ static void mine_train_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2173,10 +2173,10 @@ static void mine_train_rc_track_left_quarter_turn_3( /** rct2: 0x0071C194 */ static void mine_train_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2186,10 +2186,10 @@ static void mine_train_rc_track_right_quarter_turn_3( /** rct2: 0x0071C1A4 */ static void mine_train_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2313,10 +2313,10 @@ static void mine_train_rc_track_left_quarter_turn_3_bank( /** rct2: 0x0071C1B4 */ static void mine_train_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2326,10 +2326,10 @@ static void mine_train_rc_track_right_quarter_turn_3_bank( /** rct2: 0x0071C1C4 */ static void mine_train_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2422,10 +2422,10 @@ static void mine_train_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x0071C1D4 */ static void mine_train_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2518,10 +2518,10 @@ static void mine_train_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x0071C1E4 */ static void mine_train_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2532,10 +2532,10 @@ static void mine_train_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x0071C1F4 */ static void mine_train_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2546,10 +2546,10 @@ static void mine_train_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x0071C284 */ static void mine_train_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2802,10 +2802,10 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( /** rct2: 0x0071C294 */ static void mine_train_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3058,10 +3058,10 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( /** rct2: 0x0071C2A4 */ static void mine_train_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3077,10 +3077,10 @@ static void mine_train_rc_track_left_half_banked_helix_down_small( /** rct2: 0x0071C2B4 */ static void mine_train_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3096,10 +3096,10 @@ static void mine_train_rc_track_right_half_banked_helix_down_small( /** rct2: 0x0071C2C4 */ static void mine_train_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3476,10 +3476,10 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( /** rct2: 0x0071C2D4 */ static void mine_train_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3848,10 +3848,10 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( /** rct2: 0x0071C2E4 */ static void mine_train_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3867,10 +3867,10 @@ static void mine_train_rc_track_left_half_banked_helix_down_large( /** rct2: 0x0071C2F4 */ static void mine_train_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3886,10 +3886,10 @@ static void mine_train_rc_track_right_half_banked_helix_down_large( /** rct2: 0x0071C324 */ static void mine_train_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3915,10 +3915,10 @@ static void mine_train_rc_track_brakes( /** rct2: 0x0071C334 */ static void mine_train_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3953,10 +3953,10 @@ static void mine_train_rc_track_on_ride_photo( /** rct2: 0x0071C354 */ static void mine_train_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4094,10 +4094,10 @@ static void mine_train_rc_track_left_eighth_to_diag( /** rct2: 0x0071C364 */ static void mine_train_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4235,10 +4235,10 @@ static void mine_train_rc_track_right_eighth_to_diag( /** rct2: 0x0071C374 */ static void mine_train_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4248,10 +4248,10 @@ static void mine_train_rc_track_left_eighth_to_orthogonal( /** rct2: 0x0071C384 */ static void mine_train_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4261,10 +4261,10 @@ static void mine_train_rc_track_right_eighth_to_orthogonal( /** rct2: 0x0071C394 */ static void mine_train_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4402,10 +4402,10 @@ static void mine_train_rc_track_left_eighth_bank_to_diag( /** rct2: 0x0071C3A4 */ static void mine_train_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4543,10 +4543,10 @@ static void mine_train_rc_track_right_eighth_bank_to_diag( /** rct2: 0x0071C3B4 */ static void mine_train_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4556,10 +4556,10 @@ static void mine_train_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x0071C3C4 */ static void mine_train_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4569,10 +4569,10 @@ static void mine_train_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x0071C344 */ static void mine_train_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4719,10 +4719,10 @@ static void mine_train_rc_track_diag_flat( /** rct2: 0x0071C414 */ static void mine_train_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4869,10 +4869,10 @@ static void mine_train_rc_track_diag_25_deg_up( /** rct2: 0x0071C474 */ static void mine_train_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4947,10 +4947,10 @@ static void mine_train_rc_track_diag_60_deg_up( /** rct2: 0x0071C3F4 */ static void mine_train_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5097,10 +5097,10 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x0071C454 */ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5175,10 +5175,10 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x0071C464 */ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5253,10 +5253,10 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x0071C404 */ static void mine_train_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5403,10 +5403,10 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x0071C444 */ static void mine_train_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5553,10 +5553,10 @@ static void mine_train_rc_track_diag_25_deg_down( /** rct2: 0x0071C4A4 */ static void mine_train_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5631,10 +5631,10 @@ static void mine_train_rc_track_diag_60_deg_down( /** rct2: 0x0071C424 */ static void mine_train_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5779,10 +5779,10 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x0071C484 */ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5857,10 +5857,10 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x0071C494 */ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5935,10 +5935,10 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x0071C434 */ static void mine_train_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6085,10 +6085,10 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x0071C4D4 */ static void mine_train_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6165,10 +6165,10 @@ static void mine_train_rc_track_diag_flat_to_left_bank( /** rct2: 0x0071C4B4 */ static void mine_train_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6245,10 +6245,10 @@ static void mine_train_rc_track_diag_flat_to_right_bank( /** rct2: 0x0071C4C4 */ static void mine_train_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6325,10 +6325,10 @@ static void mine_train_rc_track_diag_left_bank_to_flat( /** rct2: 0x0071C4E4 */ static void mine_train_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6405,10 +6405,10 @@ static void mine_train_rc_track_diag_right_bank_to_flat( /** rct2: 0x0071C514 */ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6485,10 +6485,10 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x0071C524 */ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6565,10 +6565,10 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x0071C4F4 */ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6645,10 +6645,10 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x0071C504 */ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6725,10 +6725,10 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x0071C534 */ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6800,10 +6800,10 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x0071C544 */ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6875,10 +6875,10 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x0071C554 */ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6955,10 +6955,10 @@ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x0071C564 */ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7035,10 +7035,10 @@ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x0071C3D4 */ static void mine_train_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7117,10 +7117,10 @@ static void mine_train_rc_track_diag_left_bank( /** rct2: 0x0071C3E4 */ static void mine_train_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7199,10 +7199,10 @@ static void mine_train_rc_track_diag_right_bank( /** rct2: 0x0071C574 */ static void mine_train_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -7225,7 +7225,7 @@ static void mine_train_rc_track_block_brakes( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp index f02e11def6..ef9dc6a6ca 100644 --- a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008A4ABC */ static void mini_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -104,13 +104,13 @@ static void mini_rc_track_flat( static void mini_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 18746, 18742, SPR_STATION_BASE_A_SW_NE }, { 18747, 18743, SPR_STATION_BASE_A_NW_SE }, { 18746, 18742, SPR_STATION_BASE_A_SW_NE }, @@ -139,10 +139,10 @@ static void mini_rc_track_station( /** rct2: 0x008A4ACC */ static void mini_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -245,10 +245,10 @@ static void mini_rc_track_25_deg_up( /** rct2: 0x008A4ADC */ static void mini_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -304,10 +304,10 @@ static void mini_rc_track_60_deg_up( /** rct2: 0x008A4AEC */ static void mini_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -410,10 +410,10 @@ static void mini_rc_track_flat_to_25_deg_up( /** rct2: 0x008A4AFC */ static void mini_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -473,10 +473,10 @@ static void mini_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008A4B0C */ static void mini_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -536,10 +536,10 @@ static void mini_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008A4B1C */ static void mini_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -642,10 +642,10 @@ static void mini_rc_track_25_deg_up_to_flat( /** rct2: 0x008A4B2C */ static void mini_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -654,10 +654,10 @@ static void mini_rc_track_25_deg_down( /** rct2: 0x008A4B3C */ static void mini_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -666,10 +666,10 @@ static void mini_rc_track_60_deg_down( /** rct2: 0x008A4B4C */ static void mini_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -678,10 +678,10 @@ static void mini_rc_track_flat_to_25_deg_down( /** rct2: 0x008A4B5C */ static void mini_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -690,10 +690,10 @@ static void mini_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A4B6C */ static void mini_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -702,10 +702,10 @@ static void mini_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A4B7C */ static void mini_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -714,10 +714,10 @@ static void mini_rc_track_25_deg_down_to_flat( /** rct2: 0x008A4B8C */ static void mini_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -883,10 +883,10 @@ static void mini_rc_track_left_quarter_turn_5( /** rct2: 0x008A4B9C */ static void mini_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -896,10 +896,10 @@ static void mini_rc_track_right_quarter_turn_5( /** rct2: 0x008A4BAC */ static void mini_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -952,10 +952,10 @@ static void mini_rc_track_flat_to_left_bank( /** rct2: 0x008A4BBC */ static void mini_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1008,10 +1008,10 @@ static void mini_rc_track_flat_to_right_bank( /** rct2: 0x008A4BCC */ static void mini_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1064,10 +1064,10 @@ static void mini_rc_track_left_bank_to_flat( /** rct2: 0x008A4BDC */ static void mini_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1120,10 +1120,10 @@ static void mini_rc_track_right_bank_to_flat( /** rct2: 0x008A4BEC */ static void mini_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1293,10 +1293,10 @@ static void mini_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008A4BFC */ static void mini_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1306,10 +1306,10 @@ static void mini_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008A4C0C */ static void mini_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1369,10 +1369,10 @@ static void mini_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008A4C1C */ static void mini_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1432,10 +1432,10 @@ static void mini_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008A4C2C */ static void mini_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1495,10 +1495,10 @@ static void mini_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008A4C3C */ static void mini_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1558,10 +1558,10 @@ static void mini_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008A4C4C */ static void mini_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1570,10 +1570,10 @@ static void mini_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008A4C5C */ static void mini_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1582,10 +1582,10 @@ static void mini_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008A4C6C */ static void mini_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1594,10 +1594,10 @@ static void mini_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008A4C7C */ static void mini_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1606,10 +1606,10 @@ static void mini_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008A4C8C */ static void mini_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1658,10 +1658,10 @@ static void mini_rc_track_left_bank( /** rct2: 0x008A4C9C */ static void mini_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1670,10 +1670,10 @@ static void mini_rc_track_right_bank( /** rct2: 0x008A4CAC */ static void mini_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1834,10 +1834,10 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008A4CBC */ static void mini_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1998,10 +1998,10 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008A4CCC */ static void mini_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -2011,10 +2011,10 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008A4CDC */ static void mini_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -2024,10 +2024,10 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008A4CEC */ static void mini_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2165,10 +2165,10 @@ static void mini_rc_track_s_bend_left( /** rct2: 0x008A4CFC */ static void mini_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2306,10 +2306,10 @@ static void mini_rc_track_s_bend_right( /** rct2: 0x008A4D3C */ static void mini_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2420,10 +2420,10 @@ static void mini_rc_track_left_quarter_turn_3( /** rct2: 0x008A4D4C */ static void mini_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2433,10 +2433,10 @@ static void mini_rc_track_right_quarter_turn_3( /** rct2: 0x008A4D5C */ static void mini_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2551,10 +2551,10 @@ static void mini_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008A4D6C */ static void mini_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2564,10 +2564,10 @@ static void mini_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008A4D7C */ static void mini_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2649,10 +2649,10 @@ static void mini_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008A4D8C */ static void mini_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2734,10 +2734,10 @@ static void mini_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008A4D9C */ static void mini_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2747,10 +2747,10 @@ static void mini_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008A4DAC */ static void mini_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2760,10 +2760,10 @@ static void mini_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008A4DBC */ static void mini_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2986,10 +2986,10 @@ static void mini_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008A4DCC */ static void mini_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3212,10 +3212,10 @@ static void mini_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008A4DDC */ static void mini_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3230,10 +3230,10 @@ static void mini_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008A4DEC */ static void mini_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3248,10 +3248,10 @@ static void mini_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008A4DFC */ static void mini_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3584,10 +3584,10 @@ static void mini_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008A4E0C */ static void mini_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3920,10 +3920,10 @@ static void mini_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008A4E1C */ static void mini_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3938,10 +3938,10 @@ static void mini_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008A4E2C */ static void mini_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -3956,10 +3956,10 @@ static void mini_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008A4E5C */ static void mini_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -3997,10 +3997,10 @@ static void mini_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008A4E3C */ static void mini_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4038,10 +4038,10 @@ static void mini_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008A4E4C */ static void mini_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement); @@ -4050,10 +4050,10 @@ static void mini_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008A4E6C */ static void mini_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -4062,10 +4062,10 @@ static void mini_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008A4E7C */ static void mini_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4099,10 +4099,10 @@ static void mini_rc_track_brakes( /** rct2: 0x008A50CC */ static void mini_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4158,10 +4158,10 @@ static void mini_rc_track_25_deg_up_left_banked( /** rct2: 0x008A50DC */ static void mini_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4217,10 +4217,10 @@ static void mini_rc_track_25_deg_up_right_banked( /** rct2: 0x008A4E8C */ static void mini_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4263,10 +4263,10 @@ static void mini_rc_track_on_ride_photo( /** rct2: 0x008A50EC */ static void mini_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4275,10 +4275,10 @@ static void mini_rc_track_25_deg_down_left_banked( /** rct2: 0x008A50FC */ static void mini_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4287,10 +4287,10 @@ static void mini_rc_track_25_deg_down_right_banked( /** rct2: 0x008A4EAC */ static void mini_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4423,10 +4423,10 @@ static void mini_rc_track_left_eighth_to_diag( /** rct2: 0x008A4EBC */ static void mini_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4559,10 +4559,10 @@ static void mini_rc_track_right_eighth_to_diag( /** rct2: 0x008A4ECC */ static void mini_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4572,10 +4572,10 @@ static void mini_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008A4EDC */ static void mini_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4585,10 +4585,10 @@ static void mini_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008A4EEC */ static void mini_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4721,10 +4721,10 @@ static void mini_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008A4EFC */ static void mini_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4857,10 +4857,10 @@ static void mini_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008A4F0C */ static void mini_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4870,10 +4870,10 @@ static void mini_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008A4F1C */ static void mini_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4883,10 +4883,10 @@ static void mini_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008A4E9C */ static void mini_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5025,10 +5025,10 @@ static void mini_rc_track_diag_flat( /** rct2: 0x008A4F4C */ static void mini_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5167,10 +5167,10 @@ static void mini_rc_track_diag_25_deg_up( /** rct2: 0x008A4FAC */ static void mini_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5241,10 +5241,10 @@ static void mini_rc_track_diag_60_deg_up( /** rct2: 0x008A4F2C */ static void mini_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5383,10 +5383,10 @@ static void mini_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008A4F8C */ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5457,10 +5457,10 @@ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008A4F9C */ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5531,10 +5531,10 @@ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008A4F3C */ static void mini_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5673,10 +5673,10 @@ static void mini_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008A4F7C */ static void mini_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5815,10 +5815,10 @@ static void mini_rc_track_diag_25_deg_down( /** rct2: 0x008A4FDC */ static void mini_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5889,10 +5889,10 @@ static void mini_rc_track_diag_60_deg_down( /** rct2: 0x008A4F5C */ static void mini_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6029,10 +6029,10 @@ static void mini_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008A4FBC */ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6103,10 +6103,10 @@ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008A4FCC */ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6177,10 +6177,10 @@ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008A4F6C */ static void mini_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6319,10 +6319,10 @@ static void mini_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008A500C */ static void mini_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6395,10 +6395,10 @@ static void mini_rc_track_diag_flat_to_left_bank( /** rct2: 0x008A501C */ static void mini_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6471,10 +6471,10 @@ static void mini_rc_track_diag_flat_to_right_bank( /** rct2: 0x008A502C */ static void mini_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6547,10 +6547,10 @@ static void mini_rc_track_diag_left_bank_to_flat( /** rct2: 0x008A503C */ static void mini_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6623,10 +6623,10 @@ static void mini_rc_track_diag_right_bank_to_flat( /** rct2: 0x008A506C */ static void mini_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6699,10 +6699,10 @@ static void mini_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008A507C */ static void mini_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6775,10 +6775,10 @@ static void mini_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008A504C */ static void mini_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6851,10 +6851,10 @@ static void mini_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008A505C */ static void mini_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6927,10 +6927,10 @@ static void mini_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008A508C */ static void mini_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7001,10 +7001,10 @@ static void mini_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008A509C */ static void mini_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7075,10 +7075,10 @@ static void mini_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008A50AC */ static void mini_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7151,10 +7151,10 @@ static void mini_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008A50BC */ static void mini_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7227,10 +7227,10 @@ static void mini_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008A4FEC */ static void mini_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7301,10 +7301,10 @@ static void mini_rc_track_diag_left_bank( /** rct2: 0x008A4FFC */ static void mini_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7375,10 +7375,10 @@ static void mini_rc_track_diag_right_bank( /** rct2: 0x008A530C */ static void mini_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -7412,10 +7412,10 @@ static void mini_rc_track_block_brakes( /** rct2: 0x008A510C */ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7500,10 +7500,10 @@ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008A511C */ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7588,10 +7588,10 @@ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008A512C */ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -7602,10 +7602,10 @@ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008A513C */ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -7616,10 +7616,10 @@ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008A514C */ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7783,10 +7783,10 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008A515C */ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7950,10 +7950,10 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008A516C */ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -7964,10 +7964,10 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008A517C */ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -7978,10 +7978,10 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008A518C */ static void mini_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8039,10 +8039,10 @@ static void mini_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008A519C */ static void mini_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8100,10 +8100,10 @@ static void mini_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008A51AC */ static void mini_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8161,10 +8161,10 @@ static void mini_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008A51BC */ static void mini_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8222,10 +8222,10 @@ static void mini_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008A51CC */ static void mini_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8235,10 +8235,10 @@ static void mini_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008A51DC */ static void mini_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8248,10 +8248,10 @@ static void mini_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008A51EC */ static void mini_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8261,10 +8261,10 @@ static void mini_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008A51FC */ static void mini_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8274,10 +8274,10 @@ static void mini_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008A520C */ static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8333,10 +8333,10 @@ static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008A521C */ static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8392,10 +8392,10 @@ static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008A524C */ static void mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8451,10 +8451,10 @@ static void mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008A525C */ static void mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8510,10 +8510,10 @@ static void mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008A526C */ static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8523,10 +8523,10 @@ static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008A527C */ static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8536,10 +8536,10 @@ static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x008A522C */ static void mini_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8549,10 +8549,10 @@ static void mini_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008A523C */ static void mini_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -8562,10 +8562,10 @@ static void mini_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x008A528C */ static void mini_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8623,10 +8623,10 @@ static void mini_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008A529C */ static void mini_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8684,10 +8684,10 @@ static void mini_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008A52AC */ static void mini_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8745,10 +8745,10 @@ static void mini_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008A52BC */ static void mini_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8806,10 +8806,10 @@ static void mini_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008A52CC */ static void mini_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8818,10 +8818,10 @@ static void mini_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008A52DC */ static void mini_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8830,10 +8830,10 @@ static void mini_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008A52EC */ static void mini_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8842,10 +8842,10 @@ static void mini_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008A52FC */ static void mini_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_rc_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -8853,10 +8853,10 @@ static void mini_rc_track_right_banked_25_deg_down_to_flat( static void mini_rc_track_left_curved_lift_hill( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8937,10 +8937,10 @@ static void mini_rc_track_left_curved_lift_hill( static void mini_rc_track_right_curved_lift_hill( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9021,17 +9021,17 @@ static void mini_rc_track_right_curved_lift_hill( static void mini_rc_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { // These offsets could be moved to the g2.dat file when that supports offsets. - sint8 ne_sw_offsetX = 7; - sint8 ne_sw_offsetY = -15; - sint8 nw_se_offsetX = -15; - sint8 nw_se_offsetY = 7; + int8_t ne_sw_offsetX = 7; + int8_t ne_sw_offsetY = -15; + int8_t nw_se_offsetX = -15; + int8_t nw_se_offsetY = 7; switch (direction) { @@ -9061,7 +9061,7 @@ static void mini_rc_track_booster( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp index 258debeb5d..a118e4c1cc 100644 --- a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008AFE9C */ static void mini_suspended_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -83,13 +83,13 @@ static void mini_suspended_rc_track_flat( /** rct2: 0x008AFF4C, 0x008AFF5C, 0x008AFF6C */ static void mini_suspended_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 28433, SPR_STATION_INVERTED_BAR_E_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 28434, SPR_STATION_INVERTED_BAR_E_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 28433, SPR_STATION_INVERTED_BAR_E_SW_NE }, @@ -112,10 +112,10 @@ static void mini_suspended_rc_track_station( /** rct2: 0x008AFEAC */ static void mini_suspended_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -202,10 +202,10 @@ static void mini_suspended_rc_track_25_deg_up( /** rct2: 0x008AFEBC */ static void mini_suspended_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -292,10 +292,10 @@ static void mini_suspended_rc_track_flat_to_25_deg_up( /** rct2: 0x008AFECC */ static void mini_suspended_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -382,10 +382,10 @@ static void mini_suspended_rc_track_25_deg_up_to_flat( /** rct2: 0x008AFEDC */ static void mini_suspended_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_suspended_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -394,10 +394,10 @@ static void mini_suspended_rc_track_25_deg_down( /** rct2: 0x008AFEEC */ static void mini_suspended_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_suspended_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -406,10 +406,10 @@ static void mini_suspended_rc_track_flat_to_25_deg_down( /** rct2: 0x008AFEFC */ static void mini_suspended_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { mini_suspended_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -418,10 +418,10 @@ static void mini_suspended_rc_track_25_deg_down_to_flat( /** rct2: 0x008AFF0C */ static void mini_suspended_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -587,10 +587,10 @@ static void mini_suspended_rc_track_left_quarter_turn_5( /** rct2: 0x008AFF1C */ static void mini_suspended_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -600,10 +600,10 @@ static void mini_suspended_rc_track_right_quarter_turn_5( /** rct2: 0x008AFF2C */ static void mini_suspended_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -767,10 +767,10 @@ static void mini_suspended_rc_track_s_bend_left( /** rct2: 0x008AFF3C */ static void mini_suspended_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -934,10 +934,10 @@ static void mini_suspended_rc_track_s_bend_right( /** rct2: 0x008AFF7C */ static void mini_suspended_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1056,10 +1056,10 @@ static void mini_suspended_rc_track_left_quarter_turn_3( /** rct2: 0x008AFF8C */ static void mini_suspended_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1069,10 +1069,10 @@ static void mini_suspended_rc_track_right_quarter_turn_3( /** rct2: 0x008AFFAC */ static void mini_suspended_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1230,10 +1230,10 @@ static void mini_suspended_rc_track_left_eighth_to_diag( /** rct2: 0x008AFFBC */ static void mini_suspended_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1391,10 +1391,10 @@ static void mini_suspended_rc_track_right_eighth_to_diag( /** rct2: 0x008AFFCC */ static void mini_suspended_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1404,10 +1404,10 @@ static void mini_suspended_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008AFFDC */ static void mini_suspended_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1417,10 +1417,10 @@ static void mini_suspended_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008AFF9C */ static void mini_suspended_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1552,10 +1552,10 @@ static void mini_suspended_rc_track_diag_flat( /** rct2: 0x008B000C */ static void mini_suspended_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1687,10 +1687,10 @@ static void mini_suspended_rc_track_diag_25_deg_up( /** rct2: 0x008AFFEC */ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1822,10 +1822,10 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008AFFFC */ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1957,10 +1957,10 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008B003C */ static void mini_suspended_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2092,10 +2092,10 @@ static void mini_suspended_rc_track_diag_25_deg_down( /** rct2: 0x008B001C */ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2224,10 +2224,10 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008B002C */ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2356,7 +2356,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( } } -TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index 9d8d668c41..56155bfc11 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x00792D88 */ static void multi_dimension_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -108,13 +108,13 @@ static void multi_dimension_rc_track_flat( /** rct2: 0x00792F98, 0x00792FA8, 0x00792FB8 */ static void multi_dimension_rc_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 15810, 15812, SPR_STATION_INVERTED_BAR_A_SW_NE }, { 15811, 15813, SPR_STATION_INVERTED_BAR_A_NW_SE }, { 15810, 15812, SPR_STATION_INVERTED_BAR_A_SW_NE }, @@ -168,10 +168,10 @@ static void multi_dimension_rc_track_station( /** rct2: 0x00792D98 */ static void multi_dimension_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -303,10 +303,10 @@ static void multi_dimension_rc_track_25_deg_up( /** rct2: 0x00792DA8 */ static void multi_dimension_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -384,10 +384,10 @@ static void multi_dimension_rc_track_60_deg_up( /** rct2: 0x00792DB8 */ static void multi_dimension_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -519,10 +519,10 @@ static void multi_dimension_rc_track_flat_to_25_deg_up( /** rct2: 0x00792DC8 */ static void multi_dimension_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -608,10 +608,10 @@ static void multi_dimension_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x00792DD8 */ static void multi_dimension_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -721,10 +721,10 @@ static void multi_dimension_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x00792DE8 */ static void multi_dimension_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -856,10 +856,10 @@ static void multi_dimension_rc_track_25_deg_up_to_flat( /** rct2: 0x00792DF8 */ static void multi_dimension_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -868,10 +868,10 @@ static void multi_dimension_rc_track_25_deg_down( /** rct2: 0x00792E08 */ static void multi_dimension_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -880,10 +880,10 @@ static void multi_dimension_rc_track_60_deg_down( /** rct2: 0x00792E18 */ static void multi_dimension_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -892,10 +892,10 @@ static void multi_dimension_rc_track_flat_to_25_deg_down( /** rct2: 0x00792E28 */ static void multi_dimension_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -904,10 +904,10 @@ static void multi_dimension_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x00792E38 */ static void multi_dimension_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -916,10 +916,10 @@ static void multi_dimension_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x00792E48 */ static void multi_dimension_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -928,10 +928,10 @@ static void multi_dimension_rc_track_25_deg_down_to_flat( /** rct2: 0x00792E58 */ static void multi_dimension_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1254,10 +1254,10 @@ static void multi_dimension_rc_track_left_quarter_turn_5( /** rct2: 0x00792E68 */ static void multi_dimension_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1267,10 +1267,10 @@ static void multi_dimension_rc_track_right_quarter_turn_5( /** rct2: 0x00792E78 */ static void multi_dimension_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1347,10 +1347,10 @@ static void multi_dimension_rc_track_flat_to_left_bank( /** rct2: 0x00792E88 */ static void multi_dimension_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1427,10 +1427,10 @@ static void multi_dimension_rc_track_flat_to_right_bank( /** rct2: 0x00792E98 */ static void multi_dimension_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1507,10 +1507,10 @@ static void multi_dimension_rc_track_left_bank_to_flat( /** rct2: 0x00792EA8 */ static void multi_dimension_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1587,10 +1587,10 @@ static void multi_dimension_rc_track_right_bank_to_flat( /** rct2: 0x00792EB8 */ static void multi_dimension_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -1917,10 +1917,10 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( /** rct2: 0x00792EC8 */ static void multi_dimension_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1931,10 +1931,10 @@ static void multi_dimension_rc_track_banked_right_quarter_turn_5( /** rct2: 0x00792ED8 */ static void multi_dimension_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2042,10 +2042,10 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_up( /** rct2: 0x00792EE8 */ static void multi_dimension_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2153,10 +2153,10 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_up( /** rct2: 0x00792EF8 */ static void multi_dimension_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2264,10 +2264,10 @@ static void multi_dimension_rc_track_25_deg_up_to_left_bank( /** rct2: 0x00792F08 */ static void multi_dimension_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2375,10 +2375,10 @@ static void multi_dimension_rc_track_25_deg_up_to_right_bank( /** rct2: 0x00792F18 */ static void multi_dimension_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -2388,10 +2388,10 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_down( /** rct2: 0x00792F28 */ static void multi_dimension_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2400,10 +2400,10 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_down( /** rct2: 0x00792F38 */ static void multi_dimension_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -2413,10 +2413,10 @@ static void multi_dimension_rc_track_25_deg_down_to_left_bank( /** rct2: 0x00792F48 */ static void multi_dimension_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2425,10 +2425,10 @@ static void multi_dimension_rc_track_25_deg_down_to_right_bank( /** rct2: 0x00792F58 */ static void multi_dimension_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2501,10 +2501,10 @@ static void multi_dimension_rc_track_left_bank( /** rct2: 0x00792F68 */ static void multi_dimension_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -2513,10 +2513,10 @@ static void multi_dimension_rc_track_right_bank( /** rct2: 0x00792F78 */ static void multi_dimension_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -2798,10 +2798,10 @@ static void multi_dimension_rc_track_s_bend_left( /** rct2: 0x00792F88 */ static void multi_dimension_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3083,10 +3083,10 @@ static void multi_dimension_rc_track_s_bend_right( /** rct2: 0x00792FC8 */ static void multi_dimension_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3295,10 +3295,10 @@ static void multi_dimension_rc_track_left_quarter_turn_3( /** rct2: 0x00792FD8 */ static void multi_dimension_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3308,10 +3308,10 @@ static void multi_dimension_rc_track_right_quarter_turn_3( /** rct2: 0x00792FE8 */ static void multi_dimension_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -3524,10 +3524,10 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( /** rct2: 0x00792FF8 */ static void multi_dimension_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3538,10 +3538,10 @@ static void multi_dimension_rc_track_right_quarter_turn_3_bank( /** rct2: 0x00793008 */ static void multi_dimension_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3742,10 +3742,10 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( /** rct2: 0x00793018 */ static void multi_dimension_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3946,10 +3946,10 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( /** rct2: 0x00793028 */ static void multi_dimension_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3965,10 +3965,10 @@ static void multi_dimension_rc_track_left_half_banked_helix_down_small( /** rct2: 0x00793038 */ static void multi_dimension_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3984,10 +3984,10 @@ static void multi_dimension_rc_track_right_half_banked_helix_down_small( /** rct2: 0x00793048 */ static void multi_dimension_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4302,10 +4302,10 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( /** rct2: 0x00793058 */ static void multi_dimension_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4620,10 +4620,10 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( /** rct2: 0x00793068 */ static void multi_dimension_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4639,10 +4639,10 @@ static void multi_dimension_rc_track_left_half_banked_helix_down_large( /** rct2: 0x00793078 */ static void multi_dimension_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4658,10 +4658,10 @@ static void multi_dimension_rc_track_right_half_banked_helix_down_large( /** rct2: 0x00793088 */ static void multi_dimension_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4720,10 +4720,10 @@ static void multi_dimension_rc_track_brakes( /** rct2: 0x00793098 */ static void multi_dimension_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4823,10 +4823,10 @@ static void multi_dimension_rc_track_on_ride_photo( /** rct2: 0x00793328 */ static void multi_dimension_rc_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4900,10 +4900,10 @@ static void multi_dimension_rc_track_90_deg_up( /** rct2: 0x00793338 */ static void multi_dimension_rc_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -4912,10 +4912,10 @@ static void multi_dimension_rc_track_90_deg_down( /** rct2: 0x00793348 */ static void multi_dimension_rc_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -4997,10 +4997,10 @@ static void multi_dimension_rc_track_60_deg_up_to_90_deg_up( /** rct2: 0x00793358 */ static void multi_dimension_rc_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { multi_dimension_rc_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -5009,10 +5009,10 @@ static void multi_dimension_rc_track_90_deg_down_to_60_deg_down( /** rct2: 0x00793368 */ static void multi_dimension_rc_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5088,10 +5088,10 @@ static void multi_dimension_rc_track_90_deg_up_to_60_deg_up( /** rct2: 0x00793378 */ static void multi_dimension_rc_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5171,10 +5171,10 @@ static void multi_dimension_rc_track_60_deg_down_to_90_deg_down( /** rct2: 0x007930B8 */ static void multi_dimension_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5444,10 +5444,10 @@ static void multi_dimension_rc_track_left_eighth_to_diag( /** rct2: 0x007930C8 */ static void multi_dimension_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -5717,10 +5717,10 @@ static void multi_dimension_rc_track_right_eighth_to_diag( /** rct2: 0x007930D8 */ static void multi_dimension_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5730,10 +5730,10 @@ static void multi_dimension_rc_track_left_eighth_to_orthogonal( /** rct2: 0x007930E8 */ static void multi_dimension_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5743,10 +5743,10 @@ static void multi_dimension_rc_track_right_eighth_to_orthogonal( /** rct2: 0x007930F8 */ static void multi_dimension_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6016,10 +6016,10 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( /** rct2: 0x00793108 */ static void multi_dimension_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6289,10 +6289,10 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( /** rct2: 0x00793118 */ static void multi_dimension_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -6303,10 +6303,10 @@ static void multi_dimension_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x00793128 */ static void multi_dimension_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -6317,10 +6317,10 @@ static void multi_dimension_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x007930A8 */ static void multi_dimension_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6589,10 +6589,10 @@ static void multi_dimension_rc_track_diag_flat( /** rct2: 0x00793158 */ static void multi_dimension_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -6861,10 +6861,10 @@ static void multi_dimension_rc_track_diag_25_deg_up( /** rct2: 0x007931B8 */ static void multi_dimension_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7015,10 +7015,10 @@ static void multi_dimension_rc_track_diag_60_deg_up( /** rct2: 0x00793138 */ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7287,10 +7287,10 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x00793198 */ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7441,10 +7441,10 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x007931A8 */ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7595,10 +7595,10 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x00793148 */ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -7867,10 +7867,10 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x00793188 */ static void multi_dimension_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8087,10 +8087,10 @@ static void multi_dimension_rc_track_diag_25_deg_down( /** rct2: 0x007931E8 */ static void multi_dimension_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8241,10 +8241,10 @@ static void multi_dimension_rc_track_diag_60_deg_down( /** rct2: 0x00793168 */ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8457,10 +8457,10 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x007931C8 */ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8611,10 +8611,10 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x007931D8 */ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8765,10 +8765,10 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x00793178 */ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -8985,10 +8985,10 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x00793218 */ static void multi_dimension_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9142,10 +9142,10 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( /** rct2: 0x00793228 */ static void multi_dimension_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9299,10 +9299,10 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( /** rct2: 0x00793238 */ static void multi_dimension_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9456,10 +9456,10 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( /** rct2: 0x00793248 */ static void multi_dimension_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9613,10 +9613,10 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( /** rct2: 0x00793278 */ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9769,10 +9769,10 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x00793288 */ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -9925,10 +9925,10 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x00793258 */ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10081,10 +10081,10 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x00793268 */ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10237,10 +10237,10 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x00793298 */ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10386,10 +10386,10 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x007932A8 */ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10535,10 +10535,10 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x007932B8 */ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10691,10 +10691,10 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x007932C8 */ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -10847,10 +10847,10 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x007931F8 */ static void multi_dimension_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11002,10 +11002,10 @@ static void multi_dimension_rc_track_diag_left_bank( /** rct2: 0x00793208 */ static void multi_dimension_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11157,10 +11157,10 @@ static void multi_dimension_rc_track_diag_right_bank( /** rct2: 0x007932D8 */ static void multi_dimension_rc_track_left_flyer_twist_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -11267,10 +11267,10 @@ static void multi_dimension_rc_track_left_flyer_twist_up( /** rct2: 0x007932E8 */ static void multi_dimension_rc_track_right_flyer_twist_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -11377,10 +11377,10 @@ static void multi_dimension_rc_track_right_flyer_twist_up( /** rct2: 0x007932F8 */ static void multi_dimension_rc_track_left_flyer_twist_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -11487,10 +11487,10 @@ static void multi_dimension_rc_track_left_flyer_twist_down( /** rct2: 0x00793308 */ static void multi_dimension_rc_track_right_flyer_twist_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -11597,10 +11597,10 @@ static void multi_dimension_rc_track_right_flyer_twist_down( /** rct2: 0x00793398 */ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11776,10 +11776,10 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo /** rct2: 0x00793318 */ static void multi_dimension_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -11835,10 +11835,10 @@ static void multi_dimension_rc_track_block_brakes( /** rct2: 0x00793388 */ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12010,10 +12010,10 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter /** rct2: 0x00793398 */ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12189,10 +12189,10 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( /** rct2: 0x00793388 */ static void multi_dimension_rc_track_elem_255( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (!track_element_is_inverted(tileElement)) @@ -12361,7 +12361,7 @@ static void multi_dimension_rc_track_elem_255( } } -TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp index d63def446d..b03b2a43c0 100644 --- a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp @@ -87,14 +87,14 @@ enum SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_SE_NW_5 = 22225, }; -static constexpr const uint32 reverse_freefall_rc_track_pieces_station[4] = { +static constexpr const uint32_t reverse_freefall_rc_track_pieces_station[4] = { SPR_REVERSE_FREEFALL_RC_STATION_SW_NE, SPR_REVERSE_FREEFALL_RC_STATION_NW_SE, SPR_REVERSE_FREEFALL_RC_STATION_SW_NE, SPR_REVERSE_FREEFALL_RC_STATION_NW_SE, }; -static constexpr const uint32 reverse_freefall_rc_track_pieces_slope[7][4] = { +static constexpr const uint32_t reverse_freefall_rc_track_pieces_slope[7][4] = { { SPR_REVERSE_FREEFALL_RC_SLOPE_SW_NE_0, SPR_REVERSE_FREEFALL_RC_SLOPE_NW_SE_0, @@ -134,7 +134,7 @@ static constexpr const uint32 reverse_freefall_rc_track_pieces_slope[7][4] = { }, }; -static constexpr const uint32 reverse_freefall_rc_track_pieces_slope_supports[7][4] = { +static constexpr const uint32_t reverse_freefall_rc_track_pieces_slope_supports[7][4] = { { SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_SW_NE_0, SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_NW_SE_0, @@ -179,14 +179,14 @@ static constexpr const uint32 reverse_freefall_rc_track_pieces_slope_supports[7] }, }; -static constexpr const uint32 reverse_freefall_rc_track_pieces_vertical[4] = { +static constexpr const uint32_t reverse_freefall_rc_track_pieces_vertical[4] = { SPR_REVERSE_FREEFALL_RC_VERTICAL_SW_NE, SPR_REVERSE_FREEFALL_RC_VERTICAL_NW_SE, SPR_REVERSE_FREEFALL_RC_VERTICAL_NE_SW, SPR_REVERSE_FREEFALL_RC_VERTICAL_SE_NW, }; -static constexpr const uint32 reverse_freefall_rc_track_pieces_vertical_supports[4] = { +static constexpr const uint32_t reverse_freefall_rc_track_pieces_vertical_supports[4] = { SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_SW_NE, SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_NW_SE, SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_NE_SW, @@ -195,21 +195,21 @@ static constexpr const uint32 reverse_freefall_rc_track_pieces_vertical_supports static void paint_reverse_freefall_rc_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction & 1) { - uint32 imageId = SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height); paint_util_push_tunnel_right(session, height, TUNNEL_6); } else { - uint32 imageId = SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); paint_util_push_tunnel_left(session, height, TUNNEL_6); } @@ -221,14 +221,14 @@ static void paint_reverse_freefall_rc_flat( static void paint_reverse_freefall_rc_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { Ride * ride = get_ride(rideIndex); - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -267,24 +267,24 @@ static void paint_reverse_freefall_rc_station( static void paint_reverse_freefall_rc_slope( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { TESTPAINT_IGNORE_ALL(); - static constexpr const sint8 bbHeights03[] = { 1, 6, 14, 37, 64 }; - static constexpr const sint8 bbHeights12[] = { 1, 6, 14, 27, 59 }; - static constexpr const sint32 supportHeights[] = { 48, 64, 128, 176, 208, 240, 240 }; - static constexpr const sint32 tunnelOffsets03[] = { 0, 0, 0, 16, 64 }; + static constexpr const int8_t bbHeights03[] = { 1, 6, 14, 37, 64 }; + static constexpr const int8_t bbHeights12[] = { 1, 6, 14, 27, 59 }; + static constexpr const int32_t supportHeights[] = { 48, 64, 128, 176, 208, 240, 240 }; + static constexpr const int32_t tunnelOffsets03[] = { 0, 0, 0, 16, 64 }; - uint32 supportsImageId = + uint32_t supportsImageId = reverse_freefall_rc_track_pieces_slope_supports[trackSequence][direction] | session->TrackColours[SCHEME_SUPPORTS]; - uint32 trackImageId = + uint32_t trackImageId = reverse_freefall_rc_track_pieces_slope[trackSequence][direction] | session->TrackColours[SCHEME_TRACK]; - sint8 bbHeight; + int8_t bbHeight; bool isDirection03 = (direction == 0 || direction == 3); switch (trackSequence) { @@ -299,7 +299,7 @@ static void paint_reverse_freefall_rc_slope( sub_98197C_rotated(session, direction, supportsImageId, 0, 0, 32, 20, bbHeight, height, 0, 6, height); sub_98199C_rotated(session, direction, trackImageId, 0, 0, 32, 20, bbHeight, height, 0, 6, height); - sint32 tunnelOffset = tunnelOffsets03[trackSequence]; + int32_t tunnelOffset = tunnelOffsets03[trackSequence]; if (direction & 1) { paint_util_push_tunnel_right(session, height + tunnelOffset, TUNNEL_6); @@ -323,7 +323,7 @@ static void paint_reverse_freefall_rc_slope( case 5: if (wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr)) { - uint32 floorImageId; + uint32_t floorImageId; if (direction & 1) { floorImageId = SPR_FLOOR_PLANKS_90_DEG | session->TrackColours[SCHEME_SUPPORTS]; @@ -364,13 +364,13 @@ static void paint_reverse_freefall_rc_slope( static void paint_reverse_freefall_rc_vertical( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 supportsImageId, trackImageId; + uint32_t supportsImageId, trackImageId; switch (trackSequence) { case 0: @@ -397,7 +397,7 @@ static void paint_reverse_freefall_rc_vertical( } } -TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp index ccdf338ed7..5068687a70 100644 --- a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp @@ -25,7 +25,7 @@ * * rct2: 0x006D4453 */ -void vehicle_visual_reverser(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_reverser(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { rct_vehicle * v1 = GET_VEHICLE(vehicle->prev_vehicle_on_ride); @@ -42,10 +42,10 @@ void vehicle_visual_reverser(paint_session * session, sint32 x, sint32 imageDire /** rct2: 0x0086E65C */ static void reverser_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -91,13 +91,13 @@ static void reverser_rc_track_flat( static void reverser_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 21506, SPR_STATION_BASE_A_SW_NE }, { 21507, SPR_STATION_BASE_A_NW_SE }, { 21506, SPR_STATION_BASE_A_SW_NE }, @@ -118,10 +118,10 @@ static void reverser_rc_track_station( /** rct2: 0x0086E66C */ static void reverser_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -191,10 +191,10 @@ static void reverser_rc_track_25_deg_up( /** rct2: 0x0086E67C */ static void reverser_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -264,10 +264,10 @@ static void reverser_rc_track_flat_to_25_deg_up( /** rct2: 0x0086E68C */ static void reverser_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -337,10 +337,10 @@ static void reverser_rc_track_25_deg_up_to_flat( /** rct2: 0x0086E69C */ static void reverser_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { reverser_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -349,10 +349,10 @@ static void reverser_rc_track_25_deg_down( /** rct2: 0x0086E6AC */ static void reverser_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { reverser_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -361,10 +361,10 @@ static void reverser_rc_track_flat_to_25_deg_down( /** rct2: 0x0086E6BC */ static void reverser_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { reverser_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -373,10 +373,10 @@ static void reverser_rc_track_25_deg_down_to_flat( /** rct2: 0x0086E6CC */ static void reverser_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -535,10 +535,10 @@ static void reverser_rc_track_left_quarter_turn_5( /** rct2: 0x0086E6DC */ static void reverser_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -548,10 +548,10 @@ static void reverser_rc_track_right_quarter_turn_5( /** rct2: 0x0086E6EC */ static void reverser_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -689,10 +689,10 @@ static void reverser_rc_track_s_bend_left( /** rct2: 0x0086E6FC */ static void reverser_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -830,10 +830,10 @@ static void reverser_rc_track_s_bend_right( /** rct2: 0x0086E73C */ static void reverser_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -938,10 +938,10 @@ static void reverser_rc_track_left_quarter_turn_3( /** rct2: 0x0086E74C */ static void reverser_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -951,10 +951,10 @@ static void reverser_rc_track_right_quarter_turn_3( /** rct2: 0x0086E75C */ static void reverser_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -980,10 +980,10 @@ static void reverser_rc_track_brakes( /** rct2: 0x0086E76C */ static void reverser_rc_track_left_reverser( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1169,10 +1169,10 @@ static void reverser_rc_track_left_reverser( /** rct2: 0x0086E77C */ static void reverser_rc_track_right_reverser( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1355,7 +1355,7 @@ static void reverser_rc_track_right_reverser( } } -TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp b/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp index a32e5483dd..983679a357 100644 --- a/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x0077839C */ static void side_friction_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -92,13 +92,13 @@ static void side_friction_rc_track_flat( /** rct2: 0x007784AC, 0x007784BC, 0x007784CC */ static void side_friction_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { 21610, 21611, 21610, @@ -117,10 +117,10 @@ static void side_friction_rc_track_station( /** rct2: 0x007783AC */ static void side_friction_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -206,10 +206,10 @@ static void side_friction_rc_track_25_deg_up( /** rct2: 0x007783CC */ static void side_friction_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -295,10 +295,10 @@ static void side_friction_rc_track_flat_to_25_deg_up( /** rct2: 0x007783FC */ static void side_friction_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -384,10 +384,10 @@ static void side_friction_rc_track_25_deg_up_to_flat( /** rct2: 0x0077840C */ static void side_friction_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { side_friction_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -396,10 +396,10 @@ static void side_friction_rc_track_25_deg_down( /** rct2: 0x0077842C */ static void side_friction_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { side_friction_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -408,10 +408,10 @@ static void side_friction_rc_track_flat_to_25_deg_down( /** rct2: 0x0077845C */ static void side_friction_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { side_friction_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -420,10 +420,10 @@ static void side_friction_rc_track_25_deg_down_to_flat( /** rct2: 0x0077846C */ static void side_friction_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -622,10 +622,10 @@ static void side_friction_rc_track_left_quarter_turn_5( /** rct2: 0x0077847C */ static void side_friction_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -635,10 +635,10 @@ static void side_friction_rc_track_right_quarter_turn_5( /** rct2: 0x0077848C */ static void side_friction_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -808,10 +808,10 @@ static void side_friction_rc_track_s_bend_left( /** rct2: 0x0077849C */ static void side_friction_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -981,10 +981,10 @@ static void side_friction_rc_track_s_bend_right( /** rct2: 0x007784DC */ static void side_friction_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1113,10 +1113,10 @@ static void side_friction_rc_track_left_quarter_turn_3( /** rct2: 0x007784EC */ static void side_friction_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1126,10 +1126,10 @@ static void side_friction_rc_track_right_quarter_turn_3( /** rct2: 0x007784FC */ static void side_friction_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1159,10 +1159,10 @@ static void side_friction_rc_track_brakes( /** rct2: 0x007785DC */ static void side_friction_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1332,10 +1332,10 @@ static void side_friction_rc_track_left_eighth_to_diag( /** rct2: 0x007785EC */ static void side_friction_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1505,10 +1505,10 @@ static void side_friction_rc_track_right_eighth_to_diag( /** rct2: 0x007785FC */ static void side_friction_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1518,10 +1518,10 @@ static void side_friction_rc_track_left_eighth_to_orthogonal( /** rct2: 0x0077860C */ static void side_friction_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1531,10 +1531,10 @@ static void side_friction_rc_track_right_eighth_to_orthogonal( /** rct2: 0x0077850C */ static void side_friction_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1689,10 +1689,10 @@ static void side_friction_rc_track_diag_flat( /** rct2: 0x0077853C */ static void side_friction_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1847,10 +1847,10 @@ static void side_friction_rc_track_diag_25_deg_up( /** rct2: 0x0077851C */ static void side_friction_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2005,10 +2005,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x0077852C */ static void side_friction_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2163,10 +2163,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x0077859C */ static void side_friction_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2321,10 +2321,10 @@ static void side_friction_rc_track_diag_25_deg_down( /** rct2: 0x0077857C */ static void side_friction_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2474,10 +2474,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x0077858C */ static void side_friction_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2629,7 +2629,7 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( } } -TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index ccd62c30c0..1485cd5bfb 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008A7114 */ static void stand_up_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -77,13 +77,13 @@ static void stand_up_rc_track_flat( /** rct2: 0x008A7384, 0x008A7394, 0x008A73A4 */ static void stand_up_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 25567, 25571, SPR_STATION_BASE_A_SW_NE }, { 25568, 25572, SPR_STATION_BASE_A_NW_SE }, { 25567, 25571, SPR_STATION_BASE_A_SW_NE }, @@ -112,10 +112,10 @@ static void stand_up_rc_track_station( /** rct2: 0x008A7124 */ static void stand_up_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -178,10 +178,10 @@ static void stand_up_rc_track_25_deg_up( /** rct2: 0x008A7134 */ static void stand_up_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -248,10 +248,10 @@ static void stand_up_rc_track_60_deg_up( /** rct2: 0x008A7144 */ static void stand_up_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -314,10 +314,10 @@ static void stand_up_rc_track_flat_to_25_deg_up( /** rct2: 0x008A7154 */ static void stand_up_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -392,10 +392,10 @@ static void stand_up_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008A7164 */ static void stand_up_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -470,10 +470,10 @@ static void stand_up_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008A7174 */ static void stand_up_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -536,10 +536,10 @@ static void stand_up_rc_track_25_deg_up_to_flat( /** rct2: 0x008A7184 */ static void stand_up_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -548,10 +548,10 @@ static void stand_up_rc_track_25_deg_down( /** rct2: 0x008A7194 */ static void stand_up_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -560,10 +560,10 @@ static void stand_up_rc_track_60_deg_down( /** rct2: 0x008A71A4 */ static void stand_up_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -572,10 +572,10 @@ static void stand_up_rc_track_flat_to_25_deg_down( /** rct2: 0x008A71B4 */ static void stand_up_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -584,10 +584,10 @@ static void stand_up_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A71C4 */ static void stand_up_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -596,10 +596,10 @@ static void stand_up_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A71D4 */ static void stand_up_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -608,10 +608,10 @@ static void stand_up_rc_track_25_deg_down_to_flat( /** rct2: 0x008A71E4 */ static void stand_up_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -747,10 +747,10 @@ static void stand_up_rc_track_left_quarter_turn_5( /** rct2: 0x008A71F4 */ static void stand_up_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -760,10 +760,10 @@ static void stand_up_rc_track_right_quarter_turn_5( /** rct2: 0x008A7204 */ static void stand_up_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -794,10 +794,10 @@ static void stand_up_rc_track_flat_to_left_bank( /** rct2: 0x008A7214 */ static void stand_up_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -828,10 +828,10 @@ static void stand_up_rc_track_flat_to_right_bank( /** rct2: 0x008A7224 */ static void stand_up_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -862,10 +862,10 @@ static void stand_up_rc_track_left_bank_to_flat( /** rct2: 0x008A7234 */ static void stand_up_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -896,10 +896,10 @@ static void stand_up_rc_track_right_bank_to_flat( /** rct2: 0x008A7244 */ static void stand_up_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1059,10 +1059,10 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008A7254 */ static void stand_up_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1072,10 +1072,10 @@ static void stand_up_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008A7264 */ static void stand_up_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1113,10 +1113,10 @@ static void stand_up_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008A7274 */ static void stand_up_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1154,10 +1154,10 @@ static void stand_up_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008A7284 */ static void stand_up_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1195,10 +1195,10 @@ static void stand_up_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008A7294 */ static void stand_up_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1236,10 +1236,10 @@ static void stand_up_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008A72A4 */ static void stand_up_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1248,10 +1248,10 @@ static void stand_up_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008A72B4 */ static void stand_up_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1260,10 +1260,10 @@ static void stand_up_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008A72C4 */ static void stand_up_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1272,10 +1272,10 @@ static void stand_up_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008A72D4 */ static void stand_up_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1284,10 +1284,10 @@ static void stand_up_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008A72E4 */ static void stand_up_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1318,10 +1318,10 @@ static void stand_up_rc_track_left_bank( /** rct2: 0x008A72F4 */ static void stand_up_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1330,10 +1330,10 @@ static void stand_up_rc_track_right_bank( /** rct2: 0x008A7304 */ static void stand_up_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1576,10 +1576,10 @@ static void stand_up_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008A7314 */ static void stand_up_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1822,10 +1822,10 @@ static void stand_up_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008A7324 */ static void stand_up_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1836,10 +1836,10 @@ static void stand_up_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008A7334 */ static void stand_up_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1849,10 +1849,10 @@ static void stand_up_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008A7344 */ static void stand_up_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1966,10 +1966,10 @@ static void stand_up_rc_track_s_bend_left( /** rct2: 0x008A7354 */ static void stand_up_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2083,10 +2083,10 @@ static void stand_up_rc_track_s_bend_right( /** rct2: 0x008A7364 */ static void stand_up_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2298,10 +2298,10 @@ static void stand_up_rc_track_left_vertical_loop( /** rct2: 0x008A7374 */ static void stand_up_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2487,10 +2487,10 @@ static void stand_up_rc_track_right_vertical_loop( /** rct2: 0x008A73B4 */ static void stand_up_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2579,10 +2579,10 @@ static void stand_up_rc_track_left_quarter_turn_3( /** rct2: 0x008A73C4 */ static void stand_up_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2592,10 +2592,10 @@ static void stand_up_rc_track_right_quarter_turn_3( /** rct2: 0x008A73D4 */ static void stand_up_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2700,10 +2700,10 @@ static void stand_up_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008A73E4 */ static void stand_up_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2713,10 +2713,10 @@ static void stand_up_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008A73F4 */ static void stand_up_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2832,10 +2832,10 @@ static void stand_up_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008A7404 */ static void stand_up_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2965,10 +2965,10 @@ static void stand_up_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008A7414 */ static void stand_up_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2979,10 +2979,10 @@ static void stand_up_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008A7424 */ static void stand_up_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -2992,10 +2992,10 @@ static void stand_up_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008A7434 */ static void stand_up_rc_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3103,10 +3103,10 @@ static void stand_up_rc_track_half_loop_up( /** rct2: 0x008A7444 */ static void stand_up_rc_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_half_loop_up(session, rideIndex, 3 - trackSequence, direction, height, tileElement); @@ -3115,10 +3115,10 @@ static void stand_up_rc_track_half_loop_down( /** rct2: 0x008A7454 */ static void stand_up_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3218,10 +3218,10 @@ static void stand_up_rc_track_left_corkscrew_up( /** rct2: 0x008A7464 */ static void stand_up_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3322,10 +3322,10 @@ static void stand_up_rc_track_right_corkscrew_up( /** rct2: 0x008A7474 */ static void stand_up_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_right_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction + 1) & 3, height, tileElement); @@ -3334,10 +3334,10 @@ static void stand_up_rc_track_left_corkscrew_down( /** rct2: 0x008A7484 */ static void stand_up_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { stand_up_rc_track_left_corkscrew_up(session, rideIndex, 2 - trackSequence, (direction - 1) & 3, height, tileElement); @@ -3346,10 +3346,10 @@ static void stand_up_rc_track_right_corkscrew_down( /** rct2: 0x008A7734 */ static void stand_up_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3552,10 +3552,10 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008A7744 */ static void stand_up_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3758,10 +3758,10 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008A7754 */ static void stand_up_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3777,10 +3777,10 @@ static void stand_up_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008A7764 */ static void stand_up_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -3796,10 +3796,10 @@ static void stand_up_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008A76F4 */ static void stand_up_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4112,10 +4112,10 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008A7704 */ static void stand_up_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4428,10 +4428,10 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008A7714 */ static void stand_up_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4447,10 +4447,10 @@ static void stand_up_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008A7724 */ static void stand_up_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -4466,10 +4466,10 @@ static void stand_up_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008A7494 */ static void stand_up_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4496,10 +4496,10 @@ static void stand_up_rc_track_brakes( /** rct2: 0x008A74A4 */ static void stand_up_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4542,10 +4542,10 @@ static void stand_up_rc_track_on_ride_photo( /** rct2: 0x008A74B4 */ static void stand_up_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4671,10 +4671,10 @@ static void stand_up_rc_track_left_eighth_to_diag( /** rct2: 0x008A74C4 */ static void stand_up_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4800,10 +4800,10 @@ static void stand_up_rc_track_right_eighth_to_diag( /** rct2: 0x008A74D4 */ static void stand_up_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4813,10 +4813,10 @@ static void stand_up_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008A74E4 */ static void stand_up_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -4826,10 +4826,10 @@ static void stand_up_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008A76A4 */ static void stand_up_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4955,10 +4955,10 @@ static void stand_up_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008A76B4 */ static void stand_up_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5084,10 +5084,10 @@ static void stand_up_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008A76C4 */ static void stand_up_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5097,10 +5097,10 @@ static void stand_up_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008A76D4 */ static void stand_up_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -5110,10 +5110,10 @@ static void stand_up_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008A74F4 */ static void stand_up_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5252,10 +5252,10 @@ static void stand_up_rc_track_diag_flat( /** rct2: 0x008A7524 */ static void stand_up_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5394,10 +5394,10 @@ static void stand_up_rc_track_diag_25_deg_up( /** rct2: 0x008A7584 */ static void stand_up_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5536,10 +5536,10 @@ static void stand_up_rc_track_diag_60_deg_up( /** rct2: 0x008A7504 */ static void stand_up_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5678,10 +5678,10 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008A7564 */ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5820,10 +5820,10 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008A7574 */ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5962,10 +5962,10 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008A7514 */ static void stand_up_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6104,10 +6104,10 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008A7554 */ static void stand_up_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6246,10 +6246,10 @@ static void stand_up_rc_track_diag_25_deg_down( /** rct2: 0x008A75B4 */ static void stand_up_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6388,10 +6388,10 @@ static void stand_up_rc_track_diag_60_deg_down( /** rct2: 0x008A7534 */ static void stand_up_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6528,10 +6528,10 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008A7594 */ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6670,10 +6670,10 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008A75A4 */ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6812,10 +6812,10 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008A7544 */ static void stand_up_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6954,10 +6954,10 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008A75E4 */ static void stand_up_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7028,10 +7028,10 @@ static void stand_up_rc_track_diag_flat_to_left_bank( /** rct2: 0x008A75F4 */ static void stand_up_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7102,10 +7102,10 @@ static void stand_up_rc_track_diag_flat_to_right_bank( /** rct2: 0x008A7604 */ static void stand_up_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7176,10 +7176,10 @@ static void stand_up_rc_track_diag_left_bank_to_flat( /** rct2: 0x008A7614 */ static void stand_up_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7250,10 +7250,10 @@ static void stand_up_rc_track_diag_right_bank_to_flat( /** rct2: 0x008A7644 */ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7324,10 +7324,10 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008A7654 */ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7398,10 +7398,10 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008A7624 */ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7472,10 +7472,10 @@ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008A7634 */ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7546,10 +7546,10 @@ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008A7664 */ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7618,10 +7618,10 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008A7674 */ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7690,10 +7690,10 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008A7684 */ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7764,10 +7764,10 @@ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008A7694 */ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7838,10 +7838,10 @@ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008A75C4 */ static void stand_up_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7910,10 +7910,10 @@ static void stand_up_rc_track_diag_left_bank( /** rct2: 0x008A75D4 */ static void stand_up_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7982,10 +7982,10 @@ static void stand_up_rc_track_diag_right_bank( /** rct2: 0x008A76E4 */ static void stand_up_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -8009,7 +8009,7 @@ static void stand_up_rc_track_block_brakes( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/Steeplechase.cpp b/src/openrct2/ride/coaster/Steeplechase.cpp index 7f098d2d8e..58b7c67934 100644 --- a/src/openrct2/ride/coaster/Steeplechase.cpp +++ b/src/openrct2/ride/coaster/Steeplechase.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008A59A8 */ static void steeplechase_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -70,13 +70,13 @@ static void steeplechase_track_flat( static void steeplechase_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { 28635, SPR_STATION_BASE_B_SW_NE }, { 28636, SPR_STATION_BASE_B_NW_SE }, { 28635, SPR_STATION_BASE_B_SW_NE }, @@ -97,10 +97,10 @@ static void steeplechase_track_station( /** rct2: 0x008A59B8 */ static void steeplechase_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -167,10 +167,10 @@ static void steeplechase_track_25_deg_up( /** rct2: 0x008A59C8 */ static void steeplechase_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -237,10 +237,10 @@ static void steeplechase_track_flat_to_25_deg_up( /** rct2: 0x008A59D8 */ static void steeplechase_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -307,10 +307,10 @@ static void steeplechase_track_25_deg_up_to_flat( /** rct2: 0x008A59E8 */ static void steeplechase_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { steeplechase_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -319,10 +319,10 @@ static void steeplechase_track_25_deg_down( /** rct2: 0x008A59F8 */ static void steeplechase_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { steeplechase_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -331,10 +331,10 @@ static void steeplechase_track_flat_to_25_deg_down( /** rct2: 0x008A5A08 */ static void steeplechase_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { steeplechase_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -343,10 +343,10 @@ static void steeplechase_track_25_deg_down_to_flat( /** rct2: 0x008A5A18 */ static void steeplechase_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -494,10 +494,10 @@ static void steeplechase_track_left_quarter_turn_5( /** rct2: 0x008A5A28 */ static void steeplechase_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -507,10 +507,10 @@ static void steeplechase_track_right_quarter_turn_5( /** rct2: 0x008A5A38 */ static void steeplechase_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -636,10 +636,10 @@ static void steeplechase_track_s_bend_left( /** rct2: 0x008A5A48 */ static void steeplechase_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -767,10 +767,10 @@ static void steeplechase_track_s_bend_right( /** rct2: 0x008A5A88 */ static void steeplechase_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -870,10 +870,10 @@ static void steeplechase_track_left_quarter_turn_3( /** rct2: 0x008A5A98 */ static void steeplechase_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -883,10 +883,10 @@ static void steeplechase_track_right_quarter_turn_3( /** rct2: 0x008A5AA8 */ static void steeplechase_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -911,10 +911,10 @@ static void steeplechase_track_brakes( /** rct2: 0x008A5AD8 */ static void steeplechase_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1047,10 +1047,10 @@ static void steeplechase_track_left_eighth_to_diag( /** rct2: 0x008A5AE8 */ static void steeplechase_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1183,10 +1183,10 @@ static void steeplechase_track_right_eighth_to_diag( /** rct2: 0x008A5AF8 */ static void steeplechase_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1196,10 +1196,10 @@ static void steeplechase_track_left_eighth_to_orthogonal( /** rct2: 0x008A5B08 */ static void steeplechase_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1209,10 +1209,10 @@ static void steeplechase_track_right_eighth_to_orthogonal( /** rct2: 0x008A5AC8 */ static void steeplechase_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1351,10 +1351,10 @@ static void steeplechase_track_diag_flat( /** rct2: 0x008A5B38 */ static void steeplechase_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1493,10 +1493,10 @@ static void steeplechase_track_diag_25_deg_up( /** rct2: 0x008A5B18 */ static void steeplechase_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1635,10 +1635,10 @@ static void steeplechase_track_diag_flat_to_25_deg_up( /** rct2: 0x008A5B28 */ static void steeplechase_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1777,10 +1777,10 @@ static void steeplechase_track_diag_25_deg_up_to_flat( /** rct2: 0x008A5B68 */ static void steeplechase_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1919,10 +1919,10 @@ static void steeplechase_track_diag_25_deg_down( /** rct2: 0x008A5B48 */ static void steeplechase_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2059,10 +2059,10 @@ static void steeplechase_track_diag_flat_to_25_deg_down( /** rct2: 0x008A5B58 */ static void steeplechase_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2201,10 +2201,10 @@ static void steeplechase_track_diag_25_deg_down_to_flat( /** rct2: 0x008A5AB8 */ static void steeplechase_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -2226,7 +2226,7 @@ static void steeplechase_track_block_brakes( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp index 4161746075..2429219fab 100644 --- a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008A8958 */ static void suspended_swinging_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -75,13 +75,13 @@ static void suspended_swinging_rc_track_flat( /** rct2: 0x008A8AA8, 0x008A8AB8, 0x008A8AC8 */ static void suspended_swinging_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 25963, SPR_STATION_INVERTED_BAR_D_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 25964, SPR_STATION_INVERTED_BAR_D_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 25963, SPR_STATION_INVERTED_BAR_D_SW_NE }, @@ -104,10 +104,10 @@ static void suspended_swinging_rc_track_station( /** rct2: 0x008A8968 */ static void suspended_swinging_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -194,10 +194,10 @@ static void suspended_swinging_rc_track_25_deg_up( /** rct2: 0x008A8978 */ static void suspended_swinging_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -235,10 +235,10 @@ static void suspended_swinging_rc_track_60_deg_up( /** rct2: 0x008A8988 */ static void suspended_swinging_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -325,10 +325,10 @@ static void suspended_swinging_rc_track_flat_to_25_deg_up( /** rct2: 0x008A8998 */ static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -370,10 +370,10 @@ static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008A89A8 */ static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -468,10 +468,10 @@ static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008A89B8 */ static void suspended_swinging_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (track_element_is_lift_hill(tileElement)) @@ -558,10 +558,10 @@ static void suspended_swinging_rc_track_25_deg_up_to_flat( /** rct2: 0x008A89C8 */ static void suspended_swinging_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_swinging_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -570,10 +570,10 @@ static void suspended_swinging_rc_track_25_deg_down( /** rct2: 0x008A89D8 */ static void suspended_swinging_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_swinging_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -582,10 +582,10 @@ static void suspended_swinging_rc_track_60_deg_down( /** rct2: 0x008A89E8 */ static void suspended_swinging_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_swinging_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -594,10 +594,10 @@ static void suspended_swinging_rc_track_flat_to_25_deg_down( /** rct2: 0x008A89F8 */ static void suspended_swinging_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_swinging_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -607,10 +607,10 @@ static void suspended_swinging_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A8A08 */ static void suspended_swinging_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_swinging_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -620,10 +620,10 @@ static void suspended_swinging_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A8A18 */ static void suspended_swinging_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_swinging_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -632,10 +632,10 @@ static void suspended_swinging_rc_track_25_deg_down_to_flat( /** rct2: 0x008A8A28 */ static void suspended_swinging_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -792,10 +792,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( /** rct2: 0x008A8A38 */ static void suspended_swinging_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -805,10 +805,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_5( /** rct2: 0x008A8A48 */ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -951,10 +951,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008A8A58 */ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1097,10 +1097,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008A8A68 */ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1111,10 +1111,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008A8A78 */ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1125,10 +1125,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008A8A88 */ static void suspended_swinging_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1268,10 +1268,10 @@ static void suspended_swinging_rc_track_s_bend_left( /** rct2: 0x008A8A98 */ static void suspended_swinging_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1411,10 +1411,10 @@ static void suspended_swinging_rc_track_s_bend_right( /** rct2: 0x008A8AD8 */ static void suspended_swinging_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1520,10 +1520,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_3( /** rct2: 0x008A8AE8 */ static void suspended_swinging_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1533,10 +1533,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_3( /** rct2: 0x008A8AF8 */ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1614,10 +1614,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008A8B08 */ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1695,10 +1695,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008A8B18 */ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1709,10 +1709,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008A8B28 */ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1723,10 +1723,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008A8B38 */ static void suspended_swinging_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1757,10 +1757,10 @@ static void suspended_swinging_rc_track_brakes( /** rct2: 0x008A8B48 */ static void suspended_swinging_rc_track_left_quarter_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1922,10 +1922,10 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( /** rct2: 0x008A8B58 */ static void suspended_swinging_rc_track_right_quarter_helix_large_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2087,10 +2087,10 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( /** rct2: 0x008A8B68 */ static void suspended_swinging_rc_track_left_quarter_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2252,10 +2252,10 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( /** rct2: 0x008A8B78 */ static void suspended_swinging_rc_track_right_quarter_helix_large_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2417,10 +2417,10 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( /** rct2: 0x008A8B88 */ static void suspended_swinging_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2566,10 +2566,10 @@ static void suspended_swinging_rc_track_left_eighth_to_diag( /** rct2: 0x008A8B98 */ static void suspended_swinging_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2715,10 +2715,10 @@ static void suspended_swinging_rc_track_right_eighth_to_diag( /** rct2: 0x008A8BA8 */ static void suspended_swinging_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -2729,10 +2729,10 @@ static void suspended_swinging_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008A8BB8 */ static void suspended_swinging_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -2742,10 +2742,10 @@ static void suspended_swinging_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008A8BC8 */ static void suspended_swinging_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2877,10 +2877,10 @@ static void suspended_swinging_rc_track_diag_flat( /** rct2: 0x008A8BF8 */ static void suspended_swinging_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3012,10 +3012,10 @@ static void suspended_swinging_rc_track_diag_25_deg_up( /** rct2: 0x008A8C58 */ static void suspended_swinging_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3095,10 +3095,10 @@ static void suspended_swinging_rc_track_diag_60_deg_up( /** rct2: 0x008A8BD8 */ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3230,10 +3230,10 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008A8C38 */ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3313,10 +3313,10 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008A8C48 */ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3396,10 +3396,10 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008A8BE8 */ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3531,10 +3531,10 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008A8C28 */ static void suspended_swinging_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3666,10 +3666,10 @@ static void suspended_swinging_rc_track_diag_25_deg_down( /** rct2: 0x008A8C88 */ static void suspended_swinging_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3728,10 +3728,10 @@ static void suspended_swinging_rc_track_diag_60_deg_down( /** rct2: 0x008A8C08 */ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3860,10 +3860,10 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008A8C68 */ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3943,10 +3943,10 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008A8C78 */ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4026,10 +4026,10 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008A8C18 */ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4161,10 +4161,10 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008A8B38 */ static void suspended_swinging_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -4192,7 +4192,7 @@ static void suspended_swinging_rc_track_block_brakes( paint_util_set_general_support_height(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/TwisterRollerCoaster.cpp b/src/openrct2/ride/coaster/TwisterRollerCoaster.cpp index a324347f9b..431039a45c 100644 --- a/src/openrct2/ride/coaster/TwisterRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/TwisterRollerCoaster.cpp @@ -23,10 +23,10 @@ /** rct2: 0x008AB6A4 */ static void twister_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -35,10 +35,10 @@ static void twister_rc_track_flat( /** rct2: 0x008AB8F4, 0x008AB904, 0x008AB914 */ static void twister_rc_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_station(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -47,10 +47,10 @@ static void twister_rc_track_station( /** rct2: 0x008AB6B4 */ static void twister_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -59,10 +59,10 @@ static void twister_rc_track_25_deg_up( /** rct2: 0x008AB6C4 */ static void twister_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -71,10 +71,10 @@ static void twister_rc_track_60_deg_up( /** rct2: 0x008AB6D4 */ static void twister_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -84,10 +84,10 @@ static void twister_rc_track_flat_to_25_deg_up( /** rct2: 0x008AB6E4 */ static void twister_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -97,10 +97,10 @@ static void twister_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008AB6F4 */ static void twister_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -110,10 +110,10 @@ static void twister_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008AB704 */ static void twister_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -123,10 +123,10 @@ static void twister_rc_track_25_deg_up_to_flat( /** rct2: 0x008AB714 */ static void twister_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -136,10 +136,10 @@ static void twister_rc_track_25_deg_down( /** rct2: 0x008AB724 */ static void twister_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -149,10 +149,10 @@ static void twister_rc_track_60_deg_down( /** rct2: 0x008AB734 */ static void twister_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -162,10 +162,10 @@ static void twister_rc_track_flat_to_25_deg_down( /** rct2: 0x008AB744 */ static void twister_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -175,10 +175,10 @@ static void twister_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008AB754 */ static void twister_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -188,10 +188,10 @@ static void twister_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008AB764 */ static void twister_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -201,10 +201,10 @@ static void twister_rc_track_25_deg_down_to_flat( /** rct2: 0x008AB774 */ static void twister_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -214,10 +214,10 @@ static void twister_rc_track_left_quarter_turn_5( /** rct2: 0x008AB784 */ static void twister_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -227,10 +227,10 @@ static void twister_rc_track_right_quarter_turn_5( /** rct2: 0x008AB794 */ static void twister_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -240,10 +240,10 @@ static void twister_rc_track_flat_to_left_bank( /** rct2: 0x008AB7A4 */ static void twister_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -253,10 +253,10 @@ static void twister_rc_track_flat_to_right_bank( /** rct2: 0x008AB7B4 */ static void twister_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -266,10 +266,10 @@ static void twister_rc_track_left_bank_to_flat( /** rct2: 0x008AB7C4 */ static void twister_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -279,10 +279,10 @@ static void twister_rc_track_right_bank_to_flat( /** rct2: 0x008AB7D4 */ static void twister_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_banked_left_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -292,10 +292,10 @@ static void twister_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008AB7E4 */ static void twister_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_banked_right_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -305,10 +305,10 @@ static void twister_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008AB7F4 */ static void twister_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -318,10 +318,10 @@ static void twister_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008AB804 */ static void twister_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -331,10 +331,10 @@ static void twister_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008AB814 */ static void twister_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -344,10 +344,10 @@ static void twister_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008AB824 */ static void twister_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -357,10 +357,10 @@ static void twister_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008AB834 */ static void twister_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -370,10 +370,10 @@ static void twister_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008AB844 */ static void twister_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -383,10 +383,10 @@ static void twister_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008AB854 */ static void twister_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -396,10 +396,10 @@ static void twister_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008AB864 */ static void twister_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -409,10 +409,10 @@ static void twister_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008AB874 */ static void twister_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -421,10 +421,10 @@ static void twister_rc_track_left_bank( /** rct2: 0x008AB884 */ static void twister_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -433,10 +433,10 @@ static void twister_rc_track_right_bank( /** rct2: 0x008AB894 */ static void twister_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -446,10 +446,10 @@ static void twister_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008AB8A4 */ static void twister_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -459,10 +459,10 @@ static void twister_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008AB8B4 */ static void twister_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -472,10 +472,10 @@ static void twister_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008AB8C4 */ static void twister_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -485,10 +485,10 @@ static void twister_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008AB8D4 */ static void twister_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_s_bend_left(session, rideIndex, trackSequence, direction, height, tileElement, @@ -498,10 +498,10 @@ static void twister_rc_track_s_bend_left( /** rct2: 0x008AB8E4 */ static void twister_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_s_bend_right(session, rideIndex, trackSequence, direction, height, tileElement, @@ -511,10 +511,10 @@ static void twister_rc_track_s_bend_right( /** rct2: 0x008ABA84 */ static void twister_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_vertical_loop(session, rideIndex, trackSequence, direction, height, tileElement, @@ -524,10 +524,10 @@ static void twister_rc_track_left_vertical_loop( /** rct2: 0x008ABA94 */ static void twister_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_vertical_loop(session, rideIndex, trackSequence, direction, height, tileElement, @@ -537,10 +537,10 @@ static void twister_rc_track_right_vertical_loop( /** rct2: 0x008AB924 */ static void twister_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3(session, rideIndex, trackSequence, direction, height, tileElement, @@ -550,10 +550,10 @@ static void twister_rc_track_left_quarter_turn_3( /** rct2: 0x008AB934 */ static void twister_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3(session, rideIndex, trackSequence, direction, height, tileElement, @@ -563,10 +563,10 @@ static void twister_rc_track_right_quarter_turn_3( /** rct2: 0x008AB944 */ static void twister_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -576,10 +576,10 @@ static void twister_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008AB954 */ static void twister_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -589,10 +589,10 @@ static void twister_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008AB964 */ static void twister_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -602,10 +602,10 @@ static void twister_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AB974 */ static void twister_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -615,10 +615,10 @@ static void twister_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AB984 */ static void twister_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -628,10 +628,10 @@ static void twister_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008AB994 */ static void twister_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -641,10 +641,10 @@ static void twister_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008AB9A4 */ static void twister_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_up_small(session, rideIndex, trackSequence, direction, height, tileElement, @@ -654,10 +654,10 @@ static void twister_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008AB9B4 */ static void twister_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_up_small(session, rideIndex, trackSequence, direction, height, tileElement, @@ -667,10 +667,10 @@ static void twister_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008AB9C4 */ static void twister_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_down_small(session, rideIndex, trackSequence, direction, height, tileElement, @@ -680,10 +680,10 @@ static void twister_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008AB9D4 */ static void twister_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_down_small(session, rideIndex, trackSequence, direction, height, @@ -693,10 +693,10 @@ static void twister_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008AB9E4 */ static void twister_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_up_large(session, rideIndex, trackSequence, direction, height, tileElement, @@ -706,10 +706,10 @@ static void twister_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008AB9F4 */ static void twister_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_up_large(session, rideIndex, trackSequence, direction, height, tileElement, @@ -719,10 +719,10 @@ static void twister_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008ABA04 */ static void twister_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_down_large(session, rideIndex, trackSequence, direction, height, tileElement, @@ -732,10 +732,10 @@ static void twister_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008ABA14 */ static void twister_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_down_large(session, rideIndex, trackSequence, direction, height, @@ -745,10 +745,10 @@ static void twister_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008ABA44 */ static void twister_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -758,10 +758,10 @@ static void twister_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008ABA24 */ static void twister_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -771,10 +771,10 @@ static void twister_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008ABA34 */ static void twister_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -784,10 +784,10 @@ static void twister_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008ABA54 */ static void twister_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -797,10 +797,10 @@ static void twister_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008ABA64 */ static void twister_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_brakes(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -809,10 +809,10 @@ static void twister_rc_track_brakes( /** rct2: 0x008ABE04 */ static void twister_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_left_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -822,10 +822,10 @@ static void twister_rc_track_25_deg_up_left_banked( /** rct2: 0x008ABE14 */ static void twister_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_right_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -835,10 +835,10 @@ static void twister_rc_track_25_deg_up_right_banked( /** rct2: 0x008ABA74 */ static void twister_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_on_ride_photo(session, rideIndex, trackSequence, direction, height, tileElement, @@ -848,10 +848,10 @@ static void twister_rc_track_on_ride_photo( /** rct2: 0x008ABE24 */ static void twister_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_left_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -861,10 +861,10 @@ static void twister_rc_track_25_deg_down_left_banked( /** rct2: 0x008ABE34 */ static void twister_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_right_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -874,10 +874,10 @@ static void twister_rc_track_25_deg_down_right_banked( /** rct2: 0x008ABE44 */ static void twister_rc_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -886,10 +886,10 @@ static void twister_rc_track_90_deg_up( /** rct2: 0x008ABE54 */ static void twister_rc_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -899,10 +899,10 @@ static void twister_rc_track_90_deg_down( /** rct2: 0x008ABE64 */ static void twister_rc_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -912,10 +912,10 @@ static void twister_rc_track_60_deg_up_to_90_deg_up( /** rct2: 0x008ABE74 */ static void twister_rc_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -925,10 +925,10 @@ static void twister_rc_track_90_deg_down_to_60_deg_down( /** rct2: 0x008ABE84 */ static void twister_rc_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -938,10 +938,10 @@ static void twister_rc_track_90_deg_up_to_60_deg_up( /** rct2: 0x008ABE94 */ static void twister_rc_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down_to_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -951,10 +951,10 @@ static void twister_rc_track_60_deg_down_to_90_deg_down( /** rct2: 0x008ABAB4 */ static void twister_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -964,10 +964,10 @@ static void twister_rc_track_left_eighth_to_diag( /** rct2: 0x008ABAC4 */ static void twister_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -977,10 +977,10 @@ static void twister_rc_track_right_eighth_to_diag( /** rct2: 0x008ABAD4 */ static void twister_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -990,10 +990,10 @@ static void twister_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008ABAE4 */ static void twister_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1003,10 +1003,10 @@ static void twister_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008ABAF4 */ static void twister_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_bank_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1016,10 +1016,10 @@ static void twister_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008ABB04 */ static void twister_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_bank_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1029,10 +1029,10 @@ static void twister_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008ABB14 */ static void twister_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_bank_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1042,10 +1042,10 @@ static void twister_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008ABB24 */ static void twister_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_bank_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1055,10 +1055,10 @@ static void twister_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008ABAA4 */ static void twister_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); @@ -1067,10 +1067,10 @@ static void twister_rc_track_diag_flat( /** rct2: 0x008ABB54 */ static void twister_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1080,10 +1080,10 @@ static void twister_rc_track_diag_25_deg_up( /** rct2: 0x008ABBB4 */ static void twister_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1093,10 +1093,10 @@ static void twister_rc_track_diag_60_deg_up( /** rct2: 0x008ABB34 */ static void twister_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1106,10 +1106,10 @@ static void twister_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008ABB94 */ static void twister_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1119,10 +1119,10 @@ static void twister_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008ABBA4 */ static void twister_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1132,10 +1132,10 @@ static void twister_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008ABB44 */ static void twister_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1145,10 +1145,10 @@ static void twister_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008ABB84 */ static void twister_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1158,10 +1158,10 @@ static void twister_rc_track_diag_25_deg_down( /** rct2: 0x008ABBE4 */ static void twister_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1171,10 +1171,10 @@ static void twister_rc_track_diag_60_deg_down( /** rct2: 0x008ABB64 */ static void twister_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1184,10 +1184,10 @@ static void twister_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008ABBC4 */ static void twister_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1197,10 +1197,10 @@ static void twister_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008ABBD4 */ static void twister_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1210,10 +1210,10 @@ static void twister_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008ABB74 */ static void twister_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1223,10 +1223,10 @@ static void twister_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008ABC14 */ static void twister_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1236,10 +1236,10 @@ static void twister_rc_track_diag_flat_to_left_bank( /** rct2: 0x008ABC24 */ static void twister_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1249,10 +1249,10 @@ static void twister_rc_track_diag_flat_to_right_bank( /** rct2: 0x008ABC34 */ static void twister_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1262,10 +1262,10 @@ static void twister_rc_track_diag_left_bank_to_flat( /** rct2: 0x008ABC44 */ static void twister_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1275,10 +1275,10 @@ static void twister_rc_track_diag_right_bank_to_flat( /** rct2: 0x008ABC74 */ static void twister_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1288,10 +1288,10 @@ static void twister_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008ABC84 */ static void twister_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1301,10 +1301,10 @@ static void twister_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008ABC54 */ static void twister_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1314,10 +1314,10 @@ static void twister_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008ABC64 */ static void twister_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1327,10 +1327,10 @@ static void twister_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008ABC94 */ static void twister_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1340,10 +1340,10 @@ static void twister_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008ABCA4 */ static void twister_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1353,10 +1353,10 @@ static void twister_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008ABCB4 */ static void twister_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1366,10 +1366,10 @@ static void twister_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008ABCC4 */ static void twister_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1379,10 +1379,10 @@ static void twister_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008ABBF4 */ static void twister_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1392,10 +1392,10 @@ static void twister_rc_track_diag_left_bank( /** rct2: 0x008ABC04 */ static void twister_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1405,10 +1405,10 @@ static void twister_rc_track_diag_right_bank( /** rct2: 0x008ABD74 */ static void twister_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1418,10 +1418,10 @@ static void twister_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( /** rct2: 0x008ABD84 */ static void twister_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1431,10 +1431,10 @@ static void twister_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( /** rct2: 0x008ABD94 */ static void twister_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank(session, rideIndex, trackSequence, direction, height, @@ -1444,10 +1444,10 @@ static void twister_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( /** rct2: 0x008ABDA4 */ static void twister_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank(session, rideIndex, trackSequence, direction, @@ -1457,10 +1457,10 @@ static void twister_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( /** rct2: 0x008AC0E4 */ static void twister_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_block_brakes(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1470,10 +1470,10 @@ static void twister_rc_track_block_brakes( /** rct2: 0x008ABEA4 */ static void twister_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1483,10 +1483,10 @@ static void twister_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ABEB4 */ static void twister_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1496,10 +1496,10 @@ static void twister_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ABEC4 */ static void twister_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1509,10 +1509,10 @@ static void twister_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008ABED4 */ static void twister_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1522,10 +1522,10 @@ static void twister_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008ABEE4 */ static void twister_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1535,10 +1535,10 @@ static void twister_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ABEF4 */ static void twister_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1548,10 +1548,10 @@ static void twister_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ABF04 */ static void twister_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1561,10 +1561,10 @@ static void twister_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008ABF14 */ static void twister_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1574,10 +1574,10 @@ static void twister_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008ABF24 */ static void twister_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1587,10 +1587,10 @@ static void twister_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008ABF34 */ static void twister_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1600,10 +1600,10 @@ static void twister_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008ABF44 */ static void twister_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1613,10 +1613,10 @@ static void twister_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ABF54 */ static void twister_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1626,10 +1626,10 @@ static void twister_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ABF64 */ static void twister_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1639,10 +1639,10 @@ static void twister_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008ABF74 */ static void twister_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1652,10 +1652,10 @@ static void twister_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008ABF84 */ static void twister_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1665,10 +1665,10 @@ static void twister_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008ABF94 */ static void twister_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1678,10 +1678,10 @@ static void twister_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008ABFA4 */ static void twister_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1691,10 +1691,10 @@ static void twister_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008ABFB4 */ static void twister_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1704,10 +1704,10 @@ static void twister_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008ABFE4 */ static void twister_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1717,10 +1717,10 @@ static void twister_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008ABFF4 */ static void twister_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1730,10 +1730,10 @@ static void twister_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008AC004 */ static void twister_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1743,10 +1743,10 @@ static void twister_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008AC014 */ static void twister_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1756,10 +1756,10 @@ static void twister_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x008ABFC4 */ static void twister_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1769,10 +1769,10 @@ static void twister_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008ABFD4 */ static void twister_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1782,10 +1782,10 @@ static void twister_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x008AC024 */ static void twister_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1795,10 +1795,10 @@ static void twister_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008AC034 */ static void twister_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1808,10 +1808,10 @@ static void twister_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008AC044 */ static void twister_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1821,10 +1821,10 @@ static void twister_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008AC054 */ static void twister_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1834,10 +1834,10 @@ static void twister_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008AC064 */ static void twister_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_left_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1847,10 +1847,10 @@ static void twister_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008AC074 */ static void twister_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_right_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1860,10 +1860,10 @@ static void twister_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008AC084 */ static void twister_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1873,10 +1873,10 @@ static void twister_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008AC094 */ static void twister_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1886,10 +1886,10 @@ static void twister_rc_track_right_banked_25_deg_down_to_flat( /** rct2: 0x008AC0A4 */ static void twister_rc_track_left_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1899,10 +1899,10 @@ static void twister_rc_track_left_quarter_turn_1_90_deg_up( /** rct2: 0x008AC0B4 */ static void twister_rc_track_right_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1912,10 +1912,10 @@ static void twister_rc_track_right_quarter_turn_1_90_deg_up( /** rct2: 0x008AC0C4 */ static void twister_rc_track_left_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1925,10 +1925,10 @@ static void twister_rc_track_left_quarter_turn_1_90_deg_down( /** rct2: 0x008AC0D4 */ static void twister_rc_track_right_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1938,10 +1938,10 @@ static void twister_rc_track_right_quarter_turn_1_90_deg_down( /* The following track elements used to be specific to the Vertical Roller Coaster */ static void twister_rc_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1950,10 +1950,10 @@ static void twister_rc_track_flat_to_60_deg_up( static void twister_rc_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1962,10 +1962,10 @@ static void twister_rc_track_60_deg_up_to_flat( static void twister_rc_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1974,10 +1974,10 @@ static void twister_rc_track_flat_to_60_deg_down( static void twister_rc_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1986,10 +1986,10 @@ static void twister_rc_track_60_deg_down_to_flat( static void twister_rc_track_brake_for_drop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_brake_for_drop(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1998,10 +1998,10 @@ static void twister_rc_track_brake_for_drop( static void twister_rc_track_diag_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2010,10 +2010,10 @@ static void twister_rc_track_diag_flat_to_60_deg_up( static void twister_rc_track_diag_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2022,10 +2022,10 @@ static void twister_rc_track_diag_60_deg_up_to_flat( static void twister_rc_track_diag_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2034,10 +2034,10 @@ static void twister_rc_track_diag_flat_to_60_deg_down( static void twister_rc_track_diag_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2048,10 +2048,10 @@ static void twister_rc_track_diag_60_deg_down_to_flat( /** rct2: 0x008ABCD4 */ static void twister_rc_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_half_loop_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2061,10 +2061,10 @@ static void twister_rc_track_half_loop_up( /** rct2: 0x008ABCE4 */ static void twister_rc_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_half_loop_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2074,10 +2074,10 @@ static void twister_rc_track_half_loop_down( /** rct2: 0x008ABD34 */ static void twister_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_corkscrew_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2087,10 +2087,10 @@ static void twister_rc_track_left_corkscrew_up( /** rct2: 0x008ABD44 */ static void twister_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_corkscrew_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2100,10 +2100,10 @@ static void twister_rc_track_right_corkscrew_up( /** rct2: 0x008ABD54 */ static void twister_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_corkscrew_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2113,10 +2113,10 @@ static void twister_rc_track_left_corkscrew_down( /** rct2: 0x008ABD64 */ static void twister_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_corkscrew_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2126,10 +2126,10 @@ static void twister_rc_track_right_corkscrew_down( /** rct2: 0x008AC0F4 */ static void twister_rc_track_flat_to_60_deg_up_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_up_long_base(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2139,10 +2139,10 @@ static void twister_rc_track_flat_to_60_deg_up_long_base( /** rct2: 0x008AC104 */ static void twister_rc_track_60_deg_up_to_flat_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat_long_base(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2152,10 +2152,10 @@ static void twister_rc_track_60_deg_up_to_flat_long_base( /** rct2: 0x008AC114 */ static void twister_rc_track_flat_to_60_deg_down_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_down_long_base(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2165,10 +2165,10 @@ static void twister_rc_track_flat_to_60_deg_down_long_base( /** rct2: 0x008AC124 */ static void twister_rc_track_60_deg_up_to_flat_long_base122( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat_long_base122(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2178,10 +2178,10 @@ static void twister_rc_track_60_deg_up_to_flat_long_base122( /** rct2: 0x008ABCF4 */ static void twister_rc_track_left_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_barrel_roll_up_to_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2191,10 +2191,10 @@ static void twister_rc_track_left_barrel_roll_up_to_down( /** rct2: 0x008ABD04 */ static void twister_rc_track_right_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_barrel_roll_up_to_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2204,10 +2204,10 @@ static void twister_rc_track_right_barrel_roll_up_to_down( /** rct2: 0x008ABD14 */ static void twister_rc_track_left_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_barrel_roll_down_to_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2217,10 +2217,10 @@ static void twister_rc_track_left_barrel_roll_down_to_up( /** rct2: 0x008ABD24 */ static void twister_rc_track_right_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_barrel_roll_down_to_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2230,10 +2230,10 @@ static void twister_rc_track_right_barrel_roll_down_to_up( /** rct2: 0x008ABDB4 */ static void twister_rc_track_powered_lift( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_powered_lift(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2243,10 +2243,10 @@ static void twister_rc_track_powered_lift( /** rct2: 0x008ABDC4 */ static void twister_rc_track_left_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_large_half_loop_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2256,10 +2256,10 @@ static void twister_rc_track_left_large_half_loop_up( /** rct2: 0x008ABDD4 */ static void twister_rc_track_right_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_large_half_loop_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2269,10 +2269,10 @@ static void twister_rc_track_right_large_half_loop_up( /** rct2: 0x008ABDE4 */ static void twister_rc_track_right_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_large_half_loop_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2282,10 +2282,10 @@ static void twister_rc_track_right_large_half_loop_down( /** rct2: 0x008ABDF4 */ static void twister_rc_track_left_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_large_half_loop_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2295,10 +2295,10 @@ static void twister_rc_track_left_large_half_loop_down( /** rct2: 0x008AC134 */ static void twister_rc_track_90_deg_to_inverted_flat_quarter_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up(session, rideIndex, trackSequence, direction, height, @@ -2308,10 +2308,10 @@ static void twister_rc_track_90_deg_to_inverted_flat_quarter_loop_up( /** rct2: 0x008AC144 */ static void twister_rc_track_inverted_flat_to_90_deg_quarter_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down(session, rideIndex, trackSequence, direction, height, @@ -2320,16 +2320,16 @@ static void twister_rc_track_inverted_flat_to_90_deg_quarter_loop_down( static void twister_rc_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_booster(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_TUBES); } -TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/VerticalDropRollerCoaster.cpp b/src/openrct2/ride/coaster/VerticalDropRollerCoaster.cpp index b4bc39a584..3001f92000 100644 --- a/src/openrct2/ride/coaster/VerticalDropRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/VerticalDropRollerCoaster.cpp @@ -15,10 +15,10 @@ /** rct2: 0x008AA00C */ static void vertical_drop_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -26,10 +26,10 @@ static void vertical_drop_rc_track_flat( static void vertical_drop_rc_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_station(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -38,10 +38,10 @@ static void vertical_drop_rc_track_station( /** rct2: 0x008AA01C */ static void vertical_drop_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -50,10 +50,10 @@ static void vertical_drop_rc_track_25_deg_up( /** rct2: 0x008AA02C */ static void vertical_drop_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -62,10 +62,10 @@ static void vertical_drop_rc_track_60_deg_up( /** rct2: 0x008AA03C */ static void vertical_drop_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -75,10 +75,10 @@ static void vertical_drop_rc_track_flat_to_25_deg_up( /** rct2: 0x008AA04C */ static void vertical_drop_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -88,10 +88,10 @@ static void vertical_drop_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008AA05C */ static void vertical_drop_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -101,10 +101,10 @@ static void vertical_drop_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008AA06C */ static void vertical_drop_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -114,10 +114,10 @@ static void vertical_drop_rc_track_25_deg_up_to_flat( /** rct2: 0x008AA07C */ static void vertical_drop_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -127,10 +127,10 @@ static void vertical_drop_rc_track_25_deg_down( /** rct2: 0x008AA08C */ static void vertical_drop_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -140,10 +140,10 @@ static void vertical_drop_rc_track_60_deg_down( /** rct2: 0x008AA09C */ static void vertical_drop_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -153,10 +153,10 @@ static void vertical_drop_rc_track_flat_to_25_deg_down( /** rct2: 0x008AA0AC */ static void vertical_drop_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -166,10 +166,10 @@ static void vertical_drop_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008AA0BC */ static void vertical_drop_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -179,10 +179,10 @@ static void vertical_drop_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008AA0CC */ static void vertical_drop_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -192,10 +192,10 @@ static void vertical_drop_rc_track_25_deg_down_to_flat( /** rct2: 0x008AA0DC */ static void vertical_drop_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -205,10 +205,10 @@ static void vertical_drop_rc_track_left_quarter_turn_5( /** rct2: 0x008AA0EC */ static void vertical_drop_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -218,10 +218,10 @@ static void vertical_drop_rc_track_right_quarter_turn_5( /** rct2: 0x008AA0FC */ static void vertical_drop_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -231,10 +231,10 @@ static void vertical_drop_rc_track_flat_to_left_bank( /** rct2: 0x008AA10C */ static void vertical_drop_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -244,10 +244,10 @@ static void vertical_drop_rc_track_flat_to_right_bank( /** rct2: 0x008AA11C */ static void vertical_drop_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -257,10 +257,10 @@ static void vertical_drop_rc_track_left_bank_to_flat( /** rct2: 0x008AA12C */ static void vertical_drop_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -270,10 +270,10 @@ static void vertical_drop_rc_track_right_bank_to_flat( /** rct2: 0x008AA13C */ static void vertical_drop_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_banked_left_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -283,10 +283,10 @@ static void vertical_drop_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008AA14C */ static void vertical_drop_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_banked_right_quarter_turn_5(session, rideIndex, trackSequence, direction, height, tileElement, @@ -296,10 +296,10 @@ static void vertical_drop_rc_track_banked_right_quarter_turn_5( /** rct2: 0x008AA15C */ static void vertical_drop_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -309,10 +309,10 @@ static void vertical_drop_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008AA16C */ static void vertical_drop_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -322,10 +322,10 @@ static void vertical_drop_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008AA17C */ static void vertical_drop_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -335,10 +335,10 @@ static void vertical_drop_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008AA18C */ static void vertical_drop_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -348,10 +348,10 @@ static void vertical_drop_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008AA19C */ static void vertical_drop_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -361,10 +361,10 @@ static void vertical_drop_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008AA1AC */ static void vertical_drop_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -374,10 +374,10 @@ static void vertical_drop_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008AA1BC */ static void vertical_drop_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -387,10 +387,10 @@ static void vertical_drop_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008AA1CC */ static void vertical_drop_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -400,10 +400,10 @@ static void vertical_drop_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008AA1DC */ static void vertical_drop_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -412,10 +412,10 @@ static void vertical_drop_rc_track_left_bank( /** rct2: 0x008AA1EC */ static void vertical_drop_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -424,10 +424,10 @@ static void vertical_drop_rc_track_right_bank( /** rct2: 0x008AA1FC */ static void vertical_drop_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -437,10 +437,10 @@ static void vertical_drop_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008AA20C */ static void vertical_drop_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -450,10 +450,10 @@ static void vertical_drop_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008AA21C */ static void vertical_drop_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -463,10 +463,10 @@ static void vertical_drop_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008AA22C */ static void vertical_drop_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -476,10 +476,10 @@ static void vertical_drop_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008AA23C */ static void vertical_drop_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_s_bend_left(session, rideIndex, trackSequence, direction, height, tileElement, @@ -489,10 +489,10 @@ static void vertical_drop_rc_track_s_bend_left( /** rct2: 0x008AA24C */ static void vertical_drop_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_s_bend_right(session, rideIndex, trackSequence, direction, height, tileElement, @@ -502,10 +502,10 @@ static void vertical_drop_rc_track_s_bend_right( /** rct2: 0x008AA49C */ static void vertical_drop_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_vertical_loop(session, rideIndex, trackSequence, direction, height, tileElement, @@ -515,10 +515,10 @@ static void vertical_drop_rc_track_left_vertical_loop( /** rct2: 0x008AA4AC */ static void vertical_drop_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_vertical_loop(session, rideIndex, trackSequence, direction, height, tileElement, @@ -528,10 +528,10 @@ static void vertical_drop_rc_track_right_vertical_loop( /** rct2: 0x008AA28C */ static void vertical_drop_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3(session, rideIndex, trackSequence, direction, height, tileElement, @@ -541,10 +541,10 @@ static void vertical_drop_rc_track_left_quarter_turn_3( /** rct2: 0x008AA29C */ static void vertical_drop_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3(session, rideIndex, trackSequence, direction, height, tileElement, @@ -554,10 +554,10 @@ static void vertical_drop_rc_track_right_quarter_turn_3( /** rct2: 0x008AA2AC */ static void vertical_drop_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -567,10 +567,10 @@ static void vertical_drop_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008AA2BC */ static void vertical_drop_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -580,10 +580,10 @@ static void vertical_drop_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008AA2CC */ static void vertical_drop_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -593,10 +593,10 @@ static void vertical_drop_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AA2DC */ static void vertical_drop_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -606,10 +606,10 @@ static void vertical_drop_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AA2EC */ static void vertical_drop_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -619,10 +619,10 @@ static void vertical_drop_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008AA2FC */ static void vertical_drop_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -632,10 +632,10 @@ static void vertical_drop_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008AA30C */ static void vertical_drop_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_up_small(session, rideIndex, trackSequence, direction, height, tileElement, @@ -645,10 +645,10 @@ static void vertical_drop_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008AA31C */ static void vertical_drop_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_up_small(session, rideIndex, trackSequence, direction, height, tileElement, @@ -658,10 +658,10 @@ static void vertical_drop_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008AA32C */ static void vertical_drop_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_down_small(session, rideIndex, trackSequence, direction, height, tileElement, @@ -671,10 +671,10 @@ static void vertical_drop_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008AA33C */ static void vertical_drop_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_down_small(session, rideIndex, trackSequence, direction, height, @@ -684,10 +684,10 @@ static void vertical_drop_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008AA34C */ static void vertical_drop_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_up_large(session, rideIndex, trackSequence, direction, height, tileElement, @@ -697,10 +697,10 @@ static void vertical_drop_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008AA35C */ static void vertical_drop_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_up_large(session, rideIndex, trackSequence, direction, height, tileElement, @@ -710,10 +710,10 @@ static void vertical_drop_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008AA36C */ static void vertical_drop_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_half_banked_helix_down_large(session, rideIndex, trackSequence, direction, height, tileElement, @@ -723,10 +723,10 @@ static void vertical_drop_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008AA37C */ static void vertical_drop_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_half_banked_helix_down_large(session, rideIndex, trackSequence, direction, height, @@ -736,10 +736,10 @@ static void vertical_drop_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008AA3AC */ static void vertical_drop_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -749,10 +749,10 @@ static void vertical_drop_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008AA38C */ static void vertical_drop_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -762,10 +762,10 @@ static void vertical_drop_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008AA39C */ static void vertical_drop_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -775,10 +775,10 @@ static void vertical_drop_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008AA3BC */ static void vertical_drop_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -788,10 +788,10 @@ static void vertical_drop_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008AA40C */ static void vertical_drop_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_brakes(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -800,10 +800,10 @@ static void vertical_drop_rc_track_brakes( /** rct2: 0x008AA7EC */ static void vertical_drop_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_left_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -813,10 +813,10 @@ static void vertical_drop_rc_track_25_deg_up_left_banked( /** rct2: 0x008AA7FC */ static void vertical_drop_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_right_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -826,10 +826,10 @@ static void vertical_drop_rc_track_25_deg_up_right_banked( /** rct2: 0x008AA41C */ static void vertical_drop_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_on_ride_photo(session, rideIndex, trackSequence, direction, height, tileElement, @@ -839,10 +839,10 @@ static void vertical_drop_rc_track_on_ride_photo( /** rct2: 0x008AA80C */ static void vertical_drop_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_left_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -852,10 +852,10 @@ static void vertical_drop_rc_track_25_deg_down_left_banked( /** rct2: 0x008AA81C */ static void vertical_drop_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_right_banked(session, rideIndex, trackSequence, direction, height, tileElement, @@ -865,10 +865,10 @@ static void vertical_drop_rc_track_25_deg_down_right_banked( /** rct2: 0x008AA42C */ static void vertical_drop_rc_track_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -877,10 +877,10 @@ static void vertical_drop_rc_track_90_deg_up( /** rct2: 0x008AA43C */ static void vertical_drop_rc_track_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -890,10 +890,10 @@ static void vertical_drop_rc_track_90_deg_down( /** rct2: 0x008AA44C */ static void vertical_drop_rc_track_60_deg_up_to_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -903,10 +903,10 @@ static void vertical_drop_rc_track_60_deg_up_to_90_deg_up( /** rct2: 0x008AA45C */ static void vertical_drop_rc_track_90_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -916,10 +916,10 @@ static void vertical_drop_rc_track_90_deg_down_to_60_deg_down( /** rct2: 0x008AA46C */ static void vertical_drop_rc_track_90_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -929,10 +929,10 @@ static void vertical_drop_rc_track_90_deg_up_to_60_deg_up( /** rct2: 0x008AA47C */ static void vertical_drop_rc_track_60_deg_down_to_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down_to_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -942,10 +942,10 @@ static void vertical_drop_rc_track_60_deg_down_to_90_deg_down( /** rct2: 0x008AA4CC */ static void vertical_drop_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -955,10 +955,10 @@ static void vertical_drop_rc_track_left_eighth_to_diag( /** rct2: 0x008AA4DC */ static void vertical_drop_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -968,10 +968,10 @@ static void vertical_drop_rc_track_right_eighth_to_diag( /** rct2: 0x008AA4EC */ static void vertical_drop_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -981,10 +981,10 @@ static void vertical_drop_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008AA4FC */ static void vertical_drop_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -994,10 +994,10 @@ static void vertical_drop_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008AA50C */ static void vertical_drop_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_bank_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1007,10 +1007,10 @@ static void vertical_drop_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008AA51C */ static void vertical_drop_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_bank_to_diag(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1020,10 +1020,10 @@ static void vertical_drop_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008AA52C */ static void vertical_drop_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_eighth_bank_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1033,10 +1033,10 @@ static void vertical_drop_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008AA53C */ static void vertical_drop_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_eighth_bank_to_orthogonal(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1046,10 +1046,10 @@ static void vertical_drop_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008AA4BC */ static void vertical_drop_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); @@ -1058,10 +1058,10 @@ static void vertical_drop_rc_track_diag_flat( /** rct2: 0x008AA56C */ static void vertical_drop_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1071,10 +1071,10 @@ static void vertical_drop_rc_track_diag_25_deg_up( /** rct2: 0x008AA5CC */ static void vertical_drop_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1084,10 +1084,10 @@ static void vertical_drop_rc_track_diag_60_deg_up( /** rct2: 0x008AA54C */ static void vertical_drop_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1097,10 +1097,10 @@ static void vertical_drop_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008AA5AC */ static void vertical_drop_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1110,10 +1110,10 @@ static void vertical_drop_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008AA5BC */ static void vertical_drop_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1123,10 +1123,10 @@ static void vertical_drop_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008AA55C */ static void vertical_drop_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1136,10 +1136,10 @@ static void vertical_drop_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008AA59C */ static void vertical_drop_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1149,10 +1149,10 @@ static void vertical_drop_rc_track_diag_25_deg_down( /** rct2: 0x008AA5FC */ static void vertical_drop_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1162,10 +1162,10 @@ static void vertical_drop_rc_track_diag_60_deg_down( /** rct2: 0x008AA57C */ static void vertical_drop_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1175,10 +1175,10 @@ static void vertical_drop_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008AA5DC */ static void vertical_drop_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1188,10 +1188,10 @@ static void vertical_drop_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008AA5EC */ static void vertical_drop_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1201,10 +1201,10 @@ static void vertical_drop_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008AA58C */ static void vertical_drop_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1214,10 +1214,10 @@ static void vertical_drop_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008AA62C */ static void vertical_drop_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1227,10 +1227,10 @@ static void vertical_drop_rc_track_diag_flat_to_left_bank( /** rct2: 0x008AA63C */ static void vertical_drop_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1240,10 +1240,10 @@ static void vertical_drop_rc_track_diag_flat_to_right_bank( /** rct2: 0x008AA64C */ static void vertical_drop_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1253,10 +1253,10 @@ static void vertical_drop_rc_track_diag_left_bank_to_flat( /** rct2: 0x008AA65C */ static void vertical_drop_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1266,10 +1266,10 @@ static void vertical_drop_rc_track_diag_right_bank_to_flat( /** rct2: 0x008AA68C */ static void vertical_drop_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1279,10 +1279,10 @@ static void vertical_drop_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008AA69C */ static void vertical_drop_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1292,10 +1292,10 @@ static void vertical_drop_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008AA66C */ static void vertical_drop_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1305,10 +1305,10 @@ static void vertical_drop_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008AA67C */ static void vertical_drop_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_up_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1318,10 +1318,10 @@ static void vertical_drop_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008AA6AC */ static void vertical_drop_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1331,10 +1331,10 @@ static void vertical_drop_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008AA6BC */ static void vertical_drop_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1344,10 +1344,10 @@ static void vertical_drop_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008AA6CC */ static void vertical_drop_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1357,10 +1357,10 @@ static void vertical_drop_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008AA6DC */ static void vertical_drop_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_25_deg_down_to_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1370,10 +1370,10 @@ static void vertical_drop_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008AA60C */ static void vertical_drop_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_left_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1383,10 +1383,10 @@ static void vertical_drop_rc_track_diag_left_bank( /** rct2: 0x008AA61C */ static void vertical_drop_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_right_bank(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1396,10 +1396,10 @@ static void vertical_drop_rc_track_diag_right_bank( /** rct2: 0x008AA72C */ static void vertical_drop_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1409,10 +1409,10 @@ static void vertical_drop_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AA73C */ static void vertical_drop_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1422,10 +1422,10 @@ static void vertical_drop_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AA74C */ static void vertical_drop_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank(session, rideIndex, trackSequence, direction, height, @@ -1435,10 +1435,10 @@ static void vertical_drop_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( /** rct2: 0x008AA75C */ static void vertical_drop_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank(session, rideIndex, trackSequence, direction, @@ -1448,10 +1448,10 @@ static void vertical_drop_rc_track_right_quarter_turn_3_25_deg_down_to_right_ban /** rct2: 0x008AA9EC */ static void vertical_drop_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_block_brakes(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1461,10 +1461,10 @@ static void vertical_drop_rc_track_block_brakes( /** rct2: 0x008AA96C */ static void vertical_drop_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1474,10 +1474,10 @@ static void vertical_drop_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008AA97C */ static void vertical_drop_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1487,10 +1487,10 @@ static void vertical_drop_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008AA98C */ static void vertical_drop_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1500,10 +1500,10 @@ static void vertical_drop_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008AA99C */ static void vertical_drop_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1513,10 +1513,10 @@ static void vertical_drop_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008AA8AC */ static void vertical_drop_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1526,10 +1526,10 @@ static void vertical_drop_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008AA8BC */ static void vertical_drop_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1539,10 +1539,10 @@ static void vertical_drop_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008AA8CC */ static void vertical_drop_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1552,10 +1552,10 @@ static void vertical_drop_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008AA8DC */ static void vertical_drop_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1565,10 +1565,10 @@ static void vertical_drop_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008AA82C */ static void vertical_drop_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1578,10 +1578,10 @@ static void vertical_drop_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008AA83C */ static void vertical_drop_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1591,10 +1591,10 @@ static void vertical_drop_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008AA84C */ static void vertical_drop_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1604,10 +1604,10 @@ static void vertical_drop_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008AA85C */ static void vertical_drop_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1617,10 +1617,10 @@ static void vertical_drop_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008AA86C */ static void vertical_drop_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1630,10 +1630,10 @@ static void vertical_drop_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008AA87C */ static void vertical_drop_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1643,10 +1643,10 @@ static void vertical_drop_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008AA88C */ static void vertical_drop_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1656,10 +1656,10 @@ static void vertical_drop_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008AA89C */ static void vertical_drop_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1669,10 +1669,10 @@ static void vertical_drop_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008AA8EC */ static void vertical_drop_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1682,10 +1682,10 @@ static void vertical_drop_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008AA8FC */ static void vertical_drop_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, @@ -1695,10 +1695,10 @@ static void vertical_drop_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008AA92C */ static void vertical_drop_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1708,10 +1708,10 @@ static void vertical_drop_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008AA93C */ static void vertical_drop_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1721,10 +1721,10 @@ static void vertical_drop_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008AA94C */ static void vertical_drop_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1734,10 +1734,10 @@ static void vertical_drop_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008AA95C */ static void vertical_drop_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, @@ -1747,10 +1747,10 @@ static void vertical_drop_rc_track_right_banked_flat_to_right_banked_25_deg_down /** rct2: 0x008AA90C */ static void vertical_drop_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1760,10 +1760,10 @@ static void vertical_drop_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008AA91C */ static void vertical_drop_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat(session, rideIndex, trackSequence, direction, height, @@ -1773,10 +1773,10 @@ static void vertical_drop_rc_track_right_banked_25_deg_down_to_right_banked_flat /** rct2: 0x008AA76C */ static void vertical_drop_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1786,10 +1786,10 @@ static void vertical_drop_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008AA77C */ static void vertical_drop_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1799,10 +1799,10 @@ static void vertical_drop_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008AA78C */ static void vertical_drop_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1812,10 +1812,10 @@ static void vertical_drop_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008AA79C */ static void vertical_drop_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1825,10 +1825,10 @@ static void vertical_drop_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008AA7AC */ static void vertical_drop_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_left_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1838,10 +1838,10 @@ static void vertical_drop_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008AA7BC */ static void vertical_drop_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_right_banked_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1851,10 +1851,10 @@ static void vertical_drop_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008AA7CC */ static void vertical_drop_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_banked_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1864,10 +1864,10 @@ static void vertical_drop_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008AA7DC */ static void vertical_drop_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_banked_25_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1877,10 +1877,10 @@ static void vertical_drop_rc_track_right_banked_25_deg_down_to_flat( /** rct2: 0x008AA9AC */ static void vertical_drop_rc_track_left_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1890,10 +1890,10 @@ static void vertical_drop_rc_track_left_quarter_turn_1_90_deg_up( /** rct2: 0x008AA9BC */ static void vertical_drop_rc_track_right_quarter_turn_1_90_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_90_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1903,10 +1903,10 @@ static void vertical_drop_rc_track_right_quarter_turn_1_90_deg_up( /** rct2: 0x008AA9CC */ static void vertical_drop_rc_track_left_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_quarter_turn_1_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1916,10 +1916,10 @@ static void vertical_drop_rc_track_left_quarter_turn_1_90_deg_down( /** rct2: 0x008AA9DC */ static void vertical_drop_rc_track_right_quarter_turn_1_90_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_quarter_turn_1_90_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1930,10 +1930,10 @@ static void vertical_drop_rc_track_right_quarter_turn_1_90_deg_down( /** rct2: 0x008AA3CC */ static void vertical_drop_rc_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1943,10 +1943,10 @@ static void vertical_drop_rc_track_flat_to_60_deg_up( /** rct2: 0x008AA3DC */ static void vertical_drop_rc_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1956,10 +1956,10 @@ static void vertical_drop_rc_track_60_deg_up_to_flat( /** rct2: 0x008AA3EC */ static void vertical_drop_rc_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1969,10 +1969,10 @@ static void vertical_drop_rc_track_flat_to_60_deg_down( /** rct2: 0x008AA3FC */ static void vertical_drop_rc_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1982,10 +1982,10 @@ static void vertical_drop_rc_track_60_deg_down_to_flat( /** rct2: 0x008AA48C */ static void vertical_drop_rc_track_brake_for_drop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_brake_for_drop(session, rideIndex, trackSequence, direction, height, tileElement, @@ -1995,10 +1995,10 @@ static void vertical_drop_rc_track_brake_for_drop( /** rct2: 0x008AA6EC */ static void vertical_drop_rc_track_diag_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2008,10 +2008,10 @@ static void vertical_drop_rc_track_diag_flat_to_60_deg_up( /** rct2: 0x008AA6FC */ static void vertical_drop_rc_track_diag_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_up_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2021,10 +2021,10 @@ static void vertical_drop_rc_track_diag_60_deg_up_to_flat( /** rct2: 0x008AA70C */ static void vertical_drop_rc_track_diag_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_flat_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2034,10 +2034,10 @@ static void vertical_drop_rc_track_diag_flat_to_60_deg_down( /** rct2: 0x008AA71C */ static void vertical_drop_rc_track_diag_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_diag_60_deg_down_to_flat(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2047,10 +2047,10 @@ static void vertical_drop_rc_track_diag_60_deg_down_to_flat( /* The following elements used to be specific to the steel twister RC */ static void vertical_drop_rc_track_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_half_loop_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2059,10 +2059,10 @@ static void vertical_drop_rc_track_half_loop_up( static void vertical_drop_rc_track_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_half_loop_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2071,10 +2071,10 @@ static void vertical_drop_rc_track_half_loop_down( static void vertical_drop_rc_track_left_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_corkscrew_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2083,10 +2083,10 @@ static void vertical_drop_rc_track_left_corkscrew_up( static void vertical_drop_rc_track_right_corkscrew_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_corkscrew_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2095,10 +2095,10 @@ static void vertical_drop_rc_track_right_corkscrew_up( static void vertical_drop_rc_track_left_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_corkscrew_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2107,10 +2107,10 @@ static void vertical_drop_rc_track_left_corkscrew_down( static void vertical_drop_rc_track_right_corkscrew_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_corkscrew_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2119,10 +2119,10 @@ static void vertical_drop_rc_track_right_corkscrew_down( static void vertical_drop_rc_track_flat_to_60_deg_up_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_up_long_base(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2131,10 +2131,10 @@ static void vertical_drop_rc_track_flat_to_60_deg_up_long_base( static void vertical_drop_rc_track_60_deg_up_to_flat_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat_long_base(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2143,10 +2143,10 @@ static void vertical_drop_rc_track_60_deg_up_to_flat_long_base( static void vertical_drop_rc_track_flat_to_60_deg_down_long_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_flat_to_60_deg_down_long_base(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2155,10 +2155,10 @@ static void vertical_drop_rc_track_flat_to_60_deg_down_long_base( static void vertical_drop_rc_track_60_deg_up_to_flat_long_base122( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_60_deg_up_to_flat_long_base122(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2167,10 +2167,10 @@ static void vertical_drop_rc_track_60_deg_up_to_flat_long_base122( static void vertical_drop_rc_track_left_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_barrel_roll_up_to_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2179,10 +2179,10 @@ static void vertical_drop_rc_track_left_barrel_roll_up_to_down( static void vertical_drop_rc_track_right_barrel_roll_up_to_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_barrel_roll_up_to_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2191,10 +2191,10 @@ static void vertical_drop_rc_track_right_barrel_roll_up_to_down( static void vertical_drop_rc_track_left_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_barrel_roll_down_to_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2203,10 +2203,10 @@ static void vertical_drop_rc_track_left_barrel_roll_down_to_up( static void vertical_drop_rc_track_right_barrel_roll_down_to_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_barrel_roll_down_to_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2215,10 +2215,10 @@ static void vertical_drop_rc_track_right_barrel_roll_down_to_up( static void vertical_drop_rc_track_powered_lift( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_powered_lift(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2227,10 +2227,10 @@ static void vertical_drop_rc_track_powered_lift( static void vertical_drop_rc_track_left_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_large_half_loop_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2239,10 +2239,10 @@ static void vertical_drop_rc_track_left_large_half_loop_up( static void vertical_drop_rc_track_right_large_half_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_large_half_loop_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2251,10 +2251,10 @@ static void vertical_drop_rc_track_right_large_half_loop_up( static void vertical_drop_rc_track_right_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_right_large_half_loop_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2263,10 +2263,10 @@ static void vertical_drop_rc_track_right_large_half_loop_down( static void vertical_drop_rc_track_left_large_half_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_left_large_half_loop_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -2275,10 +2275,10 @@ static void vertical_drop_rc_track_left_large_half_loop_down( static void vertical_drop_rc_track_90_deg_to_inverted_flat_quarter_loop_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up(session, rideIndex, trackSequence, direction, height, @@ -2287,10 +2287,10 @@ static void vertical_drop_rc_track_90_deg_to_inverted_flat_quarter_loop_up( static void vertical_drop_rc_track_inverted_flat_to_90_deg_quarter_loop_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down(session, rideIndex, trackSequence, direction, height, @@ -2299,16 +2299,16 @@ static void vertical_drop_rc_track_inverted_flat_to_90_deg_quarter_loop_down( static void vertical_drop_rc_track_booster( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bolliger_mabillard_track_booster(session, rideIndex, trackSequence, direction, height, tileElement, METAL_SUPPORTS_BOXED); } -TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/VirginiaReel.cpp b/src/openrct2/ride/coaster/VirginiaReel.cpp index 8216737a80..5b230ccd41 100644 --- a/src/openrct2/ride/coaster/VirginiaReel.cpp +++ b/src/openrct2/ride/coaster/VirginiaReel.cpp @@ -73,63 +73,63 @@ enum SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SE_NW = 21503, }; -static constexpr const uint32 virginia_reel_track_pieces_flat[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_flat[4] = { SPR_VIRGINIA_REEL_FLAT_SW_NE, SPR_VIRGINIA_REEL_FLAT_NW_SE, SPR_VIRGINIA_REEL_FLAT_SW_NE, SPR_VIRGINIA_REEL_FLAT_NW_SE, }; -static constexpr const uint32 virginia_reel_track_pieces_flat_lift_hill[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_flat_lift_hill[4] = { SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_flat_to_25_deg_up[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_flat_to_25_deg_up[4] = { SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_SW_NE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_NW_SE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_NE_SW, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill[4] = { SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_25_deg_up_to_flat[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_25_deg_up_to_flat[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_25_deg_up[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_25_deg_up[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_25_deg_up_lift_hill[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_25_deg_up_lift_hill[4] = { SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SW_NE, SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_NW_SE, SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_NE_SW, SPR_VIRGINIA_REEL_25_DEG_UP_LIFT_HILL_SE_NW, }; -static constexpr const uint32 virginia_reel_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -140,7 +140,7 @@ static constexpr const uint32 virginia_reel_track_pieces_flat_quarter_turn_3_til SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static constexpr const uint32 virginia_reel_track_pieces_flat_quarter_turn_1_tile[4] = { +static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_1_tile[4] = { SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_SW_NW, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_NW_NE, SPR_VIRGINIA_REEL_FLAT_QUARTER_TURN_1_TILE_NE_SE, @@ -151,14 +151,14 @@ static constexpr const uint32 virginia_reel_track_pieces_flat_quarter_turn_1_til * * rct2: 0x006D5B48 */ -void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_virginia_reel(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 image_id; - sint32 baseImage_id = imageDirection; - const uint8 rotation = session->CurrentRotation; - sint32 ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31; - sint32 j = 0; + int32_t image_id; + int32_t baseImage_id = imageDirection; + const uint8_t rotation = session->CurrentRotation; + int32_t ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31; + int32_t j = 0; if (vehicle->vehicle_sprite_type == 0) { baseImage_id = ecx & 7; @@ -201,12 +201,12 @@ void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imag if (session->DPI->zoom_level < 2 && vehicle->num_peeps > 0) { - uint8 riding_peep_sprites[4] = { 0xFF, 0xFF, 0xFF, 0xFF }; - for (sint32 i = 0; i < vehicle->num_peeps; i++) + uint8_t riding_peep_sprites[4] = { 0xFF, 0xFF, 0xFF, 0xFF }; + for (int32_t i = 0; i < vehicle->num_peeps; i++) { riding_peep_sprites[((ecx / 8) + i) & 3] = vehicle->peep_tshirt_colours[i]; } - sint32 draw_order[4] = { 0, 1, 3, 2 }; + int32_t draw_order[4] = { 0, 1, 3, 2 }; for (auto i : draw_order) { if (riding_peep_sprites[i] != 0xFF) @@ -226,19 +226,19 @@ void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imag /** rct2: 0x00811264 */ static void paint_virginia_reel_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint32 * sprites = virginia_reel_track_pieces_flat; + const uint32_t * sprites = virginia_reel_track_pieces_flat; if (track_element_is_lift_hill(tileElement)) { sprites = virginia_reel_track_pieces_flat_lift_hill; } - uint32 imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; if (direction & 1) { sub_98197C(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height); @@ -259,19 +259,19 @@ static void paint_virginia_reel_track_flat( /** rct2: 0x00811274 */ static void paint_virginia_reel_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint32 * sprites = virginia_reel_track_pieces_25_deg_up; + const uint32_t * sprites = virginia_reel_track_pieces_25_deg_up; if (track_element_is_lift_hill(tileElement)) { sprites = virginia_reel_track_pieces_25_deg_up_lift_hill; } - uint32 imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; paint_struct * ps; if (direction & 1) @@ -315,19 +315,19 @@ static void paint_virginia_reel_track_25_deg_up( /** rct2: 0x00811294 */ static void paint_virginia_reel_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint32 * sprites = virginia_reel_track_pieces_flat_to_25_deg_up; + const uint32_t * sprites = virginia_reel_track_pieces_flat_to_25_deg_up; if (track_element_is_lift_hill(tileElement)) { sprites = virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill; } - uint32 imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; paint_struct * ps; switch (direction) { @@ -366,19 +366,19 @@ static void paint_virginia_reel_track_flat_to_25_deg_up( /** rct2: 0x00811294 */ static void paint_virginia_reel_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint32 * sprites = virginia_reel_track_pieces_25_deg_up_to_flat; + const uint32_t * sprites = virginia_reel_track_pieces_25_deg_up_to_flat; if (track_element_is_lift_hill(tileElement)) { sprites = virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill; } - uint32 imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK]; paint_struct * ps; if (direction & 1) @@ -422,10 +422,10 @@ static void paint_virginia_reel_track_25_deg_up_to_flat( /** rct2: 0x008112A4 */ static void paint_virginia_reel_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_virginia_reel_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -434,10 +434,10 @@ static void paint_virginia_reel_track_25_deg_down( /** rct2: 0x008112B4 */ static void paint_virginia_reel_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_virginia_reel_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -446,10 +446,10 @@ static void paint_virginia_reel_track_flat_to_25_deg_down( /** rct2: 0x008112C4 */ static void paint_virginia_reel_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_virginia_reel_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -458,13 +458,13 @@ static void paint_virginia_reel_track_25_deg_down_to_flat( /** rct2: 0x008112D4, 0x008112E4, 0x008112F4 */ static void paint_virginia_reel_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -494,15 +494,15 @@ static void paint_virginia_reel_station( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint8 virginia_reel_left_quarter_turn_supports[] = { 5, 2, 3, 4 }; +static constexpr const uint8_t virginia_reel_left_quarter_turn_supports[] = { 5, 2, 3, 4 }; /** rct2: 0x00811304 */ static void paint_virginia_reel_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_3_tiles_paint( @@ -527,15 +527,15 @@ static void paint_virginia_reel_track_left_quarter_turn_3_tiles( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint8 virginia_reel_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; +static constexpr const uint8_t virginia_reel_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; /** rct2: 0x00811314 */ static void paint_virginia_reel_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = virginia_reel_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; @@ -546,10 +546,10 @@ static void paint_virginia_reel_track_right_quarter_turn_3_tiles( /** rct2: 0x00811324 */ static void paint_virginia_reel_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_1_tile_paint( @@ -583,10 +583,10 @@ static void paint_virginia_reel_track_left_quarter_turn_1_tile( /** rct2: 0x00811334 */ static void paint_virginia_reel_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_virginia_reel_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, @@ -596,7 +596,7 @@ static void paint_virginia_reel_track_right_quarter_turn_1_tile( /** * rct2: 0x00811184 */ -TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 8fa23c898b..3bdfaa5973 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -148,14 +148,14 @@ enum SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SE_NE_PART_1 = 17025, }; -static constexpr const uint32 _wild_mouse_brakes_image_ids[4] = { +static constexpr const uint32_t _wild_mouse_brakes_image_ids[4] = { SPR_WILD_MOUSE_BRAKES_SW_NE, SPR_WILD_MOUSE_BRAKES_NW_SE, SPR_WILD_MOUSE_BRAKES_SW_NE, SPR_WILD_MOUSE_BRAKES_NW_SE, }; -static constexpr const uint32 _wild_mouse_block_brakes_image_ids[4] = { +static constexpr const uint32_t _wild_mouse_block_brakes_image_ids[4] = { SPR_WILD_MOUSE_BLOCK_BRAKES_SW_NE, SPR_WILD_MOUSE_BLOCK_BRAKES_NW_SE, SPR_WILD_MOUSE_BLOCK_BRAKES_SW_NE, @@ -165,21 +165,21 @@ static constexpr const uint32 _wild_mouse_block_brakes_image_ids[4] = { /** rct2: 0x0078B1E4 */ static void wild_mouse_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_FLAT_SW_NE, SPR_WILD_MOUSE_FLAT_CHAIN_SW_NE }, { SPR_WILD_MOUSE_FLAT_NW_SE, SPR_WILD_MOUSE_FLAT_CHAIN_NW_SE }, { SPR_WILD_MOUSE_FLAT_SW_NE, SPR_WILD_MOUSE_FLAT_CHAIN_NE_SW }, { SPR_WILD_MOUSE_FLAT_NW_SE, SPR_WILD_MOUSE_FLAT_CHAIN_SE_NW }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -193,20 +193,20 @@ static void wild_mouse_track_flat( static void wild_mouse_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 baseImageIds[4] = { + static constexpr const uint32_t baseImageIds[4] = { SPR_STATION_BASE_B_SW_NE, SPR_STATION_BASE_B_NW_SE, SPR_STATION_BASE_B_SW_NE, SPR_STATION_BASE_B_NW_SE, }; - sint32 trackType = track_element_get_type(tileElement); + int32_t trackType = track_element_get_type(tileElement); sub_98197C_rotated(session, direction, baseImageIds[direction] | session->TrackColours[SCHEME_MISC], 0, 0, 32, 28, 2, height - 2, 0, 2, height); if (trackType == TRACK_ELEM_END_STATION) @@ -230,21 +230,21 @@ static void wild_mouse_track_station( /** rct2: 0x0078B1F4 */ static void wild_mouse_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_25_DEG_SW_NE, SPR_WILD_MOUSE_25_DEG_CHAIN_SW_NE }, { SPR_WILD_MOUSE_25_DEG_NW_SE, SPR_WILD_MOUSE_25_DEG_CHAIN_NW_SE }, { SPR_WILD_MOUSE_25_DEG_NE_SW, SPR_WILD_MOUSE_25_DEG_CHAIN_NE_SW }, { SPR_WILD_MOUSE_25_DEG_SE_NW, SPR_WILD_MOUSE_25_DEG_CHAIN_SE_NW }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -266,21 +266,21 @@ static void wild_mouse_track_25_deg_up( /** rct2: 0x0078B204 */ static void wild_mouse_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_60_DEG_SW_NE, SPR_WILD_MOUSE_60_DEG_CHAIN_SW_NE }, { SPR_WILD_MOUSE_60_DEG_NW_SE, SPR_WILD_MOUSE_60_DEG_CHAIN_NW_SE }, { SPR_WILD_MOUSE_60_DEG_NE_SW, SPR_WILD_MOUSE_60_DEG_CHAIN_NE_SW }, { SPR_WILD_MOUSE_60_DEG_SE_NW, SPR_WILD_MOUSE_60_DEG_CHAIN_SE_NW }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 3) { sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); @@ -316,21 +316,21 @@ static void wild_mouse_track_60_deg_up( /** rct2: 0x0078B214 */ static void wild_mouse_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_FLAT_TO_25_DEG_SW_NE, SPR_WILD_MOUSE_FLAT_TO_25_DEG_CHAIN_SW_NE }, { SPR_WILD_MOUSE_FLAT_TO_25_DEG_NW_SE, SPR_WILD_MOUSE_FLAT_TO_25_DEG_CHAIN_NW_SE }, { SPR_WILD_MOUSE_FLAT_TO_25_DEG_NE_SW, SPR_WILD_MOUSE_FLAT_TO_25_DEG_CHAIN_NE_SW }, { SPR_WILD_MOUSE_FLAT_TO_25_DEG_SE_NW, SPR_WILD_MOUSE_FLAT_TO_25_DEG_CHAIN_SE_NW }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -352,28 +352,28 @@ static void wild_mouse_track_flat_to_25_deg_up( /** rct2: 0x0078B224 */ static void wild_mouse_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_25_DEG_TO_60_DEG_SW_NE, SPR_WILD_MOUSE_25_DEG_TO_60_DEG_CHAIN_SW_NE }, { SPR_WILD_MOUSE_25_DEG_TO_60_DEG_NW_SE, SPR_WILD_MOUSE_25_DEG_TO_60_DEG_CHAIN_NW_SE }, { SPR_WILD_MOUSE_25_DEG_TO_60_DEG_NE_SW, SPR_WILD_MOUSE_25_DEG_TO_60_DEG_CHAIN_NE_SW }, { SPR_WILD_MOUSE_25_DEG_TO_60_DEG_SE_NW, SPR_WILD_MOUSE_25_DEG_TO_60_DEG_CHAIN_SE_NW }, }; - static constexpr const uint32 frontImageIds[4][2] = { + static constexpr const uint32_t frontImageIds[4][2] = { { 0, 0 }, { SPR_WILD_MOUSE_25_DEG_TO_60_DEG_FRONT_NW_SE, SPR_WILD_MOUSE_25_DEG_TO_60_DEG_CHAIN_FRONT_NW_SE }, { SPR_WILD_MOUSE_25_DEG_TO_60_DEG_FRONT_NE_SW, SPR_WILD_MOUSE_25_DEG_TO_60_DEG_CHAIN_FRONT_NE_SW }, { 0, 0 }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 3) { sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); @@ -403,28 +403,28 @@ static void wild_mouse_track_25_deg_up_to_60_deg_up( /** rct2: 0x0078B234 */ static void wild_mouse_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_60_DEG_TO_25_DEG_SW_NE, SPR_WILD_MOUSE_60_DEG_TO_25_DEG_CHAIN_SW_NE }, { SPR_WILD_MOUSE_60_DEG_TO_25_DEG_NW_SE, SPR_WILD_MOUSE_60_DEG_TO_25_DEG_CHAIN_NW_SE }, { SPR_WILD_MOUSE_60_DEG_TO_25_DEG_NE_SW, SPR_WILD_MOUSE_60_DEG_TO_25_DEG_CHAIN_NE_SW }, { SPR_WILD_MOUSE_60_DEG_TO_25_DEG_SE_NW, SPR_WILD_MOUSE_60_DEG_TO_25_DEG_CHAIN_SE_NW }, }; - static constexpr const uint32 frontImageIds[4][2] = { + static constexpr const uint32_t frontImageIds[4][2] = { { 0, 0 }, { SPR_WILD_MOUSE_60_DEG_TO_25_DEG_FRONT_NW_SE, SPR_WILD_MOUSE_60_DEG_TO_25_DEG_CHAIN_FRONT_NW_SE }, { SPR_WILD_MOUSE_60_DEG_TO_25_DEG_FRONT_NE_SW, SPR_WILD_MOUSE_60_DEG_TO_25_DEG_CHAIN_FRONT_NE_SW }, { 0, 0 }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 3) { sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); @@ -454,21 +454,21 @@ static void wild_mouse_track_60_deg_up_to_25_deg_up( /** rct2: 0x0078B244 */ static void wild_mouse_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_25_DEG_TO_FLAT_SW_NE, SPR_WILD_MOUSE_25_DEG_TO_FLAT_CHAIN_SW_NE }, { SPR_WILD_MOUSE_25_DEG_TO_FLAT_NW_SE, SPR_WILD_MOUSE_25_DEG_TO_FLAT_CHAIN_NW_SE }, { SPR_WILD_MOUSE_25_DEG_TO_FLAT_NE_SW, SPR_WILD_MOUSE_25_DEG_TO_FLAT_CHAIN_NE_SW }, { SPR_WILD_MOUSE_25_DEG_TO_FLAT_SE_NW, SPR_WILD_MOUSE_25_DEG_TO_FLAT_CHAIN_SE_NW }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -490,10 +490,10 @@ static void wild_mouse_track_25_deg_up_to_flat( /** rct2: 0x0078B254 */ static void wild_mouse_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -502,10 +502,10 @@ static void wild_mouse_track_25_deg_down( /** rct2: 0x0078B264 */ static void wild_mouse_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -514,10 +514,10 @@ static void wild_mouse_track_60_deg_down( /** rct2: 0x0078B274 */ static void wild_mouse_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -526,10 +526,10 @@ static void wild_mouse_track_flat_to_25_deg_down( /** rct2: 0x0078B284 */ static void wild_mouse_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -538,10 +538,10 @@ static void wild_mouse_track_25_deg_down_to_60_deg_down( /** rct2: 0x0078B294 */ static void wild_mouse_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -550,10 +550,10 @@ static void wild_mouse_track_60_deg_down_to_25_deg_down( /** rct2: 0x0078B2A4 */ static void wild_mouse_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -561,10 +561,10 @@ static void wild_mouse_track_25_deg_down_to_flat( static void wild_mouse_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][3] = { @@ -602,7 +602,7 @@ static void wild_mouse_track_right_quarter_turn_3( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -621,10 +621,10 @@ static void wild_mouse_track_right_quarter_turn_3( static void wild_mouse_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][2] = { @@ -645,15 +645,15 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_DOWN_SE_NE_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, } }; - static constexpr const sint16 generalSupportHeights[] = { 72, 56, 56, 72 }; + static constexpr const int16_t generalSupportHeights[] = { 72, 56, 56, 72 }; if (trackSequence == 0 || trackSequence == 3) { - sint32 part = trackSequence == 0 ? 0 : 1; + int32_t part = trackSequence == 0 ? 0 : 1; const sprite_bb * sbb = &imageIds[direction][part]; sub_98196C( - session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], (sint8)sbb->offset.x, (sint8)sbb->offset.y, - sbb->bb_size.x, sbb->bb_size.y, (sint8)sbb->bb_size.z, height + (sint8)sbb->offset.z); + session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], (int8_t)sbb->offset.x, (int8_t)sbb->offset.y, + sbb->bb_size.x, sbb->bb_size.y, (int8_t)sbb->bb_size.z, height + (int8_t)sbb->offset.z); } track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(session, height, direction, trackSequence, TUNNEL_2, @@ -667,7 +667,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -683,10 +683,10 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( static void wild_mouse_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -697,10 +697,10 @@ static void wild_mouse_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x0078B314 */ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][2] = { @@ -721,15 +721,15 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( { SPR_WILD_MOUSE_QUARTER_TURN_3_25_DEG_UP_SE_NE_PART_1, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 3 } }, } }; - static constexpr const sint16 generalSupportHeights[] = { 72, 56, 56, 72 }; + static constexpr const int16_t generalSupportHeights[] = { 72, 56, 56, 72 }; if (trackSequence == 0 || trackSequence == 3) { - sint32 part = trackSequence == 0 ? 0 : 1; + int32_t part = trackSequence == 0 ? 0 : 1; const sprite_bb * sbb = &imageIds[direction][part]; sub_98196C( - session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], (sint8)sbb->offset.x, (sint8)sbb->offset.y, - sbb->bb_size.x, sbb->bb_size.y, (sint8)sbb->bb_size.z, height + (sint8)sbb->offset.z); + session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], (int8_t)sbb->offset.x, (int8_t)sbb->offset.y, + sbb->bb_size.x, sbb->bb_size.y, (int8_t)sbb->bb_size.z, height + (int8_t)sbb->offset.z); } track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2); @@ -751,7 +751,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -768,10 +768,10 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x0078B324 */ static void wild_mouse_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -780,10 +780,10 @@ static void wild_mouse_track_left_quarter_turn_3_25_deg_down( static void wild_mouse_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -793,20 +793,20 @@ static void wild_mouse_track_left_quarter_turn_3( /** rct2: 0x0078B394 */ static void wild_mouse_track_left_quarter_turn_1( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_WILD_MOUSE_QUARTER_TURN_1_SW_NE, SPR_WILD_MOUSE_QUARTER_TURN_1_NW_SE, SPR_WILD_MOUSE_QUARTER_TURN_1_NE_SW, SPR_WILD_MOUSE_QUARTER_TURN_1_SE_NW, }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; switch (direction) { case 0: @@ -832,10 +832,10 @@ static void wild_mouse_track_left_quarter_turn_1( /** rct2: 0x0078B3A4 */ static void wild_mouse_track_right_quarter_turn_1( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_left_quarter_turn_1(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -844,28 +844,28 @@ static void wild_mouse_track_right_quarter_turn_1( /** rct2: 0x0078B354 */ static void wild_mouse_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_FLAT_TO_60_DEG_SW_NE, SPR_WILD_MOUSE_FLAT_TO_60_DEG_CHAIN_SW_NE }, { SPR_WILD_MOUSE_FLAT_TO_60_DEG_NW_SE, SPR_WILD_MOUSE_FLAT_TO_60_DEG_CHAIN_NW_SE }, { SPR_WILD_MOUSE_FLAT_TO_60_DEG_NE_SW, SPR_WILD_MOUSE_FLAT_TO_60_DEG_CHAIN_NE_SW }, { SPR_WILD_MOUSE_FLAT_TO_60_DEG_SE_NW, SPR_WILD_MOUSE_FLAT_TO_60_DEG_CHAIN_SE_NW }, }; - static constexpr const uint32 frontImageIds[4][2] = { + static constexpr const uint32_t frontImageIds[4][2] = { { 0, 0 }, { SPR_WILD_MOUSE_FLAT_TO_60_DEG_FRONT_NW_SE, SPR_WILD_MOUSE_FLAT_TO_60_DEG_CHAIN_FRONT_NW_SE }, { SPR_WILD_MOUSE_FLAT_TO_60_DEG_FRONT_NE_SW, SPR_WILD_MOUSE_FLAT_TO_60_DEG_CHAIN_FRONT_NE_SW }, { 0, 0 }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 3) { sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 27, 2, height, 0, 2, height); @@ -895,28 +895,28 @@ static void wild_mouse_track_flat_to_60_deg_up( /** rct2: 0x0078B364 */ static void wild_mouse_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WILD_MOUSE_60_DEG_TO_FLAT_SW_NE, SPR_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_SW_NE }, { SPR_WILD_MOUSE_60_DEG_TO_FLAT_NW_SE, SPR_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_NW_SE }, { SPR_WILD_MOUSE_60_DEG_TO_FLAT_NE_SW, SPR_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_NE_SW }, { SPR_WILD_MOUSE_60_DEG_TO_FLAT_SE_NW, SPR_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_SE_NW }, }; - static constexpr const uint32 frontImageIds[4][2] = { + static constexpr const uint32_t frontImageIds[4][2] = { { 0, 0 }, { SPR_WILD_MOUSE_60_DEG_TO_FLAT_FRONT_NW_SE, SPR_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_FRONT_NW_SE }, { SPR_WILD_MOUSE_60_DEG_TO_FLAT_FRONT_NE_SW, SPR_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_FRONT_NE_SW }, { 0, 0 }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = frontImageIds[direction][isChained] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 3) { sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 27, 2, height, 0, 2, height); @@ -953,10 +953,10 @@ static void wild_mouse_track_60_deg_up_to_flat( /** rct2: 0x0078B374 */ static void wild_mouse_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_60_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -965,10 +965,10 @@ static void wild_mouse_track_flat_to_60_deg_down( /** rct2: 0x0078B384 */ static void wild_mouse_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wild_mouse_track_flat_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -977,13 +977,13 @@ static void wild_mouse_track_60_deg_down_to_flat( /** rct2: 0x0078B344 */ static void wild_mouse_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = _wild_mouse_brakes_image_ids[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = _wild_mouse_brakes_image_ids[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -998,20 +998,20 @@ static void wild_mouse_track_brakes( /** rct2: 0x0078B3C4 */ static void wild_mouse_track_rotation_control_toggle( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_WILD_MOUSE_ROTATION_CONTROL_TOGGLE_SW_NE, SPR_WILD_MOUSE_ROTATION_CONTROL_TOGGLE_NW_SE, SPR_WILD_MOUSE_ROTATION_CONTROL_TOGGLE_SW_NE, SPR_WILD_MOUSE_ROTATION_CONTROL_TOGGLE_NW_SE, }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -1026,13 +1026,13 @@ static void wild_mouse_track_rotation_control_toggle( /** rct2: 0x0078B3B4 */ static void wild_mouse_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = _wild_mouse_block_brakes_image_ids[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = _wild_mouse_block_brakes_image_ids[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); if (track_paint_util_should_paint_supports(session->MapPosition)) { @@ -1044,7 +1044,7 @@ static void wild_mouse_track_block_brakes( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp index d6ea13393b..dc3f5e1e27 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp @@ -21,8 +21,8 @@ struct sprite_bb_2 { - uint32 sprite_id_a; - uint32 sprite_id_b; + uint32_t sprite_id_a; + uint32_t sprite_id_b; LocationXYZ16 offset; LocationXYZ16 bb_offset; LocationXYZ16 bb_size; @@ -383,30 +383,30 @@ enum SPR_WOODEN_RC_STATION_RAILS_NW_SE = 24840, }; -static constexpr const uint32 _wooden_rc_block_brakes_image_ids[4][2] = { +static constexpr const uint32_t _wooden_rc_block_brakes_image_ids[4][2] = { { SPR_WOODEN_RC_BLOCK_BRAKES_SW_NE, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_SW_NE }, { SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_NW_SE }, { SPR_WOODEN_RC_BLOCK_BRAKES_SW_NE, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_SW_NE }, { SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_NW_SE }, }; -static uint32 wooden_rc_get_track_colour(paint_session * session) +static uint32_t wooden_rc_get_track_colour(paint_session * session) { return (session->TrackColours[SCHEME_TRACK] & ~0xF80000) | session->TrackColours[SCHEME_SUPPORTS]; } -static uint32 wooden_rc_get_rails_colour(paint_session * session) +static uint32_t wooden_rc_get_rails_colour(paint_session * session) { return session->TrackColours[SCHEME_TRACK]; } -static paint_struct * wooden_rc_track_paint(paint_session * session, uint32 imageIdTrack, uint32 imageIdRails, uint8 direction, - sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, - sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z) +static paint_struct * wooden_rc_track_paint(paint_session * session, uint32_t imageIdTrack, uint32_t imageIdRails, uint8_t direction, + int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, + int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, + int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z) { - uint32 imageId = imageIdTrack | wooden_rc_get_track_colour(session); - uint32 railsImageId = imageIdRails | wooden_rc_get_rails_colour(session); + uint32_t imageId = imageIdTrack | wooden_rc_get_track_colour(session); + uint32_t railsImageId = imageIdRails | wooden_rc_get_rails_colour(session); sub_98197C_rotated(session, direction, imageId, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z); @@ -414,45 +414,45 @@ static paint_struct * wooden_rc_track_paint(paint_session * session, uint32 imag bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z); } -static void wooden_rc_track_paint_bb(paint_session * session, const sprite_bb_2 * bb, sint16 height) +static void wooden_rc_track_paint_bb(paint_session * session, const sprite_bb_2 * bb, int16_t height) { if (bb->sprite_id_a == 0) return; - uint32 imageId = bb->sprite_id_a | wooden_rc_get_track_colour(session); - uint32 railsImageId = bb->sprite_id_b | wooden_rc_get_rails_colour(session); + uint32_t imageId = bb->sprite_id_a | wooden_rc_get_track_colour(session); + uint32_t railsImageId = bb->sprite_id_b | wooden_rc_get_rails_colour(session); sub_98197C( - session, imageId, (sint8)bb->offset.x, (sint8)bb->offset.y, bb->bb_size.x, bb->bb_size.y, (sint8)bb->bb_size.z, + session, imageId, (int8_t)bb->offset.x, (int8_t)bb->offset.y, bb->bb_size.x, bb->bb_size.y, (int8_t)bb->bb_size.z, height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z); sub_98199C( - session, railsImageId, (sint8)bb->offset.x, (sint8)bb->offset.y, bb->bb_size.x, bb->bb_size.y, (sint8)bb->bb_size.z, + session, railsImageId, (int8_t)bb->offset.x, (int8_t)bb->offset.y, bb->bb_size.x, bb->bb_size.y, (int8_t)bb->bb_size.z, height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z); } /** rct2: 0x008AC568 */ static void wooden_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WOODEN_RC_FLAT_SW_NE, SPR_WOODEN_RC_FLAT_CHAIN_SW_NE }, { SPR_WOODEN_RC_FLAT_NW_SE, SPR_WOODEN_RC_FLAT_CHAIN_NW_SE }, { SPR_WOODEN_RC_FLAT_SW_NE, SPR_WOODEN_RC_FLAT_CHAIN_NE_SW }, { SPR_WOODEN_RC_FLAT_NW_SE, SPR_WOODEN_RC_FLAT_CHAIN_SE_NW }, }; - static constexpr const uint32 railsImageIds[4][2] = { + static constexpr const uint32_t railsImageIds[4][2] = { { SPR_WOODEN_RC_FLAT_RAILS_SW_NE, SPR_WOODEN_RC_FLAT_CHAIN_RAILS_SW_NE }, { SPR_WOODEN_RC_FLAT_RAILS_NW_SE, SPR_WOODEN_RC_FLAT_CHAIN_RAILS_NW_SE }, { SPR_WOODEN_RC_FLAT_RAILS_SW_NE, SPR_WOODEN_RC_FLAT_CHAIN_RAILS_NE_SW }, { SPR_WOODEN_RC_FLAT_RAILS_NW_SE, SPR_WOODEN_RC_FLAT_CHAIN_RAILS_SE_NW }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint(session, imageIds[direction][isChained], railsImageIds[direction][isChained], direction, 0, 2, 32, 25, 2, height, 0, 3, height); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -463,20 +463,20 @@ static void wooden_rc_track_flat( static void wooden_rc_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 stationImageIds[4][2] = { + static constexpr const uint32_t stationImageIds[4][2] = { { SPR_WOODEN_RC_STATION_SW_NE, SPR_WOODEN_RC_STATION_RAILS_SW_NE }, { SPR_WOODEN_RC_STATION_NW_SE, SPR_WOODEN_RC_STATION_RAILS_NW_SE }, { SPR_WOODEN_RC_STATION_SW_NE, SPR_WOODEN_RC_STATION_RAILS_SW_NE }, { SPR_WOODEN_RC_STATION_NW_SE, SPR_WOODEN_RC_STATION_RAILS_NW_SE }, }; - sint32 trackType = track_element_get_type(tileElement); + int32_t trackType = track_element_get_type(tileElement); if (trackType == TRACK_ELEM_END_STATION) { wooden_rc_track_paint(session, _wooden_rc_block_brakes_image_ids[direction][0], @@ -498,13 +498,13 @@ static void wooden_rc_track_station( /** rct2: 0x008AC578 */ static void wooden_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][4] = { + static constexpr const uint32_t imageIds[2][4][4] = { { { SPR_WOODEN_RC_25_DEG_SW_NE, SPR_WOODEN_RC_25_DEG_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_25_DEG_NW_SE, SPR_WOODEN_RC_25_DEG_RAILS_NW_SE, SPR_WOODEN_RC_25_DEG_FRONT_NW_SE, @@ -523,7 +523,7 @@ static void wooden_rc_track_25_deg_up( } }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint(session, imageIds[isChained][direction][0], imageIds[isChained][direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); if (direction == 1 || direction == 2) @@ -549,13 +549,13 @@ static void wooden_rc_track_25_deg_up( /** rct2: 0x008AC588 */ static void wooden_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WOODEN_RC_60_DEG_SW_NE, SPR_WOODEN_RC_60_DEG_RAILS_SW_NE }, { SPR_WOODEN_RC_60_DEG_NW_SE, SPR_WOODEN_RC_60_DEG_RAILS_NW_SE }, { SPR_WOODEN_RC_60_DEG_NE_SW, SPR_WOODEN_RC_60_DEG_RAILS_NE_SW }, @@ -590,13 +590,13 @@ static void wooden_rc_track_60_deg_up( /** rct2: 0x008AC598 */ static void wooden_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][4] = { + static constexpr const uint32_t imageIds[2][4][4] = { { { SPR_WOODEN_RC_FLAT_TO_25_DEG_SW_NE, SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_FLAT_TO_25_DEG_NW_SE, SPR_WOODEN_RC_FLAT_TO_25_DEG_RAILS_NW_SE, @@ -615,7 +615,7 @@ static void wooden_rc_track_flat_to_25_deg_up( } }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint(session, imageIds[isChained][direction][0], imageIds[isChained][direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); if (direction == 1 || direction == 2) @@ -641,13 +641,13 @@ static void wooden_rc_track_flat_to_25_deg_up( /** rct2: 0x008AC5A8 */ static void wooden_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_25_DEG_TO_60_DEG_SW_NE, SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_25_DEG_TO_60_DEG_NW_SE, SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_NW_SE, SPR_WOODEN_RC_25_DEG_TO_60_DEG_FRONT_NW_SE, SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_FRONT_NW_SE }, @@ -686,13 +686,13 @@ static void wooden_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008AC5B8 */ static void wooden_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_60_DEG_TO_25_DEG_SW_NE, SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_60_DEG_TO_25_DEG_NW_SE, SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_NW_SE, SPR_WOODEN_RC_60_DEG_TO_25_DEG_FRONT_NW_SE, SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_FRONT_NW_SE }, @@ -731,13 +731,13 @@ static void wooden_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008AC5C8 */ static void wooden_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][4] = { + static constexpr const uint32_t imageIds[2][4][4] = { { { SPR_WOODEN_RC_25_DEG_TO_FLAT_SW_NE, SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_25_DEG_TO_FLAT_NW_SE, SPR_WOODEN_RC_25_DEG_TO_FLAT_RAILS_NW_SE, @@ -756,7 +756,7 @@ static void wooden_rc_track_25_deg_up_to_flat( } }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; wooden_rc_track_paint(session, imageIds[isChained][direction][0], imageIds[isChained][direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); if (direction == 1 || direction == 2) @@ -782,10 +782,10 @@ static void wooden_rc_track_25_deg_up_to_flat( /** rct2: 0x008AC5D8 */ static void wooden_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -794,10 +794,10 @@ static void wooden_rc_track_25_deg_down( /** rct2: 0x008AC5E8 */ static void wooden_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -806,10 +806,10 @@ static void wooden_rc_track_60_deg_down( /** rct2: 0x008AC5F8 */ static void wooden_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -818,10 +818,10 @@ static void wooden_rc_track_flat_to_25_deg_down( /** rct2: 0x008AC608 */ static void wooden_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -830,10 +830,10 @@ static void wooden_rc_track_25_deg_down_to_60_deg_down( /** rct2: 0x008AC618 */ static void wooden_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -842,10 +842,10 @@ static void wooden_rc_track_60_deg_down_to_25_deg_down( /** rct2: 0x008AC628 */ static void wooden_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -853,10 +853,10 @@ static void wooden_rc_track_25_deg_down_to_flat( static void wooden_rc_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb_2 imageIds[2][4][7] = { @@ -1053,7 +1053,7 @@ static void wooden_rc_track_right_quarter_turn_5( { 0, 0, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } }, } }, }; - static sint8 supportType[4][7] = { + static int8_t supportType[4][7] = { { 0, -1, 4, 2, -1, 4, 1 }, { 1, -1, 5, 3, -1, 5, 0 }, { 0, -1, 2, 4, -1, 2, 1 }, @@ -1070,7 +1070,7 @@ static void wooden_rc_track_right_quarter_turn_5( session->TrackColours[SCHEME_SUPPORTS], nullptr); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1102,10 +1102,10 @@ static void wooden_rc_track_right_quarter_turn_5( static void wooden_rc_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1115,13 +1115,13 @@ static void wooden_rc_track_left_quarter_turn_5( /** rct2: 0x008AC658 */ static void wooden_rc_track_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_FLAT_TO_LEFT_BANK_SW_NE, SPR_WOODEN_RC_FLAT_TO_LEFT_BANK_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_FLAT_TO_LEFT_BANK_NW_SE, SPR_WOODEN_RC_FLAT_TO_LEFT_BANK_RAILS_NW_SE, SPR_WOODEN_RC_RC_FLAT_TO_LEFT_BANK_FRONT_NW_SE, SPR_WOODEN_RC_RC_FLAT_TO_LEFT_BANK_RAILS_FRONT_NW_SE }, @@ -1146,13 +1146,13 @@ static void wooden_rc_track_flat_to_left_bank( /** rct2: 0x008AC668 */ static void wooden_rc_track_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_FLAT_TO_RIGHT_BANK_SW_NE, SPR_WOODEN_RC_FLAT_TO_RIGHT_BANK_RAILS_SW_NE, SPR_WOODEN_RC_RC_FLAT_TO_RIGHT_BANK_FRONT_SW_NE, SPR_WOODEN_RC_RC_FLAT_TO_RIGHT_BANK_RAILS_FRONT_SW_NE }, { SPR_WOODEN_RC_FLAT_TO_RIGHT_BANK_NW_SE, SPR_WOODEN_RC_FLAT_TO_RIGHT_BANK_RAILS_NW_SE, 0, 0 }, @@ -1177,10 +1177,10 @@ static void wooden_rc_track_flat_to_right_bank( /** rct2: 0x008AC678 */ static void wooden_rc_track_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_flat_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1189,10 +1189,10 @@ static void wooden_rc_track_left_bank_to_flat( /** rct2: 0x008AC688 */ static void wooden_rc_track_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_flat_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1200,10 +1200,10 @@ static void wooden_rc_track_right_bank_to_flat( static void wooden_rc_track_banked_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb_2 imageIds[2][4][7] = { @@ -1400,7 +1400,7 @@ static void wooden_rc_track_banked_right_quarter_turn_5( { 0, 0, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } }, } }, }; - static sint8 supportType[4][7] = { + static int8_t supportType[4][7] = { { 0, -1, 4, 2, -1, 4, 1 }, { 1, -1, 5, 3, -1, 5, 0 }, { 0, -1, 2, 4, -1, 2, 1 }, @@ -1417,7 +1417,7 @@ static void wooden_rc_track_banked_right_quarter_turn_5( session->TrackColours[SCHEME_SUPPORTS], nullptr); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1449,10 +1449,10 @@ static void wooden_rc_track_banked_right_quarter_turn_5( static void wooden_rc_track_banked_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1462,13 +1462,13 @@ static void wooden_rc_track_banked_left_quarter_turn_5( /** rct2: 0x008AC6B8 */ static void wooden_rc_track_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_LEFT_BANK_TO_25_DEG_SW_NE, SPR_WOODEN_RC_LEFT_BANK_TO_25_DEG_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_LEFT_BANK_TO_25_DEG_NW_SE, SPR_WOODEN_RC_LEFT_BANK_TO_25_DEG_RAILS_NW_SE, SPR_WOODEN_RC_LEFT_BANK_TO_25_DEG_FRONT_NW_SE, SPR_WOODEN_RC_LEFT_BANK_TO_25_DEG_RAILS_FRONT_NW_SE }, @@ -1500,13 +1500,13 @@ static void wooden_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008AC6C8 */ static void wooden_rc_track_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_RIGHT_BANK_TO_25_DEG_SW_NE, SPR_WOODEN_RC_RIGHT_BANK_TO_25_DEG_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_RIGHT_BANK_TO_25_DEG_NW_SE, SPR_WOODEN_RC_RIGHT_BANK_TO_25_DEG_RAILS_NW_SE, SPR_WOODEN_RC_RIGHT_BANK_TO_25_DEG_FRONT_NW_SE, SPR_WOODEN_RC_RIGHT_BANK_TO_25_DEG_RAILS_FRONT_NW_SE }, @@ -1538,13 +1538,13 @@ static void wooden_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008AC6D8 */ static void wooden_rc_track_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_25_DEG_TO_LEFT_BANK_SW_NE, SPR_WOODEN_RC_25_DEG_TO_LEFT_BANK_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_25_DEG_TO_LEFT_BANK_NW_SE, SPR_WOODEN_RC_25_DEG_TO_LEFT_BANK_RAILS_NW_SE, SPR_WOODEN_RC_25_DEG_TO_LEFT_BANK_FRONT_NW_SE, SPR_WOODEN_RC_25_DEG_TO_LEFT_BANK_RAILS_FRONT_NW_SE }, @@ -1576,13 +1576,13 @@ static void wooden_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008AC6E8 */ static void wooden_rc_track_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4] = { + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_25_DEG_TO_RIGHT_BANK_SW_NE, SPR_WOODEN_RC_25_DEG_TO_RIGHT_BANK_RAILS_SW_NE, 0, 0 }, { SPR_WOODEN_RC_25_DEG_TO_RIGHT_BANK_NW_SE, SPR_WOODEN_RC_25_DEG_TO_RIGHT_BANK_RAILS_NW_SE, SPR_WOODEN_RC_25_DEG_TO_RIGHT_BANK_FRONT_NW_SE, SPR_WOODEN_RC_25_DEG_TO_RIGHT_BANK_RAILS_FRONT_NW_SE }, @@ -1614,10 +1614,10 @@ static void wooden_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008AC6F8 */ static void wooden_rc_track_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_to_right_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1626,10 +1626,10 @@ static void wooden_rc_track_left_bank_to_25_deg_down( /** rct2: 0x008AC708 */ static void wooden_rc_track_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_to_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1638,10 +1638,10 @@ static void wooden_rc_track_right_bank_to_25_deg_down( /** rct2: 0x008AC718 */ static void wooden_rc_track_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_right_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1650,10 +1650,10 @@ static void wooden_rc_track_25_deg_down_to_left_bank( /** rct2: 0x008AC728 */ static void wooden_rc_track_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_bank_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1662,13 +1662,13 @@ static void wooden_rc_track_25_deg_down_to_right_bank( /** rct2: 0x008AC738 */ static void wooden_rc_track_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WOODEN_RC_LEFT_BANK_SW_NE, SPR_WOODEN_RC_LEFT_BANK_RAILS_SW_NE }, { SPR_WOODEN_RC_LEFT_BANK_NW_SE, SPR_WOODEN_RC_LEFT_BANK_RAILS_NW_SE }, { SPR_WOODEN_RC_LEFT_BANK_NE_SW, SPR_WOODEN_RC_LEFT_BANK_RAILS_NE_SW }, @@ -1686,10 +1686,10 @@ static void wooden_rc_track_left_bank( /** rct2: 0x008AC748 */ static void wooden_rc_track_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_bank(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1698,10 +1698,10 @@ static void wooden_rc_track_right_bank( /** rct2: 0x008AC758 */ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1964,10 +1964,10 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008AC768 */ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2230,10 +2230,10 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008AC778 */ static void wooden_rc_track_left_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -2243,10 +2243,10 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_down( /** rct2: 0x008AC788 */ static void wooden_rc_track_right_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -2256,10 +2256,10 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_down( /** rct2: 0x008AC798 */ static void wooden_rc_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2461,10 +2461,10 @@ static void wooden_rc_track_s_bend_left( /** rct2: 0x008AC7A8 */ static void wooden_rc_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2666,10 +2666,10 @@ static void wooden_rc_track_s_bend_right( /** rct2: 0x008ACE18 */ static void wooden_rc_track_left_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -2881,10 +2881,10 @@ static void wooden_rc_track_left_vertical_loop( /** rct2: 0x008ACE28 */ static void wooden_rc_track_right_vertical_loop( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3070,10 +3070,10 @@ static void wooden_rc_track_right_vertical_loop( /** rct2: 0x008AC7E8 */ static void wooden_rc_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3226,10 +3226,10 @@ static void wooden_rc_track_left_quarter_turn_3( /** rct2: 0x008AC7F8 */ static void wooden_rc_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3239,10 +3239,10 @@ static void wooden_rc_track_right_quarter_turn_3( /** rct2: 0x008AC808 */ static void wooden_rc_track_left_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3395,10 +3395,10 @@ static void wooden_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008AC818 */ static void wooden_rc_track_right_quarter_turn_3_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3408,10 +3408,10 @@ static void wooden_rc_track_right_quarter_turn_3_bank( /** rct2: 0x008AC828 */ static void wooden_rc_track_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3533,10 +3533,10 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AC838 */ static void wooden_rc_track_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -3658,10 +3658,10 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AC848 */ static void wooden_rc_track_left_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3671,10 +3671,10 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_down( /** rct2: 0x008AC858 */ static void wooden_rc_track_right_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -3684,10 +3684,10 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_down( /** rct2: 0x008ACAB8 */ static void wooden_rc_track_left_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4028,10 +4028,10 @@ static void wooden_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008ACAC8 */ static void wooden_rc_track_right_half_banked_helix_up_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4372,10 +4372,10 @@ static void wooden_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008ACAD8 */ static void wooden_rc_track_left_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -4391,10 +4391,10 @@ static void wooden_rc_track_left_half_banked_helix_down_small( /** rct2: 0x008ACAE8 */ static void wooden_rc_track_right_half_banked_helix_down_small( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 4) @@ -4409,10 +4409,10 @@ static void wooden_rc_track_right_half_banked_helix_down_small( /** rct2: 0x008ACAF8 */ static void wooden_rc_track_left_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -4933,10 +4933,10 @@ static void wooden_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008ACB08 */ static void wooden_rc_track_right_half_banked_helix_up_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -5457,10 +5457,10 @@ static void wooden_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008ACB18 */ static void wooden_rc_track_left_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -5476,10 +5476,10 @@ static void wooden_rc_track_left_half_banked_helix_down_large( /** rct2: 0x008ACB28 */ static void wooden_rc_track_right_half_banked_helix_down_large( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence >= 7) @@ -5494,10 +5494,10 @@ static void wooden_rc_track_right_half_banked_helix_down_large( /** rct2: 0x008ACB98 */ static void wooden_rc_track_left_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -5551,10 +5551,10 @@ static void wooden_rc_track_left_quarter_turn_1_60_deg_up( /** rct2: 0x008ACB78 */ static void wooden_rc_track_right_quarter_turn_1_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -5608,10 +5608,10 @@ static void wooden_rc_track_right_quarter_turn_1_60_deg_up( /** rct2: 0x008ACB88 */ static void wooden_rc_track_left_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_right_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, tileElement); @@ -5620,10 +5620,10 @@ static void wooden_rc_track_left_quarter_turn_1_60_deg_down( /** rct2: 0x008ACBA8 */ static void wooden_rc_track_right_quarter_turn_1_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_quarter_turn_1_60_deg_up(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -5632,13 +5632,13 @@ static void wooden_rc_track_right_quarter_turn_1_60_deg_down( /** rct2: 0x008AC868 */ static void wooden_rc_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WOODEN_RC_BRAKES_SW_NE, SPR_WOODEN_RC_BRAKES_RAILS_SW_NE }, { SPR_WOODEN_RC_BRAKES_NW_SE, SPR_WOODEN_RC_BRAKES_RAILS_NW_SE }, { SPR_WOODEN_RC_BRAKES_SW_NE, SPR_WOODEN_RC_BRAKES_RAILS_SW_NE }, @@ -5656,10 +5656,10 @@ static void wooden_rc_track_brakes( /** rct2: 0x008ACC78 */ static void wooden_rc_track_25_deg_up_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -5716,10 +5716,10 @@ static void wooden_rc_track_25_deg_up_left_banked( /** rct2: 0x008ACC88 */ static void wooden_rc_track_25_deg_up_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -5776,10 +5776,10 @@ static void wooden_rc_track_25_deg_up_right_banked( /** rct2: 0x008AC878 */ static void wooden_rc_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -5819,10 +5819,10 @@ static void wooden_rc_track_on_ride_photo( /** rct2: 0x008ACC98 */ static void wooden_rc_track_25_deg_down_left_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_right_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -5831,10 +5831,10 @@ static void wooden_rc_track_25_deg_down_left_banked( /** rct2: 0x008ACCA8 */ static void wooden_rc_track_25_deg_down_right_banked( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_left_banked(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -5843,10 +5843,10 @@ static void wooden_rc_track_25_deg_down_right_banked( /** rct2: 0x008ACE08 */ static void wooden_rc_track_water_splash( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6189,10 +6189,10 @@ static void wooden_rc_track_water_splash( /** rct2: 0x008AC958 */ static void wooden_rc_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6394,10 +6394,10 @@ static void wooden_rc_track_left_eighth_to_diag( /** rct2: 0x008AC968 */ static void wooden_rc_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6599,10 +6599,10 @@ static void wooden_rc_track_right_eighth_to_diag( /** rct2: 0x008AC978 */ static void wooden_rc_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -6612,10 +6612,10 @@ static void wooden_rc_track_left_eighth_to_orthogonal( /** rct2: 0x008AC988 */ static void wooden_rc_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -6625,10 +6625,10 @@ static void wooden_rc_track_right_eighth_to_orthogonal( /** rct2: 0x008AC998 */ static void wooden_rc_track_left_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -6830,10 +6830,10 @@ static void wooden_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008AC9A8 */ static void wooden_rc_track_right_eighth_bank_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7035,10 +7035,10 @@ static void wooden_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008AC9B8 */ static void wooden_rc_track_left_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7048,10 +7048,10 @@ static void wooden_rc_track_left_eighth_bank_to_orthogonal( /** rct2: 0x008AC9C8 */ static void wooden_rc_track_right_eighth_bank_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -7061,10 +7061,10 @@ static void wooden_rc_track_right_eighth_bank_to_orthogonal( /** rct2: 0x008AC888 */ static void wooden_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7243,10 +7243,10 @@ static void wooden_rc_track_diag_flat( /** rct2: 0x008AC8B8 */ static void wooden_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7425,10 +7425,10 @@ static void wooden_rc_track_diag_25_deg_up( /** rct2: 0x008AC8E8 */ static void wooden_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7519,10 +7519,10 @@ static void wooden_rc_track_diag_60_deg_up( /** rct2: 0x008AC898 */ static void wooden_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7701,10 +7701,10 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008AC8C8 */ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7795,10 +7795,10 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008AC8D8 */ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -7889,10 +7889,10 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008AC8A8 */ static void wooden_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8071,10 +8071,10 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008AC918 */ static void wooden_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8253,10 +8253,10 @@ static void wooden_rc_track_diag_25_deg_down( /** rct2: 0x008AC948 */ static void wooden_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8347,10 +8347,10 @@ static void wooden_rc_track_diag_60_deg_down( /** rct2: 0x008AC8F8 */ static void wooden_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8524,10 +8524,10 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008AC928 */ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8618,10 +8618,10 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008AC938 */ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8712,10 +8712,10 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008AC908 */ static void wooden_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8894,10 +8894,10 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008ACA18 */ static void wooden_rc_track_diag_flat_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -8988,10 +8988,10 @@ static void wooden_rc_track_diag_flat_to_left_bank( /** rct2: 0x008AC9F8 */ static void wooden_rc_track_diag_flat_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9082,10 +9082,10 @@ static void wooden_rc_track_diag_flat_to_right_bank( /** rct2: 0x008ACA08 */ static void wooden_rc_track_diag_left_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9176,10 +9176,10 @@ static void wooden_rc_track_diag_left_bank_to_flat( /** rct2: 0x008ACA28 */ static void wooden_rc_track_diag_right_bank_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9270,10 +9270,10 @@ static void wooden_rc_track_diag_right_bank_to_flat( /** rct2: 0x008ACA58 */ static void wooden_rc_track_diag_left_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9364,10 +9364,10 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008ACA68 */ static void wooden_rc_track_diag_right_bank_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9458,10 +9458,10 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008ACA38 */ static void wooden_rc_track_diag_25_deg_up_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9552,10 +9552,10 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008ACA48 */ static void wooden_rc_track_diag_25_deg_up_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9646,10 +9646,10 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008ACA78 */ static void wooden_rc_track_diag_left_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9735,10 +9735,10 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008ACA88 */ static void wooden_rc_track_diag_right_bank_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9824,10 +9824,10 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008ACA98 */ static void wooden_rc_track_diag_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -9918,10 +9918,10 @@ static void wooden_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008ACAA8 */ static void wooden_rc_track_diag_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10012,10 +10012,10 @@ static void wooden_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008AC9D8 */ static void wooden_rc_track_diag_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10106,10 +10106,10 @@ static void wooden_rc_track_diag_left_bank( /** rct2: 0x008AC9E8 */ static void wooden_rc_track_diag_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10200,10 +10200,10 @@ static void wooden_rc_track_diag_right_bank( /** rct2: 0x008ACB38 */ static void wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10325,10 +10325,10 @@ static void wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( /** rct2: 0x008ACB48 */ static void wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10450,10 +10450,10 @@ static void wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( /** rct2: 0x008ACB58 */ static void wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10575,10 +10575,10 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( /** rct2: 0x008ACB68 */ static void wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10700,10 +10700,10 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( /** rct2: 0x008ACDF8 */ static void wooden_rc_track_block_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_paint(session, _wooden_rc_block_brakes_image_ids[direction][0], @@ -10717,10 +10717,10 @@ static void wooden_rc_track_block_brakes( /** rct2: 0x008ACCB8 */ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10842,10 +10842,10 @@ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ACCC8 */ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -10967,10 +10967,10 @@ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ACCD8 */ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -10981,10 +10981,10 @@ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008ACCE8 */ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -10995,10 +10995,10 @@ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_down( /** rct2: 0x008ACC38 */ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -11261,10 +11261,10 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ACC48 */ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -11527,10 +11527,10 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ACC58 */ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -11541,10 +11541,10 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008ACC68 */ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -11555,10 +11555,10 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_down( /** rct2: 0x008ACCF8 */ static void wooden_rc_track_25_deg_up_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11607,10 +11607,10 @@ static void wooden_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008ACD08 */ static void wooden_rc_track_25_deg_up_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11659,10 +11659,10 @@ static void wooden_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008ACD18 */ static void wooden_rc_track_left_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11711,10 +11711,10 @@ static void wooden_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ACD28 */ static void wooden_rc_track_right_banked_25_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11763,10 +11763,10 @@ static void wooden_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ACD38 */ static void wooden_rc_track_25_deg_down_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_right_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -11776,10 +11776,10 @@ static void wooden_rc_track_25_deg_down_to_left_banked_25_deg_down( /** rct2: 0x008ACD48 */ static void wooden_rc_track_25_deg_down_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_banked_25_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -11789,10 +11789,10 @@ static void wooden_rc_track_25_deg_down_to_right_banked_25_deg_down( /** rct2: 0x008ACD58 */ static void wooden_rc_track_left_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -11802,10 +11802,10 @@ static void wooden_rc_track_left_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008ACD68 */ static void wooden_rc_track_right_banked_25_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_25_deg_up_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -11815,10 +11815,10 @@ static void wooden_rc_track_right_banked_25_deg_down_to_25_deg_down( /** rct2: 0x008ACD78 */ static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11875,10 +11875,10 @@ static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008ACD88 */ static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11935,10 +11935,10 @@ static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008ACD98 */ static void wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -11995,10 +11995,10 @@ static void wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008ACDA8 */ static void wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -12055,10 +12055,10 @@ static void wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008ACDB8 */ static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -12068,10 +12068,10 @@ static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_down( /** rct2: 0x008ACDC8 */ static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -12081,10 +12081,10 @@ static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_down( /** rct2: 0x008ACDD8 */ static void wooden_rc_track_left_banked_25_deg_down_to_left_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -12094,10 +12094,10 @@ static void wooden_rc_track_left_banked_25_deg_down_to_left_banked_flat( /** rct2: 0x008ACDE8 */ static void wooden_rc_track_right_banked_25_deg_down_to_right_banked_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -12107,10 +12107,10 @@ static void wooden_rc_track_right_banked_25_deg_down_to_right_banked_flat( /** rct2: 0x008ACBB8 */ static void wooden_rc_track_flat_to_left_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -12167,10 +12167,10 @@ static void wooden_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008ACBC8 */ static void wooden_rc_track_flat_to_right_banked_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -12227,10 +12227,10 @@ static void wooden_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008ACBD8 */ static void wooden_rc_track_left_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -12287,10 +12287,10 @@ static void wooden_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008ACBE8 */ static void wooden_rc_track_right_banked_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -12347,10 +12347,10 @@ static void wooden_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008ACBF8 */ static void wooden_rc_track_flat_to_left_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_right_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -12359,10 +12359,10 @@ static void wooden_rc_track_flat_to_left_banked_25_deg_down( /** rct2: 0x008ACC08 */ static void wooden_rc_track_flat_to_right_banked_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_left_banked_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -12371,10 +12371,10 @@ static void wooden_rc_track_flat_to_right_banked_25_deg_down( /** rct2: 0x008ACC18 */ static void wooden_rc_track_left_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_flat_to_right_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -12383,16 +12383,16 @@ static void wooden_rc_track_left_banked_25_deg_down_to_flat( /** rct2: 0x008ACC28 */ static void wooden_rc_track_right_banked_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_rc_track_flat_to_left_banked_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_wooden_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/coaster/WoodenWildMouse.cpp b/src/openrct2/ride/coaster/WoodenWildMouse.cpp index 4f1d256307..2f7b901a8f 100644 --- a/src/openrct2/ride/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/ride/coaster/WoodenWildMouse.cpp @@ -124,20 +124,20 @@ enum /** rct2: 0x008A5464 */ static void wooden_wild_mouse_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; sub_98196C_rotated(session, direction, imageId, 0, 6, 32, 20, 1, height); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_0); @@ -152,13 +152,13 @@ static void wooden_wild_mouse_track_flat( static void wooden_wild_mouse_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, SPR_STATION_BASE_B_SW_NE }, { SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, SPR_STATION_BASE_B_NW_SE }, { SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, SPR_STATION_BASE_B_SW_NE }, @@ -179,13 +179,13 @@ static void wooden_wild_mouse_track_station( /** rct2: 0x008A5474 */ static void wooden_wild_mouse_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4] = { + static constexpr const uint32_t imageIds[2][4] = { { SPR_WOODEN_WILD_MOUSE_25_DEG_SW_NE, SPR_WOODEN_WILD_MOUSE_25_DEG_NW_SE, @@ -200,8 +200,8 @@ static void wooden_wild_mouse_track_25_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height); wooden_a_supports_paint_setup(session, direction & 1, 9 + direction, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -222,13 +222,13 @@ static void wooden_wild_mouse_track_25_deg_up( /** rct2: 0x008A5484 */ static void wooden_wild_mouse_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4] = { + static constexpr const uint32_t imageIds[2][4] = { { SPR_WOODEN_WILD_MOUSE_60_DEG_SW_NE, SPR_WOODEN_WILD_MOUSE_60_DEG_NW_SE, @@ -243,8 +243,8 @@ static void wooden_wild_mouse_track_60_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 3) { sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height); @@ -273,13 +273,13 @@ static void wooden_wild_mouse_track_60_deg_up( /** rct2: 0x008A5494 */ static void wooden_wild_mouse_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4] = { + static constexpr const uint32_t imageIds[2][4] = { { SPR_WOODEN_WILD_MOUSE_FLAT_TO_25_DEG_SW_NE, SPR_WOODEN_WILD_MOUSE_FLAT_TO_25_DEG_NW_SE, @@ -294,8 +294,8 @@ static void wooden_wild_mouse_track_flat_to_25_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height); wooden_a_supports_paint_setup(session, direction & 1, 1 + direction, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -316,13 +316,13 @@ static void wooden_wild_mouse_track_flat_to_25_deg_up( /** rct2: 0x008A54A4 */ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_WOODEN_WILD_MOUSE_25_DEG_TO_60_DEG_SW_NE, 0 }, { SPR_WOODEN_WILD_MOUSE_25_DEG_TO_60_DEG_NW_SE, SPR_WOODEN_WILD_MOUSE_25_DEG_TO_60_DEG_FRONT_NW_SE }, @@ -337,8 +337,8 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId; if (direction == 0 || direction == 3) { imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -370,13 +370,13 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( static void wooden_wild_mouse_track_60_deg_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_WOODEN_WILD_MOUSE_60_DEG_TO_25_DEG_SW_NE, 0 }, { SPR_WOODEN_WILD_MOUSE_60_DEG_TO_25_DEG_NW_SE, SPR_WOODEN_WILD_MOUSE_60_DEG_TO_25_DEG_FRONT_NW_SE }, @@ -391,8 +391,8 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId; if (direction == 0 || direction == 3) { imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -425,13 +425,13 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up( /** rct2: 0x008A54C4 */ static void wooden_wild_mouse_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4] = { + static constexpr const uint32_t imageIds[2][4] = { { SPR_WOODEN_WILD_MOUSE_25_DEG_TO_FLAT_SW_NE, SPR_WOODEN_WILD_MOUSE_25_DEG_TO_FLAT_NW_SE, @@ -446,8 +446,8 @@ static void wooden_wild_mouse_track_25_deg_up_to_flat( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 1, height, 0, 3, height); wooden_a_supports_paint_setup(session, direction & 1, 5 + direction, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -468,10 +468,10 @@ static void wooden_wild_mouse_track_25_deg_up_to_flat( /** rct2: 0x008A54D4 */ static void wooden_wild_mouse_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -480,10 +480,10 @@ static void wooden_wild_mouse_track_25_deg_down( /** rct2: 0x008A54E4 */ static void wooden_wild_mouse_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -492,10 +492,10 @@ static void wooden_wild_mouse_track_60_deg_down( /** rct2: 0x008A54F4 */ static void wooden_wild_mouse_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -504,10 +504,10 @@ static void wooden_wild_mouse_track_flat_to_25_deg_down( /** rct2: 0x008A5504 */ static void wooden_wild_mouse_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_60_deg_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -516,10 +516,10 @@ static void wooden_wild_mouse_track_25_deg_down_to_60_deg_down( /** rct2: 0x008A5514 */ static void wooden_wild_mouse_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -528,10 +528,10 @@ static void wooden_wild_mouse_track_60_deg_down_to_25_deg_down( /** rct2: 0x008A5524 */ static void wooden_wild_mouse_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -539,10 +539,10 @@ static void wooden_wild_mouse_track_25_deg_down_to_flat( static void wooden_wild_mouse_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][3] = { @@ -567,7 +567,7 @@ static void wooden_wild_mouse_track_right_quarter_turn_3( { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 6, 0 }, { 0, 0, 0 }, { 32, 20, 1 } }, } }; - static uint8 supportType[] = { 4, 5, 2, 3 }; + static uint8_t supportType[] = { 4, 5, 2, 3 }; track_paint_util_right_quarter_turn_3_tiles_paint_4( session, height, direction, trackSequence, session->TrackColours[SCHEME_TRACK], imageIds); @@ -581,7 +581,7 @@ static void wooden_wild_mouse_track_right_quarter_turn_3( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -600,10 +600,10 @@ static void wooden_wild_mouse_track_right_quarter_turn_3( static void wooden_wild_mouse_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -612,21 +612,21 @@ static void wooden_wild_mouse_track_left_quarter_turn_3( static void wooden_wild_mouse_track_left_quarter_turn_1( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4] = { + static constexpr const uint32_t imageIds[4] = { SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_SW_NE, SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_NW_SE, SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_NE_SW, SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_SE_NW, }; - static uint8 supportType[] = { 5, 2, 3, 4 }; + static uint8_t supportType[] = { 5, 2, 3, 4 }; - uint32 imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK]; switch (direction) { case 0: @@ -651,10 +651,10 @@ static void wooden_wild_mouse_track_left_quarter_turn_1( /** rct2: 0x008A55D4 */ static void wooden_wild_mouse_track_right_quarter_turn_1( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_left_quarter_turn_1(session, rideIndex, trackSequence, (direction - 1) & 3, height, tileElement); @@ -663,13 +663,13 @@ static void wooden_wild_mouse_track_right_quarter_turn_1( /** rct2: 0x008A55E4 */ static void wooden_wild_mouse_track_flat_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_WOODEN_WILD_MOUSE_FLAT_TO_60_DEG_SW_NE, 0 }, { SPR_WOODEN_WILD_MOUSE_FLAT_TO_60_DEG_NW_SE, SPR_WOODEN_WILD_MOUSE_FLAT_TO_60_DEG_FRONT_NW_SE }, @@ -684,8 +684,8 @@ static void wooden_wild_mouse_track_flat_to_60_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId; if (direction == 0 || direction == 3) { imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -717,13 +717,13 @@ static void wooden_wild_mouse_track_flat_to_60_deg_up( /** rct2: 0x008A55F4 */ static void wooden_wild_mouse_track_60_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_WOODEN_WILD_MOUSE_60_DEG_TO_FLAT_SW_NE, 0 }, { SPR_WOODEN_WILD_MOUSE_60_DEG_TO_FLAT_NW_SE, SPR_WOODEN_WILD_MOUSE_60_DEG_TO_FLAT_FRONT_NW_SE }, @@ -738,8 +738,8 @@ static void wooden_wild_mouse_track_60_deg_up_to_flat( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId; if (direction == 0 || direction == 3) { imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -771,10 +771,10 @@ static void wooden_wild_mouse_track_60_deg_up_to_flat( /** rct2: 0x008A5604 */ static void wooden_wild_mouse_track_flat_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_60_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -783,16 +783,16 @@ static void wooden_wild_mouse_track_flat_to_60_deg_down( /** rct2: 0x008A5614 */ static void wooden_wild_mouse_track_60_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { wooden_wild_mouse_track_flat_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index 1f3df98713..e890283331 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -69,70 +69,70 @@ enum SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SE_NE_PART_2 = 28820, }; -static constexpr const uint32 car_ride_track_pieces_flat[4] = { +static constexpr const uint32_t car_ride_track_pieces_flat[4] = { SPR_CAR_RIDE_FLAT_SW_NE, SPR_CAR_RIDE_FLAT_NW_SE, SPR_CAR_RIDE_FLAT_SW_NE, SPR_CAR_RIDE_FLAT_NW_SE, }; -static constexpr const uint32 car_ride_track_pieces_log_bumps[4] = { +static constexpr const uint32_t car_ride_track_pieces_log_bumps[4] = { SPR_CAR_RIDE_LOG_BUMPS_SW_NE, SPR_CAR_RIDE_LOG_BUMPS_NW_SE, SPR_CAR_RIDE_LOG_BUMPS_SW_NE, SPR_CAR_RIDE_LOG_BUMPS_NW_SE, }; -static constexpr const uint32 car_ride_track_pieces_25_deg_up[4] = { +static constexpr const uint32_t car_ride_track_pieces_25_deg_up[4] = { SPR_CAR_RIDE_25_DEG_UP_SW_NE, SPR_CAR_RIDE_25_DEG_UP_NW_SE, SPR_CAR_RIDE_25_DEG_UP_NE_SW, SPR_CAR_RIDE_25_DEG_UP_SE_NW, }; -static constexpr const uint32 car_ride_track_pieces_flat_to_25_deg_up[4] = { +static constexpr const uint32_t car_ride_track_pieces_flat_to_25_deg_up[4] = { SPR_CAR_RIDE_FLAT_TO_25_DEG_UP_SW_NE, SPR_CAR_RIDE_FLAT_TO_25_DEG_UP_NW_SE, SPR_CAR_RIDE_FLAT_TO_25_DEG_UP_NE_SW, SPR_CAR_RIDE_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr const uint32 car_ride_track_pieces_25_deg_up_to_flat[4] = { +static constexpr const uint32_t car_ride_track_pieces_25_deg_up_to_flat[4] = { SPR_CAR_RIDE_DEG_UP_TO_FLAT_SW_NE, SPR_CAR_RIDE_DEG_UP_TO_FLAT_NW_SE, SPR_CAR_RIDE_DEG_UP_TO_FLAT_NE_SW, SPR_CAR_RIDE_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr const uint32 car_ride_track_pieces_60_deg_up[4] = { +static constexpr const uint32_t car_ride_track_pieces_60_deg_up[4] = { SPR_CAR_RIDE_60_DEG_UP_SW_NE, SPR_CAR_RIDE_60_DEG_UP_NW_SE, SPR_CAR_RIDE_60_DEG_UP_NE_SW, SPR_CAR_RIDE_60_DEG_UP_SE_NW, }; -static constexpr const uint32 car_ride_track_pieces_25_deg_up_to_60_deg_up[4][2] = { +static constexpr const uint32_t car_ride_track_pieces_25_deg_up_to_60_deg_up[4][2] = { { SPR_CAR_RIDE_25_DEG_UP_TO_60_DEG_UP_SW_NE, 0 }, { SPR_CAR_RIDE_25_DEG_UP_TO_60_DEG_UP_NW_SE, SPR_CAR_RIDE_25_DEG_UP_TO_60_DEG_UP_FRONT_NW_SE }, { SPR_CAR_RIDE_25_DEG_UP_TO_60_DEG_UP_NE_SW, SPR_CAR_RIDE_25_DEG_UP_TO_60_DEG_UP_FRONT_NE_SW }, { SPR_CAR_RIDE_25_DEG_UP_TO_60_DEG_UP_SE_NW, 0 }, }; -static constexpr const uint32 car_ride_track_pieces_60_deg_up_to_25_deg_up[4][2] = { +static constexpr const uint32_t car_ride_track_pieces_60_deg_up_to_25_deg_up[4][2] = { { SPR_CAR_RIDE_60_DEG_UP_TO_25_DEG_UP_SW_NE, 0 }, { SPR_CAR_RIDE_60_DEG_UP_TO_25_DEG_UP_NW_SE, SPR_CAR_RIDE_60_DEG_UP_TO_25_DEG_UP_FRONT_NW_SE }, { SPR_CAR_RIDE_60_DEG_UP_TO_25_DEG_UP_NE_SW, SPR_CAR_RIDE_60_DEG_UP_TO_25_DEG_UP_FRONT_NE_SW }, { SPR_CAR_RIDE_60_DEG_UP_TO_25_DEG_UP_SE_NW, 0 }, }; -static constexpr const uint32 car_ride_track_pieces_left_quarter_turn_1_tile[4] = { +static constexpr const uint32_t car_ride_track_pieces_left_quarter_turn_1_tile[4] = { SPR_CAR_RIDE_QUARTER_TURN_1_TILE_SW_NW, SPR_CAR_RIDE_QUARTER_TURN_1_TILE_NW_NE, SPR_CAR_RIDE_QUARTER_TURN_1_TILE_NE_SE, SPR_CAR_RIDE_QUARTER_TURN_1_TILE_SE_SW, }; -static constexpr const uint32 car_ride_track_pieces_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t car_ride_track_pieces_quarter_turn_3_tiles[4][3] = { { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_CAR_RIDE_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_CAR_RIDE_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -146,13 +146,13 @@ static constexpr const uint32 car_ride_track_pieces_quarter_turn_3_tiles[4][3] = /** rct2: 0x006F72C8 */ static void paint_car_ride_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -181,13 +181,13 @@ static void paint_car_ride_track_flat( /** rct2: 0x006F72D8 */ static void paint_car_ride_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -223,13 +223,13 @@ static void paint_car_ride_track_25_deg_up( /** rct2: 0x006F72E8 */ static void paint_car_ride_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -265,13 +265,13 @@ static void paint_car_ride_track_flat_to_25_deg_up( /** rct2: 0x006F72F8 */ static void paint_car_ride_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -307,10 +307,10 @@ static void paint_car_ride_track_25_deg_up_to_flat( /** rct2: 0x006F7308 */ static void paint_car_ride_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -319,10 +319,10 @@ static void paint_car_ride_track_25_deg_down( /** rct2: 0x006F7318 */ static void paint_car_ride_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -331,10 +331,10 @@ static void paint_car_ride_track_flat_to_25_deg_down( /** rct2: 0x006F7328 */ static void paint_car_ride_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -343,13 +343,13 @@ static void paint_car_ride_track_25_deg_down_to_flat( /** rct2: 0x006F7338, 0x006F7348, 0x006F7358 */ static void paint_car_ride_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -401,10 +401,10 @@ static void paint_car_ride_station( /** rct2: 0x006F7378 */ static void paint_car_ride_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_3_tiles_paint( @@ -421,7 +421,7 @@ static void paint_car_ride_track_right_quarter_turn_3_tiles( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -442,10 +442,10 @@ static void paint_car_ride_track_right_quarter_turn_3_tiles( /** rct2: 0x006F7368 */ static void paint_car_ride_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -455,13 +455,13 @@ static void paint_car_ride_track_left_quarter_turn_3_tiles( /** rct2: 0x006F7388 */ static void paint_car_ride_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_left_quarter_turn_1_tile[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_left_quarter_turn_1_tile[direction] | session->TrackColours[SCHEME_TRACK]; switch (direction) { @@ -490,10 +490,10 @@ static void paint_car_ride_track_left_quarter_turn_1_tile( /** rct2: 0x006F7398 */ static void paint_car_ride_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); @@ -502,13 +502,13 @@ static void paint_car_ride_track_right_quarter_turn_1_tile( /** rct2: 0x006F73A8 */ static void paint_car_ride_track_spinning_tunnel( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -539,15 +539,15 @@ static void paint_car_ride_track_spinning_tunnel( /** rct2: 0x006F73B8 */ static void paint_car_ride_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = car_ride_track_pieces_60_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_60_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; switch (direction) { @@ -594,15 +594,15 @@ static void paint_car_ride_track_60_deg_up( /** rct2: 0x006F73C8 */ static void paint_car_ride_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -656,15 +656,15 @@ static void paint_car_ride_track_25_deg_up_to_60_deg_up( /** rct2: 0x006F73D8 */ static void paint_car_ride_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -718,10 +718,10 @@ static void paint_car_ride_track_60_deg_up_to_25_deg_up( /** rct2: 0x006F73E8 */ static void paint_car_ride_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -730,10 +730,10 @@ static void paint_car_ride_track_60_deg_down( /** rct2: 0x006F73F8 */ static void paint_car_ride_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -742,10 +742,10 @@ static void paint_car_ride_track_25_deg_down_to_60_deg_down( /** rct2: 0x006F7408 */ static void paint_car_ride_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_car_ride_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -754,13 +754,13 @@ static void paint_car_ride_track_60_deg_down_to_25_deg_down( /** rct2: 0x006F7418 */ static void paint_car_ride_track_log_bumps( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = car_ride_track_pieces_log_bumps[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = car_ride_track_pieces_log_bumps[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -789,7 +789,7 @@ static void paint_car_ride_track_log_bumps( /** * rct2: 0x006F7000 */ -TRACK_PAINT_FUNCTION get_track_paint_function_car_ride(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_car_ride(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/gentle/CircusShow.cpp b/src/openrct2/ride/gentle/CircusShow.cpp index 96721e28c2..0519da7b29 100644 --- a/src/openrct2/ride/gentle/CircusShow.cpp +++ b/src/openrct2/ride/gentle/CircusShow.cpp @@ -17,7 +17,7 @@ /** * rct2: 0x0077084A */ -static void paint_circus_show_tent(paint_session * session, uint8 rideIndex, uint8 direction, sint8 al, sint8 cl, uint16 height) +static void paint_circus_show_tent(paint_session * session, uint8_t rideIndex, uint8_t direction, int8_t al, int8_t cl, uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); @@ -30,8 +30,8 @@ static void paint_circus_show_tent(paint_session * session, uint8 rideIndex, uin session->CurrentlyDrawnItem = GET_VEHICLE(ride->vehicles[0]); } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; - uint32 imageId = rideEntry->vehicles[0].base_image_id; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageId = rideEntry->vehicles[0].base_image_id; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = @@ -49,15 +49,15 @@ static void paint_circus_show_tent(paint_session * session, uint8 rideIndex, uin */ static void paint_circus_show( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -91,7 +91,7 @@ static void paint_circus_show( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -120,7 +120,7 @@ static void paint_circus_show( /** * rct2: 0x0076F8D4 */ -TRACK_PAINT_FUNCTION get_track_paint_function_circus_show(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_circus_show(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index 1da796f7da..69a3420682 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -16,10 +16,10 @@ struct rct_crooked_house_bound_box { - sint16 offset_x; - sint16 offset_y; - sint16 length_x; - sint16 length_y; + int16_t offset_x; + int16_t offset_y; + int16_t length_x; + int16_t length_y; }; static constexpr const rct_crooked_house_bound_box crooked_house_data[] = { { 6, 0, 42, 24 }, @@ -31,8 +31,8 @@ static constexpr const rct_crooked_house_bound_box crooked_house_data[] = { { 6, /** * rct2: 0x0088ABA4 */ -static void paint_crooked_house_structure(paint_session * session, uint8 direction, uint8 x_offset, uint8 y_offset, - uint32 segment, sint32 height) +static void paint_crooked_house_structure(paint_session * session, uint8_t direction, uint8_t x_offset, uint8_t y_offset, + uint32_t segment, int32_t height) { const rct_tile_element * original_tile_element = static_cast(session->CurrentlyDrawnItem); @@ -50,7 +50,7 @@ static void paint_crooked_house_structure(paint_session * session, uint8 directi } } - uint32 image_id = (direction + rideEntry->vehicles[0].base_image_id) | session->TrackColours[SCHEME_MISC]; + uint32_t image_id = (direction + rideEntry->vehicles[0].base_image_id) | session->TrackColours[SCHEME_MISC]; rct_crooked_house_bound_box boundBox = crooked_house_data[segment]; sub_98197C( @@ -60,15 +60,15 @@ static void paint_crooked_house_structure(paint_session * session, uint8 directi static void paint_crooked_house( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -95,7 +95,7 @@ static void paint_crooked_house( // case 8: sub_88ABA4(rideIndex, 224, 0, 3, height); break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -121,7 +121,7 @@ static void paint_crooked_house( paint_util_set_general_support_height(session, height + 128, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_crooked_house(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_crooked_house(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/gentle/Dodgems.cpp b/src/openrct2/ride/gentle/Dodgems.cpp index a78abde5f8..121921b505 100644 --- a/src/openrct2/ride/gentle/Dodgems.cpp +++ b/src/openrct2/ride/gentle/Dodgems.cpp @@ -24,12 +24,12 @@ enum SPR_DODGEMS_FENCE_TOP_LEFT = 21937 }; -static constexpr const uint32 dodgems_fence_sprites[] = { SPR_DODGEMS_FENCE_TOP_RIGHT, SPR_DODGEMS_FENCE_BOTTOM_RIGHT, +static constexpr const uint32_t dodgems_fence_sprites[] = { SPR_DODGEMS_FENCE_TOP_RIGHT, SPR_DODGEMS_FENCE_BOTTOM_RIGHT, SPR_DODGEMS_FENCE_BOTTOM_LEFT, SPR_DODGEMS_FENCE_TOP_LEFT }; -static void paint_dodgems_roof(paint_session * session, sint32 height, sint32 offset) +static void paint_dodgems_roof(paint_session * session, int32_t height, int32_t offset) { - uint32 image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session->TrackColours[SCHEME_TRACK]; + uint32_t image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session->TrackColours[SCHEME_TRACK]; sub_98196C(session, image_id, 0, 0, 32, 32, 2, height); image_id = (SPR_DODGEMS_ROOF_GLASS + offset) | (PALETTE_DARKEN_3 << 19) | IMAGE_TYPE_TRANSPARENT; @@ -38,21 +38,21 @@ static void paint_dodgems_roof(paint_session * session, sint32 height, sint32 of static void paint_dodgems( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 relativeTrackSequence = track_map_4x4[direction][trackSequence]; + uint8_t relativeTrackSequence = track_map_4x4[direction][trackSequence]; - sint32 edges = edges_4x4[relativeTrackSequence]; + int32_t edges = edges_4x4[relativeTrackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC], nullptr); - uint32 imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 30, 30, 1, height, 1, 1, height); track_paint_util_paint_fences( @@ -97,7 +97,7 @@ static void paint_dodgems( /** * rct2: */ -TRACK_PAINT_FUNCTION get_track_paint_function_dodgems(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_dodgems(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_4_X_4) { diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index cfcdc7294a..be96e08f5a 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -14,14 +14,14 @@ #include "../TrackPaint.h" #include "../../world/Sprite.h" -static constexpr const uint8 edges_1x4_ne_sw[] = { +static constexpr const uint8_t edges_1x4_ne_sw[] = { EDGE_NW | EDGE_SE, EDGE_NW | EDGE_SE | EDGE_NE, EDGE_NW | EDGE_SE, EDGE_NW | EDGE_SE | EDGE_SW, }; -static constexpr const uint8 edges_1x4_nw_se[] = { +static constexpr const uint8_t edges_1x4_nw_se[] = { EDGE_NE | EDGE_SW, EDGE_NE | EDGE_SW | EDGE_NW, EDGE_NE | EDGE_SW, @@ -30,10 +30,10 @@ static constexpr const uint8 edges_1x4_nw_se[] = { struct ferris_wheel_bound_box { - sint16 length_x; - sint16 length_y; - sint16 offset_x; - sint16 offset_y; + int16_t length_x; + int16_t length_y; + int16_t offset_x; + int16_t offset_y; }; /** rct2: 0x008A8CA8 */ @@ -47,10 +47,10 @@ static ferris_wheel_bound_box ferris_wheel_data[] = { /** * rct2: 0x004C3874 */ -static void paint_ferris_wheel_structure(paint_session * session, uint8 rideIndex, uint8 direction, sint8 axisOffset, - uint16 height) +static void paint_ferris_wheel_structure(paint_session * session, uint8_t rideIndex, uint8_t direction, int8_t axisOffset, + uint16_t height) { - uint32 imageId, baseImageId; + uint32_t imageId, baseImageId; const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); @@ -58,8 +58,8 @@ static void paint_ferris_wheel_structure(paint_session * session, uint8 rideInde rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); rct_vehicle * vehicle = nullptr; - sint8 xOffset = !(direction & 1) ? axisOffset : 0; - sint8 yOffset = (direction & 1) ? axisOffset : 0; + int8_t xOffset = !(direction & 1) ? axisOffset : 0; + int8_t yOffset = (direction & 1) ? axisOffset : 0; height += 7; @@ -73,13 +73,13 @@ static void paint_ferris_wheel_structure(paint_session * session, uint8 rideInde session->CurrentlyDrawnItem = vehicle; } - uint32 imageOffset = 0; + uint32_t imageOffset = 0; if (vehicle != nullptr) { imageOffset = vehicle->vehicle_sprite_type % 8; } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = @@ -101,7 +101,7 @@ static void paint_ferris_wheel_structure(paint_session * session, uint8 rideInde if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { vehicle = GET_VEHICLE(ride->vehicles[0]); - for (sint32 i = 0; i < 32; i += 2) + for (int32_t i = 0; i < 32; i += 2) { if (vehicle->peep[i] == SPRITE_INDEX_NULL) { @@ -114,7 +114,7 @@ static void paint_ferris_wheel_structure(paint_session * session, uint8 rideInde continue; } - sint32 frameNum = (vehicle->vehicle_sprite_type + i * 4) % 128; + int32_t frameNum = (vehicle->vehicle_sprite_type + i * 4) % 128; imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i], vehicle->peep_tshirt_colours[i + 1]); imageId = (baseImageId + 32 + direction * 128 + frameNum) | imageColourFlags; sub_98199C( @@ -137,15 +137,15 @@ static void paint_ferris_wheel_structure(paint_session * session, uint8 rideInde */ static void paint_ferris_wheel( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 relativeTrackSequence = track_map_1x4[direction][trackSequence]; + uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence]; - sint32 edges; + int32_t edges; if (direction & 1) { edges = edges_1x4_nw_se[relativeTrackSequence]; @@ -162,9 +162,9 @@ static void paint_ferris_wheel( track_paint_util_paint_floor(session, edges, session->TrackColours[SCHEME_TRACK], height, floorSpritesCork); - uint32 imageId; - uint8 rotation = session->CurrentRotation; - uint32 colourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageId; + uint8_t rotation = session->CurrentRotation; + uint32_t colourFlags = session->TrackColours[SCHEME_MISC]; if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation)) { imageId = SPR_FENCE_ROPE_NW | colourFlags; @@ -210,7 +210,7 @@ static void paint_ferris_wheel( /** * rct2: 0x008A8CC8 */ -TRACK_PAINT_FUNCTION get_track_paint_function_ferris_wheel(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_ferris_wheel(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_1_X_4_C) { diff --git a/src/openrct2/ride/gentle/FlyingSaucers.cpp b/src/openrct2/ride/gentle/FlyingSaucers.cpp index 8d6ba13702..fe458569a4 100644 --- a/src/openrct2/ride/gentle/FlyingSaucers.cpp +++ b/src/openrct2/ride/gentle/FlyingSaucers.cpp @@ -22,7 +22,7 @@ enum SPR_FLYING_SAUCERS_FENCE_NW = 21924, }; -static constexpr const uint32 flying_saucers_fence_sprites[] = { +static constexpr const uint32_t flying_saucers_fence_sprites[] = { SPR_FLYING_SAUCERS_FENCE_NE, SPR_FLYING_SAUCERS_FENCE_SE, SPR_FLYING_SAUCERS_FENCE_SW, @@ -34,21 +34,21 @@ static constexpr const uint32 flying_saucers_fence_sprites[] = { */ static void paint_flying_saucers( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 relativeTrackSequence = track_map_4x4[direction][trackSequence]; + uint8_t relativeTrackSequence = track_map_4x4[direction][trackSequence]; - sint32 edges = edges_4x4[relativeTrackSequence]; + int32_t edges = edges_4x4[relativeTrackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC], nullptr); - uint32 imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 30, 30, 1, height, 1, 1, height); track_paint_util_paint_fences( @@ -62,7 +62,7 @@ static void paint_flying_saucers( /** * rct2: 0x00887208 */ -TRACK_PAINT_FUNCTION get_track_paint_function_flying_saucers(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_flying_saucers(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_4_X_4) { diff --git a/src/openrct2/ride/gentle/GhostTrain.cpp b/src/openrct2/ride/gentle/GhostTrain.cpp index a6508560b6..846f52ea36 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -67,42 +67,42 @@ enum SPR_GHOST_TRAIN_TRACK_BRAKES_NW_SE = 28882 }; -static constexpr const uint32 ghost_train_track_pieces_flat[4] = { +static constexpr const uint32_t ghost_train_track_pieces_flat[4] = { SPR_GHOST_TRAIN_TRACK_FLAT_SW_NE, SPR_GHOST_TRAIN_TRACK_FLAT_NW_SE, SPR_GHOST_TRAIN_TRACK_FLAT_SW_NE, SPR_GHOST_TRAIN_TRACK_FLAT_NW_SE, }; -static constexpr const uint32 ghost_train_track_pieces_flat_to_25_deg_up[4][2] = { +static constexpr const uint32_t ghost_train_track_pieces_flat_to_25_deg_up[4][2] = { { SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_SW_NE, SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_FRONT_SW_NE }, { SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_NW_SE, SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_FRONT_NW_SE }, { SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_NE_SW, SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_FRONT_NE_SW }, { SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_SE_NW, SPR_GHOST_TRAIN_TRACK_FLAT_TO_25_DEG_UP_FRONT_SE_NW }, }; -static constexpr const uint32 ghost_train_track_pieces_25_deg_up_to_flat[4][2] = { +static constexpr const uint32_t ghost_train_track_pieces_25_deg_up_to_flat[4][2] = { { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_SW_NE, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_FRONT_SW_NE }, { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_NW_SE, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_FRONT_NW_SE }, { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_NE_SW, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_FRONT_NE_SW }, { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_SE_NW, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_TO_FLAT_FRONT_SE_NW }, }; -static constexpr const uint32 ghost_train_track_pieces_25_deg_up[4][2] = { +static constexpr const uint32_t ghost_train_track_pieces_25_deg_up[4][2] = { { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_SW_NE, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_FRONT_SW_NE }, { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_NW_SE, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_FRONT_NW_SE }, { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_NE_SW, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_FRONT_NE_SW }, { SPR_GHOST_TRAIN_TRACK_25_DEG_UP_SE_NW, SPR_GHOST_TRAIN_TRACK_25_DEG_UP_FRONT_SE_NW }, }; -static constexpr const uint32 ghost_train_track_pieces_quarter_turn_1_tile[4] = { +static constexpr const uint32_t ghost_train_track_pieces_quarter_turn_1_tile[4] = { SPR_GHOST_TRAIN_QUARTER_TURN_1_TILE_SW_NW, SPR_GHOST_TRAIN_QUARTER_TURN_1_TILE_NW_NE, SPR_GHOST_TRAIN_QUARTER_TURN_1_TILE_NE_SE, SPR_GHOST_TRAIN_QUARTER_TURN_1_TILE_SE_SW, }; -static constexpr const uint32 ghost_train_track_pieces_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t ghost_train_track_pieces_quarter_turn_3_tiles[4][3] = { { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -113,14 +113,14 @@ static constexpr const uint32 ghost_train_track_pieces_quarter_turn_3_tiles[4][3 SPR_GHOST_TRAIN_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static constexpr const uint32 ghost_train_track_pieces_spinning_tunnel_track[4] = { +static constexpr const uint32_t ghost_train_track_pieces_spinning_tunnel_track[4] = { SPR_GHOST_TRAIN_SPINNING_TUNNEL_TRACK_SW_NE, SPR_GHOST_TRAIN_SPINNING_TUNNEL_TRACK_NW_SE, SPR_GHOST_TRAIN_SPINNING_TUNNEL_TRACK_SW_NE, SPR_GHOST_TRAIN_SPINNING_TUNNEL_TRACK_NW_SE, }; -static constexpr const uint32 ghost_train_track_pieces_brakes[4] = { +static constexpr const uint32_t ghost_train_track_pieces_brakes[4] = { SPR_GHOST_TRAIN_TRACK_BRAKES_SW_NE, SPR_GHOST_TRAIN_TRACK_BRAKES_NW_SE, SPR_GHOST_TRAIN_TRACK_BRAKES_SW_NE, @@ -130,15 +130,15 @@ static constexpr const uint32 ghost_train_track_pieces_brakes[4] = { /** rct2: 0x00770BEC */ static void paint_ghost_train_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = ghost_train_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -171,15 +171,15 @@ static void paint_ghost_train_track_flat( /** rct2: 0x00770BFC */ static void paint_ghost_train_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = ghost_train_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); @@ -228,15 +228,15 @@ static void paint_ghost_train_track_25_deg_up( /** rct2: 0x00770C0C */ static void paint_ghost_train_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = ghost_train_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); @@ -284,15 +284,15 @@ static void paint_ghost_train_track_flat_to_25_deg_up( static void paint_ghost_train_track_25_deg_up_to_flat_shared( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = ghost_train_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height); @@ -325,10 +325,10 @@ static void paint_ghost_train_track_25_deg_up_to_flat_shared( /** rct2: 0x00770C1C */ static void paint_ghost_train_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_ghost_train_track_25_deg_up_to_flat_shared(session, rideIndex, trackSequence, direction, height, tileElement); @@ -353,10 +353,10 @@ static void paint_ghost_train_track_25_deg_up_to_flat( /** rct2: 0x00770C2C */ static void paint_ghost_train_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_ghost_train_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -365,10 +365,10 @@ static void paint_ghost_train_track_25_deg_down( /** rct2: 0x00770C3C */ static void paint_ghost_train_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_ghost_train_track_25_deg_up_to_flat_shared(session, rideIndex, trackSequence, (direction + 2) % 4, height, @@ -394,10 +394,10 @@ static void paint_ghost_train_track_flat_to_25_deg_down( /** rct2: 0x00770C4C */ static void paint_ghost_train_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_ghost_train_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -406,13 +406,13 @@ static void paint_ghost_train_track_25_deg_down_to_flat( /** rct2: 0x00770C5C, 0x00770C6C, 0x00770C7C */ static void paint_ghost_train_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -464,10 +464,10 @@ static void paint_ghost_train_station( /** rct2: 0x00770C9C */ static void paint_ghost_train_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_3_tiles_paint( @@ -484,7 +484,7 @@ static void paint_ghost_train_track_right_quarter_turn_3_tiles( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -505,10 +505,10 @@ static void paint_ghost_train_track_right_quarter_turn_3_tiles( /** rct2: 0x00770CAC */ static void paint_ghost_train_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -519,10 +519,10 @@ static void paint_ghost_train_track_left_quarter_turn_3_tiles( /** rct2: 0x00770CAC */ static void paint_ghost_train_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_1_tile_paint( @@ -537,10 +537,10 @@ static void paint_ghost_train_track_left_quarter_turn_1_tile( /** rct2: 0x00770CBC */ static void paint_ghost_train_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_ghost_train_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, @@ -550,13 +550,13 @@ static void paint_ghost_train_track_right_quarter_turn_1_tile( /** rct2: 0x00770CCC */ static void paint_ghost_train_track_spinning_tunnel( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = ghost_train_track_pieces_spinning_tunnel_track[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_spinning_tunnel_track[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -587,15 +587,15 @@ static void paint_ghost_train_track_spinning_tunnel( /** rct2: 0x00770CDC */ static void paint_ghost_train_track_brakes( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = ghost_train_track_pieces_brakes[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_brakes[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -628,7 +628,7 @@ static void paint_ghost_train_track_brakes( /** * rct2: 0x00770924 */ -TRACK_PAINT_FUNCTION get_track_paint_function_ghost_train(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_ghost_train(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 5ac0191ef4..adc1655d36 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -16,10 +16,10 @@ struct haunted_house_bound_box { - sint16 offset_x; - sint16 offset_y; - sint16 length_x; - sint16 length_y; + int16_t offset_x; + int16_t offset_y; + int16_t length_x; + int16_t length_y; }; /** rct2: 0x1428180 */ @@ -30,17 +30,17 @@ static haunted_house_bound_box haunted_house_data[] = { /** * rct2: 0x0076F72C */ -static void paint_haunted_house_structure(paint_session * session, uint8 rideIndex, uint8 direction, sint8 xOffset, - sint8 yOffset, uint8 part, uint16 height) +static void paint_haunted_house_structure(paint_session * session, uint8_t rideIndex, uint8_t direction, int8_t xOffset, + int8_t yOffset, uint8_t part, uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); - uint8 frameNum = 0; + uint8_t frameNum = 0; Ride * ride = get_ride(rideIndex); rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); - uint32 baseImageId = rideEntry->vehicles[0].base_image_id; + uint32_t baseImageId = rideEntry->vehicles[0].base_image_id; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { @@ -50,7 +50,7 @@ static void paint_haunted_house_structure(paint_session * session, uint8 rideInd frameNum = vehicle->vehicle_sprite_type; } - uint32 imageId = (baseImageId + direction) | session->TrackColours[SCHEME_MISC]; + uint32_t imageId = (baseImageId + direction) | session->TrackColours[SCHEME_MISC]; haunted_house_bound_box boundBox = haunted_house_data[part]; sub_98197C( session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x, @@ -89,15 +89,15 @@ static void paint_haunted_house_structure(paint_session * session, uint8 rideInd */ static void paint_haunted_house( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -122,7 +122,7 @@ static void paint_haunted_house( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -151,7 +151,7 @@ static void paint_haunted_house( /** * rct2: 0x0076E7B0 */ -TRACK_PAINT_FUNCTION get_track_paint_function_haunted_house(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_haunted_house(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/gentle/Maze.cpp b/src/openrct2/ride/gentle/Maze.cpp index 26a58bf845..303b963665 100644 --- a/src/openrct2/ride/gentle/Maze.cpp +++ b/src/openrct2/ride/gentle/Maze.cpp @@ -46,25 +46,25 @@ enum */ static void maze_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint16 maze_entry = track_element_get_maze_entry(tileElement); + uint16_t maze_entry = track_element_get_maze_entry(tileElement); maze_entry = rol16(maze_entry, direction * 4); - uint32 rotation = session->CurrentRotation; + uint32_t rotation = session->CurrentRotation; // draw ground - sint32 image_id = SPR_TERRAIN_DIRT | session->TrackColours[SCHEME_MISC]; + int32_t image_id = SPR_TERRAIN_DIRT | session->TrackColours[SCHEME_MISC]; sub_98196C(session, image_id, 0, 0, 32, 32, 0, height); wooden_a_supports_paint_setup(session, (rotation & 1) ? 0 : 1, 0, height, session->TrackColours[SCHEME_3], nullptr); paint_util_set_segment_support_height(session, SEGMENTS_ALL & ~SEGMENT_C4, 0xFFFF, 0); - sint32 base_image_id = 0; + int32_t base_image_id = 0; switch (get_ride(rideIndex)->track_colour_supports[0]) { case 0: @@ -175,7 +175,7 @@ static void maze_paint_setup( /** * rct2: 0x008A81E8 */ -TRACK_PAINT_FUNCTION get_track_paint_function_maze(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_maze(int32_t trackType, int32_t direction) { if (trackType != TRACK_ELEM_MAZE) { diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index f3dae56b82..5a55c989fc 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -15,16 +15,16 @@ #include "../../world/Sprite.h" /** rct2: 0x0142805C */ -static constexpr const uint32 merry_go_round_rider_offsets[] = { 0, 32, 64, 96, 16, 48, 80, 112 }; +static constexpr const uint32_t merry_go_round_rider_offsets[] = { 0, 32, 64, 96, 16, 48, 80, 112 }; /** rct2: 0x0142807C */ -static constexpr const uint16 merry_go_round_breakdown_vibration[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 0 }; +static constexpr const uint16_t merry_go_round_breakdown_vibration[] = { 0, 1, 2, 3, 4, 3, 2, 1, 0, 0 }; /** * rct2: 0x0076287D */ -static void paint_merry_go_round_structure(paint_session * session, uint8 rideIndex, uint8 direction, sint8 xOffset, - sint8 yOffset, uint16 height) +static void paint_merry_go_round_structure(paint_session * session, uint8_t rideIndex, uint8_t direction, int8_t xOffset, + int8_t yOffset, uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); height += 7; @@ -38,7 +38,7 @@ static void paint_merry_go_round_structure(paint_session * session, uint8 rideIn return; } - uint32 baseImageId = rideEntry->vehicles[0].base_image_id; + uint32_t baseImageId = rideEntry->vehicles[0].base_image_id; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { @@ -53,30 +53,30 @@ static void paint_merry_go_round_structure(paint_session * session, uint8 rideIn } } - uint32 rotationOffset = 0; + uint32_t rotationOffset = 0; if (vehicle != nullptr) { - uint32 rotation = ((vehicle->sprite_direction >> 3) + session->CurrentRotation) << 5; + uint32_t rotation = ((vehicle->sprite_direction >> 3) + session->CurrentRotation) << 5; rotationOffset = (vehicle->vehicle_sprite_type + rotation) % 128; } - uint32 imageOffset = rotationOffset & 0x1F; + uint32_t imageOffset = rotationOffset & 0x1F; - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } - uint32 imageId = (baseImageId + imageOffset) | imageColourFlags; + uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { - for (sint32 peep = 0; peep <= 14; peep += 2) + for (int32_t peep = 0; peep <= 14; peep += 2) { if (vehicle->num_peeps <= peep) { @@ -107,15 +107,15 @@ static void paint_merry_go_round_structure(paint_session * session, uint8 rideIn */ static void paint_merry_go_round( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -149,7 +149,7 @@ static void paint_merry_go_round( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -178,7 +178,7 @@ static void paint_merry_go_round( /** * rct2: 0x0076190C */ -TRACK_PAINT_FUNCTION get_track_paint_function_merry_go_round(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_merry_go_round(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index 0526986698..58b3ffa595 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -182,7 +182,7 @@ enum SPR_MINI_GOLF_HOLE_E_TRIM_PART_3_SW_NW = 14556, }; -static constexpr const uint32 mini_golf_track_sprites_25_deg_up[][3] = { { +static constexpr const uint32_t mini_golf_track_sprites_25_deg_up[][3] = { { SPR_MINI_GOLF_25_DEG_UP_SW_NE, SPR_MINI_GOLF_25_DEG_UP_FENCE_BACK_SW_NE, SPR_MINI_GOLF_25_DEG_UP_FENCE_FRONT_SW_NE, @@ -203,7 +203,7 @@ static constexpr const uint32 mini_golf_track_sprites_25_deg_up[][3] = { { SPR_MINI_GOLF_25_DEG_UP_FENCE_FRONT_SE_NW, } }; -static constexpr const uint32 mini_golf_track_sprites_flat_to_25_deg_up[][3] = { { +static constexpr const uint32_t mini_golf_track_sprites_flat_to_25_deg_up[][3] = { { SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_SW_NE, SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_BACK_SW_NE, SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_SW_NE, @@ -224,7 +224,7 @@ static constexpr const uint32 mini_golf_track_sprites_flat_to_25_deg_up[][3] = { SPR_MINI_GOLF_FLAT_TO_25_DEG_UP_FENCE_FRONT_SE_NW, } }; -static constexpr const uint32 mini_golf_track_sprites_25_deg_up_to_flat[][3] = { { +static constexpr const uint32_t mini_golf_track_sprites_25_deg_up_to_flat[][3] = { { SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_SW_NE, SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_BACK_SW_NE, SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_SW_NE, @@ -245,21 +245,21 @@ static constexpr const uint32 mini_golf_track_sprites_25_deg_up_to_flat[][3] = { SPR_MINI_GOLF_25_DEG_UP_TO_FLAT_FENCE_FRONT_SE_NW, } }; -static constexpr const uint32 mini_golf_track_sprites_quarter_turn_1_tile[] = { +static constexpr const uint32_t mini_golf_track_sprites_quarter_turn_1_tile[] = { SPR_MINI_GOLF_QUARTER_TURN_1_TILE_SW_NW, SPR_MINI_GOLF_QUARTER_TURN_1_TILE_NW_NE, SPR_MINI_GOLF_QUARTER_TURN_1_TILE_NE_SE, SPR_MINI_GOLF_QUARTER_TURN_1_TILE_SE_SW, }; -static constexpr const uint32 mini_golf_track_sprites_quarter_turn_1_tile_fence_front[] = { +static constexpr const uint32_t mini_golf_track_sprites_quarter_turn_1_tile_fence_front[] = { SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_FRONT_SW_NW, SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_FRONT_NW_NE, SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_FRONT_NE_SE, SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_FRONT_SE_SW, }; -static constexpr const uint32 mini_golf_track_sprites_hole_a[4][2][2] = { +static constexpr const uint32_t mini_golf_track_sprites_hole_a[4][2][2] = { { { SPR_MINI_GOLF_HOLE_A_BASE_PART_1_SW_NE, SPR_MINI_GOLF_HOLE_A_TRIM_PART_1_SW_NE }, { SPR_MINI_GOLF_HOLE_A_BASE_PART_2_SW_NE, SPR_MINI_GOLF_HOLE_A_TRIM_PART_2_SW_NE } }, { { SPR_MINI_GOLF_HOLE_A_BASE_PART_1_NW_SE, SPR_MINI_GOLF_HOLE_A_TRIM_PART_1_NW_SE }, @@ -270,7 +270,7 @@ static constexpr const uint32 mini_golf_track_sprites_hole_a[4][2][2] = { { SPR_MINI_GOLF_HOLE_A_BASE_PART_2_SE_NW, SPR_MINI_GOLF_HOLE_A_TRIM_PART_2_SE_NW } }, }; -static constexpr const uint32 mini_golf_track_sprites_hole_b[4][2][2] = { +static constexpr const uint32_t mini_golf_track_sprites_hole_b[4][2][2] = { { { SPR_MINI_GOLF_HOLE_B_BASE_PART_1_SW_NE, SPR_MINI_GOLF_HOLE_B_TRIM_PART_1_SW_NE }, { SPR_MINI_GOLF_HOLE_B_BASE_PART_2_SW_NE, SPR_MINI_GOLF_HOLE_B_TRIM_PART_2_SW_NE } }, { { SPR_MINI_GOLF_HOLE_B_BASE_PART_1_NW_SE, SPR_MINI_GOLF_HOLE_B_TRIM_PART_1_NW_SE }, @@ -281,7 +281,7 @@ static constexpr const uint32 mini_golf_track_sprites_hole_b[4][2][2] = { { SPR_MINI_GOLF_HOLE_B_BASE_PART_2_SE_NW, SPR_MINI_GOLF_HOLE_B_TRIM_PART_2_SE_NW } }, }; -static constexpr const uint32 mini_golf_track_sprites_hole_c[][2][2] = { +static constexpr const uint32_t mini_golf_track_sprites_hole_c[][2][2] = { { { SPR_MINI_GOLF_HOLE_C_BASE_PART_1_SW_NE, SPR_MINI_GOLF_HOLE_C_TRIM_PART_1_SW_NE }, { SPR_MINI_GOLF_HOLE_C_BASE_PART_2_SW_NE, SPR_MINI_GOLF_HOLE_C_TRIM_PART_2_SW_NE } }, { { SPR_MINI_GOLF_HOLE_C_BASE_PART_1_NW_SE, SPR_MINI_GOLF_HOLE_C_TRIM_PART_1_NW_SE }, @@ -292,7 +292,7 @@ static constexpr const uint32 mini_golf_track_sprites_hole_c[][2][2] = { { SPR_MINI_GOLF_HOLE_C_BASE_PART_2_SE_NW, SPR_MINI_GOLF_HOLE_C_TRIM_PART_2_SE_NW } }, }; -static constexpr const uint32 mini_golf_track_sprites_hole_d[][3][2] = { +static constexpr const uint32_t mini_golf_track_sprites_hole_d[][3][2] = { { { SPR_MINI_GOLF_HOLE_D_BASE_PART_1_SW_SE, SPR_MINI_GOLF_HOLE_D_TRIM_PART_1_SW_SE }, { SPR_MINI_GOLF_HOLE_D_BASE_PART_2_SW_SE, SPR_MINI_GOLF_HOLE_D_TRIM_PART_2_SW_SE }, { SPR_MINI_GOLF_HOLE_D_BASE_PART_3_SW_SE, SPR_MINI_GOLF_HOLE_D_TRIM_PART_3_SW_SE } }, @@ -307,7 +307,7 @@ static constexpr const uint32 mini_golf_track_sprites_hole_d[][3][2] = { { SPR_MINI_GOLF_HOLE_D_BASE_PART_3_SE_NE, SPR_MINI_GOLF_HOLE_D_TRIM_PART_3_SE_NE } }, }; -static constexpr const uint32 mini_golf_track_sprites_hole_e[][3][2] = { +static constexpr const uint32_t mini_golf_track_sprites_hole_e[][3][2] = { { { SPR_MINI_GOLF_HOLE_E_BASE_PART_1_SW_NW, SPR_MINI_GOLF_HOLE_E_TRIM_PART_1_SW_NW }, { SPR_MINI_GOLF_HOLE_E_BASE_PART_2_SW_NW, SPR_MINI_GOLF_HOLE_E_TRIM_PART_2_SW_NW }, { SPR_MINI_GOLF_HOLE_E_BASE_PART_3_SW_NW, SPR_MINI_GOLF_HOLE_E_TRIM_PART_3_SW_NW } }, @@ -323,34 +323,34 @@ static constexpr const uint32 mini_golf_track_sprites_hole_e[][3][2] = { }; /** rct2: 0x00933471 */ -static constexpr const uint8 mini_golf_peep_animation_frames_walk[] = { 0, 1, 2, 3, 4, 5 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_walk[] = { 0, 1, 2, 3, 4, 5 }; /** rct2: 0x00933478 */ -static constexpr const uint8 mini_golf_peep_animation_frames_place_ball_downwards[] = { 12, 13, 14, 15 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_place_ball_downwards[] = { 12, 13, 14, 15 }; /** rct2: 0x009334B5 */ -static constexpr const uint8 mini_golf_peep_animation_frames_swing[] = { 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 33, 33, 33, 33, 34 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_swing[] = { 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 33, 33, 33, 33, 34 }; /** rct2: 0x0093347D */ -static constexpr const uint8 mini_golf_peep_animation_frames_swing_left[] = { 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 9 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_swing_left[] = { 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 9 }; /** rct2: 0x0093348D */ -static constexpr const uint8 mini_golf_peep_animation_frames_place_ball_upwards[] = { 12, 13, 14, 15, 14, 13, 12 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_place_ball_upwards[] = { 12, 13, 14, 15, 14, 13, 12 }; /** rct2: 0x00933495 */ -static constexpr const uint8 mini_golf_peep_animation_frames_jump[] = { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_jump[] = { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }; /** rct2: 0x009334A5 */ -static constexpr const uint8 mini_golf_peep_animation_frames_pickup_ball[] = { 15, 14, 13, 12 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_pickup_ball[] = { 15, 14, 13, 12 }; /** rct2: 0x009334C5 */ -static constexpr const uint8 mini_golf_peep_animation_frames_put[] = { 35, 36, 36, 36, 36, 36, 35, 35, 35, 35 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_put[] = { 35, 36, 36, 36, 36, 36, 35, 35, 35, 35 }; /** rct2: 0x009334AA */ -static constexpr const uint8 mini_golf_peep_animation_frames_put_left[] = { 10, 11, 11, 11, 11, 11, 10, 10, 10, 10 }; +static constexpr const uint8_t mini_golf_peep_animation_frames_put_left[] = { 10, 11, 11, 11, 11, 11, 10, 10, 10, 10 }; /** rct2: 0x008B8F74 */ -static constexpr const uint8 * mini_golf_peep_animation_frames[] = { +static constexpr const uint8_t * mini_golf_peep_animation_frames[] = { mini_golf_peep_animation_frames_walk, mini_golf_peep_animation_frames_place_ball_downwards, mini_golf_peep_animation_frames_swing_left, mini_golf_peep_animation_frames_place_ball_upwards, mini_golf_peep_animation_frames_jump, mini_golf_peep_animation_frames_pickup_ball, @@ -370,10 +370,10 @@ const size_t mini_golf_peep_animation_lengths[] = { Util::CountOf(mini_golf_peep_animation_frames_put), }; -static paint_struct * mini_golf_paint_util_7c(paint_session * session, uint8 direction, uint32 image_id, sint8 x_offset, - sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, - sint8 bound_box_length_z, sint16 z_offset, sint16 bound_box_offset_x, - sint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation) +static paint_struct * mini_golf_paint_util_7c(paint_session * session, uint8_t direction, uint32_t image_id, int8_t x_offset, + int8_t y_offset, int16_t bound_box_length_x, int16_t bound_box_length_y, + int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, + int16_t bound_box_offset_y, int16_t bound_box_offset_z, uint32_t rotation) { if (direction & 1) { @@ -412,13 +412,13 @@ static bool mini_golf_paint_util_should_draw_fence(paint_session * session, cons /** rct2: 0x0087F10C */ static void paint_mini_golf_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction & 1) { @@ -463,13 +463,13 @@ static void paint_mini_golf_track_flat( /** rct2: 0x0087F11C */ static void paint_mini_golf_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; imageId = mini_golf_track_sprites_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation); @@ -506,13 +506,13 @@ static void paint_mini_golf_track_25_deg_up( /** rct2: 0x0087F12C */ static void paint_mini_golf_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; imageId = mini_golf_track_sprites_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation); @@ -549,13 +549,13 @@ static void paint_mini_golf_track_flat_to_25_deg_up( /** rct2: 0x0087F13C */ static void paint_mini_golf_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; imageId = mini_golf_track_sprites_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK]; mini_golf_paint_util_7c(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session->CurrentRotation); @@ -592,10 +592,10 @@ static void paint_mini_golf_track_25_deg_up_to_flat( /** rct2: 0x0087F14C */ static void paint_mini_golf_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_golf_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -604,10 +604,10 @@ static void paint_mini_golf_track_25_deg_down( /** rct2: 0x0087F15C */ static void paint_mini_golf_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_golf_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -616,10 +616,10 @@ static void paint_mini_golf_track_flat_to_25_deg_down( /** rct2: 0x0087F16C */ static void paint_mini_golf_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_golf_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -628,16 +628,16 @@ static void paint_mini_golf_track_25_deg_down_to_flat( /** rct2: 0x0087F17C, 0x0087F18C, 0x0087F19C */ static void paint_mini_golf_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; Ride * ride = get_ride(rideIndex); const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; - uint32 imageId; + uint32_t imageId; bool hasFence; imageId = SPR_MINI_GOLF_STATION_FLOOR | session->TrackColours[SCHEME_TRACK]; @@ -696,13 +696,13 @@ static void paint_mini_golf_station( /** rct2: 0x0087F1AC */ static void paint_mini_golf_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; track_paint_util_left_quarter_turn_1_tile_paint( session, 1, height, 0, direction, session->TrackColours[SCHEME_TRACK], mini_golf_track_sprites_quarter_turn_1_tile); @@ -780,19 +780,19 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile( /** rct2: 0x0087F1BC */ static void paint_mini_golf_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_golf_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); } -static void paint_mini_golf_hole_ab(paint_session * session, uint8 trackSequence, uint8 direction, sint32 height, - const uint32 sprites[4][2][2]) +static void paint_mini_golf_hole_ab(paint_session * session, uint8_t trackSequence, uint8_t direction, int32_t height, + const uint32_t sprites[4][2][2]) { - uint32 imageId; + uint32_t imageId; LocationXY16 boundBox, boundBoxOffset; bool drewSupports = @@ -842,10 +842,10 @@ static void paint_mini_golf_hole_ab(paint_session * session, uint8 trackSequence /** rct2: 0x0087F1CC */ static void paint_mini_golf_hole_a( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_golf_hole_ab(session, trackSequence, direction, height, mini_golf_track_sprites_hole_a); @@ -854,10 +854,10 @@ static void paint_mini_golf_hole_a( /** rct2: 0x0087F1DC */ static void paint_mini_golf_hole_b( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_golf_hole_ab(session, trackSequence, direction, height, mini_golf_track_sprites_hole_b); @@ -866,13 +866,13 @@ static void paint_mini_golf_hole_b( /** rct2: 0x0087F1EC */ static void paint_mini_golf_hole_c( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; LocationXY16 boundBox, boundBoxOffset; bool drewSupports = @@ -936,16 +936,16 @@ static void paint_mini_golf_hole_c( /** rct2: 0x0087F1FC */ static void paint_mini_golf_hole_d( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; LocationXY16 boundBox, boundBoxOffset; - sint32 supportType = (direction & 1); + int32_t supportType = (direction & 1); if (trackSequence == 2) supportType = 1 - supportType; bool drewSupports = @@ -1029,16 +1029,16 @@ static void paint_mini_golf_hole_d( /** rct2: 0x0087F1FC */ static void paint_mini_golf_hole_e( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; LocationXY16 boundBox, boundBoxOffset; - sint32 supportType = (direction & 1); + int32_t supportType = (direction & 1); if (trackSequence == 2) supportType = 1 - supportType; bool drewSupports = @@ -1122,7 +1122,7 @@ static void paint_mini_golf_hole_e( /** * rct2: 0x0087EDC4 */ -TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(int32_t trackType, int32_t direction) { switch (trackType) { @@ -1171,7 +1171,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(sint32 trackType, sint32 /** * rct2: 0x006D42F0 */ -void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_mini_golf_player(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle) { if (vehicle->num_peeps == 0) @@ -1193,18 +1193,18 @@ void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 i rct_ride_entry * rideEntry = get_ride_entry(get_ride(vehicle->ride)->subtype); rct_sprite * sprite = get_sprite(vehicle->peep[0]); - uint8 frame = mini_golf_peep_animation_frames[vehicle->mini_golf_current_animation][vehicle->animation_frame]; - uint32 ebx = (frame << 2) + (imageDirection >> 3); + uint8_t frame = mini_golf_peep_animation_frames[vehicle->mini_golf_current_animation][vehicle->animation_frame]; + uint32_t ebx = (frame << 2) + (imageDirection >> 3); - uint32 image_id = rideEntry->vehicles[0].base_image_id + 1 + ebx; - uint32 peep_palette = sprite->peep.tshirt_colour << 19 | sprite->peep.trousers_colour << 24 | 0x0A0000000; + uint32_t image_id = rideEntry->vehicles[0].base_image_id + 1 + ebx; + uint32_t peep_palette = sprite->peep.tshirt_colour << 19 | sprite->peep.trousers_colour << 24 | 0x0A0000000; sub_98197C(session, image_id | peep_palette, 0, 0, 1, 1, 11, z, 0, 0, z + 5); } /** * rct2: 0x006D43C6 */ -void vehicle_visual_mini_golf_ball(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_mini_golf_ball(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle) { if (vehicle->mini_golf_current_animation != 1) @@ -1226,6 +1226,6 @@ void vehicle_visual_mini_golf_ball(paint_session * session, sint32 x, sint32 ima Ride * ride = get_ride(vehicle->ride); rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); - uint32 image_id = rideEntry->vehicles[0].base_image_id; + uint32_t image_id = rideEntry->vehicles[0].base_image_id; sub_98197C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z + 3); } diff --git a/src/openrct2/ride/gentle/MiniHelicopters.cpp b/src/openrct2/ride/gentle/MiniHelicopters.cpp index 2d5a09de9c..02339c4caf 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -19,13 +19,13 @@ /** rct2: 0x */ static void paint_mini_helicopters_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -61,14 +61,14 @@ static void paint_mini_helicopters_track_station( /** rct2: 0x0081F348 */ static void paint_mini_helicopters_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; if (direction & 1) { @@ -97,14 +97,14 @@ static void paint_mini_helicopters_track_flat( /** rct2: 0x0081F368 */ static void paint_mini_helicopters_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -143,14 +143,14 @@ static void paint_mini_helicopters_track_flat_to_25_deg_up( /** rct2: 0x0081F358 */ static void paint_mini_helicopters_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -189,14 +189,14 @@ static void paint_mini_helicopters_track_25_deg_up( /** rct2: 0x0081F378 */ static void paint_mini_helicopters_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -235,10 +235,10 @@ static void paint_mini_helicopters_track_25_deg_up_to_flat( /** rct2: 0x */ static void paint_mini_helicopters_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_helicopters_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -247,10 +247,10 @@ static void paint_mini_helicopters_track_flat_to_25_deg_down( /** rct2: 0x0081F388 */ static void paint_mini_helicopters_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_helicopters_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -259,10 +259,10 @@ static void paint_mini_helicopters_track_25_deg_down( /** rct2: 0x0081F3A8 */ static void paint_mini_helicopters_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_helicopters_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -271,10 +271,10 @@ static void paint_mini_helicopters_track_25_deg_down_to_flat( /** rct2: 0x0081F3E8 */ static void paint_mini_helicopters_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_3_tiles_paint( @@ -303,15 +303,15 @@ static void paint_mini_helicopters_track_left_quarter_turn_3_tiles( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint8 mini_helicopters_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; +static constexpr const uint8_t mini_helicopters_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; /** rct2: 0x0081F3F8 */ static void paint_mini_helicopters_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mini_helicopters_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; @@ -322,10 +322,10 @@ static void paint_mini_helicopters_track_right_quarter_turn_3_tiles( /** rct2: 0x0081F408 */ static void paint_mini_helicopters_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_1_tile_paint( @@ -341,10 +341,10 @@ static void paint_mini_helicopters_track_left_quarter_turn_1_tile( /** rct2: 0x0081F418 */ static void paint_mini_helicopters_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_mini_helicopters_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, @@ -354,7 +354,7 @@ static void paint_mini_helicopters_track_right_quarter_turn_1_tile( /** * rct2: 0x0081F268 */ -TRACK_PAINT_FUNCTION get_track_paint_function_mini_helicopters(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_mini_helicopters(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index f9494f4af7..99dd8f4a95 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -70,9 +70,9 @@ enum SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3 = 16869, }; -static constexpr const uint32 monorail_cycles_track_pieces_flat[4] = { SPR_MONORAIL_CYCLES_FLAT_SW_NE, SPR_MONORAIL_CYCLES_FLAT_NW_SE }; +static constexpr const uint32_t monorail_cycles_track_pieces_flat[4] = { SPR_MONORAIL_CYCLES_FLAT_SW_NE, SPR_MONORAIL_CYCLES_FLAT_NW_SE }; -static constexpr const uint32 monorail_cycles_track_pieces_flat_quarter_turn_5_tiles[4][5] = { +static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_5_tiles[4][5] = { { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, @@ -103,7 +103,7 @@ static constexpr const uint32 monorail_cycles_track_pieces_flat_quarter_turn_5_t } }; -static constexpr const uint32 monorail_cycles_track_pieces_s_bend_left[2][4] = { { +static constexpr const uint32_t monorail_cycles_track_pieces_s_bend_left[2][4] = { { SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_0, SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_1, SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_2, @@ -116,7 +116,7 @@ static constexpr const uint32 monorail_cycles_track_pieces_s_bend_left[2][4] = { SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_3, } }; -static constexpr const uint32 monorail_cycles_track_pieces_s_bend_right[2][4] = { { +static constexpr const uint32_t monorail_cycles_track_pieces_s_bend_right[2][4] = { { SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_0, SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_1, SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_2, @@ -129,7 +129,7 @@ static constexpr const uint32 monorail_cycles_track_pieces_s_bend_right[2][4] = SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3, } }; -static constexpr const uint32 monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -140,10 +140,10 @@ static constexpr const uint32 monorail_cycles_track_pieces_flat_quarter_turn_3_t SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static paint_struct * paint_monorail_cycles_util_7c(paint_session * session, bool flip, uint32 image_id, sint8 x_offset, - sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, - sint8 bound_box_length_z, sint16 z_offset, sint16 bound_box_offset_x, - sint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation) +static paint_struct * paint_monorail_cycles_util_7c(paint_session * session, bool flip, uint32_t image_id, int8_t x_offset, + int8_t y_offset, int16_t bound_box_length_x, int16_t bound_box_length_y, + int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, + int16_t bound_box_offset_y, int16_t bound_box_offset_z, uint32_t rotation) { if (flip) { @@ -160,13 +160,13 @@ static paint_struct * paint_monorail_cycles_util_7c(paint_session * session, boo /** rct2: 0x0088AD48 */ static void paint_monorail_cycles_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = monorail_cycles_track_pieces_flat[(direction & 1)] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_cycles_track_pieces_flat[(direction & 1)] | session->TrackColours[SCHEME_TRACK]; paint_monorail_cycles_util_7c( session, (bool)(direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, session->CurrentRotation); @@ -190,13 +190,13 @@ static void paint_monorail_cycles_track_flat( /** rct2: 0x0088ADD8 */ static void paint_monorail_cycles_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -232,10 +232,10 @@ static void paint_monorail_cycles_station( /** rct2: 0x0088AD88 */ static void paint_monorail_cycles_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_3_tiles_paint( @@ -264,15 +264,15 @@ static void paint_monorail_cycles_track_left_quarter_turn_3_tiles( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint8 monorail_cycles_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; +static constexpr const uint8_t monorail_cycles_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; /** rct2: 0x0088AD98 */ static void paint_monorail_cycles_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = monorail_cycles_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; @@ -280,14 +280,14 @@ static void paint_monorail_cycles_track_right_quarter_turn_3_tiles( tileElement); } -static constexpr const sint8 monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[][7] = { +static constexpr const int8_t monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[][7] = { { -2, 0, -2, 0, 0, -3, -1 }, { -3, 0, 0, 0, 0, 0, 0 }, { 0 }, { 0, 0, 0, 0, 0, -2, -3 }, }; -static constexpr const sint8 monorail_cycles_track_right_quarter_turn_5_tiles_support_special[][7] = { +static constexpr const int8_t monorail_cycles_track_right_quarter_turn_5_tiles_support_special[][7] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1 }, { 0, 0, 1, 0, 0, 1, 1 }, @@ -297,10 +297,10 @@ static constexpr const sint8 monorail_cycles_track_right_quarter_turn_5_tiles_su /** rct2: 0x0088ADB8 */ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_5_tiles_paint( @@ -308,9 +308,9 @@ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles( monorail_cycles_track_pieces_flat_quarter_turn_5_tiles, nullptr, defaultRightQuarterTurn5TilesBoundLengths, defaultRightQuarterTurn5TilesBoundOffsets); - sint32 supportHeight = + int32_t supportHeight = height + monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; - sint32 supportSpecial = monorail_cycles_track_right_quarter_turn_5_tiles_support_special[direction][trackSequence]; + int32_t supportSpecial = monorail_cycles_track_right_quarter_turn_5_tiles_support_special[direction][trackSequence]; switch (trackSequence) { case 0: @@ -405,10 +405,10 @@ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles( /** rct2: 0x0088ADA8 */ static void paint_monorail_cycles_track_left_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -419,10 +419,10 @@ static void paint_monorail_cycles_track_left_quarter_turn_5_tiles( /** rct2: 0x0088ADC8 */ static void paint_monorail_cycles_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -430,7 +430,7 @@ static void paint_monorail_cycles_track_s_bend_left( trackSequence = 3 - trackSequence; } - uint32 imageId = + uint32_t imageId = monorail_cycles_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; switch (trackSequence) { @@ -527,10 +527,10 @@ static void paint_monorail_cycles_track_s_bend_left( /** rct2: 0x*/ static void paint_monorail_cycles_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -538,7 +538,7 @@ static void paint_monorail_cycles_track_s_bend_right( trackSequence = 3 - trackSequence; } - uint32 imageId = + uint32_t imageId = monorail_cycles_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; switch (trackSequence) { @@ -636,7 +636,7 @@ static void paint_monorail_cycles_track_s_bend_right( /** * rct2: 0x0088ac88 */ -TRACK_PAINT_FUNCTION get_track_paint_function_monorail_cycles(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_monorail_cycles(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index 105252edb4..ea4369773e 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -27,11 +27,11 @@ enum * * rct2: 0x006D6258 */ -void vehicle_visual_observation_tower(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_observation_tower(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 image_id; - sint32 baseImage_id = (vehicle->restraints_position / 64); + int32_t image_id; + int32_t baseImage_id = (vehicle->restraints_position / 64); if (vehicle->restraints_position >= 64) { if ((imageDirection / 8) && (imageDirection / 8) != 3) @@ -75,21 +75,21 @@ void vehicle_visual_observation_tower(paint_session * session, sint32 x, sint32 /** rct2: 0x0070DD6C */ static void paint_observation_tower_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr); - uint32 imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); track_paint_util_paint_fences( @@ -118,7 +118,7 @@ static void paint_observation_tower_base( return; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 1: @@ -154,10 +154,10 @@ static void paint_observation_tower_base( /** rct2: 0x0070DD7C */ static void paint_observation_tower_section( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence == 1) @@ -165,7 +165,7 @@ static void paint_observation_tower_section( return; } - uint32 imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height); const rct_tile_element * nextTileElement = tileElement + 1; @@ -184,7 +184,7 @@ static void paint_observation_tower_section( /** * rct2: 0x0070DC5C */ -TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index 798cec3c14..9aa36651c4 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -23,7 +23,7 @@ enum SPR_SPACE_RINGS_FENCE_NW = 22149, }; -static constexpr const uint32 space_rings_fence_sprites[] = { +static constexpr const uint32_t space_rings_fence_sprites[] = { SPR_SPACE_RINGS_FENCE_NE, SPR_SPACE_RINGS_FENCE_SE, SPR_SPACE_RINGS_FENCE_SW, @@ -31,30 +31,30 @@ static constexpr const uint32 space_rings_fence_sprites[] = { }; /** rct2: 0x00768A3B */ -static void paint_space_rings_structure(paint_session * session, Ride * ride, uint8 direction, uint32 segment, sint32 height) +static void paint_space_rings_structure(paint_session * session, Ride * ride, uint8_t direction, uint32_t segment, int32_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); - uint32 vehicleIndex = (segment - direction) & 0x3; + uint32_t vehicleIndex = (segment - direction) & 0x3; if (ride->num_stations == 0 || vehicleIndex < ride->num_vehicles) { rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); rct_vehicle * vehicle = nullptr; - sint32 frameNum = direction; + int32_t frameNum = direction; - uint32 baseImageId = rideEntry->vehicles[0].base_image_id; + uint32_t baseImageId = rideEntry->vehicles[0].base_image_id; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; vehicle = GET_VEHICLE(ride->vehicles[vehicleIndex]); session->CurrentlyDrawnItem = vehicle; - frameNum += (sint8)vehicle->vehicle_sprite_type * 4; + frameNum += (int8_t)vehicle->vehicle_sprite_type * 4; } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if ((ride->colour_scheme_type & 3) != RIDE_COLOUR_SCHEME_DIFFERENT_PER_TRAIN) { vehicleIndex = 0; @@ -66,7 +66,7 @@ static void paint_space_rings_structure(paint_session * session, Ride * ride, ui ride->vehicle_colours[vehicleIndex].trim_colour); } - uint32 imageId = (baseImageId + frameNum) | imageColourFlags; + uint32_t imageId = (baseImageId + frameNum) | imageColourFlags; sub_98197C(session, imageId, 0, 0, 20, 20, 23, height, -10, -10, height); if (vehicle != nullptr && vehicle->num_peeps > 0) @@ -85,19 +85,19 @@ static void paint_space_rings_structure(paint_session * session, Ride * ride, ui /** rct2: 0x00767C40 */ static void paint_space_rings( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr); @@ -140,7 +140,7 @@ static void paint_space_rings( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 0: @@ -179,7 +179,7 @@ static void paint_space_rings( /** * rct2: 0x0x00767A40 */ -TRACK_PAINT_FUNCTION get_track_paint_function_space_rings(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_space_rings(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 2d111dcaa6..55e88a75b5 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -47,13 +47,13 @@ enum static void spiral_slide_paint_tile_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id = 0; + uint32_t image_id = 0; if (direction == 0) image_id = SPIRAL_SLIDE_RIGHT_R0 | session->TrackColours[SCHEME_TRACK]; @@ -69,13 +69,13 @@ static void spiral_slide_paint_tile_right( static void spiral_slide_paint_tile_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id = 0; + uint32_t image_id = 0; if (direction == 0) image_id = SPIRAL_SLIDE_LEFT_R0 | session->TrackColours[SCHEME_TRACK]; @@ -91,13 +91,13 @@ static void spiral_slide_paint_tile_left( static void spiral_slide_paint_tile_front( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 image_id = 0; + uint32_t image_id = 0; Ride * ride = get_ride(rideIndex); @@ -136,7 +136,7 @@ static void spiral_slide_paint_tile_front( rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && ride->slide_in_use != 0) { - uint8 slide_progress = ride->spiral_slide_progress; + uint8_t slide_progress = ride->spiral_slide_progress; if (slide_progress != 0) { slide_progress--; @@ -150,9 +150,9 @@ static void spiral_slide_paint_tile_front( if (slide_progress < 46) { - sint32 offset = SPIRAL_SLIDE_PEEP + 46 * direction; + int32_t offset = SPIRAL_SLIDE_PEEP + 46 * direction; CoordsXYZ boundingBox = { 0, 0, 108 }; - CoordsXYZ boundingBoxOffset = { 0, 0, static_cast(height + 3) }; + CoordsXYZ boundingBoxOffset = { 0, 0, static_cast(height + 3) }; if (direction == 0) { @@ -192,7 +192,7 @@ static void spiral_slide_paint_tile_front( } } -static constexpr const uint32 spiral_slide_fence_sprites[] = { +static constexpr const uint32_t spiral_slide_fence_sprites[] = { SPIRAL_SLIDE_FENCE_TOP_RIGHT, SPIRAL_SLIDE_FENCE_BOTTOM_RIGHT, SPIRAL_SLIDE_FENCE_BOTTOM_LEFT, @@ -204,22 +204,22 @@ static constexpr const uint32 spiral_slide_fence_sprites[] = { */ static void paint_spiral_slide( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_2x2[direction][trackSequence]; - sint32 edges = edges_2x2[trackSequence]; + int32_t edges = edges_2x2[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC], nullptr); // Base - uint32 imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A) | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A) | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); track_paint_util_paint_fences( @@ -246,7 +246,7 @@ static void paint_spiral_slide( /** * rct2: 0x0074840C */ -TRACK_PAINT_FUNCTION get_track_paint_function_spiral_slide(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_spiral_slide(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_2_X_2) { diff --git a/src/openrct2/ride/shops/Facility.cpp b/src/openrct2/ride/shops/Facility.cpp index 3caee9e1d7..96909bb264 100644 --- a/src/openrct2/ride/shops/Facility.cpp +++ b/src/openrct2/ride/shops/Facility.cpp @@ -24,10 +24,10 @@ */ static void facility_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool hasSupports = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_3], nullptr); @@ -48,15 +48,15 @@ static void facility_paint_setup( return; } - uint32 imageId = session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = session->TrackColours[SCHEME_TRACK]; imageId |= firstVehicleEntry->base_image_id; imageId += (direction + 2) & 3; - sint32 lengthX = (direction & 1) == 0 ? 28 : 2; - sint32 lengthY = (direction & 1) == 0 ? 2 : 28; + int32_t lengthX = (direction & 1) == 0 ? 28 : 2; + int32_t lengthY = (direction & 1) == 0 ? 2 : 28; if (hasSupports) { - uint32 foundationImageId = + uint32_t foundationImageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_3]; sub_98197C( session, foundationImageId, 0, 0, lengthX, lengthY, 29, height, direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, @@ -90,7 +90,7 @@ static void facility_paint_setup( } /* 0x00762D44 */ -TRACK_PAINT_FUNCTION get_track_paint_function_facility(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_facility(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/shops/Shop.cpp b/src/openrct2/ride/shops/Shop.cpp index c9f90a2fc6..d37742e84f 100644 --- a/src/openrct2/ride/shops/Shop.cpp +++ b/src/openrct2/ride/shops/Shop.cpp @@ -24,10 +24,10 @@ */ static void shop_paint_setup( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool hasSupports = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_3], nullptr); @@ -42,7 +42,7 @@ static void shop_paint_setup( return; } - uint32 imageId = session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = session->TrackColours[SCHEME_TRACK]; if (imageId & IMAGE_TYPE_REMAP_2_PLUS) { imageId &= 0x60FFFFFF; @@ -52,7 +52,7 @@ static void shop_paint_setup( if (hasSupports) { - uint32 foundationImageId = + uint32_t foundationImageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_3]; sub_98197C(session, foundationImageId, 0, 0, 28, 28, 45, height, 2, 2, height); @@ -68,7 +68,7 @@ static void shop_paint_setup( } /* 0x00761160 */ -TRACK_PAINT_FUNCTION get_track_paint_function_shop(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_shop(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/3dCinema.cpp b/src/openrct2/ride/thrill/3dCinema.cpp index f60d9035f0..88a8813950 100644 --- a/src/openrct2/ride/thrill/3dCinema.cpp +++ b/src/openrct2/ride/thrill/3dCinema.cpp @@ -17,8 +17,8 @@ /** * rct2: 0x007664C2 */ -static void paint_3d_cinema_structure(paint_session * session, uint8 rideIndex, uint8 direction, sint8 xOffset, sint8 yOffset, - uint16 height) +static void paint_3d_cinema_structure(paint_session * session, uint8_t rideIndex, uint8_t direction, int8_t xOffset, int8_t yOffset, + uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); @@ -36,14 +36,14 @@ static void paint_3d_cinema_structure(paint_session * session, uint8 rideIndex, session->CurrentlyDrawnItem = GET_VEHICLE(ride->vehicles[0]); } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } - uint32 imageId = (rideEntry->vehicles[0].base_image_id + direction) | imageColourFlags; + uint32_t imageId = (rideEntry->vehicles[0].base_image_id + direction) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 47, height + 3, xOffset + 16, yOffset + 16, height + 3); session->CurrentlyDrawnItem = savedTileElement; @@ -55,15 +55,15 @@ static void paint_3d_cinema_structure(paint_session * session, uint8 rideIndex, */ static void paint_3d_cinema( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -97,7 +97,7 @@ static void paint_3d_cinema( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -124,7 +124,7 @@ static void paint_3d_cinema( } /* 0x0076554C */ -TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index 779bccee9a..97901c1567 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -17,7 +17,7 @@ /** rct2: 0x008A2ABC */ static void paint_enterprise_structure( - paint_session * session, Ride * ride, sint8 xOffset, sint8 yOffset, uint16 height, const rct_tile_element * tileElement) + paint_session * session, Ride * ride, int8_t xOffset, int8_t yOffset, uint16_t height, const rct_tile_element * tileElement) { height += 7; @@ -30,7 +30,7 @@ static void paint_enterprise_structure( return; } - uint32 baseImageId = rideEntry->vehicles[0].base_image_id; + uint32_t baseImageId = rideEntry->vehicles[0].base_image_id; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { @@ -39,35 +39,35 @@ static void paint_enterprise_structure( session->CurrentlyDrawnItem = vehicle; } - uint32 imageOffset = tile_element_get_direction_with_offset(tileElement, session->CurrentRotation); + uint32_t imageOffset = tile_element_get_direction_with_offset(tileElement, session->CurrentRotation); if (vehicle != nullptr) { imageOffset = (vehicle->vehicle_sprite_type << 2) + (((vehicle->sprite_direction >> 3) + session->CurrentRotation) % 4); } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } - uint32 imageId = (baseImageId + imageOffset) | imageColourFlags; + uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height); rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && imageOffset < 12 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { - for (sint32 i = 0; i < 15; i++) + for (int32_t i = 0; i < 15; i++) { if (vehicle->num_peeps <= i) { break; } - uint32 peepFrameOffset = ((imageOffset % 4) * 4 + (i * 4) % 15) & 0x0F; - uint32 ax = (imageOffset & 0xFFFFFFFC) << 2; + uint32_t peepFrameOffset = ((imageOffset % 4) * 4 + (i * 4) % 15) & 0x0F; + uint32_t ax = (imageOffset & 0xFFFFFFFC) << 2; imageId = (baseImageId + 196 + peepFrameOffset + ax) | SPRITE_ID_PALETTE_COLOUR_1(vehicle->peep_tshirt_colours[i]); sub_98199C(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height); } @@ -80,15 +80,15 @@ static void paint_enterprise_structure( /** rct2: 0x008A1584 */ static void paint_enterprise( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_4x4[direction][trackSequence]; - sint32 edges = edges_4x4[trackSequence]; + int32_t edges = edges_4x4[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -142,7 +142,7 @@ static void paint_enterprise( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 0: @@ -166,7 +166,7 @@ static void paint_enterprise( /** * rct2: 0x008A13B4 */ -TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_4_X_4) { diff --git a/src/openrct2/ride/thrill/GoKarts.cpp b/src/openrct2/ride/thrill/GoKarts.cpp index 52e41e8933..7e107b72d1 100644 --- a/src/openrct2/ride/thrill/GoKarts.cpp +++ b/src/openrct2/ride/thrill/GoKarts.cpp @@ -88,35 +88,35 @@ enum SPR_GO_KARTS_START_LIGHTS_GREEN_SE_NW = 20819, }; -static constexpr const uint32 go_karts_track_pieces_starting_grid_end[4][2] = { +static constexpr const uint32_t go_karts_track_pieces_starting_grid_end[4][2] = { { SPR_GO_KARTS_STARTING_GRID_END_SW_NE, SPR_GO_KARTS_STARTING_GRID_END_FRONT_SW_NE }, { SPR_GO_KARTS_STARTING_GRID_END_NW_SE, SPR_GO_KARTS_STARTING_GRID_END_FRONT_NW_SE }, { SPR_GO_KARTS_STARTING_GRID_END_NE_SW, SPR_GO_KARTS_STARTING_GRID_END_FRONT_NE_SW }, { SPR_GO_KARTS_STARTING_GRID_END_SE_NW, SPR_GO_KARTS_STARTING_GRID_END_FRONT_SE_NW }, }; -static constexpr const uint32 go_karts_track_pieces_starting_grid[4][2] = { +static constexpr const uint32_t go_karts_track_pieces_starting_grid[4][2] = { { SPR_GO_KARTS_STARTING_GRID_SW_NE, SPR_GO_KARTS_STARTING_GRID_FRONT_SW_NE }, { SPR_GO_KARTS_STARTING_GRID_NW_SE, SPR_GO_KARTS_STARTING_GRID_FRONT_NW_SE }, { SPR_GO_KARTS_STARTING_GRID_NE_SW, SPR_GO_KARTS_STARTING_GRID_FRONT_NE_SW }, { SPR_GO_KARTS_STARTING_GRID_SE_NW, SPR_GO_KARTS_STARTING_GRID_FRONT_SE_NW }, }; -static constexpr const uint32 go_karts_track_pieces_25_deg_up[4][2] = { +static constexpr const uint32_t go_karts_track_pieces_25_deg_up[4][2] = { { SPR_GO_KARTS_25_DEG_UP_SW_NE, SPR_GO_KARTS_25_DEG_UP_FRONT_SW_NE }, { SPR_GO_KARTS_25_DEG_UP_NW_SE, SPR_GO_KARTS_25_DEG_UP_FRONT_NW_SE }, { SPR_GO_KARTS_25_DEG_UP_NE_SW, SPR_GO_KARTS_25_DEG_UP_FRONT_NE_SW }, { SPR_GO_KARTS_25_DEG_UP_SE_NW, SPR_GO_KARTS_25_DEG_UP_FRONT_SE_NW }, }; -static constexpr const uint32 go_karts_track_pieces_flat_to_25_deg_up[4][2] = { +static constexpr const uint32_t go_karts_track_pieces_flat_to_25_deg_up[4][2] = { { SPR_GO_KARTS_FLAT_TO_25_DEG_UP_SW_NE, SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_SW_NE }, { SPR_GO_KARTS_FLAT_TO_25_DEG_UP_NW_SE, SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_NW_SE }, { SPR_GO_KARTS_FLAT_TO_25_DEG_UP_NE_SW, SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_NE_SW }, { SPR_GO_KARTS_FLAT_TO_25_DEG_UP_SE_NW, SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_SE_NW }, }; -static constexpr const uint32 go_karts_track_pieces_25_deg_up_to_flat[4][2] = { +static constexpr const uint32_t go_karts_track_pieces_25_deg_up_to_flat[4][2] = { { SPR_GO_KARTS_25_DEG_UP_TO_FLAT_SW_NE, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_SW_NE }, { SPR_GO_KARTS_25_DEG_UP_TO_FLAT_NW_SE, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_NW_SE }, { SPR_GO_KARTS_25_DEG_UP_TO_FLAT_NE_SW, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_NE_SW }, @@ -126,13 +126,13 @@ static constexpr const uint32 go_karts_track_pieces_25_deg_up_to_flat[4][2] = { /** rct2: 0x0074A748 */ static void paint_go_karts_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { imageId = SPR_GO_KARTS_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK]; @@ -163,13 +163,13 @@ static void paint_go_karts_track_flat( /** rct2: 0x0074A758 */ static void paint_go_karts_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; paint_struct * ps; imageId = go_karts_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -221,13 +221,13 @@ static void paint_go_karts_track_25_deg_up( /** rct2: 0x0074A768 */ static void paint_go_karts_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; paint_struct * ps; imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -279,13 +279,13 @@ static void paint_go_karts_track_flat_to_25_deg_up( /** rct2: 0x */ static void paint_go_karts_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; paint_struct * ps; imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK]; @@ -337,10 +337,10 @@ static void paint_go_karts_track_25_deg_up_to_flat( /** rct2: 0x0074A788 */ static void paint_go_karts_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_go_karts_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -349,10 +349,10 @@ static void paint_go_karts_track_25_deg_down( /** rct2: 0x0074A798 */ static void paint_go_karts_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_go_karts_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -361,10 +361,10 @@ static void paint_go_karts_track_flat_to_25_deg_down( /** rct2: 0x0074A7A8 */ static void paint_go_karts_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_go_karts_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -373,10 +373,10 @@ static void paint_go_karts_track_25_deg_down_to_flat( /** rct2: 0x */ static void paint_go_karts_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; @@ -384,8 +384,8 @@ static void paint_go_karts_station( const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; bool hasFence; - uint32 imageId; - const uint32(*sprites)[2] = go_karts_track_pieces_starting_grid; + uint32_t imageId; + const uint32_t(*sprites)[2] = go_karts_track_pieces_starting_grid; if (track_element_get_type(tileElement) == TRACK_ELEM_END_STATION) { @@ -488,13 +488,13 @@ static void paint_go_karts_station( /** rct2: 0x0074A7E8 */ static void paint_go_karts_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -562,10 +562,10 @@ static void paint_go_karts_track_left_quarter_turn_1_tile( /** rct2: 0x0074A7F8 */ static void paint_go_karts_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_go_karts_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); @@ -574,7 +574,7 @@ static void paint_go_karts_track_right_quarter_turn_1_tile( /** * rct2: 0x0074A668 */ -TRACK_PAINT_FUNCTION get_track_paint_function_go_karts(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_go_karts(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index 4d0fb3f517..4045dba0ec 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -24,18 +24,18 @@ enum SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP = 14566, }; -static constexpr const uint32 launched_freefall_fence_sprites[] = { SPR_FENCE_METAL_NE, SPR_FENCE_METAL_SE, SPR_FENCE_METAL_SW, +static constexpr const uint32_t launched_freefall_fence_sprites[] = { SPR_FENCE_METAL_NE, SPR_FENCE_METAL_SE, SPR_FENCE_METAL_SW, SPR_FENCE_METAL_NW }; /** * * rct2: 0x006D5FAB */ -void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_launched_freefall(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 image_id; - sint32 baseImage_id = vehicleEntry->base_image_id + ((vehicle->restraints_position / 64) * 2); + int32_t image_id; + int32_t baseImage_id = vehicleEntry->base_image_id + ((vehicle->restraints_position / 64) * 2); // Draw back: image_id = (baseImage_id + 2) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); @@ -85,21 +85,21 @@ void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 /** rct2: 0x006FD1F8 */ static void paint_launched_freefall_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr); - uint32 imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); track_paint_util_paint_fences( @@ -124,7 +124,7 @@ static void paint_launched_freefall_base( height -= 64; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -163,10 +163,10 @@ static void paint_launched_freefall_base( /** rct2: 0x006FD208 */ static void paint_launched_freefall_tower_section( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence == 1) @@ -174,7 +174,7 @@ static void paint_launched_freefall_tower_section( return; } - uint32 imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height); const rct_tile_element * nextTileElement = tileElement + 1; @@ -193,7 +193,7 @@ static void paint_launched_freefall_tower_section( /** * rct2: 0x006FD0E8 */ -TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 46292d3486..67547ce5f2 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -34,18 +34,18 @@ enum struct bound_box { - sint16 x; - sint16 y; - sint16 width; - sint16 height; + int16_t x; + int16_t y; + int16_t width; + int16_t height; }; /** rct2: 0x01428220 */ -static constexpr const sint16 MagicCarpetOscillationZ[] = { -2, -1, 1, 5, 10, 16, 23, 30, 37, 45, 52, 59, 65, 70, 74, 76, +static constexpr const int16_t MagicCarpetOscillationZ[] = { -2, -1, 1, 5, 10, 16, 23, 30, 37, 45, 52, 59, 65, 70, 74, 76, 77, 76, 74, 70, 65, 59, 52, 45, 37, 30, 23, 16, 10, 5, 1, -1 }; /** rct2: 0x01428260 */ -static constexpr const sint8 MagicCarpetOscillationXY[] = { 0, 6, 12, 18, 23, 27, 30, 31, 32, 31, 30, 27, 23, 18, 12, 6, +static constexpr const int8_t MagicCarpetOscillationXY[] = { 0, 6, 12, 18, 23, 27, 30, 31, 32, 31, 30, 27, 23, 18, 12, 6, 0, -5, -11, -17, -22, -26, -29, -30, -31, -30, -29, -26, -22, -17, -11, -5 }; /** rct2: 0x014281F0 */ @@ -55,7 +55,7 @@ static rct_vehicle * get_first_vehicle(Ride * ride) { if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { - uint16 vehicleSpriteIndex = ride->vehicles[0]; + uint16_t vehicleSpriteIndex = ride->vehicles[0]; if (vehicleSpriteIndex != SPRITE_INDEX_NULL) { return GET_VEHICLE(vehicleSpriteIndex); @@ -64,10 +64,10 @@ static rct_vehicle * get_first_vehicle(Ride * ride) return nullptr; } -static void paint_magic_carpet_frame(paint_session * session, uint8 plane, uint8 direction, LocationXYZ16 offset, +static void paint_magic_carpet_frame(paint_session * session, uint8_t plane, uint8_t direction, LocationXYZ16 offset, LocationXYZ16 bbOffset, LocationXYZ16 bbSize) { - uint32 imageId; + uint32_t imageId; if (direction & 1) { imageId = plane == PLANE_BACK ? SPR_MAGIC_CARPET_FRAME_NE : SPR_MAGIC_CARPET_FRAME_SW; @@ -80,24 +80,24 @@ static void paint_magic_carpet_frame(paint_session * session, uint8 plane, uint8 if (plane == PLANE_BACK) { sub_98197C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z); } else { sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z); } } -static void paint_magic_carpet_pendulum(paint_session * session, uint8 plane, uint32 swingImageId, uint8 direction, +static void paint_magic_carpet_pendulum(paint_session * session, uint8_t plane, uint32_t swingImageId, uint8_t direction, LocationXYZ16 offset, LocationXYZ16 bbOffset, LocationXYZ16 bbSize) { - uint32 imageId = swingImageId; + uint32_t imageId = swingImageId; if (direction & 2) { - imageId = (0 - ((sint32)imageId)) & 31; + imageId = (0 - ((int32_t)imageId)) & 31; } if (direction & 1) { @@ -109,25 +109,25 @@ static void paint_magic_carpet_pendulum(paint_session * session, uint8 plane, ui } imageId |= session->TrackColours[SCHEME_TRACK]; sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z); } -static void paint_magic_carpet_vehicle(paint_session * session, Ride * ride, uint8 direction, uint32 swingImageId, +static void paint_magic_carpet_vehicle(paint_session * session, Ride * ride, uint8_t direction, uint32_t swingImageId, LocationXYZ16 offset, LocationXYZ16 bbOffset, LocationXYZ16 bbSize) { rct_ride_entry * rideEntry = get_ride_entry_by_ride(ride); - uint32 vehicleImageId = rideEntry->vehicles[0].base_image_id + direction; + uint32_t vehicleImageId = rideEntry->vehicles[0].base_image_id + direction; // Vehicle - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } - sint8 directionalOffset = MagicCarpetOscillationXY[swingImageId]; + int8_t directionalOffset = MagicCarpetOscillationXY[swingImageId]; switch (direction) { case 0: @@ -146,7 +146,7 @@ static void paint_magic_carpet_vehicle(paint_session * session, Ride * ride, uin offset.z += MagicCarpetOscillationZ[swingImageId]; sub_98199C( - session, vehicleImageId | imageColourFlags, (sint8)offset.x, (sint8)offset.y, bbSize.x, bbSize.y, 127, offset.z, + session, vehicleImageId | imageColourFlags, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z); // Riders @@ -156,14 +156,14 @@ static void paint_magic_carpet_vehicle(paint_session * session, Ride * ride, uin rct_vehicle * vehicle = get_first_vehicle(ride); if (vehicle != nullptr) { - uint32 baseImageId = IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | (vehicleImageId + 4); - for (uint8 peepIndex = 0; peepIndex < vehicle->num_peeps; peepIndex += 2) + uint32_t baseImageId = IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | (vehicleImageId + 4); + for (uint8_t peepIndex = 0; peepIndex < vehicle->num_peeps; peepIndex += 2) { - uint32 imageId = baseImageId + (peepIndex * 2); + uint32_t imageId = baseImageId + (peepIndex * 2); imageId |= (vehicle->peep_tshirt_colours[peepIndex + 0] << 19); imageId |= (vehicle->peep_tshirt_colours[peepIndex + 1] << 24); sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z); } } @@ -171,12 +171,12 @@ static void paint_magic_carpet_vehicle(paint_session * session, Ride * ride, uin } /** rct2: 0x00899104 */ -static void paint_magic_carpet_structure(paint_session * session, Ride * ride, uint8 direction, sint8 axisOffset, uint16 height) +static void paint_magic_carpet_structure(paint_session * session, Ride * ride, uint8_t direction, int8_t axisOffset, uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); rct_vehicle * vehicle = get_first_vehicle(ride); - uint32 swingImageId = 0; + uint32_t swingImageId = 0; if (vehicle != nullptr) { swingImageId = vehicle->vehicle_sprite_type; @@ -209,13 +209,13 @@ static void paint_magic_carpet_structure(paint_session * session, Ride * ride, u /** rct2: 0x00898514 */ static void paint_magic_carpet( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 relativeTrackSequence = track_map_1x4[direction][trackSequence]; + uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence]; // The end tiles do not have a platform switch (relativeTrackSequence) @@ -233,7 +233,7 @@ static void paint_magic_carpet( metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]); } - uint32 imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS]; sub_98196C(session, imageId, 0, 0, 32, 32, 1, height); break; } @@ -263,7 +263,7 @@ static void paint_magic_carpet( * * rct2: 0x00898384 */ -TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index 77148ab805..d15acaac41 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -31,7 +31,7 @@ enum * rct2: 0x0076522A */ static void paint_motionsimulator_vehicle( - paint_session * session, sint8 offsetX, sint8 offsetY, uint8 direction, sint32 height, const rct_tile_element * tileElement) + paint_session * session, int8_t offsetX, int8_t offsetY, uint8_t direction, int32_t height, const rct_tile_element * tileElement) { Ride * ride = get_ride(track_element_get_ride_index(tileElement)); rct_ride_entry * rideEntry = get_ride_entry_by_ride(ride); @@ -41,7 +41,7 @@ static void paint_motionsimulator_vehicle( rct_vehicle * vehicle = nullptr; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { - uint16 spriteIndex = ride->vehicles[0]; + uint16_t spriteIndex = ride->vehicles[0]; if (spriteIndex != SPRITE_INDEX_NULL) { vehicle = GET_VEHICLE(spriteIndex); @@ -50,7 +50,7 @@ static void paint_motionsimulator_vehicle( } } - uint32 simulatorImageId = rideEntry->vehicles[0].base_image_id + direction; + uint32_t simulatorImageId = rideEntry->vehicles[0].base_image_id + direction; if (vehicle != nullptr) { if (vehicle->restraints_position >= 64) @@ -63,7 +63,7 @@ static void paint_motionsimulator_vehicle( } } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = @@ -71,8 +71,8 @@ static void paint_motionsimulator_vehicle( } simulatorImageId |= imageColourFlags; - sint16 offsetZ = height + 2; - uint32 imageId; + int16_t offsetZ = height + 2; + uint32_t imageId; switch (direction) { case 0: @@ -128,15 +128,15 @@ static void paint_motionsimulator_vehicle( /** rct2: 0x008A85C4 */ static void paint_motionsimulator( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_2x2[direction][trackSequence]; - sint32 edges = edges_2x2[trackSequence]; + int32_t edges = edges_2x2[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = { session->MapPosition.x, session->MapPosition.y }; @@ -167,7 +167,7 @@ static void paint_motionsimulator( * * rct2: 0x00763520 */ -TRACK_PAINT_FUNCTION get_track_paint_function_motionsimulator(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_motionsimulator(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/PirateShip.cpp b/src/openrct2/ride/thrill/PirateShip.cpp index 9d8c0777b9..fcee2c842e 100644 --- a/src/openrct2/ride/thrill/PirateShip.cpp +++ b/src/openrct2/ride/thrill/PirateShip.cpp @@ -15,7 +15,7 @@ #include "../../world/Sprite.h" // 1 2 0 3 4 -static constexpr const uint8 track_map_1x5[][5] = { +static constexpr const uint8_t track_map_1x5[][5] = { { 0, 1, 2, 3, 4 }, { 0, 4, 3, 2, 1 }, { 0, 4, 3, 2, 1 }, @@ -24,14 +24,14 @@ static constexpr const uint8 track_map_1x5[][5] = { struct pirate_ship_bound_box { - sint16 length_x; - sint16 length_y; - sint16 offset_x; - sint16 offset_y; + int16_t length_x; + int16_t length_y; + int16_t offset_x; + int16_t offset_y; }; /** rct2: 0x008A83B0 */ -static constexpr const uint32 pirate_ship_base_sprite_offset[] = { 0, 9, 0, 9 }; +static constexpr const uint32_t pirate_ship_base_sprite_offset[] = { 0, 9, 0, 9 }; /** rct2: 0x008A83C0 */ static constexpr const pirate_ship_bound_box pirate_ship_data[] = { @@ -49,23 +49,23 @@ enum SPR_PIRATE_SHIP_FRAME_FRONT_NW_SE = 21997, }; -static constexpr const uint32 pirate_ship_frame_sprites[][2] = { +static constexpr const uint32_t pirate_ship_frame_sprites[][2] = { { SPR_PIRATE_SHIP_FRAME_SW_NE, SPR_PIRATE_SHIP_FRAME_FRONT_SW_NE }, { SPR_PIRATE_SHIP_FRAME_NW_SE, SPR_PIRATE_SHIP_FRAME_FRONT_NW_SE }, }; /** rct2: 0x4AF254 */ -static void paint_pirate_ship_structure(paint_session * session, Ride * ride, uint8 direction, sint8 axisOffset, uint16 height) +static void paint_pirate_ship_structure(paint_session * session, Ride * ride, uint8_t direction, int8_t axisOffset, uint16_t height) { - uint32 imageId, baseImageId; + uint32_t imageId, baseImageId; const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); rct_vehicle * vehicle = nullptr; - sint8 xOffset = !(direction & 1) ? axisOffset : 0; - sint8 yOffset = (direction & 1) ? axisOffset : 0; + int8_t xOffset = !(direction & 1) ? axisOffset : 0; + int8_t yOffset = (direction & 1) ? axisOffset : 0; height += 7; @@ -80,7 +80,7 @@ static void paint_pirate_ship_structure(paint_session * session, Ride * ride, ui baseImageId = rideEntry->vehicles[0].base_image_id + pirate_ship_base_sprite_offset[direction]; if (vehicle != nullptr) { - sint32 rotation = (sint8)vehicle->vehicle_sprite_type; + int32_t rotation = (int8_t)vehicle->vehicle_sprite_type; if (rotation != 0) { if (direction & 2) @@ -96,7 +96,7 @@ static void paint_pirate_ship_structure(paint_session * session, Ride * ride, ui } } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = @@ -119,8 +119,8 @@ static void paint_pirate_ship_structure(paint_session * session, Ride * ride, ui if (dpi->zoom_level <= 1 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { - sint32 peep = 0; - sint32 offset = 1; + int32_t peep = 0; + int32_t offset = 1; while (peep < 16) { if (vehicle->num_peeps <= peep) @@ -128,7 +128,7 @@ static void paint_pirate_ship_structure(paint_session * session, Ride * ride, ui break; } - sint32 frameNum = offset + (direction >> 1); + int32_t frameNum = offset + (direction >> 1); imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + frameNum) | imageColourFlags; @@ -168,17 +168,17 @@ static void paint_pirate_ship_structure(paint_session * session, Ride * ride, ui /** rct2: 0x008A85C4 */ static void paint_pirate_ship( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 relativeTrackSequence = track_map_1x5[direction][trackSequence]; + uint8_t relativeTrackSequence = track_map_1x5[direction][trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; bool hasFence; if (relativeTrackSequence == 1 || relativeTrackSequence == 4) @@ -320,7 +320,7 @@ static void paint_pirate_ship( /** * rct2: 0x008A83E0 */ -TRACK_PAINT_FUNCTION get_track_paint_function_pirate_ship(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_pirate_ship(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_1_X_5) { diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index 7f2d861bc9..61b51e21c0 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -31,11 +31,11 @@ enum * * rct2: 0x006D5DA9 */ -void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_roto_drop(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 image_id; - sint32 baseImage_id = (vehicleEntry->base_image_id + 4) + ((vehicle->animation_frame / 4) & 0x3); + int32_t image_id; + int32_t baseImage_id = (vehicleEntry->base_image_id + 4) + ((vehicle->animation_frame / 4) & 0x3); if (vehicle->restraints_position >= 64) { baseImage_id += 7; @@ -50,11 +50,11 @@ void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDir image_id = (baseImage_id + 4) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); sub_98197C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1); - uint8 riding_peep_sprites[64]; + uint8_t riding_peep_sprites[64]; memset(riding_peep_sprites, 0xFF, sizeof(riding_peep_sprites)); - for (sint32 i = 0; i < vehicle->num_peeps; i++) + for (int32_t i = 0; i < vehicle->num_peeps; i++) { - uint8 cl = (i & 3) * 16; + uint8_t cl = (i & 3) * 16; cl += (i & 0xFC); cl += vehicle->animation_frame / 4; cl += (imageDirection / 8) * 16; @@ -63,9 +63,9 @@ void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDir } // Draw riding peep sprites in back to front order: - for (sint32 j = 0; j <= 48; j++) + for (int32_t j = 0; j <= 48; j++) { - sint32 i = (j % 2) ? (48 - (j / 2)) : (j / 2); + int32_t i = (j % 2) ? (48 - (j / 2)) : (j / 2); if (riding_peep_sprites[i] != 0xFF) { baseImage_id = vehicleEntry->base_image_id + 20 + i; @@ -87,21 +87,21 @@ void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDir /** rct2: 0x00886194 */ static void paint_roto_drop_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr); - uint32 imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); track_paint_util_paint_fences( @@ -134,7 +134,7 @@ static void paint_roto_drop_base( return; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 1: @@ -170,10 +170,10 @@ static void paint_roto_drop_base( /** rct2: 0x008861A4 */ static void paint_roto_drop_tower_section( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence == 1) @@ -181,7 +181,7 @@ static void paint_roto_drop_tower_section( return; } - uint32 imageId = SPR_ROTO_DROP_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_ROTO_DROP_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height); const rct_tile_element * nextTileElement = tileElement + 1; @@ -200,7 +200,7 @@ static void paint_roto_drop_tower_section( /** * rct2: 0x00886074 */ -TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 31e547e22f..bbcc9b3d44 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -15,17 +15,17 @@ #include "../../world/Sprite.h" /** rct2: 0x01428010 */ -static constexpr const uint32 swinging_inverter_ship_base_sprite_offset[] = { 0, 16, 0, 16 }; +static constexpr const uint32_t swinging_inverter_ship_base_sprite_offset[] = { 0, 16, 0, 16 }; /** rct2: 0x01428020 */ -static constexpr const uint32 swinging_inverter_ship_animating_base_sprite_offset[] = { 32, 33, 32, 33 }; +static constexpr const uint32_t swinging_inverter_ship_animating_base_sprite_offset[] = { 32, 33, 32, 33 }; struct swinging_inverter_ship_bound_box { - sint16 length_x; - sint16 length_y; - sint16 offset_x; - sint16 offset_y; + int16_t length_x; + int16_t length_y; + int16_t offset_x; + int16_t offset_y; }; /** rct2: 0x01428020 */ @@ -41,21 +41,21 @@ enum SPR_SWINGING_INVERTER_SHIP_FRAME_3 = 22001, }; -static constexpr const uint32 swinging_inverter_ship_frame_sprites[] = { SPR_SWINGING_INVERTER_SHIP_FRAME_0, +static constexpr const uint32_t swinging_inverter_ship_frame_sprites[] = { SPR_SWINGING_INVERTER_SHIP_FRAME_0, SPR_SWINGING_INVERTER_SHIP_FRAME_1, SPR_SWINGING_INVERTER_SHIP_FRAME_2, SPR_SWINGING_INVERTER_SHIP_FRAME_3 }; -static void paint_swinging_inverter_ship_structure(paint_session * session, Ride * ride, uint8 direction, sint8 axisOffset, - uint16 height) +static void paint_swinging_inverter_ship_structure(paint_session * session, Ride * ride, uint8_t direction, int8_t axisOffset, + uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); rct_vehicle * vehicle = nullptr; - sint8 xOffset = !(direction & 1) ? axisOffset : 0; - sint8 yOffset = (direction & 1) ? axisOffset : 0; + int8_t xOffset = !(direction & 1) ? axisOffset : 0; + int8_t yOffset = (direction & 1) ? axisOffset : 0; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { @@ -65,10 +65,10 @@ static void paint_swinging_inverter_ship_structure(paint_session * session, Ride session->CurrentlyDrawnItem = vehicle; } - uint32 vehicleImageId = rideEntry->vehicles[0].base_image_id + swinging_inverter_ship_base_sprite_offset[direction]; + uint32_t vehicleImageId = rideEntry->vehicles[0].base_image_id + swinging_inverter_ship_base_sprite_offset[direction]; if (vehicle != nullptr) { - sint32 rotation = (sint8)vehicle->vehicle_sprite_type; + int32_t rotation = (int8_t)vehicle->vehicle_sprite_type; if (rotation != 0) { vehicleImageId = @@ -87,7 +87,7 @@ static void paint_swinging_inverter_ship_structure(paint_session * session, Ride } } - uint32 colourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t colourFlags = session->TrackColours[SCHEME_MISC]; if (colourFlags == IMAGE_TYPE_REMAP) { colourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); @@ -95,7 +95,7 @@ static void paint_swinging_inverter_ship_structure(paint_session * session, Ride swinging_inverter_ship_bound_box boundBox = swinging_inverter_ship_bounds[direction]; vehicleImageId = vehicleImageId | colourFlags; - uint32 frameImageId = swinging_inverter_ship_frame_sprites[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frameImageId = swinging_inverter_ship_frame_sprites[direction] | session->TrackColours[SCHEME_TRACK]; if (direction & 2) { @@ -123,17 +123,17 @@ static void paint_swinging_inverter_ship_structure(paint_session * session, Ride /** rct2: 0x00760260 */ static void paint_swinging_inverter_ship( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint8 relativeTrackSequence = track_map_1x4[direction][trackSequence]; + uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence]; Ride * ride = get_ride(rideIndex); - uint32 imageId; + uint32_t imageId; if (relativeTrackSequence != 1 && relativeTrackSequence != 3) { @@ -195,7 +195,7 @@ static void paint_swinging_inverter_ship( /** * rct2: 0x00760070 */ -TRACK_PAINT_FUNCTION get_track_paint_function_swinging_inverter_ship(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_swinging_inverter_ship(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_1_X_4_B) { diff --git a/src/openrct2/ride/thrill/TopSpin.cpp b/src/openrct2/ride/thrill/TopSpin.cpp index 3b3fce9807..61395542ef 100644 --- a/src/openrct2/ride/thrill/TopSpin.cpp +++ b/src/openrct2/ride/thrill/TopSpin.cpp @@ -20,7 +20,7 @@ #include "../TrackPaint.h" /** rct2: 0x014280BC */ -static sint16 TopSpinSeatHeightOffset[] = { +static int16_t TopSpinSeatHeightOffset[] = { -10, -10, -9, -7, -4, -1, 2, 6, 11, 16, 21, 26, 31, 37, 42, 47, 52, 57, 61, 64, 67, 70, 72, 73, 73, 73, 72, 70, 67, 64, 61, 57, 52, 47, 42, 37, 31, 26, 21, 16, 11, 6, 2, -1, -4, -7, -9, -10, }; @@ -31,7 +31,7 @@ static sint16 TopSpinSeatHeightOffset[] = { * Can be calculated as Rounddown(34*sin(x)+0.5) * where x is in 7.5 deg segments. */ -static sint8 TopSpinSeatPositionOffset[] = { +static int8_t TopSpinSeatPositionOffset[] = { 0, 4, 9, 13, 17, 21, 24, 27, 29, 31, 33, 34, 34, 34, 33, 31, 29, 27, 24, 21, 17, 13, 9, 4, 0, -3, -8, -12, -16, -20, -23, -26, -28, -30, -32, -33, -33, -33, -32, -30, -28, -26, -23, -20, -16, -12, -8, -3, }; @@ -42,14 +42,14 @@ static sint8 TopSpinSeatPositionOffset[] = { */ static void top_spin_paint_vehicle( paint_session * session, - sint8 al, - sint8 cl, - uint8 rideIndex, - uint8 direction, - sint32 height, + int8_t al, + int8_t cl, + uint8_t rideIndex, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint16 boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ; + uint16_t boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ; // As we will be drawing a vehicle we need to backup the tileElement that // is assigned to the drawings. const rct_tile_element * curTileElement = static_cast(session->CurrentlyDrawnItem); @@ -60,8 +60,8 @@ static void top_spin_paint_vehicle( rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); rct_vehicle * vehicle = nullptr; - uint8 seatRotation = 0; - sint8 armRotation = 0; + uint8_t seatRotation = 0; + int8_t armRotation = 0; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { @@ -79,11 +79,11 @@ static void top_spin_paint_vehicle( boundBoxOffsetZ = height; // di - uint8 lengthX = 24; + uint8_t lengthX = 24; // si - uint8 lengthY = 24; + uint8_t lengthY = 24; - uint32 image_id = session->TrackColours[SCHEME_MISC]; + uint32_t image_id = session->TrackColours[SCHEME_MISC]; if (image_id == IMAGE_TYPE_REMAP) { image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[0], ride->track_colour_supports[0]); @@ -101,7 +101,7 @@ static void top_spin_paint_vehicle( image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[0], ride->track_colour_additional[0]); } - sint32 var_1F = armRotation; + int32_t var_1F = armRotation; if (direction & 2) { var_1F = -var_1F; @@ -116,7 +116,7 @@ static void top_spin_paint_vehicle( sub_98199C(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); - uint32 seatImageId; + uint32_t seatImageId; if (vehicle != nullptr && vehicle->restraints_position >= 64) { @@ -143,9 +143,9 @@ static void top_spin_paint_vehicle( } image_id += seatImageId; - LocationXYZ16 seatCoords = { al, cl, static_cast(height) }; + LocationXYZ16 seatCoords = { al, cl, static_cast(height) }; - if (armRotation >= static_cast(Util::CountOf(TopSpinSeatHeightOffset))) + if (armRotation >= static_cast(Util::CountOf(TopSpinSeatHeightOffset))) { return; } @@ -168,7 +168,7 @@ static void top_spin_paint_vehicle( } sub_98199C( - session, image_id, (sint8)seatCoords.x, (sint8)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, + session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); rct_drawpixelinfo * dpi = session->DPI; @@ -178,7 +178,7 @@ static void top_spin_paint_vehicle( SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); sub_98199C( - session, image_id, (sint8)seatCoords.x, (sint8)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, + session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); if (vehicle->num_peeps > 2) @@ -187,7 +187,7 @@ static void top_spin_paint_vehicle( SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); sub_98199C( - session, image_id, (sint8)seatCoords.x, (sint8)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, + session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); } @@ -197,7 +197,7 @@ static void top_spin_paint_vehicle( SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); sub_98199C( - session, image_id, (sint8)seatCoords.x, (sint8)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, + session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); } @@ -207,7 +207,7 @@ static void top_spin_paint_vehicle( SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); sub_98199C( - session, image_id, (sint8)seatCoords.x, (sint8)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, + session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); } } @@ -248,15 +248,15 @@ static void top_spin_paint_vehicle( */ static void paint_top_spin( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; @@ -290,7 +290,7 @@ static void paint_top_spin( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -317,7 +317,7 @@ static void paint_top_spin( } /* 0x0076659C */ -TRACK_PAINT_FUNCTION get_track_paint_function_topspin(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_topspin(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index a1e3c15cef..8254fed30a 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -16,8 +16,8 @@ #include "../../world/Sprite.h" /** rct2: 0x0076E5C9 */ -static void paint_twist_structure(paint_session * session, Ride * ride, uint8 direction, sint8 xOffset, sint8 yOffset, - uint16 height) +static void paint_twist_structure(paint_session * session, Ride * ride, uint8_t direction, int8_t xOffset, int8_t yOffset, + uint16_t height) { const rct_tile_element * savedTileElement = static_cast(session->CurrentlyDrawnItem); @@ -30,7 +30,7 @@ static void paint_twist_structure(paint_session * session, Ride * ride, uint8 di } height += 7; - uint32 baseImageId = rideEntry->vehicles[0].base_image_id; + uint32_t baseImageId = rideEntry->vehicles[0].base_image_id; if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { @@ -40,7 +40,7 @@ static void paint_twist_structure(paint_session * session, Ride * ride, uint8 di session->CurrentlyDrawnItem = vehicle; } - uint32 frameNum = (direction * 88) % 216; + uint32_t frameNum = (direction * 88) % 216; if (vehicle != nullptr) { frameNum += (vehicle->sprite_direction >> 3) << 4; @@ -48,15 +48,15 @@ static void paint_twist_structure(paint_session * session, Ride * ride, uint8 di frameNum = frameNum % 216; } - uint32 imageColourFlags = session->TrackColours[SCHEME_MISC]; + uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; if (imageColourFlags == IMAGE_TYPE_REMAP) { imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } - uint32 structureFrameNum = frameNum % 24; - uint32 imageId = (baseImageId + structureFrameNum) | imageColourFlags; + uint32_t structureFrameNum = frameNum % 24; + uint32_t imageId = (baseImageId + structureFrameNum) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); rct_drawpixelinfo * dpi = session->DPI; @@ -64,11 +64,11 @@ static void paint_twist_structure(paint_session * session, Ride * ride, uint8 di if (dpi->zoom_level < 1 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { - for (sint32 i = 0; i < vehicle->num_peeps; i += 2) + for (int32_t i = 0; i < vehicle->num_peeps; i += 2) { imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i], vehicle->peep_tshirt_colours[i + 1]); - uint32 peepFrameNum = (frameNum + i * 12) % 216; + uint32_t peepFrameNum = (frameNum + i * 12) % 216; imageId = (baseImageId + 24 + peepFrameNum) | imageColourFlags; sub_98199C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); } @@ -81,19 +81,19 @@ static void paint_twist_structure(paint_session * session, Ride * ride, uint8 di /** rct2: 0x0076D858 */ static void paint_twist( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; - const uint8 edges = edges_3x3[trackSequence]; + const uint8_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; - uint32 imageId; + uint32_t imageId; wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr); @@ -142,7 +142,7 @@ static void paint_twist( break; } - sint32 cornerSegments = 0; + int32_t cornerSegments = 0; switch (trackSequence) { case 1: @@ -167,7 +167,7 @@ static void paint_twist( /** * rct2: 0x0076D658 */ -TRACK_PAINT_FUNCTION get_track_paint_function_twist(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_twist(int32_t trackType, int32_t direction) { if (trackType != FLAT_TRACK_ELEM_3_X_3) { diff --git a/src/openrct2/ride/transport/Chairlift.cpp b/src/openrct2/ride/transport/Chairlift.cpp index 62b09f556d..76c0c585e2 100644 --- a/src/openrct2/ride/transport/Chairlift.cpp +++ b/src/openrct2/ride/transport/Chairlift.cpp @@ -68,14 +68,14 @@ enum SPR_CHAIRLIFT_STATION_END_CAP_NW, }; -const uint32 chairlift_bullwheel_frames[] = { SPR_CHAIRLIFT_BULLWHEEL_FRAME_1, SPR_CHAIRLIFT_BULLWHEEL_FRAME_2, +const uint32_t chairlift_bullwheel_frames[] = { SPR_CHAIRLIFT_BULLWHEEL_FRAME_1, SPR_CHAIRLIFT_BULLWHEEL_FRAME_2, SPR_CHAIRLIFT_BULLWHEEL_FRAME_3, SPR_CHAIRLIFT_BULLWHEEL_FRAME_4 }; -static void chairlift_paint_util_draw_supports(paint_session * session, sint32 segments, uint16 height) +static void chairlift_paint_util_draw_supports(paint_session * session, int32_t segments, uint16_t height) { bool success = false; - for (sint32 s = 0; s < 9; s++) + for (int32_t s = 0; s < 9; s++) { if (!(segments & segment_offsets[s])) { @@ -94,13 +94,13 @@ static void chairlift_paint_util_draw_supports(paint_session * session, sint32 s } support_height * supportSegments = session->SupportSegments; - for (sint32 s = 0; s < 9; s++) + for (int32_t s = 0; s < 9; s++) { if (!(segments & segment_offsets[s])) { continue; } - uint16 temp = supportSegments[s].height; + uint16_t temp = supportSegments[s].height; supportSegments[s].height = session->Support.height; metal_a_supports_paint_setup(session, METAL_SUPPORTS_TRUSS, s, 0, height, session->TrackColours[SCHEME_SUPPORTS]); supportSegments[s].height = temp; @@ -108,7 +108,7 @@ static void chairlift_paint_util_draw_supports(paint_session * session, sint32 s } static const rct_tile_element * -chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy(sint32 x, sint32 y, sint32 z, sint32 rideIndex) +chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy(int32_t x, int32_t y, int32_t z, int32_t rideIndex) { const rct_tile_element * tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement == nullptr) @@ -131,8 +131,8 @@ chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy(sint32 x, sint32 y return nullptr; }; -static bool chairlift_paint_util_is_first_track(uint8 rideIndex, const rct_tile_element * tileElement, LocationXY16 pos, - uint8 trackType) +static bool chairlift_paint_util_is_first_track(uint8_t rideIndex, const rct_tile_element * tileElement, LocationXY16 pos, + uint8_t trackType) { if (track_element_get_type(tileElement) != TRACK_ELEM_BEGIN_STATION) { @@ -141,8 +141,8 @@ static bool chairlift_paint_util_is_first_track(uint8 rideIndex, const rct_tile_ CoordsXY delta = CoordsDirectionDelta[tile_element_get_direction(tileElement)]; CoordsXY newPos = { - static_cast(pos.x - delta.x), - static_cast(pos.y - delta.y), + static_cast(pos.x - delta.x), + static_cast(pos.y - delta.y), }; const rct_tile_element * nextTrack = @@ -151,8 +151,8 @@ static bool chairlift_paint_util_is_first_track(uint8 rideIndex, const rct_tile_ return nextTrack == nullptr; } -static bool chairlift_paint_util_is_last_track(uint8 rideIndex, const rct_tile_element * tileElement, LocationXY16 pos, - uint8 trackType) +static bool chairlift_paint_util_is_last_track(uint8_t rideIndex, const rct_tile_element * tileElement, LocationXY16 pos, + uint8_t trackType) { if (track_element_get_type(tileElement) != TRACK_ELEM_END_STATION) { @@ -161,8 +161,8 @@ static bool chairlift_paint_util_is_last_track(uint8 rideIndex, const rct_tile_e CoordsXY delta = CoordsDirectionDelta[tile_element_get_direction(tileElement)]; CoordsXY newPos = { - static_cast(pos.x + delta.x), - static_cast(pos.y + delta.y), + static_cast(pos.x + delta.x), + static_cast(pos.y + delta.y), }; const rct_tile_element * nextTrack = @@ -173,16 +173,16 @@ static bool chairlift_paint_util_is_last_track(uint8 rideIndex, const rct_tile_e static void chairlift_paint_station_ne_sw( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { const LocationXY16 pos = session->MapPosition; - uint8 trackType = track_element_get_type(tileElement); + uint8_t trackType = track_element_get_type(tileElement); Ride * ride = get_ride(rideIndex); - uint32 imageId; + uint32_t imageId; bool isStart = chairlift_paint_util_is_first_track(rideIndex, tileElement, pos, trackType); ; @@ -268,16 +268,16 @@ static void chairlift_paint_station_ne_sw( static void chairlift_paint_station_se_nw( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { const LocationXY16 pos = session->MapPosition; - uint8 trackType = track_element_get_type(tileElement); + uint8_t trackType = track_element_get_type(tileElement); Ride * ride = get_ride(rideIndex); - uint32 imageId; + uint32_t imageId; bool isStart = chairlift_paint_util_is_first_track(rideIndex, tileElement, pos, trackType); ; @@ -365,10 +365,10 @@ static void chairlift_paint_station_se_nw( /** rct2: 0x00744068 */ static void chairlift_paint_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction % 2) @@ -383,13 +383,13 @@ static void chairlift_paint_station( static void chairlift_paint_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction & 1) { imageId = SPR_CHAIRLIFT_CABLE_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK]; @@ -410,13 +410,13 @@ static void chairlift_paint_flat( /** rct2: 0x00743FD8 */ static void chairlift_paint_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -452,13 +452,13 @@ static void chairlift_paint_25_deg_up( /** rct2: 0x00743FD8 */ static void chairlift_paint_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -511,13 +511,13 @@ static void chairlift_paint_flat_to_25_deg_up( /** rct2: 0x00743FF8 */ static void chairlift_paint_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -570,10 +570,10 @@ static void chairlift_paint_25_deg_up_to_flat( /** rct2: 0x00744008 */ static void chairlift_paint_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { chairlift_paint_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -582,10 +582,10 @@ static void chairlift_paint_25_deg_down( /** rct2: 0x00744018 */ static void chairlift_paint_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { chairlift_paint_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -594,10 +594,10 @@ static void chairlift_paint_flat_to_25_deg_down( /** rct2: 0x00744028 */ static void chairlift_paint_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { chairlift_paint_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -606,13 +606,13 @@ static void chairlift_paint_25_deg_down_to_flat( /** rct2: 0x00744038 */ static void chairlift_paint_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -677,17 +677,17 @@ static void chairlift_paint_left_quarter_turn_1_tile( /** rct2: 0x00744048 */ static void chairlift_paint_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { chairlift_paint_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); } /* 0x008AAA0C */ -TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/transport/Lift.cpp b/src/openrct2/ride/transport/Lift.cpp index 32d0b55d6f..9b37aaa51c 100644 --- a/src/openrct2/ride/transport/Lift.cpp +++ b/src/openrct2/ride/transport/Lift.cpp @@ -28,15 +28,15 @@ enum SPR_LIFT_CAGE_NW_FRONT = 15003, }; -static constexpr const uint32 lift_cage_sprites[][2] = { +static constexpr const uint32_t lift_cage_sprites[][2] = { { SPR_LIFT_CAGE_BACK, SPR_LIFT_CAGE_FRONT }, { SPR_LIFT_CAGE_NE_BACK, SPR_LIFT_CAGE_NE_FRONT }, { SPR_LIFT_CAGE_SE_BACK, SPR_LIFT_CAGE_SE_FRONT }, { SPR_LIFT_CAGE_SW_BACK, SPR_LIFT_CAGE_SW_FRONT }, { SPR_LIFT_CAGE_NW_BACK, SPR_LIFT_CAGE_NW_FRONT }, }; -static void paint_lift_cage(paint_session * session, sint8 index, uint32 colourFlags, sint32 height, uint8 rotation) +static void paint_lift_cage(paint_session * session, int8_t index, uint32_t colourFlags, int32_t height, uint8_t rotation) { - uint32 imageId; + uint32_t imageId; imageId = lift_cage_sprites[1 + index][0] | colourFlags; sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 2, 2, height); @@ -48,10 +48,10 @@ static void paint_lift_cage(paint_session * session, sint8 index, uint32 colourF /** rct2: 0x0076C6CC */ static void paint_lift_base( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = track_map_3x3[direction][trackSequence]; @@ -76,18 +76,18 @@ static void paint_lift_base( return; } - sint32 edges = edges_3x3[trackSequence]; + int32_t edges = edges_3x3[trackSequence]; Ride * ride = get_ride(rideIndex); LocationXY16 position = session->MapPosition; - uint32 imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; + uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); track_paint_util_paint_fences( session, edges, position, tileElement, ride, session->TrackColours[SCHEME_TRACK], height, fenceSpritesMetalB, session->CurrentRotation); - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 1: @@ -123,10 +123,10 @@ static void paint_lift_base( /** rct2: 0x0076C6DC */ static void paint_lift_tower_section( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (trackSequence == 1) @@ -145,7 +145,7 @@ static void paint_lift_tower_section( /** * rct2: 0x0076C5BC */ -TRACK_PAINT_FUNCTION get_track_paint_function_lift(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_lift(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index 35718ff379..b43f293aae 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -134,27 +134,27 @@ enum SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_S_N = 23452, }; -static constexpr const uint32 miniature_railway_track_floor[4] = { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS, +static constexpr const uint32_t miniature_railway_track_floor[4] = { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_90_DEG }; -static constexpr const uint32 miniature_railway_track_pieces_flat[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_flat[4] = { SPR_MINIATURE_RAILWAY_FLAT_SW_NE, SPR_MINIATURE_RAILWAY_FLAT_NW_SE, SPR_MINIATURE_RAILWAY_FLAT_SW_NE, SPR_MINIATURE_RAILWAY_FLAT_NW_SE, }; -static constexpr const uint32 miniature_railway_station_floor[4] = { SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE, +static constexpr const uint32_t miniature_railway_station_floor[4] = { SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE, SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE }; -static constexpr const uint32 miniature_railway_track_pieces_flat_station[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_flat_station[4] = { SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_SW_NE, SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_NW_SE, SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_SW_NE, SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_NW_SE, }; -static constexpr const uint32 miniature_railway_track_pieces_flat_quarter_turn_5_tiles[4][5] = { +static constexpr const uint32_t miniature_railway_track_pieces_flat_quarter_turn_5_tiles[4][5] = { { SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_0, SPR_MINIATURE_RAILWAY_QUARTER_TURN_5_TILES_SW_SE_PART_1, @@ -185,28 +185,28 @@ static constexpr const uint32 miniature_railway_track_pieces_flat_quarter_turn_5 } }; -static constexpr const uint32 miniature_railway_track_pieces_25_deg_up[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_25_deg_up[4] = { SPR_MINIATURE_RAILWAY_25_DEG_UP_SW_NE, SPR_MINIATURE_RAILWAY_25_DEG_UP_NW_SE, SPR_MINIATURE_RAILWAY_25_DEG_UP_NE_SW, SPR_MINIATURE_RAILWAY_25_DEG_UP_SE_NW, }; -static constexpr const uint32 miniature_railway_track_pieces_flat_to_25_deg_up[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_flat_to_25_deg_up[4] = { SPR_MINIATURE_RAILWAY_FLAT_TO_25_DEG_UP_SW_NE, SPR_MINIATURE_RAILWAY_FLAT_TO_25_DEG_UP_NW_SE, SPR_MINIATURE_RAILWAY_FLAT_TO_25_DEG_UP_NE_SW, SPR_MINIATURE_RAILWAY_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr const uint32 miniature_railway_track_pieces_25_deg_up_to_flat[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_25_deg_up_to_flat[4] = { SPR_MINIATURE_RAILWAY_25_DEG_UP_TO_FLAT_SW_NE, SPR_MINIATURE_RAILWAY_25_DEG_UP_TO_FLAT_NW_SE, SPR_MINIATURE_RAILWAY_25_DEG_UP_TO_FLAT_NE_SW, SPR_MINIATURE_RAILWAY_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr const uint32 miniature_railway_track_pieces_s_bend_left[2][4] = { { +static constexpr const uint32_t miniature_railway_track_pieces_s_bend_left[2][4] = { { SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_0, SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_1, SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SW_NE_PART_2, @@ -219,7 +219,7 @@ static constexpr const uint32 miniature_railway_track_pieces_s_bend_left[2][4] = SPR_MINIATURE_RAILWAY_S_BEND_LEFT_SE_NW_PART_0, } }; -static constexpr const uint32 miniature_railway_track_pieces_s_bend_right[2][4] = { { +static constexpr const uint32_t miniature_railway_track_pieces_s_bend_right[2][4] = { { SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_0, SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_1, SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SW_NE_PART_2, @@ -232,7 +232,7 @@ static constexpr const uint32 miniature_railway_track_pieces_s_bend_right[2][4] SPR_MINIATURE_RAILWAY_S_BEND_RIGHT_SE_NW_PART_0, } }; -static constexpr const uint32 miniature_railway_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t miniature_railway_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -243,7 +243,7 @@ static constexpr const uint32 miniature_railway_track_pieces_flat_quarter_turn_3 SPR_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static constexpr const uint32 miniature_railway_track_pieces_right_eight_to_diag[4][4] = { +static constexpr const uint32_t miniature_railway_track_pieces_right_eight_to_diag[4][4] = { { SPR_MINIATURE_RAILWAY_EIGHT_TO_DIAG_SW_E_PART_0, SPR_MINIATURE_RAILWAY_EIGHT_TO_DIAG_SW_E_PART_1, @@ -324,7 +324,7 @@ static constexpr const LocationXY16 miniature_railway_track_pieces_right_eight_t }, }; -static constexpr const uint32 miniature_railway_track_pieces_left_eight_to_diag[4][4] = { +static constexpr const uint32_t miniature_railway_track_pieces_left_eight_to_diag[4][4] = { { SPR_MINIATURE_RAILWAY_EIGHT_TO_DIAG_SW_N_PART_0, SPR_MINIATURE_RAILWAY_EIGHT_TO_DIAG_SW_N_PART_1, @@ -513,68 +513,68 @@ static constexpr const LocationXY16 miniature_railway_track_pieces_left_eight_to }, }; -static constexpr const uint32 miniature_railway_track_pieces_diag_flat[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_diag_flat[4] = { SPR_MINIATURE_RAILWAY_DIAG_FLAT_W_E, SPR_MINIATURE_RAILWAY_DIAG_FLAT_N_S, SPR_MINIATURE_RAILWAY_DIAG_FLAT_E_W, SPR_MINIATURE_RAILWAY_DIAG_FLAT_S_N, }; -static constexpr const uint32 miniature_railway_track_pieces_diag_flat_to_25_deg_up[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_diag_flat_to_25_deg_up[4] = { SPR_MINIATURE_RAILWAY_DIAG_FLAT_TO_25_DEG_UP_W_E, SPR_MINIATURE_RAILWAY_DIAG_FLAT_TO_25_DEG_UP_N_S, SPR_MINIATURE_RAILWAY_DIAG_FLAT_TO_25_DEG_UP_E_W, SPR_MINIATURE_RAILWAY_DIAG_FLAT_TO_25_DEG_UP_S_N, }; -static constexpr const uint32 miniature_railway_track_pieces_diag_25_deg_up_to_flat[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_diag_25_deg_up_to_flat[4] = { SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_TO_FLAT_W_E, SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_TO_FLAT_N_S, SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_TO_FLAT_E_W, SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_TO_FLAT_S_N, }; -static constexpr const uint32 miniature_railway_track_pieces_diag_25_deg_up[4] = { +static constexpr const uint32_t miniature_railway_track_pieces_diag_25_deg_up[4] = { SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_W_E, SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_N_S, SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_E_W, SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_S_N, }; -static uint32 miniature_railway_track_to_gravel(uint32 imageId) +static uint32_t miniature_railway_track_to_gravel(uint32_t imageId) { return imageId - SPR_MINIATURE_RAILWAY_FLAT_SW_NE + SPR_G2_MINIATURE_RAILWAY_GRAVEL_SW_NE; } -static uint32 miniature_railway_track_to_grooved(uint32 imageId) +static uint32_t miniature_railway_track_to_grooved(uint32_t imageId) { return imageId - SPR_MINIATURE_RAILWAY_FLAT_SW_NE + SPR_G2_MINIATURE_RAILWAY_GROOVED_SW_NE; } -static uint32 -miniature_railway_track_to_grooved_indent(uint32 imageId, const rct_tile_element * path, uint8 direction, uint8 rotation) +static uint32_t +miniature_railway_track_to_grooved_indent(uint32_t imageId, const rct_tile_element * path, uint8_t direction, uint8_t rotation) { if (!path) { return 0; } - uint32 imageIdAlt = SPR_G2_MINIATURE_RAILWAY_GROOVED_SW_NE; + uint32_t imageIdAlt = SPR_G2_MINIATURE_RAILWAY_GROOVED_SW_NE; - uint8 correctedEdges = path->properties.path.edges; + uint8_t correctedEdges = path->properties.path.edges; correctedEdges |= correctedEdges << 4; correctedEdges >>= 4 - rotation; correctedEdges &= 0x0F; if (direction & 0x1) { - uint32 imageIds[2][2] = { { SPR_G2_MINIATURE_RAILWAY_INSET_NW_SE, SPR_G2_MINIATURE_RAILWAY_INSET_END_NW }, + uint32_t imageIds[2][2] = { { SPR_G2_MINIATURE_RAILWAY_INSET_NW_SE, SPR_G2_MINIATURE_RAILWAY_INSET_END_NW }, { SPR_G2_MINIATURE_RAILWAY_INSET_END_SE, SPR_G2_MINIATURE_RAILWAY_INSET_END_NW_SE } }; imageIdAlt = imageIds[(correctedEdges & 0x2)? 0 : 1][(correctedEdges & 0x8)? 0 : 1]; } else { - uint32 imageIds[2][2] = { { SPR_G2_MINIATURE_RAILWAY_INSET_SW_NE, SPR_G2_MINIATURE_RAILWAY_INSET_END_SW }, + uint32_t imageIds[2][2] = { { SPR_G2_MINIATURE_RAILWAY_INSET_SW_NE, SPR_G2_MINIATURE_RAILWAY_INSET_END_SW }, { SPR_G2_MINIATURE_RAILWAY_INSET_END_NE, SPR_G2_MINIATURE_RAILWAY_INSET_END_SW_NE } }; imageIdAlt = imageIds[(correctedEdges & 0x1)? 0 : 1][(correctedEdges & 0x4)? 0 : 1]; } @@ -585,10 +585,10 @@ miniature_railway_track_to_grooved_indent(uint32 imageId, const rct_tile_element /** rct2: 0x008AD0C0 */ static void paint_miniature_railway_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool paintAsGravel = false; @@ -601,7 +601,7 @@ static void paint_miniature_railway_track_flat( } bool isSupported = wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); - uint32 imageId, imageIdAlt; + uint32_t imageId, imageIdAlt; // In the following 3 calls to sub_98197C_rotated/sub_98199C_rotated, we add 1 to the // bound_box_offset_z argument to make straight tracks draw above footpaths @@ -660,13 +660,13 @@ static void paint_miniature_railway_track_flat( /** rct2: 0x008AD170, 0x008AD180, 0x008AD190 */ static void paint_miniature_railway_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -688,14 +688,14 @@ static void paint_miniature_railway_station( /** rct2: 0x008AD0D0 */ static void paint_miniature_railway_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = miniature_railway_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = miniature_railway_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 2, height, 0, 3, height); @@ -724,14 +724,14 @@ static void paint_miniature_railway_track_25_deg_up( /** rct2: 0x008AD0E0 */ static void paint_miniature_railway_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = miniature_railway_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = miniature_railway_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 2, height, 0, 3, height); @@ -760,14 +760,14 @@ static void paint_miniature_railway_track_flat_to_25_deg_up( /** rct2: 0x008AD0F0 */ static void paint_miniature_railway_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = miniature_railway_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = miniature_railway_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 2, 32, 25, 2, height, 0, 3, height); @@ -796,10 +796,10 @@ static void paint_miniature_railway_track_25_deg_up_to_flat( /** rct2: 0x008AD100 */ static void paint_miniature_railway_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_miniature_railway_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -808,10 +808,10 @@ static void paint_miniature_railway_track_25_deg_down( /** rct2: 0x008AD110 */ static void paint_miniature_railway_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_miniature_railway_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -820,10 +820,10 @@ static void paint_miniature_railway_track_flat_to_25_deg_down( /** rct2: 0x008AD120 */ static void paint_miniature_railway_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_miniature_railway_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -918,7 +918,7 @@ static constexpr const LocationXY16 miniature_railway_right_quarter_turn_5_tiles } }; // clang-format on -static constexpr const uint32 miniature_railway_right_quarter_turn_5_tiles_track_floor[4][5] = { +static constexpr const uint32_t miniature_railway_right_quarter_turn_5_tiles_track_floor[4][5] = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_N_SEGMENT, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_90_DEG }, { SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_W_SEGMENT, SPR_FLOOR_PLANKS_E_SEGMENT, SPR_FLOOR_PLANKS_W_SEGMENT, @@ -929,19 +929,19 @@ static constexpr const uint32 miniature_railway_right_quarter_turn_5_tiles_track SPR_FLOOR_PLANKS }, }; -static constexpr const sint8 right_quarter_turn_5_supports_type[4][7] = { +static constexpr const int8_t right_quarter_turn_5_supports_type[4][7] = { { 0, -1, 4, 2, -1, 4, 1 }, { 1, -1, 5, 3, -1, 5, 0 }, { 0, -1, 2, 4, -1, 2, 1 }, { 1, -1, 3, 5, -1, 3, 0 } }; -static constexpr const sint8 miniature_railway_right_quarter_turn_5_tiles_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; +static constexpr const int8_t miniature_railway_right_quarter_turn_5_tiles_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4 }; /** rct2: 0x008AD140 */ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { @@ -965,15 +965,15 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( miniature_railway_right_quarter_turn_5_tiles_bound_lengths, miniature_railway_right_quarter_turn_5_tiles_bound_offsets); - sint32 index = miniature_railway_right_quarter_turn_5_tiles_sprite_map[trackSequence]; - uint32 imageId = miniature_railway_track_pieces_flat_quarter_turn_5_tiles[direction][index] | + int32_t index = miniature_railway_right_quarter_turn_5_tiles_sprite_map[trackSequence]; + uint32_t imageId = miniature_railway_track_pieces_flat_quarter_turn_5_tiles[direction][index] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = miniature_railway_right_quarter_turn_5_tiles_offsets[direction][index]; LocationXY16 boundsLength = miniature_railway_right_quarter_turn_5_tiles_bound_lengths[direction][index]; LocationXYZ16 boundsOffset = { offset.x, offset.y, 0 }; sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, 2, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 2, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } } @@ -997,7 +997,7 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( paint_util_push_tunnel_right(session, height, TUNNEL_6); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1031,10 +1031,10 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( /** rct2: 0x008AD130 */ static void paint_miniature_railway_track_left_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1042,9 +1042,9 @@ static void paint_miniature_railway_track_left_quarter_turn_5_tiles( tileElement); } -static constexpr const sint8 s_bend_left_supports_type[4][4] = { { 0, 5, 3, 0 }, { 1, 2, 4, 1 }, { 0, 5, 3, 0 }, { 1, 2, 4, 1 } }; +static constexpr const int8_t s_bend_left_supports_type[4][4] = { { 0, 5, 3, 0 }, { 1, 2, 4, 1 }, { 0, 5, 3, 0 }, { 1, 2, 4, 1 } }; -static constexpr const uint32 miniature_railway_s_bend_left_tiles_track_floor[2][4] = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_W_SEGMENT, +static constexpr const uint32_t miniature_railway_s_bend_left_tiles_track_floor[2][4] = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_W_SEGMENT, SPR_FLOOR_PLANKS_E_SEGMENT, SPR_FLOOR_PLANKS }, { SPR_FLOOR_PLANKS_90_DEG, @@ -1056,10 +1056,10 @@ static constexpr const uint32 miniature_railway_s_bend_left_tiles_track_floor[2] /** rct2: 0x8AD150 */ static void paint_miniature_railway_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -1084,14 +1084,14 @@ static void paint_miniature_railway_track_s_bend_left( { 32, 27 }, }; - uint32 imageId = + uint32_t imageId = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (isSupported == false) { - sub_98197C_rotated(session, direction, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 2, height, + sub_98197C_rotated(session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); } else @@ -1102,7 +1102,7 @@ static void paint_miniature_railway_track_s_bend_left( imageId = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; - sub_98199C_rotated(session, direction, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 2, height, + sub_98199C_rotated(session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); } if (direction == 0 || direction == 2) @@ -1120,7 +1120,7 @@ static void paint_miniature_railway_track_s_bend_left( } } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1141,9 +1141,9 @@ static void paint_miniature_railway_track_s_bend_left( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const sint8 s_bend_right_supports_type[4][4] = { { 0, 4, 2, 0 }, { 1, 5, 3, 1 }, { 0, 4, 2, 0 }, { 1, 5, 3, 1 } }; +static constexpr const int8_t s_bend_right_supports_type[4][4] = { { 0, 4, 2, 0 }, { 1, 5, 3, 1 }, { 0, 4, 2, 0 }, { 1, 5, 3, 1 } }; -static constexpr const uint32 miniature_railway_s_bend_right_tiles_track_floor[2][4] = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_S_SEGMENT, +static constexpr const uint32_t miniature_railway_s_bend_right_tiles_track_floor[2][4] = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_N_SEGMENT, SPR_FLOOR_PLANKS }, { SPR_FLOOR_PLANKS_90_DEG, @@ -1155,10 +1155,10 @@ static constexpr const uint32 miniature_railway_s_bend_right_tiles_track_floor[2 /** rct2: 0x008AD160 */ static void paint_miniature_railway_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -1183,13 +1183,13 @@ static void paint_miniature_railway_track_s_bend_right( { 32, 27 }, }; - uint32 imageId = + uint32_t imageId = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (isSupported == false) { - sub_98197C_rotated(session, direction, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 2, height, + sub_98197C_rotated(session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); } else @@ -1200,7 +1200,7 @@ static void paint_miniature_railway_track_s_bend_right( imageId = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; - sub_98199C_rotated(session, direction, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 2, height, + sub_98199C_rotated(session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); } @@ -1219,7 +1219,7 @@ static void paint_miniature_railway_track_s_bend_right( } } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1240,7 +1240,7 @@ static void paint_miniature_railway_track_s_bend_right( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint32 miniature_railway_right_quarter_turn_3_tile_track_floor[4][3] = { { +static constexpr const uint32_t miniature_railway_right_quarter_turn_3_tile_track_floor[4][3] = { { SPR_FLOOR_PLANKS_S_SEGMENT, 0, SPR_FLOOR_PLANKS_S_SEGMENT, @@ -1285,16 +1285,16 @@ static constexpr const LocationXYZ16 miniature_railway_right_quarter_turn_3_tile /** rct2: 0x008AD1B0 */ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isSupported = false; if (trackSequence != 1 && trackSequence != 2) { - static constexpr const uint8 supportType[] = { 4, 5, 2, 3 }; + static constexpr const uint8_t supportType[] = { 4, 5, 2, 3 }; isSupported = wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } @@ -1308,7 +1308,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( // The following piece was missing in vanilla RCT2 if (trackSequence == 1 && direction == 0) { - uint32 imageId = SPR_G2_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_3 | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SPR_G2_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_3 | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 8, 8, 2, height, 0, 0, height); } } @@ -1319,23 +1319,23 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( miniature_railway_right_quarter_turn_3_tile_track_floor, nullptr, defaultRightQuarterTurn3TilesBoundLengths, miniature_railway_right_quarter_turn_3_tile_bound_offsets); - static constexpr const sint8 right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 }; + static constexpr const int8_t right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 }; - sint32 index = right_quarter_turn_3_tiles_sprite_map[trackSequence]; + int32_t index = right_quarter_turn_3_tiles_sprite_map[trackSequence]; - uint32 imageId = + uint32_t imageId = miniature_railway_track_pieces_flat_quarter_turn_3_tiles[direction][index] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = defaultRightQuarterTurn3TilesOffsets[direction][index]; LocationXY16 boundsLength = defaultRightQuarterTurn3TilesBoundLengths[direction][index]; LocationXYZ16 boundsOffset = { offset.x, offset.y, 0 }; sub_98199C( - session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, 3, height, boundsOffset.x, + session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 3, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_6); - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1356,10 +1356,10 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( /** rct2: 0x008AD1A0 */ static void paint_miniature_railway_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1367,9 +1367,9 @@ static void paint_miniature_railway_track_left_quarter_turn_3_tiles( tileElement); } -static constexpr const sint8 paint_miniature_railway_eighth_to_diag_index[] = { 0, 1, 2, -1, 3 }; +static constexpr const int8_t paint_miniature_railway_eighth_to_diag_index[] = { 0, 1, 2, -1, 3 }; -static constexpr const uint32 miniature_railway_floor_track_pieces_left_eight_to_diag[4][5] = { +static constexpr const uint32_t miniature_railway_floor_track_pieces_left_eight_to_diag[4][5] = { { SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS, SPR_FLOOR_PLANKS_E_SEGMENT, SPR_FLOOR_PLANKS_W_SEGMENT, SPR_FLOOR_PLANKS_90_DEG }, { SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_N_SEGMENT, SPR_FLOOR_PLANKS }, @@ -1443,13 +1443,13 @@ static constexpr const LocationXY16 miniature_railway_track_floor_pieces_left_ei /** rct2: 0x008AD1C0 */ static void paint_miniature_railway_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 supportType[4][5] = { { 0, 0, 3, 5, 1 }, { 1, 1, 4, 2, 0 }, { 0, 0, 5, 3, 1 }, { 1, 1, 2, 4, 0 } }; + const uint8_t supportType[4][5] = { { 0, 0, 3, 5, 1 }, { 1, 1, 4, 2, 0 }, { 0, 0, 5, 3, 1 }, { 1, 1, 2, 4, 0 } }; bool isSupported = false; bool isRightEighthToOrthog = track_element_get_type(tileElement) == TRACK_ELEM_RIGHT_EIGHTH_TO_ORTHOGONAL; @@ -1460,10 +1460,10 @@ static void paint_miniature_railway_track_left_eighth_to_diag( isSupported = wooden_a_supports_paint_setup(session, supportType[direction][trackSequence], 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } - uint32 imageId; + uint32_t imageId; if (isSupported == false) { - sint8 index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; + int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) { imageId = miniature_railway_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; @@ -1474,7 +1474,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag( bounds = miniature_railway_track_pieces_right_eight_to_orthog_bounds[direction][index]; offset = miniature_railway_track_pieces_right_eight_to_orthog_offset[direction][index]; } - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (sint8)bounds.z, height, offset.x, offset.y, height); + sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); } } else @@ -1483,15 +1483,15 @@ static void paint_miniature_railway_track_left_eighth_to_diag( session->TrackColours[SCHEME_SUPPORTS]; LocationXY16 offset = miniature_railway_track_floor_pieces_left_eight_to_diag_offset[direction][trackSequence]; LocationXYZ16 bounds = miniature_railway_track_floor_pieces_left_eight_to_diag_bounds[direction][trackSequence]; - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (sint8)bounds.z, height, offset.x, offset.y, height); + sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); - sint8 index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; + int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) { imageId = miniature_railway_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_left_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_left_eight_to_diag_bounds[direction][index]; - sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (sint8)bounds.z, height, offset.x, offset.y, height); + sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); } } @@ -1508,7 +1508,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag( paint_util_set_general_support_height(session, height + 32, 0x20); } -static constexpr const uint32 miniature_railway_floor_track_pieces_right_eight_to_diag[4][5] = { +static constexpr const uint32_t miniature_railway_floor_track_pieces_right_eight_to_diag[4][5] = { { SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_N_SEGMENT, SPR_FLOOR_PLANKS_S_SEGMENT, SPR_FLOOR_PLANKS_90_DEG }, { SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_90_DEG, SPR_FLOOR_PLANKS_E_SEGMENT, SPR_FLOOR_PLANKS_W_SEGMENT, @@ -1583,13 +1583,13 @@ static constexpr const LocationXY16 miniature_railway_track_floor_pieces_right_e /** rct2: 0x008AD1D0 */ static void paint_miniature_railway_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 supportType[4][5] = { { 0, 0, 2, 4, 1 }, { 1, 1, 3, 5, 0 }, { 0, 0, 4, 2, 1 }, { 1, 1, 5, 3, 0 } }; + const uint8_t supportType[4][5] = { { 0, 0, 2, 4, 1 }, { 1, 1, 3, 5, 0 }, { 0, 0, 4, 2, 1 }, { 1, 1, 5, 3, 0 } }; bool isSupported = false; bool isLeftEighthToOrthog = track_element_get_type(tileElement) == TRACK_ELEM_LEFT_EIGHTH_TO_ORTHOGONAL; @@ -1601,10 +1601,10 @@ static void paint_miniature_railway_track_right_eighth_to_diag( session->TrackColours[SCHEME_SUPPORTS], nullptr); } - uint32 imageId; + uint32_t imageId; if (isSupported == false) { - sint8 index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; + int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) { imageId = @@ -1616,7 +1616,7 @@ static void paint_miniature_railway_track_right_eighth_to_diag( bounds = miniature_railway_track_pieces_left_eight_to_orthog_bounds[direction][index]; offset = miniature_railway_track_pieces_left_eight_to_orthog_offset[direction][index]; } - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (sint8)bounds.z, height, offset.x, offset.y, height); + sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); } } else @@ -1625,16 +1625,16 @@ static void paint_miniature_railway_track_right_eighth_to_diag( session->TrackColours[SCHEME_SUPPORTS]; LocationXY16 offset = miniature_railway_track_floor_pieces_right_eight_to_diag_offset[direction][trackSequence]; LocationXYZ16 bounds = miniature_railway_track_floor_pieces_right_eight_to_diag_bounds[direction][trackSequence]; - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (sint8)bounds.z, height, offset.x, offset.y, height); + sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); - sint8 index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; + int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) { imageId = miniature_railway_track_pieces_right_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index]; - sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (sint8)bounds.z, height, offset.x, offset.y, height); + sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); } } @@ -1654,10 +1654,10 @@ static void paint_miniature_railway_track_right_eighth_to_diag( /** rct2: 0x008AD1E0 */ static void paint_miniature_railway_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1668,10 +1668,10 @@ static void paint_miniature_railway_track_left_eighth_to_orthogonal( /** rct2: 0x008AD1F0 */ static void paint_miniature_railway_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1696,7 +1696,7 @@ enum SUPPORT_PLAIN_W = 5, }; -static constexpr const sint16 monorail_diag_support_types[][4] = { +static constexpr const int16_t monorail_diag_support_types[][4] = { { -1, SUPPORT_PLAIN_N, SUPPORT_PLAIN_S, SUPPORT_PLAIN }, { -1, SUPPORT_PLAIN_E, SUPPORT_PLAIN_W, SUPPORT_PLAIN_90_DEG }, { -1, SUPPORT_PLAIN_S, SUPPORT_PLAIN_N, SUPPORT_PLAIN }, @@ -1705,7 +1705,7 @@ static constexpr const sint16 monorail_diag_support_types[][4] = { struct floor_desc { - uint32 image_id; + uint32_t image_id; LocationXY16 bound_size; LocationXY16 bound_offset; }; @@ -1722,16 +1722,16 @@ static constexpr const floor_desc floors[] = { /** rct2: 0x008AD200 */ static void miniature_railway_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isSupported = false; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; @@ -1749,7 +1749,7 @@ static void miniature_railway_track_diag_flat( floorBoundOffset = { -16, -16 }; } - uint32 imageId = miniature_railway_track_pieces_diag_flat[direction]; + uint32_t imageId = miniature_railway_track_pieces_diag_flat[direction]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; if (isSupported) @@ -1777,8 +1777,8 @@ enum WOOD_B = 1, }; -static bool wooden_supports_paint_setup(paint_session * session, sint32 woodType, sint32 supportType, sint32 special, - sint32 height, uint32 imageColourFlags, bool * underground) +static bool wooden_supports_paint_setup(paint_session * session, int32_t woodType, int32_t supportType, int32_t special, + int32_t height, uint32_t imageColourFlags, bool * underground) { switch (woodType) { @@ -1795,23 +1795,23 @@ static bool wooden_supports_paint_setup(paint_session * session, sint32 woodType /** rct2: 0x008AD230 */ static void miniature_railway_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { // TODO: The supports are inconsistent for different rotations - sint8 supportFunction = WOOD_B; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int8_t supportFunction = WOOD_B; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; if (supportType == SUPPORT_PLAIN || supportType == SUPPORT_PLAIN_90_DEG) { supportFunction = WOOD_A; } - sint8 heightDiffs[] = { +8, -8, +8, -8 }; - sint8 heightDiff = heightDiffs[direction]; + int8_t heightDiffs[] = { +8, -8, +8, -8 }; + int8_t heightDiff = heightDiffs[direction]; if (trackSequence == 3) { heightDiff = 8; @@ -1819,7 +1819,7 @@ static void miniature_railway_track_diag_25_deg_up( bool hasSupports = false; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; @@ -1837,16 +1837,16 @@ static void miniature_railway_track_diag_25_deg_up( floorBoundOffset = { -16, -16 }; } - static constexpr const sint8 offsetsB[4][4][2] = { + static constexpr const int8_t offsetsB[4][4][2] = { { { 0, 0 }, { +8, +16 }, { +8, +8 }, { +8, +8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { +8, +8 } }, { { 0, 0 }, { +8, +8 }, { +8, +16 }, { +8, +8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { +8, +8 } }, }; - uint32 imageId = miniature_railway_track_pieces_diag_25_deg_up[direction]; + uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up[direction]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; - static constexpr const sint8 offsetB[] = { +8, 0, +8, +8 }; + static constexpr const int8_t offsetB[] = { +8, 0, +8, +8 }; if (hasSupports) { sub_98197C( @@ -1874,19 +1874,19 @@ static void miniature_railway_track_diag_25_deg_up( /** rct2: 0x008AD210 */ static void miniature_railway_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool hasSupports = false; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; if (supportType != -1) { floorImage = floors[supportType].image_id; @@ -1901,7 +1901,7 @@ static void miniature_railway_track_diag_flat_to_25_deg_up( floorBoundOffset = { -16, -16 }; } - uint32 imageId = miniature_railway_track_pieces_diag_flat_to_25_deg_up[direction]; + uint32_t imageId = miniature_railway_track_pieces_diag_flat_to_25_deg_up[direction]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; if (hasSupports) @@ -1926,29 +1926,29 @@ static void miniature_railway_track_diag_flat_to_25_deg_up( /** rct2: 0x008AD220 */ static void miniature_railway_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 supportOffsets[][4] = { + const int8_t supportOffsets[][4] = { { 0, +8, +8, +8 }, { 0, -8, -8, 0 }, { 0, +8, +8, +8 }, { 0, -8, -8, +8 }, }; - sint8 supportFunction = WOOD_B; + int8_t supportFunction = WOOD_B; if (trackSequence == 3) { supportFunction = WOOD_A; } bool hasSupports = false; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; @@ -1967,17 +1967,17 @@ static void miniature_railway_track_diag_25_deg_up_to_flat( floorBoundOffset = { -16, -16 }; } - const sint8 offsetsB[4][4][2] = { + const int8_t offsetsB[4][4][2] = { { { 0, 0 }, { +8, +16 }, { +8, +8 }, { +8, +8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { +8, +8 } }, { { 0, 0 }, { +8, +8 }, { +8, +16 }, { +8, +8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { +8, +8 } }, }; - uint32 imageId = miniature_railway_track_pieces_diag_25_deg_up_to_flat[direction]; + uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up_to_flat[direction]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; - const sint8 railOffsets[] = { +8, 0, +8, +8 }; + const int8_t railOffsets[] = { +8, 0, +8, +8 }; if (hasSupports) { @@ -2006,20 +2006,20 @@ static void miniature_railway_track_diag_25_deg_up_to_flat( /** rct2: 0x008AD260 */ static void miniature_railway_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 supportOffsets[][4] = { + const int8_t supportOffsets[][4] = { { 0, +16, +16, 0 }, { 0, -8, -8, 0 }, { 0, +16, +16, 0 }, { 0, -8, -8, -8 }, }; - sint8 supportFunction = WOOD_B; + int8_t supportFunction = WOOD_B; if (trackSequence == 3) { supportFunction = WOOD_A; @@ -2027,10 +2027,10 @@ static void miniature_railway_track_diag_25_deg_down( bool hasSupports = false; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; if (supportType != -1) { @@ -2047,11 +2047,11 @@ static void miniature_railway_track_diag_25_deg_down( floorBoundOffset = { -16, -16 }; } - uint32 imageId = miniature_railway_track_pieces_diag_25_deg_up[(direction + 2) % 4]; + uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up[(direction + 2) % 4]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; - const sint8 railOffsets[] = { 0, +8, +8, +8 }; + const int8_t railOffsets[] = { 0, +8, +8, +8 }; - const sint8 offsetsB[4][4][2] = { + const int8_t offsetsB[4][4][2] = { { { 0, 0 }, { +8, +8 }, { +8, +8 }, { -8, -8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { -8, 0 } }, { { 0, 0 }, { +8, +8 }, { +8, +16 }, { -8, -8 } }, @@ -2085,30 +2085,30 @@ static void miniature_railway_track_diag_25_deg_down( /** rct2: 0x008AD240 */ static void miniature_railway_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const sint8 supportOffsets[][4] = { + const int8_t supportOffsets[][4] = { { 0, +16, +16, 0 }, { 0, -8, -8, -8 }, { 0, +8, +8, 0 }, { 0, -8, -8, -8 }, }; - sint8 supportFunction = WOOD_B; + int8_t supportFunction = WOOD_B; if (trackSequence == 3) { supportFunction = WOOD_A; } bool hasSupports = false; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; if (supportType != -1) { @@ -2125,16 +2125,16 @@ static void miniature_railway_track_diag_flat_to_25_deg_down( floorBoundOffset = { -16, -16 }; } - const sint8 offsetsB[4][4][2] = { + const int8_t offsetsB[4][4][2] = { { { 0, 0 }, { +8, +8 }, { +8, +8 }, { -8, -8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { -8, 0 } }, { { 0, 0 }, { +8, +8 }, { +8, +16 }, { -8, -8 } }, { { 0, 0 }, { -8, -8 }, { -8, -8 }, { -8, -8 } }, }; - uint32 imageId = miniature_railway_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4]; + uint32_t imageId = miniature_railway_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; - const sint8 railOffsets[] = { 0, +8, +8, +8 }; + const int8_t railOffsets[] = { 0, +8, +8, +8 }; if (hasSupports) { @@ -2162,17 +2162,17 @@ static void miniature_railway_track_diag_flat_to_25_deg_down( static void miniature_railway_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool hasSupports = false; - uint32 floorImage = 0; + uint32_t floorImage = 0; LocationXY16 floorBoundSize = {}; LocationXY16 floorBoundOffset = {}; - sint16 supportType = monorail_diag_support_types[direction][trackSequence]; + int16_t supportType = monorail_diag_support_types[direction][trackSequence]; if (supportType != -1) { @@ -2188,7 +2188,7 @@ static void miniature_railway_track_diag_25_deg_down_to_flat( floorBoundOffset = { -16, -16 }; } - uint32 imageId = miniature_railway_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4]; + uint32_t imageId = miniature_railway_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4]; bool drawRail = miniature_railway_diag_image_segment[direction][trackSequence]; if (hasSupports) @@ -2213,7 +2213,7 @@ static void miniature_railway_track_diag_25_deg_down_to_flat( /** * rct2: 0x008ACE48 */ -TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index d446cbe10c..3b9866a4d6 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -131,14 +131,14 @@ enum SPR_MONORAIL_DIAG_25_DEG_UP_S_N = 23340, }; -static constexpr const uint32 monorail_track_pieces_flat[4] = { +static constexpr const uint32_t monorail_track_pieces_flat[4] = { SPR_MONORAIL_FLAT_SW_NE, SPR_MONORAIL_FLAT_NW_SE, SPR_MONORAIL_FLAT_SW_NE, SPR_MONORAIL_FLAT_NW_SE, }; -static constexpr const uint32 monorail_track_pieces_flat_quarter_turn_5_tiles[4][5] = { +static constexpr const uint32_t monorail_track_pieces_flat_quarter_turn_5_tiles[4][5] = { { SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_0, SPR_MONORAIL_QUARTER_TURN_5_TILES_SW_SE_PART_1, @@ -169,28 +169,28 @@ static constexpr const uint32 monorail_track_pieces_flat_quarter_turn_5_tiles[4] } }; -static constexpr const uint32 monorail_track_pieces_25_deg_up[4] = { +static constexpr const uint32_t monorail_track_pieces_25_deg_up[4] = { SPR_MONORAIL_25_DEG_UP_SW_NE, SPR_MONORAIL_25_DEG_UP_NW_SE, SPR_MONORAIL_25_DEG_UP_NE_SW, SPR_MONORAIL_25_DEG_UP_SE_NW, }; -static constexpr const uint32 monorail_track_pieces_flat_to_25_deg_up[4] = { +static constexpr const uint32_t monorail_track_pieces_flat_to_25_deg_up[4] = { SPR_MONORAIL_FLAT_TO_25_DEG_UP_SW_NE, SPR_MONORAIL_FLAT_TO_25_DEG_UP_NW_SE, SPR_MONORAIL_FLAT_TO_25_DEG_UP_NE_SW, SPR_MONORAIL_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr const uint32 monorail_track_pieces_25_deg_up_to_flat[4] = { +static constexpr const uint32_t monorail_track_pieces_25_deg_up_to_flat[4] = { SPR_MONORAIL_25_DEG_UP_TO_FLAT_SW_NE, SPR_MONORAIL_25_DEG_UP_TO_FLAT_NW_SE, SPR_MONORAIL_25_DEG_UP_TO_FLAT_NE_SW, SPR_MONORAIL_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr const uint32 monorail_track_pieces_s_bend_left[2][4] = { { +static constexpr const uint32_t monorail_track_pieces_s_bend_left[2][4] = { { SPR_MONORAIL_S_BEND_LEFT_SW_NE_PART_0, SPR_MONORAIL_S_BEND_LEFT_SW_NE_PART_1, SPR_MONORAIL_S_BEND_LEFT_SW_NE_PART_2, @@ -203,7 +203,7 @@ static constexpr const uint32 monorail_track_pieces_s_bend_left[2][4] = { { SPR_MONORAIL_S_BEND_LEFT_SE_NW_PART_0, } }; -static constexpr const uint32 monorail_track_pieces_s_bend_right[2][4] = { { +static constexpr const uint32_t monorail_track_pieces_s_bend_right[2][4] = { { SPR_MONORAIL_S_BEND_RIGHT_SW_NE_PART_0, SPR_MONORAIL_S_BEND_RIGHT_SW_NE_PART_1, SPR_MONORAIL_S_BEND_RIGHT_SW_NE_PART_2, @@ -216,7 +216,7 @@ static constexpr const uint32 monorail_track_pieces_s_bend_right[2][4] = { { SPR_MONORAIL_S_BEND_RIGHT_SE_NW_PART_0, } }; -static constexpr const uint32 monorail_track_pieces_flat_quarter_turn_3_tiles[4][3] = { +static constexpr const uint32_t monorail_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_0, SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_1, SPR_MONORAIL_QUARTER_TURN_3_TILES_SW_SE_PART_2 }, { SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_0, SPR_MONORAIL_QUARTER_TURN_3_TILES_NW_SW_PART_1, @@ -227,7 +227,7 @@ static constexpr const uint32 monorail_track_pieces_flat_quarter_turn_3_tiles[4] SPR_MONORAIL_QUARTER_TURN_3_TILES_SE_NE_PART_2 } }; -static constexpr const uint32 ghost_train_track_pieces_right_eight_to_diag[4][4] = { +static constexpr const uint32_t ghost_train_track_pieces_right_eight_to_diag[4][4] = { { SPR_MONORAIL_EIGHT_TO_DIAG_SW_E_PART_0, SPR_MONORAIL_EIGHT_TO_DIAG_SW_E_PART_1, @@ -308,7 +308,7 @@ static constexpr const LocationXY16 ghost_train_track_pieces_right_eight_to_diag }, }; -static constexpr const uint32 ghost_train_track_pieces_left_eight_to_diag[4][4] = { +static constexpr const uint32_t ghost_train_track_pieces_left_eight_to_diag[4][4] = { { SPR_MONORAIL_EIGHT_TO_DIAG_SW_N_PART_0, SPR_MONORAIL_EIGHT_TO_DIAG_SW_N_PART_1, @@ -389,28 +389,28 @@ static constexpr const LocationXY16 ghost_train_track_pieces_left_eight_to_diag_ }, }; -static constexpr const uint32 monorail_track_pieces_diag_flat[4] = { +static constexpr const uint32_t monorail_track_pieces_diag_flat[4] = { SPR_MONORAIL_DIAG_FLAT_W_E, SPR_MONORAIL_DIAG_FLAT_N_S, SPR_MONORAIL_DIAG_FLAT_E_W, SPR_MONORAIL_DIAG_FLAT_S_N, }; -static constexpr const uint32 monorail_track_pieces_diag_flat_to_25_deg_up[4] = { +static constexpr const uint32_t monorail_track_pieces_diag_flat_to_25_deg_up[4] = { SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_W_E, SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_N_S, SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_E_W, SPR_MONORAIL_DIAG_FLAT_TO_25_DEG_UP_S_N, }; -static constexpr const uint32 monorail_track_pieces_diag_25_deg_up_to_flat[4] = { +static constexpr const uint32_t monorail_track_pieces_diag_25_deg_up_to_flat[4] = { SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_W_E, SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_N_S, SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_E_W, SPR_MONORAIL_DIAG_25_DEG_UP_TO_FLAT_S_N, }; -static constexpr const uint32 monorail_track_pieces_diag_25_deg_up[4] = { +static constexpr const uint32_t monorail_track_pieces_diag_25_deg_up[4] = { SPR_MONORAIL_DIAG_25_DEG_UP_W_E, SPR_MONORAIL_DIAG_25_DEG_UP_N_S, SPR_MONORAIL_DIAG_25_DEG_UP_E_W, @@ -420,15 +420,15 @@ static constexpr const uint32 monorail_track_pieces_diag_25_deg_up[4] = { /** rct2: 0x008AE1AC */ static void paint_monorail_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = monorail_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -461,13 +461,13 @@ static void paint_monorail_track_flat( /** rct2: 0x008AE25C, 0x008AE26C, 0x008AE27C */ static void paint_monorail_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction == 0 || direction == 2) { @@ -519,15 +519,15 @@ static void paint_monorail_station( /** rct2: 0x008AE1BC */ static void paint_monorail_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = monorail_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -567,15 +567,15 @@ static void paint_monorail_track_25_deg_up( /** rct2: 0x008AE1CC */ static void paint_monorail_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = monorail_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -615,15 +615,15 @@ static void paint_monorail_track_flat_to_25_deg_up( /** rct2: 0x008AE1DC */ static void paint_monorail_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - uint32 imageId = monorail_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; if (direction == 0 || direction == 2) { @@ -663,10 +663,10 @@ static void paint_monorail_track_25_deg_up_to_flat( /** rct2: 0x008AE1EC */ static void paint_monorail_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_monorail_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -675,10 +675,10 @@ static void paint_monorail_track_25_deg_down( /** rct2: 0x008AE1FC */ static void paint_monorail_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_monorail_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -687,10 +687,10 @@ static void paint_monorail_track_flat_to_25_deg_down( /** rct2: 0x008AE20C */ static void paint_monorail_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_monorail_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -699,10 +699,10 @@ static void paint_monorail_track_25_deg_down_to_flat( /** rct2: 0x008AE22C */ static void paint_monorail_track_right_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_5_tiles_paint( @@ -738,7 +738,7 @@ static void paint_monorail_track_right_quarter_turn_5_tiles( paint_util_push_tunnel_right(session, height, TUNNEL_6); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -766,10 +766,10 @@ static void paint_monorail_track_right_quarter_turn_5_tiles( /** rct2: 0x008AE21C */ static void paint_monorail_track_left_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -779,10 +779,10 @@ static void paint_monorail_track_left_quarter_turn_5_tiles( /** rct2: 0x */ static void paint_monorail_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -804,16 +804,16 @@ static void paint_monorail_track_s_bend_left( { 32, 20 }, }; - uint32 imageId = monorail_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 3, height); + sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 3, height); } else { - sub_98196C(session, imageId, (sint8)offset.y, (sint8)offset.x, bounds.y, bounds.x, 3, height); + sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 3, height); } if (direction == 0 || direction == 2) @@ -857,7 +857,7 @@ static void paint_monorail_track_s_bend_left( } } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -881,10 +881,10 @@ static void paint_monorail_track_s_bend_left( /** rct2: 0x008AE24C */ static void paint_monorail_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (direction == 2 || direction == 3) @@ -906,16 +906,16 @@ static void paint_monorail_track_s_bend_right( { 32, 20 }, }; - uint32 imageId = monorail_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; LocationXY16 offset = offsetList[trackSequence]; LocationXY16 bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, 3, height); + sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 3, height); } else { - sub_98196C(session, imageId, (sint8)offset.y, (sint8)offset.x, bounds.y, bounds.x, 3, height); + sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 3, height); } if (direction == 0 || direction == 2) @@ -959,7 +959,7 @@ static void paint_monorail_track_s_bend_right( } } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -983,10 +983,10 @@ static void paint_monorail_track_s_bend_right( /** rct2: 0x008AE29C */ static void paint_monorail_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_3_tiles_paint( @@ -1003,7 +1003,7 @@ static void paint_monorail_track_right_quarter_turn_3_tiles( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1024,31 +1024,31 @@ static void paint_monorail_track_right_quarter_turn_3_tiles( /** rct2: 0x008AE28C */ static void paint_monorail_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; paint_monorail_track_right_quarter_turn_3_tiles(session, rideIndex, trackSequence, (direction + 1) % 4, height, tileElement); } -static constexpr const sint8 paint_monorail_eighth_to_diag_index[] = { 0, 1, 2, -1, 3 }; +static constexpr const int8_t paint_monorail_eighth_to_diag_index[] = { 0, 1, 2, -1, 3 }; /** rct2: 0x008AE31C */ static void paint_monorail_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - sint8 index = paint_monorail_eighth_to_diag_index[trackSequence]; + int8_t index = paint_monorail_eighth_to_diag_index[trackSequence]; if (index >= 0) { - uint32 imageId = ghost_train_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; const LocationXY16 offset = ghost_train_track_pieces_left_eight_to_diag_offset[direction][index]; const LocationXY16 bounds = ghost_train_track_pieces_left_eight_to_diag_bounds[direction][index]; sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); @@ -1080,7 +1080,7 @@ static void paint_monorail_track_left_eighth_to_diag( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1107,16 +1107,16 @@ static void paint_monorail_track_left_eighth_to_diag( /** rct2: 0x008AE32C */ static void paint_monorail_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - sint8 index = paint_monorail_eighth_to_diag_index[trackSequence]; + int8_t index = paint_monorail_eighth_to_diag_index[trackSequence]; if (index >= 0) { - uint32 imageId = ghost_train_track_pieces_right_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = ghost_train_track_pieces_right_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; const LocationXY16 offset = ghost_train_track_pieces_right_eight_to_diag_offset[direction][index]; const LocationXY16 bounds = ghost_train_track_pieces_right_eight_to_diag_bounds[direction][index]; sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height); @@ -1148,7 +1148,7 @@ static void paint_monorail_track_right_eighth_to_diag( paint_util_push_tunnel_right(session, height, TUNNEL_0); } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1175,13 +1175,13 @@ static void paint_monorail_track_right_eighth_to_diag( /** rct2: 0x008AE33C */ static void paint_monorail_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 map[] = { 4, 2, 3, 1, 0 }; + const uint8_t map[] = { 4, 2, 3, 1, 0 }; trackSequence = map[trackSequence]; paint_monorail_track_right_eighth_to_diag(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); } @@ -1189,13 +1189,13 @@ static void paint_monorail_track_left_eighth_to_orthogonal( /** rct2: 0x008AE34C */ static void paint_monorail_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - const uint8 map[] = { 4, 2, 3, 1, 0 }; + const uint8_t map[] = { 4, 2, 3, 1, 0 }; trackSequence = map[trackSequence]; paint_monorail_track_left_eighth_to_diag(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); } @@ -1208,9 +1208,9 @@ static constexpr const bool monorail_diag_image_segment[][4] = { true, false, false, false }, }; -static constexpr const uint8 monorail_diag_support_segment[] = { 1, 0, 2, 3 }; +static constexpr const uint8_t monorail_diag_support_segment[] = { 1, 0, 2, 3 }; -static constexpr const sint32 monorail_diag_blocked_segments[] = { SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4 | SEGMENT_BC, +static constexpr const int32_t monorail_diag_blocked_segments[] = { SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4 | SEGMENT_BC, SEGMENT_C4 | SEGMENT_CC | SEGMENT_C8 | SEGMENT_B4, SEGMENT_D0 | SEGMENT_C4 | SEGMENT_C0 | SEGMENT_D4, SEGMENT_D0 | SEGMENT_C4 | SEGMENT_B8 | SEGMENT_C8 }; @@ -1218,15 +1218,15 @@ static constexpr const sint32 monorail_diag_blocked_segments[] = { SEGMENT_C4 | /** rct2: 0x008AE2AC */ static void paint_monorail_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = monorail_track_pieces_diag_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_flat[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1236,7 +1236,7 @@ static void paint_monorail_track_diag_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 32, 0x20); } @@ -1244,15 +1244,15 @@ static void paint_monorail_track_diag_flat( /** rct2: 0x008AE2DC */ static void paint_monorail_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = monorail_track_pieces_diag_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1262,7 +1262,7 @@ static void paint_monorail_track_diag_25_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -1270,15 +1270,15 @@ static void paint_monorail_track_diag_25_deg_up( /** rct2: 0x008AE2BC */ static void paint_monorail_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = monorail_track_pieces_diag_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1288,7 +1288,7 @@ static void paint_monorail_track_diag_flat_to_25_deg_up( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } @@ -1296,15 +1296,15 @@ static void paint_monorail_track_diag_flat_to_25_deg_up( /** rct2: 0x008AE2CC */ static void paint_monorail_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = monorail_track_pieces_diag_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1314,7 +1314,7 @@ static void paint_monorail_track_diag_25_deg_up_to_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -1322,15 +1322,15 @@ static void paint_monorail_track_diag_25_deg_up_to_flat( /** rct2: 0x008AE30C */ static void paint_monorail_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = monorail_track_pieces_diag_25_deg_up[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = monorail_track_pieces_diag_25_deg_up[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1340,7 +1340,7 @@ static void paint_monorail_track_diag_25_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -1348,15 +1348,15 @@ static void paint_monorail_track_diag_25_deg_down( /** rct2: 0x008AE2EC */ static void paint_monorail_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = + uint32_t imageId = monorail_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1367,7 +1367,7 @@ static void paint_monorail_track_diag_flat_to_25_deg_down( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 56, 0x20); } @@ -1375,15 +1375,15 @@ static void paint_monorail_track_diag_flat_to_25_deg_down( /** rct2: 0x008AE2FC */ static void paint_monorail_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { if (monorail_diag_image_segment[direction][trackSequence]) { - uint32 imageId = + uint32_t imageId = monorail_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height); } @@ -1394,7 +1394,7 @@ static void paint_monorail_track_diag_25_deg_down_to_flat( session->TrackColours[SCHEME_SUPPORTS]); } - sint32 blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; paint_util_set_segment_support_height(session, paint_util_rotate_segments(blockedSegments, direction), 0xFFFF, 0); paint_util_set_general_support_height(session, height + 48, 0x20); } @@ -1402,7 +1402,7 @@ static void paint_monorail_track_diag_25_deg_down_to_flat( /** * rct2: 0x008ADF34 */ -TRACK_PAINT_FUNCTION get_track_paint_function_monorail(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_monorail(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/transport/SuspendedMonorail.cpp b/src/openrct2/ride/transport/SuspendedMonorail.cpp index fe910da607..d4721e0b4f 100644 --- a/src/openrct2/ride/transport/SuspendedMonorail.cpp +++ b/src/openrct2/ride/transport/SuspendedMonorail.cpp @@ -22,10 +22,10 @@ /** rct2: 0x008636F4 */ static void suspended_monorail_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -56,13 +56,13 @@ static void suspended_monorail_track_flat( /** rct2: 0x008637A4, 0x008637B4, 0x008637C4 */ static void suspended_monorail_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_STATION_BASE_C_SW_NE, 25853, SPR_STATION_INVERTED_BAR_F_SW_NE }, { SPR_STATION_BASE_C_NW_SE, 25854, SPR_STATION_INVERTED_BAR_F_NW_SE }, { SPR_STATION_BASE_C_SW_NE, 25853, SPR_STATION_INVERTED_BAR_F_SW_NE }, @@ -85,10 +85,10 @@ static void suspended_monorail_track_station( /** rct2: 0x00863704 */ static void suspended_monorail_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -150,10 +150,10 @@ static void suspended_monorail_track_25_deg_up( /** rct2: 0x00863714 */ static void suspended_monorail_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -215,10 +215,10 @@ static void suspended_monorail_track_flat_to_25_deg_up( /** rct2: 0x00863724 */ static void suspended_monorail_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -280,10 +280,10 @@ static void suspended_monorail_track_25_deg_up_to_flat( /** rct2: 0x00863734 */ static void suspended_monorail_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_monorail_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -292,10 +292,10 @@ static void suspended_monorail_track_25_deg_down( /** rct2: 0x00863744 */ static void suspended_monorail_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_monorail_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -304,10 +304,10 @@ static void suspended_monorail_track_flat_to_25_deg_down( /** rct2: 0x00863754 */ static void suspended_monorail_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { suspended_monorail_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -316,10 +316,10 @@ static void suspended_monorail_track_25_deg_down_to_flat( /** rct2: 0x00863764 */ static void suspended_monorail_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -476,10 +476,10 @@ static void suspended_monorail_track_left_quarter_turn_5( /** rct2: 0x00863774 */ static void suspended_monorail_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -489,10 +489,10 @@ static void suspended_monorail_track_right_quarter_turn_5( /** rct2: 0x00863784 */ static void suspended_monorail_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -644,10 +644,10 @@ static void suspended_monorail_track_s_bend_left( /** rct2: 0x00863794 */ static void suspended_monorail_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -799,10 +799,10 @@ static void suspended_monorail_track_s_bend_right( /** rct2: 0x008637D4 */ static void suspended_monorail_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -908,10 +908,10 @@ static void suspended_monorail_track_left_quarter_turn_3( /** rct2: 0x008637E4 */ static void suspended_monorail_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -921,10 +921,10 @@ static void suspended_monorail_track_right_quarter_turn_3( /** rct2: 0x00863864 */ static void suspended_monorail_track_left_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1069,10 +1069,10 @@ static void suspended_monorail_track_left_eighth_to_diag( /** rct2: 0x00863874 */ static void suspended_monorail_track_right_eighth_to_diag( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1217,10 +1217,10 @@ static void suspended_monorail_track_right_eighth_to_diag( /** rct2: 0x00863884 */ static void suspended_monorail_track_left_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1230,10 +1230,10 @@ static void suspended_monorail_track_left_eighth_to_orthogonal( /** rct2: 0x00863894 */ static void suspended_monorail_track_right_eighth_to_orthogonal( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; @@ -1243,10 +1243,10 @@ static void suspended_monorail_track_right_eighth_to_orthogonal( /** rct2: 0x008637F4 */ static void suspended_monorail_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1326,10 +1326,10 @@ static void suspended_monorail_track_diag_flat( /** rct2: 0x00863824 */ static void suspended_monorail_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1409,10 +1409,10 @@ static void suspended_monorail_track_diag_25_deg_up( /** rct2: 0x00863804 */ static void suspended_monorail_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1492,10 +1492,10 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up( /** rct2: 0x00863814 */ static void suspended_monorail_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1575,10 +1575,10 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat( /** rct2: 0x00863854 */ static void suspended_monorail_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1658,10 +1658,10 @@ static void suspended_monorail_track_diag_25_deg_down( /** rct2: 0x00863834 */ static void suspended_monorail_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1738,10 +1738,10 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down( /** rct2: 0x00863844 */ static void suspended_monorail_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (trackSequence) @@ -1818,7 +1818,7 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat( } } -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/water/BoatHire.cpp b/src/openrct2/ride/water/BoatHire.cpp index e3d366ca8c..117b114f8c 100644 --- a/src/openrct2/ride/water/BoatHire.cpp +++ b/src/openrct2/ride/water/BoatHire.cpp @@ -32,13 +32,13 @@ enum /** rct2: 0x008B0E40 */ static void paint_boat_hire_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction & 1) { @@ -65,10 +65,10 @@ static void paint_boat_hire_track_flat( /** rct2: 0x008B0E50 */ static void paint_boat_hire_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; @@ -95,13 +95,13 @@ static void paint_boat_hire_station( /** rct2: 0x008B0E80 */ static void paint_boat_hire_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { case 0: @@ -142,10 +142,10 @@ static void paint_boat_hire_track_left_quarter_turn_1_tile( /** rct2: 0x008B0E90 */ static void paint_boat_hire_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_boat_hire_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, tileElement); @@ -154,7 +154,7 @@ static void paint_boat_hire_track_right_quarter_turn_1_tile( /** * rct2: 0x008B0D60 */ -TRACK_PAINT_FUNCTION get_track_paint_function_boat_hire(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_boat_hire(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/water/DingySlide.cpp b/src/openrct2/ride/water/DingySlide.cpp index 10d84a731b..d90dbd928a 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -351,13 +351,13 @@ enum static void dinghy_slide_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_DINGHY_SLIDE_FLAT_SW_NE, SPR_DINGHY_SLIDE_FLAT_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_FLAT_NW_SE, SPR_DINGHY_SLIDE_FLAT_FRONT_NW_SE }, @@ -372,8 +372,8 @@ static void dinghy_slide_track_flat( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -393,13 +393,13 @@ static void dinghy_slide_track_flat( static void dinghy_slide_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, { SPR_DINGHY_SLIDE_STATION_NW_SE, SPR_STATION_BASE_B_NW_SE }, { SPR_DINGHY_SLIDE_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, @@ -426,13 +426,13 @@ static void dinghy_slide_track_station( static void dinghy_slide_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_DINGHY_SLIDE_25_DEG_SW_NE, SPR_DINGHY_SLIDE_25_DEG_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_25_DEG_NW_SE, SPR_DINGHY_SLIDE_25_DEG_FRONT_NW_SE }, @@ -447,8 +447,8 @@ static void dinghy_slide_track_25_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -475,20 +475,20 @@ static void dinghy_slide_track_25_deg_up( static void dinghy_slide_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_60_DEG_SW_NE, SPR_DINGHY_SLIDE_60_DEG_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_60_DEG_NW_SE, SPR_DINGHY_SLIDE_60_DEG_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_60_DEG_NE_SW, SPR_DINGHY_SLIDE_60_DEG_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_60_DEG_SE_NW, SPR_DINGHY_SLIDE_60_DEG_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -515,13 +515,13 @@ static void dinghy_slide_track_60_deg_up( static void dinghy_slide_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_SW_NE, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_NW_SE, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_FRONT_NW_SE }, @@ -536,8 +536,8 @@ static void dinghy_slide_track_flat_to_25_deg_up( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -564,20 +564,20 @@ static void dinghy_slide_track_flat_to_25_deg_up( static void dinghy_slide_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_SW_NE, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_NW_SE, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_NE_SW, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_SE_NW, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -604,20 +604,20 @@ static void dinghy_slide_track_25_deg_up_to_60_deg_up( static void dinghy_slide_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_SW_NE, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_NW_SE, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_NE_SW, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_SE_NW, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -644,13 +644,13 @@ static void dinghy_slide_track_60_deg_up_to_25_deg_up( static void dinghy_slide_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[2][4][2] = { + static constexpr const uint32_t imageIds[2][4][2] = { { { SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_SW_NE, SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_NW_SE, SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_FRONT_NW_SE }, @@ -665,8 +665,8 @@ static void dinghy_slide_track_25_deg_up_to_flat( }, }; - uint8 isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; - uint32 imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; + uint8_t isChained = track_element_is_lift_hill(tileElement) ? 1 : 0; + uint32_t imageId = imageIds[isChained][direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[isChained][direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -693,10 +693,10 @@ static void dinghy_slide_track_25_deg_up_to_flat( static void dinghy_slide_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -704,10 +704,10 @@ static void dinghy_slide_track_25_deg_down( static void dinghy_slide_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -715,10 +715,10 @@ static void dinghy_slide_track_60_deg_down( static void dinghy_slide_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -726,10 +726,10 @@ static void dinghy_slide_track_flat_to_25_deg_down( static void dinghy_slide_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -737,10 +737,10 @@ static void dinghy_slide_track_25_deg_down_to_60_deg_down( static void dinghy_slide_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -748,10 +748,10 @@ static void dinghy_slide_track_25_deg_down_to_flat( static void dinghy_slide_track_right_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][5] = { @@ -878,10 +878,10 @@ static void dinghy_slide_track_right_quarter_turn_5( static void dinghy_slide_track_left_quarter_turn_5( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -890,10 +890,10 @@ static void dinghy_slide_track_left_quarter_turn_5( static void dinghy_slide_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -901,13 +901,13 @@ static void dinghy_slide_track_60_deg_down_to_25_deg_down( static void dinghy_slide_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_DINGHY_SLIDE_S_BEND_SW_SE_SW_SEQ_3, SPR_DINGHY_SLIDE_S_BEND_FRONT_NE_NW_NE_SEQ_0 }, { SPR_DINGHY_SLIDE_S_BEND_SW_SE_SW_SEQ_2, SPR_DINGHY_SLIDE_S_BEND_FRONT_NE_NW_NE_SEQ_1 }, { SPR_DINGHY_SLIDE_S_BEND_SW_SE_SW_SEQ_1, SPR_DINGHY_SLIDE_S_BEND_FRONT_NE_NW_NE_SEQ_2 }, @@ -926,9 +926,9 @@ static void dinghy_slide_track_s_bend_left( { SPR_DINGHY_SLIDE_S_BEND_NW_SW_NW_SEQ_0, SPR_DINGHY_SLIDE_S_BEND_FRONT_NW_SW_NW_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; switch (trackSequence) { @@ -996,13 +996,13 @@ static void dinghy_slide_track_s_bend_left( static void dinghy_slide_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_DINGHY_SLIDE_S_BEND_SW_NW_SW_SEQ_3, SPR_DINGHY_SLIDE_S_BEND_FRONT_NE_SE_NE_SEQ_0 }, { SPR_DINGHY_SLIDE_S_BEND_SW_NW_SW_SEQ_2, SPR_DINGHY_SLIDE_S_BEND_FRONT_NE_SE_NE_SEQ_1 }, { SPR_DINGHY_SLIDE_S_BEND_SW_NW_SW_SEQ_1, SPR_DINGHY_SLIDE_S_BEND_FRONT_NE_SE_NE_SEQ_2 }, @@ -1021,9 +1021,9 @@ static void dinghy_slide_track_s_bend_right( { SPR_DINGHY_SLIDE_S_BEND_SE_SW_SE_SEQ_0, SPR_DINGHY_SLIDE_S_BEND_FRONT_SE_SW_SE_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; switch (trackSequence) { @@ -1091,10 +1091,10 @@ static void dinghy_slide_track_s_bend_right( static void dinghy_slide_track_right_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][3] = { @@ -1156,7 +1156,7 @@ static void dinghy_slide_track_right_quarter_turn_3( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1176,10 +1176,10 @@ static void dinghy_slide_track_right_quarter_turn_3( static void dinghy_slide_track_left_quarter_turn_3( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1188,20 +1188,20 @@ static void dinghy_slide_track_left_quarter_turn_3( static void dinghy_slide_track_flat_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_FLAT_COVERED_SW_NE, SPR_DINGHY_SLIDE_FLAT_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_FLAT_COVERED_NW_SE, SPR_DINGHY_SLIDE_FLAT_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_FLAT_COVERED_SW_NE, SPR_DINGHY_SLIDE_FLAT_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_FLAT_COVERED_NW_SE, SPR_DINGHY_SLIDE_FLAT_COVERED_FRONT_NW_SE }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1221,20 +1221,20 @@ static void dinghy_slide_track_flat_covered( static void dinghy_slide_track_25_deg_up_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_25_DEG_COVERED_SW_NE, SPR_DINGHY_SLIDE_25_DEG_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_25_DEG_COVERED_NW_SE, SPR_DINGHY_SLIDE_25_DEG_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_25_DEG_COVERED_NE_SW, SPR_DINGHY_SLIDE_25_DEG_COVERED_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_25_DEG_COVERED_SE_NW, SPR_DINGHY_SLIDE_25_DEG_COVERED_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1261,20 +1261,20 @@ static void dinghy_slide_track_25_deg_up_covered( static void dinghy_slide_track_60_deg_up_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_60_DEG_COVERED_SW_NE, SPR_DINGHY_SLIDE_60_DEG_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_60_DEG_COVERED_NW_SE, SPR_DINGHY_SLIDE_60_DEG_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_60_DEG_COVERED_NE_SW, SPR_DINGHY_SLIDE_60_DEG_COVERED_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_60_DEG_COVERED_SE_NW, SPR_DINGHY_SLIDE_60_DEG_COVERED_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1301,20 +1301,20 @@ static void dinghy_slide_track_60_deg_up_covered( static void dinghy_slide_track_flat_to_25_deg_up_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_SW_NE, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_NW_SE, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_NE_SW, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_SE_NW, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_COVERED_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1341,20 +1341,20 @@ static void dinghy_slide_track_flat_to_25_deg_up_covered( static void dinghy_slide_track_25_deg_up_to_60_deg_up_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_SW_NE, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_NW_SE, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_NE_SW, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_SE_NW, SPR_DINGHY_SLIDE_25_DEG_TO_60_DEG_COVERED_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1381,20 +1381,20 @@ static void dinghy_slide_track_25_deg_up_to_60_deg_up_covered( static void dinghy_slide_track_60_deg_up_to_25_deg_up_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_SW_NE, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_NW_SE, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_NE_SW, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_SE_NW, SPR_DINGHY_SLIDE_60_DEG_TO_25_DEG_COVERED_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1421,20 +1421,20 @@ static void dinghy_slide_track_60_deg_up_to_25_deg_up_covered( static void dinghy_slide_track_25_deg_up_to_flat_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_SW_NE, SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_FRONT_SW_NE }, { SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_NW_SE, SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_FRONT_NW_SE }, { SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_NE_SW, SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_FRONT_NE_SW }, { SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_SE_NW, SPR_DINGHY_SLIDE_25_DEG_TO_FLAT_COVERED_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); imageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; @@ -1461,10 +1461,10 @@ static void dinghy_slide_track_25_deg_up_to_flat_covered( static void dinghy_slide_track_25_deg_down_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_25_deg_up_covered(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1472,10 +1472,10 @@ static void dinghy_slide_track_25_deg_down_covered( static void dinghy_slide_track_60_deg_down_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_60_deg_up_covered(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1483,10 +1483,10 @@ static void dinghy_slide_track_60_deg_down_covered( static void dinghy_slide_track_flat_to_25_deg_down_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_25_deg_up_to_flat_covered(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1494,10 +1494,10 @@ static void dinghy_slide_track_flat_to_25_deg_down_covered( static void dinghy_slide_track_25_deg_down_to_60_deg_down_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_60_deg_up_to_25_deg_up_covered(session, rideIndex, trackSequence, (direction + 2) & 3, height, @@ -1506,10 +1506,10 @@ static void dinghy_slide_track_25_deg_down_to_60_deg_down_covered( static void dinghy_slide_track_25_deg_down_to_flat_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_flat_to_25_deg_up_covered(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -1517,10 +1517,10 @@ static void dinghy_slide_track_25_deg_down_to_flat_covered( static void dinghy_slide_track_right_quarter_turn_5_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][5] = { @@ -1647,10 +1647,10 @@ static void dinghy_slide_track_right_quarter_turn_5_covered( static void dinghy_slide_track_left_quarter_turn_5_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; @@ -1659,13 +1659,13 @@ static void dinghy_slide_track_left_quarter_turn_5_covered( static void dinghy_slide_track_s_bend_left_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_DINGHY_SLIDE_S_BEND_COVERED_SW_SE_SW_SEQ_3, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NE_NW_NE_SEQ_0 }, { SPR_DINGHY_SLIDE_S_BEND_COVERED_SW_SE_SW_SEQ_2, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NE_NW_NE_SEQ_1 }, { SPR_DINGHY_SLIDE_S_BEND_COVERED_SW_SE_SW_SEQ_1, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NE_NW_NE_SEQ_2 }, @@ -1684,9 +1684,9 @@ static void dinghy_slide_track_s_bend_left_covered( { SPR_DINGHY_SLIDE_S_BEND_COVERED_NW_SW_NW_SEQ_0, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NW_SW_NW_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; switch (trackSequence) { @@ -1754,13 +1754,13 @@ static void dinghy_slide_track_s_bend_left_covered( static void dinghy_slide_track_s_bend_right_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_DINGHY_SLIDE_S_BEND_COVERED_SW_NW_SW_SEQ_3, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NE_SE_NE_SEQ_0 }, { SPR_DINGHY_SLIDE_S_BEND_COVERED_SW_NW_SW_SEQ_2, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NE_SE_NE_SEQ_1 }, { SPR_DINGHY_SLIDE_S_BEND_COVERED_SW_NW_SW_SEQ_1, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_NE_SE_NE_SEQ_2 }, @@ -1779,9 +1779,9 @@ static void dinghy_slide_track_s_bend_right_covered( { SPR_DINGHY_SLIDE_S_BEND_COVERED_SE_SW_SE_SEQ_0, SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_SE_SW_SE_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; switch (trackSequence) { @@ -1849,10 +1849,10 @@ static void dinghy_slide_track_s_bend_right_covered( static void dinghy_slide_track_right_quarter_turn_3_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { static constexpr const sprite_bb imageIds[4][3] = { @@ -1914,7 +1914,7 @@ static void dinghy_slide_track_right_quarter_turn_3_covered( break; } - sint32 blockedSegments = 0; + int32_t blockedSegments = 0; switch (trackSequence) { case 0: @@ -1934,10 +1934,10 @@ static void dinghy_slide_track_right_quarter_turn_3_covered( static void dinghy_slide_track_left_quarter_turn_3_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; @@ -1946,17 +1946,17 @@ static void dinghy_slide_track_left_quarter_turn_3_covered( static void dinghy_slide_track_60_deg_down_to_25_deg_down_covered( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { dinghy_slide_track_25_deg_up_to_60_deg_up_covered(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index 6434965ef9..0a475c5258 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -154,7 +154,7 @@ enum SPR_LOG_FLUME_3_TURN_NW_NE_NW_SEQ_0 = 21131, }; -static constexpr const uint32 LogFlumeTrackFlatImageIds[4][2] = { +static constexpr const uint32_t LogFlumeTrackFlatImageIds[4][2] = { { SPR_LOG_FLUME_FLAT_SW_NE, SPR_LOG_FLUME_FLAT_FRONT_SW_NE }, { SPR_LOG_FLUME_FLAT_NW_SE, SPR_LOG_FLUME_FLAT_FRONT_NW_SE }, { SPR_LOG_FLUME_FLAT_NE_SW, SPR_LOG_FLUME_FLAT_FRONT_NE_SW }, @@ -163,14 +163,14 @@ static constexpr const uint32 LogFlumeTrackFlatImageIds[4][2] = { static void paint_log_flume_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = LogFlumeTrackFlatImageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = LogFlumeTrackFlatImageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = LogFlumeTrackFlatImageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = LogFlumeTrackFlatImageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 26, height, 0, 27, height); @@ -188,13 +188,13 @@ static void paint_log_flume_track_flat( static void paint_log_flume_track_station( paint_session * session, - uint8 rideIndex, - [[maybe_unused]] uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + [[maybe_unused]] uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = LogFlumeTrackFlatImageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = LogFlumeTrackFlatImageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3); if (direction & 1) @@ -229,21 +229,21 @@ static void paint_log_flume_track_station( static void paint_log_flume_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_25_DEG_UP_SW_NE, SPR_LOG_FLUME_25_DEG_UP_FRONT_SW_NE }, { SPR_LOG_FLUME_25_DEG_UP_NW_SE, SPR_LOG_FLUME_25_DEG_UP_FRONT_NW_SE }, { SPR_LOG_FLUME_25_DEG_UP_NE_SW, SPR_LOG_FLUME_25_DEG_UP_FRONT_NE_SW }, { SPR_LOG_FLUME_25_DEG_UP_SE_NW, SPR_LOG_FLUME_25_DEG_UP_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 50, height, 0, 27, height); @@ -268,21 +268,21 @@ static void paint_log_flume_track_25_deg_up( static void paint_log_flume_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_SW_NE, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_SW_NE }, { SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_NW_SE, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_NW_SE }, { SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_NE_SW, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_NE_SW }, { SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_SE_NW, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 42, height, 0, 27, height); @@ -307,21 +307,21 @@ static void paint_log_flume_track_flat_to_25_deg_up( static void paint_log_flume_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_SW_NE, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_SW_NE }, { SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_NW_SE, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_NW_SE }, { SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_NE_SW, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_NE_SW }, { SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_SE_NW, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 34, height, 0, 27, height); @@ -346,21 +346,21 @@ static void paint_log_flume_track_25_deg_up_to_flat( static void paint_log_flume_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_25_DEG_DOWN_SW_NE, SPR_LOG_FLUME_25_DEG_UP_FRONT_NE_SW }, { SPR_LOG_FLUME_25_DEG_DOWN_NW_SE, SPR_LOG_FLUME_25_DEG_UP_FRONT_SE_NW }, { SPR_LOG_FLUME_25_DEG_DOWN_NE_SW, SPR_LOG_FLUME_25_DEG_UP_FRONT_SW_NE }, { SPR_LOG_FLUME_25_DEG_DOWN_SE_NW, SPR_LOG_FLUME_25_DEG_UP_FRONT_NW_SE }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 50, height, 0, 27, height); @@ -385,21 +385,21 @@ static void paint_log_flume_track_25_deg_down( static void paint_log_flume_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_FLAT_TO_25_DEG_DOWN_SW_NE, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_NE_SW }, { SPR_LOG_FLUME_FLAT_TO_25_DEG_DOWN_NW_SE, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_SE_NW }, { SPR_LOG_FLUME_FLAT_TO_25_DEG_DOWN_NE_SW, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_SW_NE }, { SPR_LOG_FLUME_FLAT_TO_25_DEG_DOWN_SE_NW, SPR_LOG_FLUME_25_DEG_UP_TO_FLAT_FRONT_NW_SE }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 34, height, 0, 27, height); @@ -424,21 +424,21 @@ static void paint_log_flume_track_flat_to_25_deg_down( static void paint_log_flume_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_25_DEG_DOWN_TO_FLAT_SW_NE, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_NE_SW }, { SPR_LOG_FLUME_25_DEG_DOWN_TO_FLAT_NW_SE, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_SE_NW }, { SPR_LOG_FLUME_25_DEG_DOWN_TO_FLAT_NE_SW, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_SW_NE }, { SPR_LOG_FLUME_25_DEG_DOWN_TO_FLAT_SE_NW, SPR_LOG_FLUME_FLAT_TO_25_DEG_UP_FRONT_NW_SE }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 42, height, 0, 27, height); @@ -463,13 +463,13 @@ static void paint_log_flume_track_25_deg_down_to_flat( static void paint_log_flume_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_LOG_FLUME_3_TURN_NE_NW_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_FRONT_NE_NW_NE_SEQ_0 }, { SPR_LOG_FLUME_3_TURN_NE_NW_NE_SEQ_1, SPR_LOG_FLUME_3_TURN_FRONT_NE_NW_NE_SEQ_1 }, { SPR_LOG_FLUME_3_TURN_NE_NW_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_FRONT_NE_NW_NE_SEQ_2 }, @@ -488,9 +488,9 @@ static void paint_log_flume_track_s_bend_left( { SPR_LOG_FLUME_3_TURN_SE_NE_SE_SEQ_3, SPR_LOG_FLUME_3_TURN_FRONT_NW_SW_NW_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; switch (trackSequence) { @@ -558,13 +558,13 @@ static void paint_log_flume_track_s_bend_left( static void paint_log_flume_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_LOG_FLUME_3_TURN_NE_SE_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_FRONT_NE_SE_NE_SEQ_0 }, { SPR_LOG_FLUME_3_TURN_NE_SE_NE_SEQ_1, SPR_LOG_FLUME_3_TURN_FRONT_NE_SE_NE_SEQ_1 }, { SPR_LOG_FLUME_3_TURN_NE_SE_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_FRONT_NE_SE_NE_SEQ_2 }, @@ -583,9 +583,9 @@ static void paint_log_flume_track_s_bend_right( { SPR_LOG_FLUME_3_TURN_NW_NE_NW_SEQ_3, SPR_LOG_FLUME_3_TURN_FRONT_SE_SW_SE_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; switch (trackSequence) { @@ -653,20 +653,20 @@ static void paint_log_flume_track_s_bend_right( static void paint_log_flume_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_LOG_FLUME_3_TURN_NW_SW_SEQ_0, SPR_LOG_FLUME_3_TURN_NW_SW_SEQ_2, SPR_LOG_FLUME_3_TURN_NW_SW_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_NE_NW_SEQ_0, SPR_LOG_FLUME_3_TURN_NE_NW_SEQ_2, SPR_LOG_FLUME_3_TURN_NE_NW_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_SE_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_SE_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_SE_NE_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_SW_SE_SEQ_0, SPR_LOG_FLUME_3_TURN_SW_SE_SEQ_2, SPR_LOG_FLUME_3_TURN_SW_SE_SEQ_3 }, }; - static constexpr const uint32 imageIdsFront[4][3] = { + static constexpr const uint32_t imageIdsFront[4][3] = { { SPR_LOG_FLUME_3_TURN_FRONT_SW_SE_SEQ_0, SPR_LOG_FLUME_3_TURN_FRONT_SW_SE_SEQ_2, SPR_LOG_FLUME_3_TURN_FRONT_SW_SE_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_FRONT_SE_SW_SEQ_0, SPR_LOG_FLUME_3_TURN_FRONT_SE_SW_SEQ_2, @@ -724,20 +724,20 @@ static void paint_log_flume_track_left_quarter_turn_3_tiles( static void paint_log_flume_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][3] = { + static constexpr const uint32_t imageIds[4][3] = { { SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_NW_NE_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_0, SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_2, SPR_LOG_FLUME_3_TURN_NE_SE_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_0, SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_2, SPR_LOG_FLUME_3_TURN_SE_SW_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_0, SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_2, SPR_LOG_FLUME_3_TURN_SW_NW_SEQ_3 } }; - static constexpr const uint32 imageIdsFront[4][3] = { + static constexpr const uint32_t imageIdsFront[4][3] = { { SPR_LOG_FLUME_3_TURN_FRONT_NW_NE_SEQ_0, SPR_LOG_FLUME_3_TURN_FRONT_NW_NE_SEQ_2, SPR_LOG_FLUME_3_TURN_FRONT_NW_NE_SEQ_3 }, { SPR_LOG_FLUME_3_TURN_FRONT_SW_SE_SEQ_0, SPR_LOG_FLUME_3_TURN_FRONT_SW_SE_SEQ_2, @@ -795,13 +795,13 @@ static void paint_log_flume_track_right_quarter_turn_3_tiles( static void paint_log_flume_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SPR_STATION_BASE_D | IMAGE_TYPE_REMAP; + uint32_t imageId = SPR_STATION_BASE_D | IMAGE_TYPE_REMAP; sub_98196C(session, imageId, 0, 0, 32, 32, 1, height); if (direction & 1) @@ -830,21 +830,21 @@ static void paint_log_flume_track_on_ride_photo( static void paint_log_flume_track_reverser( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][2] = { + static constexpr const uint32_t imageIds[4][2] = { { SPR_LOG_FLUME_REVERSER_SW_NE, SPR_LOG_FLUME_REVERSER_FRONT_SW_NE }, { SPR_LOG_FLUME_REVERSER_NW_SE, SPR_LOG_FLUME_REVERSER_FRONT_NW_SE }, { SPR_LOG_FLUME_REVERSER_NE_SW, SPR_LOG_FLUME_REVERSER_FRONT_NE_SW }, { SPR_LOG_FLUME_REVERSER_SE_NW, SPR_LOG_FLUME_REVERSER_FRONT_SE_NW }, }; - uint32 imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = imageIds[direction][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][1] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 26, height, 0, 27, height); @@ -857,7 +857,7 @@ static void paint_log_flume_track_reverser( paint_util_set_general_support_height(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/water/RiverRapids.cpp b/src/openrct2/ride/water/RiverRapids.cpp index 144a58b654..40adf09a0d 100644 --- a/src/openrct2/ride/water/RiverRapids.cpp +++ b/src/openrct2/ride/water/RiverRapids.cpp @@ -131,41 +131,41 @@ enum SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 = 21278, }; -static constexpr const uint32 river_rapids_track_pieces_25_deg_up[][2] = { +static constexpr const uint32_t river_rapids_track_pieces_25_deg_up[][2] = { { SPR_RIVER_RAPIDS_25_DEG_UP_SW_NE, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SW_NE }, { SPR_RIVER_RAPIDS_25_DEG_UP_NW_SE, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NW_SE }, { SPR_RIVER_RAPIDS_25_DEG_UP_NE_SW, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NE_SW }, { SPR_RIVER_RAPIDS_25_DEG_UP_SE_NW, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SE_NW }, }; -static constexpr const uint32 river_rapids_track_pieces_flat_to_25_deg_up[][2] = { +static constexpr const uint32_t river_rapids_track_pieces_flat_to_25_deg_up[][2] = { { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_SW_NE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_SW_NE }, { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_NW_SE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_NW_SE }, { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_NE_SW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_NE_SW }, { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_SE_NW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_SE_NW }, }; -static constexpr const uint32 river_rapids_track_pieces_25_deg_up_to_flat[][2] = { +static constexpr const uint32_t river_rapids_track_pieces_25_deg_up_to_flat[][2] = { { SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_SW_NE, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_SW_NE }, { SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_NW_SE, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_NW_SE }, { SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_NE_SW, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_NE_SW }, { SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_SE_NW, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_SE_NW }, }; -static constexpr const uint32 river_rapids_track_pieces_25_deg_down[][2] = { +static constexpr const uint32_t river_rapids_track_pieces_25_deg_down[][2] = { { SPR_RIVER_RAPIDS_25_DEG_DOWN_SW_NE, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SW_NE }, { SPR_RIVER_RAPIDS_25_DEG_DOWN_NW_SE, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NW_SE }, { SPR_RIVER_RAPIDS_25_DEG_DOWN_NE_SW, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NE_SW }, { SPR_RIVER_RAPIDS_25_DEG_DOWN_SE_NW, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SE_NW }, }; -static constexpr const uint32 river_rapids_track_pieces_flat_to_25_deg_down[][2] = { +static constexpr const uint32_t river_rapids_track_pieces_flat_to_25_deg_down[][2] = { { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_SW_NE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_SW_NE }, { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_NW_SE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_NW_SE }, { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_NE_SW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_NE_SW }, { SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_SE_NW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_SE_NW }, }; -static constexpr const uint32 river_rapids_track_pieces_25_deg_down_to_flat[][2] = { +static constexpr const uint32_t river_rapids_track_pieces_25_deg_down_to_flat[][2] = { { SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_SW_NE, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_SW_NE }, { SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_NW_SE, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_NW_SE }, { SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_NE_SW, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_NE_SW }, @@ -177,14 +177,14 @@ static constexpr const uint32 river_rapids_track_pieces_25_deg_down_to_flat[][2] * * rct2: 0x006D5889 */ -void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_river_rapids(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 image_id; - sint32 baseImage_id = imageDirection; - uint32 rotation = session->CurrentRotation; - sint32 ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31; - sint32 j = 0; + int32_t image_id; + int32_t baseImage_id = imageDirection; + uint32_t rotation = session->CurrentRotation; + int32_t ecx = ((vehicle->spin_sprite / 8) + (rotation * 8)) & 31; + int32_t j = 0; if (vehicle->vehicle_sprite_type == 0) { baseImage_id = ecx & 7; @@ -229,7 +229,7 @@ void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 image { // Draw peeps: (this particular vehicle doesn't sort them back to front like others so the back ones sometimes clip, but // that's how the original does it...) - sint32 peeps = ((ecx / 8) + 0) & 3; + int32_t peeps = ((ecx / 8) + 0) & 3; image_id = (baseImage_id + ((peeps + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); sub_98199C( @@ -270,13 +270,13 @@ void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 image /** rct2: 0x00757650 */ static void paint_river_rapids_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction & 1) { @@ -317,10 +317,10 @@ static void paint_river_rapids_track_flat( /** rct2: 0x007576C0 */ static void paint_river_rapids_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { Ride * ride = get_ride(rideIndex); @@ -330,9 +330,9 @@ static void paint_river_rapids_station( paint_util_set_general_support_height(session, height + 32, 0x20); } -static void paint_river_rapids_track_25_deg(paint_session * session, uint8 direction, sint32 height, const uint32 sprites[4][2]) +static void paint_river_rapids_track_25_deg(paint_session * session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) { - uint32 imageId; + uint32_t imageId; paint_struct * ps; switch (direction) @@ -388,10 +388,10 @@ static void paint_river_rapids_track_25_deg(paint_session * session, uint8 direc paint_util_set_general_support_height(session, height + 56, 0x20); } -static void paint_river_rapids_track_25_deg_to_flat_a(paint_session * session, uint8 direction, sint32 height, - const uint32 sprites[4][2]) +static void paint_river_rapids_track_25_deg_to_flat_a(paint_session * session, uint8_t direction, int32_t height, + const uint32_t sprites[4][2]) { - uint32 imageId; + uint32_t imageId; paint_struct * ps; switch (direction) @@ -447,10 +447,10 @@ static void paint_river_rapids_track_25_deg_to_flat_a(paint_session * session, u paint_util_set_general_support_height(session, height + 40, 0x20); } -static void paint_river_rapids_track_25_deg_to_flat_b(paint_session * session, uint8 direction, sint32 height, - const uint32 sprites[4][2]) +static void paint_river_rapids_track_25_deg_to_flat_b(paint_session * session, uint8_t direction, int32_t height, + const uint32_t sprites[4][2]) { - uint32 imageId; + uint32_t imageId; paint_struct * ps; switch (direction) @@ -509,10 +509,10 @@ static void paint_river_rapids_track_25_deg_to_flat_b(paint_session * session, u /** rct2: 0x00757660 */ static void paint_river_rapids_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_25_deg(session, direction, height, river_rapids_track_pieces_25_deg_up); @@ -521,10 +521,10 @@ static void paint_river_rapids_track_25_deg_up( /** rct2: 0x00757670 */ static void paint_river_rapids_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_25_deg_to_flat_b(session, direction, height, river_rapids_track_pieces_flat_to_25_deg_up); @@ -533,10 +533,10 @@ static void paint_river_rapids_track_flat_to_25_deg_up( /** rct2: 0x00757680 */ static void paint_river_rapids_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_25_deg_to_flat_a(session, direction, height, river_rapids_track_pieces_25_deg_up_to_flat); @@ -545,10 +545,10 @@ static void paint_river_rapids_track_25_deg_up_to_flat( /** rct2: 0x00757690 */ static void paint_river_rapids_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_25_deg(session, (direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down); @@ -557,10 +557,10 @@ static void paint_river_rapids_track_25_deg_down( /** rct2: 0x007576A0 */ static void paint_river_rapids_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_25_deg_to_flat_a(session, (direction + 2) % 4, height, @@ -570,10 +570,10 @@ static void paint_river_rapids_track_flat_to_25_deg_down( /** rct2: 0x007576B0 */ static void paint_river_rapids_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_25_deg_to_flat_b(session, (direction + 2) % 4, height, @@ -583,13 +583,13 @@ static void paint_river_rapids_track_25_deg_down_to_flat( /** rct2: 0x007576F0 */ static void paint_river_rapids_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { case 0: @@ -643,13 +643,13 @@ static void paint_river_rapids_track_left_quarter_turn_1_tile( /** rct2: 0x00757700 */ static void paint_river_rapids_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; switch (direction) { @@ -704,15 +704,15 @@ static void paint_river_rapids_track_right_quarter_turn_1_tile( /** rct2: 0x00757710 */ static void paint_river_rapids_track_waterfall( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; - uint16 frameNum = (gScenarioTicks / 2) & 7; + uint16_t frameNum = (gScenarioTicks / 2) & 7; if (direction & 1) { @@ -771,15 +771,15 @@ static void paint_river_rapids_track_waterfall( /** rct2: 0x00757720 */ static void paint_river_rapids_track_rapids( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; - uint16 frameNum = (gScenarioTicks / 2) & 7; + uint16_t frameNum = (gScenarioTicks / 2) & 7; if (direction & 1) { @@ -816,10 +816,10 @@ static void paint_river_rapids_track_rapids( /** rct2: 0x00757740 */ static void paint_river_rapids_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_river_rapids_track_flat(session, rideIndex, trackSequence, direction, height, tileElement); @@ -830,15 +830,15 @@ static void paint_river_rapids_track_on_ride_photo( /** rct2: 0x */ static void paint_river_rapids_track_whirlpool( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; - uint8 frameNum = (gScenarioTicks / 4) % 16; + uint8_t frameNum = (gScenarioTicks / 4) % 16; if (direction & 1) { @@ -885,7 +885,7 @@ static void paint_river_rapids_track_whirlpool( /** * rct2: 0x0075745C **/ -TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/water/SplashBoats.cpp b/src/openrct2/ride/water/SplashBoats.cpp index ea26a580d0..683bd9bbde 100644 --- a/src/openrct2/ride/water/SplashBoats.cpp +++ b/src/openrct2/ride/water/SplashBoats.cpp @@ -223,126 +223,126 @@ enum SPR_SPLASH_BOATS_S_BEND_TOP_NW_NE_NW_SEQ_0 = 20995, }; -static constexpr const uint32 SplashBoats25DegUpImageId[4] = { +static constexpr const uint32_t SplashBoats25DegUpImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_SE_NW, }; -static constexpr const uint32 SplashBoats25DegUpFrontImageId[4] = { +static constexpr const uint32_t SplashBoats25DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SE_NW, }; -static constexpr const uint32 SplashBoats60DegUpImageId[4] = { +static constexpr const uint32_t SplashBoats60DegUpImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_SE_NW, }; -static constexpr const uint32 SplashBoats60DegUpFrontImageId[4] = { +static constexpr const uint32_t SplashBoats60DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_FRONT_SE_NW, }; -static constexpr const uint32 SplashBoatsFlatTo25DegUpImageId[4] = { +static constexpr const uint32_t SplashBoatsFlatTo25DegUpImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_NW_SE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_SE_NW, }; -static constexpr const uint32 SplashBoatsFlatTo25DegUpFrontImageId[4] = { +static constexpr const uint32_t SplashBoatsFlatTo25DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SE_NW, }; -static constexpr const uint32 SplashBoats25DegUpToFlatImageId[4] = { +static constexpr const uint32_t SplashBoats25DegUpToFlatImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_SE_NW, }; -static constexpr const uint32 SplashBoats25DegUpToFlatFrontImageId[4] = { +static constexpr const uint32_t SplashBoats25DegUpToFlatFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SE_NW, }; -static constexpr const uint32 SplashBoats25DegUpTo60DegUpImageId[4] = { +static constexpr const uint32_t SplashBoats25DegUpTo60DegUpImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_SE_NW, }; -static constexpr const uint32 SplashBoats25DegUpTo60DegUpFrontImageId[4] = { +static constexpr const uint32_t SplashBoats25DegUpTo60DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_60_DEG_UP_FRONT_SE_NW, }; -static constexpr const uint32 SplashBoats60DegUpTo25DegUpImageId[4] = { +static constexpr const uint32_t SplashBoats60DegUpTo25DegUpImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_SE_NW, }; -static constexpr const uint32 SplashBoats60DegUpTo25DegUpFrontImageId[4] = { +static constexpr const uint32_t SplashBoats60DegUpTo25DegUpFrontImageId[4] = { SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_NW_SE, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_60_DEG_UP_TO_25_DEG_UP_FRONT_SE_NW, }; -static constexpr const uint32 SplashBoats25DegDownImageId[4] = { +static constexpr const uint32_t SplashBoats25DegDownImageId[4] = { SPR_SPLASH_BOATS_25_DEG_DOWN_SW_NE, SPR_SPLASH_BOATS_25_DEG_DOWN_NW_SE, SPR_SPLASH_BOATS_25_DEG_DOWN_NE_SW, SPR_SPLASH_BOATS_25_DEG_DOWN_SE_NW, }; -static constexpr const uint32 SplashBoats25DegDownFrontImageId[4] = { +static constexpr const uint32_t SplashBoats25DegDownFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SE_NW, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_FRONT_NW_SE, }; -static constexpr const uint32 SplashBoatsFlatTo25DegDownImageId[4] = { +static constexpr const uint32_t SplashBoatsFlatTo25DegDownImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_SW_NE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_NW_SE, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_DOWN_SE_NW, }; -static constexpr const uint32 SplashBoatsFlatTo25DegDownFrontImageId[4] = { +static constexpr const uint32_t SplashBoatsFlatTo25DegDownFrontImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NE_SW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SE_NW, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_TO_FLAT_FRONT_NW_SE, }; -static constexpr const uint32 SplashBoats25DegDownToFlatImageId[4] = { +static constexpr const uint32_t SplashBoats25DegDownToFlatImageId[4] = { SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_SW_NE, SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_NW_SE, SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_NE_SW, SPR_SPLASH_BOATS_25_DEG_DOWN_TO_FLAT_SE_NW, }; -static constexpr const uint32 SplashBoats25DegDownToFlatFrontImageId[4] = { +static constexpr const uint32_t SplashBoats25DegDownToFlatFrontImageId[4] = { SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_NE_SW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SE_NW, SPR_SPLASH_BOATS_FLAT_TO_25_DEG_UP_FRONT_SW_NE, @@ -475,14 +475,14 @@ static constexpr const sprite_bb RiverRaftsRightQuarterTurn5_Side[4][5] = { static void paint_splash_boats_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats25DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats25DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats25DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats25DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 50, height, 0, 27, height); @@ -504,14 +504,14 @@ static void paint_splash_boats_track_25_deg_up( static void paint_splash_boats_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats60DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats60DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats60DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats60DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; session->WoodenSupportsPrependTo = sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 98, height, 0, 27, height); @@ -533,14 +533,14 @@ static void paint_splash_boats_track_60_deg_up( static void paint_splash_boats_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoatsFlatTo25DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoatsFlatTo25DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoatsFlatTo25DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoatsFlatTo25DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 42, height, 0, 27, height); @@ -562,14 +562,14 @@ static void paint_splash_boats_track_flat_to_25_deg_up( static void paint_splash_boats_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats25DegUpToFlatImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats25DegUpToFlatFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats25DegUpToFlatImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats25DegUpToFlatFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 34, height, 0, 27, height); @@ -591,14 +591,14 @@ static void paint_splash_boats_track_25_deg_up_to_flat( static void paint_splash_boats_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats25DegUpTo60DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats25DegUpTo60DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats25DegUpTo60DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats25DegUpTo60DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; session->WoodenSupportsPrependTo = sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 66, height, 0, 27, height); @@ -620,14 +620,14 @@ static void paint_splash_boats_track_25_deg_up_to_60_deg_up( static void paint_splash_boats_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats60DegUpTo25DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats60DegUpTo25DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats60DegUpTo25DegUpImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats60DegUpTo25DegUpFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; session->WoodenSupportsPrependTo = sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 66, height, 0, 27, height); @@ -649,19 +649,19 @@ static void paint_splash_boats_track_60_deg_up_to_25_deg_up( static void paint_splash_boats_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats25DegDownImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats25DegDownFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats25DegDownImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats25DegDownFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 50, height, 0, 27, height); - static constexpr const uint8 specialSupport[] = { 11, 12, 9, 10 }; + static constexpr const uint8_t specialSupport[] = { 11, 12, 9, 10 }; wooden_a_supports_paint_setup(session, (direction & 1), specialSupport[direction], height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -679,10 +679,10 @@ static void paint_splash_boats_track_25_deg_down( static void paint_splash_boats_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_splash_boats_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -690,19 +690,19 @@ static void paint_splash_boats_track_60_deg_down( static void paint_splash_boats_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoatsFlatTo25DegDownImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoatsFlatTo25DegDownFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoatsFlatTo25DegDownImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoatsFlatTo25DegDownFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 34, height, 0, 27, height); - static constexpr const uint8 specialSupport[] = { 7, 8, 5, 6 }; + static constexpr const uint8_t specialSupport[] = { 7, 8, 5, 6 }; wooden_a_supports_paint_setup(session, (direction & 1), specialSupport[direction], height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -720,10 +720,10 @@ static void paint_splash_boats_track_flat_to_25_deg_down( static void paint_splash_boats_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_splash_boats_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -731,10 +731,10 @@ static void paint_splash_boats_track_25_deg_down_to_60_deg_down( static void paint_splash_boats_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { paint_splash_boats_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -742,19 +742,19 @@ static void paint_splash_boats_track_60_deg_down_to_25_deg_down( static void paint_splash_boats_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId = SplashBoats25DegDownToFlatImageId[direction] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = SplashBoats25DegDownToFlatFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t imageId = SplashBoats25DegDownToFlatImageId[direction] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = SplashBoats25DegDownToFlatFrontImageId[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C_rotated(session, direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height); sub_98197C_rotated(session, direction, frontImageId, 0, 0, 32, 1, 42, height, 0, 27, height); - static constexpr const uint8 specialSupport[] = { 3, 4, 1, 2 }; + static constexpr const uint8_t specialSupport[] = { 3, 4, 1, 2 }; wooden_a_supports_paint_setup(session, (direction & 1), specialSupport[direction], height, session->TrackColours[SCHEME_SUPPORTS], nullptr); @@ -784,13 +784,13 @@ static void paint_splash_boats_track_25_deg_down_to_flat( /** rct2: 0x0089B170 */ static void paint_splash_boats_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - uint32 imageId; + uint32_t imageId; if (direction & 1) { @@ -831,17 +831,17 @@ static void paint_splash_boats_track_flat( /** rct2: 0x0089B1A0 */ static void paint_splash_boats_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { Ride * ride = get_ride(rideIndex); if (direction & 1) { - uint32 imageId = (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW) | + uint32_t imageId = (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW) | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height + 3); @@ -850,7 +850,7 @@ static void paint_splash_boats_station( } else { - uint32 imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW) | + uint32_t imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW) | session->TrackColours[SCHEME_TRACK]; sub_98197C(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3); @@ -871,10 +871,10 @@ static void paint_splash_boats_station( /** rct2: 0x0089B1D0 */ static void paint_splash_boats_track_left_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_5_tiles_paint_2( @@ -884,13 +884,13 @@ static void paint_splash_boats_track_left_quarter_turn_5_tiles( if (trackSequence != 1 && trackSequence != 4) { - static constexpr const uint8 supportTypes[][7] = { + static constexpr const uint8_t supportTypes[][7] = { { 0, 0xFF, 5, 3, 0xFF, 5, 1 }, { 1, 0xFF, 2, 4, 0xFF, 2, 0 }, { 0, 0xFF, 3, 5, 0xFF, 3, 1 }, { 1, 0xFF, 4, 2, 0xFF, 4, 0 }, }; - uint8 supportType = supportTypes[direction][trackSequence]; + uint8_t supportType = supportTypes[direction][trackSequence]; wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } @@ -953,10 +953,10 @@ static void paint_splash_boats_track_left_quarter_turn_5_tiles( /** rct2: 0x0089B1D0 */ static void paint_splash_boats_track_right_quarter_turn_5_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_right_quarter_turn_5_tiles_paint_2( @@ -966,13 +966,13 @@ static void paint_splash_boats_track_right_quarter_turn_5_tiles( if (trackSequence != 1 && trackSequence != 4) { - static constexpr const uint8 supportTypes[][7] = { + static constexpr const uint8_t supportTypes[][7] = { { 0, 0xFF, 4, 2, 0xFF, 4, 1 }, { 1, 0xFF, 5, 3, 0xFF, 5, 0 }, { 0, 0xFF, 2, 4, 0xFF, 2, 1 }, { 1, 0xFF, 3, 5, 0xFF, 3, 0 }, }; - uint8 supportType = supportTypes[direction][trackSequence]; + uint8_t supportType = supportTypes[direction][trackSequence]; wooden_a_supports_paint_setup(session, supportType, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); } @@ -1035,13 +1035,13 @@ static void paint_splash_boats_track_right_quarter_turn_5_tiles( /** rct2: 0x0089B180 */ static void paint_splash_boats_track_s_bend_left( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_SPLASH_BOATS_S_BEND_TOP_NE_NW_NE_SEQ_0, SPR_SPLASH_BOATS_S_BEND_SIDE_NE_NW_NE_SEQ_0 }, { SPR_SPLASH_BOATS_S_BEND_TOP_NE_NW_NE_SEQ_1, SPR_SPLASH_BOATS_S_BEND_SIDE_NE_NW_NE_SEQ_1 }, { SPR_SPLASH_BOATS_S_BEND_TOP_NE_NW_NE_SEQ_2, SPR_SPLASH_BOATS_S_BEND_SIDE_NE_NW_NE_SEQ_2 }, @@ -1060,11 +1060,11 @@ static void paint_splash_boats_track_s_bend_left( { SPR_SPLASH_BOATS_S_BEND_TOP_SE_NE_SE_SEQ_3, SPR_SPLASH_BOATS_S_BEND_SIDE_NW_SW_NW_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; - static constexpr const sint32 supportTypes1[] = { 5, 2, 3, 4 }; - static constexpr const sint32 supportTypes2[] = { 3, 4, 5, 2 }; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; + static constexpr const int32_t supportTypes1[] = { 5, 2, 3, 4 }; + static constexpr const int32_t supportTypes2[] = { 3, 4, 5, 2 }; switch (trackSequence) { @@ -1129,13 +1129,13 @@ static void paint_splash_boats_track_s_bend_left( /** rct2: 0x0089B190 */ static void paint_splash_boats_track_s_bend_right( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { - static constexpr const uint32 imageIds[4][4][2] = { + static constexpr const uint32_t imageIds[4][4][2] = { { { SPR_SPLASH_BOATS_S_BEND_TOP_NE_SE_NE_SEQ_0, SPR_SPLASH_BOATS_S_BEND_SIDE_NE_SE_NE_SEQ_0 }, { SPR_SPLASH_BOATS_S_BEND_TOP_NE_SE_NE_SEQ_1, SPR_SPLASH_BOATS_S_BEND_SIDE_NE_SE_NE_SEQ_1 }, { SPR_SPLASH_BOATS_S_BEND_TOP_NE_SE_NE_SEQ_2, SPR_SPLASH_BOATS_S_BEND_SIDE_NE_SE_NE_SEQ_2 }, @@ -1154,11 +1154,11 @@ static void paint_splash_boats_track_s_bend_right( { SPR_SPLASH_BOATS_S_BEND_TOP_NW_NE_NW_SEQ_3, SPR_SPLASH_BOATS_S_BEND_SIDE_SE_SW_SE_SEQ_0 } }, }; - uint32 imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; - uint32 frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; - sint16 bboy; - static constexpr const sint32 supportTypes1[] = { 4, 5, 2, 3 }; - static constexpr const sint32 supportTypes2[] = { 2, 3, 4, 5 }; + uint32_t imageId = imageIds[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK]; + uint32_t frontImageId = imageIds[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK]; + int16_t bboy; + static constexpr const int32_t supportTypes1[] = { 4, 5, 2, 3 }; + static constexpr const int32_t supportTypes2[] = { 2, 3, 4, 5 }; switch (trackSequence) @@ -1223,10 +1223,10 @@ static void paint_splash_boats_track_s_bend_right( static void paint_splash_boats_track_on_ride_photo( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { switch (direction) @@ -1253,7 +1253,7 @@ static void paint_splash_boats_track_on_ride_photo( paint_util_set_general_support_height(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(int32_t trackType, int32_t direction) { switch (trackType) { @@ -1311,7 +1311,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(sint32 trackType, sin * * rct2: 0x006D4295 */ -void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->is_child) diff --git a/src/openrct2/ride/water/SubmarineRide.cpp b/src/openrct2/ride/water/SubmarineRide.cpp index 668a6da3d0..2793ff8073 100644 --- a/src/openrct2/ride/water/SubmarineRide.cpp +++ b/src/openrct2/ride/water/SubmarineRide.cpp @@ -20,11 +20,11 @@ * * rct2: 0x006D44D5 */ -void vehicle_visual_submarine(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, +void vehicle_visual_submarine(paint_session * session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { - sint32 baseImage_id = imageDirection; - sint32 image_id; + int32_t baseImage_id = imageDirection; + int32_t image_id; if (vehicle->restraints_position >= 64) { if ((vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_RESTRAINT_ANIMATION) && !(imageDirection & 3)) @@ -75,17 +75,17 @@ void vehicle_visual_submarine(paint_session * session, sint32 x, sint32 imageDir static void submarine_ride_paint_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; Ride * ride = get_ride(rideIndex); const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; - sint32 heightLower = height - 16; - uint32 imageId; + int32_t heightLower = height - 16; + uint32_t imageId; if (direction & 1) { @@ -112,15 +112,15 @@ static void submarine_ride_paint_track_station( static void submarine_ride_paint_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { LocationXY16 position = session->MapPosition; - sint32 heightLower = height - 16; - uint32 imageId; + int32_t heightLower = height - 16; + uint32_t imageId; if (direction & 1) { @@ -148,10 +148,10 @@ static void submarine_ride_paint_track_flat( static void submarine_ride_paint_track_left_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_3_tiles_paint( @@ -180,13 +180,13 @@ static void submarine_ride_paint_track_left_quarter_turn_3_tiles( paint_util_set_general_support_height(session, height + 16, 0x20); } -static constexpr const uint8 submarine_ride_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; +static constexpr const uint8_t submarine_ride_right_quarter_turn_3_tiles_to_left_turn_map[] = { 3, 1, 2, 0 }; static void submarine_ride_paint_track_right_quarter_turn_3_tiles( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = submarine_ride_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; @@ -196,10 +196,10 @@ static void submarine_ride_paint_track_right_quarter_turn_3_til static void submarine_ride_paint_track_left_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { track_paint_util_left_quarter_turn_1_tile_paint( @@ -214,10 +214,10 @@ static void submarine_ride_paint_track_left_quarter_turn_1_tile( static void submarine_ride_paint_track_right_quarter_turn_1_tile( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { submarine_ride_paint_track_left_quarter_turn_1_tile(session, rideIndex, trackSequence, (direction + 3) % 4, height, @@ -227,7 +227,7 @@ static void submarine_ride_paint_track_right_quarter_turn_1_tile( /** * rct2: 0x008995D4 */ -TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/ride/water/WaterCoaster.cpp b/src/openrct2/ride/water/WaterCoaster.cpp index b159874c01..e0beda29c0 100644 --- a/src/openrct2/ride/water/WaterCoaster.cpp +++ b/src/openrct2/ride/water/WaterCoaster.cpp @@ -14,10 +14,10 @@ static void water_rc_track_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -27,10 +27,10 @@ static void water_rc_track_flat( static void water_rc_track_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -40,10 +40,10 @@ static void water_rc_track_25_deg_up( static void water_rc_track_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -53,10 +53,10 @@ static void water_rc_track_flat_to_25_deg_up( static void water_rc_track_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -66,10 +66,10 @@ static void water_rc_track_25_deg_up_to_flat( static void water_rc_track_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -77,10 +77,10 @@ static void water_rc_track_25_deg_down( static void water_rc_track_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_25_deg_up_to_flat(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -88,10 +88,10 @@ static void water_rc_track_flat_to_25_deg_down( static void water_rc_track_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_flat_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) & 3, height, tileElement); @@ -99,10 +99,10 @@ static void water_rc_track_25_deg_down_to_flat( static void water_rc_track_diag_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -112,10 +112,10 @@ static void water_rc_track_diag_flat( static void water_rc_track_diag_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -125,10 +125,10 @@ static void water_rc_track_diag_25_deg_up( static void water_rc_track_diag_flat_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -138,10 +138,10 @@ static void water_rc_track_diag_flat_to_25_deg_up( static void water_rc_track_diag_25_deg_up_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -151,10 +151,10 @@ static void water_rc_track_diag_25_deg_up_to_flat( static void water_rc_track_diag_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -164,10 +164,10 @@ static void water_rc_track_diag_25_deg_down( static void water_rc_track_diag_flat_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -177,10 +177,10 @@ static void water_rc_track_diag_flat_to_25_deg_down( static void water_rc_track_diag_25_deg_down_to_flat( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { bool isChained = track_element_is_lift_hill(tileElement); @@ -190,10 +190,10 @@ static void water_rc_track_diag_25_deg_down_to_flat( static void water_rc_track_station( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_station(session, rideIndex, trackSequence, direction, height, tileElement, RIDE_TYPE_WATER_COASTER); @@ -201,10 +201,10 @@ static void water_rc_track_station( static void water_rc_track_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, JUNIOR_RC_CHAIN_NONE); @@ -212,10 +212,10 @@ static void water_rc_track_60_deg_up( static void water_rc_track_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -224,10 +224,10 @@ static void water_rc_track_25_deg_up_to_60_deg_up( static void water_rc_track_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -236,10 +236,10 @@ static void water_rc_track_60_deg_up_to_25_deg_up( static void water_rc_track_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_60_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -247,10 +247,10 @@ static void water_rc_track_60_deg_down( static void water_rc_track_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -258,10 +258,10 @@ static void water_rc_track_25_deg_down_to_60_deg_down( static void water_rc_track_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement); @@ -271,10 +271,10 @@ static void water_rc_track_60_deg_down_to_25_deg_down( static void water_rc_track_left_quarter_turn_5_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -283,24 +283,24 @@ static void water_rc_track_left_quarter_turn_5_tiles_25_deg_up( static void water_rc_track_right_quarter_turn_5_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, JUNIOR_RC_CHAIN_NONE); } -static constexpr const uint8 water_rc_left_quarter_turn_5_tiles_to_right_turn_map[] = { 6, 4, 5, 3, 1, 2, 0 }; +static constexpr const uint8_t water_rc_left_quarter_turn_5_tiles_to_right_turn_map[] = { 6, 4, 5, 3, 1, 2, 0 }; static void water_rc_track_left_quarter_turn_5_tiles_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_right_quarter_turn_5_tiles_25_deg_up(session, rideIndex, @@ -310,10 +310,10 @@ static void water_rc_track_left_quarter_turn_5_tiles_25_deg_down( static void water_rc_track_right_quarter_turn_5_tiles_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { water_rc_track_left_quarter_turn_5_tiles_25_deg_up(session, rideIndex, @@ -325,10 +325,10 @@ static void water_rc_track_right_quarter_turn_5_tiles_25_deg_down( static void water_rc_track_right_quarter_turn_3_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -337,24 +337,24 @@ static void water_rc_track_right_quarter_turn_3_tiles_25_deg_up( static void water_rc_track_right_quarter_turn_3_tiles_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, JUNIOR_RC_CHAIN_NONE); } -static constexpr const uint8 water_rc_left_quarter_turn_3_tiles_to_right_turn_map[] = { 3, 1, 2, 0 }; +static constexpr const uint8_t water_rc_left_quarter_turn_3_tiles_to_right_turn_map[] = { 3, 1, 2, 0 }; static void water_rc_track_left_quarter_turn_3_tiles_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = water_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; @@ -364,10 +364,10 @@ static void water_rc_track_left_quarter_turn_3_tiles_25_deg_up( static void water_rc_track_left_quarter_turn_3_tiles_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { trackSequence = water_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; @@ -377,10 +377,10 @@ static void water_rc_track_left_quarter_turn_3_tiles_25_deg_down( static void water_rc_track_diag_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_diag_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -389,10 +389,10 @@ static void water_rc_track_diag_60_deg_up( static void water_rc_track_diag_25_deg_up_to_60_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_diag_25_deg_up_to_60_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -401,10 +401,10 @@ static void water_rc_track_diag_25_deg_up_to_60_deg_up( static void water_rc_track_diag_60_deg_up_to_25_deg_up( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_diag_60_deg_up_to_25_deg_up(session, rideIndex, trackSequence, direction, height, tileElement, @@ -413,10 +413,10 @@ static void water_rc_track_diag_60_deg_up_to_25_deg_up( static void water_rc_track_diag_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_diag_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -425,10 +425,10 @@ static void water_rc_track_diag_60_deg_down( static void water_rc_track_diag_25_deg_down_to_60_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_diag_25_deg_down_to_60_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, @@ -437,17 +437,17 @@ static void water_rc_track_diag_25_deg_down_to_60_deg_down( static void water_rc_track_diag_60_deg_down_to_25_deg_down( paint_session * session, - uint8 rideIndex, - uint8 trackSequence, - uint8 direction, - sint32 height, + uint8_t rideIndex, + uint8_t trackSequence, + uint8_t direction, + int32_t height, const rct_tile_element * tileElement) { junior_rc_paint_track_diag_60_deg_down_to_25_deg_down(session, rideIndex, trackSequence, direction, height, tileElement, JUNIOR_RC_CHAIN_NONE); } -TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(sint32 trackType, sint32 direction) +TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(int32_t trackType, int32_t direction) { switch (trackType) { diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index a064e78185..c42215b3b6 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -63,25 +63,25 @@ char gScenarioCompletedBy[32]; char gScenarioSavePath[MAX_PATH]; char gScenarioExpansionPacks[3256]; bool gFirstTimeSaving = true; -uint16 gSavedAge; -uint32 gLastAutoSaveUpdate = 0; +uint16_t gSavedAge; +uint32_t gLastAutoSaveUpdate = 0; -uint32 gScenarioTicks; -uint32 gScenarioSrand0; -uint32 gScenarioSrand1; +uint32_t gScenarioTicks; +uint32_t gScenarioSrand0; +uint32_t gScenarioSrand1; -uint8 gScenarioObjectiveType; -uint8 gScenarioObjectiveYear; -uint16 gScenarioObjectiveNumGuests; +uint8_t gScenarioObjectiveType; +uint8_t gScenarioObjectiveYear; +uint16_t gScenarioObjectiveNumGuests; money32 gScenarioObjectiveCurrency; -uint16 gScenarioParkRatingWarningDays; +uint16_t gScenarioParkRatingWarningDays; money32 gScenarioCompletedCompanyValue; money32 gScenarioCompanyValueRecord; char gScenarioFileName[MAX_PATH]; -static sint32 scenario_create_ducks(); +static int32_t scenario_create_ducks(); static void scenario_objective_check(); using namespace OpenRCT2; @@ -246,17 +246,17 @@ void scenario_success_submit_name(const char *name) */ static void scenario_entrance_fee_too_high_check() { - uint16 x = 0, y = 0; + uint16_t x = 0, y = 0; money16 totalRideValueForMoney = gTotalRideValueForMoney; money16 max_fee = totalRideValueForMoney + (totalRideValueForMoney / 2); if ((gParkFlags & PARK_FLAGS_PARK_OPEN) && park_get_entrance_fee() > max_fee) { - for (sint32 i = 0; i < MAX_PARK_ENTRANCES && gParkEntrances[i].x != LOCATION_NULL; i++) { + for (int32_t i = 0; i < MAX_PARK_ENTRANCES && gParkEntrances[i].x != LOCATION_NULL; i++) { x = gParkEntrances[i].x + 16; y = gParkEntrances[i].y + 16; } - uint32 packed_xy = (y << 16) | x; + uint32_t packed_xy = (y << 16) | x; if (gConfigNotifications.park_warnings) { news_item_add_to_queue(NEWS_ITEM_BLANK, STR_ENTRANCE_FEE_TOO_HI, packed_xy); } @@ -268,7 +268,7 @@ void scenario_autosave_check() if (gLastAutoSaveUpdate == AUTOSAVE_PAUSE) return; // Milliseconds since last save - uint32 timeSinceSave = platform_get_ticks() - gLastAutoSaveUpdate; + uint32_t timeSinceSave = platform_get_ticks() - gLastAutoSaveUpdate; bool shouldSave = false; switch (gConfigGeneral.autosave_frequency) { @@ -314,7 +314,7 @@ static void scenario_day_update() } // Lower the casualty penalty - uint16 casualtyPenaltyModifier = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 40 : 7; + uint16_t casualtyPenaltyModifier = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 40 : 7; gParkRatingCasualtyPenalty = std::max(0, gParkRatingCasualtyPenalty - casualtyPenaltyModifier); auto intent = Intent(INTENT_ACTION_UPDATE_DATE); @@ -323,7 +323,7 @@ static void scenario_day_update() static void scenario_week_update() { - sint32 month = date_get_month(gDateMonthsElapsed); + int32_t month = date_get_month(gDateMonthsElapsed); finance_pay_wages(); finance_pay_research(); @@ -337,7 +337,7 @@ static void scenario_week_update() if (month <= MONTH_APRIL && water_type != nullptr && water_type->flags & WATER_FLAGS_ALLOW_DUCKS) { // 100 attempts at finding some water to create a few ducks at - for (sint32 i = 0; i < 100; i++) { + for (int32_t i = 0; i < 100; i++) { if (scenario_create_ducks()) break; } @@ -415,9 +415,9 @@ void scenario_update() * * rct2: 0x006744A9 */ -static sint32 scenario_create_ducks() +static int32_t scenario_create_ducks() { - sint32 i, j, r, c, x, y, waterZ, centreWaterZ, x2, y2; + int32_t i, j, r, c, x, y, waterZ, centreWaterZ, x2, y2; r = scenario_rand(); x = ((r >> 16) & 0xFFFF) & 0x7F; @@ -473,15 +473,15 @@ static sint32 scenario_create_ducks() * @return eax */ #ifndef DEBUG_DESYNC -uint32 scenario_rand() +uint32_t scenario_rand() #else static FILE *fp = nullptr; static const char *realm = "LC"; -uint32 dbg_scenario_rand(const char *file, const char *function, const uint32 line, const void *data) +uint32_t dbg_scenario_rand(const char *file, const char *function, const uint32_t line, const void *data) #endif { - uint32 originalSrand0 = gScenarioSrand0; + uint32_t originalSrand0 = gScenarioSrand0; gScenarioSrand0 += ror32(gScenarioSrand1 ^ 0x1234567F, 7); gScenarioSrand1 = ror32(originalSrand0, 3); @@ -520,7 +520,7 @@ uint32 dbg_scenario_rand(const char *file, const char *function, const uint32 li } #ifdef DEBUG_DESYNC -void dbg_report_desync(uint32 tick, uint32 srand0, uint32 server_srand0, const char *clientHash, const char *serverHash) +void dbg_report_desync(uint32_t tick, uint32_t srand0, uint32_t server_srand0, const char *clientHash, const char *serverHash) { if (fp == nullptr) { @@ -550,12 +550,12 @@ void dbg_report_desync(uint32 tick, uint32 srand0, uint32 server_srand0, const c } #endif -uint32 scenario_rand_max(uint32 max) +uint32_t scenario_rand_max(uint32_t max) { if (max < 2) return 0; if ((max & (max - 1)) == 0) return scenario_rand() & (max - 1); - uint32 rand, cap = ~((uint32)0) - (~((uint32)0) % max) - 1; + uint32_t rand, cap = ~((uint32_t)0) - (~((uint32_t)0) % max) - 1; do { rand = scenario_rand(); } while (rand > cap); @@ -568,10 +568,10 @@ uint32 scenario_rand_max(uint32 max) */ static bool scenario_prepare_rides_for_save() { - sint32 isFiveCoasterObjective = gScenarioObjectiveType == OBJECTIVE_FINISH_5_ROLLERCOASTERS; - sint32 i; + int32_t isFiveCoasterObjective = gScenarioObjectiveType == OBJECTIVE_FINISH_5_ROLLERCOASTERS; + int32_t i; Ride * ride; - uint8 rcs = 0; + uint8_t rcs = 0; FOR_ALL_RIDES(i, ride) { @@ -681,8 +681,8 @@ void scenario_fix_ghosts(rct_s6_data *s6) // Remove all ghost elements rct_tile_element *destinationElement = s6->tile_elements; - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { rct_tile_element *originalElement = map_get_first_element_at(x, y); do { if (originalElement->flags & TILE_ELEMENT_FLAG_GHOST) { @@ -711,7 +711,7 @@ void scenario_remove_trackless_rides(rct_s6_data *s6) { bool rideHasTrack[MAX_RIDES]; ride_all_has_any_track_elements(rideHasTrack); - for (sint32 i = 0; i < RCT12_MAX_RIDES_IN_PARK; i++) { + for (int32_t i = 0; i < RCT12_MAX_RIDES_IN_PARK; i++) { rct2_ride * ride = &s6->rides[i]; if (rideHasTrack[i] || ride->type == RIDE_TYPE_NULL) { @@ -728,11 +728,11 @@ void scenario_remove_trackless_rides(rct_s6_data *s6) static void scenario_objective_check_guests_by() { - uint8 objectiveYear = gScenarioObjectiveYear; - sint16 parkRating = gParkRating; - sint16 guestsInPark = gNumGuestsInPark; - sint16 objectiveGuests = gScenarioObjectiveNumGuests; - sint16 currentMonthYear = gDateMonthsElapsed; + uint8_t objectiveYear = gScenarioObjectiveYear; + int16_t parkRating = gParkRating; + int16_t guestsInPark = gNumGuestsInPark; + int16_t objectiveGuests = gScenarioObjectiveNumGuests; + int16_t currentMonthYear = gDateMonthsElapsed; if (currentMonthYear == MONTH_COUNT * objectiveYear || gConfigGeneral.allow_early_completion) { if (parkRating >= 600 && guestsInPark >= objectiveGuests) { @@ -746,8 +746,8 @@ static void scenario_objective_check_guests_by() static void scenario_objective_check_park_value_by() { - uint8 objectiveYear = gScenarioObjectiveYear; - sint16 currentMonthYear = gDateMonthsElapsed; + uint8_t objectiveYear = gScenarioObjectiveYear; + int16_t currentMonthYear = gDateMonthsElapsed; money32 objectiveParkValue = gScenarioObjectiveCurrency; money32 parkValue = gParkValue; @@ -768,14 +768,14 @@ static void scenario_objective_check_park_value_by() **/ static void scenario_objective_check_10_rollercoasters() { - sint32 i, rcs = 0; - uint8 type_already_counted[256]; + int32_t i, rcs = 0; + uint8_t type_already_counted[256]; Ride* ride; memset(type_already_counted, 0, 256); FOR_ALL_RIDES(i, ride) { - uint8 subtype_id = ride->subtype; + uint8_t subtype_id = ride->subtype; rct_ride_entry *rideEntry = get_ride_entry(subtype_id); if (rideEntry == nullptr) { continue; @@ -848,15 +848,15 @@ static void scenario_objective_check_monthly_ride_income() */ static void scenario_objective_check_10_rollercoasters_length() { - sint32 i, rcs = 0; - uint8 type_already_counted[256]; - sint16 objective_length = gScenarioObjectiveNumGuests; + int32_t i, rcs = 0; + uint8_t type_already_counted[256]; + int16_t objective_length = gScenarioObjectiveNumGuests; Ride* ride; memset(type_already_counted, 0, 256); FOR_ALL_RIDES(i, ride) { - uint8 subtype_id = ride->subtype; + uint8_t subtype_id = ride->subtype; rct_ride_entry *rideEntry = get_ride_entry(subtype_id); if (rideEntry == nullptr) { continue; @@ -882,9 +882,9 @@ static void scenario_objective_check_finish_5_rollercoasters() // Originally, this did not check for null rides, neither did it check if // the rides are even rollercoasters, never mind the right rollercoasters to be finished. - sint32 i; + int32_t i; Ride * ride; - sint32 rcs = 0; + int32_t rcs = 0; FOR_ALL_RIDES(i, ride) { const rct_ride_entry * rideEntry = get_ride_entry(ride->subtype); @@ -917,7 +917,7 @@ static void scenario_objective_check_replay_loan_and_park_value() static void scenario_objective_check_monthly_food_income() { money32 * lastMonthExpenditure = gExpenditureTable[1]; - sint32 lastMonthProfit = + int32_t lastMonthProfit = lastMonthExpenditure[RCT_EXPENDITURE_TYPE_SHOP_SHOP_SALES] + lastMonthExpenditure[RCT_EXPENDITURE_TYPE_SHOP_STOCK] + lastMonthExpenditure[RCT_EXPENDITURE_TYPE_FOODDRINK_SALES] + diff --git a/src/openrct2/scenario/Scenario.h b/src/openrct2/scenario/Scenario.h index 5a02676769..ff18bd5b04 100644 --- a/src/openrct2/scenario/Scenario.h +++ b/src/openrct2/scenario/Scenario.h @@ -31,12 +31,12 @@ struct ParkLoadResult; * size: 0x20 */ struct rct_s6_header { - uint8 type; // 0x00 - uint8 classic_flag; // 0x01 - uint16 num_packed_objects; // 0x02 - uint32 version; // 0x04 - uint32 magic_number; // 0x08 - uint8 pad_0C[0x14]; + uint8_t type; // 0x00 + uint8_t classic_flag; // 0x01 + uint16_t num_packed_objects; // 0x02 + uint32_t version; // 0x04 + uint32_t magic_number; // 0x08 + uint8_t pad_0C[0x14]; }; assert_struct_size(rct_s6_header, 0x20); @@ -45,13 +45,13 @@ assert_struct_size(rct_s6_header, 0x20); * size: 0x198 */ struct rct_s6_info { - uint8 editor_step; - uint8 category; // 0x01 - uint8 objective_type; // 0x02 - uint8 objective_arg_1; // 0x03 - sint32 objective_arg_2; // 0x04 - sint16 objective_arg_3; // 0x08 - uint8 pad_00A[0x3E]; + uint8_t editor_step; + uint8_t category; // 0x01 + uint8_t objective_type; // 0x02 + uint8_t objective_arg_1; // 0x03 + int32_t objective_arg_2; // 0x04 + int16_t objective_arg_3; // 0x08 + uint8_t pad_00A[0x3E]; char name[64]; // 0x48 char details[256]; // 0x88 rct_object_entry entry; // 0x188 @@ -73,7 +73,7 @@ struct rct_stex_entry { rct_string_id scenario_name; // 0x00 rct_string_id park_name; // 0x02 rct_string_id details; // 0x04 - uint8 var_06; + uint8_t var_06; }; assert_struct_size(rct_stex_entry, 7); @@ -92,90 +92,90 @@ struct rct_s6_data { rct_object_entry objects[OBJECT_ENTRY_COUNT]; // SC6[4] - uint16 elapsed_months; - uint16 current_day; - uint32 scenario_ticks; - uint32 scenario_srand_0; - uint32 scenario_srand_1; + uint16_t elapsed_months; + uint16_t current_day; + uint32_t scenario_ticks; + uint32_t scenario_srand_0; + uint32_t scenario_srand_1; // SC6[5] rct_tile_element tile_elements[RCT2_MAX_TILE_ELEMENTS]; // SC6[6] - uint32 next_free_tile_element_pointer_index; + uint32_t next_free_tile_element_pointer_index; rct_sprite sprites[RCT2_MAX_SPRITES]; - uint16 sprite_lists_head[6]; - uint16 sprite_lists_count[6]; + uint16_t sprite_lists_head[6]; + uint16_t sprite_lists_count[6]; rct_string_id park_name; - uint8 pad_013573D6[2]; - uint32 park_name_args; + uint8_t pad_013573D6[2]; + uint32_t park_name_args; money32 initial_cash; money32 current_loan; - uint32 park_flags; + uint32_t park_flags; money16 park_entrance_fee; - uint16 rct1_park_entrance_x; - uint16 rct1_park_entrance_y; - uint8 pad_013573EE[2]; - uint8 rct1_park_entrance_z; - uint8 pad_013573F1; + uint16_t rct1_park_entrance_x; + uint16_t rct1_park_entrance_y; + uint8_t pad_013573EE[2]; + uint8_t rct1_park_entrance_z; + uint8_t pad_013573F1; rct12_peep_spawn peep_spawns[RCT12_MAX_PEEP_SPAWNS]; - uint8 guest_count_change_modifier; - uint8 current_research_level; - uint8 pad_01357400[4]; - uint32 researched_ride_types[RCT2_MAX_RESEARCHED_RIDE_TYPE_QUADS]; - uint32 researched_ride_entries[RCT2_MAX_RESEARCHED_RIDE_ENTRY_QUADS]; - uint32 researched_track_types_a[128]; - uint32 researched_track_types_b[128]; + uint8_t guest_count_change_modifier; + uint8_t current_research_level; + uint8_t pad_01357400[4]; + uint32_t researched_ride_types[RCT2_MAX_RESEARCHED_RIDE_TYPE_QUADS]; + uint32_t researched_ride_entries[RCT2_MAX_RESEARCHED_RIDE_ENTRY_QUADS]; + uint32_t researched_track_types_a[128]; + uint32_t researched_track_types_b[128]; // SC6[7] - uint16 guests_in_park; - uint16 guests_heading_for_park; + uint16_t guests_in_park; + uint16_t guests_heading_for_park; // Ignored in scenario money32 expenditure_table[RCT12_EXPENDITURE_TABLE_MONTH_COUNT][RCT12_EXPENDITURE_TYPE_COUNT]; // SC6[8] - uint16 last_guests_in_park; - uint8 pad_01357BCA[3]; - uint8 handyman_colour; - uint8 mechanic_colour; - uint8 security_colour; + uint16_t last_guests_in_park; + uint8_t pad_01357BCA[3]; + uint8_t handyman_colour; + uint8_t mechanic_colour; + uint8_t security_colour; // Ignored in scenario - uint32 researched_scenery_items[RCT2_MAX_RESEARCHED_SCENERY_ITEM_QUADS]; + uint32_t researched_scenery_items[RCT2_MAX_RESEARCHED_SCENERY_ITEM_QUADS]; // SC6[9] - uint16 park_rating; + uint16_t park_rating; // Ignored in scenario - uint8 park_rating_history[32]; - uint8 guests_in_park_history[32]; + uint8_t park_rating_history[32]; + uint8_t guests_in_park_history[32]; // SC6[10] - uint8 active_research_types; - uint8 research_progress_stage; - uint32 last_researched_item_subject; - uint8 pad_01357CF8[1000]; - uint32 next_research_item; - uint16 research_progress; - uint8 next_research_category; - uint8 next_research_expected_day; - uint8 next_research_expected_month; - uint8 guest_initial_happiness; - uint16 park_size; - uint16 guest_generation_probability; - uint16 total_ride_value_for_money; + uint8_t active_research_types; + uint8_t research_progress_stage; + uint32_t last_researched_item_subject; + uint8_t pad_01357CF8[1000]; + uint32_t next_research_item; + uint16_t research_progress; + uint8_t next_research_category; + uint8_t next_research_expected_day; + uint8_t next_research_expected_month; + uint8_t guest_initial_happiness; + uint16_t park_size; + uint16_t guest_generation_probability; + uint16_t total_ride_value_for_money; money32 maximum_loan; money16 guest_initial_cash; - uint8 guest_initial_hunger; - uint8 guest_initial_thirst; - uint8 objective_type; - uint8 objective_year; - uint8 pad_013580FA[2]; + uint8_t guest_initial_hunger; + uint8_t guest_initial_thirst; + uint8_t objective_type; + uint8_t objective_year; + uint8_t pad_013580FA[2]; money32 objective_currency; - uint16 objective_guests; - uint8 campaign_weeks_left[20]; - uint8 campaign_ride_index[22]; + uint16_t objective_guests; + uint8_t campaign_weeks_left[20]; + uint8_t campaign_ride_index[22]; // Ignored in scenario money32 balance_history[RCT12_FINANCE_GRAPH_SIZE]; @@ -183,9 +183,9 @@ struct rct_s6_data { // SC6[11] money32 current_expenditure; money32 current_profit; - uint32 weekly_profit_average_dividend; - uint16 weekly_profit_average_divisor; - uint8 pad_0135833A[2]; + uint32_t weekly_profit_average_dividend; + uint16_t weekly_profit_average_divisor; + uint8_t pad_0135833A[2]; // Ignored in scenario money32 weekly_profit_history[RCT12_FINANCE_GRAPH_SIZE]; @@ -198,95 +198,95 @@ struct rct_s6_data { // SC6[13] money32 completed_company_value; - uint32 total_admissions; + uint32_t total_admissions; money32 income_from_admissions; money32 company_value; - uint8 peep_warning_throttle[16]; + uint8_t peep_warning_throttle[16]; rct12_award awards[RCT12_MAX_AWARDS]; money16 land_price; money16 construction_rights_price; - uint16 word_01358774; - uint8 pad_01358776[2]; - uint32 cd_key; - uint8 pad_0135877C[64]; - uint32 game_version_number; + uint16_t word_01358774; + uint8_t pad_01358776[2]; + uint32_t cd_key; + uint8_t pad_0135877C[64]; + uint32_t game_version_number; money32 completed_company_value_record; - uint32 loan_hash; - uint16 ride_count; - uint8 pad_013587CA[6]; + uint32_t loan_hash; + uint16_t ride_count; + uint8_t pad_013587CA[6]; money32 historical_profit; - uint8 pad_013587D4[4]; + uint8_t pad_013587D4[4]; char scenario_completed_name[32]; money32 cash; - uint8 pad_013587FC[50]; - uint16 park_rating_casualty_penalty; - uint16 map_size_units; - uint16 map_size_minus_2; - uint16 map_size; - uint16 map_max_xy; - uint32 same_price_throughout; - uint16 suggested_max_guests; - uint16 park_rating_warning_days; - uint8 last_entrance_style; - uint8 rct1_water_colour; - uint8 pad_01358842[2]; + uint8_t pad_013587FC[50]; + uint16_t park_rating_casualty_penalty; + uint16_t map_size_units; + uint16_t map_size_minus_2; + uint16_t map_size; + uint16_t map_max_xy; + uint32_t same_price_throughout; + uint16_t suggested_max_guests; + uint16_t park_rating_warning_days; + uint8_t last_entrance_style; + uint8_t rct1_water_colour; + uint8_t pad_01358842[2]; rct_research_item research_items[MAX_RESEARCH_ITEMS]; - uint16 map_base_z; + uint16_t map_base_z; char scenario_name[64]; char scenario_description[256]; - uint8 current_interest_rate; - uint8 pad_0135934B; - uint32 same_price_throughout_extended; - sint16 park_entrance_x[RCT12_MAX_PARK_ENTRANCES]; - sint16 park_entrance_y[RCT12_MAX_PARK_ENTRANCES]; - sint16 park_entrance_z[RCT12_MAX_PARK_ENTRANCES]; - uint8 park_entrance_direction[RCT12_MAX_PARK_ENTRANCES]; + uint8_t current_interest_rate; + uint8_t pad_0135934B; + uint32_t same_price_throughout_extended; + int16_t park_entrance_x[RCT12_MAX_PARK_ENTRANCES]; + int16_t park_entrance_y[RCT12_MAX_PARK_ENTRANCES]; + int16_t park_entrance_z[RCT12_MAX_PARK_ENTRANCES]; + uint8_t park_entrance_direction[RCT12_MAX_PARK_ENTRANCES]; char scenario_filename[256]; - uint8 saved_expansion_pack_names[3256]; + uint8_t saved_expansion_pack_names[3256]; rct_banner banners[RCT2_MAX_BANNERS_IN_PARK]; char custom_strings[RCT12_MAX_USER_STRINGS][RCT12_USER_STRING_MAX_LENGTH]; - uint32 game_ticks_1; + uint32_t game_ticks_1; rct2_ride rides[RCT12_MAX_RIDES_IN_PARK]; - uint16 saved_age; - uint16 saved_view_x; - uint16 saved_view_y; - uint8 saved_view_zoom; - uint8 saved_view_rotation; + uint16_t saved_age; + uint16_t saved_view_x; + uint16_t saved_view_y; + uint8_t saved_view_zoom; + uint8_t saved_view_rotation; rct_map_animation map_animations[RCT2_MAX_ANIMATED_OBJECTS]; - uint16 num_map_animations; - uint8 pad_0138B582[2]; + uint16_t num_map_animations; + uint8_t pad_0138B582[2]; rct_ride_rating_calc_data ride_ratings_calc_data; - uint8 pad_0138B5D0[60]; + uint8_t pad_0138B5D0[60]; rct_ride_measurement ride_measurements[8]; - uint32 next_guest_index; - uint16 grass_and_scenery_tilepos; - uint32 patrol_areas[(RCT2_MAX_STAFF + RCT12_STAFF_TYPE_COUNT) * RCT12_PATROL_AREA_SIZE]; - uint8 staff_modes[RCT2_MAX_STAFF + RCT12_STAFF_TYPE_COUNT]; - uint8 pad_13CA73E; - uint8 pad_13CA73F; - uint8 byte_13CA740; - uint8 pad_13CA741; - uint8 byte_13CA742[4]; // unused - uint8 climate; - uint8 pad_013CA747; - uint16 climate_update_timer; - uint8 current_weather; - uint8 next_weather; - uint8 temperature; - uint8 next_temperature; - uint8 current_weather_effect; - uint8 next_weather_effect; - uint8 current_weather_gloom; - uint8 next_weather_gloom; - uint8 current_rain_level; - uint8 next_rain_level; + uint32_t next_guest_index; + uint16_t grass_and_scenery_tilepos; + uint32_t patrol_areas[(RCT2_MAX_STAFF + RCT12_STAFF_TYPE_COUNT) * RCT12_PATROL_AREA_SIZE]; + uint8_t staff_modes[RCT2_MAX_STAFF + RCT12_STAFF_TYPE_COUNT]; + uint8_t pad_13CA73E; + uint8_t pad_13CA73F; + uint8_t byte_13CA740; + uint8_t pad_13CA741; + uint8_t byte_13CA742[4]; // unused + uint8_t climate; + uint8_t pad_013CA747; + uint16_t climate_update_timer; + uint8_t current_weather; + uint8_t next_weather; + uint8_t temperature; + uint8_t next_temperature; + uint8_t current_weather_effect; + uint8_t next_weather_effect; + uint8_t current_weather_gloom; + uint8_t next_weather_gloom; + uint8_t current_rain_level; + uint8_t next_rain_level; rct12_news_item news_items[RCT12_MAX_NEWS_ITEMS]; char rct1_scenario_name[62]; // Unused in RCT2 - uint16 rct1_scenario_slot_index; // Unused in RCT2 - uint32 rct1_scenario_flags; // Unused in RCT2 - uint16 wide_path_tile_loop_x; - uint16 wide_path_tile_loop_y; - uint8 pad_13CE778[434]; + uint16_t rct1_scenario_slot_index; // Unused in RCT2 + uint32_t rct1_scenario_flags; // Unused in RCT2 + uint16_t wide_path_tile_loop_x; + uint16_t wide_path_tile_loop_y; + uint8_t pad_13CE778[434]; }; assert_struct_size(rct_s6_data, 0x46b44a); #pragma pack(pop) @@ -353,16 +353,16 @@ enum { extern const rct_string_id ScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT]; -extern uint32 gScenarioTicks; -extern uint32 gScenarioSrand0; -extern uint32 gScenarioSrand1; +extern uint32_t gScenarioTicks; +extern uint32_t gScenarioSrand0; +extern uint32_t gScenarioSrand1; -extern uint8 gScenarioObjectiveType; -extern uint8 gScenarioObjectiveYear; -extern uint16 gScenarioObjectiveNumGuests; +extern uint8_t gScenarioObjectiveType; +extern uint8_t gScenarioObjectiveYear; +extern uint16_t gScenarioObjectiveNumGuests; extern money32 gScenarioObjectiveCurrency; -extern uint16 gScenarioParkRatingWarningDays; +extern uint16_t gScenarioParkRatingWarningDays; extern money32 gScenarioCompletedCompanyValue; extern money32 gScenarioCompanyValueRecord; @@ -373,8 +373,8 @@ extern char gScenarioCompletedBy[32]; extern char gScenarioSavePath[260]; extern char gScenarioExpansionPacks[3256]; extern bool gFirstTimeSaving; -extern uint16 gSavedAge; -extern uint32 gLastAutoSaveUpdate; +extern uint16_t gSavedAge; +extern uint32_t gLastAutoSaveUpdate; extern char gScenarioFileName[260]; @@ -383,18 +383,18 @@ void scenario_begin(); void scenario_update(); #ifdef DEBUG_DESYNC -uint32 dbg_scenario_rand(const char *file, const char *function, const uint32 line, const void *data); +uint32_t dbg_scenario_rand(const char *file, const char *function, const uint32_t line, const void *data); #define scenario_rand() dbg_scenario_rand(__FILE__, __FUNCTION__, __LINE__, NULL) #define scenario_rand_data(data) dbg_scenario_rand(__FILE__, __FUNCTION__, __LINE__, data) -void dbg_report_desync(uint32 tick, uint32 srand0, uint32 server_srand0, const char *clientHash, const char *serverHash); +void dbg_report_desync(uint32_t tick, uint32_t srand0, uint32_t server_srand0, const char *clientHash, const char *serverHash); #else -uint32 scenario_rand(); +uint32_t scenario_rand(); #endif -uint32 scenario_rand_max(uint32 max); +uint32_t scenario_rand_max(uint32_t max); bool scenario_prepare_for_save(); -sint32 scenario_save(const utf8 * path, sint32 flags); +int32_t scenario_save(const utf8 * path, int32_t flags); void scenario_remove_trackless_rides(rct_s6_data *s6); void scenario_fix_ghosts(rct_s6_data *s6); void scenario_failure(); diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index f064c0509e..eb23f04fdc 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -35,7 +35,7 @@ using namespace OpenRCT2; -static sint32 ScenarioCategoryCompare(sint32 categoryA, sint32 categoryB) +static int32_t ScenarioCategoryCompare(int32_t categoryA, int32_t categoryB) { if (categoryA == categoryB) return 0; if (categoryA == SCENARIO_CATEGORY_DLC) return -1; @@ -45,7 +45,7 @@ static sint32 ScenarioCategoryCompare(sint32 categoryA, sint32 categoryB) return Math::Sign(categoryA - categoryB); } -static sint32 scenario_index_entry_CompareByCategory(const scenario_index_entry &entryA, +static int32_t scenario_index_entry_CompareByCategory(const scenario_index_entry &entryA, const scenario_index_entry &entryB) { // Order by category @@ -68,7 +68,7 @@ static sint32 scenario_index_entry_CompareByCategory(const scenario_index_entry } } -static sint32 scenario_index_entry_CompareByIndex(const scenario_index_entry &entryA, +static int32_t scenario_index_entry_CompareByIndex(const scenario_index_entry &entryA, const scenario_index_entry &entryB) { // Order by source game @@ -78,7 +78,7 @@ static sint32 scenario_index_entry_CompareByIndex(const scenario_index_entry &en } // Then by index / category / name - uint8 sourceGame = entryA.source_game; + uint8_t sourceGame = entryA.source_game; switch (sourceGame) { default: if (entryA.source_index == -1 && entryB.source_index == -1) @@ -119,8 +119,8 @@ static void scenario_highscore_free(scenario_highscore_entry * highscore) class ScenarioFileIndex final : public FileIndex { private: - static constexpr uint32 MAGIC_NUMBER = 0x58444953; // SIDX - static constexpr uint16 VERSION = 3; + static constexpr uint32_t MAGIC_NUMBER = 0x58444953; // SIDX + static constexpr uint16_t VERSION = 3; static constexpr auto PATTERN = "*.sc4;*.sc6"; public: @@ -138,7 +138,7 @@ public: } protected: - std::tuple Create(sint32, const std::string &path) const override + std::tuple Create(int32_t, const std::string &path) const override { scenario_index_entry entry; auto timestamp = File::GetLastModified(path); @@ -177,17 +177,17 @@ protected: scenario_index_entry item; stream->Read(item.path, sizeof(item.path)); - item.timestamp = stream->ReadValue(); + item.timestamp = stream->ReadValue(); - item.category = stream->ReadValue(); - item.source_game = stream->ReadValue(); - item.source_index = stream->ReadValue(); - item.sc_id = stream->ReadValue(); + item.category = stream->ReadValue(); + item.source_game = stream->ReadValue(); + item.source_index = stream->ReadValue(); + item.sc_id = stream->ReadValue(); - item.objective_type = stream->ReadValue(); - item.objective_arg_1 = stream->ReadValue(); - item.objective_arg_2 = stream->ReadValue(); - item.objective_arg_3 = stream->ReadValue(); + item.objective_type = stream->ReadValue(); + item.objective_arg_1 = stream->ReadValue(); + item.objective_arg_2 = stream->ReadValue(); + item.objective_arg_3 = stream->ReadValue(); item.highscore = nullptr; stream->Read(item.internal_name, sizeof(item.internal_name)); @@ -201,7 +201,7 @@ private: /** * Reads basic information from a scenario file. */ - static bool GetScenarioInfo(const std::string &path, uint64 timestamp, scenario_index_entry * entry) + static bool GetScenarioInfo(const std::string &path, uint64_t timestamp, scenario_index_entry * entry) { log_verbose("GetScenarioInfo(%s, %d, ...)", path.c_str(), timestamp); try @@ -255,7 +255,7 @@ private: return false; } - static scenario_index_entry CreateNewScenarioEntry(const std::string &path, uint64 timestamp, rct_s6_info * s6Info) + static scenario_index_entry CreateNewScenarioEntry(const std::string &path, uint64_t timestamp, rct_s6_info * s6Info) { scenario_index_entry entry = {}; @@ -316,7 +316,7 @@ private: class ScenarioRepository final : public IScenarioRepository { private: - static constexpr uint32 HighscoreFileVersion = 1; + static constexpr uint32_t HighscoreFileVersion = 1; std::shared_ptr const _env; ScenarioFileIndex const _fileIndex; @@ -335,7 +335,7 @@ public: ClearHighscores(); } - void Scan(sint32 language) override + void Scan(int32_t language) override { ImportMegaPark(); @@ -411,7 +411,7 @@ public: return nullptr; } - bool TryRecordHighscore(sint32 language, const utf8 * scenarioFileName, money32 companyValue, const utf8 * name) override + bool TryRecordHighscore(int32_t language, const utf8 * scenarioFileName, money32 companyValue, const utf8 * name) override { // Scan the scenarios so we have a fresh list to query. This is to prevent the issue of scenario completions // not getting recorded, see #4951. @@ -566,7 +566,7 @@ private: try { auto fs = FileStream(path, FILE_MODE_OPEN); - uint32 fileVersion = fs.ReadValue(); + uint32_t fileVersion = fs.ReadValue(); if (fileVersion != 1) { Console::Error::WriteLine("Invalid or incompatible highscores file."); @@ -575,8 +575,8 @@ private: ClearHighscores(); - uint32 numHighscores = fs.ReadValue(); - for (uint32 i = 0; i < numHighscores; i++) + uint32_t numHighscores = fs.ReadValue(); + for (uint32_t i = 0; i < numHighscores; i++) { scenario_highscore_entry * highscore = InsertHighscore(); highscore->fileName = fs.ReadString(); @@ -622,7 +622,7 @@ private: // Load header auto header = fs.ReadValue(); - for (uint32 i = 0; i < header.ScenarioCount; i++) + for (uint32_t i = 0; i < header.ScenarioCount; i++) { // Read legacy entry auto scBasic = fs.ReadValue(); @@ -707,8 +707,8 @@ private: try { auto fs = FileStream(path, FILE_MODE_WRITE); - fs.WriteValue(HighscoreFileVersion); - fs.WriteValue((uint32)_highscores.size()); + fs.WriteValue(HighscoreFileVersion); + fs.WriteValue((uint32_t)_highscores.size()); for (size_t i = 0; i < _highscores.size(); i++) { const scenario_highscore_entry * highscore = _highscores[i]; diff --git a/src/openrct2/scenario/ScenarioRepository.h b/src/openrct2/scenario/ScenarioRepository.h index e3b542d274..d179512549 100644 --- a/src/openrct2/scenario/ScenarioRepository.h +++ b/src/openrct2/scenario/ScenarioRepository.h @@ -25,19 +25,19 @@ struct scenario_highscore_entry struct scenario_index_entry { utf8 path[MAX_PATH]; - uint64 timestamp; + uint64_t timestamp; // Category / sequence - uint8 category; - uint8 source_game; - sint16 source_index; - uint16 sc_id; + uint8_t category; + uint8_t source_game; + int16_t source_index; + uint16_t sc_id; // Objective - uint8 objective_type; - uint8 objective_arg_1; - sint32 objective_arg_2; - sint16 objective_arg_3; + uint8_t objective_type; + uint8_t objective_arg_1; + int32_t objective_arg_2; + int16_t objective_arg_3; scenario_highscore_entry * highscore; utf8 internal_name[64]; // Untranslated name @@ -57,7 +57,7 @@ interface IScenarioRepository /** * Scans the scenario directories and grabs the metadata for all the scenarios. */ - virtual void Scan(sint32 language) abstract; + virtual void Scan(int32_t language) abstract; virtual size_t GetCount() const abstract; virtual const scenario_index_entry * GetByIndex(size_t index) const abstract; @@ -68,7 +68,7 @@ interface IScenarioRepository virtual const scenario_index_entry * GetByInternalName(const utf8 * name) const abstract; virtual const scenario_index_entry * GetByPath(const utf8 * path) const abstract; - virtual bool TryRecordHighscore(sint32 language, const utf8 * scenarioFileName, money32 companyValue, const utf8 * name) abstract; + virtual bool TryRecordHighscore(int32_t language, const utf8 * scenarioFileName, money32 companyValue, const utf8 * name) abstract; }; std::unique_ptr CreateScenarioRepository(const std::shared_ptr& env); diff --git a/src/openrct2/scenario/ScenarioSources.cpp b/src/openrct2/scenario/ScenarioSources.cpp index 5a3e69932d..e4a87a93ba 100644 --- a/src/openrct2/scenario/ScenarioSources.cpp +++ b/src/openrct2/scenario/ScenarioSources.cpp @@ -24,9 +24,9 @@ namespace ScenarioSources struct ScenarioTitleDescriptor { - const uint8 Id; + const uint8_t Id; const utf8 * Title; - const uint8 Category; + const uint8_t Category; }; #pragma region Scenario Data @@ -322,7 +322,7 @@ namespace ScenarioSources { Guard::ArgumentNotNull(outDesc, GUARD_LINE); - sint32 currentIndex = 0; + int32_t currentIndex = 0; for (size_t i = 0; i < Util::CountOf(ScenarioTitlesBySource); i++) { for (size_t j = 0; j < ScenarioTitlesBySource[i].count; j++) @@ -332,7 +332,7 @@ namespace ScenarioSources { outDesc->title = desc->Title; outDesc->id = desc->Id; - outDesc->source = (uint8)i; + outDesc->source = (uint8_t)i; outDesc->index = currentIndex; outDesc->category = desc->Category; return true; @@ -349,11 +349,11 @@ namespace ScenarioSources return false; } - bool TryGetById(uint8 id, source_desc * outDesc) + bool TryGetById(uint8_t id, source_desc * outDesc) { Guard::ArgumentNotNull(outDesc, GUARD_LINE); - sint32 currentIndex = 0; + int32_t currentIndex = 0; for (size_t i = 0; i < Util::CountOf(ScenarioTitlesBySource); i++) { for (size_t j = 0; j < ScenarioTitlesBySource[i].count; j++) @@ -363,7 +363,7 @@ namespace ScenarioSources { outDesc->title = desc->Title; outDesc->id = desc->Id; - outDesc->source = (uint8)i; + outDesc->source = (uint8_t)i; outDesc->index = currentIndex; outDesc->category = desc->Category; return true; @@ -419,7 +419,7 @@ bool scenario_get_source_desc(const utf8 * name, source_desc * outDesc) return ScenarioSources::TryGetByName(name, outDesc); } -bool scenario_get_source_desc_by_id(uint8 id, source_desc * outDesc) +bool scenario_get_source_desc_by_id(uint8_t id, source_desc * outDesc) { return ScenarioSources::TryGetById(id, outDesc); } diff --git a/src/openrct2/scenario/ScenarioSources.h b/src/openrct2/scenario/ScenarioSources.h index e380088ca3..445077a379 100644 --- a/src/openrct2/scenario/ScenarioSources.h +++ b/src/openrct2/scenario/ScenarioSources.h @@ -14,21 +14,21 @@ struct source_desc { const utf8 * title; - uint8 id; - uint8 source; - sint32 index; - uint8 category; + uint8_t id; + uint8_t source; + int32_t index; + uint8_t category; }; namespace ScenarioSources { bool TryGetByName(const utf8 * name, source_desc * outDesc); - bool TryGetById(uint8 id, source_desc * outDesc); + bool TryGetById(uint8_t id, source_desc * outDesc); void NormaliseName(utf8 * buffer, size_t bufferSize, const utf8 * name); } bool scenario_get_source_desc(const utf8 *name, source_desc *outDesc); -bool scenario_get_source_desc_by_id(uint8 id, source_desc *outDesc); +bool scenario_get_source_desc_by_id(uint8_t id, source_desc *outDesc); void scenario_normalise_name(utf8 *buffer, size_t bufferSize, utf8 *name); diff --git a/src/openrct2/title/TitleScreen.cpp b/src/openrct2/title/TitleScreen.cpp index 035631374d..7cce3aedda 100644 --- a/src/openrct2/title/TitleScreen.cpp +++ b/src/openrct2/title/TitleScreen.cpp @@ -162,11 +162,11 @@ void TitleScreen::Update() TryLoadSequence(); _sequencePlayer->Update(); - sint32 numUpdates = 1; + int32_t numUpdates = 1; if (gGameSpeed > 1) { numUpdates = 1 << (gGameSpeed - 1); } - for (sint32 i = 0; i < numUpdates; i++) + for (int32_t i = 0; i < numUpdates; i++) { _gameState.UpdateLogic(); } @@ -232,7 +232,7 @@ void TitleScreen::TitleInitialise() seqId = 0; } } - ChangePresetSequence((sint32)seqId); + ChangePresetSequence((int32_t)seqId); } bool TitleScreen::TryLoadSequence(bool loadPreview) @@ -369,7 +369,7 @@ bool title_is_previewing_sequence() return false; } -void DrawOpenRCT2(rct_drawpixelinfo * dpi, sint32 x, sint32 y) +void DrawOpenRCT2(rct_drawpixelinfo * dpi, int32_t x, int32_t y) { utf8 buffer[256]; @@ -384,7 +384,7 @@ void DrawOpenRCT2(rct_drawpixelinfo * dpi, sint32 x, sint32 y) gfx_draw_string(dpi, buffer, COLOUR_BLACK, x + 5, y + 5 - 13); // Invalidate screen area - sint16 width = (sint16)gfx_get_string_width(buffer); + int16_t width = (int16_t)gfx_get_string_width(buffer); gfx_set_dirty_blocks(x, y, x + width, y + 30); // 30 is an arbitrary height to catch both strings // Write platform information diff --git a/src/openrct2/title/TitleScreen.h b/src/openrct2/title/TitleScreen.h index d1c43d31d3..afb2e04682 100644 --- a/src/openrct2/title/TitleScreen.h +++ b/src/openrct2/title/TitleScreen.h @@ -66,5 +66,5 @@ size_t title_get_current_sequence(); bool title_preview_sequence(size_t value); void title_stop_previewing_sequence(); bool title_is_previewing_sequence(); -void DrawOpenRCT2(rct_drawpixelinfo * dpi, sint32 x, sint32 y); +void DrawOpenRCT2(rct_drawpixelinfo * dpi, int32_t x, int32_t y); diff --git a/src/openrct2/title/TitleSequence.cpp b/src/openrct2/title/TitleSequence.cpp index eedfa11e29..6bfc486a5c 100644 --- a/src/openrct2/title/TitleSequence.cpp +++ b/src/openrct2/title/TitleSequence.cpp @@ -33,7 +33,7 @@ static std::vector GetSaves(const utf8 * path); static std::vector GetSaves(IZipArchive * zip); static std::vector LegacyScriptRead(utf8 * script, size_t scriptLength, std::vector saves); static void LegacyScriptGetLine(IStream * stream, char * parts); -static std::vector ReadScriptFile(const utf8 * path); +static std::vector ReadScriptFile(const utf8 * path); static std::string LegacyScriptWrite(TitleSequence * seq); TitleSequence * CreateTitleSequence() @@ -45,7 +45,7 @@ TitleSequence * CreateTitleSequence() TitleSequence * LoadTitleSequence(const utf8 * path) { - std::vector script; + std::vector script; std::vector saves; bool isZip; @@ -128,7 +128,7 @@ TitleSequenceParkHandle * TitleSequenceGetParkHandle(TitleSequence * seq, size_t if (zip != nullptr) { auto data = zip->GetFileData(filename); - auto dataForMs = Memory::Allocate(data.size()); + auto dataForMs = Memory::Allocate(data.size()); std::copy_n(data.data(), data.size(), dataForMs); auto ms = new MemoryStream(dataForMs, data.size(), MEMORY_ACCESS::READ | MEMORY_ACCESS::OWNER); @@ -183,7 +183,7 @@ bool TitleSequenceSave(TitleSequence * seq) auto script = LegacyScriptWrite(seq); if (seq->IsZip) { - auto fdata = std::vector(script.begin(), script.end()); + auto fdata = std::vector(script.begin(), script.end()); auto zip = Zip::Open(seq->Path, ZIP_ACCESS::WRITE); zip->SetFileData("script.txt", std::move(fdata)); } @@ -406,7 +406,7 @@ static std::vector LegacyScriptRead(utf8 * script, size_t scriptLe { if (String::Equals(part1, saves[i], true)) { - command.SaveIndex = (uint8)i; + command.SaveIndex = (uint8_t)i; break; } } @@ -482,19 +482,19 @@ static std::vector LegacyScriptRead(utf8 * script, size_t scriptLe static void LegacyScriptGetLine(IStream * stream, char * parts) { - for (sint32 i = 0; i < 3; i++) + for (int32_t i = 0; i < 3; i++) { parts[i * 128] = 0; } - sint32 part = 0; - sint32 cindex = 0; - sint32 whitespace = 1; - sint32 comment = 0; + int32_t part = 0; + int32_t cindex = 0; + int32_t whitespace = 1; + int32_t comment = 0; bool load = false; bool sprite = false; for (; part < 3;) { - sint32 c = 0; + int32_t c = 0; if (stream->TryRead(&c, 1) != 1) { c = EOF; @@ -545,9 +545,9 @@ static void LegacyScriptGetLine(IStream * stream, char * parts) } } -static std::vector ReadScriptFile(const utf8 * path) +static std::vector ReadScriptFile(const utf8 * path) { - std::vector result; + std::vector result; try { auto fs = FileStream(path, FILE_MODE_OPEN); diff --git a/src/openrct2/title/TitleSequence.h b/src/openrct2/title/TitleSequence.h index da6477eddb..1b689545c0 100644 --- a/src/openrct2/title/TitleSequence.h +++ b/src/openrct2/title/TitleSequence.h @@ -16,23 +16,23 @@ struct TitleCommand { - uint8 Type; + uint8_t Type; union { - uint8 SaveIndex; // LOAD (this index is internal only) + uint8_t SaveIndex; // LOAD (this index is internal only) struct // LOCATION { - uint8 X; - uint8 Y; + uint8_t X; + uint8_t Y; }; - uint8 Rotations; // ROTATE (counter-clockwise) - uint8 Zoom; // ZOOM + uint8_t Rotations; // ROTATE (counter-clockwise) + uint8_t Zoom; // ZOOM struct // FOLLOW { - uint16 SpriteIndex; + uint16_t SpriteIndex; utf8 SpriteName[USER_STRING_MAX_LENGTH]; }; - uint8 Speed; // SPEED - uint16 Milliseconds; // WAIT + uint8_t Speed; // SPEED + uint16_t Milliseconds; // WAIT utf8 Scenario[TITLE_COMMAND_SCENARIO_LENGTH]; // LOADSC }; }; @@ -77,7 +77,7 @@ enum TITLE_SCRIPT }; constexpr const utf8 * TITLE_SEQUENCE_EXTENSION = ".parkseq"; -constexpr uint8 SAVE_INDEX_INVALID = UINT8_MAX; +constexpr uint8_t SAVE_INDEX_INVALID = UINT8_MAX; TitleSequence * CreateTitleSequence(); TitleSequence * LoadTitleSequence(const utf8 * path); diff --git a/src/openrct2/title/TitleSequencePlayer.h b/src/openrct2/title/TitleSequencePlayer.h index b061b198b7..2af337b254 100644 --- a/src/openrct2/title/TitleSequencePlayer.h +++ b/src/openrct2/title/TitleSequencePlayer.h @@ -15,11 +15,11 @@ interface ITitleSequencePlayer { virtual ~ITitleSequencePlayer() = default; - virtual sint32 GetCurrentPosition() const abstract; + virtual int32_t GetCurrentPosition() const abstract; virtual bool Begin(size_t titleSequenceId) abstract; virtual void Reset() abstract; virtual bool Update() abstract; - virtual void Seek(sint32 position) abstract; + virtual void Seek(int32_t position) abstract; virtual void Eject() abstract; }; diff --git a/src/openrct2/ui/DummyUiContext.cpp b/src/openrct2/ui/DummyUiContext.cpp index 63bf99099f..5183bd05cb 100644 --- a/src/openrct2/ui/DummyUiContext.cpp +++ b/src/openrct2/ui/DummyUiContext.cpp @@ -31,9 +31,9 @@ namespace OpenRCT2::Ui void CloseWindow() override { } void RecreateWindow() override { } void * GetWindow() override { return nullptr; } - sint32 GetWidth() override { return 0; } - sint32 GetHeight() override { return 0; } - sint32 GetScaleQuality() override { return 0; } + int32_t GetWidth() override { return 0; } + int32_t GetHeight() override { return 0; } + int32_t GetScaleQuality() override { return 0; } void SetFullscreenMode(FULLSCREEN_MODE /*mode*/) override { } std::vector GetFullscreenResolutions() override { return std::vector(); } bool HasFocus() override { return false; } @@ -50,14 +50,14 @@ namespace OpenRCT2::Ui const CursorState * GetCursorState() override { return nullptr; } CURSOR_ID GetCursor() override { return CURSOR_ARROW; } void SetCursor(CURSOR_ID /*cursor*/) override { } - void SetCursorScale(uint8 /*scale*/) override { } + void SetCursorScale(uint8_t /*scale*/) override { } void SetCursorVisible(bool /*value*/) override { } - void GetCursorPosition(sint32 * /*x*/, sint32 * /*y*/) override { } - void SetCursorPosition(sint32 /*x*/, sint32 /*y*/) override { } + void GetCursorPosition(int32_t * /*x*/, int32_t * /*y*/) override { } + void SetCursorPosition(int32_t /*x*/, int32_t /*y*/) override { } void SetCursorTrap(bool /*value*/) override { } - const uint8 * GetKeysState() override { return nullptr; } - const uint8 * GetKeysPressed() override { return nullptr; } - void SetKeysPressed(uint32 /*keysym*/, uint8 /*scancode*/) override { } + const uint8_t * GetKeysState() override { return nullptr; } + const uint8_t * GetKeysPressed() override { return nullptr; } + void SetKeysPressed(uint32_t /*keysym*/, uint8_t /*scancode*/) override { } class X8DrawingEngineFactory final : public IDrawingEngineFactory { diff --git a/src/openrct2/ui/DummyWindowManager.cpp b/src/openrct2/ui/DummyWindowManager.cpp index e11946d89b..bd424b76b7 100644 --- a/src/openrct2/ui/DummyWindowManager.cpp +++ b/src/openrct2/ui/DummyWindowManager.cpp @@ -15,8 +15,8 @@ namespace OpenRCT2::Ui { void Init() override {}; rct_window * OpenWindow(rct_windowclass /*wc*/) override { return nullptr; } - rct_window * OpenView(uint8 /*view*/) override { return nullptr; } - rct_window * OpenDetails(uint8 /*type*/, sint32 /*id*/) override { return nullptr; } + rct_window * OpenView(uint8_t /*view*/) override { return nullptr; } + rct_window * OpenDetails(uint8_t /*type*/, int32_t /*id*/) override { return nullptr; } rct_window * ShowError(rct_string_id /*title*/, rct_string_id /*message*/) override { return nullptr; } rct_window * OpenIntent(Intent * /*intent*/) override { return nullptr; }; void BroadcastIntent(const Intent &/*intent*/) override { } @@ -24,8 +24,8 @@ namespace OpenRCT2::Ui void UpdateMapTooltip() override { } void HandleInput() override { } void HandleKeyboard(bool /*isTitle*/) override { } - std::string GetKeyboardShortcutString(sint32 /*shortcut*/) override { return std::string(); } - void SetMainView(sint32 x, sint32 y, sint32 zoom, sint32 rotation) override { } + std::string GetKeyboardShortcutString(int32_t /*shortcut*/) override { return std::string(); } + void SetMainView(int32_t x, int32_t y, int32_t zoom, int32_t rotation) override { } void UpdateMouseWheel() override { } rct_window* GetOwner(const rct_viewport* viewport) override { return nullptr; } }; diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 8d393bebc0..ea326b177b 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -25,7 +25,7 @@ namespace OpenRCT2 { interface IDrawingEngineFactory; interface IRainDrawer; - using DrawRainFunc = void(*)(OpenRCT2::Drawing::IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height); + using DrawRainFunc = void(*)(OpenRCT2::Drawing::IRainDrawer * rainDrawer, int32_t left, int32_t top, int32_t width, int32_t height); } // namespace Drawing namespace Ui @@ -41,8 +41,8 @@ namespace OpenRCT2 inline bool operator <(const Resolution& lhs, const Resolution& rhs) { - sint32 areaA = lhs.Width * lhs.Height; - sint32 areaB = rhs.Width * rhs.Height; + int32_t areaA = lhs.Width * lhs.Height; + int32_t areaB = rhs.Width * rhs.Height; if (areaA == areaB) { return lhs.Width < rhs.Width; @@ -97,9 +97,9 @@ namespace OpenRCT2 virtual void CloseWindow() abstract; virtual void RecreateWindow() abstract; virtual void * GetWindow() abstract; - virtual sint32 GetWidth() abstract; - virtual sint32 GetHeight() abstract; - virtual sint32 GetScaleQuality() abstract; + virtual int32_t GetWidth() abstract; + virtual int32_t GetHeight() abstract; + virtual int32_t GetScaleQuality() abstract; virtual void SetFullscreenMode(FULLSCREEN_MODE mode) abstract; virtual std::vector GetFullscreenResolutions() abstract; virtual bool HasFocus() abstract; @@ -116,14 +116,14 @@ namespace OpenRCT2 virtual const CursorState * GetCursorState() abstract; virtual CURSOR_ID GetCursor() abstract; virtual void SetCursor(CURSOR_ID cursor) abstract; - virtual void SetCursorScale(uint8 scale) abstract; + virtual void SetCursorScale(uint8_t scale) abstract; virtual void SetCursorVisible(bool value) abstract; - virtual void GetCursorPosition(sint32 * x, sint32 * y) abstract; - virtual void SetCursorPosition(sint32 x, sint32 y) abstract; + virtual void GetCursorPosition(int32_t * x, int32_t * y) abstract; + virtual void SetCursorPosition(int32_t x, int32_t y) abstract; virtual void SetCursorTrap(bool value) abstract; - virtual const uint8 * GetKeysState() abstract; - virtual const uint8 * GetKeysPressed() abstract; - virtual void SetKeysPressed(uint32 keysym, uint8 scancode) abstract; + virtual const uint8_t * GetKeysState() abstract; + virtual const uint8_t * GetKeysPressed() abstract; + virtual void SetKeysPressed(uint32_t keysym, uint8_t scancode) abstract; // Drawing virtual std::shared_ptr GetDrawingEngineFactory() abstract; diff --git a/src/openrct2/ui/WindowManager.h b/src/openrct2/ui/WindowManager.h index 567f6d02e3..500df1b445 100644 --- a/src/openrct2/ui/WindowManager.h +++ b/src/openrct2/ui/WindowManager.h @@ -25,8 +25,8 @@ namespace OpenRCT2::Ui virtual ~IWindowManager() = default; virtual void Init() abstract; virtual rct_window * OpenWindow(rct_windowclass wc) abstract; - virtual rct_window * OpenView(uint8 view) abstract; - virtual rct_window * OpenDetails(uint8 type, sint32 id) abstract; + virtual rct_window * OpenView(uint8_t view) abstract; + virtual rct_window * OpenDetails(uint8_t type, int32_t id) abstract; virtual rct_window * OpenIntent(Intent * intent) abstract; virtual void BroadcastIntent(const Intent &intent) abstract; virtual rct_window * ShowError(rct_string_id title, rct_string_id message) abstract; @@ -34,8 +34,8 @@ namespace OpenRCT2::Ui virtual void UpdateMapTooltip() abstract; virtual void HandleInput() abstract; virtual void HandleKeyboard(bool isTitle) abstract; - virtual std::string GetKeyboardShortcutString(sint32 shortcut) abstract; - virtual void SetMainView(sint32 x, sint32 y, sint32 zoom, sint32 rotation) abstract; + virtual std::string GetKeyboardShortcutString(int32_t shortcut) abstract; + virtual void SetMainView(int32_t x, int32_t y, int32_t zoom, int32_t rotation) abstract; virtual void UpdateMouseWheel() abstract; virtual rct_window* GetOwner(const rct_viewport* viewport) abstract; }; diff --git a/src/openrct2/util/SawyerCoding.cpp b/src/openrct2/util/SawyerCoding.cpp index 8ad1a8f8c1..0166a348a9 100644 --- a/src/openrct2/util/SawyerCoding.cpp +++ b/src/openrct2/util/SawyerCoding.cpp @@ -15,19 +15,19 @@ #include "SawyerCoding.h" #include "Util.h" -static size_t decode_chunk_rle(const uint8* src_buffer, uint8* dst_buffer, size_t length); -static size_t decode_chunk_rle_with_size(const uint8* src_buffer, uint8* dst_buffer, size_t length, size_t dstSize); +static size_t decode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); +static size_t decode_chunk_rle_with_size(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length, size_t dstSize); -static size_t encode_chunk_rle(const uint8 *src_buffer, uint8 *dst_buffer, size_t length); -static size_t encode_chunk_repeat(const uint8 *src_buffer, uint8 *dst_buffer, size_t length); -static void encode_chunk_rotate(uint8 *buffer, size_t length); +static size_t encode_chunk_rle(const uint8_t *src_buffer, uint8_t *dst_buffer, size_t length); +static size_t encode_chunk_repeat(const uint8_t *src_buffer, uint8_t *dst_buffer, size_t length); +static void encode_chunk_rotate(uint8_t *buffer, size_t length); bool gUseRLE = true; -uint32 sawyercoding_calculate_checksum(const uint8* buffer, size_t length) +uint32_t sawyercoding_calculate_checksum(const uint8_t* buffer, size_t length) { size_t i; - uint32 checksum = 0; + uint32_t checksum = 0; for (i = 0; i < length; i++) checksum += buffer[i]; @@ -39,8 +39,8 @@ uint32 sawyercoding_calculate_checksum(const uint8* buffer, size_t length) * rct2: 0x006762E1 * */ -size_t sawyercoding_write_chunk_buffer(uint8 *dst_file, const uint8* buffer, sawyercoding_chunk_header chunkHeader) { - uint8 *encode_buffer, *encode_buffer2; +size_t sawyercoding_write_chunk_buffer(uint8_t *dst_file, const uint8_t* buffer, sawyercoding_chunk_header chunkHeader) { + uint8_t *encode_buffer, *encode_buffer2; if (gUseRLE == false) { if (chunkHeader.encoding == CHUNK_ENCODING_RLE || chunkHeader.encoding == CHUNK_ENCODING_RLECOMPRESSED) { @@ -56,8 +56,8 @@ size_t sawyercoding_write_chunk_buffer(uint8 *dst_file, const uint8* buffer, saw //fwrite(buffer, 1, chunkHeader.length, file); break; case CHUNK_ENCODING_RLE: - encode_buffer = (uint8 *)malloc(0x600000); - chunkHeader.length = (uint32)encode_chunk_rle(buffer, encode_buffer, chunkHeader.length); + encode_buffer = (uint8_t *)malloc(0x600000); + chunkHeader.length = (uint32_t)encode_chunk_rle(buffer, encode_buffer, chunkHeader.length); memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); dst_file += sizeof(sawyercoding_chunk_header); memcpy(dst_file, encode_buffer, chunkHeader.length); @@ -65,10 +65,10 @@ size_t sawyercoding_write_chunk_buffer(uint8 *dst_file, const uint8* buffer, saw free(encode_buffer); break; case CHUNK_ENCODING_RLECOMPRESSED: - encode_buffer = (uint8 *)malloc(chunkHeader.length * 2); - encode_buffer2 = (uint8 *)malloc(0x600000); - chunkHeader.length = (uint32)encode_chunk_repeat(buffer, encode_buffer, chunkHeader.length); - chunkHeader.length = (uint32)encode_chunk_rle(encode_buffer, encode_buffer2, chunkHeader.length); + encode_buffer = (uint8_t *)malloc(chunkHeader.length * 2); + encode_buffer2 = (uint8_t *)malloc(0x600000); + chunkHeader.length = (uint32_t)encode_chunk_repeat(buffer, encode_buffer, chunkHeader.length); + chunkHeader.length = (uint32_t)encode_chunk_rle(encode_buffer, encode_buffer2, chunkHeader.length); memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); dst_file += sizeof(sawyercoding_chunk_header); memcpy(dst_file, encode_buffer2, chunkHeader.length); @@ -77,7 +77,7 @@ size_t sawyercoding_write_chunk_buffer(uint8 *dst_file, const uint8* buffer, saw free(encode_buffer); break; case CHUNK_ENCODING_ROTATE: - encode_buffer = (uint8 *)malloc(chunkHeader.length); + encode_buffer = (uint8_t *)malloc(chunkHeader.length); memcpy(encode_buffer, buffer, chunkHeader.length); encode_chunk_rotate(encode_buffer, chunkHeader.length); memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); @@ -91,14 +91,14 @@ size_t sawyercoding_write_chunk_buffer(uint8 *dst_file, const uint8* buffer, saw return chunkHeader.length + sizeof(sawyercoding_chunk_header); } -size_t sawyercoding_decode_sv4(const uint8 *src, uint8 *dst, size_t length, size_t bufferLength) +size_t sawyercoding_decode_sv4(const uint8_t *src, uint8_t *dst, size_t length, size_t bufferLength) { // (0 to length - 4): RLE chunk // (length - 4 to length): checksum return decode_chunk_rle_with_size(src, dst, length - 4, bufferLength); } -size_t sawyercoding_decode_sc4(const uint8 *src, uint8 *dst, size_t length, size_t bufferLength) +size_t sawyercoding_decode_sc4(const uint8_t *src, uint8_t *dst, size_t length, size_t bufferLength) { // Uncompress size_t decodedLength = decode_chunk_rle_with_size(src, dst, length - 4, bufferLength); @@ -110,56 +110,56 @@ size_t sawyercoding_decode_sc4(const uint8 *src, uint8 *dst, size_t length, size for (size_t i = 0x60018; i <= std::min(decodedLength - 1, (size_t)0x1F8350); i += 4) { dst[i + 1] = ror8(dst[i + 1], 3); - uint32 *code = (uint32*)&dst[i]; + uint32_t *code = (uint32_t*)&dst[i]; *code = rol32(*code, 9); } return decodedLength; } -size_t sawyercoding_encode_sv4(const uint8 *src, uint8 *dst, size_t length) +size_t sawyercoding_encode_sv4(const uint8_t *src, uint8_t *dst, size_t length) { size_t encodedLength; - uint32 checksum; + uint32_t checksum; // Encode encodedLength = encode_chunk_rle(src, dst, length); // Append checksum checksum = sawyercoding_calculate_checksum(dst, encodedLength); - *((uint32*)&dst[encodedLength]) = checksum; + *((uint32_t*)&dst[encodedLength]) = checksum; return encodedLength + 4; } -size_t sawyercoding_decode_td6(const uint8 *src, uint8 *dst, size_t length) +size_t sawyercoding_decode_td6(const uint8_t *src, uint8_t *dst, size_t length) { return decode_chunk_rle(src, dst, length - 4); } -size_t sawyercoding_encode_td6(const uint8* src, uint8* dst, size_t length){ +size_t sawyercoding_encode_td6(const uint8_t* src, uint8_t* dst, size_t length){ size_t output_length = encode_chunk_rle(src, dst, length); - uint32 checksum = 0; + uint32_t checksum = 0; for (size_t i = 0; i < output_length; i++){ - uint8 new_byte = ((checksum & 0xFF) + dst[i]) & 0xFF; + uint8_t new_byte = ((checksum & 0xFF) + dst[i]) & 0xFF; checksum = (checksum & 0xFFFFFF00) + new_byte; checksum = rol32(checksum, 3); } checksum -= 0x1D4C1; - *((uint32*)&dst[output_length]) = checksum; + *((uint32_t*)&dst[output_length]) = checksum; output_length += 4; return output_length; } /* Based off of rct2: 0x006770C1 */ -sint32 sawyercoding_validate_track_checksum(const uint8* src, size_t length){ - uint32 file_checksum = *((uint32*)&src[length - 4]); +int32_t sawyercoding_validate_track_checksum(const uint8_t* src, size_t length){ + uint32_t file_checksum = *((uint32_t*)&src[length - 4]); - uint32 checksum = 0; + uint32_t checksum = 0; for (size_t i = 0; i < length - 4; i++){ - uint8 new_byte = ((checksum & 0xFF) + src[i]) & 0xFF; + uint8_t new_byte = ((checksum & 0xFF) + src[i]) & 0xFF; checksum = (checksum & 0xFFFFFF00) + new_byte; checksum = rol32(checksum, 3); } @@ -180,10 +180,10 @@ sint32 sawyercoding_validate_track_checksum(const uint8* src, size_t length){ * * rct2: 0x0067693A */ -static size_t decode_chunk_rle(const uint8* src_buffer, uint8* dst_buffer, size_t length) +static size_t decode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) { size_t count; - uint8 *dst, rleCodeByte; + uint8_t *dst, rleCodeByte; dst = dst_buffer; @@ -193,10 +193,10 @@ static size_t decode_chunk_rle(const uint8* src_buffer, uint8* dst_buffer, size_ i++; count = 257 - rleCodeByte; memset(dst, src_buffer[i], count); - dst = (uint8*)((uintptr_t)dst + count); + dst = (uint8_t*)((uintptr_t)dst + count); } else { memcpy(dst, src_buffer + i + 1, rleCodeByte + 1); - dst = (uint8*)((uintptr_t)dst + rleCodeByte + 1); + dst = (uint8_t*)((uintptr_t)dst + rleCodeByte + 1); i += rleCodeByte + 1; } } @@ -209,10 +209,10 @@ static size_t decode_chunk_rle(const uint8* src_buffer, uint8* dst_buffer, size_ * * rct2: 0x0067693A */ -static size_t decode_chunk_rle_with_size(const uint8* src_buffer, uint8* dst_buffer, size_t length, size_t dstSize) +static size_t decode_chunk_rle_with_size(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length, size_t dstSize) { size_t count; - uint8 *dst, rleCodeByte; + uint8_t *dst, rleCodeByte; dst = dst_buffer; @@ -226,12 +226,12 @@ static size_t decode_chunk_rle_with_size(const uint8* src_buffer, uint8* dst_buf assert(dst + count <= dst_buffer + dstSize); assert(i < length); memset(dst, src_buffer[i], count); - dst = (uint8*)((uintptr_t)dst + count); + dst = (uint8_t*)((uintptr_t)dst + count); } else { assert(dst + rleCodeByte + 1 <= dst_buffer + dstSize); assert(i + 1 < length); memcpy(dst, src_buffer + i + 1, rleCodeByte + 1); - dst = (uint8*)((uintptr_t)dst + rleCodeByte + 1); + dst = (uint8_t*)((uintptr_t)dst + rleCodeByte + 1); i += rleCodeByte + 1; } } @@ -248,13 +248,13 @@ static size_t decode_chunk_rle_with_size(const uint8* src_buffer, uint8* dst_buf * Ensure dst_buffer is bigger than src_buffer then resize afterwards * returns length of dst_buffer */ -static size_t encode_chunk_rle(const uint8 *src_buffer, uint8 *dst_buffer, size_t length) +static size_t encode_chunk_rle(const uint8_t *src_buffer, uint8_t *dst_buffer, size_t length) { - const uint8* src = src_buffer; - uint8* dst = dst_buffer; - const uint8* end_src = src + length; - uint8 count = 0; - const uint8* src_norm_start = src; + const uint8_t* src = src_buffer; + uint8_t* dst = dst_buffer; + const uint8_t* end_src = src + length; + uint8_t count = 0; + const uint8_t* src_norm_start = src; while (src < end_src - 1){ @@ -289,7 +289,7 @@ static size_t encode_chunk_rle(const uint8 *src_buffer, uint8 *dst_buffer, size_ return dst - dst_buffer; } -static size_t encode_chunk_repeat(const uint8 *src_buffer, uint8 *dst_buffer, size_t length) +static size_t encode_chunk_repeat(const uint8_t *src_buffer, uint8_t *dst_buffer, size_t length) { if (length == 0) return 0; @@ -337,7 +337,7 @@ static size_t encode_chunk_repeat(const uint8 *src_buffer, uint8 *dst_buffer, si outLength += 2; i++; } else { - *dst_buffer++ = (uint8)((bestRepeatCount - 1) | ((32 - (i - bestRepeatIndex)) << 3)); + *dst_buffer++ = (uint8_t)((bestRepeatCount - 1) | ((32 - (i - bestRepeatIndex)) << 3)); outLength++; i += bestRepeatCount; } @@ -346,10 +346,10 @@ static size_t encode_chunk_repeat(const uint8 *src_buffer, uint8 *dst_buffer, si return outLength; } -static void encode_chunk_rotate(uint8 *buffer, size_t length) +static void encode_chunk_rotate(uint8_t *buffer, size_t length) { size_t i; - uint8 code = 1; + uint8_t code = 1; for (i = 0; i < length; i++) { buffer[i] = rol8(buffer[i], code); code = (code + 2) % 8; @@ -358,25 +358,25 @@ static void encode_chunk_rotate(uint8 *buffer, size_t length) #pragma endregion -sint32 sawyercoding_detect_file_type(const uint8 *src, size_t length) +int32_t sawyercoding_detect_file_type(const uint8_t *src, size_t length) { size_t i; // Currently can't detect TD4, as the checksum is the same as SC4 (need alternative method) - uint32 checksum = *((uint32*)&src[length - 4]); - uint32 actualChecksum = 0; + uint32_t checksum = *((uint32_t*)&src[length - 4]); + uint32_t actualChecksum = 0; for (i = 0; i < length - 4; i++) { - actualChecksum = (actualChecksum & 0xFFFFFF00) | (((actualChecksum & 0xFF) + (uint8)src[i]) & 0xFF); + actualChecksum = (actualChecksum & 0xFFFFFF00) | (((actualChecksum & 0xFF) + (uint8_t)src[i]) & 0xFF); actualChecksum = rol32(actualChecksum, 3); } return sawyercoding_detect_rct1_version(checksum - actualChecksum); } -sint32 sawyercoding_detect_rct1_version(sint32 gameVersion) +int32_t sawyercoding_detect_rct1_version(int32_t gameVersion) { - sint32 fileType = (gameVersion) > 0 ? FILE_TYPE_SV4 : FILE_TYPE_SC4; + int32_t fileType = (gameVersion) > 0 ? FILE_TYPE_SV4 : FILE_TYPE_SC4; gameVersion = abs(gameVersion); if (gameVersion >= 108000 && gameVersion < 110000) diff --git a/src/openrct2/util/SawyerCoding.h b/src/openrct2/util/SawyerCoding.h index 6be8127015..07cfb39c33 100644 --- a/src/openrct2/util/SawyerCoding.h +++ b/src/openrct2/util/SawyerCoding.h @@ -14,8 +14,8 @@ #pragma pack(push, 1) struct sawyercoding_chunk_header { - uint8 encoding; - uint32 length; + uint8_t encoding; + uint32_t length; }; assert_struct_size(sawyercoding_chunk_header, 5); #pragma pack(pop) @@ -42,16 +42,16 @@ enum { extern bool gUseRLE; -uint32 sawyercoding_calculate_checksum(const uint8* buffer, size_t length); -size_t sawyercoding_write_chunk_buffer(uint8 *dst_file, const uint8 *src_buffer, sawyercoding_chunk_header chunkHeader); -size_t sawyercoding_decode_sv4(const uint8 *src, uint8 *dst, size_t length, size_t bufferLength); -size_t sawyercoding_decode_sc4(const uint8 *src, uint8 *dst, size_t length, size_t bufferLength); -size_t sawyercoding_encode_sv4(const uint8 *src, uint8 *dst, size_t length); -size_t sawyercoding_decode_td6(const uint8 *src, uint8 *dst, size_t length); -size_t sawyercoding_encode_td6(const uint8 *src, uint8 *dst, size_t length); -sint32 sawyercoding_validate_track_checksum(const uint8* src, size_t length); +uint32_t sawyercoding_calculate_checksum(const uint8_t* buffer, size_t length); +size_t sawyercoding_write_chunk_buffer(uint8_t *dst_file, const uint8_t *src_buffer, sawyercoding_chunk_header chunkHeader); +size_t sawyercoding_decode_sv4(const uint8_t *src, uint8_t *dst, size_t length, size_t bufferLength); +size_t sawyercoding_decode_sc4(const uint8_t *src, uint8_t *dst, size_t length, size_t bufferLength); +size_t sawyercoding_encode_sv4(const uint8_t *src, uint8_t *dst, size_t length); +size_t sawyercoding_decode_td6(const uint8_t *src, uint8_t *dst, size_t length); +size_t sawyercoding_encode_td6(const uint8_t *src, uint8_t *dst, size_t length); +int32_t sawyercoding_validate_track_checksum(const uint8_t* src, size_t length); -sint32 sawyercoding_detect_file_type(const uint8 *src, size_t length); -sint32 sawyercoding_detect_rct1_version(sint32 gameVersion); +int32_t sawyercoding_detect_file_type(const uint8_t *src, size_t length); +int32_t sawyercoding_detect_rct1_version(int32_t gameVersion); #endif diff --git a/src/openrct2/util/Util.cpp b/src/openrct2/util/Util.cpp index 29700e2cda..acd4315e93 100644 --- a/src/openrct2/util/Util.cpp +++ b/src/openrct2/util/Util.cpp @@ -20,28 +20,28 @@ #include "Util.h" #include "zlib.h" -sint32 squaredmetres_to_squaredfeet(sint32 squaredMetres) +int32_t squaredmetres_to_squaredfeet(int32_t squaredMetres) { // 1 metre squared = 10.7639104 feet squared // RCT2 approximates as 11 return squaredMetres * 11; } -sint32 metres_to_feet(sint32 metres) +int32_t metres_to_feet(int32_t metres) { // 1 metre = 3.2808399 feet // RCT2 approximates as 3.28125 return (metres * 840) / 256; } -sint32 mph_to_kmph(sint32 mph) +int32_t mph_to_kmph(int32_t mph) { // 1 mph = 1.60934 kmph // RCT2 approximates as 1.609375 return (mph * 1648) >> 10; } -sint32 mph_to_dmps(sint32 mph) +int32_t mph_to_dmps(int32_t mph) { // 1 mph = 4.4704 decimeters/s return (mph * 73243) >> 14; @@ -49,7 +49,7 @@ sint32 mph_to_dmps(sint32 mph) bool filename_valid_characters(const utf8 *filename) { - for (sint32 i = 0; filename[i] != '\0'; i++) { + for (int32_t i = 0; filename[i] != '\0'; i++) { if (filename[i] == '\\' || filename[i] == '/' || filename[i] == ':' || filename[i] == '?' || filename[i] == '*' || filename[i] == '<' || filename[i] == '>' || filename[i] == '|') return false; @@ -150,21 +150,21 @@ void path_end_with_separator(utf8 *path, size_t size) { } } -sint32 bitscanforward(sint32 source) +int32_t bitscanforward(int32_t source) { #if defined(_MSC_VER) && (_MSC_VER >= 1400) // Visual Studio 2005 DWORD i; - uint8 success = _BitScanForward(&i, (uint32)source); + uint8_t success = _BitScanForward(&i, (uint32_t)source); return success != 0 ? i : -1; #elif defined(__GNUC__) - sint32 success = __builtin_ffs(source); + int32_t success = __builtin_ffs(source); return success - 1; #else #pragma message "Falling back to iterative bitscan forward, consider using intrinsics" // This is a low-hanging optimisation boost, check if your compiler offers // any intrinsic. // cf. https://github.com/OpenRCT2/OpenRCT2/pull/2093 - for (sint32 i = 0; i < 32; i++) + for (int32_t i = 0; i < 32; i++) if (source & (1u << i)) return i; @@ -182,7 +182,7 @@ sint32 bitscanforward(sint32 source) #endif #ifdef OPENRCT2_X86 -static bool cpuid_x86(uint32 * cpuid_outdata, sint32 eax) +static bool cpuid_x86(uint32_t * cpuid_outdata, int32_t eax) { #if defined(OpenRCT2_CPUID_GNUC_X86) int ret = __get_cpuid(eax, &cpuid_outdata[0], &cpuid_outdata[1], &cpuid_outdata[2], &cpuid_outdata[3]); @@ -200,7 +200,7 @@ bool sse41_available() { #ifdef OPENRCT2_X86 // SSE4.1 support is declared as the 19th bit of ECX with CPUID(EAX = 1). - uint32 regs[4] = { 0 }; + uint32_t regs[4] = { 0 }; if (cpuid_x86(regs, 1)) { return (regs[2] & (1 << 19)); @@ -220,7 +220,7 @@ bool avx2_available() return __builtin_cpu_supports("avx2"); #else // AVX2 support is declared as the 5th bit of EBX with CPUID(EAX = 7, ECX = 0). - uint32 regs[4] = { 0 }; + uint32_t regs[4] = { 0 }; if (cpuid_x86(regs, 7)) { return (regs[1] & (1 << 5)); @@ -234,7 +234,7 @@ static bool bitcount_popcnt_available() { #ifdef OPENRCT2_X86 // POPCNT support is declared as the 23rd bit of ECX with CPUID(EAX = 1). - uint32 regs[4] = { 0 }; + uint32_t regs[4] = { 0 }; if (cpuid_x86(regs, 1)) { return (regs[2] & (1 << 23)); @@ -243,13 +243,13 @@ static bool bitcount_popcnt_available() return false; } -static sint32 bitcount_popcnt(uint32 source) +static int32_t bitcount_popcnt(uint32_t source) { // Use CPUID defines to figure out calling style #if defined(OpenRCT2_CPUID_GNUC_X86) // use asm directly in order to actually emit the instruction : using // __builtin_popcount results in an extra call to a library function. - sint32 rv; + int32_t rv; asm volatile ("popcnt %1,%0" : "=r"(rv) : "rm"(source) : "cc"); return rv; #elif defined(OpenRCT2_CPUID_MSVC_X86) @@ -260,10 +260,10 @@ static sint32 bitcount_popcnt(uint32 source) #endif } -static sint32 bitcount_lut(uint32 source) +static int32_t bitcount_lut(uint32_t source) { // https://graphics.stanford.edu/~seander/bithacks.html - static constexpr const uint8 BitsSetTable256[256] = + static constexpr const uint8_t BitsSetTable256[256] = { #define B2(n) n, (n) + 1, (n) + 1, (n) + 2 #define B4(n) B2(n), B2((n) + 1), B2((n) + 1), B2((n) + 2) @@ -276,19 +276,19 @@ static sint32 bitcount_lut(uint32 source) BitsSetTable256[source >> 24]; } -static sint32(*bitcount_fn)(uint32); +static int32_t(*bitcount_fn)(uint32_t); void bitcount_init() { bitcount_fn = bitcount_popcnt_available() ? bitcount_popcnt : bitcount_lut; } -sint32 bitcount(uint32 source) +int32_t bitcount(uint32_t source) { return bitcount_fn(source); } -bool strequals(const char *a, const char *b, sint32 length, bool caseInsensitive) +bool strequals(const char *a, const char *b, int32_t length, bool caseInsensitive) { return caseInsensitive ? _strnicmp(a, b, length) == 0 : @@ -296,10 +296,10 @@ bool strequals(const char *a, const char *b, sint32 length, bool caseInsensitive } /* case insensitive compare */ -sint32 strcicmp(char const *a, char const *b) +int32_t strcicmp(char const *a, char const *b) { for (;; a++, b++) { - sint32 d = tolower(*a) - tolower(*b); + int32_t d = tolower(*a) - tolower(*b); if (d != 0 || !*a) return d; } @@ -312,14 +312,14 @@ sint32 strcicmp(char const *a, char const *b) // - Guest 100 // - John v2.0 // - John v2.1 -sint32 strlogicalcmp(char const *a, char const *b) { +int32_t strlogicalcmp(char const *a, char const *b) { for (;; a++, b++) { - sint32 result = tolower(*a) - tolower(*b); + int32_t result = tolower(*a) - tolower(*b); bool both_numeric = *a >= '0' && *a <= '9' && *b >= '0' && *b <= '9'; if (result != 0 || !*a || both_numeric) { // difference found || end of string if (both_numeric) { // a and b both start with a number // Get the numbers in the string at current positions - sint32 na = 0 , nb = 0; + int32_t na = 0 , nb = 0; for (; *a >= '0' && *a <= '9'; a++) { na *= 10; na += *a - '0'; } for (; *b >= '0' && *b <= '9'; b++) { nb *= 10; nb += *b - '0'; } // In case the numbers are the same @@ -343,7 +343,7 @@ utf8 * safe_strtrunc(utf8 * text, size_t size) const char *sourceLimit = text + size - 1; char *ch = text; char *last = text; - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(ch, (const utf8 **)&ch)) != 0) { if (ch <= sourceLimit) { last = ch; @@ -368,7 +368,7 @@ char *safe_strcpy(char * destination, const char * source, size_t size) bool truncated = false; const char *sourceLimit = source + size - 1; const char *ch = source; - uint32 codepoint; + uint32_t codepoint; while ((codepoint = utf8_get_next(ch, &ch)) != 0) { if (ch <= sourceLimit) { destination = utf8_write_codepoint(destination, codepoint); @@ -481,7 +481,7 @@ char * strcasestr(const char * haystack, const char * needle) bool utf8_is_bom(const char *str) { - return str[0] == (char)(uint8)0xEF && str[1] == (char)(uint8)0xBB && str[2] == (char)(uint8)0xBF; + return str[0] == (char)(uint8_t)0xEF && str[1] == (char)(uint8_t)0xBB && str[2] == (char)(uint8_t)0xBF; } bool str_is_null_or_empty(const char *str) @@ -489,12 +489,12 @@ bool str_is_null_or_empty(const char *str) return str == nullptr || str[0] == 0; } -void util_srand(sint32 source) { +void util_srand(int32_t source) { srand(source); } // Caveat: rand() might only return values up to 0x7FFF, which is the minimum specified in the C standard. -uint32 util_rand() { +uint32_t util_rand() { return rand(); } @@ -509,9 +509,9 @@ uint32 util_rand() { * @return Returns a pointer to memory holding decompressed data or NULL on failure. * @note It is caller's responsibility to free() the returned pointer once done with it. */ -uint8 *util_zlib_inflate(uint8 *data, size_t data_in_size, size_t *data_out_size) +uint8_t *util_zlib_inflate(uint8_t *data, size_t data_in_size, size_t *data_out_size) { - sint32 ret = Z_OK; + int32_t ret = Z_OK; uLongf out_size = (uLong)*data_out_size; if (out_size == 0) { @@ -521,13 +521,13 @@ uint8 *util_zlib_inflate(uint8 *data, size_t data_in_size, size_t *data_out_size out_size = std::min((uLongf)MAX_ZLIB_REALLOC, out_size); } uLongf buffer_size = out_size; - uint8 *buffer = (uint8 *)malloc(buffer_size); + uint8_t *buffer = (uint8_t *)malloc(buffer_size); do { if (ret == Z_BUF_ERROR) { buffer_size *= 2; out_size = buffer_size; - buffer = (uint8 *)realloc(buffer, buffer_size); + buffer = (uint8_t *)realloc(buffer, buffer_size); } else if (ret == Z_STREAM_ERROR) { log_error("Your build is shipped with broken zlib. Please use the official build."); free(buffer); @@ -539,7 +539,7 @@ uint8 *util_zlib_inflate(uint8 *data, size_t data_in_size, size_t *data_out_size } ret = uncompress(buffer, &out_size, data, (uLong)data_in_size); } while (ret != Z_OK); - buffer = (uint8 *)realloc(buffer, out_size); + buffer = (uint8_t *)realloc(buffer, out_size); *data_out_size = out_size; return buffer; } @@ -552,18 +552,18 @@ uint8 *util_zlib_inflate(uint8 *data, size_t data_in_size, size_t *data_out_size * @return Returns a pointer to memory holding compressed data or NULL on failure. * @note It is caller's responsibility to free() the returned pointer once done with it. */ -uint8 *util_zlib_deflate(const uint8 *data, size_t data_in_size, size_t *data_out_size) +uint8_t *util_zlib_deflate(const uint8_t *data, size_t data_in_size, size_t *data_out_size) { - sint32 ret = Z_OK; + int32_t ret = Z_OK; uLongf out_size = (uLongf)*data_out_size; uLong buffer_size = compressBound((uLong)data_in_size); - uint8 *buffer = (uint8 *)malloc(buffer_size); + uint8_t *buffer = (uint8_t *)malloc(buffer_size); do { if (ret == Z_BUF_ERROR) { buffer_size *= 2; out_size = buffer_size; - buffer = (uint8 *)realloc(buffer, buffer_size); + buffer = (uint8_t *)realloc(buffer, buffer_size); } else if (ret == Z_STREAM_ERROR) { log_error("Your build is shipped with broken zlib. Please use the official build."); free(buffer); @@ -572,7 +572,7 @@ uint8 *util_zlib_deflate(const uint8 *data, size_t data_in_size, size_t *data_ou ret = compress(buffer, &out_size, data, (uLong)data_in_size); } while (ret != Z_OK); *data_out_size = out_size; - buffer = (uint8 *)realloc(buffer, *data_out_size); + buffer = (uint8_t *)realloc(buffer, *data_out_size); return buffer; } @@ -588,19 +588,19 @@ uint8 *util_zlib_deflate(const uint8 *data, size_t data_in_size, size_t *data_ou value += value_to_add; \ } -sint8 add_clamp_sint8(sint8 value, sint8 value_to_add) +int8_t add_clamp_int8_t(int8_t value, int8_t value_to_add) { add_clamp_body(value, value_to_add, INT8_MIN, INT8_MAX); return value; } -sint16 add_clamp_sint16(sint16 value, sint16 value_to_add) +int16_t add_clamp_int16_t(int16_t value, int16_t value_to_add) { add_clamp_body(value, value_to_add, INT16_MIN, INT16_MAX); return value; } -sint32 add_clamp_sint32(sint32 value, sint32 value_to_add) +int32_t add_clamp_int32_t(int32_t value, int32_t value_to_add) { add_clamp_body(value, value_to_add, INT32_MIN, INT32_MAX); return value; @@ -609,23 +609,23 @@ sint32 add_clamp_sint32(sint32 value, sint32 value_to_add) money32 add_clamp_money32(money32 value, money32 value_to_add) { // This function is intended only for clarity, as money32 - // is technically the same as sint32 - assert_struct_size(money32, sizeof(sint32)); - return add_clamp_sint32(value, value_to_add); + // is technically the same as int32_t + assert_struct_size(money32, sizeof(int32_t)); + return add_clamp_int32_t(value, value_to_add); } #undef add_clamp_body -uint8 lerp(uint8 a, uint8 b, float t) +uint8_t lerp(uint8_t a, uint8_t b, float t) { if (t <= 0) return a; if (t >= 1) return b; - sint32 range = b - a; - sint32 amount = (sint32)(range * t); - return (uint8)(a + amount); + int32_t range = b - a; + int32_t amount = (int32_t)(range * t); + return (uint8_t)(a + amount); } float flerp(float a, float b, float t) @@ -638,7 +638,7 @@ float flerp(float a, float b, float t) return a + amount; } -uint8 soft_light(uint8 a, uint8 b) +uint8_t soft_light(uint8_t a, uint8_t b) { float fa = a / 255.0f; float fb = b / 255.0f; @@ -651,7 +651,7 @@ uint8 soft_light(uint8 a, uint8 b) { fr = (2 * fa * (1 - fb)) + (std::sqrt(fa) * ((2 * fb) - 1)); } - return (uint8)(Math::Clamp(0.0f, fr, 1.0f) * 255.0f); + return (uint8_t)(Math::Clamp(0.0f, fr, 1.0f) * 255.0f); } /** diff --git a/src/openrct2/util/Util.h b/src/openrct2/util/Util.h index 4b7e21e49d..63bd051b75 100644 --- a/src/openrct2/util/Util.h +++ b/src/openrct2/util/Util.h @@ -13,10 +13,10 @@ #include #include "../common.h" -sint32 squaredmetres_to_squaredfeet(sint32 squaredMetres); -sint32 metres_to_feet(sint32 metres); -sint32 mph_to_kmph(sint32 mph); -sint32 mph_to_dmps(sint32 mph); +int32_t squaredmetres_to_squaredfeet(int32_t squaredMetres); +int32_t metres_to_feet(int32_t metres); +int32_t mph_to_kmph(int32_t mph); +int32_t mph_to_dmps(int32_t mph); bool filename_valid_characters(const utf8 *filename); @@ -32,12 +32,12 @@ bool writeentirefile(const utf8 * path, const void * buffer, size_t length); bool sse41_available(); bool avx2_available(); -sint32 bitscanforward(sint32 source); +int32_t bitscanforward(int32_t source); void bitcount_init(); -sint32 bitcount(uint32 source); -bool strequals(const char *a, const char *b, sint32 length, bool caseInsensitive); -sint32 strcicmp(char const *a, char const *b); -sint32 strlogicalcmp(char const *a, char const *b); +int32_t bitcount(uint32_t source); +bool strequals(const char *a, const char *b, int32_t length, bool caseInsensitive); +int32_t strcicmp(char const *a, char const *b); +int32_t strlogicalcmp(char const *a, char const *b); utf8 * safe_strtrunc(utf8 * text, size_t size); char *safe_strcpy(char * destination, const char * source, size_t num); char *safe_strcat(char *destination, const char *source, size_t size); @@ -50,20 +50,20 @@ char * strcasestr(const char * haystack, const char * needle); bool utf8_is_bom(const char *str); bool str_is_null_or_empty(const char *str); -void util_srand(sint32 source); -uint32 util_rand(); +void util_srand(int32_t source); +uint32_t util_rand(); -uint8 *util_zlib_deflate(const uint8 *data, size_t data_in_size, size_t *data_out_size); -uint8 *util_zlib_inflate(uint8 *data, size_t data_in_size, size_t *data_out_size); +uint8_t *util_zlib_deflate(const uint8_t *data, size_t data_in_size, size_t *data_out_size); +uint8_t *util_zlib_inflate(uint8_t *data, size_t data_in_size, size_t *data_out_size); -sint8 add_clamp_sint8(sint8 value, sint8 value_to_add); -sint16 add_clamp_sint16(sint16 value, sint16 value_to_add); -sint32 add_clamp_sint32(sint32 value, sint32 value_to_add); +int8_t add_clamp_int8_t(int8_t value, int8_t value_to_add); +int16_t add_clamp_int16_t(int16_t value, int16_t value_to_add); +int32_t add_clamp_int32_t(int32_t value, int32_t value_to_add); money32 add_clamp_money32(money32 value, money32 value_to_add); -uint8 lerp(uint8 a, uint8 b, float t); +uint8_t lerp(uint8_t a, uint8_t b, float t); float flerp(float a, float b, float t); -uint8 soft_light(uint8 a, uint8 b); +uint8_t soft_light(uint8_t a, uint8_t b); size_t strcatftime(char * buffer, size_t bufferSize, const char * format, const struct tm * tp); diff --git a/src/openrct2/windows/Intent.cpp b/src/openrct2/windows/Intent.cpp index 57a8875d6a..59f3072c05 100644 --- a/src/openrct2/windows/Intent.cpp +++ b/src/openrct2/windows/Intent.cpp @@ -16,7 +16,7 @@ Intent::Intent(rct_windowclass windowclass) this->_Class = windowclass; } -Intent * Intent::putExtra(uint32 key, uint32 value) +Intent * Intent::putExtra(uint32_t key, uint32_t value) { IntentData data = {}; data.intVal.unsignedInt = value; @@ -27,7 +27,7 @@ Intent * Intent::putExtra(uint32 key, uint32 value) return this; } -Intent * Intent::putExtra(uint32 key, void * value) +Intent * Intent::putExtra(uint32_t key, void * value) { IntentData data = {}; data.pointerVal = value; @@ -38,7 +38,7 @@ Intent * Intent::putExtra(uint32 key, void * value) return this; } -Intent * Intent::putExtra(uint32 key, sint32 value) +Intent * Intent::putExtra(uint32_t key, int32_t value) { IntentData data = {}; data.intVal.signedInt = value; @@ -49,7 +49,7 @@ Intent * Intent::putExtra(uint32 key, sint32 value) return this; } -Intent * Intent::putExtra(uint32 key, std::string value) +Intent * Intent::putExtra(uint32_t key, std::string value) { IntentData data = {}; data.stringVal = std::move(value); @@ -60,7 +60,7 @@ Intent * Intent::putExtra(uint32 key, std::string value) return this; } -Intent * Intent::putExtra(uint32 key, close_callback value) +Intent * Intent::putExtra(uint32_t key, close_callback value) { IntentData data = {}; data.closeCallbackVal = value; @@ -76,7 +76,7 @@ rct_windowclass Intent::GetWindowClass() const return this->_Class; } -void * Intent::GetPointerExtra(uint32 key) const +void * Intent::GetPointerExtra(uint32_t key) const { if (_Data.count(key) == 0) { @@ -88,7 +88,7 @@ void * Intent::GetPointerExtra(uint32 key) const return (void *) data.pointerVal; } -uint32 Intent::GetUIntExtra(uint32 key) const +uint32_t Intent::GetUIntExtra(uint32_t key) const { if (_Data.count(key) == 0) { @@ -100,7 +100,7 @@ uint32 Intent::GetUIntExtra(uint32 key) const return data.intVal.unsignedInt; } -sint32 Intent::GetSIntExtra(uint32 key) const +int32_t Intent::GetSIntExtra(uint32_t key) const { if (_Data.count(key) == 0) { @@ -112,7 +112,7 @@ sint32 Intent::GetSIntExtra(uint32 key) const return data.intVal.signedInt; } -std::string Intent::GetStringExtra(uint32 key) const +std::string Intent::GetStringExtra(uint32_t key) const { if (_Data.count(key) == 0) { @@ -124,7 +124,7 @@ std::string Intent::GetStringExtra(uint32 key) const return data.stringVal; } -close_callback Intent::GetCloseCallbackExtra(uint32 key) const +close_callback Intent::GetCloseCallbackExtra(uint32_t key) const { if (_Data.count(key) == 0) { diff --git a/src/openrct2/windows/Intent.h b/src/openrct2/windows/Intent.h index c87dd7f9a0..b0e7e1efdf 100644 --- a/src/openrct2/windows/Intent.h +++ b/src/openrct2/windows/Intent.h @@ -19,8 +19,8 @@ struct IntentData enum DATATYPE { DT_INT, DT_STRING, DT_POINTER, DT_CLOSE_CALLBACK } type; union { - uint32 unsignedInt; - sint32 signedInt; + uint32_t unsignedInt; + int32_t signedInt; } intVal; std::string stringVal; close_callback closeCallbackVal; @@ -31,20 +31,20 @@ class Intent { private: rct_windowclass _Class; - std::map _Data; + std::map _Data; public: explicit Intent(rct_windowclass windowclass); rct_windowclass GetWindowClass() const; - void * GetPointerExtra(uint32 key) const; - std::string GetStringExtra(uint32 key) const; - uint32 GetUIntExtra(uint32 key) const; - sint32 GetSIntExtra(uint32 key) const; - close_callback GetCloseCallbackExtra(uint32 key) const; - Intent * putExtra(uint32 key, uint32 value); - Intent * putExtra(uint32 key, void * value); - Intent * putExtra(uint32 key, sint32 value); - Intent * putExtra(uint32 key, std::string value); - Intent * putExtra(uint32 key, close_callback value); + void * GetPointerExtra(uint32_t key) const; + std::string GetStringExtra(uint32_t key) const; + uint32_t GetUIntExtra(uint32_t key) const; + int32_t GetSIntExtra(uint32_t key) const; + close_callback GetCloseCallbackExtra(uint32_t key) const; + Intent * putExtra(uint32_t key, uint32_t value); + Intent * putExtra(uint32_t key, void * value); + Intent * putExtra(uint32_t key, int32_t value); + Intent * putExtra(uint32_t key, std::string value); + Intent * putExtra(uint32_t key, close_callback value); }; enum diff --git a/src/openrct2/windows/_legacy.cpp b/src/openrct2/windows/_legacy.cpp index 37112e0be0..b54348fd23 100644 --- a/src/openrct2/windows/_legacy.cpp +++ b/src/openrct2/windows/_legacy.cpp @@ -29,19 +29,19 @@ bool gDisableErrorWindowSound = false; void game_command_callback_pickup_guest( - sint32 eax, - sint32 ebx, - sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - [[maybe_unused]] sint32 edi, - [[maybe_unused]] sint32 ebp) + int32_t eax, + int32_t ebx, + int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + [[maybe_unused]] int32_t edi, + [[maybe_unused]] int32_t ebp) { switch (ecx) { case 0: { - sint32 peepnum = eax; + int32_t peepnum = eax; rct_window * w = window_find_by_number(WC_PEEP, peepnum); if (w) { @@ -60,15 +60,15 @@ void game_command_callback_pickup_guest( } void game_command_callback_hire_new_staff_member( - [[maybe_unused]] sint32 eax, - [[maybe_unused]] sint32 ebx, - [[maybe_unused]] sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - sint32 edi, - [[maybe_unused]] sint32 ebp) + [[maybe_unused]] int32_t eax, + [[maybe_unused]] int32_t ebx, + [[maybe_unused]] int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + int32_t edi, + [[maybe_unused]] int32_t ebp) { - sint32 sprite_index = edi; + int32_t sprite_index = edi; if (sprite_index == SPRITE_INDEX_NULL) { rct_window * window = window_find_by_class(WC_STAFF_LIST); @@ -84,19 +84,19 @@ void game_command_callback_hire_new_staff_member( } void game_command_callback_pickup_staff( - sint32 eax, - sint32 ebx, - sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - [[maybe_unused]] sint32 edi, - [[maybe_unused]] sint32 ebp) + int32_t eax, + int32_t ebx, + int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + [[maybe_unused]] int32_t edi, + [[maybe_unused]] int32_t ebp) { switch (ecx) { case 0: { - sint32 peepnum = eax; + int32_t peepnum = eax; rct_window * w = window_find_by_number(WC_PEEP, peepnum); if (w) { @@ -114,8 +114,8 @@ void game_command_callback_pickup_staff( } } -uint64 _enabledRidePieces; -uint8 _rideConstructionState2; +uint64_t _enabledRidePieces; +uint8_t _rideConstructionState2; // This variable is updated separately from ride->num_stations because the latter // is unreliable if currently in station construction mode @@ -123,13 +123,13 @@ bool _stationConstructed; bool _deferClose; void game_command_callback_place_ride_entrance_or_exit( - [[maybe_unused]] sint32 eax, - [[maybe_unused]] sint32 ebx, - [[maybe_unused]] sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - [[maybe_unused]] sint32 edi, - [[maybe_unused]] sint32 ebp) + [[maybe_unused]] int32_t eax, + [[maybe_unused]] int32_t ebx, + [[maybe_unused]] int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + [[maybe_unused]] int32_t edi, + [[maybe_unused]] int32_t ebp) { audio_play_sound_at_location( SOUND_PLACE_ITEM, @@ -155,7 +155,7 @@ void game_command_callback_place_ride_entrance_or_exit( * * rct2: 0x006CA162 */ -money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 liftHillAndAlternativeState, sint32 x, sint32 y, sint32 z) +money32 place_provisional_track_piece(int32_t rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndAlternativeState, int32_t x, int32_t y, int32_t z) { Ride *ride; money32 result; @@ -164,7 +164,7 @@ money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_MAZE) { - sint32 flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; // 105 + int32_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; // 105 result = maze_set_track(x, y, z, flags, true, 0, rideIndex, GC_SET_MAZE_TRACK_BUILD); if (result == MONEY32_UNDEFINED) return result; @@ -195,7 +195,7 @@ money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 if (result == MONEY32_UNDEFINED) return result; - sint16 z_begin, z_end; + int16_t z_begin, z_end; const rct_track_coordinates * coords = get_track_coord_from_ride(ride, trackType); if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_NO_TRACK)) { @@ -231,14 +231,14 @@ money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 } } -static std::tuple window_ride_construction_update_state_get_track_element() { +static std::tuple window_ride_construction_update_state_get_track_element() { auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_PIECES); context_broadcast_intent(&intent); - uint8 startSlope = _previousTrackSlopeEnd; - uint8 endSlope = _currentTrackSlopeEnd; - uint8 startBank = _previousTrackBankEnd; - uint8 endBank = _currentTrackBankEnd; + uint8_t startSlope = _previousTrackSlopeEnd; + uint8_t endSlope = _currentTrackSlopeEnd; + uint8_t startBank = _previousTrackBankEnd; + uint8_t endBank = _currentTrackBankEnd; if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_BACK) { startSlope = _currentTrackSlopeEnd; @@ -247,7 +247,7 @@ static std::tuple window_ride_construction_update_state_get_track_e endBank = _previousTrackBankEnd; } - uint16 curve = _currentTrackCurve; + uint16_t curve = _currentTrackCurve; if (curve == 0xFFFF) { return std::make_tuple(false, 0); } @@ -261,7 +261,7 @@ static std::tuple window_ride_construction_update_state_get_track_e if (curve <= 8) { - for (uint32 i = 0; i < Util::CountOf(gTrackDescriptors); i++) + for (uint32_t i = 0; i < Util::CountOf(gTrackDescriptors); i++) { const track_descriptor * trackDescriptor = &gTrackDescriptors[i]; @@ -328,9 +328,9 @@ static std::tuple window_ride_construction_update_state_get_track_e * @param[out] _properties (edirs16) * @return (CF) */ -bool window_ride_construction_update_state(sint32 *_trackType, sint32 *_trackDirection, sint32 *_rideIndex, sint32 *_liftHillAndAlternativeState, sint32 *_x, sint32 *_y, sint32 *_z, sint32 *_properties) { - uint8 trackType, trackDirection, rideIndex; - uint16 z, x, y, liftHillAndAlternativeState, properties; +bool window_ride_construction_update_state(int32_t *_trackType, int32_t *_trackDirection, int32_t *_rideIndex, int32_t *_liftHillAndAlternativeState, int32_t *_x, int32_t *_y, int32_t *_z, int32_t *_properties) { + uint8_t trackType, trackDirection, rideIndex; + uint16_t z, x, y, liftHillAndAlternativeState, properties; auto updated_element = window_ride_construction_update_state_get_track_element(); if (!std::get<0>(updated_element)) { @@ -378,9 +378,9 @@ bool window_ride_construction_update_state(sint32 *_trackType, sint32 *_trackDir if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES) && _currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_PIECES) { if (ride->type != RIDE_TYPE_WATER_COASTER || trackType == TRACK_ELEM_FLAT || trackType == TRACK_ELEM_LEFT_QUARTER_TURN_5_TILES || trackType == TRACK_ELEM_RIGHT_QUARTER_TURN_5_TILES) { - sint16 alternativeType = AlternativeTrackTypes[trackType]; + int16_t alternativeType = AlternativeTrackTypes[trackType]; if (alternativeType > -1) { - trackType = (uint8) alternativeType; + trackType = (uint8_t) alternativeType; } liftHillAndAlternativeState &= ~CONSTRUCTION_LIFT_HILL_SELECTED; } @@ -498,7 +498,7 @@ void window_ride_construction_do_station_check() } } -void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type) +void window_ride_construction_mouseup_demolish_next_piece(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t type) { if (gGotoStartPlacementMode) { z &= 0xFFF0; @@ -507,13 +507,13 @@ void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, si _currentTrackSelectionFlags = 0; _rideConstructionArrowPulseTime = 0; _currentTrackPieceDirection = direction & 3; - sint32 slope = _currentTrackCurve; - sint32 slopeEnd = _previousTrackSlopeEnd; - sint32 b2 = _currentTrackSlopeEnd; - sint32 bankEnd = _previousTrackBankEnd; - sint32 bankStart = _currentTrackBankEnd; - sint32 b5 = _currentTrackAlternative; - sint32 b4 = _currentTrackLiftHill; + int32_t slope = _currentTrackCurve; + int32_t slopeEnd = _previousTrackSlopeEnd; + int32_t b2 = _currentTrackSlopeEnd; + int32_t bankEnd = _previousTrackBankEnd; + int32_t bankStart = _currentTrackBankEnd; + int32_t b5 = _currentTrackAlternative; + int32_t b4 = _currentTrackLiftHill; ride_construction_set_default_next_piece(); window_ride_construction_update_active_elements(); if (!ride_try_get_origin_element(_currentRideIndex, NULL)) { @@ -577,16 +577,16 @@ void window_ride_construction_update_active_elements() } void game_command_callback_place_banner( - [[maybe_unused]] sint32 eax, - sint32 ebx, - [[maybe_unused]] sint32 ecx, - [[maybe_unused]] sint32 edx, - [[maybe_unused]] sint32 esi, - sint32 edi, - [[maybe_unused]] sint32 ebp) + [[maybe_unused]] int32_t eax, + int32_t ebx, + [[maybe_unused]] int32_t ecx, + [[maybe_unused]] int32_t edx, + [[maybe_unused]] int32_t esi, + int32_t edi, + [[maybe_unused]] int32_t ebp) { if (ebx != MONEY32_UNDEFINED) { - sint32 bannerId = edi; + int32_t bannerId = edi; audio_play_sound_at_location(SOUND_PLACE_ITEM, gCommandPosition.x, gCommandPosition.y, gCommandPosition.z); context_open_detail_window(WD_BANNER, bannerId); @@ -599,7 +599,7 @@ void game_command_callback_place_banner( */ bool scenery_tool_is_active() { - sint32 toolWindowClassification = gCurrentToolWidget.window_classification; + int32_t toolWindowClassification = gCurrentToolWidget.window_classification; rct_widgetindex toolWidgetIndex = gCurrentToolWidget.widget_index; if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) if (toolWindowClassification == WC_TOP_TOOLBAR && toolWidgetIndex == WC_TOP_TOOLBAR__WIDX_SCENERY) diff --git a/src/openrct2/windows/tile_inspector.h b/src/openrct2/windows/tile_inspector.h index 3bd62c3678..3f2a4b62b4 100644 --- a/src/openrct2/windows/tile_inspector.h +++ b/src/openrct2/windows/tile_inspector.h @@ -26,7 +26,7 @@ enum TILE_INSPECTOR_PAGE TILE_INSPECTOR_PAGE_CORRUPT }; -extern uint32 windowTileInspectorTileX; -extern uint32 windowTileInspectorTileY; -extern sint32 windowTileInspectorElementCount; -extern sint32 windowTileInspectorSelectedIndex; +extern uint32_t windowTileInspectorTileX; +extern uint32_t windowTileInspectorTileY; +extern int32_t windowTileInspectorElementCount; +extern int32_t windowTileInspectorSelectedIndex; diff --git a/src/openrct2/world/Balloon.cpp b/src/openrct2/world/Balloon.cpp index b7a6eebaec..ae254ee4a2 100644 --- a/src/openrct2/world/Balloon.cpp +++ b/src/openrct2/world/Balloon.cpp @@ -50,7 +50,7 @@ void rct_balloon::Update() frame++; sprite_move(x, y, z + 1, (rct_sprite*)this); - sint32 maxZ = 1967 - ((x ^ y) & 31); + int32_t maxZ = 1967 - ((x ^ y) & 31); if (z >= maxZ) { Pop(); @@ -65,14 +65,14 @@ void rct_balloon::Press() { // There is a random chance that pressing the balloon will not pop it // and instead shift it slightly - uint32 random = scenario_rand(); + uint32_t random = scenario_rand(); if ((sprite_index & 7) || (random & 0xFFFF) < 0x2000) { Pop(); } else { - sint16 shift = ((random & 0x80000000) ? -6 : 6); + int16_t shift = ((random & 0x80000000) ? -6 : 6); sprite_move(x + shift, y, z, (rct_sprite *)this); } } @@ -85,7 +85,7 @@ void rct_balloon::Pop() audio_play_sound_at_location(SOUND_BALLOON_POP, x, y, z); } -static money32 game_command_balloon_press(uint16 spriteIndex, uint8 flags) +static money32 game_command_balloon_press(uint16_t spriteIndex, uint8_t flags) { rct_sprite * sprite = try_get_sprite(spriteIndex); if (sprite == nullptr || !sprite->IsBalloon()) @@ -104,7 +104,7 @@ static money32 game_command_balloon_press(uint16 spriteIndex, uint8 flags) } } -void create_balloon(sint32 x, sint32 y, sint32 z, sint32 colour, bool isPopped) +void create_balloon(int32_t x, int32_t y, int32_t z, int32_t colour, bool isPopped) { rct_sprite* sprite = create_sprite(2); if (sprite != nullptr) @@ -128,13 +128,13 @@ void balloon_update(rct_balloon * balloon) } void game_command_balloon_press( - sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = game_command_balloon_press(*eax & 0xFFFF, *ebx & 0xFF); } diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index dc14a495c2..e7acb081ef 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -37,16 +37,16 @@ rct_banner gBanners[MAX_BANNERS]; * * rct2: 0x006B7EAB */ -static uint8 banner_get_ride_index_at(sint32 x, sint32 y, sint32 z) +static uint8_t banner_get_ride_index_at(int32_t x, int32_t y, int32_t z) { rct_tile_element* tileElement = map_get_first_element_at(x >> 5, y >> 5); - uint8 resultRideIndex = RIDE_ID_NULL; + uint8_t resultRideIndex = RIDE_ID_NULL; do { if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; - uint8 rideIndex = track_element_get_ride_index(tileElement); + uint8_t rideIndex = track_element_get_ride_index(tileElement); Ride* ride = get_ride(rideIndex); if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) continue; @@ -60,9 +60,9 @@ static uint8 banner_get_ride_index_at(sint32 x, sint32 y, sint32 z) return resultRideIndex; } -static money32 BannerRemove(sint16 x, sint16 y, uint8 baseHeight, uint8 direction, uint8 flags) +static money32 BannerRemove(int16_t x, int16_t y, uint8_t baseHeight, uint8_t direction, uint8_t flags) { - sint32 z = baseHeight * 8; + int32_t z = baseHeight * 8; gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; @@ -118,10 +118,10 @@ static money32 BannerRemove(sint16 x, sint16 y, uint8 baseHeight, uint8 directio return refund; } -static money32 BannerSetColour(sint16 x, sint16 y, uint8 baseHeight, uint8 direction, uint8 colour, uint8 flags) +static money32 BannerSetColour(int16_t x, int16_t y, uint8_t baseHeight, uint8_t direction, uint8_t colour, uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; - sint32 z = (baseHeight * 8); + int32_t z = (baseHeight * 8); gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; gCommandPosition.z = z; @@ -165,7 +165,7 @@ static money32 BannerSetColour(sint16 x, sint16 y, uint8 baseHeight, uint8 direc } static money32 BannerPlace( - sint16 x, sint16 y, uint8 pathBaseHeight, uint8 direction, uint8 colour, uint8 type, BannerIndex* bannerIndex, uint8 flags) + int16_t x, int16_t y, uint8_t pathBaseHeight, uint8_t direction, uint8_t colour, uint8_t type, BannerIndex* bannerIndex, uint8_t flags) { gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; @@ -216,7 +216,7 @@ static money32 BannerPlace( return MONEY32_UNDEFINED; } - uint8 baseHeight = (pathBaseHeight + 1) * 2; + uint8_t baseHeight = (pathBaseHeight + 1) * 2; tileElement = map_get_banner_element_at(x / 32, y / 32, baseHeight, direction); if (tileElement != nullptr) { @@ -274,7 +274,7 @@ static money32 BannerPlace( return bannerEntry->banner.price; } -static money32 BannerSetStyle(BannerIndex bannerIndex, uint8 colour, uint8 textColour, uint8 bannerFlags, uint8 flags) +static money32 BannerSetStyle(BannerIndex bannerIndex, uint8_t colour, uint8_t textColour, uint8_t bannerFlags, uint8_t flags) { if (bannerIndex >= MAX_BANNERS) { @@ -306,11 +306,11 @@ static money32 BannerSetStyle(BannerIndex bannerIndex, uint8 colour, uint8 textC tileElement->properties.banner.flags &= ~(1 << tileElement->properties.banner.position); } - sint32 colourCodepoint = FORMAT_COLOUR_CODE_START + banner->text_colour; + int32_t colourCodepoint = FORMAT_COLOUR_CODE_START + banner->text_colour; utf8 buffer[256]; format_string(buffer, 256, banner->string_idx, nullptr); - sint32 firstCodepoint = utf8_get_next(buffer, nullptr); + int32_t firstCodepoint = utf8_get_next(buffer, nullptr); if (firstCodepoint >= FORMAT_COLOUR_CODE_START && firstCodepoint <= FORMAT_COLOUR_CODE_END) { utf8_write_codepoint(buffer, colourCodepoint); @@ -371,7 +371,7 @@ void banner_init() * * rct2: 0x006BA278 */ -BannerIndex create_new_banner(uint8 flags) +BannerIndex create_new_banner(uint8_t flags) { BannerIndex bannerIndex = BannerGetNewIndex(); @@ -412,7 +412,7 @@ rct_tile_element* banner_get_tile_element(BannerIndex bannerIndex) * * rct2: 0x006B7D86 */ -uint8 banner_get_closest_ride_index(sint32 x, sint32 y, sint32 z) +uint8_t banner_get_closest_ride_index(int32_t x, int32_t y, int32_t z) { Ride *ride; @@ -429,18 +429,18 @@ uint8 banner_get_closest_ride_index(sint32 x, sint32 y, sint32 z) { 0, 0 } }; - for (size_t i = 0; i < (sint32)Util::CountOf(NeighbourCheckOrder); i++) + for (size_t i = 0; i < (int32_t)Util::CountOf(NeighbourCheckOrder); i++) { - uint8 rideIndex = banner_get_ride_index_at(x + NeighbourCheckOrder[i].x, y + NeighbourCheckOrder[i].y, z); + uint8_t rideIndex = banner_get_ride_index_at(x + NeighbourCheckOrder[i].x, y + NeighbourCheckOrder[i].y, z); if (rideIndex != RIDE_ID_NULL) { return rideIndex; } } - uint8 index; - uint8 rideIndex = RIDE_ID_NULL; - sint32 resultDistance = std::numeric_limits::max(); + uint8_t index; + uint8_t rideIndex = RIDE_ID_NULL; + int32_t resultDistance = std::numeric_limits::max(); FOR_ALL_RIDES(index, ride) { if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) @@ -450,9 +450,9 @@ uint8 banner_get_closest_ride_index(sint32 x, sint32 y, sint32 z) if (location.xy == RCT_XY8_UNDEFINED) continue; - sint32 rideX = location.x * 32; - sint32 rideY = location.y * 32; - sint32 distance = abs(x - rideX) + abs(y - rideY); + int32_t rideX = location.x * 32; + int32_t rideY = location.y * 32; + int32_t distance = abs(x - rideX) + abs(y - rideY); if (distance < resultDistance) { resultDistance = distance; @@ -489,7 +489,7 @@ void fix_duplicated_banners() // multiple tiles that should both refer to the same banner index. if (tileElement->GetType() == TILE_ELEMENT_TYPE_BANNER) { - uint8 bannerIndex = tileElement->properties.banner.index; + uint8_t bannerIndex = tileElement->properties.banner.index; if (activeBanners[bannerIndex]) { log_info( @@ -542,13 +542,13 @@ void fix_duplicated_banners() * rct2: 0x006BA058 */ void game_command_remove_banner( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = BannerRemove( *eax & 0xFFFF, @@ -564,13 +564,13 @@ void game_command_remove_banner( * rct2: 0x006BA16A */ void game_command_set_banner_colour( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + int32_t * ebp) { *ebx = BannerSetColour( *eax & 0xFFFF, @@ -587,7 +587,7 @@ void game_command_set_banner_colour( * rct2: 0x006B9E6D */ void game_command_place_banner( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = BannerPlace( *eax & 0xFFFF, @@ -602,13 +602,13 @@ void game_command_place_banner( } void game_command_set_banner_style( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + int32_t * ebp) { *ebx = BannerSetStyle( *ecx & 0xFF, diff --git a/src/openrct2/world/Banner.h b/src/openrct2/world/Banner.h index 488c199f4c..5315f0d184 100644 --- a/src/openrct2/world/Banner.h +++ b/src/openrct2/world/Banner.h @@ -12,24 +12,24 @@ #include "../common.h" #include "TileElement.h" -constexpr uint8 BANNER_NULL = 255; +constexpr uint8_t BANNER_NULL = 255; constexpr size_t MAX_BANNERS = 250; constexpr BannerIndex BANNER_INDEX_NULL = (BannerIndex)-1; #pragma pack(push, 1) struct rct_banner { - uint8 type; - uint8 flags; // 0x01 + uint8_t type; + uint8_t flags; // 0x01 rct_string_id string_idx; // 0x02 union { - uint8 colour; // 0x04 - uint8 ride_index; // 0x04 + uint8_t colour; // 0x04 + uint8_t ride_index; // 0x04 }; - uint8 text_colour; // 0x05 - uint8 x; // 0x06 - uint8 y; // 0x07 + uint8_t text_colour; // 0x05 + uint8_t x; // 0x06 + uint8_t y; // 0x07 }; assert_struct_size(rct_banner, 8); #pragma pack(pop) @@ -45,9 +45,9 @@ enum BANNER_FLAGS extern rct_banner gBanners[MAX_BANNERS]; void banner_init(); -BannerIndex create_new_banner(uint8 flags); +BannerIndex create_new_banner(uint8_t flags); rct_tile_element* banner_get_tile_element(BannerIndex bannerIndex); -uint8 banner_get_closest_ride_index(sint32 x, sint32 y, sint32 z); +uint8_t banner_get_closest_ride_index(int32_t x, int32_t y, int32_t z); void banner_reset_broken_index(); void fix_duplicated_banners(); -void game_command_callback_place_banner(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp); +void game_command_callback_place_banner(int32_t eax, int32_t ebx, int32_t ecx, int32_t edx, int32_t esi, int32_t edi, int32_t ebp); diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index d61b633920..2f78a0a960 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -25,7 +25,7 @@ #include "../windows/Intent.h" #include "../Context.h" -constexpr sint32 MAX_THUNDER_INSTANCES = 2; +constexpr int32_t MAX_THUNDER_INSTANCES = 2; enum class THUNDER_STATUS { @@ -35,9 +35,9 @@ enum class THUNDER_STATUS struct WeatherTransition { - sint8 BaseTemperature; - sint8 DistributionSize; - sint8 Distribution[24]; + int8_t BaseTemperature; + int8_t DistributionSize; + int8_t Distribution[24]; }; extern const WeatherTransition * ClimateTransitions[4]; @@ -45,31 +45,31 @@ extern const WeatherState ClimateWeatherData[6]; extern const FILTER_PALETTE_ID ClimateWeatherGloomColours[4]; // Climate data -uint8 gClimate; +uint8_t gClimate; ClimateState gClimateCurrent; ClimateState gClimateNext; -uint16 gClimateUpdateTimer; -uint16 gClimateLightningFlash; +uint16_t gClimateUpdateTimer; +uint16_t gClimateLightningFlash; // Sound data -static sint32 _rainVolume = 1; -static uint32 _lightningTimer; -static uint32 _thunderTimer; +static int32_t _rainVolume = 1; +static uint32_t _lightningTimer; +static uint32_t _thunderTimer; static void * _thunderSoundChannels[MAX_THUNDER_INSTANCES]; static THUNDER_STATUS _thunderStatus[MAX_THUNDER_INSTANCES] = { THUNDER_STATUS::NONE, THUNDER_STATUS::NONE }; -static uint32 _thunderSoundId; -static sint32 _thunderVolume; -static sint32 _thunderStereoEcho = 0; +static uint32_t _thunderSoundId; +static int32_t _thunderVolume; +static int32_t _thunderStereoEcho = 0; -static sint8 climate_step_weather_level(sint8 currentWeatherLevel, sint8 nextWeatherLevel); -static void climate_determine_future_weather(sint32 randomDistribution); +static int8_t climate_step_weather_level(int8_t currentWeatherLevel, int8_t nextWeatherLevel); +static void climate_determine_future_weather(int32_t randomDistribution); static void climate_update_rain_sound(); static void climate_update_thunder_sound(); static void climate_update_lightning(); static void climate_update_thunder(); -static void climate_play_thunder(sint32 instanceIndex, sint32 soundId, sint32 volume, sint32 pan); +static void climate_play_thunder(int32_t instanceIndex, int32_t soundId, int32_t volume, int32_t pan); -sint32 climate_celsius_to_fahrenheit(sint32 celsius) +int32_t climate_celsius_to_fahrenheit(int32_t celsius) { return (celsius * 29) / 16 + 32; } @@ -77,10 +77,10 @@ sint32 climate_celsius_to_fahrenheit(sint32 celsius) /** * Set climate and determine start weather. */ -void climate_reset(sint32 climate) +void climate_reset(int32_t climate) { - uint8 weather = WEATHER_PARTIALLY_CLOUDY; - sint32 month = date_get_month(gDateMonthsElapsed); + uint8_t weather = WEATHER_PARTIALLY_CLOUDY; + int32_t month = date_get_month(gDateMonthsElapsed); const WeatherTransition * transition = &ClimateTransitions[climate][month]; const WeatherState * weatherState = &ClimateWeatherData[weather]; @@ -168,7 +168,7 @@ void climate_update() else if (gClimateCurrent.WeatherEffect == WEATHER_EFFECT_STORM) { // Create new thunder and lightning - uint32 randomNumber = util_rand(); + uint32_t randomNumber = util_rand(); if ((randomNumber & 0xFFFF) <= 0x1B4) { randomNumber >>= 16; @@ -178,7 +178,7 @@ void climate_update() } } -void climate_force_weather(uint8 weather) +void climate_force_weather(uint8_t weather) { const auto weatherState = &ClimateWeatherData[weather]; gClimateCurrent.Weather = weather; @@ -221,9 +221,9 @@ FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState &state return paletteId; } -uint32 climate_get_weather_sprite_id(const ClimateState &state) +uint32_t climate_get_weather_sprite_id(const ClimateState &state) { - uint32 spriteId = SPR_WEATHER_SUN; + uint32_t spriteId = SPR_WEATHER_SUN; if (state.Weather < Util::CountOf(ClimateWeatherData)) { spriteId = ClimateWeatherData[state.Weather].SpriteId; @@ -231,7 +231,7 @@ uint32 climate_get_weather_sprite_id(const ClimateState &state) return spriteId; } -static sint8 climate_step_weather_level(sint8 currentWeatherLevel, sint8 nextWeatherLevel) +static int8_t climate_step_weather_level(int8_t currentWeatherLevel, int8_t nextWeatherLevel) { if (nextWeatherLevel > currentWeatherLevel) { @@ -249,13 +249,13 @@ static sint8 climate_step_weather_level(sint8 currentWeatherLevel, sint8 nextWea * for nextWeather. The other weather parameters are then looked up depending only on the * next weather. */ -static void climate_determine_future_weather(sint32 randomDistribution) +static void climate_determine_future_weather(int32_t randomDistribution) { - sint8 month = date_get_month(gDateMonthsElapsed); + int8_t month = date_get_month(gDateMonthsElapsed); // Generate a random variable with values 0 up to DistributionSize-1 and chose weather from the distribution table accordingly const WeatherTransition * transition = &ClimateTransitions[gClimate][month]; - sint8 nextWeather = transition->Distribution[((randomDistribution & 0xFF) * transition->DistributionSize) >> 8]; + int8_t nextWeather = transition->Distribution[((randomDistribution & 0xFF) * transition->DistributionSize) >> 8]; gClimateNext.Weather = nextWeather; const auto nextWeatherState = &ClimateWeatherData[nextWeather]; @@ -320,7 +320,7 @@ static void climate_update_thunder_sound() } // Stop thunder sounds if they have finished - for (sint32 i = 0; i < MAX_THUNDER_INSTANCES; i++) + for (int32_t i = 0; i < MAX_THUNDER_INSTANCES; i++) { if (_thunderStatus[i] != THUNDER_STATUS::NONE) { @@ -355,7 +355,7 @@ static void climate_update_thunder() _thunderTimer--; if (_thunderTimer == 0) { - uint32 randomNumber = util_rand(); + uint32_t randomNumber = util_rand(); if (randomNumber & 0x10000) { if (_thunderStatus[0] == THUNDER_STATUS::NONE && @@ -363,7 +363,7 @@ static void climate_update_thunder() { // Play thunder on left side _thunderSoundId = (randomNumber & 0x20000) ? SOUND_THUNDER_1 : SOUND_THUNDER_2; - _thunderVolume = (-((sint32)((randomNumber >> 18) & 0xFF))) * 8; + _thunderVolume = (-((int32_t)((randomNumber >> 18) & 0xFF))) * 8; climate_play_thunder(0, _thunderSoundId, _thunderVolume, -10000); // Let thunder play on right side @@ -375,14 +375,14 @@ static void climate_update_thunder() if (_thunderStatus[0] == THUNDER_STATUS::NONE) { _thunderSoundId = (randomNumber & 0x20000) ? SOUND_THUNDER_1 : SOUND_THUNDER_2; - sint32 pan = (((randomNumber >> 18) & 0xFF) - 128) * 16; + int32_t pan = (((randomNumber >> 18) & 0xFF) - 128) * 16; climate_play_thunder(0, _thunderSoundId, 0, pan); } } } } -static void climate_play_thunder(sint32 instanceIndex, sint32 soundId, sint32 volume, sint32 pan) +static void climate_play_thunder(int32_t instanceIndex, int32_t soundId, int32_t volume, int32_t pan) { _thunderSoundChannels[instanceIndex] = Mixer_Play_Effect(soundId, MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(pan), 1, 0); if (_thunderSoundChannels[instanceIndex] != nullptr) diff --git a/src/openrct2/world/Climate.h b/src/openrct2/world/Climate.h index a0236f242c..f76f0b3275 100644 --- a/src/openrct2/world/Climate.h +++ b/src/openrct2/world/Climate.h @@ -47,34 +47,34 @@ enum RAIN_LEVEL struct WeatherState { - sint8 TemperatureDelta; - sint8 EffectLevel; - sint8 GloomLevel; - sint8 RainLevel; - uint32 SpriteId; + int8_t TemperatureDelta; + int8_t EffectLevel; + int8_t GloomLevel; + int8_t RainLevel; + uint32_t SpriteId; }; struct ClimateState { - uint8 Weather; - sint8 Temperature; - uint8 WeatherEffect; - uint8 WeatherGloom; - uint8 RainLevel; + uint8_t Weather; + int8_t Temperature; + uint8_t WeatherEffect; + uint8_t WeatherGloom; + uint8_t RainLevel; }; -extern uint8 gClimate; +extern uint8_t gClimate; extern ClimateState gClimateCurrent; extern ClimateState gClimateNext; -extern uint16 gClimateUpdateTimer; -extern uint16 gClimateLightningFlash; +extern uint16_t gClimateUpdateTimer; +extern uint16_t gClimateLightningFlash; -sint32 climate_celsius_to_fahrenheit(sint32 celsius); -void climate_reset(sint32 climate); +int32_t climate_celsius_to_fahrenheit(int32_t celsius); +void climate_reset(int32_t climate); void climate_update(); void climate_update_sound(); -void climate_force_weather(uint8 weather); +void climate_force_weather(uint8_t weather); bool climate_is_raining(); FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState &state); -uint32 climate_get_weather_sprite_id(const ClimateState &state); +uint32_t climate_get_weather_sprite_id(const ClimateState &state); diff --git a/src/openrct2/world/Duck.cpp b/src/openrct2/world/Duck.cpp index d409dd5c66..a70fdd74f0 100644 --- a/src/openrct2/world/Duck.cpp +++ b/src/openrct2/world/Duck.cpp @@ -28,7 +28,7 @@ enum DUCK_STATE DOUBLE_DRINK, FLY_AWAY, }; -constexpr const sint32 DUCK_MAX_STATES = 5; +constexpr const int32_t DUCK_MAX_STATES = 5; static constexpr const LocationXY16 DuckMoveOffset[] = { @@ -38,33 +38,33 @@ static constexpr const LocationXY16 DuckMoveOffset[] = { 0, -1 }, }; -static constexpr const uint8 DuckAnimationFlyToWater[] = +static constexpr const uint8_t DuckAnimationFlyToWater[] = { 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 DuckAnimationSwim[] = +static constexpr const uint8_t DuckAnimationSwim[] = { 0 }; -static constexpr const uint8 DuckAnimationDrink[] = +static constexpr const uint8_t DuckAnimationDrink[] = { 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0xFF }; -static constexpr const uint8 DuckAnimationDoubleDrink[] = +static constexpr const uint8_t DuckAnimationDoubleDrink[] = { 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 0, 0, 0, 0, 0xFF }; -static constexpr const uint8 DuckAnimationFlyAway[] = +static constexpr const uint8_t DuckAnimationFlyAway[] = { 8, 9, 10, 11, 12, 13 }; -static constexpr const uint8 * DuckAnimations[] = +static constexpr const uint8_t * DuckAnimations[] = { DuckAnimationFlyToWater, // FLY_TO_WATER DuckAnimationSwim, // SWIM @@ -100,7 +100,7 @@ void rct_duck::Remove() sprite_remove((rct_sprite *)this); } -void rct_duck::MoveTo(sint16 destX, sint16 destY, sint16 destZ) +void rct_duck::MoveTo(int16_t destX, int16_t destY, int16_t destZ) { sprite_move(destX, destY, destZ, (rct_sprite *)this); } @@ -116,14 +116,14 @@ void rct_duck::UpdateFlyToWater() } Invalidate(); - sint32 manhattanDistance = abs(target_x - x) + abs(target_y - y); - sint32 direction = sprite_direction >> 3; - sint32 newX = x + DuckMoveOffset[direction].x; - sint32 newY = y + DuckMoveOffset[direction].y; - sint32 manhattanDistanceN = abs(target_x - newX) + abs(target_y - newY); + int32_t manhattanDistance = abs(target_x - x) + abs(target_y - y); + int32_t direction = sprite_direction >> 3; + int32_t newX = x + DuckMoveOffset[direction].x; + int32_t newY = y + DuckMoveOffset[direction].y; + int32_t manhattanDistanceN = abs(target_x - newX) + abs(target_y - newY); rct_tile_element * tileElement = map_get_surface_element_at({target_x, target_y}); - sint32 waterHeight = surface_get_water_height(tileElement); + int32_t waterHeight = surface_get_water_height(tileElement); if (waterHeight == 0) { state = DUCK_STATE::FLY_AWAY; @@ -132,7 +132,7 @@ void rct_duck::UpdateFlyToWater() else { waterHeight <<= 4; - sint32 newZ = abs(z - waterHeight); + int32_t newZ = abs(z - waterHeight); if (manhattanDistanceN <= manhattanDistance) { @@ -173,25 +173,25 @@ void rct_duck::UpdateSwim() { if (((gCurrentTicks + sprite_index) & 3) != 0) return; - uint32 randomNumber = scenario_rand(); + uint32_t randomNumber = scenario_rand(); if ((randomNumber & 0xFFFF) < 0x666) { if (randomNumber & 0x80000000) { state = DUCK_STATE::DOUBLE_DRINK; - frame = std::numeric_limits::max(); + frame = std::numeric_limits::max(); UpdateDoubleDrink(); } else { state = DUCK_STATE::DRINK; - frame = std::numeric_limits::max(); + frame = std::numeric_limits::max(); UpdateDrink(); } } else { - sint32 currentMonth = date_get_month(gDateMonthsElapsed); + int32_t currentMonth = date_get_month(gDateMonthsElapsed); if (currentMonth >= MONTH_SEPTEMBER && (randomNumber >> 16) < 218) { state = DUCK_STATE::FLY_AWAY; @@ -200,8 +200,8 @@ void rct_duck::UpdateSwim() else { Invalidate(); - sint32 landZ = tile_element_height(x, y); - sint32 waterZ = (landZ >> 16) & 0xFFFF; + int32_t landZ = tile_element_height(x, y); + int32_t waterZ = (landZ >> 16) & 0xFFFF; landZ &= 0xFFFF; if (z < landZ || waterZ == 0) @@ -219,9 +219,9 @@ void rct_duck::UpdateSwim() sprite_direction = randomNumber & 0x18; } - sint32 direction = sprite_direction >> 3; - sint32 newX = x + DuckMoveOffset[direction].x; - sint32 newY = y + DuckMoveOffset[direction].y; + int32_t direction = sprite_direction >> 3; + int32_t newX = x + DuckMoveOffset[direction].x; + int32_t newY = y + DuckMoveOffset[direction].y; landZ = tile_element_height(newX, newY); waterZ = (landZ >> 16) & 0xFFFF; landZ &= 0xFFFF; @@ -278,10 +278,10 @@ void rct_duck::UpdateFlyAway() Invalidate(); - sint32 direction = sprite_direction >> 3; - sint32 newX = x + (DuckMoveOffset[direction].x * 2); - sint32 newY = y + (DuckMoveOffset[direction].y * 2); - sint32 newZ = std::min(z + 2, 496); + int32_t direction = sprite_direction >> 3; + int32_t newX = x + (DuckMoveOffset[direction].x * 2); + int32_t newY = y + (DuckMoveOffset[direction].y * 2); + int32_t newZ = std::min(z + 2, 496); if (map_is_location_valid({newX, newY})) { MoveTo(newX, newY, newZ); @@ -294,19 +294,19 @@ void rct_duck::UpdateFlyAway() } } -uint32 rct_duck::GetFrameImage(sint32 direction) const +uint32_t rct_duck::GetFrameImage(int32_t direction) const { - uint32 imageId = 0; + uint32_t imageId = 0; if (state < DUCK_MAX_STATES) { // TODO: Check frame is in range - uint8 imageOffset = DuckAnimations[state][frame]; + uint8_t imageOffset = DuckAnimations[state][frame]; imageId = SPR_DUCK + (imageOffset * 4) + (direction / 8); } return imageId; } -void create_duck(sint32 targetX, sint32 targetY) +void create_duck(int32_t targetX, int32_t targetY) { rct_sprite * sprite = create_sprite(2); if (sprite != nullptr) @@ -316,12 +316,12 @@ void create_duck(sint32 targetX, sint32 targetY) sprite->duck.sprite_width = 9; sprite->duck.sprite_height_negative = 12; sprite->duck.sprite_height_positive = 9; - sint32 offsetXY = scenario_rand() & 0x1E; + int32_t offsetXY = scenario_rand() & 0x1E; targetX += offsetXY; targetY += offsetXY; sprite->duck.target_x = targetX; sprite->duck.target_y = targetY; - uint8 direction = scenario_rand() & 3; + uint8_t direction = scenario_rand() & 3; switch (direction) { case 0: targetX = 8191 - (scenario_rand() & 0x3F); @@ -371,8 +371,8 @@ void duck_press(rct_duck * duck) void duck_remove_all() { - uint16 nextSpriteIndex; - for (uint16 spriteIndex = gSpriteListHead[SPRITE_LIST_MISC]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex) + uint16_t nextSpriteIndex; + for (uint16_t spriteIndex = gSpriteListHead[SPRITE_LIST_MISC]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex) { rct_unk_sprite * sprite = &(get_sprite(spriteIndex)->unknown); nextSpriteIndex = sprite->next; @@ -383,7 +383,7 @@ void duck_remove_all() } } -uint32 duck_get_frame_image(const rct_duck * duck, sint32 direction) +uint32_t duck_get_frame_image(const rct_duck * duck, int32_t direction) { return duck->GetFrameImage(direction); } diff --git a/src/openrct2/world/Entrance.cpp b/src/openrct2/world/Entrance.cpp index 6db4fed2a1..c7eb502031 100644 --- a/src/openrct2/world/Entrance.cpp +++ b/src/openrct2/world/Entrance.cpp @@ -25,13 +25,13 @@ bool gParkEntranceGhostExists = false; LocationXYZ16 gParkEntranceGhostPosition = { 0, 0, 0 }; -uint8 gParkEntranceGhostDirection = 0; +uint8_t gParkEntranceGhostDirection = 0; CoordsXYZD gParkEntrances[MAX_PARK_ENTRANCES]; CoordsXYZD gRideEntranceExitGhostPosition; -uint8 gRideEntranceExitGhostStationIndex; +uint8_t gRideEntranceExitGhostStationIndex; -static void ParkEntranceRemoveSegment(sint32 x, sint32 y, sint32 z) +static void ParkEntranceRemoveSegment(int32_t x, int32_t y, int32_t z) { rct_tile_element *tileElement; @@ -46,9 +46,9 @@ static void ParkEntranceRemoveSegment(sint32 x, sint32 y, sint32 z) update_park_fences({x, y}); } -static money32 ParkEntranceRemove(sint16 x, sint16 y, uint8 z, uint8 flags) +static money32 ParkEntranceRemove(int16_t x, int16_t y, uint8_t z, uint8_t flags) { - sint32 entranceIndex, direction; + int32_t entranceIndex, direction; if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) { @@ -94,13 +94,13 @@ static money32 ParkEntranceRemove(sint16 x, sint16 y, uint8 z, uint8 flags) return 0; } -static money32 RideEntranceExitPlace(sint16 x, - sint16 y, - sint16 z, - uint8 direction, - uint8 flags, - uint8 rideIndex, - uint8 stationNum, +static money32 RideEntranceExitPlace(int16_t x, + int16_t y, + int16_t z, + uint8_t direction, + uint8_t flags, + uint8_t rideIndex, + uint8_t stationNum, bool isExit) { // Remember when in unknown station num mode rideIndex is unknown and z is set @@ -134,7 +134,7 @@ static money32 RideEntranceExitPlace(sint16 x, return MONEY32_UNDEFINED; } - sint16 clear_z = z / 8 + (isExit ? 5 : 7); + int16_t clear_z = z / 8 + (isExit ? 5 : 7); if (!gCheatsDisableClearanceChecks && !map_can_construct_with_clear_at(x, y, z / 8, clear_z, &map_place_non_scenery_clear_func, 0xF, flags, &cost, CREATE_CROSSING_MODE_NONE)) @@ -254,7 +254,7 @@ static money32 RideEntranceExitPlace(sint16 x, return MONEY32_UNDEFINED; } - sint8 clear_z = (z / 8) + (isExit ? 5 : 7); + int8_t clear_z = (z / 8) + (isExit ? 5 : 7); if (!gCheatsDisableClearanceChecks && !map_can_construct_with_clear_at(x, y, z / 8, clear_z, &map_place_non_scenery_clear_func, 0xF, flags, &cost, CREATE_CROSSING_MODE_NONE)) @@ -298,11 +298,11 @@ static money32 RideEntranceExitPlace(sint16 x, if (isExit) { - ride_set_exit_location(ride, stationNum, { x / 32, y / 32, z / 8, (uint8)tile_element_get_direction(tileElement)}); + ride_set_exit_location(ride, stationNum, { x / 32, y / 32, z / 8, (uint8_t)tile_element_get_direction(tileElement)}); } else { - ride_set_entrance_location(ride, stationNum, { x / 32, y / 32, z / 8, (uint8)tile_element_get_direction(tileElement)}); + ride_set_entrance_location(ride, stationNum, { x / 32, y / 32, z / 8, (uint8_t)tile_element_get_direction(tileElement)}); ride->last_peep_in_queue[stationNum] = SPRITE_INDEX_NULL; ride->queue_length[stationNum] = 0; @@ -327,7 +327,7 @@ static money32 RideEntranceExitPlace(sint16 x, return cost; } -static money32 RideEntranceExitRemove(sint16 x, sint16 y, uint8 rideIndex, uint8 stationNum, uint8 flags) +static money32 RideEntranceExitRemove(int16_t x, int16_t y, uint8_t rideIndex, uint8_t stationNum, uint8_t flags) { if (rideIndex >= MAX_RIDES) { @@ -435,7 +435,7 @@ static money32 RideEntranceExitRemove(sint16 x, sint16 y, uint8 rideIndex, uint8 return 0; } -static money32 RideEntranceExitPlaceGhost(uint8 rideIndex, sint16 x, sint16 y, uint8 direction, uint8 placeType, uint8 stationNum) +static money32 RideEntranceExitPlaceGhost(uint8_t rideIndex, int16_t x, int16_t y, uint8_t direction, uint8_t placeType, uint8_t stationNum) { return game_do_command( x, @@ -457,13 +457,13 @@ static money32 RideEntranceExitPlaceGhost(uint8 rideIndex, sint16 x, sint16 y, u * rct2: 0x00666A63 */ void game_command_remove_park_entrance( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = ParkEntranceRemove( *eax & 0xFFFF, @@ -493,9 +493,9 @@ void park_entrance_remove_ghost() } } -sint32 park_entrance_get_index(sint32 x, sint32 y, sint32 z) +int32_t park_entrance_get_index(int32_t x, int32_t y, int32_t z) { - sint32 i; + int32_t i; for (i = 0; i < MAX_PARK_ENTRANCES; i++) { @@ -551,12 +551,12 @@ void ride_entrance_exit_remove_ghost() * * rct2: 0x006CA28C */ -money32 ride_entrance_exit_place_ghost(sint32 rideIndex, - sint32 x, - sint32 y, - sint32 direction, - sint32 placeType, - sint32 stationNum) +money32 ride_entrance_exit_place_ghost(int32_t rideIndex, + int32_t x, + int32_t y, + int32_t direction, + int32_t placeType, + int32_t stationNum) { ride_construction_remove_ghosts(); money32 result = RideEntranceExitPlaceGhost(rideIndex, x, y, direction, placeType, stationNum); @@ -577,13 +577,13 @@ money32 ride_entrance_exit_place_ghost(sint32 rideIndex, * rct2: 0x006660A8 */ void game_command_place_ride_entrance_or_exit( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = RideEntranceExitPlace( *eax & 0xFFFF, @@ -602,13 +602,13 @@ void game_command_place_ride_entrance_or_exit( * rct2: 0x0066640B */ void game_command_remove_ride_entrance_or_exit( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = RideEntranceExitRemove( *eax & 0xFFFF, @@ -623,13 +623,13 @@ void game_command_remove_ride_entrance_or_exit( * Replaces the outer hedge walls for an entrance placement removal. * rct2: 0x00666D6F */ -void maze_entrance_hedge_replacement(sint32 x, sint32 y, rct_tile_element *tileElement) +void maze_entrance_hedge_replacement(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); x += CoordsDirectionDelta[direction].x; y += CoordsDirectionDelta[direction].y; - sint32 z = tileElement->base_height; - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t z = tileElement->base_height; + int32_t rideIndex = track_element_get_ride_index(tileElement); tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -639,7 +639,7 @@ void maze_entrance_hedge_replacement(sint32 x, sint32 y, rct_tile_element *tileE if (track_element_get_type(tileElement) != TRACK_ELEM_MAZE) continue; // Each maze element is split into 4 sections with 4 different walls - uint8 mazeSection = direction * 4; + uint8_t mazeSection = direction * 4; // Add the top outer wall tileElement->properties.track.maze_entry |= (1 << ((mazeSection + 9) & 0x0F)); // Add the bottom outer wall @@ -654,13 +654,13 @@ void maze_entrance_hedge_replacement(sint32 x, sint32 y, rct_tile_element *tileE * Removes the hedge walls for an entrance placement. * rct2: 0x00666CBE */ -void maze_entrance_hedge_removal(sint32 x, sint32 y, rct_tile_element *tileElement) +void maze_entrance_hedge_removal(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); x += CoordsDirectionDelta[direction].x; y += CoordsDirectionDelta[direction].y; - sint32 z = tileElement->base_height; - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t z = tileElement->base_height; + int32_t rideIndex = track_element_get_ride_index(tileElement); tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -670,7 +670,7 @@ void maze_entrance_hedge_removal(sint32 x, sint32 y, rct_tile_element *tileEleme if (track_element_get_type(tileElement) != TRACK_ELEM_MAZE) continue; // Each maze element is split into 4 sections with 4 different walls - uint8 mazeSection = direction * 4; + uint8_t mazeSection = direction * 4; // Remove the top outer wall tileElement->properties.track.maze_entry &= ~(1 << ((mazeSection + 9) & 0x0F)); // Remove the bottom outer wall diff --git a/src/openrct2/world/Entrance.h b/src/openrct2/world/Entrance.h index 697531e661..688ad5c74d 100644 --- a/src/openrct2/world/Entrance.h +++ b/src/openrct2/world/Entrance.h @@ -16,35 +16,35 @@ #pragma pack(push, 1) struct rct_entrance_type { rct_string_id string_idx; // 0x00 - uint32 image_id; // 0x02 - uint8 scrolling_mode; // 0x06 - uint8 text_height; // 0x07 + uint32_t image_id; // 0x02 + uint8_t scrolling_mode; // 0x06 + uint8_t text_height; // 0x07 }; assert_struct_size(rct_entrance_type, 8); #pragma pack(pop) -void game_command_remove_park_entrance(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); +void game_command_remove_park_entrance(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); struct rct_tile_element; extern bool gParkEntranceGhostExists; extern LocationXYZ16 gParkEntranceGhostPosition; -extern uint8 gParkEntranceGhostDirection; +extern uint8_t gParkEntranceGhostDirection; #define MAX_PARK_ENTRANCES 4 extern CoordsXYZD gParkEntrances[MAX_PARK_ENTRANCES]; extern CoordsXYZD gRideEntranceExitGhostPosition; -extern uint8 gRideEntranceExitGhostStationIndex; +extern uint8_t gRideEntranceExitGhostStationIndex; void park_entrance_remove_ghost(); -money32 park_entrance_place_ghost(sint32 x, sint32 y, sint32 z, sint32 direction); -money32 place_park_entrance(sint16 x, sint16 y, sint16 z, uint8 direction); +money32 park_entrance_place_ghost(int32_t x, int32_t y, int32_t z, int32_t direction); +money32 place_park_entrance(int16_t x, int16_t y, int16_t z, uint8_t direction); void reset_park_entrance(); -void maze_entrance_hedge_replacement(sint32 x, sint32 y, rct_tile_element *tileElement); -void maze_entrance_hedge_removal(sint32 x, sint32 y, rct_tile_element *tileElement); +void maze_entrance_hedge_replacement(int32_t x, int32_t y, rct_tile_element *tileElement); +void maze_entrance_hedge_removal(int32_t x, int32_t y, rct_tile_element *tileElement); void fix_park_entrance_locations(); diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 56ddb91661..8fa80913d3 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -30,25 +30,25 @@ #include "Surface.h" #include "MapAnimation.h" -void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z); -void footpath_update_queue_entrance_banner(sint32 x, sint32 y, rct_tile_element *tileElement); +void footpath_interrupt_peeps(int32_t x, int32_t y, int32_t z); +void footpath_update_queue_entrance_banner(int32_t x, int32_t y, rct_tile_element *tileElement); -uint8 gFootpathProvisionalFlags; +uint8_t gFootpathProvisionalFlags; LocationXYZ16 gFootpathProvisionalPosition; -uint8 gFootpathProvisionalType; -uint8 gFootpathProvisionalSlope; -uint8 gFootpathConstructionMode; -uint16 gFootpathSelectedId; -uint8 gFootpathSelectedType; +uint8_t gFootpathProvisionalType; +uint8_t gFootpathProvisionalSlope; +uint8_t gFootpathConstructionMode; +uint16_t gFootpathSelectedId; +uint8_t gFootpathSelectedType; LocationXYZ16 gFootpathConstructFromPosition; -uint8 gFootpathConstructDirection; -uint8 gFootpathConstructSlope; -uint8 gFootpathConstructValidDirections; +uint8_t gFootpathConstructDirection; +uint8_t gFootpathConstructSlope; +uint8_t gFootpathConstructValidDirections; money32 gFootpathPrice; -uint8 gFootpathGroundFlags; +uint8_t gFootpathGroundFlags; -static uint8 *_footpathQueueChainNext; -static uint8 _footpathQueueChain[64]; +static uint8_t *_footpathQueueChainNext; +static uint8_t _footpathQueueChain[64]; // This is the coordinates that a user of the bin should move to // rct2: 0x00992A4C @@ -81,14 +81,14 @@ const LocationXY16 word_981D6C[4] = { }; // rct2: 0x0097B974 -static constexpr const uint16 EntranceDirections[] = { +static constexpr const uint16_t EntranceDirections[] = { (4 ), 0, 0, 0, 0, 0, 0, 0, // ENTRANCE_TYPE_RIDE_ENTRANCE, (4 ), 0, 0, 0, 0, 0, 0, 0, // ENTRANCE_TYPE_RIDE_EXIT, (4 | 1), 0, 0, 0, 0, 0, 0, 0, // ENTRANCE_TYPE_PARK_ENTRANCE }; /** rct2: 0x0098D7F0 */ -static constexpr const uint8 connected_path_count[] = { +static constexpr const uint8_t connected_path_count[] = { 0, // 0b0000 1, // 0b0001 1, // 0b0010 @@ -107,14 +107,14 @@ static constexpr const uint8 connected_path_count[] = { 4, // 0b1111 }; -sint32 entrance_get_directions(const rct_tile_element * tileElement) +int32_t entrance_get_directions(const rct_tile_element * tileElement) { - uint8 entranceType = tileElement->properties.entrance.type; - uint8 sequence = tileElement->properties.entrance.index & 0x0F; + uint8_t entranceType = tileElement->properties.entrance.type; + uint8_t sequence = tileElement->properties.entrance.index & 0x0F; return EntranceDirections[(entranceType * 8) + sequence]; } -static bool entrance_has_direction(rct_tile_element *tileElement, sint32 direction) +static bool entrance_has_direction(rct_tile_element *tileElement, int32_t direction) { return entrance_get_directions(tileElement) & (1 << (direction & 3)); } @@ -125,7 +125,7 @@ static bool entrance_has_direction(rct_tile_element *tileElement, sint32 directi */ static void automatically_set_peep_spawn(CoordsXYZ location) { - uint8 direction = 0; + uint8_t direction = 0; if (location.x != 32) { direction++; if (location.y != gMapSizeUnits - 32) { @@ -145,7 +145,7 @@ static void automatically_set_peep_spawn(CoordsXYZ location) peepSpawn->z = location.z; } -rct_tile_element *map_get_footpath_element(sint32 x, sint32 y, sint32 z) +rct_tile_element *map_get_footpath_element(int32_t x, int32_t y, int32_t z) { rct_tile_element *tileElement; @@ -158,7 +158,7 @@ rct_tile_element *map_get_footpath_element(sint32 x, sint32 y, sint32 z) return nullptr; } -static rct_tile_element *map_get_footpath_element_slope(sint32 x, sint32 y, sint32 z, sint32 slope) +static rct_tile_element *map_get_footpath_element_slope(int32_t x, int32_t y, int32_t z, int32_t slope) { rct_tile_element *tileElement; @@ -176,12 +176,12 @@ static rct_tile_element *map_get_footpath_element_slope(sint32 x, sint32 y, sint return nullptr; } -static void loc_6A6620(sint32 flags, sint32 x, sint32 y, rct_tile_element *tileElement) +static void loc_6A6620(int32_t flags, int32_t x, int32_t y, rct_tile_element *tileElement) { if (footpath_element_is_sloped(tileElement) && !(flags & GAME_COMMAND_FLAG_GHOST)) { - sint32 direction = footpath_element_get_slope_direction(tileElement); - sint32 z = tileElement->base_height; + int32_t direction = footpath_element_get_slope_direction(tileElement); + int32_t z = tileElement->base_height; wall_remove_intersecting_walls(x, y, z, z + 6, direction ^ 2); wall_remove_intersecting_walls(x, y, z, z + 6, direction); // Removing walls may have made the pointer invalid, so find it again @@ -196,14 +196,14 @@ static void loc_6A6620(sint32 flags, sint32 x, sint32 y, rct_tile_element *tileE } /** rct2: 0x0098D7EC */ -static constexpr const uint8 byte_98D7EC[] = { +static constexpr const uint8_t byte_98D7EC[] = { 207, 159, 63, 111 }; -static money32 footpath_element_insert(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 flags, uint8 pathItemType) +static money32 footpath_element_insert(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags, uint8_t pathItemType) { rct_tile_element * tileElement, * entranceElement; - sint32 bl, zHigh; + int32_t bl, zHigh; bool entrancePath = false, entranceIsSamePath = false; if (!map_check_free_elements_and_reorganise(1)) @@ -235,7 +235,7 @@ static money32 footpath_element_insert(sint32 type, sint32 x, sint32 y, sint32 z } // Do not attempt to build a crossing with a queue or a sloped. - uint8 crossingMode = (type & FOOTPATH_ELEMENT_INSERT_QUEUE) || (slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE : CREATE_CROSSING_MODE_PATH_OVER_TRACK; + uint8_t crossingMode = (type & FOOTPATH_ELEMENT_INSERT_QUEUE) || (slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE : CREATE_CROSSING_MODE_PATH_OVER_TRACK; if (!entrancePath && !gCheatsDisableClearanceChecks && !map_can_construct_with_clear_at(x, y, z, zHigh, &map_place_non_scenery_clear_func, bl, flags, &gFootpathPrice, crossingMode)) return MONEY32_UNDEFINED; @@ -247,7 +247,7 @@ static money32 footpath_element_insert(sint32 type, sint32 x, sint32 y, sint32 z tileElement = map_get_surface_element_at({x, y}); - sint32 supportHeight = z - tileElement->base_height; + int32_t supportHeight = z - tileElement->base_height; gFootpathPrice += supportHeight < 0 ? MONEY(20, 00) : (supportHeight / 2) * MONEY(5, 00); if (flags & GAME_COMMAND_FLAG_APPLY) { @@ -295,9 +295,9 @@ static money32 footpath_element_insert(sint32 type, sint32 x, sint32 y, sint32 z return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : gFootpathPrice; } -static money32 footpath_element_update(sint32 x, sint32 y, rct_tile_element *tileElement, sint32 type, sint32 flags, uint8 pathItemType) +static money32 footpath_element_update(int32_t x, int32_t y, rct_tile_element *tileElement, int32_t type, int32_t flags, uint8_t pathItemType) { - const sint32 newFootpathType = (type & (FOOTPATH_PROPERTIES_TYPE_MASK >> 4)); + const int32_t newFootpathType = (type & (FOOTPATH_PROPERTIES_TYPE_MASK >> 4)); const bool newPathIsQueue = ((type >> 7) == 1); if (footpath_element_get_type(tileElement) != newFootpathType || @@ -317,7 +317,7 @@ static money32 footpath_element_update(sint32 x, sint32 y, rct_tile_element *til if (pathItemType != 0) { rct_scenery_entry* scenery_entry = get_footpath_item_entry(pathItemType - 1); - uint16 unk6 = scenery_entry->path_bit.flags; + uint16_t unk6 = scenery_entry->path_bit.flags; if ((unk6 & PATH_BIT_FLAG_DONT_ALLOW_ON_SLOPE) && footpath_element_is_sloped(tileElement)) { gGameCommandErrorText = STR_CANT_BUILD_THIS_ON_SLOPED_FOOTPATH; @@ -402,7 +402,7 @@ static money32 footpath_element_update(sint32 x, sint32 y, rct_tile_element *til return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : gFootpathPrice; } -static money32 footpath_place_real(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 flags, uint8 pathItemType, bool clearDirection, sint32 direction) +static money32 footpath_place_real(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags, uint8_t pathItemType, bool clearDirection, int32_t direction) { rct_tile_element *tileElement; @@ -481,7 +481,7 @@ static money32 footpath_place_real(sint32 type, sint32 x, sint32 y, sint32 z, si * * rct2: 0x006BA23E */ -static void remove_banners_at_element(sint32 x, sint32 y, rct_tile_element* tileElement){ +static void remove_banners_at_element(int32_t x, int32_t y, rct_tile_element* tileElement){ while (!(tileElement++)->IsLastForTile()){ if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH)return; else if (tileElement->GetType() != TILE_ELEMENT_TYPE_BANNER)continue; @@ -491,7 +491,7 @@ static void remove_banners_at_element(sint32 x, sint32 y, rct_tile_element* tile } } -money32 footpath_remove_real(sint32 x, sint32 y, sint32 z, sint32 flags) +money32 footpath_remove_real(int32_t x, int32_t y, int32_t z, int32_t flags) { rct_tile_element *tileElement; rct_tile_element *footpathElement = nullptr; @@ -566,7 +566,7 @@ money32 footpath_remove_real(sint32 x, sint32 y, sint32 z, sint32 flags) * rct2: 0x006A61DE */ void game_command_place_footpath( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = footpath_place_real( (*edx >> 8) & 0xFF, @@ -581,7 +581,7 @@ void game_command_place_footpath( ); } -static money32 footpath_place_from_track(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 edges, sint32 flags) +static money32 footpath_place_from_track(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t edges, int32_t flags) { rct_tile_element * tileElement, * entranceElement; bool entrancePath = false, entranceIsSamePath = false; @@ -626,8 +626,8 @@ static money32 footpath_place_from_track(sint32 type, sint32 x, sint32 y, sint32 } gFootpathPrice += 120; - uint8 bl = 15; - sint32 zHigh = z + 4; + uint8_t bl = 15; + int32_t zHigh = z + 4; if (slope & TILE_ELEMENT_SLOPE_S_CORNER_UP) { bl = byte_98D7EC[slope & TILE_ELEMENT_SLOPE_NE_SIDE_UP]; zHigh += 2; @@ -646,7 +646,7 @@ static money32 footpath_place_from_track(sint32 type, sint32 x, sint32 y, sint32 } // Do not attempt to build a crossing with a queue or a sloped. - uint8 crossingMode = (type & FOOTPATH_ELEMENT_INSERT_QUEUE) || (slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE : CREATE_CROSSING_MODE_PATH_OVER_TRACK; + uint8_t crossingMode = (type & FOOTPATH_ELEMENT_INSERT_QUEUE) || (slope != TILE_ELEMENT_SLOPE_FLAT) ? CREATE_CROSSING_MODE_NONE : CREATE_CROSSING_MODE_PATH_OVER_TRACK; if (!entrancePath && !gCheatsDisableClearanceChecks && !map_can_construct_with_clear_at(x, y, z, zHigh, &map_place_non_scenery_clear_func, bl, flags, &gFootpathPrice, crossingMode)) return MONEY32_UNDEFINED; @@ -658,7 +658,7 @@ static money32 footpath_place_from_track(sint32 type, sint32 x, sint32 y, sint32 tileElement = map_get_surface_element_at({x, y}); - sint32 supportHeight = z - tileElement->base_height; + int32_t supportHeight = z - tileElement->base_height; gFootpathPrice += supportHeight < 0 ? MONEY(20, 00) : (supportHeight / 2) * MONEY(5, 00); if (flags & GAME_COMMAND_FLAG_APPLY) { @@ -709,13 +709,13 @@ static money32 footpath_place_from_track(sint32 type, sint32 x, sint32 y, sint32 * rct2: 0x006A68AE */ void game_command_place_footpath_from_track( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = footpath_place_from_track( (*edx >> 8) & 0xFF, @@ -733,28 +733,28 @@ void game_command_place_footpath_from_track( * rct2: 0x006A67C0 */ void game_command_remove_footpath( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = footpath_remove_real((*eax & 0xFFFF), (*ecx & 0xFFFF), (*edx & 0xFF), (*ebx & 0xFF)); } -money32 footpath_place(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 flags) +money32 footpath_place(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags) { return game_do_command(x, (slope << 8) | flags, y, (type << 8) | z, GAME_COMMAND_PLACE_PATH, 0, 0); } -money32 footpath_place_remove_intersecting(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 flags, sint32 direction) +money32 footpath_place_remove_intersecting(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags, int32_t direction) { return game_do_command(x, (slope << 8) | flags, y, (type << 8) | z, GAME_COMMAND_PLACE_PATH, 0, FOOTPATH_CLEAR_DIRECTIONAL | direction); } -void footpath_remove(sint32 x, sint32 y, sint32 z, sint32 flags) +void footpath_remove(int32_t x, int32_t y, int32_t z, int32_t flags) { game_do_command(x, flags, y, z, GAME_COMMAND_REMOVE_PATH, 0, 0); } @@ -763,7 +763,7 @@ void footpath_remove(sint32 x, sint32 y, sint32 z, sint32 flags) * * rct2: 0x006A76FF */ -money32 footpath_provisional_set(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope) +money32 footpath_provisional_set(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope) { money32 cost; @@ -862,9 +862,9 @@ void footpath_provisional_update() * direction: ecx * tileElement: edx */ -void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 *x, sint32 *y, sint32 *direction, rct_tile_element **tileElement) +void footpath_get_coordinates_from_pos(int32_t screenX, int32_t screenY, int32_t *x, int32_t *y, int32_t *direction, rct_tile_element **tileElement) { - sint32 z = 0, interactionType; + int32_t z = 0, interactionType; rct_tile_element *myTileElement; rct_viewport *viewport; LocationXY16 position = {}; @@ -879,7 +879,7 @@ void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 *x } LocationXY16 minPosition = position; - LocationXY16 maxPosition = { sint16(position.x + 31), sint16(position.y + 31) }; + LocationXY16 maxPosition = { int16_t(position.x + 31), int16_t(position.y + 31) }; position.x += 16; position.y += 16; @@ -893,7 +893,7 @@ void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 *x LocationXY16 start_vp_pos = screen_coord_to_viewport_coord(viewport, screenX, screenY); - for (sint32 i = 0; i < 5; i++) { + for (int32_t i = 0; i < 5; i++) { if (interactionType != VIEWPORT_INTERACTION_ITEM_FOOTPATH) { z = tile_element_height(position.x, position.y); } @@ -903,8 +903,8 @@ void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 *x } // Determine to which edge the cursor is closest - uint32 myDirection; - sint32 mod_x = position.x & 0x1F, mod_y = position.y & 0x1F; + uint32_t myDirection; + int32_t mod_x = position.x & 0x1F, mod_y = position.y & 0x1F; if (mod_x < mod_y) { if (mod_x + mod_y < 32) { myDirection = 0; @@ -935,10 +935,10 @@ void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 *x * direction: cl * tileElement: edx */ -void footpath_bridge_get_info_from_pos(sint32 screenX, sint32 screenY, sint32 *x, sint32 *y, sint32 *direction, rct_tile_element **tileElement) +void footpath_bridge_get_info_from_pos(int32_t screenX, int32_t screenY, int32_t *x, int32_t *y, int32_t *direction, rct_tile_element **tileElement) { // First check if we point at an entrance or exit. In that case, we would want the path coming from the entrance/exit. - sint32 interactionType; + int32_t interactionType; rct_viewport *viewport; LocationXY16 map_pos = {}; @@ -950,9 +950,9 @@ void footpath_bridge_get_info_from_pos(sint32 screenX, sint32 screenY, sint32 *x && viewport->flags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_VERTICAL) && (*tileElement)->GetType() == TILE_ELEMENT_TYPE_ENTRANCE ) { - sint32 directions = entrance_get_directions(*tileElement); + int32_t directions = entrance_get_directions(*tileElement); if (directions & 0x0F) { - sint32 bx = bitscanforward(directions); + int32_t bx = bitscanforward(directions); bx += (*tileElement)->type; bx &= 3; if (direction != nullptr) *direction = bx; @@ -964,9 +964,9 @@ void footpath_bridge_get_info_from_pos(sint32 screenX, sint32 screenY, sint32 *x *x = map_pos.x; *y = map_pos.y; if (interactionType == VIEWPORT_INTERACTION_ITEM_RIDE && (*tileElement)->GetType() == TILE_ELEMENT_TYPE_ENTRANCE) { - sint32 directions = entrance_get_directions(*tileElement); + int32_t directions = entrance_get_directions(*tileElement); if (directions & 0x0F) { - sint32 bx = tile_element_get_direction_with_offset(*tileElement, bitscanforward(directions)); + int32_t bx = tile_element_get_direction_with_offset(*tileElement, bitscanforward(directions)); if (direction != nullptr) *direction = bx; return; } @@ -980,14 +980,14 @@ void footpath_bridge_get_info_from_pos(sint32 screenX, sint32 screenY, sint32 *x * * rct2: 0x00673883 */ -void footpath_remove_litter(sint32 x, sint32 y, sint32 z) +void footpath_remove_litter(int32_t x, int32_t y, int32_t z) { - uint16 spriteIndex = sprite_get_first_in_quadrant(x, y); + uint16_t spriteIndex = sprite_get_first_in_quadrant(x, y); while (spriteIndex != SPRITE_INDEX_NULL) { rct_litter *sprite = &get_sprite(spriteIndex)->litter; - uint16 nextSpriteIndex = sprite->next_in_quadrant; + uint16_t nextSpriteIndex = sprite->next_in_quadrant; if (sprite->linked_list_type_offset == SPRITE_LIST_LITTER * 2) { - sint32 distanceZ = abs(sprite->z - z); + int32_t distanceZ = abs(sprite->z - z); if (distanceZ <= 32) { invalidate_sprite_0((rct_sprite*)sprite); sprite_remove((rct_sprite*)sprite); @@ -1001,12 +1001,12 @@ void footpath_remove_litter(sint32 x, sint32 y, sint32 z) * * rct2: 0x0069A48B */ -void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z) +void footpath_interrupt_peeps(int32_t x, int32_t y, int32_t z) { - uint16 spriteIndex = sprite_get_first_in_quadrant(x, y); + uint16_t spriteIndex = sprite_get_first_in_quadrant(x, y); while (spriteIndex != SPRITE_INDEX_NULL) { rct_peep *peep = &get_sprite(spriteIndex)->peep; - uint16 nextSpriteIndex = peep->next_in_quadrant; + uint16_t nextSpriteIndex = peep->next_in_quadrant; if (peep->linked_list_type_offset == SPRITE_LIST_PEEP * 2) { if (peep->state == PEEP_STATE_SITTING || peep->state == PEEP_STATE_WATCHING) { if (peep->z == z) { @@ -1026,7 +1026,7 @@ void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z) * * rct2: 0x006E59DC */ -bool fence_in_the_way(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction) +bool fence_in_the_way(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t direction) { rct_tile_element *tileElement; @@ -1050,7 +1050,7 @@ bool fence_in_the_way(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction return false; } -static rct_tile_element *footpath_connect_corners_get_neighbour(sint32 x, sint32 y, sint32 z, sint32 requireEdges) +static rct_tile_element *footpath_connect_corners_get_neighbour(int32_t x, int32_t y, int32_t z, int32_t requireEdges) { if (!map_is_location_valid({x, y})) { @@ -1082,7 +1082,7 @@ static rct_tile_element *footpath_connect_corners_get_neighbour(sint32 x, sint32 * * rct2: 0x006A70EB */ -static void footpath_connect_corners(sint32 initialX, sint32 initialY, rct_tile_element *initialTileElement) +static void footpath_connect_corners(int32_t initialX, int32_t initialY, rct_tile_element *initialTileElement) { rct_tile_element *tileElement[4]; @@ -1092,11 +1092,11 @@ static void footpath_connect_corners(sint32 initialX, sint32 initialY, rct_tile_ return; tileElement[0] = initialTileElement; - sint32 z = initialTileElement->base_height; - for (sint32 initialDirection = 0; initialDirection < 4; initialDirection++) { - sint32 x = initialX; - sint32 y = initialY; - sint32 direction = initialDirection; + int32_t z = initialTileElement->base_height; + for (int32_t initialDirection = 0; initialDirection < 4; initialDirection++) { + int32_t x = initialX; + int32_t y = initialY; + int32_t direction = initialDirection; x += CoordsDirectionDelta[direction].x; y += CoordsDirectionDelta[direction].y; @@ -1142,10 +1142,10 @@ static void footpath_connect_corners(sint32 initialX, sint32 initialY, rct_tile_ } struct rct_neighbour { - uint8 order; - uint8 direction; - uint8 ride_index; - uint8 entrance_index; + uint8_t order; + uint8_t direction; + uint8_t ride_index; + uint8_t entrance_index; }; struct rct_neighbour_list { @@ -1153,15 +1153,15 @@ struct rct_neighbour_list { size_t count; }; -static sint32 rct_neighbour_compare(const void *a, const void *b) +static int32_t rct_neighbour_compare(const void *a, const void *b) { - uint8 va = ((rct_neighbour*)a)->order; - uint8 vb = ((rct_neighbour*)b)->order; + uint8_t va = ((rct_neighbour*)a)->order; + uint8_t vb = ((rct_neighbour*)b)->order; if (va < vb) return 1; else if (va > vb) return -1; else { - uint8 da = ((rct_neighbour*)a)->direction; - uint8 db = ((rct_neighbour*)b)->direction; + uint8_t da = ((rct_neighbour*)a)->direction; + uint8_t db = ((rct_neighbour*)b)->direction; if (da < db) return -1; else if (da > db) return 1; else return 0; @@ -1173,7 +1173,7 @@ static void neighbour_list_init(rct_neighbour_list *neighbourList) neighbourList->count = 0; } -static void neighbour_list_push(rct_neighbour_list *neighbourList, sint32 order, sint32 direction, uint8 rideIndex, uint8 entrance_index) +static void neighbour_list_push(rct_neighbour_list *neighbourList, int32_t order, int32_t direction, uint8_t rideIndex, uint8_t entrance_index) { Guard::Assert(neighbourList->count < Util::CountOf(neighbourList->items)); neighbourList->items[neighbourList->count].order = order; @@ -1198,7 +1198,7 @@ static bool neighbour_list_pop(rct_neighbour_list *neighbourList, rct_neighbour static void neighbour_list_remove(rct_neighbour_list *neighbourList, size_t index) { Guard::ArgumentInRange(index, 0, neighbourList->count - 1); - sint32 itemsRemaining = (sint32)(neighbourList->count - index) - 1; + int32_t itemsRemaining = (int32_t)(neighbourList->count - index) - 1; if (itemsRemaining > 0) { memmove(&neighbourList->items[index], &neighbourList->items[index + 1], sizeof(rct_neighbour) * itemsRemaining); } @@ -1210,10 +1210,10 @@ static void neighbour_list_sort(rct_neighbour_list *neighbourList) qsort(neighbourList->items, neighbourList->count, sizeof(rct_neighbour), rct_neighbour_compare); } -static rct_tile_element *footpath_get_element(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction) +static rct_tile_element *footpath_get_element(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t direction) { rct_tile_element *tileElement; - sint32 slope; + int32_t slope; tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -1242,15 +1242,15 @@ static rct_tile_element *footpath_get_element(sint32 x, sint32 y, sint32 z0, sin return nullptr; } -static bool sub_footpath_disconnect_queue_from_path(sint32 x, sint32 y, rct_tile_element *tileElement, sint32 action, sint32 direction) { +static bool sub_footpath_disconnect_queue_from_path(int32_t x, int32_t y, rct_tile_element *tileElement, int32_t action, int32_t direction) { if (((tileElement->properties.path.edges & (1 << direction)) == 0) ^ (action < 0)) return false; if ((action < 0) && fence_in_the_way(x, y, tileElement->base_height, tileElement->clearance_height, direction)) return false; - sint32 x1 = x + CoordsDirectionDelta[direction].x; - sint32 y1 = y + CoordsDirectionDelta[direction].y; - sint32 z = tileElement->base_height; + int32_t x1 = x + CoordsDirectionDelta[direction].x; + int32_t y1 = y + CoordsDirectionDelta[direction].y; + int32_t z = tileElement->base_height; rct_tile_element *otherTileElement = footpath_get_element(x1, y1, z - 2, z, direction); if (otherTileElement != nullptr && !footpath_element_is_queue(otherTileElement)) { tileElement->properties.path.type &= ~FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK; @@ -1269,21 +1269,21 @@ static bool sub_footpath_disconnect_queue_from_path(sint32 x, sint32 y, rct_tile return false; } -static bool footpath_disconnect_queue_from_path(sint32 x, sint32 y, rct_tile_element *tileElement, sint32 action) { +static bool footpath_disconnect_queue_from_path(int32_t x, int32_t y, rct_tile_element *tileElement, int32_t action) { if (!footpath_element_is_queue(tileElement)) return false; if (footpath_element_is_sloped(tileElement)) return false; - uint8 c = connected_path_count[tileElement->properties.path.edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK]; + uint8_t c = connected_path_count[tileElement->properties.path.edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK]; if ((action < 0) ? (c >= 2) : (c < 2)) return false; if (action < 0) { - uint8 direction = footpath_element_get_slope_direction(tileElement); + uint8_t direction = footpath_element_get_slope_direction(tileElement); if (sub_footpath_disconnect_queue_from_path(x, y, tileElement, action, direction)) return true; } - for (sint32 direction = 0; direction < 4; direction++) { + for (int32_t direction = 0; direction < 4; direction++) { if ((action < 0) && (direction == footpath_element_get_slope_direction(tileElement))) continue; if (sub_footpath_disconnect_queue_from_path(x, y, tileElement, action, direction)) @@ -1298,11 +1298,11 @@ static bool footpath_disconnect_queue_from_path(sint32 x, sint32 y, rct_tile_ele * rct2: 0x006A6D7E */ static void loc_6A6D7E( - sint32 initialX, sint32 initialY, sint32 z, sint32 direction, rct_tile_element *initialTileElement, - sint32 flags, bool query, rct_neighbour_list *neighbourList + int32_t initialX, int32_t initialY, int32_t z, int32_t direction, rct_tile_element *initialTileElement, + int32_t flags, bool query, rct_neighbour_list *neighbourList ) { - sint32 x = initialX + CoordsDirectionDelta[direction].x; - sint32 y = initialY + CoordsDirectionDelta[direction].y; + int32_t x = initialX + CoordsDirectionDelta[direction].x; + int32_t y = initialY + CoordsDirectionDelta[direction].y; if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && map_is_edge({x, y})) { if (query) { neighbour_list_push(neighbourList, 7, direction, 255, 255); @@ -1333,12 +1333,12 @@ static void loc_6A6D7E( continue; } - const uint8 trackType = track_element_get_type(tileElement); - const uint8 trackSequence = tile_element_get_track_sequence(tileElement); + const uint8_t trackType = track_element_get_type(tileElement); + const uint8_t trackSequence = tile_element_get_track_sequence(tileElement); if (!(FlatRideTrackSequenceProperties[trackType][trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)) { return; } - uint16 dx = ((direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK) ^ 2; + uint16_t dx = ((direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK) ^ 2; if (!(FlatRideTrackSequenceProperties[trackType][trackSequence] & (1 << dx))) { return; } @@ -1408,8 +1408,8 @@ loc_6A6FD2: } static void loc_6A6C85( - sint32 x, sint32 y, sint32 direction, rct_tile_element *tileElement, - sint32 flags, bool query, rct_neighbour_list *neighbourList + int32_t x, int32_t y, int32_t direction, rct_tile_element *tileElement, + int32_t flags, bool query, rct_neighbour_list *neighbourList ) { if (query && fence_in_the_way(x, y, tileElement->base_height, tileElement->clearance_height, direction)) return; @@ -1425,18 +1425,18 @@ static void loc_6A6C85( if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) { return; } - const uint8 trackType = track_element_get_type(tileElement); - const uint8 trackSequence = tile_element_get_track_sequence(tileElement); + const uint8_t trackType = track_element_get_type(tileElement); + const uint8_t trackSequence = tile_element_get_track_sequence(tileElement); if (!(FlatRideTrackSequenceProperties[trackType][trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)) { return; } - uint16 dx = (direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK; + uint16_t dx = (direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK; if (!(FlatRideTrackSequenceProperties[trackType][trackSequence] & (1 << dx))) { return; } } - sint32 z = tileElement->base_height; + int32_t z = tileElement->base_height; if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH) { if (footpath_element_is_sloped(tileElement)) { if ((footpath_element_get_slope_direction(tileElement) - direction) & 1) { @@ -1455,7 +1455,7 @@ static void loc_6A6C85( * * rct2: 0x006A6C66 */ -void footpath_connect_edges(sint32 x, sint32 y, rct_tile_element *tileElement, sint32 flags) +void footpath_connect_edges(int32_t x, int32_t y, rct_tile_element *tileElement, int32_t flags) { rct_neighbour_list neighbourList; rct_neighbour neighbour; @@ -1465,15 +1465,15 @@ void footpath_connect_edges(sint32 x, sint32 y, rct_tile_element *tileElement, s neighbour_list_init(&neighbourList); footpath_update_queue_entrance_banner(x, y, tileElement); - for (sint32 direction = 0; direction < 4; direction++) { + for (int32_t direction = 0; direction < 4; direction++) { loc_6A6C85(x, y, direction, tileElement, flags, true, &neighbourList); } neighbour_list_sort(&neighbourList); if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH && footpath_element_is_queue(tileElement)) { - sint32 rideIndex = -1; - uint8 entranceIndex = 255; + int32_t rideIndex = -1; + uint8_t entranceIndex = 255; for (size_t i = 0; i < neighbourList.count; i++) { if (neighbourList.items[i].ride_index != 255) { if (rideIndex == -1) { @@ -1505,14 +1505,14 @@ void footpath_connect_edges(sint32 x, sint32 y, rct_tile_element *tileElement, s * * rct2: 0x006A742F */ -void footpath_chain_ride_queue(sint32 rideIndex, sint32 entranceIndex, sint32 x, sint32 y, rct_tile_element *tileElement, sint32 direction) +void footpath_chain_ride_queue(int32_t rideIndex, int32_t entranceIndex, int32_t x, int32_t y, rct_tile_element *tileElement, int32_t direction) { rct_tile_element *lastPathElement, *lastQueuePathElement; - sint32 lastPathX = x, lastPathY = y, lastPathDirection = direction; + int32_t lastPathX = x, lastPathY = y, lastPathDirection = direction; lastPathElement = nullptr; lastQueuePathElement = nullptr; - sint32 z = tileElement->base_height; + int32_t z = tileElement->base_height; for (;;) { if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH) { lastPathElement = tileElement; @@ -1558,10 +1558,10 @@ void footpath_chain_ride_queue(sint32 rideIndex, sint32 entranceIndex, sint32 x, if (footpath_element_is_queue(tileElement)) { // Fix #2051: Stop queue paths that are already connected to two other tiles // from connecting to the tile we are coming from. - sint32 edges = tileElement->properties.path.edges; - sint32 numEdges = bitcount(edges); + int32_t edges = tileElement->properties.path.edges; + int32_t numEdges = bitcount(edges); if (numEdges >= 2) { - sint32 requiredEdgeMask = 1 << (direction ^ 2); + int32_t requiredEdgeMask = 1 << (direction ^ 2); if (!(edges & requiredEdgeMask)) { break; } @@ -1618,10 +1618,10 @@ void footpath_queue_chain_reset() * * rct2: 0x006A76E9 */ -void footpath_queue_chain_push(uint8 rideIndex) +void footpath_queue_chain_push(uint8_t rideIndex) { if (rideIndex != 255) { - uint8 * lastSlot = _footpathQueueChain + Util::CountOf(_footpathQueueChain) - 1; + uint8_t * lastSlot = _footpathQueueChain + Util::CountOf(_footpathQueueChain) - 1; if (_footpathQueueChainNext <= lastSlot) { *_footpathQueueChainNext++ = rideIndex; } @@ -1634,14 +1634,14 @@ void footpath_queue_chain_push(uint8 rideIndex) */ void footpath_update_queue_chains() { - for (uint8 * queueChainPtr = _footpathQueueChain; queueChainPtr < _footpathQueueChainNext; queueChainPtr++) + for (uint8_t * queueChainPtr = _footpathQueueChain; queueChainPtr < _footpathQueueChainNext; queueChainPtr++) { - uint8 rideIndex = *queueChainPtr; + uint8_t rideIndex = *queueChainPtr; Ride * ride = get_ride(rideIndex); if (ride->type == RIDE_TYPE_NULL) continue; - for (sint32 i = 0; i < MAX_STATIONS; i++) + for (int32_t i = 0; i < MAX_STATIONS; i++) { TileCoordsXYZD location = ride_get_entrance_location(rideIndex, i); if (location.isNull()) @@ -1657,7 +1657,7 @@ void footpath_update_queue_chains() if (tileElement->properties.entrance.ride_index != rideIndex) continue; - uint8 direction = tile_element_get_direction_with_offset(tileElement, 2); + uint8_t direction = tile_element_get_direction_with_offset(tileElement, 2); footpath_chain_ride_queue(rideIndex, i, location.x << 5, location.y << 5, tileElement, direction); } while (!(tileElement++)->IsLastForTile()); } @@ -1668,10 +1668,10 @@ void footpath_update_queue_chains() * * rct2: 0x0069ADBD */ -static void footpath_fix_ownership(sint32 x, sint32 y) +static void footpath_fix_ownership(int32_t x, int32_t y) { const rct_tile_element * surfaceElement = map_get_surface_element_at({x, y}); - uint16 ownership; + uint16_t ownership; // Unlikely to be NULL unless deliberate. if (surfaceElement != nullptr) @@ -1700,9 +1700,9 @@ static void footpath_fix_ownership(sint32 x, sint32 y) map_buy_land_rights(x, y, x, y, BUY_LAND_RIGHTS_FLAG_SET_OWNERSHIP_WITH_CHECKS, (ownership << 4) | GAME_COMMAND_FLAG_APPLY); } -static bool get_next_direction(sint32 edges, sint32 *direction) +static bool get_next_direction(int32_t edges, int32_t *direction) { - sint32 index = bitscanforward(edges); + int32_t index = bitscanforward(edges); if (index == -1) return false; @@ -1717,12 +1717,12 @@ static bool get_next_direction(sint32 edges, sint32 *direction) * (1 << 5): Unown * (1 << 7): Ignore no entry signs */ -static sint32 footpath_is_connected_to_map_edge_recurse( - sint32 x, sint32 y, sint32 z, sint32 direction, sint32 flags, - sint32 level, sint32 distanceFromJunction, sint32 junctionTolerance +static int32_t footpath_is_connected_to_map_edge_recurse( + int32_t x, int32_t y, int32_t z, int32_t direction, int32_t flags, + int32_t level, int32_t distanceFromJunction, int32_t junctionTolerance ) { rct_tile_element *tileElement; - sint32 edges, slopeDirection; + int32_t edges, slopeDirection; x += CoordsDirectionDelta[direction].x; y += CoordsDirectionDelta[direction].y; @@ -1763,14 +1763,14 @@ static sint32 footpath_is_connected_to_map_edge_recurse( direction ^= 2; if (!(flags & (1 << 7))) { if (tileElement[1].type == TILE_ELEMENT_TYPE_BANNER) { - for (sint32 i = 1; i < 4; i++) { + for (int32_t i = 1; i < 4; i++) { if ((&tileElement[i - 1])->IsLastForTile()) break; if (tileElement[i].type != TILE_ELEMENT_TYPE_BANNER) break; edges &= tileElement[i].properties.banner.flags; } } if (tileElement[2].type == TILE_ELEMENT_TYPE_BANNER && tileElement[1].type != TILE_ELEMENT_TYPE_PATH) { - for (sint32 i = 1; i < 6; i++) { + for (int32_t i = 1; i < 6; i++) { if ((&tileElement[i - 1])->IsLastForTile()) break; if (tileElement[i].type != TILE_ELEMENT_TYPE_BANNER) break; edges &= tileElement[i].properties.banner.flags; @@ -1816,7 +1816,7 @@ searchFromFootpath: if (footpath_element_is_sloped(tileElement) && footpath_element_get_slope_direction(tileElement) == direction) { z += 2; } - sint32 result = footpath_is_connected_to_map_edge_recurse(x, y, z, direction, flags, level, 0, junctionTolerance); + int32_t result = footpath_is_connected_to_map_edge_recurse(x, y, z, direction, flags, level, 0, junctionTolerance); if (result == FOOTPATH_SEARCH_SUCCESS) { return result; } @@ -1826,7 +1826,7 @@ searchFromFootpath: } } -sint32 footpath_is_connected_to_map_edge(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 flags) +int32_t footpath_is_connected_to_map_edge(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t flags) { flags |= (1 << 0); return footpath_is_connected_to_map_edge_recurse(x, y, z, direction, flags, 0, 0, 16); @@ -1844,7 +1844,7 @@ void footpath_element_set_sloped(rct_tile_element * tileElement, bool isSloped) tileElement->properties.path.type |= FOOTPATH_PROPERTIES_FLAG_IS_SLOPED; } -uint8 footpath_element_get_slope_direction(const rct_tile_element * tileElement) +uint8_t footpath_element_get_slope_direction(const rct_tile_element * tileElement) { return tileElement->properties.path.type & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK; } @@ -1886,18 +1886,18 @@ bool footpath_element_has_path_scenery(const rct_tile_element * tileElement) return footpath_element_get_path_scenery(tileElement) != 0; } -uint8 footpath_element_get_path_scenery(const rct_tile_element * tileElement) +uint8_t footpath_element_get_path_scenery(const rct_tile_element * tileElement) { return tileElement->properties.path.additions & FOOTPATH_PROPERTIES_ADDITIONS_TYPE_MASK; } -void footpath_element_set_path_scenery(rct_tile_element * tileElement, uint8 pathSceneryType) +void footpath_element_set_path_scenery(rct_tile_element * tileElement, uint8_t pathSceneryType) { tileElement->properties.path.additions &= ~FOOTPATH_PROPERTIES_ADDITIONS_TYPE_MASK; tileElement->properties.path.additions |= pathSceneryType; } -uint8 footpath_element_get_path_scenery_index(const rct_tile_element * tileElement) +uint8_t footpath_element_get_path_scenery_index(const rct_tile_element * tileElement) { return footpath_element_get_path_scenery(tileElement) - 1; } @@ -1916,23 +1916,23 @@ void footpath_scenery_set_is_ghost(rct_tile_element * tileElement, bool isGhost) tileElement->properties.path.additions |= FOOTPATH_ADDITION_FLAG_IS_GHOST; } -uint8 footpath_element_get_type(const rct_tile_element * tileElement) +uint8_t footpath_element_get_type(const rct_tile_element * tileElement) { return (tileElement->properties.path.type & FOOTPATH_PROPERTIES_TYPE_MASK) >> 4; } -void footpath_element_set_type(rct_tile_element * tileElement, uint8 type) +void footpath_element_set_type(rct_tile_element * tileElement, uint8_t type) { tileElement->properties.path.type &= ~FOOTPATH_PROPERTIES_TYPE_MASK; tileElement->properties.path.type |= (type << 4); } -uint8 footpath_element_get_direction(const rct_tile_element * tileElement) +uint8_t footpath_element_get_direction(const rct_tile_element * tileElement) { return ((tileElement->type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6); } -void footpath_element_set_direction(rct_tile_element * tileElement, uint8 direction) +void footpath_element_set_direction(rct_tile_element * tileElement, uint8_t direction) { tileElement->type &= ~FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK; tileElement->type |= (direction << 6); @@ -1944,7 +1944,7 @@ void footpath_element_set_direction(rct_tile_element * tileElement, uint8 direct * clears the wide footpath flag for all footpaths * at location */ -static void footpath_clear_wide(sint32 x, sint32 y) +static void footpath_clear_wide(int32_t x, int32_t y) { rct_tile_element *tileElement = map_get_first_element_at(x / 32, y / 32); do @@ -1962,7 +1962,7 @@ static void footpath_clear_wide(sint32 x, sint32 y) * returns footpath element if it can be made wide * returns NULL if it can not be made wide */ -static rct_tile_element* footpath_can_be_wide(sint32 x, sint32 y, uint8 height) +static rct_tile_element* footpath_can_be_wide(int32_t x, int32_t y, uint8_t height) { rct_tile_element *tileElement = map_get_first_element_at(x / 32, y / 32); do { @@ -1985,7 +1985,7 @@ static rct_tile_element* footpath_can_be_wide(sint32 x, sint32 y, uint8 height) * * rct2: 0x006A87BB */ -void footpath_update_path_wide_flags(sint32 x, sint32 y) +void footpath_update_path_wide_flags(int32_t x, int32_t y) { if (x < 0x20) return; @@ -2029,7 +2029,7 @@ void footpath_update_path_wide_flags(sint32 x, sint32 y) if ((tileElement->properties.path.edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK) == 0) continue; - uint8 height = tileElement->base_height; + uint8_t height = tileElement->base_height; // pathList is a list of elements, set by sub_6A8ACF adjacent to x,y // Spanned from 0x00F3EFA8 to 0x00F3EFC7 (8 elements) in the original @@ -2054,7 +2054,7 @@ void footpath_update_path_wide_flags(sint32 x, sint32 y) pathList[7] = footpath_can_be_wide(x, y, height); y += 0x20; - uint8 F3EFA5 = 0; + uint8_t F3EFA5 = 0; if (tileElement->properties.path.edges & EDGE_NW) { F3EFA5 |= 0x80; if (pathList[7] != nullptr) { @@ -2164,7 +2164,7 @@ void footpath_update_path_wide_flags(sint32 x, sint32 y) F3EFA5 &= ~0x20; if (!(F3EFA5 & (0x2 | 0x8 | 0x20 | 0x80))) { - uint8 e = tileElement->properties.path.edges; + uint8_t e = tileElement->properties.path.edges; if ((e != 0b10101111) && (e != 0b01011111) && (e != 0b11101111)) footpath_element_set_wide(tileElement, true); } @@ -2181,14 +2181,14 @@ bool footpath_is_blocked_by_vehicle(const TileCoordsXYZ& position) * * rct2: 0x006A7642 */ -void footpath_update_queue_entrance_banner(sint32 x, sint32 y, rct_tile_element *tileElement) +void footpath_update_queue_entrance_banner(int32_t x, int32_t y, rct_tile_element *tileElement) { - sint32 elementType = tileElement->GetType(); + int32_t elementType = tileElement->GetType(); switch (elementType) { case TILE_ELEMENT_TYPE_PATH: if (footpath_element_is_queue(tileElement)) { footpath_queue_chain_push(tileElement->properties.path.ride_index); - for (sint32 direction = 0; direction < 4; direction++) { + for (int32_t direction = 0; direction < 4; direction++) { if (tileElement->properties.path.edges & (1 << direction)) { footpath_chain_ride_queue(255, 0, x, y, tileElement, direction); } @@ -2209,9 +2209,9 @@ void footpath_update_queue_entrance_banner(sint32 x, sint32 y, rct_tile_element * * rct2: 0x006A6B7F */ -static void footpath_remove_edges_towards_here(sint32 x, sint32 y, sint32 z, sint32 direction, rct_tile_element *tileElement, bool isQueue) +static void footpath_remove_edges_towards_here(int32_t x, int32_t y, int32_t z, int32_t direction, rct_tile_element *tileElement, bool isQueue) { - sint32 d; + int32_t d; if (footpath_element_is_queue(tileElement)) { footpath_queue_chain_push(tileElement->properties.path.ride_index); @@ -2252,7 +2252,7 @@ static void footpath_remove_edges_towards_here(sint32 x, sint32 y, sint32 z, sin * * rct2: 0x006A6B14 */ -static void footpath_remove_edges_towards(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction, bool isQueue) +static void footpath_remove_edges_towards(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t direction, bool isQueue) { if (!map_is_location_valid({x, y})) { @@ -2269,7 +2269,7 @@ static void footpath_remove_edges_towards(sint32 x, sint32 y, sint32 z0, sint32 { if (footpath_element_is_sloped(tileElement)) { - uint8 slope = footpath_element_get_slope_direction(tileElement); + uint8_t slope = footpath_element_get_slope_direction(tileElement); if (slope != direction) break; } @@ -2282,7 +2282,7 @@ static void footpath_remove_edges_towards(sint32 x, sint32 y, sint32 z0, sint32 if (!footpath_element_is_sloped(tileElement)) break; - uint8 slope = footpath_element_get_slope_direction(tileElement) ^ 2; + uint8_t slope = footpath_element_get_slope_direction(tileElement) ^ 2; if (slope != direction) break; @@ -2330,11 +2330,11 @@ bool tile_element_wants_path_connection_towards(TileCoordsXYZD coords, const rct if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) break; - const uint8 trackType = track_element_get_type(tileElement); - const uint8 trackSequence = tile_element_get_track_sequence(tileElement); + const uint8_t trackType = track_element_get_type(tileElement); + const uint8_t trackSequence = tile_element_get_track_sequence(tileElement); if (FlatRideTrackSequenceProperties[trackType][trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH) { - uint16 dx = ((coords.direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK); + uint16_t dx = ((coords.direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK); if (FlatRideTrackSequenceProperties[trackType][trackSequence] & (1 << dx)) { // Track element has the flags required for the given direction @@ -2362,10 +2362,10 @@ bool tile_element_wants_path_connection_towards(TileCoordsXYZD coords, const rct } // fix up the corners around the given path element that gets removed -static void footpath_fix_corners_around(sint32 x, sint32 y, rct_tile_element * pathElement) +static void footpath_fix_corners_around(int32_t x, int32_t y, rct_tile_element * pathElement) { // A mask for the paths' corners of each possible neighbour - static constexpr uint8 cornersTouchingTile[3][3] = { + static constexpr uint8_t cornersTouchingTile[3][3] = { { 0b0010, 0b0011, 0b0001 }, { 0b0110, 0b0000, 0b1001 }, { 0b0100, 0b1100, 0b1000 }, @@ -2375,9 +2375,9 @@ static void footpath_fix_corners_around(sint32 x, sint32 y, rct_tile_element * p if (footpath_element_is_sloped(pathElement)) return; - for (sint32 xOffset = -1; xOffset <= 1; xOffset++) + for (int32_t xOffset = -1; xOffset <= 1; xOffset++) { - for (sint32 yOffset = -1; yOffset <= 1; yOffset++) + for (int32_t yOffset = -1; yOffset <= 1; yOffset++) { // Skip self if (xOffset == 0 && yOffset == 0) @@ -2393,8 +2393,8 @@ static void footpath_fix_corners_around(sint32 x, sint32 y, rct_tile_element * p if (tileElement->base_height != pathElement->base_height) continue; - const sint32 ix = xOffset + 1; - const sint32 iy = yOffset + 1; + const int32_t ix = xOffset + 1; + const int32_t iy = yOffset + 1; tileElement->properties.path.edges &= ~(cornersTouchingTile[iy][ix] << 4); } while (!(tileElement++)->IsLastForTile()); } @@ -2407,10 +2407,10 @@ static void footpath_fix_corners_around(sint32 x, sint32 y, rct_tile_element * p * @param x x-coordinate in units (not tiles) * @param y y-coordinate in units (not tiles) */ -void footpath_remove_edges_at(sint32 x, sint32 y, rct_tile_element *tileElement) +void footpath_remove_edges_at(int32_t x, int32_t y, rct_tile_element *tileElement) { if (tileElement->GetType() == TILE_ELEMENT_TYPE_TRACK) { - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); Ride *ride = get_ride(rideIndex); if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) return; @@ -2419,11 +2419,11 @@ void footpath_remove_edges_at(sint32 x, sint32 y, rct_tile_element *tileElement) footpath_update_queue_entrance_banner(x, y, tileElement); bool fixCorners = false; - for (uint8 direction = 0; direction < 4; direction++) { - sint32 z1 = tileElement->base_height; + for (uint8_t direction = 0; direction < 4; direction++) { + int32_t z1 = tileElement->base_height; if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH) { if (footpath_element_is_sloped(tileElement)) { - sint32 slope = footpath_element_get_slope_direction(tileElement); + int32_t slope = footpath_element_get_slope_direction(tileElement); // Sloped footpaths don't connect sideways if ((slope - direction) & 1) continue; @@ -2438,7 +2438,7 @@ void footpath_remove_edges_at(sint32 x, sint32 y, rct_tile_element *tileElement) // to. if (!tile_element_wants_path_connection_towards({ x / 32, y / 32, z1, direction }, tileElement)) { - sint32 z0 = z1 - 2; + int32_t z0 = z1 - 2; footpath_remove_edges_towards( x + CoordsDirectionDelta[direction].x, y + CoordsDirectionDelta[direction].y, z0, z1, direction, footpath_element_is_queue(tileElement)); @@ -2460,7 +2460,7 @@ void footpath_remove_edges_at(sint32 x, sint32 y, rct_tile_element *tileElement) tileElement->properties.path.edges = 0; } -rct_footpath_entry *get_footpath_entry(sint32 entryIndex) +rct_footpath_entry *get_footpath_entry(int32_t entryIndex) { rct_footpath_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -2475,7 +2475,7 @@ rct_footpath_entry *get_footpath_entry(sint32 entryIndex) return result; } -uint8 footpath_get_edges(const rct_tile_element * element) +uint8_t footpath_get_edges(const rct_tile_element * element) { return element->properties.path.edges & 0xF; } diff --git a/src/openrct2/world/Footpath.h b/src/openrct2/world/Footpath.h index 37c24a053b..cb391445fe 100644 --- a/src/openrct2/world/Footpath.h +++ b/src/openrct2/world/Footpath.h @@ -26,11 +26,11 @@ enum #pragma pack(push, 1) struct rct_footpath_entry { rct_string_id string_idx; // 0x00 - uint32 image; // 0x02 - uint32 bridge_image; // 0x06 - uint8 support_type; // 0x0A - uint8 flags; // 0x0B - uint8 scrolling_mode; // 0x0C + uint32_t image; // 0x02 + uint32_t bridge_image; // 0x06 + uint8_t support_type; // 0x0A + uint8_t flags; // 0x0B + uint8_t scrolling_mode; // 0x0C }; assert_struct_size(rct_footpath_entry, 13); #pragma pack(pop) @@ -105,73 +105,73 @@ enum SLOPE_IS_IRREGULAR_FLAG = (1 << 3), // Flag set in `defaultPathSlope[]` and checked in `footpath_place_real` }; -extern uint8 gFootpathProvisionalFlags; +extern uint8_t gFootpathProvisionalFlags; extern LocationXYZ16 gFootpathProvisionalPosition; -extern uint8 gFootpathProvisionalType; -extern uint8 gFootpathProvisionalSlope; -extern uint8 gFootpathConstructionMode; -extern uint16 gFootpathSelectedId; -extern uint8 gFootpathSelectedType; +extern uint8_t gFootpathProvisionalType; +extern uint8_t gFootpathProvisionalSlope; +extern uint8_t gFootpathConstructionMode; +extern uint16_t gFootpathSelectedId; +extern uint8_t gFootpathSelectedType; extern LocationXYZ16 gFootpathConstructFromPosition; -extern uint8 gFootpathConstructDirection; -extern uint8 gFootpathConstructSlope; -extern uint8 gFootpathConstructValidDirections; +extern uint8_t gFootpathConstructDirection; +extern uint8_t gFootpathConstructSlope; +extern uint8_t gFootpathConstructValidDirections; extern money32 gFootpathPrice; -extern uint8 gFootpathGroundFlags; +extern uint8_t gFootpathGroundFlags; extern const LocationXY16 word_981D6C[4]; extern const LocationXY16 BinUseOffsets[4]; extern const LocationXY16 BenchUseOffsets[8]; -rct_tile_element *map_get_footpath_element(sint32 x, sint32 y, sint32 z); -money32 footpath_remove_real(sint32 x, sint32 y, sint32 z, sint32 flags); -void game_command_place_footpath(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -void game_command_place_footpath_from_track(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -void game_command_remove_footpath(sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, sint32 * esi, sint32 * edi, sint32 * ebp); -money32 footpath_place(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 flags); -money32 footpath_place_remove_intersecting(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope, sint32 flags, sint32 direction); -void footpath_remove(sint32 x, sint32 y, sint32 z, sint32 flags); -money32 footpath_provisional_set(sint32 type, sint32 x, sint32 y, sint32 z, sint32 slope); +rct_tile_element *map_get_footpath_element(int32_t x, int32_t y, int32_t z); +money32 footpath_remove_real(int32_t x, int32_t y, int32_t z, int32_t flags); +void game_command_place_footpath(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +void game_command_place_footpath_from_track(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +void game_command_remove_footpath(int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, int32_t * esi, int32_t * edi, int32_t * ebp); +money32 footpath_place(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags); +money32 footpath_place_remove_intersecting(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope, int32_t flags, int32_t direction); +void footpath_remove(int32_t x, int32_t y, int32_t z, int32_t flags); +money32 footpath_provisional_set(int32_t type, int32_t x, int32_t y, int32_t z, int32_t slope); void footpath_provisional_remove(); void footpath_provisional_update(); -void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 * x, sint32 * y, sint32 * direction, rct_tile_element ** tileElement); -void footpath_bridge_get_info_from_pos(sint32 screenX, sint32 screenY, sint32 * x, sint32 * y, sint32 * direction, rct_tile_element ** tileElement); -void footpath_remove_litter(sint32 x, sint32 y, sint32 z); -void footpath_connect_edges(sint32 x, sint32 y, rct_tile_element * tileElement, sint32 flags); +void footpath_get_coordinates_from_pos(int32_t screenX, int32_t screenY, int32_t * x, int32_t * y, int32_t * direction, rct_tile_element ** tileElement); +void footpath_bridge_get_info_from_pos(int32_t screenX, int32_t screenY, int32_t * x, int32_t * y, int32_t * direction, rct_tile_element ** tileElement); +void footpath_remove_litter(int32_t x, int32_t y, int32_t z); +void footpath_connect_edges(int32_t x, int32_t y, rct_tile_element * tileElement, int32_t flags); void footpath_update_queue_chains(); -bool fence_in_the_way(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction); -void footpath_chain_ride_queue(sint32 rideIndex, sint32 entranceIndex, sint32 x, sint32 y, rct_tile_element * tileElement, sint32 direction); -void footpath_update_path_wide_flags(sint32 x, sint32 y); +bool fence_in_the_way(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t direction); +void footpath_chain_ride_queue(int32_t rideIndex, int32_t entranceIndex, int32_t x, int32_t y, rct_tile_element * tileElement, int32_t direction); +void footpath_update_path_wide_flags(int32_t x, int32_t y); bool footpath_is_blocked_by_vehicle(const TileCoordsXYZ& position); -sint32 footpath_is_connected_to_map_edge(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 flags); +int32_t footpath_is_connected_to_map_edge(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t flags); bool footpath_element_is_sloped(const rct_tile_element * tileElement); void footpath_element_set_sloped(rct_tile_element * tileElement, bool isSloped); -uint8 footpath_element_get_slope_direction(const rct_tile_element * tileElement); +uint8_t footpath_element_get_slope_direction(const rct_tile_element * tileElement); bool footpath_element_is_queue(const rct_tile_element * tileElement); void footpath_element_set_queue(rct_tile_element * tileElement); void footpath_element_clear_queue(rct_tile_element * tileElement); bool footpath_element_has_queue_banner(const rct_tile_element * tileElement); bool footpath_element_is_wide(const rct_tile_element * tileElement); -uint8 footpath_element_get_type(const rct_tile_element * tileElement); -void footpath_element_set_type(rct_tile_element * tileElement, uint8 type); -uint8 footpath_element_get_direction(const rct_tile_element * tileElement); -void footpath_element_set_direction(rct_tile_element * tileElement, uint8 direction); +uint8_t footpath_element_get_type(const rct_tile_element * tileElement); +void footpath_element_set_type(rct_tile_element * tileElement, uint8_t type); +uint8_t footpath_element_get_direction(const rct_tile_element * tileElement); +void footpath_element_set_direction(rct_tile_element * tileElement, uint8_t direction); void footpath_element_set_wide(rct_tile_element * tileElement, bool isWide); bool footpath_element_has_path_scenery(const rct_tile_element * tileElement); -uint8 footpath_element_get_path_scenery(const rct_tile_element * tileElement); -void footpath_element_set_path_scenery(rct_tile_element * tileElement, uint8 pathSceneryType); -uint8 footpath_element_get_path_scenery_index(const rct_tile_element * tileElement); +uint8_t footpath_element_get_path_scenery(const rct_tile_element * tileElement); +void footpath_element_set_path_scenery(rct_tile_element * tileElement, uint8_t pathSceneryType); +uint8_t footpath_element_get_path_scenery_index(const rct_tile_element * tileElement); bool footpath_element_path_scenery_is_ghost(const rct_tile_element * tileElement); void footpath_scenery_set_is_ghost(rct_tile_element * tileElement, bool isGhost); -void footpath_remove_edges_at(sint32 x, sint32 y, rct_tile_element * tileElement); -sint32 entrance_get_directions(const rct_tile_element * tileElement); +void footpath_remove_edges_at(int32_t x, int32_t y, rct_tile_element * tileElement); +int32_t entrance_get_directions(const rct_tile_element * tileElement); -rct_footpath_entry * get_footpath_entry(sint32 entryIndex); +rct_footpath_entry * get_footpath_entry(int32_t entryIndex); void footpath_queue_chain_reset(); -void footpath_queue_chain_push(uint8 rideIndex); +void footpath_queue_chain_push(uint8_t rideIndex); -uint8 footpath_get_edges(const rct_tile_element * element); +uint8_t footpath_get_edges(const rct_tile_element * element); #endif diff --git a/src/openrct2/world/Fountain.cpp b/src/openrct2/world/Fountain.cpp index a6294b96ce..c5e4533bf1 100644 --- a/src/openrct2/world/Fountain.cpp +++ b/src/openrct2/world/Fountain.cpp @@ -30,12 +30,12 @@ enum class PATTERN namespace FOUNTAIN_FLAG { - const uint32 FAST = 1 << 0; - const uint32 GOTO_EDGE = 1 << 1; - const uint32 SPLIT = 1 << 2; - const uint32 TERMINATE = 1 << 3; - const uint32 BOUNCE = 1 << 4; - const uint32 DIRECTION = 1 << 7; + const uint32_t FAST = 1 << 0; + const uint32_t GOTO_EDGE = 1 << 1; + const uint32_t SPLIT = 1 << 2; + const uint32_t TERMINATE = 1 << 3; + const uint32_t BOUNCE = 1 << 4; + const uint32_t DIRECTION = 1 << 7; }; static constexpr const LocationXY16 _fountainDirectionsNegative[] = @@ -63,13 +63,13 @@ static constexpr const LocationXY16 _fountainDirectionsPositive[] = }; // rct2: 0x0097F040 -const uint8 _fountainDirections[] = { 0, 1, 2, 3, 0, 1, 2, 3 }; +const uint8_t _fountainDirections[] = { 0, 1, 2, 3, 0, 1, 2, 3 }; // rct2: 0x0097F048 -const uint8 _fountainDirectionFlags[] = { 0, 0, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, 0, 0 }; +const uint8_t _fountainDirectionFlags[] = { 0, 0, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, 0, 0 }; // rct2: 0x0097F050 -const uint8 _fountainPatternFlags[] = { +const uint8_t _fountainPatternFlags[] = { FOUNTAIN_FLAG::TERMINATE, // CYCLIC_SQUARES FOUNTAIN_FLAG::FAST | FOUNTAIN_FLAG::GOTO_EDGE, // CONTINUOUS_CHASERS FOUNTAIN_FLAG::BOUNCE, // BOUNCING_PAIRS @@ -80,27 +80,27 @@ const uint8 _fountainPatternFlags[] = { FOUNTAIN_FLAG::FAST // FAST_RANDOM_CHASERS }; -static sint32 jumping_fountain_get_type(const rct_jumping_fountain * jumpingFountain); +static int32_t jumping_fountain_get_type(const rct_jumping_fountain * jumpingFountain); static void jumping_fountain_continue(rct_jumping_fountain * jumpingFountain); -static bool is_jumping_fountain(sint32 type, sint32 x, sint32 y, sint32 z); +static bool is_jumping_fountain(int32_t type, int32_t x, int32_t y, int32_t z); -static void jumping_fountain_goto_edge(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections); -static void jumping_fountain_bounce(rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections); -static void jumping_fountain_split(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections); -static void jumping_fountain_random(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections); -static void jumping_fountain_create_next(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 direction); +static void jumping_fountain_goto_edge(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections); +static void jumping_fountain_bounce(rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections); +static void jumping_fountain_split(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections); +static void jumping_fountain_random(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections); +static void jumping_fountain_create_next(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t direction); -void jumping_fountain_begin(sint32 type, sint32 x, sint32 y, const rct_tile_element * tileElement) +void jumping_fountain_begin(int32_t type, int32_t x, int32_t y, const rct_tile_element * tileElement) { - sint32 randomIndex; - sint32 z = tileElement->base_height * 8; + int32_t randomIndex; + int32_t z = tileElement->base_height * 8; // Change pattern approximately every 51 seconds - uint32 pattern = (gCurrentTicks >> 11) & 7; + uint32_t pattern = (gCurrentTicks >> 11) & 7; switch ((PATTERN)pattern) { case PATTERN::CYCLIC_SQUARES: // 0, 1, 2, 3 - for (sint32 i = 0; i < 4; i++) + for (int32_t i = 0; i < 4; i++) { jumping_fountain_create( type, @@ -116,7 +116,7 @@ void jumping_fountain_begin(sint32 type, sint32 x, sint32 y, const rct_tile_elem case PATTERN::BOUNCING_PAIRS: // random [0, 2 or 1, 3] randomIndex = scenario_rand() & 1; - for (sint32 i = randomIndex; i < 4; i += 2) + for (int32_t i = randomIndex; i < 4; i += 2) { jumping_fountain_create( type, @@ -168,7 +168,7 @@ void jumping_fountain_begin(sint32 type, sint32 x, sint32 y, const rct_tile_elem } } -void jumping_fountain_create(sint32 type, sint32 x, sint32 y, sint32 z, sint32 direction, sint32 flags, sint32 iteration) +void jumping_fountain_create(int32_t type, int32_t x, int32_t y, int32_t z, int32_t direction, int32_t flags, int32_t iteration) { rct_jumping_fountain * jumpingFountain = (rct_jumping_fountain *)create_sprite(SPRITE_IDENTIFIER_MISC); if (jumpingFountain != nullptr) @@ -230,9 +230,9 @@ void jumping_fountain_update(rct_jumping_fountain * jumpingFountain) } -static sint32 jumping_fountain_get_type(const rct_jumping_fountain * jumpingFountain) +static int32_t jumping_fountain_get_type(const rct_jumping_fountain * jumpingFountain) { - sint32 type = jumpingFountain->misc_identifier == SPRITE_MISC_JUMPING_FOUNTAIN_SNOW ? + int32_t type = jumpingFountain->misc_identifier == SPRITE_MISC_JUMPING_FOUNTAIN_SNOW ? JUMPING_FOUNTAIN_TYPE_SNOW : JUMPING_FOUNTAIN_TYPE_WATER; return type; @@ -240,14 +240,14 @@ static sint32 jumping_fountain_get_type(const rct_jumping_fountain * jumpingFoun static void jumping_fountain_continue(rct_jumping_fountain * jumpingFountain) { - sint32 type = jumping_fountain_get_type(jumpingFountain); - sint32 direction = (jumpingFountain->sprite_direction >> 3) & 7; - sint32 x = jumpingFountain->x + CoordsDirectionDelta[direction].x; - sint32 y = jumpingFountain->y + CoordsDirectionDelta[direction].y; - sint32 z = jumpingFountain->z; + int32_t type = jumping_fountain_get_type(jumpingFountain); + int32_t direction = (jumpingFountain->sprite_direction >> 3) & 7; + int32_t x = jumpingFountain->x + CoordsDirectionDelta[direction].x; + int32_t y = jumpingFountain->y + CoordsDirectionDelta[direction].y; + int32_t z = jumpingFountain->z; - sint32 availableDirections = 0; - for (sint32 i = 0; i < 8; i++) + int32_t availableDirections = 0; + for (int32_t i = 0; i < 8; i++) { if (is_jumping_fountain(type, x + _fountainDirectionsNegative[i].x, y + _fountainDirectionsNegative[i].y, z)) { @@ -286,11 +286,11 @@ static void jumping_fountain_continue(rct_jumping_fountain * jumpingFountain) jumping_fountain_random(jumpingFountain, x, y, z, availableDirections); } -static bool is_jumping_fountain(sint32 type, sint32 x, sint32 y, sint32 z) +static bool is_jumping_fountain(int32_t type, int32_t x, int32_t y, int32_t z) { z = z >> 3; - sint32 pathBitFlagMask = type == JUMPING_FOUNTAIN_TYPE_SNOW ? + int32_t pathBitFlagMask = type == JUMPING_FOUNTAIN_TYPE_SNOW ? PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW : PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER; @@ -302,7 +302,7 @@ static bool is_jumping_fountain(sint32 type, sint32 x, sint32 y, sint32 z) if (footpath_element_path_scenery_is_ghost(tileElement)) continue; if (!footpath_element_has_path_scenery(tileElement)) continue; - uint8 additionIndex = footpath_element_get_path_scenery_index(tileElement); + uint8_t additionIndex = footpath_element_get_path_scenery_index(tileElement); rct_scenery_entry * sceneryEntry = get_footpath_item_entry(additionIndex); if (sceneryEntry != reinterpret_cast(-1) && sceneryEntry->path_bit.flags & pathBitFlagMask) { @@ -314,9 +314,9 @@ static bool is_jumping_fountain(sint32 type, sint32 x, sint32 y, sint32 z) return false; } -static void jumping_fountain_goto_edge(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections) +static void jumping_fountain_goto_edge(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections) { - sint32 direction = (jumpingFountain->sprite_direction >> 3) << 1; + int32_t direction = (jumpingFountain->sprite_direction >> 3) << 1; if (availableDirections & (1 << direction)) { jumping_fountain_create_next(jumpingFountain, x, y, z, direction); @@ -330,7 +330,7 @@ static void jumping_fountain_goto_edge(const rct_jumping_fountain * jumpingFount return; } - uint32 randomIndex = scenario_rand(); + uint32_t randomIndex = scenario_rand(); if ((randomIndex & 0xFFFF) < 0x3333) { return; @@ -351,12 +351,12 @@ static void jumping_fountain_goto_edge(const rct_jumping_fountain * jumpingFount jumping_fountain_create_next(jumpingFountain, x, y, z, direction); } -static void jumping_fountain_bounce(rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections) +static void jumping_fountain_bounce(rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections) { jumpingFountain->iteration++; if (jumpingFountain->iteration < 8) { - sint32 direction = ((jumpingFountain->sprite_direction >> 3) ^ 2) << 1; + int32_t direction = ((jumpingFountain->sprite_direction >> 3) ^ 2) << 1; if (availableDirections & (1 << direction)) { jumping_fountain_create_next(jumpingFountain, x, y, z, direction); @@ -372,12 +372,12 @@ static void jumping_fountain_bounce(rct_jumping_fountain * jumpingFountain, sint } } -static void jumping_fountain_split(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections) +static void jumping_fountain_split(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections) { if (jumpingFountain->iteration < 3) { - sint32 type = jumping_fountain_get_type(jumpingFountain); - sint32 direction = ((jumpingFountain->sprite_direction >> 3) ^ 2) << 1; + int32_t type = jumping_fountain_get_type(jumpingFountain); + int32_t direction = ((jumpingFountain->sprite_direction >> 3) ^ 2) << 1; availableDirections &= ~(1 << direction); availableDirections &= ~(1 << (direction + 1)); @@ -408,12 +408,12 @@ static void jumping_fountain_split(const rct_jumping_fountain * jumpingFountain, } } -static void jumping_fountain_random(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 availableDirections) +static void jumping_fountain_random(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t availableDirections) { - uint32 randomIndex = scenario_rand(); + uint32_t randomIndex = scenario_rand(); if ((randomIndex & 0xFFFF) >= 0x2000) { - sint32 direction = randomIndex & 7; + int32_t direction = randomIndex & 7; while (!(availableDirections & (1 << direction))) { direction = (direction + 1) & 7; @@ -422,10 +422,10 @@ static void jumping_fountain_random(const rct_jumping_fountain * jumpingFountain } } -static void jumping_fountain_create_next(const rct_jumping_fountain * jumpingFountain, sint32 x, sint32 y, sint32 z, sint32 direction) +static void jumping_fountain_create_next(const rct_jumping_fountain * jumpingFountain, int32_t x, int32_t y, int32_t z, int32_t direction) { - sint32 type = jumping_fountain_get_type(jumpingFountain); - sint32 flags = jumpingFountain->fountain_flags & ~FOUNTAIN_FLAG::DIRECTION; + int32_t type = jumping_fountain_get_type(jumpingFountain); + int32_t flags = jumpingFountain->fountain_flags & ~FOUNTAIN_FLAG::DIRECTION; if (direction & 1) { flags |= FOUNTAIN_FLAG::DIRECTION; diff --git a/src/openrct2/world/Fountain.h b/src/openrct2/world/Fountain.h index 80753367a4..e4f2e5c175 100644 --- a/src/openrct2/world/Fountain.h +++ b/src/openrct2/world/Fountain.h @@ -20,7 +20,7 @@ enum JUMPING_FOUNTAIN_TYPE_SNOW }; -void jumping_fountain_begin(sint32 type, sint32 x, sint32 y, const rct_tile_element * tileElement); -void jumping_fountain_create(sint32 type, sint32 x, sint32 y, sint32 z, sint32 direction, sint32 flags, sint32 iteration); +void jumping_fountain_begin(int32_t type, int32_t x, int32_t y, const rct_tile_element * tileElement); +void jumping_fountain_create(int32_t type, int32_t x, int32_t y, int32_t z, int32_t direction, int32_t flags, int32_t iteration); void jumping_fountain_update(rct_jumping_fountain * jumpingFountain); diff --git a/src/openrct2/world/LargeScenery.cpp b/src/openrct2/world/LargeScenery.cpp index 15da2ff0c5..a2569680b4 100644 --- a/src/openrct2/world/LargeScenery.cpp +++ b/src/openrct2/world/LargeScenery.cpp @@ -49,23 +49,23 @@ void scenery_large_set_banner_id(rct_tile_element * tileElement, BannerIndex ban tileElement->properties.scenerymultiple.colour[1] |= (bannerIndex & 7) << 5; } -sint32 scenery_large_get_type(const rct_tile_element * tileElement) +int32_t scenery_large_get_type(const rct_tile_element * tileElement) { return (tileElement->properties.scenerymultiple.type & TILE_ELEMENT_LARGE_TYPE_MASK); } -sint32 scenery_large_get_sequence(const rct_tile_element * tileElement) +int32_t scenery_large_get_sequence(const rct_tile_element * tileElement) { return (tileElement->properties.scenerymultiple.type >> 10); } -void scenery_large_set_type(rct_tile_element * tileElement, uint16 type) +void scenery_large_set_type(rct_tile_element * tileElement, uint16_t type) { tileElement->properties.scenerymultiple.type &= ~TILE_ELEMENT_LARGE_TYPE_MASK; tileElement->properties.scenerymultiple.type |= (type & TILE_ELEMENT_LARGE_TYPE_MASK); } -void scenery_large_set_sequence(rct_tile_element * tileElement, uint16 sequence) +void scenery_large_set_sequence(rct_tile_element * tileElement, uint16_t sequence) { tileElement->properties.scenerymultiple.type &= TILE_ELEMENT_LARGE_TYPE_MASK; tileElement->properties.scenerymultiple.type |= (sequence << 10); diff --git a/src/openrct2/world/LargeScenery.h b/src/openrct2/world/LargeScenery.h index b0793ecac0..56c0dbc073 100644 --- a/src/openrct2/world/LargeScenery.h +++ b/src/openrct2/world/LargeScenery.h @@ -19,7 +19,7 @@ void scenery_large_set_primary_colour(rct_tile_element * tileElement, colour_t c void scenery_large_set_secondary_colour(rct_tile_element * tileElement, colour_t colour); BannerIndex scenery_large_get_banner_id(const rct_tile_element* tileElement); void scenery_large_set_banner_id(rct_tile_element * tileElement, BannerIndex bannerIndex); -sint32 scenery_large_get_type(const rct_tile_element * tileElement); -sint32 scenery_large_get_sequence(const rct_tile_element * tileElement); -void scenery_large_set_type(rct_tile_element * tileElement, uint16 type); -void scenery_large_set_sequence(rct_tile_element * tileElement, uint16 sequence); +int32_t scenery_large_get_type(const rct_tile_element * tileElement); +int32_t scenery_large_get_sequence(const rct_tile_element * tileElement); +void scenery_large_set_type(rct_tile_element * tileElement, uint16_t type); +void scenery_large_set_sequence(rct_tile_element * tileElement, uint16_t sequence); diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 85753e5ab4..8ca227bd0d 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -11,39 +11,39 @@ #include "../common.h" -#define LOCATION_NULL ((sint16)(uint16)0x8000) +#define LOCATION_NULL ((int16_t)(uint16_t)0x8000) #define RCT_XY8_UNDEFINED 0xFFFF -#define MakeXY16(x, y) {(sint16)(x), (sint16)(y)} +#define MakeXY16(x, y) {(int16_t)(x), (int16_t)(y)} #pragma pack(push, 1) struct LocationXY8 { union { struct { - uint8 x, y; + uint8_t x, y; }; - uint16 xy; + uint16_t xy; }; }; assert_struct_size(LocationXY8, 2); struct sLocationXY8 { - sint8 x, y; + int8_t x, y; }; assert_struct_size(sLocationXY8, 2); struct LocationXY16 { - sint16 x, y; + int16_t x, y; }; assert_struct_size(LocationXY16, 4); struct LocationXYZ16 { - sint16 x, y, z; + int16_t x, y, z; }; assert_struct_size(LocationXYZ16, 6); #pragma pack(pop) -constexpr sint32 COORDS_NULL = -1; +constexpr int32_t COORDS_NULL = -1; /** * Tile coordinates use 1 x/y increment per tile and 1 z increment per step. @@ -51,13 +51,13 @@ constexpr sint32 COORDS_NULL = -1; */ struct CoordsXY { - sint32 x, y; + int32_t x, y; }; struct TileCoordsXY { TileCoordsXY() = default; - TileCoordsXY(sint32 x_, sint32 y_) : x(x_), y(y_) {} + TileCoordsXY(int32_t x_, int32_t y_) : x(x_), y(y_) {} explicit TileCoordsXY(CoordsXY c) : x(c.x / 32), y(c.y / 32) {} TileCoordsXY& operator+=(const TileCoordsXY rhs) { @@ -65,19 +65,19 @@ struct TileCoordsXY y += rhs.y; return *this; } - sint32 x = 0, y = 0; + int32_t x = 0, y = 0; }; struct CoordsXYZ { - sint32 x, y, z; + int32_t x, y, z; }; struct TileCoordsXYZ { TileCoordsXYZ() = default; - TileCoordsXYZ(sint32 x_, sint32 y_, sint32 z_) : x(x_), y(y_), z(z_) {} - explicit TileCoordsXYZ(CoordsXY c, sint32 z_) : x(c.x / 32), y(c.y / 32), z(z_) {} + TileCoordsXYZ(int32_t x_, int32_t y_, int32_t z_) : x(x_), y(y_), z(z_) {} + explicit TileCoordsXYZ(CoordsXY c, int32_t z_) : x(c.x / 32), y(c.y / 32), z(z_) {} explicit TileCoordsXYZ(CoordsXYZ c) : x(c.x / 32), y(c.y / 32), z(c.z / 8) {} TileCoordsXYZ& operator+=(const TileCoordsXY rhs) { @@ -85,21 +85,21 @@ struct TileCoordsXYZ y += rhs.y; return *this; } - sint32 x = 0, y = 0, z = 0; + int32_t x = 0, y = 0, z = 0; }; struct CoordsXYZD { - sint32 x, y, z; - uint8 direction; + int32_t x, y, z; + uint8_t direction; bool isNull() const { return x == COORDS_NULL; }; }; struct TileCoordsXYZD { - sint32 x, y, z; - uint8 direction; + int32_t x, y, z; + uint8_t direction; bool isNull() const { return x == COORDS_NULL; }; }; diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 5fe726b865..44833033bb 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -87,24 +87,24 @@ const money32 TerrainPricing[] = { 110, // TERRAIN_SAND_LIGHT }; -uint16 gMapSelectFlags; -uint16 gMapSelectType; +uint16_t gMapSelectFlags; +uint16_t gMapSelectType; LocationXY16 gMapSelectPositionA; LocationXY16 gMapSelectPositionB; LocationXYZ16 gMapSelectArrowPosition; -uint8 gMapSelectArrowDirection; +uint8_t gMapSelectArrowDirection; -uint8 gMapGroundFlags; +uint8_t gMapGroundFlags; -uint16 gWidePathTileLoopX; -uint16 gWidePathTileLoopY; -uint16 gGrassSceneryTileLoopPosition; +uint16_t gWidePathTileLoopX; +uint16_t gWidePathTileLoopY; +uint16_t gGrassSceneryTileLoopPosition; -sint16 gMapSizeUnits; -sint16 gMapSizeMinus2; -sint16 gMapSize; -sint16 gMapSizeMaxXY; -sint16 gMapBaseZ; +int16_t gMapSizeUnits; +int16_t gMapSizeMinus2; +int16_t gMapSize; +int16_t gMapSizeMaxXY; +int16_t gMapBaseZ; rct_tile_element gTileElements[MAX_TILE_TILE_ELEMENT_POINTERS * 3]; rct_tile_element *gTileElementTilePointers[MAX_TILE_TILE_ELEMENT_POINTERS]; @@ -112,7 +112,7 @@ LocationXY16 gMapSelectionTiles[300]; PeepSpawn gPeepSpawns[MAX_PEEP_SPAWNS]; rct_tile_element *gNextFreeTileElement; -uint32 gNextFreeTileElementPointerIndex; +uint32_t gNextFreeTileElementPointerIndex; bool gLandMountainMode; bool gLandPaintMode; @@ -120,21 +120,21 @@ bool gClearSmallScenery; bool gClearLargeScenery; bool gClearFootpath; -uint16 gLandRemainingOwnershipSales; -uint16 gLandRemainingConstructionSales; +uint16_t gLandRemainingOwnershipSales; +uint16_t gLandRemainingConstructionSales; LocationXYZ16 gCommandPosition; bool gMapLandRightsUpdateSuccess; -static void map_update_grass_length(sint32 x, sint32 y, rct_tile_element *tileElement); -static void map_set_grass_length(sint32 x, sint32 y, rct_tile_element *tileElement, sint32 length); -static void clear_elements_at(sint32 x, sint32 y); -static void translate_3d_to_2d(sint32 rotation, sint32 *x, sint32 *y); +static void map_update_grass_length(int32_t x, int32_t y, rct_tile_element *tileElement); +static void map_set_grass_length(int32_t x, int32_t y, rct_tile_element *tileElement, int32_t length); +static void clear_elements_at(int32_t x, int32_t y); +static void translate_3d_to_2d(int32_t rotation, int32_t *x, int32_t *y); -void rotate_map_coordinates(sint16 *x, sint16 *y, sint32 rotation) +void rotate_map_coordinates(int16_t *x, int16_t *y, int32_t rotation) { - sint32 temp; + int32_t temp; switch (rotation) { case TILE_ELEMENT_DIRECTION_WEST: @@ -156,7 +156,7 @@ void rotate_map_coordinates(sint16 *x, sint16 *y, sint32 rotation) } } -LocationXY16 coordinate_3d_to_2d(const LocationXYZ16* coordinate_3d, sint32 rotation){ +LocationXY16 coordinate_3d_to_2d(const LocationXYZ16* coordinate_3d, int32_t rotation){ LocationXY16 coordinate_2d; switch (rotation){ @@ -188,7 +188,7 @@ void tile_element_iterator_begin(tile_element_iterator *it) it->element = map_get_first_element_at(0, 0); } -sint32 tile_element_iterator_next(tile_element_iterator *it) +int32_t tile_element_iterator_next(tile_element_iterator *it) { if (it->element == nullptr) { it->element = map_get_first_element_at(it->x, it->y); @@ -221,7 +221,7 @@ void tile_element_iterator_restart_for_tile(tile_element_iterator *it) it->element = nullptr; } -rct_tile_element *map_get_first_element_at(sint32 x, sint32 y) +rct_tile_element *map_get_first_element_at(int32_t x, int32_t y) { if (x < 0 || y < 0 || x > (MAXIMUM_MAP_SIZE_TECHNICAL - 1) || y > (MAXIMUM_MAP_SIZE_TECHNICAL - 1)) { log_error("Trying to access element outside of range"); @@ -230,7 +230,7 @@ rct_tile_element *map_get_first_element_at(sint32 x, sint32 y) return gTileElementTilePointers[x + y * MAXIMUM_MAP_SIZE_TECHNICAL]; } -rct_tile_element *map_get_nth_element_at(sint32 x, sint32 y, sint32 n) +rct_tile_element *map_get_nth_element_at(int32_t x, int32_t y, int32_t n) { rct_tile_element * tileElement = map_get_first_element_at(x, y); if (tileElement == nullptr) { @@ -253,7 +253,7 @@ rct_tile_element *map_get_nth_element_at(sint32 x, sint32 y, sint32 n) return nullptr; } -void map_set_tile_elements(sint32 x, sint32 y, rct_tile_element *elements) +void map_set_tile_elements(int32_t x, int32_t y, rct_tile_element *elements) { if (x < 0 || y < 0 || x > (MAXIMUM_MAP_SIZE_TECHNICAL - 1) || y > (MAXIMUM_MAP_SIZE_TECHNICAL - 1)) { log_error("Trying to access element outside of range"); @@ -262,7 +262,7 @@ void map_set_tile_elements(sint32 x, sint32 y, rct_tile_element *elements) gTileElementTilePointers[x + y * MAXIMUM_MAP_SIZE_TECHNICAL] = elements; } -rct_tile_element * map_get_surface_element_at(sint32 x, sint32 y) +rct_tile_element * map_get_surface_element_at(int32_t x, int32_t y) { rct_tile_element *tileElement = map_get_first_element_at(x, y); @@ -285,7 +285,7 @@ rct_tile_element * map_get_surface_element_at(const CoordsXY coords) return map_get_surface_element_at(coords.x / 32, coords.y / 32); } -rct_tile_element* map_get_path_element_at(sint32 x, sint32 y, sint32 z){ +rct_tile_element* map_get_path_element_at(int32_t x, int32_t y, int32_t z){ rct_tile_element *tileElement = map_get_first_element_at(x, y); if (tileElement == nullptr) @@ -306,7 +306,7 @@ rct_tile_element* map_get_path_element_at(sint32 x, sint32 y, sint32 z){ return nullptr; } -rct_tile_element* map_get_banner_element_at(sint32 x, sint32 y, sint32 z, uint8 position) { +rct_tile_element* map_get_banner_element_at(int32_t x, int32_t y, int32_t z, uint8_t position) { rct_tile_element *tileElement = map_get_first_element_at(x, y); if (tileElement == nullptr) @@ -331,12 +331,12 @@ rct_tile_element* map_get_banner_element_at(sint32 x, sint32 y, sint32 z, uint8 * * rct2: 0x0068AB4C */ -void map_init(sint32 size) +void map_init(int32_t size) { gNumMapAnimations = 0; gNextFreeTileElementPointerIndex = 0; - for (sint32 i = 0; i < MAX_TILE_TILE_ELEMENT_POINTERS; i++) { + for (int32_t i = 0; i < MAX_TILE_TILE_ELEMENT_POINTERS; i++) { rct_tile_element *tile_element = &gTileElements[i]; tile_element->type = (TILE_ELEMENT_TYPE_SURFACE << 2); tile_element->flags = TILE_ELEMENT_FLAG_LAST_TILE; @@ -377,9 +377,9 @@ void map_count_remaining_land_rights() gLandRemainingOwnershipSales = 0; gLandRemainingConstructionSales = 0; - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { rct_tile_element *element = map_get_surface_element_at(x, y); // Surface elements are sometimes hacked out to save some space for other map elements @@ -388,7 +388,7 @@ void map_count_remaining_land_rights() continue; } - uint8 flags = element->properties.surface.ownership; + uint8_t flags = element->properties.surface.ownership; // Do not combine this condition with (flags & OWNERSHIP_AVAILABLE) // As some RCT1 parks have owned tiles with the 'construction rights available' flag also set @@ -430,7 +430,7 @@ void map_strip_ghost_flag_from_elements() */ void map_update_tile_pointers() { - sint32 i, x, y; + int32_t i, x, y; for (i = 0; i < MAX_TILE_TILE_ELEMENT_POINTERS; i++) { gTileElementTilePointers[i] = TILE_UNDEFINED_TILE_ELEMENT; @@ -456,7 +456,7 @@ void map_update_tile_pointers() * dx: return remember to & with 0xFFFF if you don't want water affecting results * rct2: 0x00662783 */ -sint32 tile_element_height(sint32 x, sint32 y) +int32_t tile_element_height(int32_t x, int32_t y) { rct_tile_element *tileElement; @@ -465,8 +465,8 @@ sint32 tile_element_height(sint32 x, sint32 y) return 16; // Truncate subtile coordinates - sint32 x_tile = x & 0xFFFFFFE0; - sint32 y_tile = y & 0xFFFFFFE0; + int32_t x_tile = x & 0xFFFFFFE0; + int32_t y_tile = y & 0xFFFFFFE0; // Get the surface element for the tile tileElement = map_get_surface_element_at({x_tile, y_tile}); @@ -475,21 +475,21 @@ sint32 tile_element_height(sint32 x, sint32 y) return 16; } - uint32 height = + uint32_t height = (surface_get_water_height(tileElement) << 20) | (tileElement->base_height << 3); - uint32 slope = (tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK); - uint8 extra_height = (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) >> 4; // 0x10 is the 5th bit - sets slope to double height + uint32_t slope = (tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK); + uint8_t extra_height = (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) >> 4; // 0x10 is the 5th bit - sets slope to double height // Remove the extra height bit slope &= TILE_ELEMENT_SLOPE_ALL_CORNERS_UP; - sint8 quad = 0, quad_extra = 0; // which quadrant the element is in? + int8_t quad = 0, quad_extra = 0; // which quadrant the element is in? // quad_extra is for extra height tiles - uint8 xl, yl; // coordinates across this tile + uint8_t xl, yl; // coordinates across this tile - uint8 TILE_SIZE = 31; + uint8_t TILE_SIZE = 31; xl = x & 0x1f; yl = y & 0x1f; @@ -609,7 +609,7 @@ sint32 tile_element_height(sint32 x, sint32 y) */ void sub_68B089() { - sint32 i; + int32_t i; rct_tile_element *tileElementFirst, *tileElement; if (gTrackDesignSaveMode) @@ -656,7 +656,7 @@ void sub_68B089() * Checks if the tile at coordinate at height counts as connected. * @return 1 if connected, 0 otherwise */ -bool map_coord_is_connected(sint32 x, sint32 y, sint32 z, uint8 faceDirection) +bool map_coord_is_connected(int32_t x, int32_t y, int32_t z, uint8_t faceDirection) { rct_tile_element *tileElement = map_get_first_element_at(x, y); @@ -665,7 +665,7 @@ bool map_coord_is_connected(sint32 x, sint32 y, sint32 z, uint8 faceDirection) continue; rct_tile_element_path_properties props = tileElement->properties.path; - uint8 pathDirection = props.type & 3; + uint8_t pathDirection = props.type & 3; if (footpath_element_is_sloped(tileElement)) { if (pathDirection == faceDirection) { @@ -696,9 +696,9 @@ void map_update_path_wide_flags() // Presumably update_path_wide_flags is too computationally expensive to call for every // tile every update, so gWidePathTileLoopX and gWidePathTileLoopY store the x and y // progress. A maximum of 128 calls is done per update. - uint16 x = gWidePathTileLoopX; - uint16 y = gWidePathTileLoopY; - for (sint32 i = 0; i < 128; i++) { + uint16_t x = gWidePathTileLoopX; + uint16_t y = gWidePathTileLoopY; + for (int32_t i = 0; i < 128; i++) { footpath_update_path_wide_flags(x, y); // Next x, y tile @@ -719,7 +719,7 @@ void map_update_path_wide_flags() * * rct2: 0x006A7B84 */ -sint32 map_height_from_slope(sint32 x, sint32 y, sint32 slope) +int32_t map_height_from_slope(int32_t x, int32_t y, int32_t slope) { if (!(slope & TILE_ELEMENT_SLOPE_S_CORNER_UP)) return 0; @@ -750,7 +750,7 @@ bool map_is_edge(const CoordsXY coords) return (coords.x < 32 || coords.y < 32 || coords.x >= gMapSizeUnits || coords.y >= gMapSizeUnits); } -bool map_can_build_at(sint32 x, sint32 y, sint32 z) +bool map_can_build_at(int32_t x, int32_t y, int32_t z) { if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) return true; @@ -765,7 +765,7 @@ bool map_can_build_at(sint32 x, sint32 y, sint32 z) * * rct2: 0x00664F72 */ -bool map_is_location_owned(sint32 x, sint32 y, sint32 z) +bool map_is_location_owned(int32_t x, int32_t y, int32_t z) { // This check is to avoid throwing lots of messages in logs. if (map_is_location_valid({x, y})) { @@ -805,7 +805,7 @@ bool map_is_location_in_park(const CoordsXY coords) return false; } -bool map_is_location_owned_or_has_rights(sint32 x, sint32 y) +bool map_is_location_owned_or_has_rights(int32_t x, int32_t y) { if (map_is_location_valid({x, y})) { rct_tile_element *tileElement = map_get_surface_element_at({x, y}); @@ -823,21 +823,21 @@ bool map_is_location_owned_or_has_rights(sint32 x, sint32 y) * rct2: 0x006B8E1B */ void game_command_remove_large_scenery( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - uint8 base_height = *edx; - uint8 tileIndex = *edx >> 8; - uint8 tile_element_direction = *ebx >> 8; - sint32 x = *eax; - sint32 y = *ecx; - sint32 z = tile_element_height(x, y); - uint8 flags = *ebx & 0xFF; + uint8_t base_height = *edx; + uint8_t tileIndex = *edx >> 8; + uint8_t tile_element_direction = *ebx >> 8; + int32_t x = *eax; + int32_t y = *ecx; + int32_t z = tile_element_height(x, y); + uint8_t flags = *ebx & 0xFF; gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; gCommandPosition.z = z; @@ -891,7 +891,7 @@ void game_command_remove_large_scenery( LocationXYZ16 firstTile = { scenery_entry->large_scenery.tiles[tileIndex].x_offset, scenery_entry->large_scenery.tiles[tileIndex].y_offset, - static_cast((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) + static_cast((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) }; rotate_map_coordinates(&firstTile.x, &firstTile.y, tile_element_direction); @@ -900,7 +900,7 @@ void game_command_remove_large_scenery( firstTile.y = y - firstTile.y; bool calculate_cost = true; - for (sint32 i = 0; scenery_entry->large_scenery.tiles[i].x_offset != -1; i++){ + for (int32_t i = 0; scenery_entry->large_scenery.tiles[i].x_offset != -1; i++){ LocationXYZ16 currentTile = { scenery_entry->large_scenery.tiles[i].x_offset, @@ -982,24 +982,24 @@ void game_command_remove_large_scenery( * rct2: 0x006B909A */ void game_command_set_large_scenery_colour( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + int32_t * ebp) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; - sint32 x = *eax; - sint32 y = *ecx; - uint8 tile_element_direction = *ebx >> 8; - uint8 flags = *ebx & 0xFF; - uint8 base_height = *edx; - uint8 tileIndex = *edx >> 8; - uint8 colour1 = *ebp; - uint8 colour2 = *ebp >> 8; - sint32 z = tile_element_height(x, y); + int32_t x = *eax; + int32_t y = *ecx; + uint8_t tile_element_direction = *ebx >> 8; + uint8_t flags = *ebx & 0xFF; + uint8_t base_height = *edx; + uint8_t tileIndex = *edx >> 8; + uint8_t colour1 = *ebp; + uint8_t colour2 = *ebp >> 8; + int32_t z = tile_element_height(x, y); gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; gCommandPosition.z = z; @@ -1022,13 +1022,13 @@ void game_command_set_large_scenery_colour( LocationXYZ16 baseTile = { scenery_entry->large_scenery.tiles[tileIndex].x_offset, scenery_entry->large_scenery.tiles[tileIndex].y_offset, - static_cast((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) + static_cast((base_height * 8) - scenery_entry->large_scenery.tiles[tileIndex].z_offset) }; rotate_map_coordinates(&baseTile.x, &baseTile.y, tile_element_direction); baseTile.x = x - baseTile.x; baseTile.y = y - baseTile.y; - for (sint32 i = 0; scenery_entry->large_scenery.tiles[i].x_offset != -1; ++i) { + for (int32_t i = 0; scenery_entry->large_scenery.tiles[i].x_offset != -1; ++i) { assert(i < MAXIMUM_MAP_SIZE_TECHNICAL); // Work out the current tile coordinates @@ -1074,9 +1074,9 @@ void game_command_set_large_scenery_colour( * * rct2: 0x0068DFE4 */ -static money32 map_clear_scenery_from_tile(sint32 x, sint32 y, sint32 clear, sint32 flags) +static money32 map_clear_scenery_from_tile(int32_t x, int32_t y, int32_t clear, int32_t flags) { - sint32 type; + int32_t type; money32 cost, totalCost; rct_tile_element *tileElement; @@ -1089,11 +1089,11 @@ restart_from_beginning: switch (type) { case TILE_ELEMENT_TYPE_PATH: if (clear & (1 << 2)) { - sint32 eax = x * 32; - sint32 ebx = flags; - sint32 ecx = y * 32; - sint32 edx = tileElement->base_height; - sint32 edi = 0, ebp = 0; + int32_t eax = x * 32; + int32_t ebx = flags; + int32_t ecx = y * 32; + int32_t edx = tileElement->base_height; + int32_t edi = 0, ebp = 0; cost = game_do_command(eax, ebx, ecx, edx, GAME_COMMAND_REMOVE_PATH, edi, ebp); if (cost == MONEY32_UNDEFINED) @@ -1106,11 +1106,11 @@ restart_from_beginning: } break; case TILE_ELEMENT_TYPE_SMALL_SCENERY: if (clear & (1 << 0)) { - sint32 eax = x * 32; - sint32 ebx = (tileElement->type << 8) | flags; - sint32 ecx = y * 32; - sint32 edx = (tileElement->properties.scenery.type << 8) | (tileElement->base_height); - sint32 edi = 0, ebp = 0; + int32_t eax = x * 32; + int32_t ebx = (tileElement->type << 8) | flags; + int32_t ecx = y * 32; + int32_t edx = (tileElement->properties.scenery.type << 8) | (tileElement->base_height); + int32_t edi = 0, ebp = 0; cost = game_do_command(eax, ebx, ecx, edx, GAME_COMMAND_REMOVE_SCENERY, edi, ebp); if (cost == MONEY32_UNDEFINED) @@ -1138,11 +1138,11 @@ restart_from_beginning: break; case TILE_ELEMENT_TYPE_LARGE_SCENERY: if (clear & (1 << 1)) { - sint32 eax = x * 32; - sint32 ebx = flags | ((tile_element_get_direction(tileElement)) << 8); - sint32 ecx = y * 32; - sint32 edx = tileElement->base_height | (scenery_large_get_sequence(tileElement) << 8); - sint32 edi = 0, ebp = 0; + int32_t eax = x * 32; + int32_t ebx = flags | ((tile_element_get_direction(tileElement)) << 8); + int32_t ecx = y * 32; + int32_t edx = tileElement->base_height | (scenery_large_get_sequence(tileElement) << 8); + int32_t edi = 0, ebp = 0; cost = game_do_command(eax, ebx | (1 << 7), ecx, edx, GAME_COMMAND_REMOVE_LARGE_SCENERY, edi, ebp); if (cost == MONEY32_UNDEFINED) @@ -1167,8 +1167,8 @@ restart_from_beginning: static void map_reset_clear_large_scenery_flag(){ rct_tile_element* tileElement; // TODO: Improve efficiency of this - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { tileElement = map_get_first_element_at(x, y); do { if (tileElement->GetType() == TILE_ELEMENT_TYPE_LARGE_SCENERY) { @@ -1179,9 +1179,9 @@ static void map_reset_clear_large_scenery_flag(){ } } -money32 map_clear_scenery(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 clear, sint32 flags) +money32 map_clear_scenery(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t clear, int32_t flags) { - sint32 x, y, z; + int32_t x, y, z; money32 totalCost, cost; bool noValidTiles; @@ -1196,8 +1196,8 @@ money32 map_clear_scenery(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 cle x0 = std::max(x0, 32); y0 = std::max(y0, 32); - x1 = std::min(x1, (sint32)gMapSizeMaxXY); - y1 = std::min(y1, (sint32)gMapSizeMaxXY); + x1 = std::min(x1, (int32_t)gMapSizeMaxXY); + y1 = std::min(y1, (int32_t)gMapSizeMaxXY); noValidTiles = true; totalCost = 0; @@ -1235,13 +1235,13 @@ money32 map_clear_scenery(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 cle * rct2: 0x0068DF91 */ void game_command_clear_scenery( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = map_clear_scenery( - (sint16)(*eax & 0xFFFF), - (sint16)(*ecx & 0xFFFF), - (sint16)(*edi & 0xFFFF), - (sint16)(*ebp & 0xFFFF), + (int16_t)(*eax & 0xFFFF), + (int16_t)(*ecx & 0xFFFF), + (int16_t)(*edi & 0xFFFF), + (int16_t)(*ebp & 0xFFFF), *edx, *ebx & 0xFF ); @@ -1251,21 +1251,21 @@ void game_command_clear_scenery( * * rct2: 0x00663CCD */ -static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32 y1, uint8 surfaceStyle, uint8 edgeStyle, uint8 flags) +static money32 map_change_surface_style(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint8_t surfaceStyle, uint8_t edgeStyle, uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; x0 = std::max(x0, 32); y0 = std::max(y0, 32); - x1 = std::min(x1, (sint32)gMapSizeMaxXY); - y1 = std::min(y1, (sint32)gMapSizeMaxXY); + x1 = std::min(x1, (int32_t)gMapSizeMaxXY); + y1 = std::min(y1, (int32_t)gMapSizeMaxXY); - sint32 xMid, yMid; + int32_t xMid, yMid; xMid = (x0 + x1) / 2 + 16; yMid = (y0 + y1) / 2 + 16; - sint32 heightMid = tile_element_height(xMid, yMid); + int32_t heightMid = tile_element_height(xMid, yMid); gCommandPosition.x = xMid; gCommandPosition.y = yMid; @@ -1286,8 +1286,8 @@ static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32 money32 surfaceCost = 0; money32 edgeCost = 0; - for (sint32 x = x0; x <= x1; x += 32) { - for (sint32 y = y0; y <= y1; y += 32) { + for (int32_t x = x0; x <= x1; x += 32) { + for (int32_t y = y0; y <= y1; y += 32) { if (x > 0x1FFF) continue; if (y > 0x1FFF) continue; @@ -1298,14 +1298,14 @@ static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32 rct_tile_element* tileElement = map_get_surface_element_at({x, y}); if (surfaceStyle != 0xFF){ - uint8 cur_terrain = ( + uint8_t cur_terrain = ( tile_element_get_direction(tileElement) << 3) | (tileElement->properties.surface.terrain >> 5); if (surfaceStyle != cur_terrain) { // Prevent network-originated value of surfaceStyle from causing // invalid access. - uint8 style = surfaceStyle & 0x1F; + uint8_t style = surfaceStyle & 0x1F; if (style >= Util::CountOf(TerrainPricing)) { return MONEY32_UNDEFINED; } @@ -1329,7 +1329,7 @@ static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32 } if (edgeStyle != 0xFF) { - uint8 currentEdge = + uint8_t currentEdge = ((tileElement->type & 0x80) >> 4) | (tileElement->properties.surface.slope >> 5); @@ -1382,13 +1382,13 @@ static money32 map_change_surface_style(sint32 x0, sint32 y0, sint32 x1, sint32 * rct2: 0x00663CCD */ void game_command_change_surface_style( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = map_change_surface_style( - (sint16)(*eax & 0xFFFF), - (sint16)(*ecx & 0xFFFF), - (sint16)(*edi & 0xFFFF), - (sint16)(*ebp & 0xFFFF), + (int16_t)(*eax & 0xFFFF), + (int16_t)(*ecx & 0xFFFF), + (int16_t)(*edi & 0xFFFF), + (int16_t)(*ebp & 0xFFFF), *edx & 0xFF, (*edx & 0xFF00) >> 8, *ebx & 0xFF @@ -1400,7 +1400,7 @@ void game_command_change_surface_style( // Table of pre-calculated surface slopes (32) when raising the land tile for a given selection (5) // 0x1F = new slope // 0x20 = base height increases -static constexpr const uint8 tile_element_raise_styles[9][32] = { +static constexpr const uint8_t tile_element_raise_styles[9][32] = { { 0x01, 0x1B, 0x03, 0x1B, 0x05, 0x21, 0x07, 0x21, 0x09, 0x1B, 0x0B, 0x1B, 0x0D, 0x21, 0x20, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x23, 0x18, 0x19, 0x1A, 0x3B, 0x1C, 0x29, 0x24, 0x1F }, // MAP_SELECT_TYPE_CORNER_0 (absolute rotation) { 0x02, 0x03, 0x17, 0x17, 0x06, 0x07, 0x17, 0x17, 0x0A, 0x0B, 0x22, 0x22, 0x0E, 0x20, 0x22, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x37, 0x18, 0x19, 0x1A, 0x23, 0x1C, 0x28, 0x26, 0x1F }, // MAP_SELECT_TYPE_CORNER_1 { 0x04, 0x05, 0x06, 0x07, 0x1E, 0x24, 0x1E, 0x24, 0x0C, 0x0D, 0x0E, 0x20, 0x1E, 0x24, 0x1E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x26, 0x18, 0x19, 0x1A, 0x21, 0x1C, 0x2C, 0x3E, 0x1F }, // MAP_SELECT_TYPE_CORNER_2 @@ -1416,7 +1416,7 @@ static constexpr const uint8 tile_element_raise_styles[9][32] = { // Basically the inverse of the table above. // 0x1F = new slope // 0x20 = base height increases -static constexpr const uint8 tile_element_lower_styles[9][32] = { +static constexpr const uint8_t tile_element_lower_styles[9][32] = { { 0x2E, 0x00, 0x2E, 0x02, 0x3E, 0x04, 0x3E, 0x06, 0x2E, 0x08, 0x2E, 0x0A, 0x3E, 0x0C, 0x3E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x06, 0x18, 0x19, 0x1A, 0x0B, 0x1C, 0x0C, 0x3E, 0x1F }, // MAP_SELECT_TYPE_CORNER_0 { 0x2D, 0x2D, 0x00, 0x01, 0x2D, 0x2D, 0x04, 0x05, 0x3D, 0x3D, 0x08, 0x09, 0x3D, 0x3D, 0x0C, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x07, 0x18, 0x19, 0x1A, 0x09, 0x1C, 0x3D, 0x0C, 0x1F }, // MAP_SELECT_TYPE_CORNER_1 { 0x2B, 0x3B, 0x2B, 0x3B, 0x00, 0x01, 0x02, 0x03, 0x2B, 0x3B, 0x2B, 0x3B, 0x08, 0x09, 0x0A, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x03, 0x18, 0x19, 0x1A, 0x3B, 0x1C, 0x09, 0x0E, 0x1F }, // MAP_SELECT_TYPE_CORNER_2 @@ -1432,11 +1432,11 @@ static constexpr const uint8 tile_element_lower_styles[9][32] = { * * rct2: 0x00663CB9 */ -static sint32 map_set_land_height_clear_func( +static int32_t map_set_land_height_clear_func( rct_tile_element ** tile_element, - [[maybe_unused]] sint32 x, - [[maybe_unused]] sint32 y, - [[maybe_unused]] uint8 flags, + [[maybe_unused]] int32_t x, + [[maybe_unused]] int32_t y, + [[maybe_unused]] uint8_t flags, [[maybe_unused]] money32 * price) { if ((*tile_element)->GetType() == TILE_ELEMENT_TYPE_SURFACE) @@ -1448,7 +1448,7 @@ static sint32 map_set_land_height_clear_func( return 1; } -static sint32 map_get_corner_height(sint32 z, sint32 slope, sint32 direction) +static int32_t map_get_corner_height(int32_t z, int32_t slope, int32_t direction) { switch (direction) { case 0: @@ -1487,14 +1487,14 @@ static sint32 map_get_corner_height(sint32 z, sint32 slope, sint32 direction) return z; } -static sint32 tile_element_get_corner_height(const rct_tile_element *tileElement, sint32 direction) +static int32_t tile_element_get_corner_height(const rct_tile_element *tileElement, int32_t direction) { - sint32 z = tileElement->base_height; - sint32 slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + int32_t z = tileElement->base_height; + int32_t slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; return map_get_corner_height(z, slope, direction); } -static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 height, sint32 style) +static money32 map_set_land_height(int32_t flags, int32_t x, int32_t y, int32_t height, int32_t style) { rct_tile_element *tileElement; @@ -1578,19 +1578,19 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig { if (tileElement->GetType() == TILE_ELEMENT_TYPE_TRACK) { - sint32 rideIndex = track_element_get_ride_index(tileElement); + int32_t rideIndex = track_element_get_ride_index(tileElement); Ride * ride = get_ride(rideIndex); if (ride != nullptr) { rct_ride_entry * rideEntry = get_ride_entry_by_ride(ride); if (rideEntry != nullptr) { - sint32 maxHeight = rideEntry->max_height; + int32_t maxHeight = rideEntry->max_height; if (maxHeight == 0) { maxHeight = RideData5[get_ride(rideIndex)->type].max_height; } - sint32 zDelta = tileElement->clearance_height - height; + int32_t zDelta = tileElement->clearance_height - height; if (zDelta >= 0 && zDelta / 2 > maxHeight) { gGameCommandErrorText = STR_SUPPORTS_CANT_BE_EXTENDED; @@ -1603,11 +1603,11 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig while(!(tileElement++)->IsLastForTile()); } - uint8 zCorner = height; //z position of highest corner of tile + uint8_t zCorner = height; //z position of highest corner of tile rct_tile_element *surfaceElement = map_get_surface_element_at({x, y}); if(surfaceElement->type & TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT) { - sint32 waterHeight = surface_get_water_height(surfaceElement); + int32_t waterHeight = surface_get_water_height(surfaceElement); if(waterHeight != 0) { if(style & 0x1F) @@ -1646,7 +1646,7 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig if (!gCheatsDisableClearanceChecks) { tileElement = map_get_first_element_at(x / 32, y / 32); do { - sint32 elementType = tileElement->GetType(); + int32_t elementType = tileElement->GetType(); if (elementType == TILE_ELEMENT_TYPE_WALL) continue; @@ -1673,8 +1673,8 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig } while (!(tileElement++)->IsLastForTile()); } - for (sint32 i = 0; i < 4; i += 1) { - sint32 cornerHeight = tile_element_get_corner_height(surfaceElement, i); + for (int32_t i = 0; i < 4; i += 1) { + int32_t cornerHeight = tile_element_get_corner_height(surfaceElement, i); cornerHeight -= map_get_corner_height(height, style & TILE_ELEMENT_SURFACE_SLOPE_MASK, i); cost += MONEY(abs(cornerHeight) * 5 / 2, 0); } @@ -1694,7 +1694,7 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig surfaceElement->clearance_height = height; surfaceElement->properties.surface.slope &= TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK; surfaceElement->properties.surface.slope |= style; - sint32 slope = surfaceElement->properties.surface.terrain & TILE_ELEMENT_SURFACE_SLOPE_MASK; + int32_t slope = surfaceElement->properties.surface.terrain & TILE_ELEMENT_SURFACE_SLOPE_MASK; if(slope != TILE_ELEMENT_SLOPE_FLAT && slope <= height / 2) surfaceElement->properties.surface.terrain &= TILE_ELEMENT_SURFACE_TERRAIN_MASK; map_invalidate_tile_full(x, y); @@ -1705,13 +1705,13 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig } void game_command_set_land_height( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = map_set_land_height( *ebx & 0xFF, @@ -1722,30 +1722,30 @@ void game_command_set_land_height( ); } -static money32 map_set_land_ownership(uint8 flags, sint16 x1, sint16 y1, sint16 x2, sint16 y2, uint8 newOwnership) { +static money32 map_set_land_ownership(uint8_t flags, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t newOwnership) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LAND_PURCHASE; if (!(flags & GAME_COMMAND_FLAG_APPLY)) return 0; // Clamp to maximum addressable element to prevent long loop spamming the log - x1 = Math::Clamp(32, (sint32)x1, gMapSizeUnits - 32); - y1 = Math::Clamp(32, (sint32)y1, gMapSizeUnits - 32); - x2 = Math::Clamp(32, (sint32)x2, gMapSizeUnits - 32); - y2 = Math::Clamp(32, (sint32)y2, gMapSizeUnits - 32); + x1 = Math::Clamp(32, (int32_t)x1, gMapSizeUnits - 32); + y1 = Math::Clamp(32, (int32_t)y1, gMapSizeUnits - 32); + x2 = Math::Clamp(32, (int32_t)x2, gMapSizeUnits - 32); + y2 = Math::Clamp(32, (int32_t)y2, gMapSizeUnits - 32); gMapLandRightsUpdateSuccess = false; map_buy_land_rights(x1, y1, x2, y2, BUY_LAND_RIGHTS_FLAG_SET_OWNERSHIP_WITH_CHECKS, flags | (newOwnership << 8)); if (!gMapLandRightsUpdateSuccess) return 0; - sint16 x = Math::Clamp(32, (sint32)x1, gMapSizeUnits - 32); - sint16 y = Math::Clamp(32, (sint32)y1, gMapSizeUnits - 32); + int16_t x = Math::Clamp(32, (int32_t)x1, gMapSizeUnits - 32); + int16_t y = Math::Clamp(32, (int32_t)y1, gMapSizeUnits - 32); x += 16; y += 16; - sint16 z = tile_element_height(x, y) & 0xFFFF; + int16_t z = tile_element_height(x, y) & 0xFFFF; audio_play_sound_at_location(SOUND_PLACE_ITEM, x, y, z); return 0; } @@ -1755,9 +1755,9 @@ static money32 map_set_land_ownership(uint8 flags, sint16 x1, sint16 y1, sint16 * rct2: 0x006648E3 */ void game_command_set_land_ownership( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { - sint32 flags = *ebx & 0xFF; + int32_t flags = *ebx & 0xFF; *ebx = map_set_land_ownership( flags, @@ -1773,16 +1773,16 @@ void game_command_set_land_ownership( } } -static uint8 map_get_lowest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, sint32 yMax) +static uint8_t map_get_lowest_land_height(int32_t xMin, int32_t xMax, int32_t yMin, int32_t yMax) { xMin = std::max(xMin, 32); yMin = std::max(yMin, 32); - xMax = std::min(xMax, (sint32)gMapSizeMaxXY); - yMax = std::min(yMax, (sint32)gMapSizeMaxXY); + xMax = std::min(xMax, (int32_t)gMapSizeMaxXY); + yMax = std::min(yMax, (int32_t)gMapSizeMaxXY); - uint8 min_height = 0xFF; - for (sint32 yi = yMin; yi <= yMax; yi += 32) { - for (sint32 xi = xMin; xi <= xMax; xi += 32) { + uint8_t min_height = 0xFF; + for (int32_t yi = yMin; yi <= yMax; yi += 32) { + for (int32_t xi = xMin; xi <= xMax; xi += 32) { rct_tile_element *tile_element = map_get_surface_element_at({xi, yi}); if (tile_element != nullptr && min_height > tile_element->base_height) { min_height = tile_element->base_height; @@ -1792,19 +1792,19 @@ static uint8 map_get_lowest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, s return min_height; } -static uint8 map_get_highest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, sint32 yMax) +static uint8_t map_get_highest_land_height(int32_t xMin, int32_t xMax, int32_t yMin, int32_t yMax) { xMin = std::max(xMin, 32); yMin = std::max(yMin, 32); - xMax = std::min(xMax, (sint32)gMapSizeMaxXY); - yMax = std::min(yMax, (sint32)gMapSizeMaxXY); + xMax = std::min(xMax, (int32_t)gMapSizeMaxXY); + yMax = std::min(yMax, (int32_t)gMapSizeMaxXY); - uint8 max_height = 0; - for (sint32 yi = yMin; yi <= yMax; yi += 32) { - for (sint32 xi = xMin; xi <= xMax; xi += 32) { + uint8_t max_height = 0; + for (int32_t yi = yMin; yi <= yMax; yi += 32) { + for (int32_t xi = xMin; xi <= xMax; xi += 32) { rct_tile_element *tile_element = map_get_surface_element_at({xi, yi}); if (tile_element != nullptr) { - uint8 base_height = tile_element->base_height; + uint8_t base_height = tile_element->base_height; if (tile_element->properties.surface.slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) base_height += 2; if (tile_element->properties.surface.slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) @@ -1817,7 +1817,7 @@ static uint8 map_get_highest_land_height(sint32 xMin, sint32 xMax, sint32 yMin, return max_height; } -static money32 raise_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 point_a_x, sint32 point_a_y, sint32 point_b_x, sint32 point_b_y, sint32 selectionType) +static money32 raise_land(int32_t flags, int32_t x, int32_t y, int32_t z, int32_t point_a_x, int32_t point_a_y, int32_t point_b_x, int32_t point_b_y, int32_t selectionType) { money32 cost = 0; size_t tableRow = selectionType; @@ -1837,20 +1837,20 @@ static money32 raise_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 poi point_a_y = std::max(32, point_a_y); point_b_y = std::min(gMapSizeMaxXY, point_b_y); - uint8 min_height = map_get_lowest_land_height(point_a_x, point_b_x, point_a_y, point_b_y); + uint8_t min_height = map_get_lowest_land_height(point_a_x, point_b_x, point_a_y, point_b_y); - for (sint32 y_coord = point_a_y; y_coord <= point_b_y; y_coord += 32) + for (int32_t y_coord = point_a_y; y_coord <= point_b_y; y_coord += 32) { - for (sint32 x_coord = point_a_x; x_coord <= point_b_x; x_coord += 32) + for (int32_t x_coord = point_a_x; x_coord <= point_b_x; x_coord += 32) { rct_tile_element * tile_element = map_get_surface_element_at(x_coord / 32, y_coord / 32); if (tile_element != nullptr) { - uint8 height = tile_element->base_height; + uint8_t height = tile_element->base_height; if (height <= min_height) { - uint8 raisedCorners = tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; - uint8 slope = tile_element_raise_styles[tableRow][raisedCorners]; + uint8_t raisedCorners = tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + uint8_t slope = tile_element_raise_styles[tableRow][raisedCorners]; if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) height += 2; @@ -1877,7 +1877,7 @@ static money32 raise_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 poi return cost; } -static money32 lower_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 point_a_x, sint32 point_a_y, sint32 point_b_x, sint32 point_b_y, sint32 selectionType) +static money32 lower_land(int32_t flags, int32_t x, int32_t y, int32_t z, int32_t point_a_x, int32_t point_a_y, int32_t point_b_x, int32_t point_b_y, int32_t selectionType) { money32 cost = 0; size_t tableRow = selectionType; @@ -1897,16 +1897,16 @@ static money32 lower_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 poi audio_play_sound_at_location(SOUND_PLACE_ITEM, x, y, z); } - uint8 max_height = map_get_highest_land_height(point_a_x, point_b_x, point_a_y, point_b_y); + uint8_t max_height = map_get_highest_land_height(point_a_x, point_b_x, point_a_y, point_b_y); - for (sint32 y_coord = point_a_y; y_coord <= point_b_y; y_coord += 32) + for (int32_t y_coord = point_a_y; y_coord <= point_b_y; y_coord += 32) { - for (sint32 x_coord = point_a_x; x_coord <= point_b_x; x_coord += 32) + for (int32_t x_coord = point_a_x; x_coord <= point_b_x; x_coord += 32) { rct_tile_element * tile_element = map_get_surface_element_at(x_coord / 32, y_coord / 32); if (tile_element != nullptr) { - uint8 height = tile_element->base_height; + uint8_t height = tile_element->base_height; if (tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_RAISED_CORNERS_MASK) height += 2; if (tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_DIAGONAL_FLAG) @@ -1915,8 +1915,8 @@ static money32 lower_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 poi if (height >= max_height) { height = tile_element->base_height; - uint8 currentSlope = tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; - uint8 newSlope = tile_element_lower_styles[tableRow][currentSlope]; + uint8_t currentSlope = tile_element->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + uint8_t newSlope = tile_element_lower_styles[tableRow][currentSlope]; if (newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) height -= 2; @@ -1942,23 +1942,23 @@ static money32 lower_land(sint32 flags, sint32 x, sint32 y, sint32 z, sint32 poi return cost; } -money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) +money32 raise_water(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint8_t flags) { money32 cost = 0; bool waterHeightChanged = false; - uint8 max_height = 0xFF; + uint8_t max_height = 0xFF; - x0 = std::max(x0, (sint16)32); - y0 = std::max(y0, (sint16)32); + x0 = std::max(x0, (int16_t)32); + y0 = std::max(y0, (int16_t)32); x1 = std::min(x1, gMapSizeMaxXY); y1 = std::min(y1, gMapSizeMaxXY); - for (sint32 yi = y0; yi <= y1; yi += 32) { - for (sint32 xi = x0; xi <= x1; xi += 32) { + for (int32_t yi = y0; yi <= y1; yi += 32) { + for (int32_t xi = x0; xi <= x1; xi += 32) { rct_tile_element* tile_element = map_get_surface_element_at({xi, yi}); if (tile_element != nullptr) { - uint8 height = tile_element->base_height; + uint8_t height = tile_element->base_height; if (surface_get_water_height(tile_element) > 0) height = surface_get_water_height(tile_element) * 2; if (max_height > height) @@ -1967,12 +1967,12 @@ money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) } } - for (sint32 yi = y0; yi <= y1; yi += 32) { - for (sint32 xi = x0; xi <= x1; xi += 32) { + for (int32_t yi = y0; yi <= y1; yi += 32) { + for (int32_t xi = x0; xi <= x1; xi += 32) { rct_tile_element* tile_element = map_get_surface_element_at({xi, yi}); if (tile_element != nullptr) { if (tile_element->base_height <= max_height){ - uint8 height = surface_get_water_height(tile_element); + uint8_t height = surface_get_water_height(tile_element); if (height != 0) { height *= 2; if (height > max_height) @@ -1994,11 +1994,11 @@ money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) } if (flags & GAME_COMMAND_FLAG_APPLY) { - sint32 x = ((x0 + x1) / 2) + 16; - sint32 y = ((y0 + y1) / 2) + 16; - sint32 z = tile_element_height(x, y); - sint16 water_height_z = z >> 16; - sint16 base_height_z = z; + int32_t x = ((x0 + x1) / 2) + 16; + int32_t y = ((y0 + y1) / 2) + 16; + int32_t z = tile_element_height(x, y); + int16_t water_height_z = z >> 16; + int16_t base_height_z = z; z = water_height_z; if (z != 0) z = base_height_z; @@ -2023,23 +2023,23 @@ money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) return cost; } -money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) +money32 lower_water(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint8_t flags) { money32 cost = 0; bool waterHeightChanged = false; - uint8 min_height = 0; + uint8_t min_height = 0; - x0 = std::max(x0, (sint16)32); - y0 = std::max(y0, (sint16)32); + x0 = std::max(x0, (int16_t)32); + y0 = std::max(y0, (int16_t)32); x1 = std::min(x1, gMapSizeMaxXY); y1 = std::min(y1, gMapSizeMaxXY); - for (sint32 yi = y0; yi <= y1; yi += 32){ - for (sint32 xi = x0; xi <= x1; xi += 32){ + for (int32_t yi = y0; yi <= y1; yi += 32){ + for (int32_t xi = x0; xi <= x1; xi += 32){ rct_tile_element* tile_element = map_get_surface_element_at({xi, yi}); if (tile_element != nullptr) { - uint8 height = surface_get_water_height(tile_element); + uint8_t height = surface_get_water_height(tile_element); if (height != 0) { height *= 2; if (height > min_height) @@ -2049,17 +2049,17 @@ money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) } } - for (sint32 yi = y0; yi <= y1; yi += 32) { - for (sint32 xi = x0; xi <= x1; xi += 32) { + for (int32_t yi = y0; yi <= y1; yi += 32) { + for (int32_t xi = x0; xi <= x1; xi += 32) { rct_tile_element* tile_element = map_get_surface_element_at({xi, yi}); if (tile_element != nullptr) { - uint8 height = surface_get_water_height(tile_element); + uint8_t height = surface_get_water_height(tile_element); if (height != 0) { height *= 2; if (height < min_height) continue; height -= 2; - sint32 tileCost = game_do_command(xi, flags, yi, (min_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); + int32_t tileCost = game_do_command(xi, flags, yi, (min_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); if (tileCost == MONEY32_UNDEFINED) return MONEY32_UNDEFINED; cost += tileCost; @@ -2070,11 +2070,11 @@ money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) } if (flags & GAME_COMMAND_FLAG_APPLY) { - sint32 x = ((x0 + x1) / 2) + 16; - sint32 y = ((y0 + y1) / 2) + 16; - sint32 z = tile_element_height(x, y); - sint16 water_height_z = z >> 16; - sint16 base_height_z = z; + int32_t x = ((x0 + x1) / 2) + 16; + int32_t y = ((y0 + y1) / 2) + 16; + int32_t z = tile_element_height(x, y); + int16_t water_height_z = z >> 16; + int16_t base_height_z = z; z = water_height_z; if (z == 0) z = base_height_z; @@ -2104,15 +2104,15 @@ money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) * rct2: 0x0068C542 */ void game_command_raise_land( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = raise_land( *ebx, *eax, *ecx, tile_element_height(*eax, *ecx), - (sint16)(*edx & 0xFFFF), - (sint16)(*ebp & 0xFFFF), + (int16_t)(*edx & 0xFFFF), + (int16_t)(*ebp & 0xFFFF), *edx >> 16, *ebp >> 16, *edi & 0xFFFF @@ -2124,25 +2124,25 @@ void game_command_raise_land( * rct2: 0x0068C6D1 */ void game_command_lower_land( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = lower_land( *ebx, *eax, *ecx, tile_element_height(*eax, *ecx), - (sint16)(*edx & 0xFFFF), - (sint16)(*ebp & 0xFFFF), + (int16_t)(*edx & 0xFFFF), + (int16_t)(*ebp & 0xFFFF), *edx >> 16, *ebp >> 16, *edi & 0xFFFF ); } -static money32 smooth_land_tile(sint32 direction, uint8 flags, sint32 x, sint32 y, rct_tile_element * tileElement, bool raiseLand) +static money32 smooth_land_tile(int32_t direction, uint8_t flags, int32_t x, int32_t y, rct_tile_element * tileElement, bool raiseLand) { - sint32 targetBaseZ = tileElement->base_height; - sint32 slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + int32_t targetBaseZ = tileElement->base_height; + int32_t slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; if (raiseLand) { slope = tile_element_raise_styles[direction][slope]; if (slope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) { @@ -2161,10 +2161,10 @@ static money32 smooth_land_tile(sint32 direction, uint8 flags, sint32 x, sint32 return game_do_command(x, flags, y, targetBaseZ | (slope << 8), GAME_COMMAND_SET_LAND_HEIGHT, 0, 0); } -static money32 smooth_land_row_by_edge(sint32 flags, sint32 x, sint32 y, sint32 expectedLandHeight1, sint32 expectedLandHeight2, sint32 stepX, sint32 stepY, sint32 direction1, sint32 direction2, sint32 checkDirection1, sint32 checkDirection2, bool raiseLand) +static money32 smooth_land_row_by_edge(int32_t flags, int32_t x, int32_t y, int32_t expectedLandHeight1, int32_t expectedLandHeight2, int32_t stepX, int32_t stepY, int32_t direction1, int32_t direction2, int32_t checkDirection1, int32_t checkDirection2, bool raiseLand) { - uint8 shouldContinue = 0xF; - sint32 landChangePerTile = raiseLand ? -2 : 2; + uint8_t shouldContinue = 0xF; + int32_t landChangePerTile = raiseLand ? -2 : 2; rct_tile_element *tileElement, *nextTileElement; money32 totalCost = 0; money32 result; @@ -2223,9 +2223,9 @@ static money32 smooth_land_row_by_edge(sint32 flags, sint32 x, sint32 y, sint32 expectedLandHeight1 += landChangePerTile; // change land of current tile - sint32 targetBaseZ = tileElement->base_height; - sint32 slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; - sint32 oldSlope = slope; + int32_t targetBaseZ = tileElement->base_height; + int32_t slope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + int32_t oldSlope = slope; if (raiseLand) { if (shouldContinue & 0x4) { slope = tile_element_raise_styles[direction1][slope]; @@ -2273,13 +2273,13 @@ static money32 smooth_land_row_by_edge(sint32 flags, sint32 x, sint32 y, sint32 return totalCost; } -static money32 smooth_land_row_by_corner(sint32 flags, sint32 x, sint32 y, sint32 expectedLandHeight, sint32 stepX, sint32 stepY, sint32 direction, sint32 checkDirection, bool raiseLand) +static money32 smooth_land_row_by_corner(int32_t flags, int32_t x, int32_t y, int32_t expectedLandHeight, int32_t stepX, int32_t stepY, int32_t direction, int32_t checkDirection, bool raiseLand) { bool shouldContinue = true; rct_tile_element *tileElement, *nextTileElement; money32 totalCost = 0; money32 result; - sint32 landChangePerTile; + int32_t landChangePerTile; if (stepX == 0 || stepY == 0) { landChangePerTile = raiseLand ? -2 : 2; @@ -2342,12 +2342,12 @@ static money32 smooth_land_row_by_corner(sint32 flags, sint32 x, sint32 y, sint3 return totalCost; } -static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 mapLeft, sint32 mapTop, sint32 mapRight, sint32 mapBottom, sint32 command) +static money32 smooth_land(int32_t flags, int32_t centreX, int32_t centreY, int32_t mapLeft, int32_t mapTop, int32_t mapRight, int32_t mapBottom, int32_t command) { // break up information in command const bool raiseLand = command < 0x7FFF; - const sint32 selectionType = command & 0x7FFF; - const sint32 heightOffset = raiseLand ? 2 : -2; + const int32_t selectionType = command & 0x7FFF; + const int32_t heightOffset = raiseLand ? 2 : -2; // Cap bounds to map mapLeft = std::max(mapLeft, 32); @@ -2356,7 +2356,7 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 mapBottom = Math::Clamp(0, mapBottom, (MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32); // Play sound (only once) - sint32 centreZ = tile_element_height(centreX, centreY); + int32_t centreZ = tile_element_height(centreX, centreY); if ((flags & GAME_COMMAND_FLAG_APPLY) && gGameCommandNestLevel == 1) { audio_play_sound_at_location(SOUND_PLACE_ITEM, centreX, centreY, centreZ); @@ -2376,57 +2376,57 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 { case MAP_SELECT_TYPE_FULL: { - uint8 minHeight = heightOffset + map_get_lowest_land_height(mapLeft, mapRight, mapTop, mapBottom); - uint8 maxHeight = heightOffset + map_get_highest_land_height(mapLeft, mapRight, mapTop, mapBottom); + uint8_t minHeight = heightOffset + map_get_lowest_land_height(mapLeft, mapRight, mapTop, mapBottom); + uint8_t maxHeight = heightOffset + map_get_highest_land_height(mapLeft, mapRight, mapTop, mapBottom); // Smooth the 4 corners { // top-left rct_tile_element * tileElement = map_get_surface_element_at({ mapLeft, mapTop }); - sint32 z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 2), maxHeight); + int32_t z = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 2), maxHeight); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z, -32, -32, 0, 2, raiseLand); } { // bottom-left rct_tile_element * tileElement = map_get_surface_element_at(mapLeft >> 5, mapBottom >> 5); - sint32 z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 3), maxHeight); + int32_t z = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 3), maxHeight); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapBottom, z, -32, 32, 1, 3, raiseLand); } { // bottom-right rct_tile_element * tileElement = map_get_surface_element_at(mapRight >> 5, mapBottom >> 5); - sint32 z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 0), maxHeight); + int32_t z = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 0), maxHeight); totalCost += smooth_land_row_by_corner(flags, mapRight, mapBottom, z, 32, 32, 2, 0, raiseLand); } { // top-right rct_tile_element * tileElement = map_get_surface_element_at(mapRight >> 5, mapTop >> 5); - sint32 z = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 1), maxHeight); + int32_t z = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 1), maxHeight); totalCost += smooth_land_row_by_corner(flags, mapRight, mapTop, z, 32, -32, 3, 1, raiseLand); } // Smooth the edges rct_tile_element * tileElement = nullptr; - sint32 z1, z2; - for (sint32 y = mapTop; y <= mapBottom; y += 32) + int32_t z1, z2; + for (int32_t y = mapTop; y <= mapBottom; y += 32) { tileElement = map_get_surface_element_at({ mapLeft, y }); - z1 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 3), maxHeight); - z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 2), maxHeight); + z1 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 3), maxHeight); + z2 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 2), maxHeight); totalCost += smooth_land_row_by_edge(flags, mapLeft, y, z1, z2, -32, 0, 0, 1, 3, 2, raiseLand); tileElement = map_get_surface_element_at({ mapRight, y }); - z1 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 1), maxHeight); - z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 0), maxHeight); + z1 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 1), maxHeight); + z2 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 0), maxHeight); totalCost += smooth_land_row_by_edge(flags, mapRight, y, z1, z2, 32, 0, 2, 3, 1, 0, raiseLand); } - for (sint32 x = mapLeft; x <= mapRight; x += 32) + for (int32_t x = mapLeft; x <= mapRight; x += 32) { tileElement = map_get_surface_element_at({ x, mapTop }); - z1 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 1), maxHeight); - z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 2), maxHeight); + z1 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 1), maxHeight); + z2 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 2), maxHeight); totalCost += smooth_land_row_by_edge(flags, x, mapTop, z1, z2, 0, -32, 0, 3, 1, 2, raiseLand); tileElement = map_get_surface_element_at({ x, mapBottom }); - z1 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 0), maxHeight); - z2 = Math::Clamp(minHeight, (uint8)tile_element_get_corner_height(tileElement, 3), maxHeight); + z1 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 0), maxHeight); + z2 = Math::Clamp(minHeight, (uint8_t)tile_element_get_corner_height(tileElement, 3), maxHeight); totalCost += smooth_land_row_by_edge(flags, x, mapBottom, z1, z2, 0, 32, 1, 2, 0, 3, raiseLand); } break; @@ -2437,8 +2437,8 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 case MAP_SELECT_TYPE_CORNER_3: { rct_tile_element * tileElement = map_get_surface_element_at({ mapLeft, mapTop }); - uint8 newBaseZ = tileElement->base_height; - uint8 newSlope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + uint8_t newBaseZ = tileElement->base_height; + uint8_t newSlope = tileElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; if (raiseLand) { @@ -2456,7 +2456,7 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 } // Smooth the corners - sint32 z = map_get_corner_height(newBaseZ, newSlope, 2); + int32_t z = map_get_corner_height(newBaseZ, newSlope, 2); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z, -32, -32, 0, 2, raiseLand); z = map_get_corner_height(newBaseZ, newSlope, 0); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z, 32, 32, 2, 0, raiseLand); @@ -2515,10 +2515,10 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 // TODO: Handle smoothing by edge // Get the two corners to raise rct_tile_element * surfaceElement = map_get_surface_element_at({ mapLeft, mapTop }); - uint8 newBaseZ = surfaceElement->base_height; - uint8 oldSlope = surfaceElement->properties.surface.slope; - uint8 newSlope = oldSlope; - sint32 rowIndex = selectionType - (MAP_SELECT_TYPE_EDGE_0 - MAP_SELECT_TYPE_FULL - 1); + uint8_t newBaseZ = surfaceElement->base_height; + uint8_t oldSlope = surfaceElement->properties.surface.slope; + uint8_t newSlope = oldSlope; + int32_t rowIndex = selectionType - (MAP_SELECT_TYPE_EDGE_0 - MAP_SELECT_TYPE_FULL - 1); if (raiseLand) { @@ -2536,10 +2536,10 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 newSlope &= ~SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT; } - const uint8 edge = selectionType - MAP_SELECT_TYPE_EDGE_0; + const uint8_t edge = selectionType - MAP_SELECT_TYPE_EDGE_0; // Table with corners for each edge selection. The first two are the selected corners, the latter two are the opposites - static constexpr uint8 cornerIndices[][4] = { + static constexpr uint8_t cornerIndices[][4] = { { 2, 3, 1, 0 }, // MAP_SELECT_TYPE_EDGE_0 { 3, 0, 2, 1 }, // MAP_SELECT_TYPE_EDGE_1 { 0, 1, 3, 2 }, // MAP_SELECT_TYPE_EDGE_2 @@ -2554,14 +2554,14 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 }; // Smooth higher and lower edges - uint8 c1 = cornerIndices[edge][0]; - uint8 c2 = cornerIndices[edge][1]; - uint8 c3 = cornerIndices[edge][2]; - uint8 c4 = cornerIndices[edge][3]; - uint8 z1 = map_get_corner_height(newBaseZ, newSlope, c1); - uint8 z2 = map_get_corner_height(newBaseZ, newSlope, c2); - uint8 z3 = map_get_corner_height(newBaseZ, newSlope, c3); - uint8 z4 = map_get_corner_height(newBaseZ, newSlope, c4); + uint8_t c1 = cornerIndices[edge][0]; + uint8_t c2 = cornerIndices[edge][1]; + uint8_t c3 = cornerIndices[edge][2]; + uint8_t c4 = cornerIndices[edge][3]; + uint8_t z1 = map_get_corner_height(newBaseZ, newSlope, c1); + uint8_t z2 = map_get_corner_height(newBaseZ, newSlope, c2); + uint8_t z3 = map_get_corner_height(newBaseZ, newSlope, c3); + uint8_t z4 = map_get_corner_height(newBaseZ, newSlope, c4); // Smooth the edge at the top of the new slope totalCost += smooth_land_row_by_edge(flags, mapLeft, mapTop, z1, z2, stepOffsets[edge].x, stepOffsets[edge].y, c3, c4, c1, c2, raiseLand); // Smooth the edge at the bottom of the new slope @@ -2570,7 +2570,7 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 // Smooth corners totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z1, -stepOffsets[edge].y, stepOffsets[edge].x, c2, c1, raiseLand); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z2, stepOffsets[edge].y, -stepOffsets[edge].x, c1, c2, raiseLand); - sint32 z = map_get_corner_height(newBaseZ, newSlope, 2); + int32_t z = map_get_corner_height(newBaseZ, newSlope, 2); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z, -32, -32, 0, 2, raiseLand); z = map_get_corner_height(newBaseZ, newSlope, 0); totalCost += smooth_land_row_by_corner(flags, mapLeft, mapTop, z, 32, 32, 2, 0, raiseLand); @@ -2583,9 +2583,9 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 } // switch selectionType // Raise / lower the land tool selection area - sint32 commandType = raiseLand ? GAME_COMMAND_RAISE_LAND : GAME_COMMAND_LOWER_LAND; - sint32 mapLeftRight = mapLeft | (mapRight << 16); - sint32 mapTopBottom = mapTop | (mapBottom << 16); + int32_t commandType = raiseLand ? GAME_COMMAND_RAISE_LAND : GAME_COMMAND_LOWER_LAND; + int32_t mapLeftRight = mapLeft | (mapRight << 16); + int32_t mapTopBottom = mapTop | (mapBottom << 16); money32 cost = game_do_command(centreX, flags, centreY, mapLeftRight, commandType, command & 0x7FFF, mapTopBottom); if (cost == MONEY32_UNDEFINED) { @@ -2606,16 +2606,16 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 * rct2: 0x0068BC01 */ void game_command_smooth_land( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { - sint32 flags = *ebx & 0xFF; - sint32 centreX = *eax & 0xFFFF; - sint32 centreY = *ecx & 0xFFFF; - sint32 mapLeft = (sint16)(*edx & 0xFFFF); - sint32 mapTop = (sint16)(*ebp & 0xFFFF); - sint32 mapRight = (sint16)(*edx >> 16); - sint32 mapBottom = (sint16)(*ebp >> 16); - sint32 command = *edi; + int32_t flags = *ebx & 0xFF; + int32_t centreX = *eax & 0xFFFF; + int32_t centreY = *ecx & 0xFFFF; + int32_t mapLeft = (int16_t)(*edx & 0xFFFF); + int32_t mapTop = (int16_t)(*ebp & 0xFFFF); + int32_t mapRight = (int16_t)(*edx >> 16); + int32_t mapBottom = (int16_t)(*ebp >> 16); + int32_t command = *edi; *ebx = smooth_land(flags, centreX, centreY, mapLeft, mapTop, mapRight, mapBottom, command); } @@ -2624,20 +2624,20 @@ void game_command_smooth_land( * rct2: 0x006E66A0 */ void game_command_raise_water( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + int32_t * ebp) { *ebx = raise_water( - (sint16)(*eax & 0xFFFF), - (sint16)(*ecx & 0xFFFF), - (sint16)(*edi & 0xFFFF), - (sint16)(*ebp & 0xFFFF), - (uint8)*ebx + (int16_t)(*eax & 0xFFFF), + (int16_t)(*ecx & 0xFFFF), + (int16_t)(*edi & 0xFFFF), + (int16_t)(*ebp & 0xFFFF), + (uint8_t)*ebx ); } @@ -2646,20 +2646,20 @@ void game_command_raise_water( * rct2: 0x006E6878 */ void game_command_lower_water( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - [[maybe_unused]] sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + [[maybe_unused]] int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + int32_t * ebp) { *ebx = lower_water( - (sint16)(*eax & 0xFFFF), - (sint16)(*ecx & 0xFFFF), - (sint16)(*edi & 0xFFFF), - (sint16)(*ebp & 0xFFFF), - (uint8)*ebx + (int16_t)(*eax & 0xFFFF), + (int16_t)(*ecx & 0xFFFF), + (int16_t)(*edi & 0xFFFF), + (int16_t)(*ebp & 0xFFFF), + (uint8_t)*ebx ); } @@ -2668,17 +2668,17 @@ void game_command_lower_water( * rct2: 0x006E650F */ void game_command_set_water_height( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { - sint32 x = *eax; - sint32 y = *ecx; - uint8 base_height = *edx; + int32_t x = *eax; + int32_t y = *ecx; + uint8_t base_height = *edx; gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; @@ -2718,21 +2718,21 @@ void game_command_set_water_height( } if(*ebx & GAME_COMMAND_FLAG_APPLY){ - sint32 element_height = tile_element_height(x, y); + int32_t element_height = tile_element_height(x, y); footpath_remove_litter(x, y, element_height); if(!gCheatsDisableClearanceChecks) wall_remove_at_z(x, y, element_height); } rct_tile_element* tile_element = map_get_surface_element_at({x, y}); - sint32 zHigh = tile_element->base_height; - sint32 zLow = base_height; + int32_t zHigh = tile_element->base_height; + int32_t zLow = base_height; if (surface_get_water_height(tile_element) > 0) { zHigh = surface_get_water_height(tile_element) * 2; } if(zLow > zHigh){ - sint32 temp = zHigh; + int32_t temp = zHigh; zHigh = zLow; zLow = temp; } @@ -2744,7 +2744,7 @@ void game_command_set_water_height( return; } if(*ebx & GAME_COMMAND_FLAG_APPLY){ - sint32 new_terrain = tile_element->properties.surface.terrain & 0xE0; + int32_t new_terrain = tile_element->properties.surface.terrain & 0xE0; if(base_height > tile_element->base_height){ new_terrain |= (base_height / 2); } @@ -2760,7 +2760,7 @@ void game_command_set_water_height( } } -bool map_is_location_at_edge(sint32 x, sint32 y) +bool map_is_location_at_edge(int32_t x, int32_t y) { return x < 32 || y < 32 || x >= ((MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32) || y >= ((MAXIMUM_MAP_SIZE_TECHNICAL - 1) * 32); } @@ -2770,18 +2770,18 @@ bool map_is_location_at_edge(sint32 x, sint32 y) * rct2: 0x006B893C */ void game_command_place_large_scenery( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; - sint32 x = (sint16)*eax; - sint32 y = (sint16)*ecx; - sint32 z = (sint16)*ebp; + int32_t x = (int16_t)*eax; + int32_t y = (int16_t)*ecx; + int32_t z = (int16_t)*ebp; colour_t colour1 = *edx & TILE_ELEMENT_COLOUR_MASK; colour_t colour2 = (*edx >> 8) & TILE_ELEMENT_COLOUR_MASK; - uint8 flags = *ebx; - uint8 rotation = *ebx >> 8; - uint8 entry_index = *edi; - sint32 base_height = tile_element_height(x, y); + uint8_t flags = *ebx; + uint8_t rotation = *ebx >> 8; + uint8_t entry_index = *edi; + int32_t base_height = tile_element_height(x, y); gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; gCommandPosition.z = base_height; @@ -2827,7 +2827,7 @@ void game_command_place_large_scenery( banner->x = x / 32; banner->y = y / 32; - uint8 rideIndex = banner_get_closest_ride_index(x, y, z); + uint8_t rideIndex = banner_get_closest_ride_index(x, y, z); if (rideIndex != RIDE_ID_NULL) { banner->ride_index = rideIndex; @@ -2836,8 +2836,8 @@ void game_command_place_large_scenery( } } - uint32 num_elements = 0; - sint16 maxHeight = -1; + uint32_t num_elements = 0; + int16_t maxHeight = -1; for (rct_large_scenery_tile* tile = scenery_entry->large_scenery.tiles; tile->x_offset != -1; tile++) { @@ -2860,8 +2860,8 @@ void game_command_place_large_scenery( rct_tile_element * tile_element = map_get_surface_element_at({curTile.x, curTile.y}); if(tile_element != nullptr) { - sint32 height = tile_element->base_height * 8; - sint32 slope = tile_element->properties.surface.slope; + int32_t height = tile_element->base_height * 8; + int32_t slope = tile_element->properties.surface.slope; if (slope & 0xF) { @@ -2888,7 +2888,7 @@ void game_command_place_large_scenery( } gCommandPosition.z = maxHeight; - uint8 tile_num = 0; + uint8_t tile_num = 0; for (rct_large_scenery_tile* tile = scenery_entry->large_scenery.tiles; tile->x_offset != -1; tile++, tile_num++) { @@ -2903,16 +2903,16 @@ void game_command_place_large_scenery( curTile.x += x; curTile.y += y; - sint32 zLow = (tile->z_offset + maxHeight) / 8; - sint32 zHigh = (tile->z_clearance / 8) + zLow; + int32_t zLow = (tile->z_offset + maxHeight) / 8; + int32_t zHigh = (tile->z_clearance / 8) + zLow; - sint32 bx = tile->flags >> 12; + int32_t bx = tile->flags >> 12; bx <<= rotation; - uint8 bl = bx; - uint8 bh = bl >> 4; + uint8_t bl = bx; + uint8_t bh = bl >> 4; bl &= 0xF; bl |= bh; - uint8 F43887 = bl; + uint8_t F43887 = bl; if (!gCheatsDisableClearanceChecks && !map_can_construct_with_clear_at(curTile.x, curTile.y, zLow, zHigh, &map_place_scenery_clear_func, bl, flags, &supportsCost, CREATE_CROSSING_MODE_NONE)) { *ebx = MONEY32_UNDEFINED; @@ -2924,7 +2924,7 @@ void game_command_place_large_scenery( return; } - sint32 b = gMapGroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); + int32_t b = gMapGroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); if (!gCheatsDisableClearanceChecks) { if (gSceneryGroundFlags && !(gSceneryGroundFlags & b)) { gGameCommandErrorText = STR_CANT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_GROUND; @@ -3000,7 +3000,7 @@ void game_command_place_large_scenery( } } -sint32 tile_element_get_station(const rct_tile_element * tileElement) +int32_t tile_element_get_station(const rct_tile_element * tileElement) { return (tileElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK) >> 4; } @@ -3077,12 +3077,12 @@ void map_invalidate_map_selection_tiles() map_invalidate_tile_full(position->x, position->y); } -void map_get_bounding_box(sint32 ax, sint32 ay, sint32 bx, sint32 by, sint32 *left, sint32 *top, sint32 *right, sint32 *bottom) +void map_get_bounding_box(int32_t ax, int32_t ay, int32_t bx, int32_t by, int32_t *left, int32_t *top, int32_t *right, int32_t *bottom) { - sint32 x, y; + int32_t x, y; x = ax; y = ay; - uint32 rotation = get_current_rotation(); + uint32_t rotation = get_current_rotation(); translate_3d_to_2d(rotation, &x, &y); *left = x; *right = x; @@ -3117,7 +3117,7 @@ void map_get_bounding_box(sint32 ax, sint32 ay, sint32 bx, sint32 by, sint32 *le */ void map_invalidate_selection_rect() { - sint32 x0, y0, x1, y1, left, right, top, bottom; + int32_t x0, y0, x1, y1, left, right, top, bottom; if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) return; @@ -3132,7 +3132,7 @@ void map_invalidate_selection_rect() bottom += 32; top -= 32 + 2080; - for (sint32 i = 0; i < MAX_VIEWPORT_COUNT; i++) { + for (int32_t i = 0; i < MAX_VIEWPORT_COUNT; i++) { rct_viewport *viewport = &g_viewport_list[i]; if (viewport->width != 0) { viewport_invalidate(viewport, left, top, right, bottom); @@ -3156,21 +3156,21 @@ void map_reorganise_elements() return; } - uint32 num_elements; + uint32_t num_elements; - for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { - for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { + for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) { + for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { rct_tile_element *startElement = map_get_first_element_at(x, y); rct_tile_element *endElement = startElement; while (!(endElement++)->IsLastForTile()); - num_elements = (uint32)(endElement - startElement); + num_elements = (uint32_t)(endElement - startElement); memcpy(new_elements_pointer, startElement, num_elements * sizeof(rct_tile_element)); new_elements_pointer += num_elements; } } - num_elements = (uint32)(new_elements_pointer - new_tile_elements); + num_elements = (uint32_t)(new_elements_pointer - new_tile_elements); memcpy(gTileElements, new_tile_elements, num_elements * sizeof(rct_tile_element)); memset(gTileElements + num_elements, 0, (3 * (MAXIMUM_MAP_SIZE_TECHNICAL * MAXIMUM_MAP_SIZE_TECHNICAL) - num_elements) * sizeof(rct_tile_element)); @@ -3185,12 +3185,12 @@ void map_reorganise_elements() * Returns true on space available for more elements * Reorganises the map elements to check for space */ -bool map_check_free_elements_and_reorganise(sint32 num_elements) +bool map_check_free_elements_and_reorganise(int32_t num_elements) { if ((gNextFreeTileElement + num_elements) <= gTileElements + MAX_TILE_ELEMENTS) return true; - for (sint32 i = 1000; i != 0; --i) + for (int32_t i = 1000; i != 0; --i) sub_68B089(); if ((gNextFreeTileElement + num_elements) <= gTileElements + MAX_TILE_ELEMENTS) @@ -3210,7 +3210,7 @@ bool map_check_free_elements_and_reorganise(sint32 num_elements) * * rct2: 0x0068B1F6 */ -rct_tile_element *tile_element_insert(sint32 x, sint32 y, sint32 z, sint32 flags) +rct_tile_element *tile_element_insert(int32_t x, int32_t y, int32_t z, int32_t flags) { rct_tile_element *originalTileElement, *newTileElement, *insertedElement; @@ -3286,7 +3286,7 @@ void map_obstruction_set_error_text(rct_tile_element *tileElement) ride = get_ride(track_element_get_ride_index(tileElement)); errorStringId = STR_X_IN_THE_WAY; set_format_arg(0, rct_string_id, ride->name); - set_format_arg(2, uint32, ride->name_arguments); + set_format_arg(2, uint32_t, ride->name_arguments); break; case TILE_ELEMENT_TYPE_SMALL_SCENERY: sceneryEntry = get_small_scenery_entry(tileElement->properties.scenery.type); @@ -3331,11 +3331,11 @@ void map_obstruction_set_error_text(rct_tile_element *tileElement) * ebp = clearFunc * bl = bl */ -bool map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 zHigh, CLEAR_FUNC clearFunc, uint8 bl, uint8 flags, money32 *price, uint8 crossingMode) +bool map_can_construct_with_clear_at(int32_t x, int32_t y, int32_t zLow, int32_t zHigh, CLEAR_FUNC clearFunc, uint8_t bl, uint8_t flags, money32 *price, uint8_t crossingMode) { - sint32 al, ah, bh, cl, ch, water_height; + int32_t al, ah, bh, cl, ch, water_height; al = ah = bh = cl = ch = water_height = 0; - uint8 slope = 0; + uint8_t slope = 0; gMapGroundFlags = ELEMENT_IS_ABOVE_GROUND; bool canBuildCrossing = false; @@ -3482,7 +3482,7 @@ bool map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 zHi * * rct2: 0x0068B93A */ -sint32 map_can_construct_at(sint32 x, sint32 y, sint32 zLow, sint32 zHigh, uint8 bl) +int32_t map_can_construct_at(int32_t x, int32_t y, int32_t zLow, int32_t zHigh, uint8_t bl) { return gCheatsDisableClearanceChecks || map_can_construct_with_clear_at(x, y, zLow, zHigh, nullptr, bl, 0, nullptr, CREATE_CROSSING_MODE_NONE); } @@ -3494,17 +3494,17 @@ sint32 map_can_construct_at(sint32 x, sint32 y, sint32 zLow, sint32 zHigh, uint8 */ void map_update_tiles() { - sint32 ignoreScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER; + int32_t ignoreScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER; if (gScreenFlags & ignoreScreenFlags) return; // Update 43 more tiles - for (sint32 j = 0; j < 43; j++) { - sint32 x = 0; - sint32 y = 0; + for (int32_t j = 0; j < 43; j++) { + int32_t x = 0; + int32_t y = 0; - uint16 interleaved_xy = gGrassSceneryTileLoopPosition; - for (sint32 i = 0; i < 8; i++) { + uint16_t interleaved_xy = gGrassSceneryTileLoopPosition; + for (int32_t i = 0; i < 8; i++) { x = (x << 1) | (interleaved_xy & 1); interleaved_xy >>= 1; y = (y << 1) | (interleaved_xy & 1); @@ -3526,16 +3526,16 @@ void map_update_tiles() * * rct2: 0x006647A1 */ -static void map_update_grass_length(sint32 x, sint32 y, rct_tile_element *tileElement) +static void map_update_grass_length(int32_t x, int32_t y, rct_tile_element *tileElement) { // Check if tile is grass if ((tileElement->properties.surface.terrain & 0xE0) && !(tileElement->type & 3)) return; - sint32 grassLength = tileElement->properties.surface.grass_length & 7; + int32_t grassLength = tileElement->properties.surface.grass_length & 7; // Check if grass is underwater or outside park - sint32 waterHeight = surface_get_water_height(tileElement) * 2; + int32_t waterHeight = surface_get_water_height(tileElement) * 2; if (waterHeight > tileElement->base_height || !map_is_location_in_park({x, y})) { if (grassLength != GRASS_LENGTH_CLEAR_0) map_set_grass_length(x, y, tileElement, GRASS_LENGTH_CLEAR_0); @@ -3546,8 +3546,8 @@ static void map_update_grass_length(sint32 x, sint32 y, rct_tile_element *tileEl // Grass can't grow any further than CLUMPS_2 but this code also cuts grass // if there is an object placed on top of it. - sint32 z0 = tileElement->base_height; - sint32 z1 = tileElement->base_height + 2; + int32_t z0 = tileElement->base_height; + int32_t z1 = tileElement->base_height + 2; if (tileElement->properties.surface.slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) z1 += 2; @@ -3558,7 +3558,7 @@ static void map_update_grass_length(sint32 x, sint32 y, rct_tile_element *tileEl // Grow grass // Check interim grass lengths - uint8 lengthNibble = (tileElement->properties.surface.grass_length & 0xF0) >> 4; + uint8_t lengthNibble = (tileElement->properties.surface.grass_length & 0xF0) >> 4; if (lengthNibble < 0xF) { tileElement->properties.surface.grass_length += 0x10; } else { @@ -3593,10 +3593,10 @@ static void map_update_grass_length(sint32 x, sint32 y, rct_tile_element *tileEl } } -static void map_set_grass_length(sint32 x, sint32 y, rct_tile_element *tileElement, sint32 length) +static void map_set_grass_length(int32_t x, int32_t y, rct_tile_element *tileElement, int32_t length) { - sint32 oldLength = tileElement->properties.surface.grass_length & 0x7; - sint32 newLength = length & 0x7; + int32_t oldLength = tileElement->properties.surface.grass_length & 0x7; + int32_t newLength = length & 0x7; tileElement->properties.surface.grass_length = length; @@ -3613,7 +3613,7 @@ static void map_set_grass_length(sint32 x, sint32 y, rct_tile_element *tileEleme return; } - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile(x, y, z, z + 16); } @@ -3655,10 +3655,10 @@ void map_restore_provisional_elements() */ void map_remove_out_of_range_elements() { - sint32 mapMaxXY = gMapSizeMaxXY; + int32_t mapMaxXY = gMapSizeMaxXY; - for (sint32 y = 0; y < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); y += 32) { - for (sint32 x = 0; x < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); x += 32) { + for (int32_t y = 0; y < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); y += 32) { + for (int32_t x = 0; x < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); x += 32) { if (x == 0 || y == 0 || x >= mapMaxXY || y >= mapMaxXY) { map_buy_land_rights(x, y, x, y, BUY_LAND_RIGHTS_FLAG_UNOWN_TILE, GAME_COMMAND_FLAG_APPLY); clear_elements_at(x, y); @@ -3674,7 +3674,7 @@ void map_remove_out_of_range_elements() void map_extend_boundary_surface() { rct_tile_element *existingTileElement, *newTileElement; - sint32 x, y, z, slope; + int32_t x, y, z, slope; y = gMapSize - 2; for (x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) { @@ -3753,7 +3753,7 @@ void map_extend_boundary_surface() * Clears the provided element properly from a certain tile, and updates * the pointer (when needed) passed to this function to point to the next element. */ -static void clear_element_at(sint32 x, sint32 y, rct_tile_element **elementPtr) +static void clear_element_at(int32_t x, int32_t y, rct_tile_element **elementPtr) { rct_tile_element *element = *elementPtr; switch (element->GetType()) { @@ -3770,7 +3770,7 @@ static void clear_element_at(sint32 x, sint32 y, rct_tile_element **elementPtr) break; case TILE_ELEMENT_TYPE_ENTRANCE: { - sint32 rotation = tile_element_get_direction_with_offset(element, 1); + int32_t rotation = tile_element_get_direction_with_offset(element, 1); switch (element->properties.entrance.index & 0x0F) { case 1: x += CoordsDirectionDelta[rotation].x; @@ -3826,10 +3826,10 @@ static void clear_element_at(sint32 x, sint32 y, rct_tile_element **elementPtr) * Clears all elements properly from a certain tile. * rct2: 0x0068AE2A */ -static void clear_elements_at(sint32 x, sint32 y) +static void clear_elements_at(int32_t x, int32_t y) { // Remove the spawn point (if there is one in the current tile) - for (sint32 i = 0; i < MAX_PEEP_SPAWNS; i++) { + for (int32_t i = 0; i < MAX_PEEP_SPAWNS; i++) { PeepSpawn *peepSpawn = &gPeepSpawns[i]; if (floor2(peepSpawn->x, 32) == x && floor2(peepSpawn->y, 32) == y) { peepSpawn->x = PEEP_SPAWN_UNDEFINED; @@ -3846,10 +3846,10 @@ static void clear_elements_at(sint32 x, sint32 y) clear_element_at(x, y, &tileElement); } -sint32 map_get_highest_z(sint32 tileX, sint32 tileY) +int32_t map_get_highest_z(int32_t tileX, int32_t tileY) { rct_tile_element *tileElement; - sint32 z; + int32_t z; tileElement = map_get_surface_element_at(tileX, tileY); if (tileElement == nullptr) @@ -3867,7 +3867,7 @@ sint32 map_get_highest_z(sint32 tileX, sint32 tileY) return z; } -rct_tile_element *map_get_large_scenery_segment(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence) +rct_tile_element *map_get_large_scenery_segment(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t sequence) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement == nullptr) @@ -3889,7 +3889,7 @@ rct_tile_element *map_get_large_scenery_segment(sint32 x, sint32 y, sint32 z, si return nullptr; } -rct_tile_element * map_get_park_entrance_element_at(sint32 x, sint32 y, sint32 z, bool ghost) +rct_tile_element * map_get_park_entrance_element_at(int32_t x, int32_t y, int32_t z, bool ghost) { rct_tile_element* tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement != nullptr) @@ -3915,7 +3915,7 @@ rct_tile_element * map_get_park_entrance_element_at(sint32 x, sint32 y, sint32 z return nullptr; } -rct_tile_element * map_get_ride_entrance_element_at(sint32 x, sint32 y, sint32 z, bool ghost) +rct_tile_element * map_get_ride_entrance_element_at(int32_t x, int32_t y, int32_t z, bool ghost) { rct_tile_element * tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement != nullptr) @@ -3941,7 +3941,7 @@ rct_tile_element * map_get_ride_entrance_element_at(sint32 x, sint32 y, sint32 z return nullptr; } -rct_tile_element * map_get_ride_exit_element_at(sint32 x, sint32 y, sint32 z, bool ghost) +rct_tile_element * map_get_ride_exit_element_at(int32_t x, int32_t y, int32_t z, bool ghost) { rct_tile_element * tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement != nullptr) @@ -3967,7 +3967,7 @@ rct_tile_element * map_get_ride_exit_element_at(sint32 x, sint32 y, sint32 z, bo return nullptr; } -rct_tile_element *map_get_small_scenery_element_at(sint32 x, sint32 y, sint32 z, sint32 type, uint8 quadrant) +rct_tile_element *map_get_small_scenery_element_at(int32_t x, int32_t y, int32_t z, int32_t type, uint8_t quadrant) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); if (tileElement != nullptr) @@ -3991,13 +3991,13 @@ rct_tile_element *map_get_small_scenery_element_at(sint32 x, sint32 y, sint32 z, } bool map_large_scenery_get_origin( - sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence, - sint32 *outX, sint32 *outY, sint32 *outZ, rct_tile_element** outElement + int32_t x, int32_t y, int32_t z, int32_t direction, int32_t sequence, + int32_t *outX, int32_t *outY, int32_t *outZ, rct_tile_element** outElement ) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; rct_large_scenery_tile *tile; - sint16 offsetX, offsetY; + int16_t offsetX, offsetY; tileElement = map_get_large_scenery_segment(x, y, z, direction, sequence); if (tileElement == nullptr) @@ -4022,13 +4022,13 @@ bool map_large_scenery_get_origin( * * rct2: 0x006B9B05 */ -bool sign_set_colour(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence, uint8 mainColour, uint8 textColour) +bool sign_set_colour(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t sequence, uint8_t mainColour, uint8_t textColour) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; rct_large_scenery_tile *sceneryTiles, *tile; - sint16 offsetX, offsetY; - sint32 x0, y0, z0; + int16_t offsetX, offsetY; + int32_t x0, y0, z0; if (!map_large_scenery_get_origin(x, y, z, direction, sequence, &x0, &y0, &z0, &tileElement)) { return false; @@ -4060,9 +4060,9 @@ bool sign_set_colour(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequ return true; } -static void translate_3d_to_2d(sint32 rotation, sint32 *x, sint32 *y) +static void translate_3d_to_2d(int32_t rotation, int32_t *x, int32_t *y) { - sint32 rx, ry; + int32_t rx, ry; switch (rotation & 3) { default: @@ -4089,7 +4089,7 @@ static void translate_3d_to_2d(sint32 rotation, sint32 *x, sint32 *y) *y = ry; } -CoordsXY translate_3d_to_2d_with_z(sint32 rotation, CoordsXYZ pos) +CoordsXY translate_3d_to_2d_with_z(int32_t rotation, CoordsXYZ pos) { CoordsXY result = {}; switch (rotation & 3) { @@ -4114,11 +4114,11 @@ CoordsXY translate_3d_to_2d_with_z(sint32 rotation, CoordsXYZ pos) return result; } -static void map_invalidate_tile_under_zoom(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 maxZoom) +static void map_invalidate_tile_under_zoom(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t maxZoom) { if (gOpenRCT2Headless) return; - sint32 x1, y1, x2, y2; + int32_t x1, y1, x2, y2; x += 16; y += 16; @@ -4129,7 +4129,7 @@ static void map_invalidate_tile_under_zoom(sint32 x, sint32 y, sint32 z0, sint32 x2 = x + 32; y2 = y + 32 - z0; - for (sint32 i = 0; i < MAX_VIEWPORT_COUNT; i++) { + for (int32_t i = 0; i < MAX_VIEWPORT_COUNT; i++) { rct_viewport *viewport = &g_viewport_list[i]; if (viewport->width != 0 && (maxZoom == -1 || viewport->zoom <= maxZoom)) { viewport_invalidate(viewport, x1, y1, x2, y2); @@ -4141,7 +4141,7 @@ static void map_invalidate_tile_under_zoom(sint32 x, sint32 y, sint32 z0, sint32 * * rct2: 0x006EC847 */ -void map_invalidate_tile(sint32 x, sint32 y, sint32 z0, sint32 z1) +void map_invalidate_tile(int32_t x, int32_t y, int32_t z0, int32_t z1) { map_invalidate_tile_under_zoom(x, y, z0, z1, -1); } @@ -4150,7 +4150,7 @@ void map_invalidate_tile(sint32 x, sint32 y, sint32 z0, sint32 z1) * * rct2: 0x006ECB60 */ -void map_invalidate_tile_zoom1(sint32 x, sint32 y, sint32 z0, sint32 z1) +void map_invalidate_tile_zoom1(int32_t x, int32_t y, int32_t z0, int32_t z1) { map_invalidate_tile_under_zoom(x, y, z0, z1, 1); } @@ -4159,7 +4159,7 @@ void map_invalidate_tile_zoom1(sint32 x, sint32 y, sint32 z0, sint32 z1) * * rct2: 0x006EC9CE */ -void map_invalidate_tile_zoom0(sint32 x, sint32 y, sint32 z0, sint32 z1) +void map_invalidate_tile_zoom0(int32_t x, int32_t y, int32_t z0, int32_t z1) { map_invalidate_tile_under_zoom(x, y, z0, z1, 0); } @@ -4168,19 +4168,19 @@ void map_invalidate_tile_zoom0(sint32 x, sint32 y, sint32 z0, sint32 z1) * * rct2: 0x006EC6D7 */ -void map_invalidate_tile_full(sint32 x, sint32 y) +void map_invalidate_tile_full(int32_t x, int32_t y) { map_invalidate_tile(x, y, 0, 2080); } -void map_invalidate_element(sint32 x, sint32 y, rct_tile_element *tileElement) +void map_invalidate_element(int32_t x, int32_t y, rct_tile_element *tileElement) { map_invalidate_tile(x, y, tileElement->base_height * 8, tileElement->clearance_height * 8); } void map_invalidate_region(const LocationXY16& mins, const LocationXY16& maxs) { - sint32 x0, y0, x1, y1, left, right, top, bottom; + int32_t x0, y0, x1, y1, left, right, top, bottom; x0 = mins.x + 16; y0 = mins.y + 16; @@ -4195,7 +4195,7 @@ void map_invalidate_region(const LocationXY16& mins, const LocationXY16& maxs) bottom += 32; top -= 32 + 2080; - for (sint32 i = 0; i < MAX_VIEWPORT_COUNT; i++) + for (int32_t i = 0; i < MAX_VIEWPORT_COUNT; i++) { rct_viewport *viewport = &g_viewport_list[i]; if (viewport->width != 0) @@ -4205,19 +4205,19 @@ void map_invalidate_region(const LocationXY16& mins, const LocationXY16& maxs) } } -sint32 map_get_tile_side(sint32 mapX, sint32 mapY) +int32_t map_get_tile_side(int32_t mapX, int32_t mapY) { - sint32 subMapX = mapX & (32 - 1); - sint32 subMapY = mapY & (32 - 1); + int32_t subMapX = mapX & (32 - 1); + int32_t subMapY = mapY & (32 - 1); return (subMapX < subMapY) ? ((subMapX + subMapY) < 32 ? 0 : 1): ((subMapX + subMapY) < 32 ? 3 : 2); } -sint32 map_get_tile_quadrant(sint32 mapX, sint32 mapY) +int32_t map_get_tile_quadrant(int32_t mapX, int32_t mapY) { - sint32 subMapX = mapX & (32 - 1); - sint32 subMapY = mapY & (32 - 1); + int32_t subMapX = mapX & (32 - 1); + int32_t subMapY = mapY & (32 - 1); return (subMapX > 16) ? (subMapY < 16 ? 1 : 0): (subMapY < 16 ? 2 : 3); @@ -4227,7 +4227,7 @@ sint32 map_get_tile_quadrant(sint32 mapX, sint32 mapY) * * rct2: 0x00693BFF */ -bool map_surface_is_blocked(sint16 x, sint16 y){ +bool map_surface_is_blocked(int16_t x, int16_t y){ rct_tile_element *tileElement; if (x >= 8192 || y >= 8192) return true; @@ -4238,13 +4238,13 @@ bool map_surface_is_blocked(sint16 x, sint16 y){ return true; } - sint16 water_height = surface_get_water_height(tileElement); + int16_t water_height = surface_get_water_height(tileElement); water_height *= 2; if (water_height > tileElement->base_height) return true; - sint16 base_z = tileElement->base_height; - sint16 clear_z = tileElement->base_height + 2; + int16_t base_z = tileElement->base_height; + int16_t clear_z = tileElement->base_height + 2; if (tileElement->properties.surface.slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) clear_z += 2; @@ -4276,21 +4276,21 @@ bool map_surface_is_blocked(sint16 x, sint16 y){ /* Clears all map elements, to be used before generating a new map */ void map_clear_all_elements() { - for (sint32 y = 0; y < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); y += 32) { - for (sint32 x = 0; x < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); x += 32) { + for (int32_t y = 0; y < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); y += 32) { + for (int32_t x = 0; x < (MAXIMUM_MAP_SIZE_TECHNICAL * 32); x += 32) { clear_elements_at(x, y); } } } void game_command_set_sign_style( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + int32_t * ebp) { BannerIndex bannerId = *ecx & 0xFF; if (bannerId > Util::CountOf(gBanners)) { @@ -4299,11 +4299,11 @@ void game_command_set_sign_style( return; } rct_banner *banner = &gBanners[bannerId]; - sint32 x = banner->x << 5; - sint32 y = banner->y << 5; + int32_t x = banner->x << 5; + int32_t y = banner->y << 5; - uint8 mainColour = (uint8)*edx; - uint8 textColour = (uint8)*edi; + uint8_t mainColour = (uint8_t)*edx; + uint8_t textColour = (uint8_t)*edi; if (*ebp == 0) { // small sign rct_tile_element* tileElement = map_get_first_element_at(x / 32, y / 32); @@ -4369,44 +4369,44 @@ void game_command_set_sign_style( } void game_command_modify_tile( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { - const sint32 flags = *ebx; - const sint32 x = *ecx & 0xFF; - const sint32 y = (*ecx >> 8) & 0xFF; + const int32_t flags = *ebx; + const int32_t x = *ecx & 0xFF; + const int32_t y = (*ecx >> 8) & 0xFF; const TILE_INSPECTOR_INSTRUCTION_TYPE instruction = static_cast(*eax); switch (instruction) { case TILE_INSPECTOR_ANY_REMOVE: { - const sint16 elementIndex = *edx; + const int16_t elementIndex = *edx; *ebx = tile_inspector_remove_element_at(x, y, elementIndex, flags); break; } case TILE_INSPECTOR_ANY_SWAP: { - const sint32 firstIndex = *edx; - const sint32 secondIndex = *edi; + const int32_t firstIndex = *edx; + const int32_t secondIndex = *edi; *ebx = tile_inspector_swap_elements_at(x, y, firstIndex, secondIndex, flags); break; } case TILE_INSPECTOR_ANY_INSERT_CORRUPT: { - const sint16 elementIndex = *edx; + const int16_t elementIndex = *edx; *ebx = tile_inspector_insert_corrupt_at(x, y, elementIndex, flags); break; } case TILE_INSPECTOR_ANY_ROTATE: { - const sint16 elementIndex = *edx; + const int16_t elementIndex = *edx; *ebx = tile_inspector_rotate_element_at(x, y, elementIndex, flags); break; } case TILE_INSPECTOR_ANY_PASTE: { rct_tile_element elementToPaste; - const sint32 data[] = { *edx, *edi }; + const int32_t data[] = { *edx, *edi }; assert_struct_size(data, sizeof(elementToPaste)); memcpy(&elementToPaste, data, 8); *ebx = tile_inspector_paste_element_at(x, y, elementToPaste, flags); @@ -4419,8 +4419,8 @@ void game_command_modify_tile( } case TILE_INSPECTOR_ANY_BASE_HEIGHT_OFFSET: { - const sint16 elementIndex = *edx; - const sint8 heightOffset = *edi; + const int16_t elementIndex = *edx; + const int8_t heightOffset = *edi; *ebx = tile_inspector_any_base_height_offset(x, y, elementIndex, heightOffset, flags); break; } @@ -4432,7 +4432,7 @@ void game_command_modify_tile( } case TILE_INSPECTOR_SURFACE_TOGGLE_CORNER: { - const sint32 cornerIndex = *edx; + const int32_t cornerIndex = *edx; *ebx = tile_inspector_surface_toggle_corner(x, y, cornerIndex, flags); break; } @@ -4443,41 +4443,41 @@ void game_command_modify_tile( } case TILE_INSPECTOR_PATH_SET_SLOPE: { - const sint32 elementIndex = *edx; + const int32_t elementIndex = *edx; const bool sloped = *edi; *ebx = tile_inspector_path_set_sloped(x, y, elementIndex, sloped, flags); break; } case TILE_INSPECTOR_PATH_TOGGLE_EDGE: { - const sint32 elementIndex = *edx; - const sint32 edgeIndex = *edi; + const int32_t elementIndex = *edx; + const int32_t edgeIndex = *edi; *ebx = tile_inspector_path_toggle_edge(x, y, elementIndex, edgeIndex, flags); break; } case TILE_INSPECTOR_ENTRANCE_MAKE_USABLE: { - const sint32 elementIndex = *edx; + const int32_t elementIndex = *edx; *ebx = tile_inspector_entrance_make_usable(x, y, elementIndex, flags); break; } case TILE_INSPECTOR_WALL_SET_SLOPE: { - const sint32 elementIndex = *edx; - const sint32 slopeValue = *edi; + const int32_t elementIndex = *edx; + const int32_t slopeValue = *edi; *ebx = tile_inspector_wall_set_slope(x, y, elementIndex, slopeValue, flags); break; } case TILE_INSPECTOR_TRACK_BASE_HEIGHT_OFFSET: { - const sint32 elementIndex = *edx; - const sint8 heightOffset = *edi; + const int32_t elementIndex = *edx; + const int8_t heightOffset = *edi; *ebx = tile_inspector_track_base_height_offset(x, y, elementIndex, heightOffset, flags); break; } case TILE_INSPECTOR_TRACK_SET_CHAIN: { - const sint32 elementIndex = *edx; + const int32_t elementIndex = *edx; const bool entireTrackBlock = *edi; const bool setChain = *ebp; *ebx = tile_inspector_track_set_chain(x, y, elementIndex, entireTrackBlock, setChain, flags); @@ -4485,28 +4485,28 @@ void game_command_modify_tile( } case TILE_INSPECTOR_SCENERY_SET_QUARTER_LOCATION: { - const sint32 elementIndex = *edx; - const sint32 quarterIndex = *edi; + const int32_t elementIndex = *edx; + const int32_t quarterIndex = *edi; *ebx = tile_inspector_scenery_set_quarter_location(x, y, elementIndex, quarterIndex, flags); break; } case TILE_INSPECTOR_SCENERY_SET_QUARTER_COLLISION: { - const sint32 elementIndex = *edx; - const sint32 quarterIndex = *edi; + const int32_t elementIndex = *edx; + const int32_t quarterIndex = *edi; *ebx = tile_inspector_scenery_set_quarter_collision(x, y, elementIndex, quarterIndex, flags); break; } case TILE_INSPECTOR_BANNER_TOGGLE_BLOCKING_EDGE: { - const sint32 elementIndex = *edx; - const sint32 edgeIndex = *edi; + const int32_t elementIndex = *edx; + const int32_t edgeIndex = *edi; *ebx = tile_inspector_banner_toggle_blocking_edge(x, y, elementIndex, edgeIndex, flags); break; } case TILE_INSPECTOR_CORRUPT_CLAMP: { - const sint32 elementIndex = *edx; + const int32_t elementIndex = *edx; *ebx = tile_inspector_corrupt_clamp(x, y, elementIndex, flags); break; } @@ -4535,7 +4535,7 @@ void game_command_modify_tile( * @param y y units, not tiles. * @param z Base height. */ -rct_tile_element *map_get_track_element_at(sint32 x, sint32 y, sint32 z) +rct_tile_element *map_get_track_element_at(int32_t x, int32_t y, int32_t z) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -4554,7 +4554,7 @@ rct_tile_element *map_get_track_element_at(sint32 x, sint32 y, sint32 z) * @param y y units, not tiles. * @param z Base height. */ -rct_tile_element *map_get_track_element_at_of_type(sint32 x, sint32 y, sint32 z, sint32 trackType) +rct_tile_element *map_get_track_element_at_of_type(int32_t x, int32_t y, int32_t z, int32_t trackType) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -4574,7 +4574,7 @@ rct_tile_element *map_get_track_element_at_of_type(sint32 x, sint32 y, sint32 z, * @param y y units, not tiles. * @param z Base height. */ -rct_tile_element *map_get_track_element_at_of_type_seq(sint32 x, sint32 y, sint32 z, sint32 trackType, sint32 sequence) +rct_tile_element *map_get_track_element_at_of_type_seq(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t sequence) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -4596,7 +4596,7 @@ rct_tile_element *map_get_track_element_at_of_type_seq(sint32 x, sint32 y, sint3 * @param y y units, not tiles. * @param z Base height. */ -rct_tile_element *map_get_track_element_at_of_type_from_ride(sint32 x, sint32 y, sint32 z, sint32 trackType, sint32 rideIndex) { +rct_tile_element *map_get_track_element_at_of_type_from_ride(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t rideIndex) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; @@ -4616,7 +4616,7 @@ rct_tile_element *map_get_track_element_at_of_type_from_ride(sint32 x, sint32 y, * @param y y units, not tiles. * @param z Base height. */ -rct_tile_element *map_get_track_element_at_from_ride(sint32 x, sint32 y, sint32 z, sint32 rideIndex) { +rct_tile_element *map_get_track_element_at_from_ride(int32_t x, int32_t y, int32_t z, int32_t rideIndex) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK) continue; @@ -4636,7 +4636,7 @@ rct_tile_element *map_get_track_element_at_from_ride(sint32 x, sint32 y, sint32 * @param z Base height. * @param direction The direction (0 - 3). */ -rct_tile_element *map_get_track_element_at_with_direction_from_ride(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 rideIndex) +rct_tile_element *map_get_track_element_at_with_direction_from_ride(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -4651,7 +4651,7 @@ rct_tile_element *map_get_track_element_at_with_direction_from_ride(sint32 x, si return nullptr; }; -void map_offset_with_rotation(sint16 *x, sint16 *y, sint16 offsetX, sint16 offsetY, uint8 rotation) +void map_offset_with_rotation(int16_t *x, int16_t *y, int16_t offsetX, int16_t offsetY, uint8_t rotation) { switch (rotation & 3) { case TILE_ELEMENT_DIRECTION_WEST: @@ -4673,7 +4673,7 @@ void map_offset_with_rotation(sint16 *x, sint16 *y, sint16 offsetX, sint16 offse } } -rct_tile_element *map_get_wall_element_at(sint32 x, sint32 y, sint32 z, sint32 direction) +rct_tile_element *map_get_wall_element_at(int32_t x, int32_t y, int32_t z, int32_t direction) { rct_tile_element *tileElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -4689,10 +4689,10 @@ rct_tile_element *map_get_wall_element_at(sint32 x, sint32 y, sint32 z, sint32 d return nullptr; } -uint32 map_get_available_peep_spawn_index_list(uint32* peepSpawnIndexList) +uint32_t map_get_available_peep_spawn_index_list(uint32_t* peepSpawnIndexList) { - uint32 numSpawns = 0; - for (uint8 i = 0; i < MAX_PEEP_SPAWNS; i++) { + uint32_t numSpawns = 0; + for (uint8_t i = 0; i < MAX_PEEP_SPAWNS; i++) { if (gPeepSpawns[i].x != PEEP_SPAWN_UNDEFINED) { peepSpawnIndexList[numSpawns++] = i; } @@ -4700,10 +4700,10 @@ uint32 map_get_available_peep_spawn_index_list(uint32* peepSpawnIndexList) return numSpawns; } -uint16 check_max_allowable_land_rights_for_tile(uint8 x, uint8 y, uint8 base_z) +uint16_t check_max_allowable_land_rights_for_tile(uint8_t x, uint8_t y, uint8_t base_z) { rct_tile_element * tileElement = map_get_first_element_at(x, y); - uint16 destOwnership = OWNERSHIP_OWNED; + uint16_t destOwnership = OWNERSHIP_OWNED; // Sometimes done deliberately. if (tileElement == nullptr) @@ -4713,7 +4713,7 @@ uint16 check_max_allowable_land_rights_for_tile(uint8 x, uint8 y, uint8 base_z) do { - sint32 type = tileElement->GetType(); + int32_t type = tileElement->GetType(); if (type == TILE_ELEMENT_TYPE_PATH || (type == TILE_ELEMENT_TYPE_ENTRANCE && tileElement->properties.entrance.type == ENTRANCE_TYPE_PARK_ENTRANCE)) { @@ -4737,7 +4737,7 @@ void FixLandOwnershipTiles(std::initializer_list tiles) FixLandOwnershipTilesWithOwnership(tiles, OWNERSHIP_AVAILABLE); } -void FixLandOwnershipTilesWithOwnership(std::initializer_list tiles, uint8 ownership) +void FixLandOwnershipTilesWithOwnership(std::initializer_list tiles, uint8_t ownership) { rct_tile_element * currentElement; for (const TileCoordsXY * tile = tiles.begin(); tile != tiles.end(); ++tile) @@ -4748,7 +4748,7 @@ void FixLandOwnershipTilesWithOwnership(std::initializer_list tile } } -uint8 entrance_element_get_type(const rct_tile_element * tileElement) +uint8_t entrance_element_get_type(const rct_tile_element * tileElement) { return (tileElement->properties.entrance.type); } diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index dcdde95951..8f29f3d84a 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -38,7 +38,7 @@ typedef CoordsXYZD PeepSpawn; struct CoordsXYE { - sint32 x, y; + int32_t x, y; rct_tile_element * element; }; @@ -80,24 +80,24 @@ extern const CoordsXY CoordsDirectionDelta[]; extern const TileCoordsXY TileDirectionDelta[]; extern const money32 TerrainPricing[]; -extern uint16 gWidePathTileLoopX; -extern uint16 gWidePathTileLoopY; -extern uint16 gGrassSceneryTileLoopPosition; +extern uint16_t gWidePathTileLoopX; +extern uint16_t gWidePathTileLoopY; +extern uint16_t gGrassSceneryTileLoopPosition; -extern sint16 gMapSizeUnits; -extern sint16 gMapSizeMinus2; -extern sint16 gMapSize; -extern sint16 gMapSizeMaxXY; -extern sint16 gMapBaseZ; +extern int16_t gMapSizeUnits; +extern int16_t gMapSizeMinus2; +extern int16_t gMapSize; +extern int16_t gMapSizeMaxXY; +extern int16_t gMapBaseZ; -extern uint16 gMapSelectFlags; -extern uint16 gMapSelectType; +extern uint16_t gMapSelectFlags; +extern uint16_t gMapSelectType; extern LocationXY16 gMapSelectPositionA; extern LocationXY16 gMapSelectPositionB; extern LocationXYZ16 gMapSelectArrowPosition; -extern uint8 gMapSelectArrowDirection; +extern uint8_t gMapSelectArrowDirection; -extern uint8 gMapGroundFlags; +extern uint8_t gMapGroundFlags; extern rct_tile_element gTileElements[MAX_TILE_TILE_ELEMENT_POINTERS * 3]; extern rct_tile_element *gTileElementTilePointers[MAX_TILE_TILE_ELEMENT_POINTERS]; @@ -106,7 +106,7 @@ extern LocationXY16 gMapSelectionTiles[300]; extern PeepSpawn gPeepSpawns[MAX_PEEP_SPAWNS]; extern rct_tile_element *gNextFreeTileElement; -extern uint32 gNextFreeTileElementPointerIndex; +extern uint32_t gNextFreeTileElementPointerIndex; // Used in the land tool window to enable mountain tool / land smoothing extern bool gLandMountainMode; @@ -117,95 +117,95 @@ extern bool gClearSmallScenery; extern bool gClearLargeScenery; extern bool gClearFootpath; -extern uint16 gLandRemainingOwnershipSales; -extern uint16 gLandRemainingConstructionSales; +extern uint16_t gLandRemainingOwnershipSales; +extern uint16_t gLandRemainingConstructionSales; extern LocationXYZ16 gCommandPosition; extern bool gMapLandRightsUpdateSuccess; -void map_init(sint32 size); +void map_init(int32_t size); void map_count_remaining_land_rights(); void map_strip_ghost_flag_from_elements(); void map_update_tile_pointers(); -rct_tile_element *map_get_first_element_at(sint32 x, sint32 y); -rct_tile_element *map_get_nth_element_at(sint32 x, sint32 y, sint32 n); -void map_set_tile_elements(sint32 x, sint32 y, rct_tile_element *elements); -sint32 map_height_from_slope(sint32 x, sint32 y, sint32 slope); -rct_tile_element* map_get_banner_element_at(sint32 x, sint32 y, sint32 z, uint8 direction); -rct_tile_element *map_get_surface_element_at(sint32 x, sint32 y); +rct_tile_element *map_get_first_element_at(int32_t x, int32_t y); +rct_tile_element *map_get_nth_element_at(int32_t x, int32_t y, int32_t n); +void map_set_tile_elements(int32_t x, int32_t y, rct_tile_element *elements); +int32_t map_height_from_slope(int32_t x, int32_t y, int32_t slope); +rct_tile_element* map_get_banner_element_at(int32_t x, int32_t y, int32_t z, uint8_t direction); +rct_tile_element *map_get_surface_element_at(int32_t x, int32_t y); rct_tile_element * map_get_surface_element_at(CoordsXY coords); -rct_tile_element* map_get_path_element_at(sint32 x, sint32 y, sint32 z); -rct_tile_element *map_get_wall_element_at(sint32 x, sint32 y, sint32 z, sint32 direction); -rct_tile_element *map_get_small_scenery_element_at(sint32 x, sint32 y, sint32 z, sint32 type, uint8 quadrant); -rct_tile_element *map_get_park_entrance_element_at(sint32 x, sint32 y, sint32 z, bool ghost); -rct_tile_element * map_get_ride_entrance_element_at(sint32 x, sint32 y, sint32 z, bool ghost); -rct_tile_element * map_get_ride_exit_element_at(sint32 x, sint32 y, sint32 z, bool ghost); -sint32 tile_element_height(sint32 x, sint32 y); +rct_tile_element* map_get_path_element_at(int32_t x, int32_t y, int32_t z); +rct_tile_element *map_get_wall_element_at(int32_t x, int32_t y, int32_t z, int32_t direction); +rct_tile_element *map_get_small_scenery_element_at(int32_t x, int32_t y, int32_t z, int32_t type, uint8_t quadrant); +rct_tile_element *map_get_park_entrance_element_at(int32_t x, int32_t y, int32_t z, bool ghost); +rct_tile_element * map_get_ride_entrance_element_at(int32_t x, int32_t y, int32_t z, bool ghost); +rct_tile_element * map_get_ride_exit_element_at(int32_t x, int32_t y, int32_t z, bool ghost); +int32_t tile_element_height(int32_t x, int32_t y); void sub_68B089(); -bool map_coord_is_connected(sint32 x, sint32 y, sint32 z, uint8 faceDirection); +bool map_coord_is_connected(int32_t x, int32_t y, int32_t z, uint8_t faceDirection); void map_remove_provisional_elements(); void map_restore_provisional_elements(); void map_update_path_wide_flags(); bool map_is_location_valid(CoordsXY coords); bool map_is_edge(CoordsXY coords); -bool map_can_build_at(sint32 x, sint32 y, sint32 z); -bool map_is_location_owned(sint32 x, sint32 y, sint32 z); +bool map_can_build_at(int32_t x, int32_t y, int32_t z); +bool map_is_location_owned(int32_t x, int32_t y, int32_t z); bool map_is_location_in_park(CoordsXY coords); -bool map_is_location_owned_or_has_rights(sint32 x, sint32 y); -bool map_surface_is_blocked(sint16 x, sint16 y); +bool map_is_location_owned_or_has_rights(int32_t x, int32_t y); +bool map_surface_is_blocked(int16_t x, int16_t y); void tile_element_remove(rct_tile_element *tileElement); void map_remove_all_rides(); void map_invalidate_map_selection_tiles(); -void map_get_bounding_box(sint32 ax, sint32 ay, sint32 bx, sint32 by, sint32 *left, sint32 *top, sint32 *right, sint32 *bottom); +void map_get_bounding_box(int32_t ax, int32_t ay, int32_t bx, int32_t by, int32_t *left, int32_t *top, int32_t *right, int32_t *bottom); void map_invalidate_selection_rect(); void map_reorganise_elements(); -bool map_check_free_elements_and_reorganise(sint32 num_elements); -rct_tile_element *tile_element_insert(sint32 x, sint32 y, sint32 z, sint32 flags); +bool map_check_free_elements_and_reorganise(int32_t num_elements); +rct_tile_element *tile_element_insert(int32_t x, int32_t y, int32_t z, int32_t flags); -using CLEAR_FUNC = sint32(*)(rct_tile_element** tile_element, sint32 x, sint32 y, uint8 flags, money32* price); +using CLEAR_FUNC = int32_t(*)(rct_tile_element** tile_element, int32_t x, int32_t y, uint8_t flags, money32* price); -sint32 map_place_non_scenery_clear_func(rct_tile_element** tile_element, sint32 x, sint32 y, uint8 flags, money32* price); -sint32 map_place_scenery_clear_func(rct_tile_element** tile_element, sint32 x, sint32 y, uint8 flags, money32* price); -bool map_can_construct_with_clear_at(sint32 x, sint32 y, sint32 zLow, sint32 zHigh, CLEAR_FUNC clearFunc, uint8 bl, uint8 flags, money32 *price, uint8 crossingMode); -sint32 map_can_construct_at(sint32 x, sint32 y, sint32 zLow, sint32 zHigh, uint8 bl); -void rotate_map_coordinates(sint16 *x, sint16 *y, sint32 rotation); -LocationXY16 coordinate_3d_to_2d(const LocationXYZ16* coordinate_3d, sint32 rotation); -money32 map_clear_scenery(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 clear, sint32 flags); -money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags); -money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags); -money32 wall_place(sint32 type, sint32 x, sint32 y, sint32 z, sint32 edge, sint32 primaryColour, sint32 secondaryColour, sint32 tertiaryColour, sint32 flags); +int32_t map_place_non_scenery_clear_func(rct_tile_element** tile_element, int32_t x, int32_t y, uint8_t flags, money32* price); +int32_t map_place_scenery_clear_func(rct_tile_element** tile_element, int32_t x, int32_t y, uint8_t flags, money32* price); +bool map_can_construct_with_clear_at(int32_t x, int32_t y, int32_t zLow, int32_t zHigh, CLEAR_FUNC clearFunc, uint8_t bl, uint8_t flags, money32 *price, uint8_t crossingMode); +int32_t map_can_construct_at(int32_t x, int32_t y, int32_t zLow, int32_t zHigh, uint8_t bl); +void rotate_map_coordinates(int16_t *x, int16_t *y, int32_t rotation); +LocationXY16 coordinate_3d_to_2d(const LocationXYZ16* coordinate_3d, int32_t rotation); +money32 map_clear_scenery(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t clear, int32_t flags); +money32 lower_water(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint8_t flags); +money32 raise_water(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint8_t flags); +money32 wall_place(int32_t type, int32_t x, int32_t y, int32_t z, int32_t edge, int32_t primaryColour, int32_t secondaryColour, int32_t tertiaryColour, int32_t flags); -void game_command_set_land_height(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_set_land_ownership(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_remove_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_remove_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_remove_banner(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_scenery_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_wall_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_large_scenery_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_banner_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_clear_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_change_surface_style(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_raise_land(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_lower_land(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_smooth_land(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_raise_water(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_lower_water(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_water_height(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_place_banner(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_place_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_place_wall(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_place_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_place_park_entrance(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_banner_name(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_banner_style(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); -void game_command_modify_tile(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); +void game_command_set_land_height(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_set_land_ownership(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_remove_scenery(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_remove_large_scenery(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_remove_banner(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_scenery_colour(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_wall_colour(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_large_scenery_colour(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_banner_colour(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_clear_scenery(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_change_surface_style(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_raise_land(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_lower_land(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_smooth_land(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_raise_water(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_lower_water(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_water_height(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_place_banner(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_place_scenery(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_place_wall(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_place_large_scenery(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_place_park_entrance(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_banner_name(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_banner_style(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_set_sign_style(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); +void game_command_modify_tile(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); struct tile_element_iterator{ - sint32 x; - sint32 y; + int32_t x; + int32_t y; rct_tile_element *element; }; #ifdef PLATFORM_32BIT @@ -213,61 +213,61 @@ assert_struct_size(tile_element_iterator, 12); #endif void tile_element_iterator_begin(tile_element_iterator *it); -sint32 tile_element_iterator_next(tile_element_iterator *it); +int32_t tile_element_iterator_next(tile_element_iterator *it); void tile_element_iterator_restart_for_tile(tile_element_iterator *it); -void wall_remove_intersecting_walls(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction); +void wall_remove_intersecting_walls(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t direction); void map_update_tiles(); -sint32 map_get_highest_z(sint32 tileX, sint32 tileY); +int32_t map_get_highest_z(int32_t tileX, int32_t tileY); bool tile_element_wants_path_connection_towards(TileCoordsXYZD coords, const rct_tile_element * const elementToBeRemoved); void map_remove_out_of_range_elements(); void map_extend_boundary_surface(); -bool sign_set_colour(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence, uint8 mainColour, uint8 textColour); -void wall_remove_at(sint32 x, sint32 y, sint32 z0, sint32 z1); -void wall_remove_at_z(sint32 x, sint32 y, sint32 z); +bool sign_set_colour(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t sequence, uint8_t mainColour, uint8_t textColour); +void wall_remove_at(int32_t x, int32_t y, int32_t z0, int32_t z1); +void wall_remove_at_z(int32_t x, int32_t y, int32_t z); -void map_invalidate_tile(sint32 x, sint32 y, sint32 z0, sint32 z1); -void map_invalidate_tile_zoom1(sint32 x, sint32 y, sint32 z0, sint32 z1); -void map_invalidate_tile_zoom0(sint32 x, sint32 y, sint32 z0, sint32 z1); -void map_invalidate_tile_full(sint32 x, sint32 y); -void map_invalidate_element(sint32 x, sint32 y, rct_tile_element *tileElement); +void map_invalidate_tile(int32_t x, int32_t y, int32_t z0, int32_t z1); +void map_invalidate_tile_zoom1(int32_t x, int32_t y, int32_t z0, int32_t z1); +void map_invalidate_tile_zoom0(int32_t x, int32_t y, int32_t z0, int32_t z1); +void map_invalidate_tile_full(int32_t x, int32_t y); +void map_invalidate_element(int32_t x, int32_t y, rct_tile_element *tileElement); void map_invalidate_region(const LocationXY16& mins, const LocationXY16& maxs); -sint32 map_get_tile_side(sint32 mapX, sint32 mapY); -sint32 map_get_tile_quadrant(sint32 mapX, sint32 mapY); +int32_t map_get_tile_side(int32_t mapX, int32_t mapY); +int32_t map_get_tile_quadrant(int32_t mapX, int32_t mapY); void map_clear_all_elements(); -rct_tile_element *map_get_large_scenery_segment(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence); +rct_tile_element *map_get_large_scenery_segment(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t sequence); bool map_large_scenery_get_origin( - sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence, - sint32 *outX, sint32 *outY, sint32 *outZ, rct_tile_element** outElement + int32_t x, int32_t y, int32_t z, int32_t direction, int32_t sequence, + int32_t *outX, int32_t *outY, int32_t *outZ, rct_tile_element** outElement ); -void map_offset_with_rotation(sint16 *x, sint16 *y, sint16 offsetX, sint16 offsetY, uint8 rotation); -CoordsXY translate_3d_to_2d_with_z(sint32 rotation, CoordsXYZ pos); +void map_offset_with_rotation(int16_t *x, int16_t *y, int16_t offsetX, int16_t offsetY, uint8_t rotation); +CoordsXY translate_3d_to_2d_with_z(int32_t rotation, CoordsXYZ pos); -rct_tile_element *map_get_track_element_at(sint32 x, sint32 y, sint32 z); -rct_tile_element *map_get_track_element_at_of_type(sint32 x, sint32 y, sint32 z, sint32 trackType); -rct_tile_element *map_get_track_element_at_of_type_seq(sint32 x, sint32 y, sint32 z, sint32 trackType, sint32 sequence); -rct_tile_element *map_get_track_element_at_of_type_from_ride(sint32 x, sint32 y, sint32 z, sint32 trackType, sint32 rideIndex); -rct_tile_element *map_get_track_element_at_from_ride(sint32 x, sint32 y, sint32 z, sint32 rideIndex); -rct_tile_element *map_get_track_element_at_with_direction_from_ride(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 rideIndex); +rct_tile_element *map_get_track_element_at(int32_t x, int32_t y, int32_t z); +rct_tile_element *map_get_track_element_at_of_type(int32_t x, int32_t y, int32_t z, int32_t trackType); +rct_tile_element *map_get_track_element_at_of_type_seq(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t sequence); +rct_tile_element *map_get_track_element_at_of_type_from_ride(int32_t x, int32_t y, int32_t z, int32_t trackType, int32_t rideIndex); +rct_tile_element *map_get_track_element_at_from_ride(int32_t x, int32_t y, int32_t z, int32_t rideIndex); +rct_tile_element *map_get_track_element_at_with_direction_from_ride(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t rideIndex); -bool map_is_location_at_edge(sint32 x, sint32 y); +bool map_is_location_at_edge(int32_t x, int32_t y); void map_obstruction_set_error_text(rct_tile_element *tileElement); -uint32 map_get_available_peep_spawn_index_list(uint32* peepSpawnIndexList); -uint16 check_max_allowable_land_rights_for_tile(uint8 x, uint8 y, uint8 base_z); +uint32_t map_get_available_peep_spawn_index_list(uint32_t* peepSpawnIndexList); +uint16_t check_max_allowable_land_rights_for_tile(uint8_t x, uint8_t y, uint8_t base_z); void FixLandOwnershipTiles(std::initializer_list tiles); -void FixLandOwnershipTilesWithOwnership(std::initializer_list tiles, uint8 ownership); +void FixLandOwnershipTilesWithOwnership(std::initializer_list tiles, uint8_t ownership); bool place_peep_spawn(CoordsXYZD location); -uint8 entrance_element_get_type(const rct_tile_element * tileElement); +uint8_t entrance_element_get_type(const rct_tile_element * tileElement); #endif diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 08ad1cfb87..c7498e26d6 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -22,11 +22,11 @@ #include "Sprite.h" #include "Footpath.h" -using map_animation_invalidate_event_handler = bool (*)(sint32 x, sint32 y, sint32 baseZ); +using map_animation_invalidate_event_handler = bool (*)(int32_t x, int32_t y, int32_t baseZ); static bool map_animation_invalidate(rct_map_animation *obj); -uint16 gNumMapAnimations; +uint16_t gNumMapAnimations; rct_map_animation gAnimatedObjects[MAX_ANIMATED_OBJECTS]; /** @@ -38,15 +38,15 @@ rct_map_animation gAnimatedObjects[MAX_ANIMATED_OBJECTS]; * @param y (cx) * @param z (dl) */ -void map_animation_create(sint32 type, sint32 x, sint32 y, sint32 z) +void map_animation_create(int32_t type, int32_t x, int32_t y, int32_t z) { rct_map_animation *aobj = &gAnimatedObjects[0]; - sint32 numAnimatedObjects = gNumMapAnimations; + int32_t numAnimatedObjects = gNumMapAnimations; if (numAnimatedObjects >= MAX_ANIMATED_OBJECTS) { log_error("Exceeded the maximum number of animations"); return; } - for (sint32 i = 0; i < numAnimatedObjects; i++, aobj++) { + for (int32_t i = 0; i < numAnimatedObjects; i++, aobj++) { if (aobj->x != x) continue; if (aobj->y != y) @@ -74,7 +74,7 @@ void map_animation_create(sint32 type, sint32 x, sint32 y, sint32 z) void map_animation_invalidate_all() { rct_map_animation *aobj = &gAnimatedObjects[0]; - sint32 numAnimatedObjects = gNumMapAnimations; + int32_t numAnimatedObjects = gNumMapAnimations; while (numAnimatedObjects > 0) { if (map_animation_invalidate(aobj)) { // Remove animated object @@ -93,7 +93,7 @@ void map_animation_invalidate_all() * * rct2: 0x00666670 */ -static bool map_animation_invalidate_ride_entrance(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_ride_entrance(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; Ride *ride; @@ -111,7 +111,7 @@ static bool map_animation_invalidate_ride_entrance(sint32 x, sint32 y, sint32 ba ride = get_ride(tileElement->properties.entrance.ride_index); entranceDefinition = &RideEntranceDefinitions[ride->entrance_style]; - sint32 height = (tileElement->base_height * 8) + entranceDefinition->height + 8; + int32_t height = (tileElement->base_height * 8) + entranceDefinition->height + 8; map_invalidate_tile_zoom1(x, y, height, height + 16); return false; } while (!(tileElement++)->IsLastForTile()); @@ -123,7 +123,7 @@ static bool map_animation_invalidate_ride_entrance(sint32 x, sint32 y, sint32 ba * * rct2: 0x006A7BD4 */ -static bool map_animation_invalidate_queue_banner(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_queue_banner(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -138,7 +138,7 @@ static bool map_animation_invalidate_queue_banner(sint32 x, sint32 y, sint32 bas if (!footpath_element_has_queue_banner(tileElement)) continue; - sint32 direction = (footpath_element_get_direction(tileElement) + get_current_rotation()) & 3; + int32_t direction = (footpath_element_get_direction(tileElement) + get_current_rotation()) & 3; if (direction == TILE_ELEMENT_DIRECTION_NORTH || direction == TILE_ELEMENT_DIRECTION_EAST) { baseZ = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, baseZ + 16, baseZ + 30); @@ -153,7 +153,7 @@ static bool map_animation_invalidate_queue_banner(sint32 x, sint32 y, sint32 bas * * rct2: 0x006E32C9 */ -static bool map_animation_invalidate_small_scenery(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_small_scenery(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; @@ -180,11 +180,11 @@ static bool map_animation_invalidate_small_scenery(sint32 x, sint32 y, sint32 ba { // Peep, looking at scenery if (!(gCurrentTicks & 0x3FF) && game_is_not_paused()) { - sint32 direction = tile_element_get_direction(tileElement); - sint32 x2 = x - CoordsDirectionDelta[direction].x; - sint32 y2 = y - CoordsDirectionDelta[direction].y; + int32_t direction = tile_element_get_direction(tileElement); + int32_t x2 = x - CoordsDirectionDelta[direction].x; + int32_t y2 = y - CoordsDirectionDelta[direction].y; - uint16 spriteIdx = sprite_get_first_in_quadrant(x2, y2); + uint16_t spriteIdx = sprite_get_first_in_quadrant(x2, y2); for (; spriteIdx != SPRITE_INDEX_NULL; spriteIdx = sprite->unknown.next_in_quadrant) { sprite = get_sprite(spriteIdx); if (sprite->unknown.linked_list_type_offset != SPRITE_LIST_PEEP * 2) @@ -218,7 +218,7 @@ static bool map_animation_invalidate_small_scenery(sint32 x, sint32 y, sint32 ba * * rct2: 0x00666C63 */ -static bool map_animation_invalidate_park_entrance(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_park_entrance(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -245,7 +245,7 @@ static bool map_animation_invalidate_park_entrance(sint32 x, sint32 y, sint32 ba * * rct2: 0x006CE29E */ -static bool map_animation_invalidate_track_waterfall(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_track_waterfall(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -257,7 +257,7 @@ static bool map_animation_invalidate_track_waterfall(sint32 x, sint32 y, sint32 continue; if (track_element_get_type(tileElement) == TRACK_ELEM_WATERFALL) { - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z + 14, z + 46); return false; } @@ -270,7 +270,7 @@ static bool map_animation_invalidate_track_waterfall(sint32 x, sint32 y, sint32 * * rct2: 0x006CE2F3 */ -static bool map_animation_invalidate_track_rapids(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_track_rapids(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -282,7 +282,7 @@ static bool map_animation_invalidate_track_rapids(sint32 x, sint32 y, sint32 bas continue; if (track_element_get_type(tileElement) == TRACK_ELEM_RAPIDS) { - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z + 14, z + 18); return false; } @@ -295,7 +295,7 @@ static bool map_animation_invalidate_track_rapids(sint32 x, sint32 y, sint32 bas * * rct2: 0x006CE39D */ -static bool map_animation_invalidate_track_onridephoto(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_track_onridephoto(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -329,7 +329,7 @@ static bool map_animation_invalidate_track_onridephoto(sint32 x, sint32 y, sint3 * * rct2: 0x006CE348 */ -static bool map_animation_invalidate_track_whirlpool(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_track_whirlpool(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -341,7 +341,7 @@ static bool map_animation_invalidate_track_whirlpool(sint32 x, sint32 y, sint32 continue; if (track_element_get_type(tileElement) == TRACK_ELEM_WHIRLPOOL) { - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z + 14, z + 18); return false; } @@ -354,7 +354,7 @@ static bool map_animation_invalidate_track_whirlpool(sint32 x, sint32 y, sint32 * * rct2: 0x006CE3FA */ -static bool map_animation_invalidate_track_spinningtunnel(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_track_spinningtunnel(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -366,7 +366,7 @@ static bool map_animation_invalidate_track_spinningtunnel(sint32 x, sint32 y, si continue; if (track_element_get_type(tileElement) == TRACK_ELEM_SPINNING_TUNNEL) { - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z + 14, z + 32); return false; } @@ -379,7 +379,7 @@ static bool map_animation_invalidate_track_spinningtunnel(sint32 x, sint32 y, si * * rct2: 0x0068DF8F */ -static bool map_animation_invalidate_remove([[maybe_unused]] sint32 x, [[maybe_unused]] sint32 y, [[maybe_unused]] sint32 baseZ) +static bool map_animation_invalidate_remove([[maybe_unused]] int32_t x, [[maybe_unused]] int32_t y, [[maybe_unused]] int32_t baseZ) { return true; } @@ -388,7 +388,7 @@ static bool map_animation_invalidate_remove([[maybe_unused]] sint32 x, [[maybe_u * * rct2: 0x006BA2BB */ -static bool map_animation_invalidate_banner(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_banner(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; @@ -411,7 +411,7 @@ static bool map_animation_invalidate_banner(sint32 x, sint32 y, sint32 baseZ) * * rct2: 0x006B94EB */ -static bool map_animation_invalidate_large_scenery(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_large_scenery(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; @@ -426,7 +426,7 @@ static bool map_animation_invalidate_large_scenery(sint32 x, sint32 y, sint32 ba sceneryEntry = get_large_scenery_entry(tileElement->properties.scenery.type & 0x3FF); if (sceneryEntry->large_scenery.flags & LARGE_SCENERY_FLAG_ANIMATED) { - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z, z + 16); wasInvalidated = true; } @@ -439,7 +439,7 @@ static bool map_animation_invalidate_large_scenery(sint32 x, sint32 y, sint32 ba * * rct2: 0x006E5B50 */ -static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_wall_door(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; @@ -465,7 +465,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ) bool invalidate = false; - uint8 currentFrame = wall_get_animation_frame(tileElement); + uint8_t currentFrame = wall_get_animation_frame(tileElement); if (currentFrame != 0) { if (currentFrame == 15) { currentFrame = 0; @@ -482,7 +482,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ) } wall_set_animation_frame(tileElement, currentFrame); if (invalidate) { - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z, z + 32); } } while (!(tileElement++)->IsLastForTile()); @@ -494,7 +494,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ) * * rct2: 0x006E5EE4 */ -static bool map_animation_invalidate_wall(sint32 x, sint32 y, sint32 baseZ) +static bool map_animation_invalidate_wall(int32_t x, int32_t y, int32_t baseZ) { rct_tile_element *tileElement; rct_scenery_entry *sceneryEntry; @@ -512,7 +512,7 @@ static bool map_animation_invalidate_wall(sint32 x, sint32 y, sint32 baseZ) if (!(sceneryEntry->wall.flags2 & WALL_SCENERY_2_ANIMATED) && sceneryEntry->wall.scrolling_mode == 255) continue; - sint32 z = tileElement->base_height * 8; + int32_t z = tileElement->base_height * 8; map_invalidate_tile_zoom1(x, y, z, z + 16); wasInvalidated = true; } while (!(tileElement++)->IsLastForTile()); diff --git a/src/openrct2/world/MapAnimation.h b/src/openrct2/world/MapAnimation.h index ea4f65264d..d85326de90 100644 --- a/src/openrct2/world/MapAnimation.h +++ b/src/openrct2/world/MapAnimation.h @@ -18,10 +18,10 @@ * size: 0x06 */ struct rct_map_animation { - uint8 baseZ; - uint8 type; - uint16 x; - uint16 y; + uint8_t baseZ; + uint8_t type; + uint16_t x; + uint16_t y; }; assert_struct_size(rct_map_animation, 6); #pragma pack(pop) @@ -46,10 +46,10 @@ enum { #define MAX_ANIMATED_OBJECTS 2000 -extern uint16 gNumMapAnimations; +extern uint16_t gNumMapAnimations; extern rct_map_animation gAnimatedObjects[MAX_ANIMATED_OBJECTS]; -void map_animation_create(sint32 type, sint32 x, sint32 y, sint32 z); +void map_animation_create(int32_t type, int32_t x, int32_t y, int32_t z); void map_animation_invalidate_all(); #endif diff --git a/src/openrct2/world/MapGen.cpp b/src/openrct2/world/MapGen.cpp index a69b3d9db9..ff2b7e5477 100644 --- a/src/openrct2/world/MapGen.cpp +++ b/src/openrct2/world/MapGen.cpp @@ -34,8 +34,8 @@ static struct { - uint32 width, height; - uint8 * mono_bitmap; + uint32_t width, height; + uint8_t * mono_bitmap; } _heightMapData = { 0, 0, @@ -83,21 +83,21 @@ static constexpr const char * SnowTrees[] = { #pragma endregion // Randomly chosen base terrains. We rarely want a whole map made out of chequerboard or rock. -static constexpr const uint8 BaseTerrain[] = {TERRAIN_GRASS, TERRAIN_SAND, TERRAIN_SAND_LIGHT, TERRAIN_DIRT, TERRAIN_ICE}; +static constexpr const uint8_t BaseTerrain[] = {TERRAIN_GRASS, TERRAIN_SAND, TERRAIN_SAND_LIGHT, TERRAIN_DIRT, TERRAIN_ICE}; #define BLOB_HEIGHT 255 static void mapgen_place_trees(); -static void mapgen_set_water_level(sint32 waterLevel); -static void mapgen_smooth_height(sint32 iterations); +static void mapgen_set_water_level(int32_t waterLevel); +static void mapgen_smooth_height(int32_t iterations); static void mapgen_set_height(); static void mapgen_simplex(mapgen_settings * settings); -static sint32 _heightSize; -static uint8 * _height; +static int32_t _heightSize; +static uint8_t * _height; -static sint32 get_height(sint32 x, sint32 y) +static int32_t get_height(int32_t x, int32_t y) { if (x >= 0 && y >= 0 && x < _heightSize && y < _heightSize) return _height[x + y * _heightSize]; @@ -105,7 +105,7 @@ static sint32 get_height(sint32 x, sint32 y) return 0; } -static void set_height(sint32 x, sint32 y, sint32 height) +static void set_height(int32_t x, int32_t y, int32_t height) { if (x >= 0 && y >= 0 && x < _heightSize && y < _heightSize) _height[x + y * _heightSize] = height; @@ -113,7 +113,7 @@ static void set_height(sint32 x, sint32 y, sint32 height) void mapgen_generate_blank(mapgen_settings * settings) { - sint32 x, y; + int32_t x, y; rct_tile_element * tileElement; map_clear_all_elements(); @@ -136,10 +136,10 @@ void mapgen_generate_blank(mapgen_settings * settings) void mapgen_generate(mapgen_settings * settings) { - sint32 x, y, mapSize, floorTexture, wallTexture, waterLevel; + int32_t x, y, mapSize, floorTexture, wallTexture, waterLevel; rct_tile_element * tileElement; - util_srand((sint32) platform_get_ticks()); + util_srand((int32_t) platform_get_ticks()); mapSize = settings->mapSize; floorTexture = settings->floor; @@ -184,8 +184,8 @@ void mapgen_generate(mapgen_settings * settings) // Create the temporary height map and initialise _heightSize = mapSize * 2; - _height = new uint8[_heightSize * _heightSize]; - memset(_height, 0, _heightSize * _heightSize * sizeof(uint8)); + _height = new uint8_t[_heightSize * _heightSize]; + memset(_height, 0, _heightSize * _heightSize * sizeof(uint8_t)); mapgen_simplex(settings); mapgen_smooth_height(2 + (util_rand() % 6)); @@ -201,7 +201,7 @@ void mapgen_generate(mapgen_settings * settings) mapgen_set_water_level(waterLevel); // Add sandy beaches - sint32 beachTexture = floorTexture; + int32_t beachTexture = floorTexture; if (settings->floor == -1 && floorTexture == TERRAIN_GRASS) { switch (util_rand() % 4) @@ -232,9 +232,9 @@ void mapgen_generate(mapgen_settings * settings) map_reorganise_elements(); } -static void mapgen_place_tree(sint32 type, sint32 x, sint32 y) +static void mapgen_place_tree(int32_t type, int32_t x, int32_t y) { - sint32 surfaceZ; + int32_t surfaceZ; rct_tile_element * tileElement; rct_scenery_entry * sceneryEntry = get_small_scenery_entry(type); if (sceneryEntry == nullptr) @@ -258,11 +258,11 @@ static void mapgen_place_tree(sint32 type, sint32 x, sint32 y) */ static void mapgen_place_trees() { - std::vector grassTreeIds(Util::CountOf(GrassTrees), 0); - std::vector desertTreeIds(Util::CountOf(DesertTrees), 0); - std::vector snowTreeIds(Util::CountOf(SnowTrees), 0); + std::vector grassTreeIds(Util::CountOf(GrassTrees), 0); + std::vector desertTreeIds(Util::CountOf(DesertTrees), 0); + std::vector snowTreeIds(Util::CountOf(SnowTrees), 0); - for (sint32 i = 0; i < object_entry_group_counts[OBJECT_TYPE_SMALL_SCENERY]; i++) + for (int32_t i = 0; i < object_entry_group_counts[OBJECT_TYPE_SMALL_SCENERY]; i++) { auto sceneryEntry = get_small_scenery_entry(i); auto entry = object_entry_get_entry(OBJECT_TYPE_SMALL_SCENERY, i); @@ -270,7 +270,7 @@ static void mapgen_place_trees() if (sceneryEntry == nullptr) continue; - uint32 j; + uint32_t j; for (j = 0; j < Util::CountOf(GrassTrees); j++) { if (strncmp(GrassTrees[j], entry->name, 8) == 0) @@ -310,9 +310,9 @@ static void mapgen_place_trees() std::vector availablePositions; // Create list of available tiles - for (sint32 y = 1; y < gMapSize - 1; y++) + for (int32_t y = 1; y < gMapSize - 1; y++) { - for (sint32 x = 1; x < gMapSize - 1; x++) + for (int32_t x = 1; x < gMapSize - 1; x++) { rct_tile_element * tileElement = map_get_surface_element_at(x, y); @@ -328,9 +328,9 @@ static void mapgen_place_trees() } // Shuffle list - for (uint32 i = 0; i < availablePositions.size(); i++) + for (uint32_t i = 0; i < availablePositions.size(); i++) { - uint32 rindex = util_rand() % availablePositions.size(); + uint32_t rindex = util_rand() % availablePositions.size(); if (rindex == i) continue; @@ -341,13 +341,13 @@ static void mapgen_place_trees() // Place trees float treeToLandRatio = (10 + (util_rand() % 30)) / 100.0f; - sint32 numTrees = std::min(std::max(4, (sint32) (availablePositions.size() * treeToLandRatio)), (sint32)availablePositions.size()); + int32_t numTrees = std::min(std::max(4, (int32_t) (availablePositions.size() * treeToLandRatio)), (int32_t)availablePositions.size()); - for (sint32 i = 0; i < numTrees; i++) + for (int32_t i = 0; i < numTrees; i++) { pos = availablePositions[i]; - sint32 type = -1; + int32_t type = -1; rct_tile_element * tileElement = map_get_surface_element_at(pos.x, pos.y); switch (surface_get_terrain(tileElement)) { @@ -386,9 +386,9 @@ static void mapgen_place_trees() /** * Sets each tile's water level to the specified water level if underneath that water level. */ -static void mapgen_set_water_level(sint32 waterLevel) +static void mapgen_set_water_level(int32_t waterLevel) { - sint32 x, y, mapSize; + int32_t x, y, mapSize; rct_tile_element * tileElement; mapSize = gMapSize; @@ -407,11 +407,11 @@ static void mapgen_set_water_level(sint32 waterLevel) /** * Smooths the height map. */ -static void mapgen_smooth_height(sint32 iterations) +static void mapgen_smooth_height(int32_t iterations) { - sint32 i, x, y, xx, yy, avg; - sint32 arraySize = _heightSize * _heightSize * sizeof(uint8); - uint8 * copyHeight = new uint8[arraySize]; + int32_t i, x, y, xx, yy, avg; + int32_t arraySize = _heightSize * _heightSize * sizeof(uint8_t); + uint8_t * copyHeight = new uint8_t[arraySize]; for (i = 0; i < iterations; i++) { @@ -442,7 +442,7 @@ static void mapgen_smooth_height(sint32 iterations) */ static void mapgen_set_height() { - sint32 x, y, heightX, heightY, mapSize; + int32_t x, y, heightX, heightY, mapSize; rct_tile_element * tileElement; mapSize = _heightSize / 2; @@ -453,12 +453,12 @@ static void mapgen_set_height() heightX = x * 2; heightY = y * 2; - uint8 q00 = get_height(heightX + 0, heightY + 0); - uint8 q01 = get_height(heightX + 0, heightY + 1); - uint8 q10 = get_height(heightX + 1, heightY + 0); - uint8 q11 = get_height(heightX + 1, heightY + 1); + uint8_t q00 = get_height(heightX + 0, heightY + 0); + uint8_t q01 = get_height(heightX + 0, heightY + 1); + uint8_t q10 = get_height(heightX + 1, heightY + 0); + uint8_t q11 = get_height(heightX + 1, heightY + 1); - uint8 baseHeight = (q00 + q01 + q10 + q11) / 4; + uint8_t baseHeight = (q00 + q01 + q10 + q11) / 4; tileElement = map_get_surface_element_at(x, y); tileElement->base_height = std::max(2, baseHeight * 2); @@ -486,10 +486,10 @@ static void mapgen_set_height() */ static float generate(float x, float y); -static sint32 fast_floor(float x); -static float grad(sint32 hash, float x, float y); +static int32_t fast_floor(float x); +static float grad(int32_t hash, float x, float y); -static uint8 perm[512]; +static uint8_t perm[512]; static void noise_rand() { @@ -499,11 +499,11 @@ static void noise_rand() } } -static float fractal_noise(sint32 x, sint32 y, float frequency, sint32 octaves, float lacunarity, float persistence) +static float fractal_noise(int32_t x, int32_t y, float frequency, int32_t octaves, float lacunarity, float persistence) { float total = 0.0f; float amplitude = persistence; - for (sint32 i = 0; i < octaves; i++) + for (int32_t i = 0; i < octaves; i++) { total += generate(x * frequency, y * frequency) * amplitude; frequency *= lacunarity; @@ -523,8 +523,8 @@ static float generate(float x, float y) float s = (x + y) * F2; // Hairy factor for 2D float xs = x + s; float ys = y + s; - sint32 i = fast_floor(xs); - sint32 j = fast_floor(ys); + int32_t i = fast_floor(xs); + int32_t j = fast_floor(ys); float t = (float) (i + j) * G2; float X0 = i - t; // Unskew the cell origin back to (x,y) space @@ -534,7 +534,7 @@ static float generate(float x, float y) // For the 2D case, the simplex shape is an equilateral triangle. // Determine which simplex we are in. - sint32 i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords + int32_t i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords if (x0 > y0) { i1 = 1; @@ -556,8 +556,8 @@ static float generate(float x, float y) float y2 = y0 - 1.0f + 2.0f * G2; // Wrap the integer indices at 256, to avoid indexing perm[] out of bounds - sint32 ii = i % 256; - sint32 jj = j % 256; + int32_t ii = i % 256; + int32_t jj = j % 256; // Calculate the contribution from the three corners float t0 = 0.5f - x0 * x0 - y0 * y0; @@ -598,14 +598,14 @@ static float generate(float x, float y) return 40.0f * (n0 + n1 + n2); // TODO: The scale factor is preliminary! } -static sint32 fast_floor(float x) +static int32_t fast_floor(float x) { - return (x > 0) ? ((sint32) x) : (((sint32) x) - 1); + return (x > 0) ? ((int32_t) x) : (((int32_t) x) - 1); } -static float grad(sint32 hash, float x, float y) +static float grad(int32_t hash, float x, float y) { - sint32 h = hash & 7; // Convert low 3 bits of hash code + int32_t h = hash & 7; // Convert low 3 bits of hash code float u = h < 4 ? x : y; // into 8 simple gradient directions, float v = h < 4 ? y : x; // and compute the dot product with (x,y). return ((h & 1) != 0 ? -u : u) + ((h & 2) != 0 ? -2.0f * v : 2.0f * v); @@ -613,13 +613,13 @@ static float grad(sint32 hash, float x, float y) static void mapgen_simplex(mapgen_settings * settings) { - sint32 x, y; + int32_t x, y; float freq = settings->simplex_base_freq * (1.0f / _heightSize); - sint32 octaves = settings->simplex_octaves; + int32_t octaves = settings->simplex_octaves; - sint32 low = settings->simplex_low; - sint32 high = settings->simplex_high; + int32_t low = settings->simplex_low; + int32_t high = settings->simplex_high; noise_rand(); for (y = 0; y < _heightSize; y++) @@ -629,7 +629,7 @@ static void mapgen_simplex(mapgen_settings * settings) float noiseValue = Math::Clamp(-1.0f, fractal_noise(x, y, freq, octaves, 2.0f, 0.65f), 1.0f); float normalisedNoiseValue = (noiseValue + 1.0f) / 2.0f; - set_height(x, y, low + (sint32) (normalisedNoiseValue * high)); + set_height(x, y, low + (int32_t) (normalisedNoiseValue * high)); } } } @@ -660,12 +660,12 @@ bool mapgen_load_heightmap(const utf8 * path) if (image.Width > MAXIMUM_MAP_SIZE_PRACTICAL) { context_show_error(STR_HEIGHT_MAP_ERROR, STR_ERROR_HEIHGT_MAP_TOO_BIG); - size = std::min(image.Height, MAXIMUM_MAP_SIZE_PRACTICAL); + size = std::min(image.Height, MAXIMUM_MAP_SIZE_PRACTICAL); } // Allocate memory for the height map values, one byte pixel delete[] _heightMapData.mono_bitmap; - _heightMapData.mono_bitmap = new uint8[size * size]; + _heightMapData.mono_bitmap = new uint8_t[size * size]; _heightMapData.width = size; _heightMapData.height = size; @@ -673,9 +673,9 @@ bool mapgen_load_heightmap(const utf8 * path) constexpr auto numChannels = 4; const auto pitch = image.Stride; const auto pixels = image.Pixels.data(); - for (uint32 x = 0; x < _heightMapData.width; x++) + for (uint32_t x = 0; x < _heightMapData.width; x++) { - for (uint32 y = 0; y < _heightMapData.height; y++) + for (uint32_t y = 0; y < _heightMapData.height; y++) { const auto red = pixels[x * numChannels + y * pitch]; const auto green = pixels[x * numChannels + y * pitch + 1]; @@ -716,29 +716,29 @@ void mapgen_unload_heightmap() /** * Applies box blur to the surface N times */ -static void mapgen_smooth_heightmap(uint8 * src, sint32 strength) +static void mapgen_smooth_heightmap(uint8_t * src, int32_t strength) { // Create buffer to store one channel - uint8 * dest = new uint8[_heightMapData.width * _heightMapData.height]; + uint8_t * dest = new uint8_t[_heightMapData.width * _heightMapData.height]; - for (sint32 i = 0; i < strength; i++) + for (int32_t i = 0; i < strength; i++) { // Calculate box blur value to all pixels of the surface - for (uint32 y = 0; y < _heightMapData.height; y++) + for (uint32_t y = 0; y < _heightMapData.height; y++) { - for (uint32 x = 0; x < _heightMapData.width; x++) + for (uint32_t x = 0; x < _heightMapData.width; x++) { - uint32 heightSum = 0; + uint32_t heightSum = 0; // Loop over neighbour pixels, all of them have the same weight - for (sint8 offsetX = -1; offsetX <= 1; offsetX++) + for (int8_t offsetX = -1; offsetX <= 1; offsetX++) { - for (sint8 offsetY = -1; offsetY <= 1; offsetY++) + for (int8_t offsetY = -1; offsetY <= 1; offsetY++) { // Clamp x and y so they stay within the image // This assumes the height map is not tiled, and increases the weight of the edges - const sint32 readX = Math::Clamp((sint32) x + offsetX, 0, (sint32) _heightMapData.width - 1); - const sint32 readY = Math::Clamp((sint32) y + offsetY, 0, (sint32) _heightMapData.height - 1); + const int32_t readX = Math::Clamp((int32_t) x + offsetX, 0, (int32_t) _heightMapData.width - 1); + const int32_t readY = Math::Clamp((int32_t) y + offsetY, 0, (int32_t) _heightMapData.height - 1); heightSum += src[readX + readY * _heightMapData.width]; } } @@ -749,9 +749,9 @@ static void mapgen_smooth_heightmap(uint8 * src, sint32 strength) } // Now apply the blur to the source pixels - for (uint32 y = 0; y < _heightMapData.height; y++) + for (uint32_t y = 0; y < _heightMapData.height; y++) { - for (uint32 x = 0; x < _heightMapData.width; x++) + for (uint32_t x = 0; x < _heightMapData.width; x++) { src[x + y * _heightMapData.width] = dest[x + y * _heightMapData.width]; } @@ -768,7 +768,7 @@ void mapgen_generate_from_heightmap(mapgen_settings * settings) openrct2_assert(settings->simplex_high != settings->simplex_low, "Low and high setting cannot be the same"); // Make a copy of the original height map that we can edit - uint8 * dest = new uint8[_heightMapData.width * _heightMapData.height]; + uint8_t * dest = new uint8_t[_heightMapData.width * _heightMapData.height]; memcpy(dest, _heightMapData.mono_bitmap, _heightMapData.width * _heightMapData.width); map_init(_heightMapData.width + 2); // + 2 for the black tiles around the map @@ -778,19 +778,19 @@ void mapgen_generate_from_heightmap(mapgen_settings * settings) mapgen_smooth_heightmap(dest, settings->smooth_strength); } - uint8 maxValue = 255; - uint8 minValue = 0; + uint8_t maxValue = 255; + uint8_t minValue = 0; if (settings->normalize_height) { // Get highest and lowest pixel value maxValue = 0; minValue = 0xff; - for (uint32 y = 0; y < _heightMapData.height; y++) + for (uint32_t y = 0; y < _heightMapData.height; y++) { - for (uint32 x = 0; x < _heightMapData.width; x++) + for (uint32_t x = 0; x < _heightMapData.width; x++) { - uint8 value = dest[x + y * _heightMapData.width]; + uint8_t value = dest[x + y * _heightMapData.width]; maxValue = std::max(maxValue, value); minValue = std::min(minValue, value); } @@ -807,19 +807,19 @@ void mapgen_generate_from_heightmap(mapgen_settings * settings) openrct2_assert(maxValue > minValue, "Input range is invalid"); openrct2_assert(settings->simplex_high > settings->simplex_low, "Output range is invalid"); - const uint8 rangeIn = maxValue - minValue; - const uint8 rangeOut = settings->simplex_high - settings->simplex_low; + const uint8_t rangeIn = maxValue - minValue; + const uint8_t rangeOut = settings->simplex_high - settings->simplex_low; - for (uint32 y = 0; y < _heightMapData.height; y++) + for (uint32_t y = 0; y < _heightMapData.height; y++) { - for (uint32 x = 0; x < _heightMapData.width; x++) + for (uint32_t x = 0; x < _heightMapData.width; x++) { // The x and y axis are flipped in the world, so this uses y for x and x for y. rct_tile_element * const surfaceElement = map_get_surface_element_at(y + 1, x + 1); // Read value from bitmap, and convert its range - uint8 value = dest[x + y * _heightMapData.width]; - value = (uint8) ((float) (value - minValue) / rangeIn * rangeOut) + settings->simplex_low; + uint8_t value = dest[x + y * _heightMapData.width]; + value = (uint8_t) ((float) (value - minValue) / rangeIn * rangeOut) + settings->simplex_low; surfaceElement->base_height = value; // Floor to even number @@ -841,10 +841,10 @@ void mapgen_generate_from_heightmap(mapgen_settings * settings) // Keep smoothing the entire map until no tiles are changed anymore while (true) { - uint32 numTilesChanged = 0; - for (uint32 y = 1; y <= _heightMapData.height; y++) + uint32_t numTilesChanged = 0; + for (uint32_t y = 1; y <= _heightMapData.height; y++) { - for (uint32 x = 1; x <= _heightMapData.width; x++) + for (uint32_t x = 1; x <= _heightMapData.width; x++) { numTilesChanged += tile_smooth(x, y); } diff --git a/src/openrct2/world/MapGen.h b/src/openrct2/world/MapGen.h index 271a1a26ec..ebe11774e9 100644 --- a/src/openrct2/world/MapGen.h +++ b/src/openrct2/world/MapGen.h @@ -14,25 +14,25 @@ struct mapgen_settings { // Base - sint32 mapSize; - sint32 height; - sint32 water_level; - sint32 floor; - sint32 wall; + int32_t mapSize; + int32_t height; + int32_t water_level; + int32_t floor; + int32_t wall; // Features (e.g. tree, rivers, lakes etc.) - sint32 trees; + int32_t trees; // Simplex Noise Parameters - sint32 simplex_low; - sint32 simplex_high; + int32_t simplex_low; + int32_t simplex_high; float simplex_base_freq; - sint32 simplex_octaves; + int32_t simplex_octaves; // Height map settings bool smooth; bool smooth_height_map; - uint32 smooth_strength; + uint32_t smooth_strength; bool normalize_height; }; diff --git a/src/openrct2/world/MapHelpers.cpp b/src/openrct2/world/MapHelpers.cpp index b1d0315cbb..b5e3511144 100644 --- a/src/openrct2/world/MapHelpers.cpp +++ b/src/openrct2/world/MapHelpers.cpp @@ -16,10 +16,10 @@ /** * Not perfect, this still leaves some particular tiles unsmoothed. */ -sint32 map_smooth(sint32 l, sint32 t, sint32 r, sint32 b) +int32_t map_smooth(int32_t l, int32_t t, int32_t r, int32_t b) { - sint32 i, x, y, count, doubleCorner, raisedLand = 0; - uint8 highest, cornerHeights[4]; + int32_t i, x, y, count, doubleCorner, raisedLand = 0; + uint8_t highest, cornerHeights[4]; rct_tile_element *tileElement, *tileElement2; for (y = t; y < b; y++) { for (x = l; x < r; x++) { @@ -49,7 +49,7 @@ sint32 map_smooth(sint32 l, sint32 t, sint32 r, sint32 b) if (highest >= tileElement->base_height + 4) { count = 0; - sint32 canCompensate = 1; + int32_t canCompensate = 1; for (i = 0; i < 4; i++) if (cornerHeights[i] == highest){ count++; @@ -57,7 +57,7 @@ sint32 map_smooth(sint32 l, sint32 t, sint32 r, sint32 b) // Check if surrounding corners aren't too high. The current tile // can't compensate for all the height differences anymore if it has // the extra height slope. - sint32 highestOnLowestSide; + int32_t highestOnLowestSide; switch (i){ default: case 0: @@ -179,7 +179,7 @@ sint32 map_smooth(sint32 l, sint32 t, sint32 r, sint32 b) * This does not change the base height, unless all corners have been raised. * @returns 0 if no edits were made, 1 otherwise */ -sint32 tile_smooth(sint32 x, sint32 y) +int32_t tile_smooth(int32_t x, int32_t y) { rct_tile_element *const surfaceElement = map_get_surface_element_at(x, y); @@ -196,23 +196,23 @@ sint32 tile_smooth(sint32 x, sint32 y) union { - sint32 baseheight[8]; + int32_t baseheight[8]; struct { - sint32 N; - sint32 NW; - sint32 W; - sint32 NE; - sint32 SW; - sint32 E; - sint32 SE; - sint32 S; + int32_t N; + int32_t NW; + int32_t W; + int32_t NE; + int32_t SW; + int32_t E; + int32_t SE; + int32_t S; }; } neighbourHeightOffset = {}; // Find the neighbour base heights - for (sint32 index = 0, y_offset = -1; y_offset <= 1; y_offset++) + for (int32_t index = 0, y_offset = -1; y_offset <= 1; y_offset++) { - for (sint32 x_offset = -1; x_offset <= 1; x_offset++) + for (int32_t x_offset = -1; x_offset <= 1; x_offset++) { // Skip self if (y_offset == 0 && x_offset == 0) @@ -230,12 +230,12 @@ sint32 tile_smooth(sint32 x, sint32 y) } // Count number from the three tiles that is currently higher - sint8 thresholdW = Math::Clamp(0, neighbourHeightOffset.SW, 1) + Math::Clamp(0, neighbourHeightOffset.W, 1) + Math::Clamp(0, neighbourHeightOffset.NW, 1); - sint8 thresholdN = Math::Clamp(0, neighbourHeightOffset.NW, 1) + Math::Clamp(0, neighbourHeightOffset.N, 1) + Math::Clamp(0, neighbourHeightOffset.NE, 1); - sint8 thresholdE = Math::Clamp(0, neighbourHeightOffset.NE, 1) + Math::Clamp(0, neighbourHeightOffset.E, 1) + Math::Clamp(0, neighbourHeightOffset.SE, 1); - sint8 thresholdS = Math::Clamp(0, neighbourHeightOffset.SE, 1) + Math::Clamp(0, neighbourHeightOffset.S, 1) + Math::Clamp(0, neighbourHeightOffset.SW, 1); + int8_t thresholdW = Math::Clamp(0, neighbourHeightOffset.SW, 1) + Math::Clamp(0, neighbourHeightOffset.W, 1) + Math::Clamp(0, neighbourHeightOffset.NW, 1); + int8_t thresholdN = Math::Clamp(0, neighbourHeightOffset.NW, 1) + Math::Clamp(0, neighbourHeightOffset.N, 1) + Math::Clamp(0, neighbourHeightOffset.NE, 1); + int8_t thresholdE = Math::Clamp(0, neighbourHeightOffset.NE, 1) + Math::Clamp(0, neighbourHeightOffset.E, 1) + Math::Clamp(0, neighbourHeightOffset.SE, 1); + int8_t thresholdS = Math::Clamp(0, neighbourHeightOffset.SE, 1) + Math::Clamp(0, neighbourHeightOffset.S, 1) + Math::Clamp(0, neighbourHeightOffset.SW, 1); - uint8 slope = TILE_ELEMENT_SLOPE_FLAT; + uint8_t slope = TILE_ELEMENT_SLOPE_FLAT; slope |= (thresholdW >= 1) ? SLOPE_W_THRESHOLD_FLAGS : 0; slope |= (thresholdN >= 1) ? SLOPE_N_THRESHOLD_FLAGS : 0; slope |= (thresholdE >= 1) ? SLOPE_E_THRESHOLD_FLAGS : 0; @@ -251,7 +251,7 @@ sint32 tile_smooth(sint32 x, sint32 y) } // Check if the calculated slope is the same already - uint8 currentSlope = surfaceElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + uint8_t currentSlope = surfaceElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; if (currentSlope == slope) { return 0; @@ -263,7 +263,7 @@ sint32 tile_smooth(sint32 x, sint32 y) { // All corners are raised, raise the entire tile instead. surfaceElement->base_height = (surfaceElement->clearance_height += 2); - uint8 waterHeight = surface_get_water_height(surfaceElement) * 2; + uint8_t waterHeight = surface_get_water_height(surfaceElement) * 2; if (waterHeight <= surfaceElement->base_height) { surfaceElement->properties.surface.terrain &= ~TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK; diff --git a/src/openrct2/world/MapHelpers.h b/src/openrct2/world/MapHelpers.h index 7a5886e85a..472493e9a8 100644 --- a/src/openrct2/world/MapHelpers.h +++ b/src/openrct2/world/MapHelpers.h @@ -19,7 +19,7 @@ enum { SLOPE_E_THRESHOLD_FLAGS = (1 << 3) }; -sint32 map_smooth(sint32 l, sint32 t, sint32 r, sint32 b); -sint32 tile_smooth(sint32 x, sint32 y); +int32_t map_smooth(int32_t l, int32_t t, int32_t r, int32_t b); +int32_t tile_smooth(int32_t x, int32_t y); #endif diff --git a/src/openrct2/world/MoneyEffect.cpp b/src/openrct2/world/MoneyEffect.cpp index f0df54a032..3529a46ebe 100644 --- a/src/openrct2/world/MoneyEffect.cpp +++ b/src/openrct2/world/MoneyEffect.cpp @@ -26,7 +26,7 @@ static constexpr const LocationXY16 _moneyEffectMoveOffset[] = { * * rct2: 0x0067351F */ -void money_effect_create_at(money32 value, sint32 x, sint32 y, sint32 z, bool vertical) +void money_effect_create_at(money32 value, int32_t x, int32_t y, int32_t z, bool vertical) { if (value == MONEY(0, 00)) return; @@ -46,7 +46,7 @@ void money_effect_create_at(money32 value, sint32 x, sint32 y, sint32 z, bool ve moneyEffect->num_movements = 0; moneyEffect->move_delay = 0; - sint16 offsetX = 0; + int16_t offsetX = 0; if (!gOpenRCT2NoGraphics) { // Construct string to display @@ -115,9 +115,9 @@ void money_effect_update(rct_money_effect * moneyEffect) return; } - sint32 x = moneyEffect->x; - sint32 y = moneyEffect->y; - sint32 z = moneyEffect->z; + int32_t x = moneyEffect->x; + int32_t y = moneyEffect->y; + int32_t z = moneyEffect->z; moneyEffect->move_delay = 0; if (moneyEffect->vertical) diff --git a/src/openrct2/world/Park.cpp b/src/openrct2/world/Park.cpp index 2aac038162..46d82b3e5f 100644 --- a/src/openrct2/world/Park.cpp +++ b/src/openrct2/world/Park.cpp @@ -42,31 +42,31 @@ using namespace OpenRCT2; rct_string_id gParkName; -uint32 gParkNameArgs; -uint32 gParkFlags; -uint16 gParkRating; +uint32_t gParkNameArgs; +uint32_t gParkFlags; +uint16_t gParkRating; money16 gParkEntranceFee; -uint16 gParkSize; +uint16_t gParkSize; money16 gLandPrice; money16 gConstructionRightsPrice; -uint32 gTotalAdmissions; +uint32_t gTotalAdmissions; money32 gTotalIncomeFromAdmissions; money32 gParkValue; money32 gCompanyValue; -sint16 gParkRatingCasualtyPenalty; -uint8 gParkRatingHistory[32]; -uint8 gGuestsInParkHistory[32]; +int16_t gParkRatingCasualtyPenalty; +uint8_t gParkRatingHistory[32]; +uint8_t gGuestsInParkHistory[32]; // If this value is more than or equal to 0, the park rating is forced to this value. Used for cheat -static sint32 _forcedParkRating = -1; +static int32_t _forcedParkRating = -1; /** * In a difficult guest generation scenario, no guests will be generated if over this value. */ -sint32 _suggestedGuestMaximum; +int32_t _suggestedGuestMaximum; /** * Probability out of 65535, of gaining a new guest per game tick. @@ -74,7 +74,7 @@ sint32 _suggestedGuestMaximum; * With a full park rating, non-overpriced entrance fee, less guests than the suggested maximum and four positive awards, * approximately 1 guest per second can be generated (+60 guests in one minute). */ -sint32 _guestGenerationProbability; +int32_t _guestGenerationProbability; /** * @@ -84,7 +84,7 @@ void reset_park_entry() { gParkName = 0; reset_park_entrance(); - for (sint32 i = 0; i < MAX_PEEP_SPAWNS; i++) { + for (int32_t i = 0; i < MAX_PEEP_SPAWNS; i++) { gPeepSpawns[i].x = PEEP_SPAWN_UNDEFINED; } } @@ -92,10 +92,10 @@ void reset_park_entry() /** * Choose a random peep spawn and iterates through until defined spawn is found. */ -static uint32 get_random_peep_spawn_index() +static uint32_t get_random_peep_spawn_index() { - uint32 spawnIndexList[MAX_PEEP_SPAWNS]; - uint32 numSpawns = map_get_available_peep_spawn_index_list(spawnIndexList); + uint32_t spawnIndexList[MAX_PEEP_SPAWNS]; + uint32_t numSpawns = map_get_available_peep_spawn_index_list(spawnIndexList); if (numSpawns > 0) { return spawnIndexList[scenario_rand() % numSpawns]; } @@ -104,7 +104,7 @@ static uint32 get_random_peep_spawn_index() } } -void park_set_open(sint32 open) +void park_set_open(int32_t open) { game_do_command(0, GAME_COMMAND_FLAG_APPLY, 0, open << 8, GAME_COMMAND_SET_PARK_OPEN, 0, 0); } @@ -114,20 +114,20 @@ void park_set_open(sint32 open) * rct2: 0x00669D4A */ void game_command_set_park_open( - [[maybe_unused]] sint32 * eax, - sint32 * ebx, - [[maybe_unused]] sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - [[maybe_unused]] sint32 * ebp) + [[maybe_unused]] int32_t * eax, + int32_t * ebx, + [[maybe_unused]] int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + [[maybe_unused]] int32_t * ebp) { if (!(*ebx & GAME_COMMAND_FLAG_APPLY)) { *ebx = 0; return; } - sint32 dh = (*edx >> 8) & 0xFF; + int32_t dh = (*edx >> 8) & 0xFF; gCommandExpenditureType = RCT_EXPENDITURE_TYPE_PARK_ENTRANCE_TICKETS; switch (dh) { @@ -169,7 +169,7 @@ void update_park_fences(const CoordsXY coords) if (surfaceElement == nullptr) return; - uint8 newOwnership = surfaceElement->properties.surface.ownership & 0xF0; + uint8_t newOwnership = surfaceElement->properties.surface.ownership & 0xF0; if ((surfaceElement->properties.surface.ownership & OWNERSHIP_OWNED) == 0) { bool fenceRequired = true; @@ -213,8 +213,8 @@ void update_park_fences(const CoordsXY coords) } if (surfaceElement->properties.surface.ownership != newOwnership) { - sint32 z0 = surfaceElement->base_height * 8; - sint32 z1 = z0 + 16; + int32_t z0 = surfaceElement->base_height * 8; + int32_t z1 = z0 + 16; map_invalidate_tile(coords.x, coords.y, z0, z1); surfaceElement->properties.surface.ownership = newOwnership; } @@ -239,7 +239,7 @@ void park_set_name(const char *name) } } -static money32 map_buy_land_rights_for_tile(sint32 x, sint32 y, sint32 setting, sint32 flags) { +static money32 map_buy_land_rights_for_tile(int32_t x, int32_t y, int32_t setting, int32_t flags) { rct_tile_element* surfaceElement = map_get_surface_element_at({x, y}); if (surfaceElement == nullptr) return MONEY32_UNDEFINED; @@ -277,28 +277,28 @@ static money32 map_buy_land_rights_for_tile(sint32 x, sint32 y, sint32 setting, if (flags & GAME_COMMAND_FLAG_APPLY) { surfaceElement->properties.surface.ownership |= OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED; - uint16 baseHeight = surfaceElement->base_height * 8; + uint16_t baseHeight = surfaceElement->base_height * 8; map_invalidate_tile(x, y, baseHeight, baseHeight + 16); } return gConstructionRightsPrice; case BUY_LAND_RIGHTS_FLAG_UNOWN_CONSTRUCTION_RIGHTS: // 3 if (flags & GAME_COMMAND_FLAG_APPLY) { surfaceElement->properties.surface.ownership &= ~OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED; - uint16 baseHeight = surfaceElement->base_height * 8; + uint16_t baseHeight = surfaceElement->base_height * 8; map_invalidate_tile(x, y, baseHeight, baseHeight + 16); } return 0; case BUY_LAND_RIGHTS_FLAG_SET_FOR_SALE: // 4 if (flags & GAME_COMMAND_FLAG_APPLY) { surfaceElement->properties.surface.ownership |= OWNERSHIP_AVAILABLE; - uint16 baseHeight = surfaceElement->base_height * 8; + uint16_t baseHeight = surfaceElement->base_height * 8; map_invalidate_tile(x, y, baseHeight, baseHeight + 16); } return 0; case BUY_LAND_RIGHTS_FLAG_SET_CONSTRUCTION_RIGHTS_FOR_SALE: // 5 if (flags & GAME_COMMAND_FLAG_APPLY) { surfaceElement->properties.surface.ownership |= OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE; - uint16 baseHeight = surfaceElement->base_height * 8; + uint16_t baseHeight = surfaceElement->base_height * 8; map_invalidate_tile(x, y, baseHeight, baseHeight + 16); } return 0; @@ -318,7 +318,7 @@ static money32 map_buy_land_rights_for_tile(sint32 x, sint32 y, sint32 setting, return MONEY32_UNDEFINED; } - uint8 newOwnership = (flags & 0xFF00) >> 4; + uint8_t newOwnership = (flags & 0xFF00) >> 4; if (newOwnership == (surfaceElement->properties.surface.ownership & 0xF0)) { return 0; } @@ -346,7 +346,7 @@ static money32 map_buy_land_rights_for_tile(sint32 x, sint32 y, sint32 setting, if ((newOwnership & 0xF0) != 0) { PeepSpawn *peepSpawns = gPeepSpawns; - for (uint8 i = 0; i < MAX_PEEP_SPAWNS; ++i) { + for (uint8_t i = 0; i < MAX_PEEP_SPAWNS; ++i) { if (x == (peepSpawns[i].x & 0xFFE0)) { if (y == (peepSpawns[i].y & 0xFFE0)) { peepSpawns[i].x = PEEP_SPAWN_UNDEFINED; @@ -367,9 +367,9 @@ static money32 map_buy_land_rights_for_tile(sint32 x, sint32 y, sint32 setting, } } -sint32 map_buy_land_rights(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 setting, sint32 flags) +int32_t map_buy_land_rights(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t setting, int32_t flags) { - sint32 x, y, z; + int32_t x, y, z; money32 totalCost, cost; gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LAND_PURCHASE; @@ -408,9 +408,9 @@ sint32 map_buy_land_rights(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 se * rct2: 0x006649BD */ void game_command_buy_land_rights( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { - sint32 flags = *ebx & 0xFFFF; + int32_t flags = *ebx & 0xFFFF; *ebx = map_buy_land_rights( (*eax & 0xFFFF), @@ -429,7 +429,7 @@ void game_command_buy_land_rights( } } -void set_forced_park_rating(sint32 rating) +void set_forced_park_rating(int32_t rating) { _forcedParkRating = rating; auto& park = GetContext()->GetGameState()->GetPark(); @@ -438,7 +438,7 @@ void set_forced_park_rating(sint32 rating) context_broadcast_intent(&intent); } -sint32 get_forced_park_rating() +int32_t get_forced_park_rating() { return _forcedParkRating; } @@ -487,7 +487,7 @@ bool Park::IsOpen() const return (gParkFlags & PARK_FLAGS_PARK_OPEN) != 0; } -uint16 Park::GetParkRating() const +uint16_t Park::GetParkRating() const { return gParkRating; } @@ -595,9 +595,9 @@ void Park::Update(const Date &date) GenerateGuests(); } -sint32 Park::CalculateParkSize() const +int32_t Park::CalculateParkSize() const { - sint32 tiles; + int32_t tiles; tile_element_iterator it; tiles = 0; @@ -620,14 +620,14 @@ sint32 Park::CalculateParkSize() const return tiles; } -sint32 Park::CalculateParkRating() const +int32_t Park::CalculateParkRating() const { if (_forcedParkRating >= 0) { return _forcedParkRating; } - sint32 result = 1150; + int32_t result = 1150; if (gParkFlags & PARK_FLAGS_DIFFICULT_PARK_RATING) { result = 1050; @@ -636,12 +636,12 @@ sint32 Park::CalculateParkRating() const // Guests { // -150 to +3 based on a range of guests from 0 to 2000 - result -= 150 - (std::min(2000, gNumGuestsInPark) / 13); + result -= 150 - (std::min(2000, gNumGuestsInPark) / 13); // Find the number of happy peeps and the number of peeps who can't find the park exit - sint32 happyGuestCount = 0; - sint32 lostGuestCount = 0; - uint16 spriteIndex; + int32_t happyGuestCount = 0; + int32_t lostGuestCount = 0; + uint16_t spriteIndex; rct_peep * peep; FOR_ALL_GUESTS(spriteIndex, peep) { @@ -675,13 +675,13 @@ sint32 Park::CalculateParkRating() const // Rides { - sint32 rideCount = 0; - sint32 excitingRideCount = 0; - sint32 totalRideUptime = 0; - sint32 totalRideIntensity = 0; - sint32 totalRideExcitement = 0; + int32_t rideCount = 0; + int32_t excitingRideCount = 0; + int32_t totalRideUptime = 0; + int32_t totalRideIntensity = 0; + int32_t totalRideExcitement = 0; - sint32 i; + int32_t i; Ride * ride; FOR_ALL_RIDES(i, ride) { @@ -702,8 +702,8 @@ sint32 Park::CalculateParkRating() const result -= 100; if (excitingRideCount > 0) { - sint32 averageExcitement = totalRideExcitement / excitingRideCount; - sint32 averageIntensity = totalRideIntensity / excitingRideCount; + int32_t averageExcitement = totalRideExcitement / excitingRideCount; + int32_t averageIntensity = totalRideIntensity / excitingRideCount; averageExcitement -= 46; if (averageExcitement < 0) @@ -722,16 +722,16 @@ sint32 Park::CalculateParkRating() const result += 100 - averageExcitement - averageIntensity; } - totalRideExcitement = std::min(1000, totalRideExcitement); - totalRideIntensity = std::min(1000, totalRideIntensity); + totalRideExcitement = std::min(1000, totalRideExcitement); + totalRideIntensity = std::min(1000, totalRideIntensity); result -= 200 - ((totalRideExcitement + totalRideIntensity) / 10); } // Litter { rct_litter * litter; - sint32 litterCount = 0; - for (uint16 spriteIndex = gSpriteListHead[SPRITE_LIST_LITTER]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = litter->next) + int32_t litterCount = 0; + for (uint16_t spriteIndex = gSpriteListHead[SPRITE_LIST_LITTER]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = litter->next) { litter = &(get_sprite(spriteIndex)->litter); @@ -741,7 +741,7 @@ sint32 Park::CalculateParkRating() const litterCount++; } } - result -= 600 - (4 * (150 - std::min(150, litterCount))); + result -= 600 - (4 * (150 - std::min(150, litterCount))); } result -= gParkRatingCasualtyPenalty; @@ -754,7 +754,7 @@ money32 Park::CalculateParkValue() const money32 result = 0; // Sum ride values - for (sint32 i = 0; i < MAX_RIDES; i++) + for (int32_t i = 0; i < MAX_RIDES; i++) { auto ride = get_ride(i); result += CalculateRideValue(ride); @@ -785,7 +785,7 @@ money32 Park::CalculateCompanyValue() const money16 Park::CalculateTotalRideValueForMoney() const { money16 totalRideValue = 0; - sint32 i; + int32_t i; Ride * ride; FOR_ALL_RIDES(i, ride) { @@ -806,12 +806,12 @@ money16 Park::CalculateTotalRideValueForMoney() const return totalRideValue; } -uint32 Park::CalculateSuggestedMaxGuests() const +uint32_t Park::CalculateSuggestedMaxGuests() const { - uint32 suggestedMaxGuests = 0; + uint32_t suggestedMaxGuests = 0; // TODO combine the two ride loops - sint32 i; + int32_t i; Ride * ride; FOR_ALL_RIDES(i, ride) { @@ -826,7 +826,7 @@ uint32 Park::CalculateSuggestedMaxGuests() const // If difficult guest generation, extra guests are available for good rides if (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) { - suggestedMaxGuests = std::min(suggestedMaxGuests, 1000); + suggestedMaxGuests = std::min(suggestedMaxGuests, 1000); FOR_ALL_RIDES(i, ride) { if (ride->lifecycle_flags & RIDE_LIFECYCLE_CRASHED) continue; @@ -842,17 +842,17 @@ uint32 Park::CalculateSuggestedMaxGuests() const } } - suggestedMaxGuests = std::min(suggestedMaxGuests, 65535); + suggestedMaxGuests = std::min(suggestedMaxGuests, 65535); return suggestedMaxGuests; } -uint32 Park::CalculateGuestGenerationProbability() const +uint32_t Park::CalculateGuestGenerationProbability() const { // Begin with 50 + park rating - uint32 probability = 50 + Math::Clamp(0, gParkRating - 200, 650); + uint32_t probability = 50 + Math::Clamp(0, gParkRating - 200, 650); // The more guests, the lower the chance of a new one - sint32 numGuests = gNumGuestsInPark + gNumGuestsHeadingForPark; + int32_t numGuests = gNumGuestsInPark + gNumGuestsHeadingForPark; if (numGuests > _suggestedGuestMaximum) { probability /= 4; @@ -902,14 +902,14 @@ uint32 Park::CalculateGuestGenerationProbability() const return probability; } -uint8 Park::CalculateGuestInitialHappiness(uint8 percentage) +uint8_t Park::CalculateGuestInitialHappiness(uint8_t percentage) { - percentage = Math::Clamp(15, percentage, 98); + percentage = Math::Clamp(15, percentage, 98); // The percentages follow this sequence: // 15 17 18 20 21 23 25 26 28 29 31 32 34 36 37 39 40 42 43 45 47 48 50 51 53... // This sequence can be defined as PI*(9+n)/2 (the value is floored) - for (uint8 n = 1; n < 55; n++) + for (uint8_t n = 1; n < 55; n++) { if ((3.14159 * (9 + n)) / 2 >= percentage) { @@ -924,7 +924,7 @@ uint8 Park::CalculateGuestInitialHappiness(uint8 percentage) void Park::GenerateGuests() { // Generate a new guest for some probability - if ((sint32)(scenario_rand() & 0xFFFF) < _guestGenerationProbability) + if ((int32_t)(scenario_rand() & 0xFFFF) < _guestGenerationProbability) { bool difficultGeneration = (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0; if (!difficultGeneration || _suggestedGuestMaximum + 150 >= gNumGuestsInPark) @@ -934,12 +934,12 @@ void Park::GenerateGuests() } // Extra guests generated by advertising campaigns - for (sint32 campaign = 0; campaign < ADVERTISING_CAMPAIGN_COUNT; campaign++) + for (int32_t campaign = 0; campaign < ADVERTISING_CAMPAIGN_COUNT; campaign++) { if (gMarketingCampaignDaysLeft[campaign] != 0) { // Random chance of guest generation - if ((sint32)(scenario_rand() & 0xFFFF) < marketing_get_campaign_guest_generation_probability(campaign)) + if ((int32_t)(scenario_rand() & 0xFFFF) < marketing_get_campaign_guest_generation_probability(campaign)) { GenerateGuestFromCampaign(campaign); } @@ -947,7 +947,7 @@ void Park::GenerateGuests() } } -rct_peep * Park::GenerateGuestFromCampaign(sint32 campaign) +rct_peep * Park::GenerateGuestFromCampaign(int32_t campaign) { auto peep = GenerateGuest(); if (peep != nullptr) @@ -1004,8 +1004,8 @@ void Park::ResetHistories() void Park::UpdateHistories() { - uint8 guestChangeModifier = 1; - sint32 changeInGuestsInPark = (sint32)gNumGuestsInPark - (sint32)gNumGuestsInParkLastWeek; + uint8_t guestChangeModifier = 1; + int32_t changeInGuestsInPark = (int32_t)gNumGuestsInPark - (int32_t)gNumGuestsInParkLastWeek; if (changeInGuestsInPark > -20) { guestChangeModifier++; @@ -1018,8 +1018,8 @@ void Park::UpdateHistories() gNumGuestsInParkLastWeek = gNumGuestsInPark; // Update park rating, guests in park and current cash history - HistoryPushRecord(gParkRatingHistory, CalculateParkRating() / 4); - HistoryPushRecord(gGuestsInParkHistory, std::min(gNumGuestsInPark, 5000) / 20); + HistoryPushRecord(gParkRatingHistory, CalculateParkRating() / 4); + HistoryPushRecord(gGuestsInParkHistory, std::min(gNumGuestsInPark, 5000) / 20); HistoryPushRecord(gCashHistory, finance_get_current_cash() - gBankLoan); // Update weekly profit history @@ -1042,12 +1042,12 @@ void Park::UpdateHistories() window_invalidate_by_class(WC_FINANCES); } -sint32 park_is_open() +int32_t park_is_open() { return GetContext()->GetGameState()->GetPark().IsOpen(); } -sint32 park_calculate_size() +int32_t park_calculate_size() { auto tiles = GetContext()->GetGameState()->GetPark().CalculateParkSize(); if (tiles != gParkSize) @@ -1058,7 +1058,7 @@ sint32 park_calculate_size() return tiles; } -uint8 calculate_guest_initial_happiness(uint8 percentage) +uint8_t calculate_guest_initial_happiness(uint8_t percentage) { return Park::CalculateGuestInitialHappiness(percentage); } diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index c25608b43a..4d05398de4 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -20,7 +20,7 @@ struct rct_peep; -enum : uint32 +enum : uint32_t { PARK_FLAGS_PARK_OPEN = (1 << 0), PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT = (1 << 1), @@ -58,18 +58,18 @@ namespace OpenRCT2 bool IsOpen() const; - uint16 GetParkRating() const; + uint16_t GetParkRating() const; money32 GetParkValue() const; money32 GetCompanyValue() const; void Initialise(); void Update(const Date &date); - sint32 CalculateParkSize() const; - sint32 CalculateParkRating() const; + int32_t CalculateParkSize() const; + int32_t CalculateParkRating() const; money32 CalculateParkValue() const; money32 CalculateCompanyValue() const; - static uint8 CalculateGuestInitialHappiness(uint8 percentage); + static uint8_t CalculateGuestInitialHappiness(uint8_t percentage); rct_peep * GenerateGuest(); @@ -79,11 +79,11 @@ namespace OpenRCT2 private: money32 CalculateRideValue(const Ride * ride) const; money16 CalculateTotalRideValueForMoney() const; - uint32 CalculateSuggestedMaxGuests() const; - uint32 CalculateGuestGenerationProbability() const; + uint32_t CalculateSuggestedMaxGuests() const; + uint32_t CalculateGuestGenerationProbability() const; void GenerateGuests(); - rct_peep * GenerateGuestFromCampaign(sint32 campaign); + rct_peep * GenerateGuestFromCampaign(int32_t campaign); }; } @@ -100,49 +100,49 @@ enum }; extern rct_string_id gParkName; -extern uint32 gParkNameArgs; -extern uint32 gParkFlags; -extern uint16 gParkRating; +extern uint32_t gParkNameArgs; +extern uint32_t gParkFlags; +extern uint16_t gParkRating; extern money16 gParkEntranceFee; -extern uint16 gParkSize; +extern uint16_t gParkSize; extern money16 gLandPrice; extern money16 gConstructionRightsPrice; -extern uint32 gTotalAdmissions; +extern uint32_t gTotalAdmissions; extern money32 gTotalIncomeFromAdmissions; extern money32 gParkValue; extern money32 gCompanyValue; -extern sint16 gParkRatingCasualtyPenalty; -extern uint8 gParkRatingHistory[32]; -extern uint8 gGuestsInParkHistory[32]; -extern sint32 _guestGenerationProbability; -extern sint32 _suggestedGuestMaximum; +extern int16_t gParkRatingCasualtyPenalty; +extern uint8_t gParkRatingHistory[32]; +extern uint8_t gGuestsInParkHistory[32]; +extern int32_t _guestGenerationProbability; +extern int32_t _suggestedGuestMaximum; -void set_forced_park_rating(sint32 rating); -sint32 get_forced_park_rating(); +void set_forced_park_rating(int32_t rating); +int32_t get_forced_park_rating(); -sint32 park_is_open(); -sint32 park_calculate_size(); +int32_t park_is_open(); +int32_t park_calculate_size(); void reset_park_entry(); void update_park_fences(CoordsXY coords); void update_park_fences_around_tile(CoordsXY coords); -uint8 calculate_guest_initial_happiness(uint8 percentage); +uint8_t calculate_guest_initial_happiness(uint8_t percentage); -void park_set_open(sint32 open); -sint32 park_entrance_get_index(sint32 x, sint32 y, sint32 z); +void park_set_open(int32_t open); +int32_t park_entrance_get_index(int32_t x, int32_t y, int32_t z); void park_set_name(const char *name); void park_set_entrance_fee(money32 value); -sint32 map_buy_land_rights(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 setting, sint32 flags); +int32_t map_buy_land_rights(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t setting, int32_t flags); -void game_command_set_park_entrance_fee(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_set_park_open(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); -void game_command_buy_land_rights(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp); +void game_command_set_park_entrance_fee(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_set_park_open(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); +void game_command_buy_land_rights(int32_t *eax, int32_t *ebx, int32_t *ecx, int32_t *edx, int32_t *esi, int32_t *edi, int32_t *ebp); money16 park_get_entrance_fee(); diff --git a/src/openrct2/world/Particle.cpp b/src/openrct2/world/Particle.cpp index ab9cae9bf2..3ae588d6db 100644 --- a/src/openrct2/world/Particle.cpp +++ b/src/openrct2/world/Particle.cpp @@ -17,7 +17,7 @@ * * rct2: 0x006735A1 */ -void crashed_vehicle_particle_create(rct_vehicle_colour colours, sint32 x, sint32 y, sint32 z) +void crashed_vehicle_particle_create(rct_vehicle_colour colours, int32_t x, int32_t y, int32_t z) { rct_crashed_vehicle_particle * sprite = (rct_crashed_vehicle_particle *) create_sprite(2); if (sprite != nullptr) @@ -33,9 +33,9 @@ void crashed_vehicle_particle_create(rct_vehicle_colour colours, sint32 x, sint3 sprite->frame = (scenario_rand() & 0xFF) * 12; sprite->time_to_live = (scenario_rand() & 0x7F) + 140; - sprite->crashed_sprite_base = scenario_rand_max((uint32)Util::CountOf(vehicle_particle_base_sprites)); - sprite->acceleration_x = ((sint16) (scenario_rand() & 0xFFFF)) * 4; - sprite->acceleration_y = ((sint16) (scenario_rand() & 0xFFFF)) * 4; + sprite->crashed_sprite_base = scenario_rand_max((uint32_t)Util::CountOf(vehicle_particle_base_sprites)); + sprite->acceleration_x = ((int16_t) (scenario_rand() & 0xFFFF)) * 4; + sprite->acceleration_y = ((int16_t) (scenario_rand() & 0xFFFF)) * 4; sprite->acceleration_z = (scenario_rand() & 0xFFFF) * 4 + 0x10000; sprite->velocity_x = 0; sprite->velocity_y = 0; @@ -66,22 +66,22 @@ void crashed_vehicle_particle_update(rct_crashed_vehicle_particle * particle) particle->acceleration_z -= (particle->acceleration_z / 256); // Update velocity and position - sint32 vx = particle->velocity_x + particle->acceleration_x; - sint32 vy = particle->velocity_y + particle->acceleration_y; - sint32 vz = particle->velocity_z + particle->acceleration_z; + int32_t vx = particle->velocity_x + particle->acceleration_x; + int32_t vy = particle->velocity_y + particle->acceleration_y; + int32_t vz = particle->velocity_z + particle->acceleration_z; - sint16 x = particle->x + (vx >> 16); - sint16 y = particle->y + (vy >> 16); - sint16 z = particle->z + (vz >> 16); + int16_t x = particle->x + (vx >> 16); + int16_t y = particle->y + (vy >> 16); + int16_t z = particle->z + (vz >> 16); particle->velocity_x = vx & 0xFFFF; particle->velocity_y = vy & 0xFFFF; particle->velocity_z = vz & 0xFFFF; // Check collision with land / water - uint32 waterLand = tile_element_height(x, y); - sint16 landZ = (waterLand & 0xFFFF); - sint16 waterZ = (waterLand >> 16); + uint32_t waterLand = tile_element_height(x, y); + int16_t landZ = (waterLand & 0xFFFF); + int16_t waterZ = (waterLand >> 16); if (waterZ != 0 && particle->z >= waterZ && z <= waterZ) { @@ -112,7 +112,7 @@ void crashed_vehicle_particle_update(rct_crashed_vehicle_particle * particle) * * rct2: 0x00673699 */ -void crash_splash_create(sint32 x, sint32 y, sint32 z) +void crash_splash_create(int32_t x, int32_t y, int32_t z) { rct_unk_sprite * sprite = (rct_unk_sprite *) create_sprite(2); if (sprite != nullptr) diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index b85ad36af9..32c61d4370 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -26,40 +26,40 @@ #include "SmallScenery.h" #include "Wall.h" -uint8 gWindowSceneryActiveTabIndex; -uint16 gWindowSceneryTabSelections[20]; -uint8 gWindowSceneryClusterEnabled; -uint8 gWindowSceneryPaintEnabled; -uint8 gWindowSceneryRotation; +uint8_t gWindowSceneryActiveTabIndex; +uint16_t gWindowSceneryTabSelections[20]; +uint8_t gWindowSceneryClusterEnabled; +uint8_t gWindowSceneryPaintEnabled; +uint8_t gWindowSceneryRotation; colour_t gWindowSceneryPrimaryColour; colour_t gWindowScenerySecondaryColour; colour_t gWindowSceneryTertiaryColour; bool gWindowSceneryEyedropperEnabled; rct_tile_element *gSceneryTileElement; -uint8 gSceneryTileElementType; +uint8_t gSceneryTileElementType; money32 gSceneryPlaceCost; -sint16 gSceneryPlaceObject; -sint16 gSceneryPlaceZ; -uint8 gSceneryPlacePathType; -uint8 gSceneryPlacePathSlope; -uint8 gSceneryPlaceRotation; +int16_t gSceneryPlaceObject; +int16_t gSceneryPlaceZ; +uint8_t gSceneryPlacePathType; +uint8_t gSceneryPlacePathSlope; +uint8_t gSceneryPlaceRotation; -uint8 gSceneryGhostType; +uint8_t gSceneryGhostType; LocationXYZ16 gSceneryGhostPosition; -uint32 gSceneryGhostPathObjectType; -uint8 gSceneryGhostWallRotation; +uint32_t gSceneryGhostPathObjectType; +uint8_t gSceneryGhostWallRotation; -sint16 gSceneryShiftPressed; -sint16 gSceneryShiftPressX; -sint16 gSceneryShiftPressY; -sint16 gSceneryShiftPressZOffset; +int16_t gSceneryShiftPressed; +int16_t gSceneryShiftPressX; +int16_t gSceneryShiftPressY; +int16_t gSceneryShiftPressZOffset; -sint16 gSceneryCtrlPressed; -sint16 gSceneryCtrlPressZ; +int16_t gSceneryCtrlPressed; +int16_t gSceneryCtrlPressZ; -uint8 gSceneryGroundFlags; +uint8_t gSceneryGroundFlags; money32 gClearSceneryCost; @@ -71,9 +71,9 @@ const LocationXY8 ScenerySubTileOffsets[] = { { 23, 7 } }; -void scenery_increase_age(sint32 x, sint32 y, rct_tile_element *tileElement); +void scenery_increase_age(int32_t x, int32_t y, rct_tile_element *tileElement); -void scenery_update_tile(sint32 x, sint32 y) +void scenery_update_tile(int32_t x, int32_t y) { rct_tile_element *tileElement; @@ -109,7 +109,7 @@ void scenery_update_tile(sint32 x, sint32 y) * * rct2: 0x006E33D9 */ -void scenery_update_age(sint32 x, sint32 y, rct_tile_element *tileElement) +void scenery_update_age(int32_t x, int32_t y, rct_tile_element *tileElement) { rct_tile_element *tileElementAbove; rct_scenery_entry *sceneryEntry; @@ -168,13 +168,13 @@ void scenery_update_age(sint32 x, sint32 y, rct_tile_element *tileElement) map_invalidate_tile_zoom1(x, y, tileElement->base_height * 8, tileElement->clearance_height * 8); } -void scenery_increase_age(sint32 x, sint32 y, rct_tile_element *tileElement) +void scenery_increase_age(int32_t x, int32_t y, rct_tile_element *tileElement) { if (tileElement->flags & SMALL_SCENERY_FLAG_ANIMATED) return; if (tileElement->properties.scenery.age < 255) { - uint8 newAge = tileElement->properties.scenery.age++; + uint8_t newAge = tileElement->properties.scenery.age++; // Only invalidate tiles when scenery crosses the withering threshholds, and can be withered. if (newAge == SCENERY_WITHER_AGE_THRESHOLD_1 || newAge == SCENERY_WITHER_AGE_THRESHOLD_2) @@ -194,7 +194,7 @@ void scenery_increase_age(sint32 x, sint32 y, rct_tile_element *tileElement) * rct2: 0x006E2712 */ void scenery_remove_ghost_tool_placement(){ - sint16 x, y, z; + int16_t x, y, z; x = gSceneryGhostPosition.x; y = gSceneryGhostPosition.y; @@ -272,7 +272,7 @@ void scenery_remove_ghost_tool_placement(){ } } -rct_scenery_entry *get_small_scenery_entry(sint32 entryIndex) +rct_scenery_entry *get_small_scenery_entry(int32_t entryIndex) { rct_scenery_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -287,7 +287,7 @@ rct_scenery_entry *get_small_scenery_entry(sint32 entryIndex) return result; } -rct_scenery_entry *get_large_scenery_entry(sint32 entryIndex) +rct_scenery_entry *get_large_scenery_entry(int32_t entryIndex) { rct_scenery_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -302,7 +302,7 @@ rct_scenery_entry *get_large_scenery_entry(sint32 entryIndex) return result; } -rct_scenery_entry *get_wall_entry(sint32 entryIndex) +rct_scenery_entry *get_wall_entry(int32_t entryIndex) { rct_scenery_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -317,7 +317,7 @@ rct_scenery_entry *get_wall_entry(sint32 entryIndex) return result; } -rct_scenery_entry *get_banner_entry(sint32 entryIndex) +rct_scenery_entry *get_banner_entry(int32_t entryIndex) { rct_scenery_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -332,7 +332,7 @@ rct_scenery_entry *get_banner_entry(sint32 entryIndex) return result; } -rct_scenery_entry *get_footpath_item_entry(sint32 entryIndex) +rct_scenery_entry *get_footpath_item_entry(int32_t entryIndex) { rct_scenery_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -347,7 +347,7 @@ rct_scenery_entry *get_footpath_item_entry(sint32 entryIndex) return result; } -rct_scenery_group_entry *get_scenery_group_entry(sint32 entryIndex) +rct_scenery_group_entry *get_scenery_group_entry(int32_t entryIndex) { rct_scenery_group_entry * result = nullptr; auto objMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -362,7 +362,7 @@ rct_scenery_group_entry *get_scenery_group_entry(sint32 entryIndex) return result; } -sint32 get_scenery_id_from_entry_index(uint8 objectType, sint32 entryIndex) +int32_t get_scenery_id_from_entry_index(uint8_t objectType, int32_t entryIndex) { switch (objectType) { case OBJECT_TYPE_SMALL_SCENERY: return entryIndex + SCENERY_SMALL_SCENERY_ID_MIN; @@ -374,7 +374,7 @@ sint32 get_scenery_id_from_entry_index(uint8 objectType, sint32 entryIndex) } } -sint32 wall_entry_get_door_sound(const rct_scenery_entry * wallEntry) +int32_t wall_entry_get_door_sound(const rct_scenery_entry * wallEntry) { return (wallEntry->wall.flags2 & WALL_SCENERY_2_DOOR_SOUND_MASK) >> WALL_SCENERY_2_DOOR_SOUND_SHIFT; } diff --git a/src/openrct2/world/Scenery.h b/src/openrct2/world/Scenery.h index 11513cba6c..622a2961a8 100644 --- a/src/openrct2/world/Scenery.h +++ b/src/openrct2/world/Scenery.h @@ -31,28 +31,28 @@ #pragma pack(push, 1) struct rct_small_scenery_entry { - uint32 flags; // 0x06 - uint8 height; // 0x0A - uint8 tool_id; // 0x0B - sint16 price; // 0x0C - sint16 removal_price; // 0x0E - uint8 *frame_offsets; // 0x10 - uint16 animation_delay; // 0x14 - uint16 animation_mask; // 0x16 - uint16 num_frames; // 0x18 - uint8 scenery_tab_id; // 0x1A + uint32_t flags; // 0x06 + uint8_t height; // 0x0A + uint8_t tool_id; // 0x0B + int16_t price; // 0x0C + int16_t removal_price; // 0x0E + uint8_t *frame_offsets; // 0x10 + uint16_t animation_delay; // 0x14 + uint16_t animation_mask; // 0x16 + uint16_t num_frames; // 0x18 + uint8_t scenery_tab_id; // 0x1A }; #ifdef PLATFORM_32BIT assert_struct_size(rct_small_scenery_entry, 21); #endif struct rct_large_scenery_tile { - sint16 x_offset; - sint16 y_offset; - sint16 z_offset; - uint8 z_clearance; + int16_t x_offset; + int16_t y_offset; + int16_t z_offset; + uint8_t z_clearance; // CCCC WWWW 0SS0 0000 - uint16 flags; + uint16_t flags; }; assert_struct_size(rct_large_scenery_tile, 9); @@ -63,19 +63,19 @@ enum }; struct rct_large_scenery_text_glyph { - uint8 image_offset; - uint8 width; - uint8 height; - uint8 pad_3; + uint8_t image_offset; + uint8_t width; + uint8_t height; + uint8_t pad_3; }; assert_struct_size(rct_large_scenery_text_glyph, 4); struct rct_large_scenery_text { LocationXY16 offset[2]; // 0x0 - uint16 max_width; // 0x8 - uint16 pad_A; // 0xA - uint8 flags; // 0xC - uint8 num_images; // 0xD + uint16_t max_width; // 0x8 + uint16_t pad_A; // 0xA + uint8_t flags; // 0xC + uint8_t num_images; // 0xD rct_large_scenery_text_glyph glyphs[256]; // 0xE }; assert_struct_size(rct_large_scenery_text, 14 + 4 * 256); @@ -86,15 +86,15 @@ enum LARGE_SCENERY_TEXT_FLAGS { }; struct rct_large_scenery_entry { - uint8 tool_id; // 0x06 - uint8 flags; // 0x07 - sint16 price; // 0x08 - sint16 removal_price; // 0x0A + uint8_t tool_id; // 0x06 + uint8_t flags; // 0x07 + int16_t price; // 0x08 + int16_t removal_price; // 0x0A rct_large_scenery_tile* tiles; // 0x0C - uint8 scenery_tab_id; // 0x10 - uint8 scrolling_mode; // 0x11 + uint8_t scenery_tab_id; // 0x10 + uint8_t scrolling_mode; // 0x11 rct_large_scenery_text* text; // 0x12 - uint32 text_image; // 0x16 + uint32_t text_image; // 0x16 }; #ifdef PLATFORM_32BIT assert_struct_size(rct_large_scenery_entry, 20); @@ -109,13 +109,13 @@ enum LARGE_SCENERY_FLAGS { }; struct rct_wall_scenery_entry { - uint8 tool_id; // 0x06 - uint8 flags; // 0x07 - uint8 height; // 0x08 - uint8 flags2; // 0x09 - sint16 price; // 0x0A - uint8 scenery_tab_id; // 0x0C - uint8 scrolling_mode; // 0x0D 0xFF if no scrolling + uint8_t tool_id; // 0x06 + uint8_t flags; // 0x07 + uint8_t height; // 0x08 + uint8_t flags2; // 0x09 + int16_t price; // 0x0A + uint8_t scenery_tab_id; // 0x0C + uint8_t scrolling_mode; // 0x0D 0xFF if no scrolling }; assert_struct_size(rct_wall_scenery_entry, 8); @@ -140,25 +140,25 @@ enum WALL_SCENERY_2_FLAGS { }; struct rct_path_bit_scenery_entry { - uint16 flags; // 0x06 - uint8 draw_type; // 0x08 - uint8 tool_id; // 0x09 - sint16 price; // 0x0A - uint8 scenery_tab_id; // 0x0C + uint16_t flags; // 0x06 + uint8_t draw_type; // 0x08 + uint8_t tool_id; // 0x09 + int16_t price; // 0x0A + uint8_t scenery_tab_id; // 0x0C }; assert_struct_size(rct_path_bit_scenery_entry, 7); struct rct_banner_scenery_entry { - uint8 scrolling_mode; // 0x06 - uint8 flags; // 0x07 - sint16 price; // 0x08 - uint8 scenery_tab_id; // 0x0A + uint8_t scrolling_mode; // 0x06 + uint8_t flags; // 0x07 + int16_t price; // 0x08 + uint8_t scenery_tab_id; // 0x0A }; assert_struct_size(rct_banner_scenery_entry, 5); struct rct_scenery_entry { rct_string_id name; // 0x00 - uint32 image; // 0x02 + uint32_t image; // 0x02 union { rct_small_scenery_entry small_scenery; rct_large_scenery_entry large_scenery; @@ -173,13 +173,13 @@ assert_struct_size(rct_scenery_entry, 6 + 21); struct rct_scenery_group_entry { rct_string_id name; // 0x00 - uint32 image; // 0x02 - uint16 scenery_entries[0x80]; // 0x06 - uint8 entry_count; // 0x106 - uint8 pad_107; - uint8 priority; // 0x108 - uint8 pad_109; - uint32 entertainer_costumes; // 0x10A + uint32_t image; // 0x02 + uint16_t scenery_entries[0x80]; // 0x06 + uint8_t entry_count; // 0x106 + uint8_t pad_107; + uint8_t priority; // 0x108 + uint8_t pad_109; + uint32_t entertainer_costumes; // 0x10A }; assert_struct_size(rct_scenery_group_entry, 14 + 2 * 0x80); #pragma pack(pop) @@ -233,61 +233,61 @@ enum }; #define SCENERY_ENTRIES_BY_TAB 1024 -constexpr auto WINDOW_SCENERY_TAB_SELECTION_UNDEFINED = std::numeric_limits::max(); +constexpr auto WINDOW_SCENERY_TAB_SELECTION_UNDEFINED = std::numeric_limits::max(); -extern uint8 gWindowSceneryActiveTabIndex; -extern uint16 gWindowSceneryTabSelections[20]; -extern uint8 gWindowSceneryClusterEnabled; -extern uint8 gWindowSceneryPaintEnabled; -extern uint8 gWindowSceneryRotation; +extern uint8_t gWindowSceneryActiveTabIndex; +extern uint16_t gWindowSceneryTabSelections[20]; +extern uint8_t gWindowSceneryClusterEnabled; +extern uint8_t gWindowSceneryPaintEnabled; +extern uint8_t gWindowSceneryRotation; extern colour_t gWindowSceneryPrimaryColour; extern colour_t gWindowScenerySecondaryColour; extern colour_t gWindowSceneryTertiaryColour; extern bool gWindowSceneryEyedropperEnabled; extern rct_tile_element *gSceneryTileElement; -extern uint8 gSceneryTileElementType; +extern uint8_t gSceneryTileElementType; extern money32 gSceneryPlaceCost; -extern sint16 gSceneryPlaceObject; -extern sint16 gSceneryPlaceZ; -extern uint8 gSceneryPlacePathType; -extern uint8 gSceneryPlacePathSlope; -extern uint8 gSceneryPlaceRotation; +extern int16_t gSceneryPlaceObject; +extern int16_t gSceneryPlaceZ; +extern uint8_t gSceneryPlacePathType; +extern uint8_t gSceneryPlacePathSlope; +extern uint8_t gSceneryPlaceRotation; -extern uint8 gSceneryGhostType; +extern uint8_t gSceneryGhostType; extern LocationXYZ16 gSceneryGhostPosition; -extern uint32 gSceneryGhostPathObjectType; -extern uint8 gSceneryGhostWallRotation; +extern uint32_t gSceneryGhostPathObjectType; +extern uint8_t gSceneryGhostWallRotation; -extern sint16 gSceneryShiftPressed; -extern sint16 gSceneryShiftPressX; -extern sint16 gSceneryShiftPressY; -extern sint16 gSceneryShiftPressZOffset; +extern int16_t gSceneryShiftPressed; +extern int16_t gSceneryShiftPressX; +extern int16_t gSceneryShiftPressY; +extern int16_t gSceneryShiftPressZOffset; -extern sint16 gSceneryCtrlPressed; -extern sint16 gSceneryCtrlPressZ; +extern int16_t gSceneryCtrlPressed; +extern int16_t gSceneryCtrlPressZ; -extern uint8 gSceneryGroundFlags; +extern uint8_t gSceneryGroundFlags; extern const LocationXY8 ScenerySubTileOffsets[]; extern money32 gClearSceneryCost; void init_scenery(); -void scenery_update_tile(sint32 x, sint32 y); -void scenery_update_age(sint32 x, sint32 y, rct_tile_element *tileElement); +void scenery_update_tile(int32_t x, int32_t y); +void scenery_update_age(int32_t x, int32_t y, rct_tile_element *tileElement); void scenery_set_default_placement_configuration(); void scenery_remove_ghost_tool_placement(); -rct_scenery_entry *get_small_scenery_entry(sint32 entryIndex); -rct_scenery_entry *get_large_scenery_entry(sint32 entryIndex); -rct_scenery_entry *get_wall_entry(sint32 entryIndex); -rct_scenery_entry *get_banner_entry(sint32 entryIndex); -rct_scenery_entry *get_footpath_item_entry(sint32 entryIndex); -rct_scenery_group_entry *get_scenery_group_entry(sint32 entryIndex); +rct_scenery_entry *get_small_scenery_entry(int32_t entryIndex); +rct_scenery_entry *get_large_scenery_entry(int32_t entryIndex); +rct_scenery_entry *get_wall_entry(int32_t entryIndex); +rct_scenery_entry *get_banner_entry(int32_t entryIndex); +rct_scenery_entry *get_footpath_item_entry(int32_t entryIndex); +rct_scenery_group_entry *get_scenery_group_entry(int32_t entryIndex); -sint32 get_scenery_id_from_entry_index(uint8 objectType, sint32 entryIndex); -sint32 wall_entry_get_door_sound(const rct_scenery_entry * wallEntry); +int32_t get_scenery_id_from_entry_index(uint8_t objectType, int32_t entryIndex); +int32_t wall_entry_get_door_sound(const rct_scenery_entry * wallEntry); #endif diff --git a/src/openrct2/world/SmallScenery.cpp b/src/openrct2/world/SmallScenery.cpp index 567627e5ea..308d57b912 100644 --- a/src/openrct2/world/SmallScenery.cpp +++ b/src/openrct2/world/SmallScenery.cpp @@ -20,7 +20,7 @@ #include "MapAnimation.h" #include "Surface.h" -static money32 SmallSceneryRemove(sint16 x, sint16 y, uint8 baseHeight, uint8 quadrant, uint8 sceneryType, uint8 flags) +static money32 SmallSceneryRemove(int16_t x, int16_t y, uint8_t baseHeight, uint8_t quadrant, uint8_t sceneryType, uint8_t flags) { if (!map_is_location_valid({x, y})) { @@ -112,10 +112,10 @@ static money32 SmallSceneryRemove(sint16 x, sint16 y, uint8 baseHeight, uint8 qu return (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : cost; } -static money32 SmallScenerySetColour(sint16 x, sint16 y, uint8 baseHeight, uint8 quadrant, uint8 sceneryType, uint8 primaryColour, uint8 secondaryColour, uint8 flags) +static money32 SmallScenerySetColour(int16_t x, int16_t y, uint8_t baseHeight, uint8_t quadrant, uint8_t sceneryType, uint8_t primaryColour, uint8_t secondaryColour, uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; - sint32 z = baseHeight * 8; + int32_t z = baseHeight * 8; gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; gCommandPosition.z = z; @@ -151,15 +151,15 @@ static money32 SmallScenerySetColour(sint16 x, sint16 y, uint8 baseHeight, uint8 return 0; } -static money32 SmallSceneryPlace(sint16 x, - sint16 y, - sint16 targetHeight, - uint8 quadrant, - uint8 rotation, - uint8 sceneryType, - uint8 primaryColour, - uint8 secondaryColour, - uint8 flags) +static money32 SmallSceneryPlace(int16_t x, + int16_t y, + int16_t targetHeight, + uint8_t quadrant, + uint8_t rotation, + uint8_t sceneryType, + uint8_t primaryColour, + uint8_t secondaryColour, + uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; @@ -170,7 +170,7 @@ static money32 SmallSceneryPlace(sint16 x, { supportsRequired = true; } - sint32 baseHeight = tile_element_height(x, y); + int32_t baseHeight = tile_element_height(x, y); // If on water if (baseHeight & 0xFFFF0000) { @@ -219,8 +219,8 @@ static money32 SmallSceneryPlace(sint16 x, } // Check if sub tile height is any different compared to actual surface tile height - sint32 x2 = x; - sint32 y2 = y; + int32_t x2 = x; + int32_t y2 = y; if (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_FULL_TILE)) { x2 += 16; @@ -268,7 +268,7 @@ static money32 SmallSceneryPlace(sint16 x, if (surfaceElement != nullptr && !gCheatsDisableClearanceChecks && surface_get_water_height(surfaceElement) > 0) { - sint32 water_height = (surface_get_water_height(surfaceElement) * 16) - 1; + int32_t water_height = (surface_get_water_height(surfaceElement) * 16) - 1; if (water_height > targetHeight) { gGameCommandErrorText = STR_CANT_BUILD_THIS_UNDERWATER; @@ -332,10 +332,10 @@ static money32 SmallSceneryPlace(sint16 x, } } - sint32 zLow = targetHeight / 8; - sint32 zHigh = zLow + ceil2(sceneryEntry->small_scenery.height, 8) / 8; - uint8 collisionQuadrants = 0xF; - uint8 blSupports = 0; + int32_t zLow = targetHeight / 8; + int32_t zHigh = zLow + ceil2(sceneryEntry->small_scenery.height, 8) / 8; + uint8_t collisionQuadrants = 0xF; + uint8_t blSupports = 0; if (!(scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_FULL_TILE))) { collisionQuadrants = 1 << (quadrant ^ 2); @@ -404,7 +404,7 @@ static money32 SmallSceneryPlace(sint16 x, rct_tile_element* newElement = tile_element_insert(x / 32, y / 32, zLow, collisionQuadrants); assert(newElement != nullptr); gSceneryTileElement = newElement; - uint8 type = quadrant << 6; + uint8_t type = quadrant << 6; type |= TILE_ELEMENT_TYPE_SMALL_SCENERY; type |= rotation; newElement->type = type; @@ -438,13 +438,13 @@ static money32 SmallSceneryPlace(sint16 x, * rct2: 0x006E0E01 */ void game_command_remove_scenery( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - [[maybe_unused]] sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + [[maybe_unused]] int32_t * ebp) { *ebx = SmallSceneryRemove( *eax & 0xFFFF, @@ -461,13 +461,13 @@ void game_command_remove_scenery( * rct2: 0x006E0F26 */ void game_command_set_scenery_colour( - sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - sint32 * ebp) + int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + int32_t * ebp) { *ebx = SmallScenerySetColour( *eax & 0xFFFF, @@ -485,7 +485,7 @@ void game_command_set_scenery_colour( * * rct2: 0x006E0D6E, 0x006B8D88 */ -sint32 map_place_scenery_clear_func(rct_tile_element** tile_element, sint32 x, sint32 y, uint8 flags, money32* price) +int32_t map_place_scenery_clear_func(rct_tile_element** tile_element, int32_t x, int32_t y, uint8_t flags, money32* price) { if ((*tile_element)->GetType() != TILE_ELEMENT_TYPE_SMALL_SCENERY) return 1; @@ -522,7 +522,7 @@ sint32 map_place_scenery_clear_func(rct_tile_element** tile_element, sint32 x, s * * rct2: 0x006C5A4F, 0x006CDE57, 0x006A6733, 0x0066637E */ -sint32 map_place_non_scenery_clear_func(rct_tile_element** tile_element, sint32 x, sint32 y, uint8 flags, money32* price) +int32_t map_place_non_scenery_clear_func(rct_tile_element** tile_element, int32_t x, int32_t y, uint8_t flags, money32* price) { if ((*tile_element)->GetType() != TILE_ELEMENT_TYPE_SMALL_SCENERY) return 1; @@ -557,7 +557,7 @@ sint32 map_place_non_scenery_clear_func(rct_tile_element** tile_element, sint32 * rct2: 0x006E08F4 */ void game_command_place_scenery( - sint32 * eax, sint32 * ebx, sint32 * ecx, sint32 * edx, [[maybe_unused]] sint32 * esi, sint32 * edi, sint32 * ebp) + int32_t * eax, int32_t * ebx, int32_t * ecx, int32_t * edx, [[maybe_unused]] int32_t * esi, int32_t * edi, int32_t * ebp) { *ebx = SmallSceneryPlace( *eax & 0xFFFF, @@ -572,24 +572,24 @@ void game_command_place_scenery( ); } -sint32 scenery_small_get_primary_colour(const rct_tile_element * tileElement) +int32_t scenery_small_get_primary_colour(const rct_tile_element * tileElement) { return tileElement->properties.scenery.colour_1 & TILE_ELEMENT_COLOUR_MASK; } -sint32 scenery_small_get_secondary_colour(const rct_tile_element * tileElement) +int32_t scenery_small_get_secondary_colour(const rct_tile_element * tileElement) { return tileElement->properties.scenery.colour_2 & TILE_ELEMENT_COLOUR_MASK; } -void scenery_small_set_primary_colour(rct_tile_element * tileElement, uint32 colour) +void scenery_small_set_primary_colour(rct_tile_element * tileElement, uint32_t colour) { assert(colour <= 31); tileElement->properties.scenery.colour_1 &= ~TILE_ELEMENT_COLOUR_MASK; tileElement->properties.scenery.colour_1 |= colour; } -void scenery_small_set_secondary_colour(rct_tile_element * tileElement, uint32 colour) +void scenery_small_set_secondary_colour(rct_tile_element * tileElement, uint32_t colour) { assert(colour <= 31); tileElement->properties.scenery.colour_2 &= ~TILE_ELEMENT_COLOUR_MASK; @@ -606,7 +606,7 @@ void scenery_small_set_supports_needed(rct_tile_element * tileElement) tileElement->properties.scenery.colour_1 |= MAP_ELEM_SMALL_SCENERY_COLOUR_FLAG_NEEDS_SUPPORTS; } -bool scenery_small_entry_has_flag(const rct_scenery_entry * sceneryEntry, uint32 flags) +bool scenery_small_entry_has_flag(const rct_scenery_entry * sceneryEntry, uint32_t flags) { return (bool)(sceneryEntry->small_scenery.flags & flags); } diff --git a/src/openrct2/world/SmallScenery.h b/src/openrct2/world/SmallScenery.h index 0699a9b7fc..e29c3cb7af 100644 --- a/src/openrct2/world/SmallScenery.h +++ b/src/openrct2/world/SmallScenery.h @@ -50,11 +50,11 @@ enum MAP_ELEM_SMALL_SCENERY_COLOUR_FLAG_NEEDS_SUPPORTS = (1 << 5), }; -sint32 scenery_small_get_primary_colour(const rct_tile_element * tileElement); -sint32 scenery_small_get_secondary_colour(const rct_tile_element * tileElement); -void scenery_small_set_primary_colour(rct_tile_element * tileElement, uint32 colour); -void scenery_small_set_secondary_colour(rct_tile_element * tileElement, uint32 colour); +int32_t scenery_small_get_primary_colour(const rct_tile_element * tileElement); +int32_t scenery_small_get_secondary_colour(const rct_tile_element * tileElement); +void scenery_small_set_primary_colour(rct_tile_element * tileElement, uint32_t colour); +void scenery_small_set_secondary_colour(rct_tile_element * tileElement, uint32_t colour); bool scenery_small_get_supports_needed(const rct_tile_element * tileElement); void scenery_small_set_supports_needed(rct_tile_element * tileElement); -bool scenery_small_entry_has_flag(const rct_scenery_entry * sceneryEntry, uint32 flags); +bool scenery_small_entry_has_flag(const rct_scenery_entry * sceneryEntry, uint32_t flags); diff --git a/src/openrct2/world/Sprite.cpp b/src/openrct2/world/Sprite.cpp index 5f9b815d84..2580e5fc3f 100644 --- a/src/openrct2/world/Sprite.cpp +++ b/src/openrct2/world/Sprite.cpp @@ -24,15 +24,15 @@ #include "Fountain.h" #include "Sprite.h" -uint16 gSpriteListHead[6]; -uint16 gSpriteListCount[6]; +uint16_t gSpriteListHead[6]; +uint16_t gSpriteListCount[6]; static rct_sprite _spriteList[MAX_SPRITES]; static bool _spriteFlashingList[MAX_SPRITES]; #define SPATIAL_INDEX_LOCATION_NULL 0x10000 -uint16 gSpriteSpatialIndex[0x10001]; +uint16_t gSpriteSpatialIndex[0x10001]; const rct_string_id litterNames[12] = { STR_LITTER_VOMIT, @@ -52,7 +52,7 @@ const rct_string_id litterNames[12] = { static LocationXYZ16 _spritelocations1[MAX_SPRITES]; static LocationXYZ16 _spritelocations2[MAX_SPRITES]; -static size_t GetSpatialIndexOffset(sint32 x, sint32 y); +static size_t GetSpatialIndexOffset(int32_t x, int32_t y); rct_sprite *try_get_sprite(size_t spriteIndex) { @@ -70,17 +70,17 @@ rct_sprite *get_sprite(size_t sprite_idx) return &_spriteList[sprite_idx]; } -uint16 sprite_get_first_in_quadrant(sint32 x, sint32 y) +uint16_t sprite_get_first_in_quadrant(int32_t x, int32_t y) { - sint32 offset = ((x & 0x1FE0) << 3) | (y >> 5); + int32_t offset = ((x & 0x1FE0) << 3) | (y >> 5); return gSpriteSpatialIndex[offset]; } -static void invalidate_sprite_max_zoom(rct_sprite *sprite, sint32 maxZoom) +static void invalidate_sprite_max_zoom(rct_sprite *sprite, int32_t maxZoom) { if (sprite->unknown.sprite_left == LOCATION_NULL) return; - for (sint32 i = 0; i < MAX_VIEWPORT_COUNT; i++) { + for (int32_t i = 0; i < MAX_VIEWPORT_COUNT; i++) { rct_viewport *viewport = &g_viewport_list[i]; if (viewport->width != 0 && viewport->zoom <= maxZoom) { viewport_invalidate( @@ -132,7 +132,7 @@ void reset_sprite_list() gSavedAge = 0; memset(_spriteList, 0, sizeof(rct_sprite) * MAX_SPRITES); - for (sint32 i = 0; i < NUM_SPRITE_LISTS; i++) { + for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++) { gSpriteListHead[i] = SPRITE_INDEX_NULL; gSpriteListCount[i] = 0; _spriteFlashingList[i] = false; @@ -140,7 +140,7 @@ void reset_sprite_list() rct_sprite* previous_spr = (rct_sprite*)SPRITE_INDEX_NULL; - for (sint32 i = 0; i < MAX_SPRITES; ++i){ + for (int32_t i = 0; i < MAX_SPRITES; ++i){ rct_sprite *spr = get_sprite(i); spr->unknown.sprite_identifier = SPRITE_IDENTIFIER_NULL; spr->unknown.sprite_index = i; @@ -177,22 +177,22 @@ void reset_sprite_spatial_index() rct_sprite *spr = get_sprite(i); if (spr->unknown.sprite_identifier != SPRITE_IDENTIFIER_NULL) { size_t index = GetSpatialIndexOffset(spr->unknown.x, spr->unknown.y); - uint16 nextSpriteId = gSpriteSpatialIndex[index]; + uint16_t nextSpriteId = gSpriteSpatialIndex[index]; gSpriteSpatialIndex[index] = spr->unknown.sprite_index; spr->unknown.next_in_quadrant = nextSpriteId; } } } -static size_t GetSpatialIndexOffset(sint32 x, sint32 y) +static size_t GetSpatialIndexOffset(int32_t x, int32_t y) { size_t index = SPATIAL_INDEX_LOCATION_NULL; if (x != LOCATION_NULL) { x = Math::Clamp(0, x, 0xFFFF); y = Math::Clamp(0, y, 0xFFFF); - sint16 flooredX = floor2(x, 32); - uint8 tileY = y >> 5; + int16_t flooredX = floor2(x, 32); + uint8_t tileY = y >> 5; index = (flooredX << 3) | tileY; } @@ -268,11 +268,11 @@ const char * sprite_checksum() static void sprite_reset(rct_unk_sprite *sprite) { // Need to retain how the sprite is linked in lists - uint8 llto = sprite->linked_list_type_offset; - uint16 next = sprite->next; - uint16 next_in_quadrant = sprite->next_in_quadrant; - uint16 prev = sprite->previous; - uint16 sprite_index = sprite->sprite_index; + uint8_t llto = sprite->linked_list_type_offset; + uint16_t next = sprite->next; + uint16_t next_in_quadrant = sprite->next_in_quadrant; + uint16_t prev = sprite->previous; + uint16_t sprite_index = sprite->sprite_index; _spriteFlashingList[sprite_index] = false; memset(sprite, 0, sizeof(rct_sprite)); @@ -292,7 +292,7 @@ static void sprite_reset(rct_unk_sprite *sprite) void sprite_clear_all_unused() { rct_unk_sprite *sprite; - uint16 spriteIndex, nextSpriteIndex; + uint16_t spriteIndex, nextSpriteIndex; spriteIndex = gSpriteListHead[SPRITE_LIST_NULL]; while (spriteIndex != SPRITE_INDEX_NULL) { @@ -318,12 +318,12 @@ void sprite_clear_all_unused() * rct2: 0x0069EC6B * bl: if bl & 2 > 0, the sprite ends up in the MISC linked list. */ -rct_sprite *create_sprite(uint8 bl) +rct_sprite *create_sprite(uint8_t bl) { size_t linkedListTypeOffset = SPRITE_LIST_UNKNOWN * 2; if ((bl & 2) != 0) { // 69EC96; - uint16 cx = 0x12C - gSpriteListCount[SPRITE_LIST_MISC]; + uint16_t cx = 0x12C - gSpriteListCount[SPRITE_LIST_MISC]; if (cx >= gSpriteListCount[SPRITE_LIST_NULL]) { return nullptr; } @@ -334,7 +334,7 @@ rct_sprite *create_sprite(uint8 bl) rct_unk_sprite *sprite = &(get_sprite(gSpriteListHead[SPRITE_LIST_NULL]))->unknown; - move_sprite_to_list((rct_sprite *)sprite, (uint8)linkedListTypeOffset); + move_sprite_to_list((rct_sprite *)sprite, (uint8_t)linkedListTypeOffset); // Need to reset all sprite data, as the uninitialised values // may contain garbage and cause a desync later on. @@ -360,15 +360,15 @@ rct_sprite *create_sprite(uint8 bl) * rct2: 0x0069ED0B * This function moves a sprite to the specified sprite linked list. * There are 5/6 of those, and cl specifies a pointer offset - * of the desired linked list in a uint16 array. Known valid values are + * of the desired linked list in a uint16_t array. Known valid values are * 2, 4, 6, 8 or 10 (SPRITE_LIST_... * 2) */ -void move_sprite_to_list(rct_sprite *sprite, uint8 newListOffset) +void move_sprite_to_list(rct_sprite *sprite, uint8_t newListOffset) { rct_unk_sprite *unkSprite = &sprite->unknown; - uint8 oldListOffset = unkSprite->linked_list_type_offset; - sint32 oldList = oldListOffset >> 1; - sint32 newList = newListOffset >> 1; + uint8_t oldListOffset = unkSprite->linked_list_type_offset; + int32_t oldList = oldListOffset >> 1; + int32_t newList = newListOffset >> 1; // No need to move if the sprite is already in the desired list if (oldListOffset == newListOffset) { @@ -436,7 +436,7 @@ static void sprite_steam_particle_update(rct_steam_particle *steam) * * rct2: 0x0067363D */ -void sprite_misc_explosion_cloud_create(sint32 x, sint32 y, sint32 z) +void sprite_misc_explosion_cloud_create(int32_t x, int32_t y, int32_t z) { rct_unk_sprite *sprite = (rct_unk_sprite*)create_sprite(2); if (sprite != nullptr) { @@ -467,7 +467,7 @@ static void sprite_misc_explosion_cloud_update(rct_sprite * sprite) * * rct2: 0x0067366B */ -void sprite_misc_explosion_flare_create(sint32 x, sint32 y, sint32 z) +void sprite_misc_explosion_flare_create(int32_t x, int32_t y, int32_t z) { rct_unk_sprite *sprite = (rct_unk_sprite*)create_sprite(2); if (sprite != nullptr) { @@ -539,7 +539,7 @@ static void sprite_misc_update(rct_sprite *sprite) void sprite_misc_update_all() { rct_sprite *sprite; - uint16 spriteIndex; + uint16_t spriteIndex; spriteIndex = gSpriteListHead[SPRITE_LIST_MISC]; while (spriteIndex != SPRITE_INDEX_NULL) { @@ -558,7 +558,7 @@ void sprite_misc_update_all() * @param z (dx) * @param sprite (esi) */ -void sprite_move(sint16 x, sint16 y, sint16 z, rct_sprite *sprite) +void sprite_move(int16_t x, int16_t y, int16_t z, rct_sprite *sprite) { if (x < 0 || y < 0 || x > 0x1FFF || y > 0x1FFF) { x = LOCATION_NULL; @@ -567,7 +567,7 @@ void sprite_move(sint16 x, sint16 y, sint16 z, rct_sprite *sprite) size_t newIndex = GetSpatialIndexOffset(x, y); size_t currentIndex = GetSpatialIndexOffset(sprite->unknown.x, sprite->unknown.y); if (newIndex != currentIndex) { - uint16 *spriteIndex = &gSpriteSpatialIndex[currentIndex]; + uint16_t *spriteIndex = &gSpriteSpatialIndex[currentIndex]; if (*spriteIndex != SPRITE_INDEX_NULL) { rct_sprite *sprite2 = get_sprite(*spriteIndex); while (sprite != sprite2) { @@ -580,7 +580,7 @@ void sprite_move(sint16 x, sint16 y, sint16 z, rct_sprite *sprite) } *spriteIndex = sprite->unknown.next_in_quadrant; - sint32 tempSpriteIndex = gSpriteSpatialIndex[newIndex]; + int32_t tempSpriteIndex = gSpriteSpatialIndex[newIndex]; gSpriteSpatialIndex[newIndex] = sprite->unknown.sprite_index; sprite->unknown.next_in_quadrant = tempSpriteIndex; } @@ -595,8 +595,8 @@ void sprite_move(sint16 x, sint16 y, sint16 z, rct_sprite *sprite) } } -void sprite_set_coordinates(sint16 x, sint16 y, sint16 z, rct_sprite *sprite){ - sint16 new_x = x, new_y = y, start_x = x; +void sprite_set_coordinates(int16_t x, int16_t y, int16_t z, rct_sprite *sprite){ + int16_t new_x = x, new_y = y, start_x = x; switch (get_current_rotation()){ case 0: new_x = new_y - new_x; @@ -637,7 +637,7 @@ void sprite_remove(rct_sprite *sprite) _spriteFlashingList[sprite->unknown.sprite_index] = false; size_t quadrantIndex = GetSpatialIndexOffset(sprite->unknown.x, sprite->unknown.y); - uint16 *spriteIndex = &gSpriteSpatialIndex[quadrantIndex]; + uint16_t *spriteIndex = &gSpriteSpatialIndex[quadrantIndex]; rct_sprite *quadrantSprite; while (*spriteIndex != SPRITE_INDEX_NULL && (quadrantSprite = get_sprite(*spriteIndex)) != sprite) { @@ -646,7 +646,7 @@ void sprite_remove(rct_sprite *sprite) *spriteIndex = sprite->unknown.next_in_quadrant; } -static bool litter_can_be_at(sint32 x, sint32 y, sint32 z) +static bool litter_can_be_at(int32_t x, int32_t y, int32_t z) { rct_tile_element *tileElement; @@ -658,7 +658,7 @@ static bool litter_can_be_at(sint32 x, sint32 y, sint32 z) if (tileElement->GetType() != TILE_ELEMENT_TYPE_PATH) continue; - sint32 pathZ = tileElement->base_height * 8; + int32_t pathZ = tileElement->base_height * 8; if (pathZ < z || pathZ >= z + 32) continue; @@ -674,7 +674,7 @@ static bool litter_can_be_at(sint32 x, sint32 y, sint32 z) * * rct2: 0x0067375D */ -void litter_create(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type) +void litter_create(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t type) { if (gCheatsDisableLittering) return; @@ -687,8 +687,8 @@ void litter_create(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type) if (gSpriteListCount[SPRITE_LIST_LITTER] >= 500) { rct_litter *newestLitter = nullptr; - uint32 newestLitterCreationTick = 0; - for (uint16 nextSpriteIndex, spriteIndex = gSpriteListHead[SPRITE_LIST_LITTER]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex) { + uint32_t newestLitterCreationTick = 0; + for (uint16_t nextSpriteIndex, spriteIndex = gSpriteListHead[SPRITE_LIST_LITTER]; spriteIndex != SPRITE_INDEX_NULL; spriteIndex = nextSpriteIndex) { rct_litter *litter = &get_sprite(spriteIndex)->litter; nextSpriteIndex = litter->next; if (newestLitterCreationTick <= litter->creationTick) { @@ -723,12 +723,12 @@ void litter_create(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type) * * rct2: 0x006738E1 */ -void litter_remove_at(sint32 x, sint32 y, sint32 z) +void litter_remove_at(int32_t x, int32_t y, int32_t z) { - uint16 spriteIndex = sprite_get_first_in_quadrant(x, y); + uint16_t spriteIndex = sprite_get_first_in_quadrant(x, y); while (spriteIndex != SPRITE_INDEX_NULL) { rct_sprite *sprite = get_sprite(spriteIndex); - uint16 nextSpriteIndex = sprite->unknown.next_in_quadrant; + uint16_t nextSpriteIndex = sprite->unknown.next_in_quadrant; if (sprite->unknown.linked_list_type_offset == SPRITE_LIST_LITTER * 2) { rct_litter *litter = &sprite->litter; @@ -759,7 +759,7 @@ static bool sprite_should_tween(rct_sprite *sprite) static void store_sprite_locations(LocationXYZ16 * sprite_locations) { - for (uint16 i = 0; i < MAX_SPRITES; i++) { + for (uint16_t i = 0; i < MAX_SPRITES; i++) { // skip going through `get_sprite` to not get stalled on assert, // this can get very expensive for busy parks with uncap FPS option on const rct_sprite *sprite = &_spriteList[i]; @@ -783,7 +783,7 @@ void sprite_position_tween_all(float alpha) { const float inv = (1.0f - alpha); - for (uint16 i = 0; i < MAX_SPRITES; i++) { + for (uint16_t i = 0; i < MAX_SPRITES; i++) { rct_sprite * sprite = get_sprite(i); if (sprite_should_tween(sprite)) { LocationXYZ16 posA = _spritelocations1[i]; @@ -807,7 +807,7 @@ void sprite_position_tween_all(float alpha) */ void sprite_position_tween_restore() { - for (uint16 i = 0; i < MAX_SPRITES; i++) { + for (uint16_t i = 0; i < MAX_SPRITES; i++) { rct_sprite * sprite = get_sprite(i); if (sprite_should_tween(sprite)) { invalidate_sprite_2(sprite); @@ -820,7 +820,7 @@ void sprite_position_tween_restore() void sprite_position_tween_reset() { - for (uint16 i = 0; i < MAX_SPRITES; i++) { + for (uint16_t i = 0; i < MAX_SPRITES; i++) { rct_sprite * sprite = get_sprite(i); _spritelocations1[i].x = _spritelocations2[i].x = sprite->unknown.x; @@ -843,7 +843,7 @@ bool sprite_get_flashing(rct_sprite *sprite) return _spriteFlashingList[sprite->unknown.sprite_index]; } -static rct_sprite * find_sprite_list_cycle(uint16 sprite_idx) +static rct_sprite * find_sprite_list_cycle(uint16_t sprite_idx) { if (sprite_idx == SPRITE_INDEX_NULL) { @@ -878,7 +878,7 @@ static rct_sprite * find_sprite_list_cycle(uint16 sprite_idx) return cycle_start; } -static rct_sprite * find_sprite_quadrant_cycle(uint16 sprite_idx) +static rct_sprite * find_sprite_quadrant_cycle(uint16_t sprite_idx) { if (sprite_idx == SPRITE_INDEX_NULL) { @@ -913,9 +913,9 @@ static rct_sprite * find_sprite_quadrant_cycle(uint16 sprite_idx) return cycle_start; } -static bool index_is_in_list(uint16 index, enum SPRITE_LIST sl) +static bool index_is_in_list(uint16_t index, enum SPRITE_LIST sl) { - uint16 sprite_index = gSpriteListHead[sl]; + uint16_t sprite_index = gSpriteListHead[sl]; while (sprite_index != SPRITE_INDEX_NULL) { if (sprite_index == index) @@ -927,9 +927,9 @@ static bool index_is_in_list(uint16 index, enum SPRITE_LIST sl) return false; } -sint32 check_for_sprite_list_cycles(bool fix) +int32_t check_for_sprite_list_cycles(bool fix) { - for (sint32 i = 0; i < NUM_SPRITE_LISTS; i++) { + for (int32_t i = 0; i < NUM_SPRITE_LISTS; i++) { rct_sprite * cycle_start = find_sprite_list_cycle(gSpriteListHead[i]); if (cycle_start != nullptr) { @@ -940,7 +940,7 @@ sint32 check_for_sprite_list_cycles(bool fix) get_sprite(gSpriteListHead[i])->unknown.previous = SPRITE_INDEX_NULL; // Store the leftover part of cycle to be fixed - uint16 cycle_next = cycle_start->unknown.next; + uint16_t cycle_next = cycle_start->unknown.next; // Break the cycle cycle_start->unknown.next = SPRITE_INDEX_NULL; @@ -970,11 +970,11 @@ sint32 check_for_sprite_list_cycles(bool fix) * * @return count of disjoint sprites found */ -sint32 fix_disjoint_sprites() +int32_t fix_disjoint_sprites() { // Find reachable sprites bool reachable[MAX_SPRITES] = { false }; - uint16 sprite_idx = gSpriteListHead[SPRITE_LIST_NULL]; + uint16_t sprite_idx = gSpriteListHead[SPRITE_LIST_NULL]; rct_sprite * null_list_tail = nullptr; while (sprite_idx != SPRITE_INDEX_NULL) { @@ -984,7 +984,7 @@ sint32 fix_disjoint_sprites() sprite_idx = null_list_tail->unknown.next; } - sint32 count = 0; + int32_t count = 0; // Find all null sprites for (sprite_idx = 0; sprite_idx < MAX_SPRITES; sprite_idx++) @@ -1009,16 +1009,16 @@ sint32 fix_disjoint_sprites() return count; } -sint32 check_for_spatial_index_cycles(bool fix) +int32_t check_for_spatial_index_cycles(bool fix) { - for (sint32 i = 0; i < SPATIAL_INDEX_LOCATION_NULL; i++) { + for (int32_t i = 0; i < SPATIAL_INDEX_LOCATION_NULL; i++) { rct_sprite * cycle_start = find_sprite_quadrant_cycle(gSpriteSpatialIndex[i]); if (cycle_start != nullptr) { if (fix) { // Store the leftover part of cycle to be fixed - uint16 cycle_next = cycle_start->unknown.next_in_quadrant; + uint16_t cycle_next = cycle_start->unknown.next_in_quadrant; // Break the cycle cycle_start->unknown.next_in_quadrant = SPRITE_INDEX_NULL; diff --git a/src/openrct2/world/Sprite.h b/src/openrct2/world/Sprite.h index a02f0e76aa..b0ec7a6ce4 100644 --- a/src/openrct2/world/Sprite.h +++ b/src/openrct2/world/Sprite.h @@ -37,78 +37,78 @@ enum SPRITE_LIST { #pragma pack(push, 1) struct rct_unk_sprite { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; // 0x1e - uint8 pad_1F[3]; + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; // 0x1e + uint8_t pad_1F[3]; rct_string_id name_string_idx; // 0x22 - uint16 pad_24; - uint16 frame; // 0x26 + uint16_t pad_24; + uint16_t frame; // 0x26 }; assert_struct_size(rct_unk_sprite, 0x28); struct rct_litter { - uint8 sprite_identifier; // 0x00 - uint8 type; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 - uint8 sprite_width; // 0x14 - uint8 sprite_height_positive; // 0x15 - uint8 pad_16[8]; - uint8 sprite_direction; // 0x1E - uint8 pad_1F[5]; - uint32 creationTick; // 0x24 + uint8_t sprite_identifier; // 0x00 + uint8_t type; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 + uint8_t sprite_width; // 0x14 + uint8_t sprite_height_positive; // 0x15 + uint8_t pad_16[8]; + uint8_t sprite_direction; // 0x1E + uint8_t pad_1F[5]; + uint32_t creationTick; // 0x24 }; assert_struct_size(rct_litter, 0x28); struct rct_balloon { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 - uint8 sprite_width; // 0x14 - uint8 sprite_height_positive; // 0x15 - uint8 pad_16[0xE]; - uint16 popped; // 0x24 - uint8 time_to_move; // 0x26 - uint8 frame; // 0x27 - uint8 pad_28[4]; - uint8 colour; // 0x2C + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 + uint8_t sprite_width; // 0x14 + uint8_t sprite_height_positive; // 0x15 + uint8_t pad_16[0xE]; + uint16_t popped; // 0x24 + uint8_t time_to_move; // 0x26 + uint8_t frame; // 0x27 + uint8_t pad_28[4]; + uint8_t colour; // 0x2C void Update(); void Pop(); @@ -117,195 +117,195 @@ struct rct_balloon { assert_struct_size(rct_balloon, 0x2D); struct rct_duck { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 - uint8 sprite_width; // 0x14 - uint8 sprite_height_positive; // 0x15 - uint8 pad_16[0x8]; - uint8 sprite_direction; // 0x1E - uint8 pad_1F[0x7]; - uint16 frame; - uint8 pad_28[0x8]; - sint16 target_x; // 0x30 - sint16 target_y; // 0x32 - uint8 pad_34[0x14]; - uint8 state; // 0x48 + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 + uint8_t sprite_width; // 0x14 + uint8_t sprite_height_positive; // 0x15 + uint8_t pad_16[0x8]; + uint8_t sprite_direction; // 0x1E + uint8_t pad_1F[0x7]; + uint16_t frame; + uint8_t pad_28[0x8]; + int16_t target_x; // 0x30 + int16_t target_y; // 0x32 + uint8_t pad_34[0x14]; + uint8_t state; // 0x48 void UpdateFlyToWater(); void UpdateSwim(); void UpdateDrink(); void UpdateDoubleDrink(); void UpdateFlyAway(); - uint32 GetFrameImage(sint32 direction) const; + uint32_t GetFrameImage(int32_t direction) const; void Invalidate(); void Remove(); - void MoveTo(sint16 x, sint16 y, sint16 z); + void MoveTo(int16_t x, int16_t y, int16_t z); }; assert_struct_size(rct_duck, 0x49); struct rct_jumping_fountain { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... - uint8 sprite_height_negative; - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 - uint8 sprite_width; // 0x14 - uint8 sprite_height_positive; // 0x15 - uint8 pad_16[0x8]; - uint8 sprite_direction; // 0x1E - uint8 pad_1F[0x7]; - uint8 num_ticks_alive; // 0x26 - uint8 frame; // 0x27 - uint8 pad_28[0x7]; // 0x28 Originally var_2E was set to direction but it was unused. - uint8 fountain_flags; // 0x2F - sint16 target_x; // 0x30 - sint16 target_y; // 0x32 - uint8 pad_34[0x12]; - uint16 iteration; // 0x46 + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_height_negative; + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 + uint8_t sprite_width; // 0x14 + uint8_t sprite_height_positive; // 0x15 + uint8_t pad_16[0x8]; + uint8_t sprite_direction; // 0x1E + uint8_t pad_1F[0x7]; + uint8_t num_ticks_alive; // 0x26 + uint8_t frame; // 0x27 + uint8_t pad_28[0x7]; // 0x28 Originally var_2E was set to direction but it was unused. + uint8_t fountain_flags; // 0x2F + int16_t target_x; // 0x30 + int16_t target_y; // 0x32 + uint8_t pad_34[0x12]; + uint16_t iteration; // 0x46 }; assert_struct_size(rct_jumping_fountain, 0x48); struct rct_money_effect { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... - uint8 sprite_height_negative; - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 - uint8 sprite_width; // 0x14 - uint8 sprite_height_positive; // 0x15 - uint8 pad_16[0xE]; - uint16 move_delay; // 0x24 - uint8 num_movements; // 0x26 - uint8 vertical; + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_height_negative; + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 + uint8_t sprite_width; // 0x14 + uint8_t sprite_height_positive; // 0x15 + uint8_t pad_16[0xE]; + uint16_t move_delay; // 0x24 + uint8_t num_movements; // 0x26 + uint8_t vertical; money32 value; // 0x28 - uint8 pad_2C[0x18]; - sint16 offset_x; // 0x44 - uint16 wiggle; // 0x46 + uint8_t pad_2C[0x18]; + int16_t offset_x; // 0x44 + uint16_t wiggle; // 0x46 }; assert_struct_size(rct_money_effect, 0x48); struct rct_crashed_vehicle_particle { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; //direction of sprite? 0x1e - uint8 pad_1F[3]; // 0x1f - uint16 name_string_idx; // 0x22 - uint16 time_to_live; // 0x24 - uint16 frame; // 0x26 - uint8 pad_28[4]; - uint8 colour[2]; - uint16 crashed_sprite_base; // 0x2E - sint16 velocity_x; // 0x30 - sint16 velocity_y; // 0x32 - sint16 velocity_z; // 0x34 - uint16 pad_36; - sint32 acceleration_x; // 0x38 - sint32 acceleration_y; // 0x3C - sint32 acceleration_z; // 0x40 + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; //direction of sprite? 0x1e + uint8_t pad_1F[3]; // 0x1f + uint16_t name_string_idx; // 0x22 + uint16_t time_to_live; // 0x24 + uint16_t frame; // 0x26 + uint8_t pad_28[4]; + uint8_t colour[2]; + uint16_t crashed_sprite_base; // 0x2E + int16_t velocity_x; // 0x30 + int16_t velocity_y; // 0x32 + int16_t velocity_z; // 0x34 + uint16_t pad_36; + int32_t acceleration_x; // 0x38 + int32_t acceleration_y; // 0x3C + int32_t acceleration_z; // 0x40 }; assert_struct_size(rct_crashed_vehicle_particle, 0x44); struct rct_crash_splash { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; //direction of sprite? 0x1e - uint8 pad_1F[3]; // 0x1f - uint16 name_string_idx; // 0x22 - uint16 pad_24; - uint16 frame; // 0x26 + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; //direction of sprite? 0x1e + uint8_t pad_1F[3]; // 0x1f + uint16_t name_string_idx; // 0x22 + uint16_t pad_24; + uint16_t frame; // 0x26 }; assert_struct_size(rct_crash_splash, 0x28); struct rct_steam_particle { - uint8 sprite_identifier; // 0x00 - uint8 misc_identifier; // 0x01 - uint16 next_in_quadrant; // 0x02 - uint16 next; // 0x04 - uint16 previous; // 0x06 - uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... + uint8_t sprite_identifier; // 0x00 + uint8_t misc_identifier; // 0x01 + uint16_t next_in_quadrant; // 0x02 + uint16_t next; // 0x04 + uint16_t previous; // 0x06 + uint8_t linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_... // Height from centre of sprite to bottom - uint8 sprite_height_negative; // 0x09 - uint16 sprite_index; // 0x0A - uint16 flags; // 0x0C - sint16 x; // 0x0E - sint16 y; // 0x10 - sint16 z; // 0x12 + uint8_t sprite_height_negative; // 0x09 + uint16_t sprite_index; // 0x0A + uint16_t flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 // Width from centre of sprite to edge - uint8 sprite_width; // 0x14 + uint8_t sprite_width; // 0x14 // Height from centre of sprite to top - uint8 sprite_height_positive; // 0x15 - sint16 sprite_left; // 0x16 - sint16 sprite_top; // 0x18 - sint16 sprite_right; // 0x1A - sint16 sprite_bottom; // 0x1C - uint8 sprite_direction; // 0x1E - uint8 pad_1F[3]; // 0x1F - uint16 name_string_idx; // 0x22 - uint16 time_to_move; // 0x24 Moves +1 z every 3 ticks after intitial 4 ticks - uint16 frame; // 0x26 + uint8_t sprite_height_positive; // 0x15 + int16_t sprite_left; // 0x16 + int16_t sprite_top; // 0x18 + int16_t sprite_right; // 0x1A + int16_t sprite_bottom; // 0x1C + uint8_t sprite_direction; // 0x1E + uint8_t pad_1F[3]; // 0x1F + uint16_t name_string_idx; // 0x22 + uint16_t time_to_move; // 0x24 Moves +1 z every 3 ticks after intitial 4 ticks + uint16_t frame; // 0x26 }; assert_struct_size(rct_steam_particle, 0x28); @@ -314,7 +314,7 @@ assert_struct_size(rct_steam_particle, 0x28); * size: 0x0100 */ union rct_sprite { - uint8 pad_00[0x100]; + uint8_t pad_00[0x100]; rct_unk_sprite unknown; rct_peep peep; rct_litter litter; @@ -375,30 +375,30 @@ enum { rct_sprite *try_get_sprite(size_t spriteIndex); rct_sprite *get_sprite(size_t sprite_idx); -extern uint16 gSpriteListHead[6]; -extern uint16 gSpriteListCount[6]; -extern uint16 gSpriteSpatialIndex[0x10001]; +extern uint16_t gSpriteListHead[6]; +extern uint16_t gSpriteListCount[6]; +extern uint16_t gSpriteSpatialIndex[0x10001]; extern const rct_string_id litterNames[12]; -rct_sprite *create_sprite(uint8 bl); +rct_sprite *create_sprite(uint8_t bl); void reset_sprite_list(); void reset_sprite_spatial_index(); void sprite_clear_all_unused(); -void move_sprite_to_list(rct_sprite *sprite, uint8 cl); +void move_sprite_to_list(rct_sprite *sprite, uint8_t cl); void sprite_misc_update_all(); -void sprite_move(sint16 x, sint16 y, sint16 z, rct_sprite* sprite); -void sprite_set_coordinates(sint16 x, sint16 y, sint16 z, rct_sprite *sprite); +void sprite_move(int16_t x, int16_t y, int16_t z, rct_sprite* sprite); +void sprite_set_coordinates(int16_t x, int16_t y, int16_t z, rct_sprite *sprite); void invalidate_sprite_0(rct_sprite* sprite); void invalidate_sprite_1(rct_sprite *sprite); void invalidate_sprite_2(rct_sprite *sprite); void sprite_remove(rct_sprite *sprite); -void litter_create(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 type); -void litter_remove_at(sint32 x, sint32 y, sint32 z); -void sprite_misc_explosion_cloud_create(sint32 x, sint32 y, sint32 z); -void sprite_misc_explosion_flare_create(sint32 x, sint32 y, sint32 z); -uint16 sprite_get_first_in_quadrant(sint32 x, sint32 y); +void litter_create(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t type); +void litter_remove_at(int32_t x, int32_t y, int32_t z); +void sprite_misc_explosion_cloud_create(int32_t x, int32_t y, int32_t z); +void sprite_misc_explosion_flare_create(int32_t x, int32_t y, int32_t z); +uint16_t sprite_get_first_in_quadrant(int32_t x, int32_t y); void sprite_position_tween_store_a(); void sprite_position_tween_store_b(); void sprite_position_tween_all(float nudge); @@ -408,41 +408,41 @@ void sprite_position_tween_reset(); /////////////////////////////////////////////////////////////// // Balloon /////////////////////////////////////////////////////////////// -void create_balloon(sint32 x, sint32 y, sint32 z, sint32 colour, bool isPopped); +void create_balloon(int32_t x, int32_t y, int32_t z, int32_t colour, bool isPopped); void balloon_update(rct_balloon *balloon); -void game_command_balloon_press(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp); +void game_command_balloon_press(int32_t* eax, int32_t* ebx, int32_t* ecx, int32_t* edx, int32_t* esi, int32_t* edi, int32_t* ebp); /////////////////////////////////////////////////////////////// // Duck /////////////////////////////////////////////////////////////// -void create_duck(sint32 targetX, sint32 targetY); +void create_duck(int32_t targetX, int32_t targetY); void duck_update(rct_duck *duck); void duck_press(rct_duck *duck); void duck_remove_all(); -uint32 duck_get_frame_image(const rct_duck * duck, sint32 direction); +uint32_t duck_get_frame_image(const rct_duck * duck, int32_t direction); /////////////////////////////////////////////////////////////// // Money effect /////////////////////////////////////////////////////////////// void money_effect_create(money32 value); -void money_effect_create_at(money32 value, sint32 x, sint32 y, sint32 z, bool vertical); +void money_effect_create_at(money32 value, int32_t x, int32_t y, int32_t z, bool vertical); void money_effect_update(rct_money_effect *moneyEffect); rct_string_id money_effect_get_string_id(const rct_money_effect * sprite, money32 * outValue); /////////////////////////////////////////////////////////////// // Crash particles /////////////////////////////////////////////////////////////// -void crashed_vehicle_particle_create(rct_vehicle_colour colours, sint32 x, sint32 y, sint32 z); +void crashed_vehicle_particle_create(rct_vehicle_colour colours, int32_t x, int32_t y, int32_t z); void crashed_vehicle_particle_update(rct_crashed_vehicle_particle *particle); -void crash_splash_create(sint32 x, sint32 y, sint32 z); +void crash_splash_create(int32_t x, int32_t y, int32_t z); void crash_splash_update(rct_crash_splash *splash); const char *sprite_checksum(); void sprite_set_flashing(rct_sprite *sprite, bool flashing); bool sprite_get_flashing(rct_sprite *sprite); -sint32 check_for_sprite_list_cycles(bool fix); -sint32 check_for_spatial_index_cycles(bool fix); -sint32 fix_disjoint_sprites(); +int32_t check_for_sprite_list_cycles(bool fix); +int32_t check_for_spatial_index_cycles(bool fix); +int32_t fix_disjoint_sprites(); #endif diff --git a/src/openrct2/world/Surface.cpp b/src/openrct2/world/Surface.cpp index 7c7af159b5..9ea378fac5 100644 --- a/src/openrct2/world/Surface.cpp +++ b/src/openrct2/world/Surface.cpp @@ -9,23 +9,23 @@ #include "Surface.h" -sint32 surface_get_terrain(const rct_tile_element * element) +int32_t surface_get_terrain(const rct_tile_element * element) { - sint32 terrain = (element->properties.surface.terrain >> 5) & 7; + int32_t terrain = (element->properties.surface.terrain >> 5) & 7; if (element->type & 1) terrain |= (1 << 3); return terrain; } -sint32 surface_get_terrain_edge(const rct_tile_element * element) +int32_t surface_get_terrain_edge(const rct_tile_element * element) { - sint32 terrain_edge = (element->properties.surface.slope >> 5) & 7; + int32_t terrain_edge = (element->properties.surface.slope >> 5) & 7; if (element->type & 128) terrain_edge |= (1 << 3); return terrain_edge; } -void surface_set_terrain(rct_tile_element * element, sint32 terrain) +void surface_set_terrain(rct_tile_element * element, int32_t terrain) { // Bit 3 for terrain is stored in element.type bit 0 if (terrain & 8) @@ -38,7 +38,7 @@ void surface_set_terrain(rct_tile_element * element, sint32 terrain) element->properties.surface.terrain |= (terrain & 7) << 5; } -void surface_set_terrain_edge(rct_tile_element * element, sint32 terrain) +void surface_set_terrain_edge(rct_tile_element * element, int32_t terrain) { // Bit 3 for terrain is stored in element.type bit 7 if (terrain & 8) @@ -51,7 +51,7 @@ void surface_set_terrain_edge(rct_tile_element * element, sint32 terrain) element->properties.surface.slope |= (terrain & 7) << 5; } -sint32 surface_get_water_height(const rct_tile_element * tileElement) +int32_t surface_get_water_height(const rct_tile_element * tileElement) { return tileElement->properties.surface.terrain & TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK; } diff --git a/src/openrct2/world/Surface.h b/src/openrct2/world/Surface.h index b38bc14d6d..0497481e3b 100644 --- a/src/openrct2/world/Surface.h +++ b/src/openrct2/world/Surface.h @@ -105,10 +105,10 @@ enum { #define TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK 0x1F // in rct_tile_element.properties.surface.terrain #define TILE_ELEMENT_SURFACE_TERRAIN_MASK 0xE0 // in rct_tile_element.properties.surface.terrain -sint32 surface_get_terrain(const rct_tile_element * element); -sint32 surface_get_terrain_edge(const rct_tile_element * element); -void surface_set_terrain(rct_tile_element * element, sint32 terrain); -void surface_set_terrain_edge(rct_tile_element * element, sint32 terrain); +int32_t surface_get_terrain(const rct_tile_element * element); +int32_t surface_get_terrain_edge(const rct_tile_element * element); +void surface_set_terrain(rct_tile_element * element, int32_t terrain); +void surface_set_terrain_edge(rct_tile_element * element, int32_t terrain); // ~Oli414: Needs to renamed. This function is specific to the surface object. -sint32 surface_get_water_height(const rct_tile_element * tileElement); +int32_t surface_get_water_height(const rct_tile_element * tileElement); diff --git a/src/openrct2/world/TileElement.cpp b/src/openrct2/world/TileElement.cpp index d5647bf047..dfe88fd473 100644 --- a/src/openrct2/world/TileElement.cpp +++ b/src/openrct2/world/TileElement.cpp @@ -16,29 +16,29 @@ #include "TileElement.h" #include "Scenery.h" -uint8 rct_tile_element::GetType() const +uint8_t rct_tile_element::GetType() const { return this->type & TILE_ELEMENT_TYPE_MASK; } -void rct_tile_element::SetType(uint8 newType) +void rct_tile_element::SetType(uint8_t newType) { this->type &= ~TILE_ELEMENT_TYPE_MASK; this->type |= (newType & TILE_ELEMENT_TYPE_MASK); } -uint8 rct_tile_element::GetDirection() const +uint8_t rct_tile_element::GetDirection() const { return this->type & TILE_ELEMENT_DIRECTION_MASK; } -void rct_tile_element::SetDirection(uint8 direction) +void rct_tile_element::SetDirection(uint8_t direction) { this->type &= ~TILE_ELEMENT_DIRECTION_MASK; this->type |= (direction & TILE_ELEMENT_DIRECTION_MASK); } -uint8 rct_tile_element::GetDirectionWithOffset(uint8 offset) const +uint8_t rct_tile_element::GetDirectionWithOffset(uint8_t offset) const { return ((this->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK; } @@ -53,17 +53,17 @@ bool rct_tile_element::IsGhost() const return (this->flags & TILE_ELEMENT_FLAG_GHOST) != 0; } -uint8 rct_tile_element::GetSceneryQuadrant() const +uint8_t rct_tile_element::GetSceneryQuadrant() const { return (this->type & TILE_ELEMENT_QUADRANT_MASK) >> 6; } -sint32 tile_element_get_direction(const rct_tile_element * element) +int32_t tile_element_get_direction(const rct_tile_element * element) { return element->GetDirection(); } -sint32 tile_element_get_direction_with_offset(const rct_tile_element * element, uint8 offset) +int32_t tile_element_get_direction_with_offset(const rct_tile_element * element, uint8_t offset) { return element->GetDirectionWithOffset(offset); } @@ -141,7 +141,7 @@ void tile_element_remove_banner_entry(rct_tile_element * tileElement) } } -uint8 tile_element_get_ride_index(const rct_tile_element * tileElement) +uint8_t tile_element_get_ride_index(const rct_tile_element * tileElement) { switch (tileElement->GetType()) { diff --git a/src/openrct2/world/TileElement.h b/src/openrct2/world/TileElement.h index 5de0f14659..b3985ca7ff 100644 --- a/src/openrct2/world/TileElement.h +++ b/src/openrct2/world/TileElement.h @@ -13,26 +13,26 @@ #pragma pack(push, 1) struct rct_tile_element_surface_properties { - uint8 slope; //4 0xE0 Edge Style, 0x1F Slope - uint8 terrain; //5 0xE0 Terrain Style, 0x1F Water height - uint8 grass_length; //6 - uint8 ownership; //7 + uint8_t slope; //4 0xE0 Edge Style, 0x1F Slope + uint8_t terrain; //5 0xE0 Terrain Style, 0x1F Water height + uint8_t grass_length; //6 + uint8_t ownership; //7 }; assert_struct_size(rct_tile_element_surface_properties, 4); struct rct_tile_element_path_properties { - uint8 type; //4 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is diagonal, 0x03 Rotation - uint8 additions; //5 - uint8 edges; //6 + uint8_t type; //4 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is diagonal, 0x03 Rotation + uint8_t additions; //5 + uint8_t edges; //6 union { - uint8 addition_status; //7 - uint8 ride_index; + uint8_t addition_status; //7 + uint8_t ride_index; }; }; assert_struct_size(rct_tile_element_path_properties, 4); struct rct_tile_element_track_properties { - uint8 type; //4 + uint8_t type; //4 union { struct { // The lower 4 bits are the track sequence. @@ -46,53 +46,53 @@ struct rct_tile_element_track_properties { // - Bits 7 and 8 are never set // - Bits 5 and 6 are set when a vehicle triggers the on-ride photo and act like a countdown from 3. // - If any of the bits 5-8 are set, the game counts it as a photo being taken. - uint8 sequence; //5. - uint8 colour; //6 + uint8_t sequence; //5. + uint8_t colour; //6 }; - uint16 maze_entry; // 5 + uint16_t maze_entry; // 5 }; - uint8 ride_index; //7 + uint8_t ride_index; //7 }; assert_struct_size(rct_tile_element_track_properties, 4); struct rct_tile_element_scenery_properties { - uint8 type; //4 - uint8 age; //5 - uint8 colour_1; //6 - uint8 colour_2; //7 + uint8_t type; //4 + uint8_t age; //5 + uint8_t colour_1; //6 + uint8_t colour_2; //7 }; assert_struct_size(rct_tile_element_scenery_properties, 4); struct rct_tile_element_entrance_properties { - uint8 type; //4 - uint8 index; //5 - uint8 path_type; //6 - uint8 ride_index; //7 + uint8_t type; //4 + uint8_t index; //5 + uint8_t path_type; //6 + uint8_t ride_index; //7 }; assert_struct_size(rct_tile_element_entrance_properties, 4); struct rct_tile_element_wall_properties { - uint8 type; //4 + uint8_t type; //4 union { - uint8 colour_3; //5 + uint8_t colour_3; //5 BannerIndex banner_index; // 5 }; - uint8 colour_1; //6 0b_2221_1111 2 = colour_2 (uses flags for rest of colour2), 1 = colour_1 - uint8 animation; //7 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used) + uint8_t colour_1; //6 0b_2221_1111 2 = colour_2 (uses flags for rest of colour2), 1 = colour_1 + uint8_t animation; //7 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used) }; assert_struct_size(rct_tile_element_wall_properties, 4); struct rct_tile_element_scenerymultiple_properties { - uint16 type; //4 - uint8 colour[2]; //6 + uint16_t type; //4 + uint8_t colour[2]; //6 }; assert_struct_size(rct_tile_element_scenerymultiple_properties, 4); struct rct_tile_element_banner_properties { BannerIndex index; // 4 - uint8 position; //5 - uint8 flags; //6 - uint8 unused; //7 + uint8_t position; //5 + uint8_t flags; //6 + uint8_t unused; //7 }; assert_struct_size(rct_tile_element_banner_properties, 4); @@ -113,20 +113,20 @@ assert_struct_size(rct_tile_element_properties, 4); * size: 0x08 */ struct rct_tile_element { - uint8 type; //0 - uint8 flags; //1 - uint8 base_height; //2 - uint8 clearance_height; //3 + uint8_t type; //0 + uint8_t flags; //1 + uint8_t base_height; //2 + uint8_t clearance_height; //3 rct_tile_element_properties properties; - uint8 GetType() const; - void SetType(uint8 newType); - uint8 GetDirection() const; - void SetDirection(uint8 direction); - uint8 GetDirectionWithOffset(uint8 offset) const; + uint8_t GetType() const; + void SetType(uint8_t newType); + uint8_t GetDirection() const; + void SetDirection(uint8_t direction); + uint8_t GetDirectionWithOffset(uint8_t offset) const; bool IsLastForTile() const; bool IsGhost() const; - uint8 GetSceneryQuadrant() const; + uint8_t GetSceneryQuadrant() const; }; assert_struct_size(rct_tile_element, 8); #pragma pack(pop) @@ -201,8 +201,8 @@ enum #define MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK 0b00001111 #define MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK 0b11110000 -sint32 tile_element_get_direction(const rct_tile_element * element); -sint32 tile_element_get_direction_with_offset(const rct_tile_element * element, uint8 offset); +int32_t tile_element_get_direction(const rct_tile_element * element); +int32_t tile_element_get_direction_with_offset(const rct_tile_element * element, uint8_t offset); BannerIndex tile_element_get_banner_index(rct_tile_element* tileElement); bool tile_element_is_ghost(const rct_tile_element * element); bool tile_element_is_underground(rct_tile_element * tileElement); @@ -212,4 +212,4 @@ bool tile_element_is_last_for_tile(const rct_tile_element *element); void tile_element_set_banner_index(rct_tile_element* tileElement, BannerIndex bannerIndex); void tile_element_remove_banner_entry(rct_tile_element *tileElement); -uint8 tile_element_get_ride_index(const rct_tile_element * tileElement); +uint8_t tile_element_get_ride_index(const rct_tile_element * tileElement); diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index 065ac9e9da..d966357cfe 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -28,12 +28,12 @@ using namespace OpenRCT2; -uint32 windowTileInspectorTileX; -uint32 windowTileInspectorTileY; -sint32 windowTileInspectorElementCount = 0; -sint32 windowTileInspectorSelectedIndex; +uint32_t windowTileInspectorTileX; +uint32_t windowTileInspectorTileY; +int32_t windowTileInspectorElementCount = 0; +int32_t windowTileInspectorSelectedIndex; -static bool map_swap_elements_at(sint32 x, sint32 y, sint16 first, sint16 second) +static bool map_swap_elements_at(int32_t x, int32_t y, int16_t first, int16_t second) { rct_tile_element * const firstElement = map_get_nth_element_at(x, y, first); rct_tile_element * const secondElement = map_get_nth_element_at(x, y, second); @@ -76,7 +76,7 @@ static bool map_swap_elements_at(sint32 x, sint32 y, sint16 first, sint16 second * @param elementIndex The nth element on this tile * Returns 0 on success, MONEY_UNDEFINED otherwise. */ -sint32 tile_inspector_insert_corrupt_at(sint32 x, sint32 y, sint16 elementIndex, sint32 flags) +int32_t tile_inspector_insert_corrupt_at(int32_t x, int32_t y, int16_t elementIndex, int32_t flags) { // Make sure there is enough space for the new element if (!map_check_free_elements_and_reorganise(1)) @@ -103,7 +103,7 @@ sint32 tile_inspector_insert_corrupt_at(sint32 x, sint32 y, sint16 elementIndex, // Move the corrupt element up until the selected list item is reached // this way it's placed under the selected element, even when there are multiple elements with the same base height - for (sint16 i = 0; i < elementIndex; i++) + for (int16_t i = 0; i < elementIndex; i++) { if (!map_swap_elements_at(x, y, i, i + 1)) { @@ -118,7 +118,7 @@ sint32 tile_inspector_insert_corrupt_at(sint32 x, sint32 y, sint16 elementIndex, // Update the tile inspector's list for everyone who has the tile selected rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { windowTileInspectorElementCount++; @@ -142,7 +142,7 @@ sint32 tile_inspector_insert_corrupt_at(sint32 x, sint32 y, sint16 elementIndex, * @param y The y coordinate of the tile * @param elementIndex The nth element on this tile */ -sint32 tile_inspector_remove_element_at(sint32 x, sint32 y, sint16 elementIndex, sint32 flags) +int32_t tile_inspector_remove_element_at(int32_t x, int32_t y, int16_t elementIndex, int32_t flags) { if (flags & GAME_COMMAND_FLAG_APPLY) { @@ -157,7 +157,7 @@ sint32 tile_inspector_remove_element_at(sint32 x, sint32 y, sint16 elementIndex, // Update the window rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { windowTileInspectorElementCount--; @@ -177,7 +177,7 @@ sint32 tile_inspector_remove_element_at(sint32 x, sint32 y, sint16 elementIndex, return 0; } -sint32 tile_inspector_swap_elements_at(sint32 x, sint32 y, sint16 first, sint16 second, sint32 flags) +int32_t tile_inspector_swap_elements_at(int32_t x, int32_t y, int16_t first, int16_t second, int32_t flags) { if (flags & GAME_COMMAND_FLAG_APPLY) { @@ -189,7 +189,7 @@ sint32 tile_inspector_swap_elements_at(sint32 x, sint32 y, sint16 first, sint16 // Update the window rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { // If one of them was selected, update selected list item if (windowTileInspectorSelectedIndex == first) @@ -204,11 +204,11 @@ sint32 tile_inspector_swap_elements_at(sint32 x, sint32 y, sint16 first, sint16 return 0; } -sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex, sint32 flags) +int32_t tile_inspector_rotate_element_at(int32_t x, int32_t y, int32_t elementIndex, int32_t flags) { if (flags & GAME_COMMAND_FLAG_APPLY) { - uint8 newRotation, pathEdges, pathCorners; + uint8_t newRotation, pathEdges, pathCorners; rct_tile_element * const tileElement = map_get_nth_element_at(x, y, elementIndex); if (!tileElement) @@ -239,11 +239,11 @@ sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex, // Update ride's known entrance/exit rotation Ride * ride = get_ride(tileElement->properties.entrance.ride_index); - uint8 stationIndex = tileElement->properties.entrance.index; + uint8_t stationIndex = tileElement->properties.entrance.index; auto entrance = ride_get_entrance_location(ride, stationIndex); auto exit = ride_get_exit_location(ride, stationIndex); - uint8 entranceType = entrance_element_get_type(tileElement); - uint8 z = tileElement->base_height; + uint8_t entranceType = entrance_element_get_type(tileElement); + uint8_t z = tileElement->base_height; // Make sure this is the correct entrance or exit if (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE && entrance.x == x && entrance.y == y && entrance.z == z) @@ -265,7 +265,7 @@ sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex, break; case TILE_ELEMENT_TYPE_BANNER: { - uint8 unblockedEdges = tileElement->properties.banner.flags & 0xF; + uint8_t unblockedEdges = tileElement->properties.banner.flags & 0xF; unblockedEdges = (unblockedEdges << 1 | unblockedEdges >> 3) & 0xF; tileElement->properties.banner.flags &= ~0xF; tileElement->properties.banner.flags |= unblockedEdges; @@ -277,7 +277,7 @@ sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex, map_invalidate_tile_full(x << 5, y << 5); - if ((uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if ((uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate_by_class(WC_TILE_INSPECTOR); } @@ -286,7 +286,7 @@ sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex, return 0; } -sint32 tile_inspector_paste_element_at(sint32 x, sint32 y, rct_tile_element element, sint32 flags) +int32_t tile_inspector_paste_element_at(int32_t x, int32_t y, rct_tile_element element, int32_t flags) { // Make sure there is enough space for the new element if (!map_check_free_elements_and_reorganise(1)) @@ -342,12 +342,12 @@ sint32 tile_inspector_paste_element_at(sint32 x, sint32 y, rct_tile_element elem map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { windowTileInspectorElementCount++; // Select new element if there was none selected already - sint16 newIndex = (sint16)(pastedElement - map_get_first_element_at(x, y)); + int16_t newIndex = (int16_t)(pastedElement - map_get_first_element_at(x, y)); if (windowTileInspectorSelectedIndex == -1) windowTileInspectorSelectedIndex = newIndex; else if (windowTileInspectorSelectedIndex >= newIndex) @@ -360,14 +360,14 @@ sint32 tile_inspector_paste_element_at(sint32 x, sint32 y, rct_tile_element elem return 0; } -sint32 tile_inspector_sort_elements_at(sint32 x, sint32 y, sint32 flags) +int32_t tile_inspector_sort_elements_at(int32_t x, int32_t y, int32_t flags) { if (flags & GAME_COMMAND_FLAG_APPLY) { const rct_tile_element * const firstElement = map_get_first_element_at(x, y); // Count elements on tile - sint32 numElement = 0; + int32_t numElement = 0; const rct_tile_element * elementIterator = firstElement; do { @@ -375,9 +375,9 @@ sint32 tile_inspector_sort_elements_at(sint32 x, sint32 y, sint32 flags) } while (!(elementIterator++)->IsLastForTile()); // Bubble sort - for (sint32 loopStart = 1; loopStart < numElement; loopStart++) + for (int32_t loopStart = 1; loopStart < numElement; loopStart++) { - sint32 currentId = loopStart; + int32_t currentId = loopStart; const rct_tile_element * currentElement = firstElement + currentId; const rct_tile_element * otherElement = currentElement - 1; @@ -405,7 +405,7 @@ sint32 tile_inspector_sort_elements_at(sint32 x, sint32 y, sint32 flags) // Deselect tile for clients who had it selected rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { windowTileInspectorSelectedIndex = -1; window_invalidate(tileInspectorWindow); @@ -415,14 +415,14 @@ sint32 tile_inspector_sort_elements_at(sint32 x, sint32 y, sint32 flags) return 0; } -sint32 tile_inspector_any_base_height_offset(sint32 x, sint32 y, sint16 elementIndex, sint8 heightOffset, sint32 flags) +int32_t tile_inspector_any_base_height_offset(int32_t x, int32_t y, int16_t elementIndex, int8_t heightOffset, int32_t flags) { rct_tile_element * const tileElement = map_get_nth_element_at(x, y, elementIndex); if (tileElement == nullptr) return MONEY32_UNDEFINED; - sint16 newBaseHeight = (sint16)tileElement->base_height + heightOffset; - sint16 newClearanceHeight = (sint16)tileElement->clearance_height + heightOffset; + int16_t newBaseHeight = (int16_t)tileElement->base_height + heightOffset; + int16_t newClearanceHeight = (int16_t)tileElement->clearance_height + heightOffset; if (newBaseHeight < 0 || newBaseHeight > 0xff || newClearanceHeight < 0 || newClearanceHeight > 0xff) { return MONEY32_UNDEFINED; @@ -432,15 +432,15 @@ sint32 tile_inspector_any_base_height_offset(sint32 x, sint32 y, sint16 elementI { if (tileElement->GetType() == TILE_ELEMENT_TYPE_ENTRANCE) { - uint8 entranceType = tileElement->properties.entrance.type; + uint8_t entranceType = tileElement->properties.entrance.type; if (entranceType != ENTRANCE_TYPE_PARK_ENTRANCE) { // Update the ride's known entrance or exit height Ride * ride = get_ride(tileElement->properties.entrance.ride_index); - uint8 entranceIndex = tileElement->properties.entrance.index; + uint8_t entranceIndex = tileElement->properties.entrance.index; auto entrance = ride_get_entrance_location(ride, entranceIndex); auto exit = ride_get_exit_location(ride, entranceIndex); - uint8 z = tileElement->base_height; + uint8_t z = tileElement->base_height; // Make sure this is the correct entrance or exit if (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE && entrance.x == x && entrance.y == y && entrance.z == z) @@ -458,7 +458,7 @@ sint32 tile_inspector_any_base_height_offset(sint32 x, sint32 y, sint16 elementI map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -467,7 +467,7 @@ sint32 tile_inspector_any_base_height_offset(sint32 x, sint32 y, sint16 elementI return 0; } -sint32 tile_inspector_surface_show_park_fences(sint32 x, sint32 y, bool showFences, sint32 flags) +int32_t tile_inspector_surface_show_park_fences(int32_t x, int32_t y, bool showFences, int32_t flags) { rct_tile_element * const surfaceelement = map_get_surface_element_at(x, y); @@ -485,7 +485,7 @@ sint32 tile_inspector_surface_show_park_fences(sint32 x, sint32 y, bool showFenc map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -494,7 +494,7 @@ sint32 tile_inspector_surface_show_park_fences(sint32 x, sint32 y, bool showFenc return 0; } -sint32 tile_inspector_surface_toggle_corner(sint32 x, sint32 y, sint32 cornerIndex, sint32 flags) +int32_t tile_inspector_surface_toggle_corner(int32_t x, int32_t y, int32_t cornerIndex, int32_t flags) { rct_tile_element * const surfaceElement = map_get_surface_element_at(x, y); @@ -504,7 +504,7 @@ sint32 tile_inspector_surface_toggle_corner(sint32 x, sint32 y, sint32 cornerInd if (flags & GAME_COMMAND_FLAG_APPLY) { - const uint8 originalSlope = surfaceElement->properties.surface.slope; + const uint8_t originalSlope = surfaceElement->properties.surface.slope; const bool diagonal = (originalSlope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) >> 4; surfaceElement->properties.surface.slope ^= 1 << cornerIndex; @@ -549,7 +549,7 @@ sint32 tile_inspector_surface_toggle_corner(sint32 x, sint32 y, sint32 cornerInd map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -558,7 +558,7 @@ sint32 tile_inspector_surface_toggle_corner(sint32 x, sint32 y, sint32 cornerInd return 0; } -sint32 tile_inspector_surface_toggle_diagonal(sint32 x, sint32 y, sint32 flags) +int32_t tile_inspector_surface_toggle_diagonal(int32_t x, int32_t y, int32_t flags) { rct_tile_element * const surfaceElement = map_get_surface_element_at(x, y); @@ -585,7 +585,7 @@ sint32 tile_inspector_surface_toggle_diagonal(sint32 x, sint32 y, sint32 flags) map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -594,7 +594,7 @@ sint32 tile_inspector_surface_toggle_diagonal(sint32 x, sint32 y, sint32 flags) return 0; } -sint32 tile_inspector_path_set_sloped(sint32 x, sint32 y, sint32 elementIndex, bool sloped, sint32 flags) +int32_t tile_inspector_path_set_sloped(int32_t x, int32_t y, int32_t elementIndex, bool sloped, int32_t flags) { rct_tile_element * const pathElement = map_get_nth_element_at(x, y, elementIndex); @@ -612,7 +612,7 @@ sint32 tile_inspector_path_set_sloped(sint32 x, sint32 y, sint32 elementIndex, b map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -621,7 +621,7 @@ sint32 tile_inspector_path_set_sloped(sint32 x, sint32 y, sint32 elementIndex, b return 0; } -sint32 tile_inspector_path_toggle_edge(sint32 x, sint32 y, sint32 elementIndex, sint32 edgeIndex, sint32 flags) +int32_t tile_inspector_path_toggle_edge(int32_t x, int32_t y, int32_t elementIndex, int32_t edgeIndex, int32_t flags) { rct_tile_element * const pathElement = map_get_nth_element_at(x, y, elementIndex); @@ -635,7 +635,7 @@ sint32 tile_inspector_path_toggle_edge(sint32 x, sint32 y, sint32 elementIndex, map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -644,7 +644,7 @@ sint32 tile_inspector_path_toggle_edge(sint32 x, sint32 y, sint32 elementIndex, return 0; } -sint32 tile_inspector_entrance_make_usable(sint32 x, sint32 y, sint32 elementIndex, sint32 flags) +int32_t tile_inspector_entrance_make_usable(int32_t x, int32_t y, int32_t elementIndex, int32_t flags) { rct_tile_element * const entranceElement = map_get_nth_element_at(x, y, elementIndex); @@ -658,20 +658,20 @@ sint32 tile_inspector_entrance_make_usable(sint32 x, sint32 y, sint32 elementInd if (flags & GAME_COMMAND_FLAG_APPLY) { - uint8 stationIndex = entranceElement->properties.entrance.index >> 6; + uint8_t stationIndex = entranceElement->properties.entrance.index >> 6; switch (entranceElement->properties.entrance.type) { case ENTRANCE_TYPE_RIDE_ENTRANCE: - ride_set_entrance_location(ride, stationIndex, { x, y, entranceElement->base_height, (uint8)tile_element_get_direction(entranceElement) }); + ride_set_entrance_location(ride, stationIndex, { x, y, entranceElement->base_height, (uint8_t)tile_element_get_direction(entranceElement) }); break; case ENTRANCE_TYPE_RIDE_EXIT: - ride_set_exit_location(ride, stationIndex, { x, y, entranceElement->base_height, (uint8)tile_element_get_direction(entranceElement) }); + ride_set_exit_location(ride, stationIndex, { x, y, entranceElement->base_height, (uint8_t)tile_element_get_direction(entranceElement) }); break; } rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -680,7 +680,7 @@ sint32 tile_inspector_entrance_make_usable(sint32 x, sint32 y, sint32 elementInd return 0; } -sint32 tile_inspector_wall_set_slope(sint32 x, sint32 y, sint32 elementIndex, sint32 slopeValue, sint32 flags) +int32_t tile_inspector_wall_set_slope(int32_t x, int32_t y, int32_t elementIndex, int32_t slopeValue, int32_t flags) { rct_tile_element * const wallElement = map_get_nth_element_at(x, y, elementIndex); @@ -696,7 +696,7 @@ sint32 tile_inspector_wall_set_slope(sint32 x, sint32 y, sint32 elementIndex, si map_invalidate_tile_full(x << 5, y << 5); rct_window * const tileInspectorWindow = window_find_by_class(WC_TILE_INSPECTOR); - if (tileInspectorWindow != nullptr && (uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if (tileInspectorWindow != nullptr && (uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate(tileInspectorWindow); } @@ -707,7 +707,7 @@ sint32 tile_inspector_wall_set_slope(sint32 x, sint32 y, sint32 elementIndex, si // Changes the height of all track elements that belong to the same track piece // Broxzier: Copied from track_remove and stripped of unneeded code, but I think this should be smaller -sint32 tile_inspector_track_base_height_offset(sint32 x, sint32 y, sint32 elementIndex, sint8 offset, sint32 flags) +int32_t tile_inspector_track_base_height_offset(int32_t x, int32_t y, int32_t elementIndex, int8_t offset, int32_t flags) { rct_tile_element * const trackElement = map_get_nth_element_at(x, y, elementIndex); @@ -719,17 +719,17 @@ sint32 tile_inspector_track_base_height_offset(sint32 x, sint32 y, sint32 elemen if (flags & GAME_COMMAND_FLAG_APPLY) { - uint8 type = track_element_get_type(trackElement); - sint16 originX = x << 5; - sint16 originY = y << 5; - sint16 originZ = trackElement->base_height * 8; - uint8 rotation = tile_element_get_direction(trackElement); - uint8 rideIndex = track_element_get_ride_index(trackElement); + uint8_t type = track_element_get_type(trackElement); + int16_t originX = x << 5; + int16_t originY = y << 5; + int16_t originZ = trackElement->base_height * 8; + uint8_t rotation = tile_element_get_direction(trackElement); + uint8_t rideIndex = track_element_get_ride_index(trackElement); Ride * ride = get_ride(rideIndex); const rct_preview_track * trackBlock = get_track_def_from_ride(ride, type); trackBlock += tile_element_get_track_sequence(trackElement); - uint8 originDirection = tile_element_get_direction(trackElement); + uint8_t originDirection = tile_element_get_direction(trackElement); switch (originDirection) { case 0: @@ -755,7 +755,7 @@ sint32 tile_inspector_track_base_height_offset(sint32 x, sint32 y, sint32 elemen trackBlock = get_track_def_from_ride(ride, type); for (; trackBlock->index != 255; trackBlock++) { - sint16 elemX = originX, elemY = originY, elemZ = originZ; + int16_t elemX = originX, elemY = originY, elemZ = originZ; switch (originDirection) { @@ -831,8 +831,8 @@ sint32 tile_inspector_track_base_height_offset(sint32 x, sint32 y, sint32 elemen // Sets chainlift, optionally for an entire track block // Broxzier: Basically a copy of the above function, with just two different lines... should probably be combined somehow -sint32 tile_inspector_track_set_chain(sint32 x, sint32 y, sint32 elementIndex, bool entireTrackBlock, bool setChain, - sint32 flags) +int32_t tile_inspector_track_set_chain(int32_t x, int32_t y, int32_t elementIndex, bool entireTrackBlock, bool setChain, + int32_t flags) { rct_tile_element * const trackElement = map_get_nth_element_at(x, y, elementIndex); @@ -852,17 +852,17 @@ sint32 tile_inspector_track_set_chain(sint32 x, sint32 y, sint32 elementIndex, b return 0; } - uint8 type = track_element_get_type(trackElement); - sint16 originX = x << 5; - sint16 originY = y << 5; - sint16 originZ = trackElement->base_height * 8; - uint8 rotation = tile_element_get_direction(trackElement); - uint8 rideIndex = track_element_get_ride_index(trackElement); + uint8_t type = track_element_get_type(trackElement); + int16_t originX = x << 5; + int16_t originY = y << 5; + int16_t originZ = trackElement->base_height * 8; + uint8_t rotation = tile_element_get_direction(trackElement); + uint8_t rideIndex = track_element_get_ride_index(trackElement); Ride * ride = get_ride(rideIndex); const rct_preview_track * trackBlock = get_track_def_from_ride(ride, type); trackBlock += tile_element_get_track_sequence(trackElement); - uint8 originDirection = tile_element_get_direction(trackElement); + uint8_t originDirection = tile_element_get_direction(trackElement); switch (originDirection) { case 0: @@ -888,7 +888,7 @@ sint32 tile_inspector_track_set_chain(sint32 x, sint32 y, sint32 elementIndex, b trackBlock = get_track_def_from_ride(ride, type); for (; trackBlock->index != 255; trackBlock++) { - sint16 elemX = originX, elemY = originY, elemZ = originZ; + int16_t elemX = originX, elemY = originY, elemZ = originZ; switch (originDirection) { @@ -964,7 +964,7 @@ sint32 tile_inspector_track_set_chain(sint32 x, sint32 y, sint32 elementIndex, b return 0; } -sint32 tile_inspector_scenery_set_quarter_location(sint32 x, sint32 y, sint32 elementIndex, sint32 quarterIndex, sint32 flags) +int32_t tile_inspector_scenery_set_quarter_location(int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags) { rct_tile_element * const tileElement = map_get_nth_element_at(x, y, elementIndex); @@ -982,7 +982,7 @@ sint32 tile_inspector_scenery_set_quarter_location(sint32 x, sint32 y, sint32 el tileElement->flags |= 1 << ((quarterIndex + 2) & 3); map_invalidate_tile_full(x << 5, y << 5); - if ((uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if ((uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate_by_class(WC_TILE_INSPECTOR); } @@ -991,7 +991,7 @@ sint32 tile_inspector_scenery_set_quarter_location(sint32 x, sint32 y, sint32 el return 0; } -sint32 tile_inspector_scenery_set_quarter_collision(sint32 x, sint32 y, sint32 elementIndex, sint32 quarterIndex, sint32 flags) +int32_t tile_inspector_scenery_set_quarter_collision(int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags) { rct_tile_element * const tileElement = map_get_nth_element_at(x, y, elementIndex); @@ -1003,7 +1003,7 @@ sint32 tile_inspector_scenery_set_quarter_collision(sint32 x, sint32 y, sint32 e tileElement->flags ^= 1 << quarterIndex; map_invalidate_tile_full(x << 5, y << 5); - if ((uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if ((uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate_by_class(WC_TILE_INSPECTOR); } @@ -1012,7 +1012,7 @@ sint32 tile_inspector_scenery_set_quarter_collision(sint32 x, sint32 y, sint32 e return 0; } -sint32 tile_inspector_banner_toggle_blocking_edge(sint32 x, sint32 y, sint32 elementIndex, sint32 edgeIndex, sint32 flags) +int32_t tile_inspector_banner_toggle_blocking_edge(int32_t x, int32_t y, int32_t elementIndex, int32_t edgeIndex, int32_t flags) { rct_tile_element * const bannerElement = map_get_nth_element_at(x, y, elementIndex); @@ -1023,7 +1023,7 @@ sint32 tile_inspector_banner_toggle_blocking_edge(sint32 x, sint32 y, sint32 ele { bannerElement->properties.banner.flags ^= 1 << edgeIndex; - if ((uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if ((uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate_by_class(WC_TILE_INSPECTOR); } @@ -1032,7 +1032,7 @@ sint32 tile_inspector_banner_toggle_blocking_edge(sint32 x, sint32 y, sint32 ele return 0; } -sint32 tile_inspector_corrupt_clamp(sint32 x, sint32 y, sint32 elementIndex, sint32 flags) +int32_t tile_inspector_corrupt_clamp(int32_t x, int32_t y, int32_t elementIndex, int32_t flags) { rct_tile_element * const corruptElement = map_get_nth_element_at(x, y, elementIndex); @@ -1047,7 +1047,7 @@ sint32 tile_inspector_corrupt_clamp(sint32 x, sint32 y, sint32 elementIndex, sin rct_tile_element * const nextElement = corruptElement + 1; corruptElement->base_height = corruptElement->clearance_height = nextElement->base_height; - if ((uint32)x == windowTileInspectorTileX && (uint32)y == windowTileInspectorTileY) + if ((uint32_t)x == windowTileInspectorTileX && (uint32_t)y == windowTileInspectorTileY) { window_invalidate_by_class(WC_TILE_INSPECTOR); } diff --git a/src/openrct2/world/TileInspector.h b/src/openrct2/world/TileInspector.h index 70c42920d5..fd8b12baa1 100644 --- a/src/openrct2/world/TileInspector.h +++ b/src/openrct2/world/TileInspector.h @@ -48,23 +48,23 @@ enum TILE_INSPECTOR_INSTRUCTION_TYPE { TILE_INSPECTOR_CORRUPT_CLAMP, }; -sint32 tile_inspector_insert_corrupt_at(sint32 x, sint32 y, sint16 elementIndex, sint32 flags); -sint32 tile_inspector_remove_element_at(sint32 x, sint32 y, sint16 elementIndex, sint32 flags); -sint32 tile_inspector_swap_elements_at(sint32 x, sint32 y, sint16 first, sint16 second, sint32 flags); -sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex, sint32 flags); -sint32 tile_inspector_paste_element_at(sint32 x, sint32 y, rct_tile_element element, sint32 flags); -sint32 tile_inspector_sort_elements_at(sint32 x, sint32 y, sint32 flags); -sint32 tile_inspector_any_base_height_offset(sint32 x, sint32 y, sint16 elementIndex, sint8 heightOffset, sint32 flags); -sint32 tile_inspector_surface_show_park_fences(sint32 x, sint32 y, bool enabled, sint32 flags); -sint32 tile_inspector_surface_toggle_corner(sint32 x, sint32 y, sint32 cornerIndex, sint32 flags); -sint32 tile_inspector_surface_toggle_diagonal(sint32 x, sint32 y, sint32 flags); -sint32 tile_inspector_path_set_sloped(sint32 x, sint32 y, sint32 elementIndex, bool sloped, sint32 flags); -sint32 tile_inspector_path_toggle_edge(sint32 x, sint32 y, sint32 elementIndex, sint32 cornerIndex, sint32 flags); -sint32 tile_inspector_entrance_make_usable(sint32 x, sint32 y, sint32 elementIndex, sint32 flags); -sint32 tile_inspector_wall_set_slope(sint32 x, sint32 y, sint32 elementIndex, sint32 slopeValue, sint32 flags); -sint32 tile_inspector_track_base_height_offset(sint32 x, sint32 y, sint32 elementIndex, sint8 offset, sint32 flags); -sint32 tile_inspector_track_set_chain(sint32 x, sint32 y, sint32 elementIndex, bool entireTrackBlock, bool setChain, sint32 flags); -sint32 tile_inspector_scenery_set_quarter_location(sint32 x, sint32 y, sint32 elementIndex, sint32 quarterIndex, sint32 flags); -sint32 tile_inspector_scenery_set_quarter_collision(sint32 x, sint32 y, sint32 elementIndex, sint32 quarterIndex, sint32 flags); -sint32 tile_inspector_banner_toggle_blocking_edge(sint32 x, sint32 y, sint32 elementIndex, sint32 edgeIndex, sint32 flags); -sint32 tile_inspector_corrupt_clamp(sint32 x, sint32 y, sint32 elementIndex, sint32 flags); +int32_t tile_inspector_insert_corrupt_at(int32_t x, int32_t y, int16_t elementIndex, int32_t flags); +int32_t tile_inspector_remove_element_at(int32_t x, int32_t y, int16_t elementIndex, int32_t flags); +int32_t tile_inspector_swap_elements_at(int32_t x, int32_t y, int16_t first, int16_t second, int32_t flags); +int32_t tile_inspector_rotate_element_at(int32_t x, int32_t y, int32_t elementIndex, int32_t flags); +int32_t tile_inspector_paste_element_at(int32_t x, int32_t y, rct_tile_element element, int32_t flags); +int32_t tile_inspector_sort_elements_at(int32_t x, int32_t y, int32_t flags); +int32_t tile_inspector_any_base_height_offset(int32_t x, int32_t y, int16_t elementIndex, int8_t heightOffset, int32_t flags); +int32_t tile_inspector_surface_show_park_fences(int32_t x, int32_t y, bool enabled, int32_t flags); +int32_t tile_inspector_surface_toggle_corner(int32_t x, int32_t y, int32_t cornerIndex, int32_t flags); +int32_t tile_inspector_surface_toggle_diagonal(int32_t x, int32_t y, int32_t flags); +int32_t tile_inspector_path_set_sloped(int32_t x, int32_t y, int32_t elementIndex, bool sloped, int32_t flags); +int32_t tile_inspector_path_toggle_edge(int32_t x, int32_t y, int32_t elementIndex, int32_t cornerIndex, int32_t flags); +int32_t tile_inspector_entrance_make_usable(int32_t x, int32_t y, int32_t elementIndex, int32_t flags); +int32_t tile_inspector_wall_set_slope(int32_t x, int32_t y, int32_t elementIndex, int32_t slopeValue, int32_t flags); +int32_t tile_inspector_track_base_height_offset(int32_t x, int32_t y, int32_t elementIndex, int8_t offset, int32_t flags); +int32_t tile_inspector_track_set_chain(int32_t x, int32_t y, int32_t elementIndex, bool entireTrackBlock, bool setChain, int32_t flags); +int32_t tile_inspector_scenery_set_quarter_location(int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags); +int32_t tile_inspector_scenery_set_quarter_collision(int32_t x, int32_t y, int32_t elementIndex, int32_t quarterIndex, int32_t flags); +int32_t tile_inspector_banner_toggle_blocking_edge(int32_t x, int32_t y, int32_t elementIndex, int32_t edgeIndex, int32_t flags); +int32_t tile_inspector_corrupt_clamp(int32_t x, int32_t y, int32_t elementIndex, int32_t flags); diff --git a/src/openrct2/world/Wall.cpp b/src/openrct2/world/Wall.cpp index 43c80cfd61..2adaa1a7a8 100644 --- a/src/openrct2/world/Wall.cpp +++ b/src/openrct2/world/Wall.cpp @@ -31,7 +31,7 @@ * Gets whether the given track type can have a wall placed on the edge of the given direction. * Some thin tracks for example are allowed to have walls either side of the track, but wider tracks can not. */ -static bool TrackIsAllowedWallEdges(uint8 rideType, uint8 trackType, uint8 trackSequence, uint8 direction) +static bool TrackIsAllowedWallEdges(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, uint8_t direction) { if (!ride_type_has_flag(rideType, RIDE_TYPE_FLAG_TRACK_NO_WALLS)) { @@ -58,14 +58,14 @@ static bool TrackIsAllowedWallEdges(uint8 rideType, uint8 trackType, uint8 track * rct2: 0x006E5CBA */ static bool WallCheckObstructionWithTrack(rct_scenery_entry * wall, - sint32 z0, - sint32 edge, + int32_t z0, + int32_t edge, rct_tile_element * trackElement, bool * wallAcrossTrack) { - sint32 trackType = track_element_get_type(trackElement); - sint32 sequence = tile_element_get_track_sequence(trackElement); - sint32 direction = (edge - tile_element_get_direction(trackElement)) & TILE_ELEMENT_DIRECTION_MASK; + int32_t trackType = track_element_get_type(trackElement); + int32_t sequence = tile_element_get_track_sequence(trackElement); + int32_t direction = (edge - tile_element_get_direction(trackElement)) & TILE_ELEMENT_DIRECTION_MASK; Ride * ride = get_ride(track_element_get_ride_index(trackElement)); if (TrackIsAllowedWallEdges(ride->type, trackType, sequence, direction)) @@ -96,7 +96,7 @@ static bool WallCheckObstructionWithTrack(rct_scenery_entry * wall, return false; } - sint32 z; + int32_t z; if (sequence == 0) { if (TrackSequenceProperties[trackType][0] & TRACK_SEQUENCE_FLAG_DISALLOW_DOORS) @@ -157,14 +157,14 @@ static bool WallCheckObstructionWithTrack(rct_scenery_entry * wall, * rct2: 0x006E5C1A */ static bool WallCheckObstruction(rct_scenery_entry * wall, - sint32 x, - sint32 y, - sint32 z0, - sint32 z1, - sint32 edge, + int32_t x, + int32_t y, + int32_t z0, + int32_t z1, + int32_t edge, bool * wallAcrossTrack) { - sint32 entryType, sequence; + int32_t entryType, sequence; rct_scenery_entry * entry; rct_large_scenery_tile * tile; @@ -179,13 +179,13 @@ static bool WallCheckObstruction(rct_scenery_entry * wall, rct_tile_element * tileElement = map_get_first_element_at(x / 32, y / 32); do { - sint32 elementType = tileElement->GetType(); + int32_t elementType = tileElement->GetType(); if (elementType == TILE_ELEMENT_TYPE_SURFACE) continue; if (z0 >= tileElement->clearance_height) continue; if (z1 <= tileElement->base_height) continue; if (elementType == TILE_ELEMENT_TYPE_WALL) { - sint32 direction = tile_element_get_direction(tileElement); + int32_t direction = tile_element_get_direction(tileElement); if (edge == direction) { map_obstruction_set_error_text(tileElement); @@ -212,7 +212,7 @@ static bool WallCheckObstruction(rct_scenery_entry * wall, entry = get_large_scenery_entry(entryType); tile = &entry->large_scenery.tiles[sequence]; { - sint32 direction = ((edge - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK) + 8; + int32_t direction = ((edge - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK) + 8; if (!(tile->flags & (1 << direction))) { map_obstruction_set_error_text(tileElement); @@ -256,7 +256,7 @@ enum EDGE_SLOPE }; /** rct2: 0x009A3FEC */ -static constexpr const uint8 EdgeSlopes[][4] = { +static constexpr const uint8_t EdgeSlopes[][4] = { // Top right Bottom right Bottom left Top left { 0, 0, 0, 0 }, { 0, EDGE_SLOPE_UPWARDS, EDGE_SLOPE_DOWNWARDS, 0 }, @@ -295,15 +295,15 @@ static constexpr const uint8 EdgeSlopes[][4] = { #pragma endregion -static money32 WallPlace(uint8 wallType, - sint16 x, - sint16 y, - sint16 z, - uint8 edge, - uint8 primaryColour, - uint8 secondaryColour, - uint8 tertiaryColour, - uint8 flags) +static money32 WallPlace(uint8_t wallType, + int16_t x, + int16_t y, + int16_t z, + uint8_t edge, + uint8_t primaryColour, + uint8_t secondaryColour, + uint8_t tertiaryColour, + uint8_t flags) { LocationXYZ16 position = { x, y, z }; @@ -341,7 +341,7 @@ static money32 WallPlace(uint8 wallType, } } - uint8 edgeSlope = 0; + uint8_t edgeSlope = 0; if (position.z == 0) { rct_tile_element * surfaceElement = map_get_surface_element_at({position.x, position.y}); @@ -351,7 +351,7 @@ static money32 WallPlace(uint8 wallType, } position.z = surfaceElement->base_height * 8; - uint8 slope = surfaceElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; + uint8_t slope = surfaceElement->properties.surface.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK; edgeSlope = EdgeSlopes[slope][edge & 3]; if (edgeSlope & EDGE_SLOPE_ELEVATED) { @@ -368,7 +368,7 @@ static money32 WallPlace(uint8 wallType, if (surface_get_water_height(surfaceElement) > 0) { - uint16 waterHeight = surface_get_water_height(surfaceElement) * 16; + uint16_t waterHeight = surface_get_water_height(surfaceElement) * 16; if (position.z < waterHeight && !gCheatsDisableClearanceChecks) { @@ -385,8 +385,8 @@ static money32 WallPlace(uint8 wallType, if (!(edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS))) { - uint8 newEdge = (edge + 2) & 3; - uint8 newBaseHeight = surfaceElement->base_height; + uint8_t newEdge = (edge + 2) & 3; + uint8_t newBaseHeight = surfaceElement->base_height; newBaseHeight += 2; if (surfaceElement->properties.surface.slope & (1 << newEdge)) { @@ -471,7 +471,7 @@ static money32 WallPlace(uint8 wallType, banner->x = position.x / 32; banner->y = position.y / 32; - uint8 rideIndex = banner_get_closest_ride_index(position.x, position.y, position.z); + uint8_t rideIndex = banner_get_closest_ride_index(position.x, position.y, position.z); if (rideIndex != RIDE_ID_NULL) { banner->ride_index = rideIndex; @@ -480,7 +480,7 @@ static money32 WallPlace(uint8 wallType, } } - uint8 clearanceHeight = position.z / 8; + uint8_t clearanceHeight = position.z / 8; if (edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS)) { if (wallEntry->wall.flags & WALL_SCENERY_CANT_BUILD_ON_SLOPE) @@ -570,17 +570,17 @@ static money32 WallPlace(uint8 wallType, } } -static money32 WallSetColour(sint16 x, - sint16 y, - uint8 baseHeight, - uint8 direction, - uint8 primaryColour, - uint8 secondaryColour, - uint8 tertiaryColour, - uint8 flags) +static money32 WallSetColour(int16_t x, + int16_t y, + uint8_t baseHeight, + uint8_t direction, + uint8_t primaryColour, + uint8_t secondaryColour, + uint8_t tertiaryColour, + uint8_t flags) { gCommandExpenditureType = RCT_EXPENDITURE_TYPE_LANDSCAPING; - sint32 z = baseHeight * 8; + int32_t z = baseHeight * 8; gCommandPosition.x = x + 16; gCommandPosition.y = y + 16; @@ -621,12 +621,12 @@ static money32 WallSetColour(sint16 x, return 0; } -uint8 wall_get_animation_frame(const rct_tile_element * wallElement) +uint8_t wall_get_animation_frame(const rct_tile_element * wallElement) { return (wallElement->properties.wall.animation >> 3) & 0xF; } -void wall_set_animation_frame(rct_tile_element * wallElement, uint8 frameNum) +void wall_set_animation_frame(rct_tile_element * wallElement, uint8_t frameNum) { wallElement->properties.wall.animation &= WALL_ANIMATION_FLAG_ALL_FLAGS; wallElement->properties.wall.animation |= (frameNum & 0xF) << 3; @@ -639,7 +639,7 @@ colour_t wall_get_primary_colour(const rct_tile_element * tileElement) colour_t wall_get_secondary_colour(const rct_tile_element * wallElement) { - uint8 secondaryColour = (wallElement->properties.wall.colour_1 &~ TILE_ELEMENT_COLOUR_MASK) >> 5; + uint8_t secondaryColour = (wallElement->properties.wall.colour_1 &~ TILE_ELEMENT_COLOUR_MASK) >> 5; secondaryColour |= (wallElement->flags & 0x60) >> 2; return secondaryColour; } @@ -675,7 +675,7 @@ void wall_set_tertiary_colour(rct_tile_element * tileElement, colour_t colour) * * rct2: 0x006E588E */ -void wall_remove_at(sint32 x, sint32 y, sint32 z0, sint32 z1) +void wall_remove_at(int32_t x, int32_t y, int32_t z0, int32_t z1) { rct_tile_element * tileElement; @@ -704,7 +704,7 @@ repeat: * * rct2: 0x006E57E6 */ -void wall_remove_at_z(sint32 x, sint32 y, sint32 z) +void wall_remove_at_z(int32_t x, int32_t y, int32_t z) { wall_remove_at(x, y, z, z + 48); } @@ -713,7 +713,7 @@ void wall_remove_at_z(sint32 x, sint32 y, sint32 z) * * rct2: 0x006E5935 */ -void wall_remove_intersecting_walls(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction) +void wall_remove_intersecting_walls(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t direction) { rct_tile_element * tileElement; @@ -741,13 +741,13 @@ void wall_remove_intersecting_walls(sint32 x, sint32 y, sint32 z0, sint32 z1, si * * rct2: 0x006E519A */ -void game_command_place_wall(sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - sint32 * edi, - sint32 * ebp) +void game_command_place_wall(int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + int32_t * edi, + int32_t * ebp) { *ebx = WallPlace( (*ebx >> 8) & 0xFF, @@ -762,23 +762,23 @@ void game_command_place_wall(sint32 * eax, ); } -money32 wall_place(sint32 type, - sint32 x, - sint32 y, - sint32 z, - sint32 edge, - sint32 primaryColour, - sint32 secondaryColour, - sint32 tertiaryColour, - sint32 flags) +money32 wall_place(int32_t type, + int32_t x, + int32_t y, + int32_t z, + int32_t edge, + int32_t primaryColour, + int32_t secondaryColour, + int32_t tertiaryColour, + int32_t flags) { - sint32 eax = x; - sint32 ebx = flags | (type << 8); - sint32 ecx = y; - sint32 edx = edge | (primaryColour << 8); - sint32 esi = 0; - sint32 edi = z; - sint32 ebp = secondaryColour | (tertiaryColour << 8); + int32_t eax = x; + int32_t ebx = flags | (type << 8); + int32_t ecx = y; + int32_t edx = edge | (primaryColour << 8); + int32_t esi = 0; + int32_t edi = z; + int32_t ebp = secondaryColour | (tertiaryColour << 8); game_command_place_wall(&eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); return ebx; } @@ -787,13 +787,13 @@ money32 wall_place(sint32 type, * * rct2: 0x006E56B5 */ -void game_command_set_wall_colour(sint32 * eax, - sint32 * ebx, - sint32 * ecx, - sint32 * edx, - [[maybe_unused]] sint32 * esi, - [[maybe_unused]] sint32 * edi, - sint32 * ebp) +void game_command_set_wall_colour(int32_t * eax, + int32_t * ebx, + int32_t * ecx, + int32_t * edx, + [[maybe_unused]] int32_t * esi, + [[maybe_unused]] int32_t * edi, + int32_t * ebp) { *ebx = WallSetColour( *eax & 0xFFFF, diff --git a/src/openrct2/world/Wall.h b/src/openrct2/world/Wall.h index 42b2f303b2..13dd24084e 100644 --- a/src/openrct2/world/Wall.h +++ b/src/openrct2/world/Wall.h @@ -25,7 +25,7 @@ colour_t wall_get_tertiary_colour(const rct_tile_element * tileElement); void wall_set_primary_colour(rct_tile_element * tileElement, colour_t colour); void wall_set_secondary_colour(rct_tile_element * wallElement, colour_t secondaryColour); void wall_set_tertiary_colour(rct_tile_element * tileElement, colour_t colour); -uint8 wall_get_animation_frame(const rct_tile_element * fenceElement); -void wall_set_animation_frame(rct_tile_element * wallElement, uint8 frameNum); +uint8_t wall_get_animation_frame(const rct_tile_element * fenceElement); +void wall_set_animation_frame(rct_tile_element * wallElement, uint8_t frameNum); -money32 wall_remove(sint16 x, sint16 y, uint8 baseHeight, uint8 direction, uint8 flags); +money32 wall_remove(int16_t x, int16_t y, uint8_t baseHeight, uint8_t direction, uint8_t flags); diff --git a/src/openrct2/world/Water.h b/src/openrct2/world/Water.h index 1958de1dc6..172d6d7947 100644 --- a/src/openrct2/world/Water.h +++ b/src/openrct2/world/Water.h @@ -19,10 +19,10 @@ enum { #pragma pack(push, 1) struct rct_water_type { rct_string_id string_idx; // 0x00 - uint32 image_id; // 0x02 - uint32 palette_index_1; // 0x06 - uint32 palette_index_2; // 0x0A - uint16 flags; // 0x0E + uint32_t image_id; // 0x02 + uint32_t palette_index_1; // 0x06 + uint32_t palette_index_2; // 0x0A + uint16_t flags; // 0x0E }; assert_struct_size(rct_water_type, 16); #pragma pack(pop) diff --git a/test/testpaint/Addresses.cpp b/test/testpaint/Addresses.cpp index 72f8081c3c..0f931db62f 100644 --- a/test/testpaint/Addresses.cpp +++ b/test/testpaint/Addresses.cpp @@ -21,11 +21,11 @@ // This variable serves a purpose of identifying a crash if it has happened inside original code. // When switching to original code, stack frame pointer is modified and prevents breakpad from providing stack trace. -volatile sint32 _originalAddress = 0; +volatile int32_t _originalAddress = 0; -sint32 DISABLE_OPT RCT2_CALLPROC_X(sint32 address, sint32 _eax, sint32 _ebx, sint32 _ecx, sint32 _edx, sint32 _esi, sint32 _edi, sint32 _ebp) +int32_t DISABLE_OPT RCT2_CALLPROC_X(int32_t address, int32_t _eax, int32_t _ebx, int32_t _ecx, int32_t _edx, int32_t _esi, int32_t _edi, int32_t _ebp) { - sint32 result = 0; + int32_t result = 0; _originalAddress = address; #if defined(PLATFORM_X86) && !defined(NO_RCT2) #ifdef _MSC_VER diff --git a/test/testpaint/Addresses.h b/test/testpaint/Addresses.h index 80d90e7756..3ee0a6d68b 100644 --- a/test/testpaint/Addresses.h +++ b/test/testpaint/Addresses.h @@ -39,7 +39,7 @@ * P = Parity flag * All other bits are undefined. */ -sint32 RCT2_CALLPROC_X(sint32 address, sint32 _eax, sint32 _ebx, sint32 _ecx, sint32 _edx, sint32 _esi, sint32 _edi, sint32 _ebp); +int32_t RCT2_CALLPROC_X(int32_t address, int32_t _eax, int32_t _ebx, int32_t _ecx, int32_t _edx, int32_t _esi, int32_t _edi, int32_t _ebp); diff --git a/test/testpaint/Compat.cpp b/test/testpaint/Compat.cpp index ef55a36c27..4388768c13 100644 --- a/test/testpaint/Compat.cpp +++ b/test/testpaint/Compat.cpp @@ -25,16 +25,16 @@ rct_sprite *sprite_list = RCT2_ADDRESS(0x010E63BC, rct_sprite); Ride gRideList[MAX_RIDES]; -sint16 gMapSizeUnits; -sint16 gMapBaseZ; +int16_t gMapSizeUnits; +int16_t gMapBaseZ; bool gTrackDesignSaveMode = false; -uint8 gTrackDesignSaveRideIndex = 255; -uint8 gClipHeight = 255; +uint8_t gTrackDesignSaveRideIndex = 255; +uint8_t gClipHeight = 255; LocationXY8 gClipSelectionA = { 0, 0 }; LocationXY8 gClipSelectionB = { MAXIMUM_MAP_SIZE_TECHNICAL - 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1 }; -uint32 gCurrentViewportFlags; -uint32 gScenarioTicks; -uint8 gCurrentRotation; +uint32_t gCurrentViewportFlags; +uint32_t gScenarioTicks; +uint8_t gCurrentRotation; const CoordsXY CoordsDirectionDelta[] = { { -32, 0 }, @@ -58,14 +58,14 @@ const TileCoordsXY TileDirectionDelta[] = { { -1, -1 } }; -TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const sint32 stationIndex); -TileCoordsXYZD ride_get_exit_location(const Ride * ride, const sint32 stationIndex); +TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const int32_t stationIndex); +TileCoordsXYZD ride_get_exit_location(const Ride * ride, const int32_t stationIndex); -uint8 get_current_rotation() { +uint8_t get_current_rotation() { return gCurrentRotation & 3; } -const uint32 construction_markers[] = { +const uint32_t construction_markers[] = { COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP, // White 2 << 19 | 0b110000 << 19 | IMAGE_TYPE_TRANSPARENT, // Translucent }; @@ -85,20 +85,20 @@ int object_entry_group_counts[] = { }; GeneralConfiguration gConfigGeneral; -uint16 gMapSelectFlags; -uint16 gMapSelectType; +uint16_t gMapSelectFlags; +uint16_t gMapSelectType; LocationXY16 gMapSelectPositionA; LocationXY16 gMapSelectPositionB; LocationXYZ16 gMapSelectArrowPosition; -uint8 gMapSelectArrowDirection; +uint8_t gMapSelectArrowDirection; -void entrance_paint(paint_session * session, uint8 direction, int height, const rct_tile_element * tile_element) {} -void banner_paint(paint_session * session, uint8 direction, int height, const rct_tile_element * tile_element) {} -void surface_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement) {} -void path_paint(paint_session * session, uint16 height, const rct_tile_element * tileElement) {} -void scenery_paint(paint_session * session, uint8 direction, int height, const rct_tile_element * tileElement) {} -void fence_paint(paint_session * session, uint8 direction, int height, const rct_tile_element * tileElement) {} -void large_scenery_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement) {} +void entrance_paint(paint_session * session, uint8_t direction, int height, const rct_tile_element * tile_element) {} +void banner_paint(paint_session * session, uint8_t direction, int height, const rct_tile_element * tile_element) {} +void surface_paint(paint_session * session, uint8_t direction, uint16_t height, const rct_tile_element * tileElement) {} +void path_paint(paint_session * session, uint16_t height, const rct_tile_element * tileElement) {} +void scenery_paint(paint_session * session, uint8_t direction, int height, const rct_tile_element * tileElement) {} +void fence_paint(paint_session * session, uint8_t direction, int height, const rct_tile_element * tileElement) {} +void large_scenery_paint(paint_session * session, uint8_t direction, uint16_t height, const rct_tile_element * tileElement) {} Ride *get_ride(int index) { if (index < 0 || index >= MAX_RIDES) { @@ -135,7 +135,7 @@ bool rct_tile_element::IsLastForTile() const return (this->flags & TILE_ELEMENT_FLAG_LAST_TILE) != 0; } -uint8 rct_tile_element::GetType() const +uint8_t rct_tile_element::GetType() const { return this->type & TILE_ELEMENT_TYPE_MASK; } @@ -144,7 +144,7 @@ int tile_element_get_direction(const rct_tile_element *element) { return element->type & TILE_ELEMENT_DIRECTION_MASK; } -int tile_element_get_direction_with_offset(const rct_tile_element *element, uint8 offset) { +int tile_element_get_direction_with_offset(const rct_tile_element *element, uint8_t offset) { return ((element->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK; } @@ -160,13 +160,13 @@ int tile_element_get_station(const rct_tile_element * tileElement) { return (tileElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK) >> 4; } -void tile_element_set_station(rct_tile_element * tileElement, uint32 stationIndex) +void tile_element_set_station(rct_tile_element * tileElement, uint32_t stationIndex) { tileElement->properties.track.sequence &= ~MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK; tileElement->properties.track.sequence |= (stationIndex << 4); } -sint32 tile_element_get_track_sequence(const rct_tile_element * tileElement) +int32_t tile_element_get_track_sequence(const rct_tile_element * tileElement) { return tileElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK; } @@ -221,7 +221,7 @@ void tile_element_decrement_onride_photo_timout(rct_tile_element * tileElement) } } -sint32 surface_get_water_height(const rct_tile_element * tileElement) +int32_t surface_get_water_height(const rct_tile_element * tileElement) { return tileElement->properties.surface.terrain & TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK; } @@ -231,7 +231,7 @@ bool ride_type_has_flag(int rideType, int flag) return (RideProperties[rideType].flags & flag) != 0; } -sint16 get_height_marker_offset() +int16_t get_height_marker_offset() { return 0; } @@ -268,32 +268,32 @@ bool is_csg_loaded() return false; } -uint8 track_element_get_colour_scheme(const rct_tile_element * tileElement) +uint8_t track_element_get_colour_scheme(const rct_tile_element * tileElement) { return tileElement->properties.track.colour & 0x3; } -uint16 track_element_get_maze_entry(const rct_tile_element * tileElement) +uint16_t track_element_get_maze_entry(const rct_tile_element * tileElement) { return tileElement->properties.track.maze_entry; } -uint8 track_element_get_ride_index(const rct_tile_element * tileElement) +uint8_t track_element_get_ride_index(const rct_tile_element * tileElement) { return tileElement->properties.track.ride_index; } -void track_element_set_ride_index(rct_tile_element * tileElement, uint8 rideIndex) +void track_element_set_ride_index(rct_tile_element * tileElement, uint8_t rideIndex) { tileElement->properties.track.ride_index = rideIndex; } -uint8 track_element_get_type(const rct_tile_element * tileElement) +uint8_t track_element_get_type(const rct_tile_element * tileElement) { return tileElement->properties.track.type; } -void track_element_set_type(rct_tile_element * tileElement, uint8 type) +void track_element_set_type(rct_tile_element * tileElement, uint8_t type) { tileElement->properties.track.type = type; } @@ -308,12 +308,12 @@ void track_element_clear_cable_lift(rct_tile_element * trackElement) trackElement->properties.track.colour &= ~TRACK_ELEMENT_COLOUR_FLAG_CABLE_LIFT; } -TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const sint32 stationIndex) +TileCoordsXYZD ride_get_entrance_location(const Ride * ride, const int32_t stationIndex) { return ride->entrances[stationIndex]; } -TileCoordsXYZD ride_get_exit_location(const Ride * ride, const sint32 stationIndex) +TileCoordsXYZD ride_get_exit_location(const Ride * ride, const int32_t stationIndex) { return ride->exits[stationIndex]; } diff --git a/test/testpaint/FunctionCall.cpp b/test/testpaint/FunctionCall.cpp index 2291ed3412..3171d3b935 100644 --- a/test/testpaint/FunctionCall.cpp +++ b/test/testpaint/FunctionCall.cpp @@ -22,7 +22,7 @@ enum SpriteGroup { }; static void canonicalizeFunctionCall(function_call *call); -static SpriteGroup getSpriteGroup(uint16 spriteIndex); +static SpriteGroup getSpriteGroup(uint16_t spriteIndex); bool FunctionCall::AssertsEquals(std::vector expected, std::vector actual) { if (expected.size() != actual.size()) { @@ -49,7 +49,7 @@ bool FunctionCall::AssertsEquals(function_call expected, function_call actual) { return false; } - uint8 function = expected.function; + uint8_t function = expected.function; if (function == SUPPORTS_WOOD_A || function == SUPPORTS_WOOD_B) { if (expected.supports.type != actual.supports.type) return false; @@ -117,7 +117,7 @@ static void canonicalizeFunctionCall(function_call *call) { call->function = PAINT_98196C; } -static SpriteGroup getSpriteGroup(uint16 spriteIndex) { +static SpriteGroup getSpriteGroup(uint16_t spriteIndex) { if (spriteIndex >= 14568 && spriteIndex <= 14571) { return SPRITEGROUP_FENCE_METAL_A; } diff --git a/test/testpaint/FunctionCall.hpp b/test/testpaint/FunctionCall.hpp index 3d9443e502..38787902a5 100644 --- a/test/testpaint/FunctionCall.hpp +++ b/test/testpaint/FunctionCall.hpp @@ -29,25 +29,25 @@ enum struct function_call { - uint8 function; + uint8_t function; struct paint { - uint32 image_id; + uint32_t image_id; LocationXY16 offset; LocationXYZ16 bound_box_length; - sint16 z_offset; + int16_t z_offset; LocationXYZ16 bound_box_offset; - uint32 rotation; + uint32_t rotation; paint_struct output_struct; } paint; struct supports { int type; - uint8 segment; + uint8_t segment; int special; int height; - uint32 colour_flags; - sint32 prepend_to; + uint32_t colour_flags; + int32_t prepend_to; } supports; }; diff --git a/test/testpaint/GeneralSupportHeightCall.hpp b/test/testpaint/GeneralSupportHeightCall.hpp index 260aa669d7..30d9e540db 100644 --- a/test/testpaint/GeneralSupportHeightCall.hpp +++ b/test/testpaint/GeneralSupportHeightCall.hpp @@ -12,8 +12,8 @@ #include struct SupportCall { - sint32 height; - sint16 slope; + int32_t height; + int16_t slope; friend bool operator==(const SupportCall& lhs, const SupportCall& rhs) { if (lhs.height != rhs.height) return false; diff --git a/test/testpaint/Hook.cpp b/test/testpaint/Hook.cpp index 2da33d598f..dca0bb0ebf 100644 --- a/test/testpaint/Hook.cpp +++ b/test/testpaint/Hook.cpp @@ -23,8 +23,8 @@ #include "Hook.h" void* _hookTableAddress = 0; -sint32 _hookTableOffset = 0; -sint32 _maxHooks = 1000; +int32_t _hookTableOffset = 0; +int32_t _maxHooks = 1000; #define HOOK_BYTE_COUNT (140) registers gHookRegisters = {}; @@ -37,10 +37,10 @@ registers gHookRegisters = {}; *(data + 2) = ((addr) & 0x00ff0000) >> 16; \ *(data + 3) = ((addr) & 0xff000000) >> 24; -static void hookfunc(uintptr_t address, uintptr_t hookAddress, sint32 stacksize) +static void hookfunc(uintptr_t address, uintptr_t hookAddress, int32_t stacksize) { - sint32 i = 0; - uint8 data[HOOK_BYTE_COUNT] = {}; + int32_t i = 0; + uint8_t data[HOOK_BYTE_COUNT] = {}; uintptr_t registerAddress = (uintptr_t) &gHookRegisters; @@ -175,9 +175,9 @@ void addhook(uintptr_t address, hook_function function) if (_hookTableOffset > _maxHooks) { return; } - uint32 hookaddress = (uint32)((uint64)(_hookTableAddress) & 0xFFFFFFFF) + (_hookTableOffset * HOOK_BYTE_COUNT); - uint8 data[9]; - sint32 i = 0; + uint32_t hookaddress = (uint32_t)((uint64_t)(_hookTableAddress) & 0xFFFFFFFF) + (_hookTableOffset * HOOK_BYTE_COUNT); + uint8_t data[9]; + int32_t i = 0; data[i++] = 0xE9; // jmp write_address_strictalias(&data[i], hookaddress - address - i - 4); @@ -188,7 +188,7 @@ void addhook(uintptr_t address, hook_function function) WriteProcessMemory(GetCurrentProcess(), (LPVOID)address, data, i, 0); #else // We own the pages with PROT_WRITE | PROT_EXEC, we can simply just memcpy the data - sint32 err = mprotect((void *)0x401000, 0x8a4000 - 0x401000, PROT_READ | PROT_WRITE); + int32_t err = mprotect((void *)0x401000, 0x8a4000 - 0x401000, PROT_READ | PROT_WRITE); if (err != 0) { perror("mprotect"); diff --git a/test/testpaint/Hook.h b/test/testpaint/Hook.h index f3a9c40126..6a231655ec 100644 --- a/test/testpaint/Hook.h +++ b/test/testpaint/Hook.h @@ -23,7 +23,7 @@ enum { X86_FLAG_SIGN = 1 << 7, }; -using hook_function = uint8 (*)(registers * regs); +using hook_function = uint8_t (*)(registers * regs); void addhook(uintptr_t address, hook_function function); diff --git a/test/testpaint/PaintIntercept.cpp b/test/testpaint/PaintIntercept.cpp index d4b67dbfd2..296e0ab742 100644 --- a/test/testpaint/PaintIntercept.cpp +++ b/test/testpaint/PaintIntercept.cpp @@ -22,23 +22,23 @@ paint_session gPaintSession; static bool _woodenSupports = false; -static uint8 _callCount = 0; +static uint8_t _callCount = 0; static function_call _calls[256] = {}; static paint_struct _paintStructs = {}; namespace PaintIntercept { - static uint8 InterceptWoodenASupports(registers *regs); - static uint8 InterceptWoodenBSupports(registers *regs); - static uint8 InterceptMetalASupports(registers *regs); - static uint8 InterceptMetalBSupports(registers *regs); - static uint8 InterceptPaint6C(registers *regs); - static uint8 InterceptPaint7C(registers *regs); - static uint8 InterceptPaint8C(registers *regs); - static uint8 InterceptPaint9C(registers *regs); - static uint8 InterceptPaintFull(uint8 function, registers *regs); + static uint8_t InterceptWoodenASupports(registers *regs); + static uint8_t InterceptWoodenBSupports(registers *regs); + static uint8_t InterceptMetalASupports(registers *regs); + static uint8_t InterceptMetalBSupports(registers *regs); + static uint8_t InterceptPaint6C(registers *regs); + static uint8_t InterceptPaint7C(registers *regs); + static uint8_t InterceptPaint8C(registers *regs); + static uint8_t InterceptPaint9C(registers *regs); + static uint8_t InterceptPaintFull(uint8_t function, registers *regs); - bool PaintMetalSupports(uint8 function, int supportType, uint8 segment, int special, int height, uint32 imageColourFlags, const support_height * supportSegments); - bool PaintWoodenSupports(uint8 function, int supportType, int special, int height, uint32 imageColourFlags, bool *underground, const paint_struct * prependTo); + bool PaintMetalSupports(uint8_t function, int supportType, uint8_t segment, int special, int height, uint32_t imageColourFlags, const support_height * supportSegments); + bool PaintWoodenSupports(uint8_t function, int supportType, int special, int height, uint32_t imageColourFlags, bool *underground, const paint_struct * prependTo); static void CheckSegmentSupportHeight(const support_height * supportSegments); void InitHooks() { @@ -69,7 +69,7 @@ namespace PaintIntercept { addhook(0x00687902, InterceptPaint9C); } - bool PaintWoodenSupports(uint8 function, int supportType, int special, int height, uint32 imageColourFlags, bool *underground, const paint_struct * prependTo) { + bool PaintWoodenSupports(uint8_t function, int supportType, int special, int height, uint32_t imageColourFlags, bool *underground, const paint_struct * prependTo) { function_call * call = &_calls[_callCount]; call->function = function; call->supports.type = supportType; @@ -95,7 +95,7 @@ namespace PaintIntercept { return _woodenSupports; } - bool PaintMetalSupports(uint8 function, int supportType, uint8 segment, int special, int height, uint32 imageColourFlags, const support_height * supportSegments) { + bool PaintMetalSupports(uint8_t function, int supportType, uint8_t segment, int special, int height, uint32_t imageColourFlags, const support_height * supportSegments) { CheckSegmentSupportHeight(supportSegments); function_call * call = &_calls[_callCount]; @@ -112,11 +112,11 @@ namespace PaintIntercept { } static paint_struct *Paint6C( - uint32 imageID, - sint8 xOffset, sint8 yOffset, - sint16 boundBoxLengthX, sint16 boundBoxLengthY, sint8 boundBoxLengthZ, - sint16 zOffset, - uint32 rotation + uint32_t imageID, + int8_t xOffset, int8_t yOffset, + int16_t boundBoxLengthX, int16_t boundBoxLengthY, int8_t boundBoxLengthZ, + int16_t zOffset, + uint32_t rotation ) { function_call * call = &_calls[_callCount]; call->function = PAINT_98196C; @@ -132,13 +132,13 @@ namespace PaintIntercept { } static paint_struct *PaintFull( - uint8 function, - uint32 imageID, - sint8 xOffset, sint8 yOffset, - sint16 boundBoxLengthX, sint16 boundBoxLengthY, sint8 boundBoxLengthZ, - sint16 zOffset, - sint16 boundBoxOffsetX, sint16 boundBoxOffsetY, sint16 boundBoxOffsetZ, - uint32 rotation + uint8_t function, + uint32_t imageID, + int8_t xOffset, int8_t yOffset, + int16_t boundBoxLengthX, int16_t boundBoxLengthY, int8_t boundBoxLengthZ, + int16_t zOffset, + int16_t boundBoxOffsetX, int16_t boundBoxOffsetY, int16_t boundBoxOffsetZ, + uint32_t rotation ) { function_call * call = &_calls[_callCount]; call->function = function; @@ -168,16 +168,16 @@ namespace PaintIntercept { _woodenSupports = enabled; } - static uint8 InterceptMetalASupports(registers *regs) + static uint8_t InterceptMetalASupports(registers *regs) { - bool output = PaintMetalSupports(SUPPORTS_METAL_A, regs->edi, regs->ebx, (sint16) regs->ax, regs->dx, regs->ebp, gSupportSegments); + bool output = PaintMetalSupports(SUPPORTS_METAL_A, regs->edi, regs->ebx, (int16_t) regs->ax, regs->dx, regs->ebp, gSupportSegments); return output ? X86_FLAG_CARRY : 0; } - static uint8 InterceptMetalBSupports(registers *regs) + static uint8_t InterceptMetalBSupports(registers *regs) { - bool output = PaintMetalSupports(SUPPORTS_METAL_B, regs->edi, regs->ebx, (sint16) regs->ax, regs->dx, regs->ebp, gSupportSegments); + bool output = PaintMetalSupports(SUPPORTS_METAL_B, regs->edi, regs->ebx, (int16_t) regs->ax, regs->dx, regs->ebp, gSupportSegments); return output ? X86_FLAG_CARRY : 0; } @@ -200,7 +200,7 @@ namespace PaintIntercept { _callCount++; } - static uint8 InterceptWoodenASupports(registers *regs) + static uint8_t InterceptWoodenASupports(registers *regs) { bool cf = false; regs->al = PaintWoodenSupports(SUPPORTS_WOOD_A, regs->edi, regs->ax, regs->dx, regs->ebp, &cf, gWoodenSupportsPrependTo); @@ -213,7 +213,7 @@ namespace PaintIntercept { return 0; } - static uint8 InterceptWoodenBSupports(registers *regs) + static uint8_t InterceptWoodenBSupports(registers *regs) { bool cf = false; regs->al = PaintWoodenSupports(SUPPORTS_WOOD_B, regs->edi, regs->ax, regs->dx, regs->ebp, &cf, gWoodenSupportsPrependTo); @@ -226,7 +226,7 @@ namespace PaintIntercept { return 0; } - static uint8 InterceptPaint6C(registers *regs) + static uint8_t InterceptPaint6C(registers *regs) { if ((regs->ebp & 0x03) != RCT2_CurrentRotation) { @@ -236,8 +236,8 @@ namespace PaintIntercept { paint_struct *out = Paint6C( regs->ebx, - (sint8) regs->al, (sint8) regs->cl, - (sint16) regs->di, (sint16) regs->si, (sint8) regs->ah, + (int8_t) regs->al, (int8_t) regs->cl, + (int16_t) regs->di, (int16_t) regs->si, (int8_t) regs->ah, regs->dx, regs->ebp & 0x03 ); @@ -252,22 +252,22 @@ namespace PaintIntercept { return 0; } - static uint8 InterceptPaint7C(registers *regs) + static uint8_t InterceptPaint7C(registers *regs) { return InterceptPaintFull(PAINT_98197C, regs); } - static uint8 InterceptPaint8C(registers *regs) + static uint8_t InterceptPaint8C(registers *regs) { return InterceptPaintFull(PAINT_98198C, regs); } - static uint8 InterceptPaint9C(registers *regs) + static uint8_t InterceptPaint9C(registers *regs) { return InterceptPaintFull(PAINT_98199C, regs); } - static uint8 InterceptPaintFull(uint8 function, registers *regs) { + static uint8_t InterceptPaintFull(uint8_t function, registers *regs) { if ((regs->ebp & 0x03) != RCT2_CurrentRotation) { // Log error log_error("Ebp is different from current rotation"); @@ -282,8 +282,8 @@ namespace PaintIntercept { paint_struct *out = PaintFull( function, regs->ebx, - (sint8) regs->al, (sint8) regs->cl, - (sint16) regs->di, (sint16) regs->si, (sint8) regs->ah, + (int8_t) regs->al, (int8_t) regs->cl, + (int16_t) regs->di, (int16_t) regs->si, (int8_t) regs->ah, regs->dx, boundOffset.x, boundOffset.y, boundOffset.z, regs->ebp & 0x03 @@ -299,33 +299,33 @@ namespace PaintIntercept { } }; -bool wooden_a_supports_paint_setup(paint_session * session, int supportType, int special, int height, uint32 imageColourFlags, bool *underground) { +bool wooden_a_supports_paint_setup(paint_session * session, int supportType, int special, int height, uint32_t imageColourFlags, bool *underground) { return PaintIntercept::PaintWoodenSupports(SUPPORTS_WOOD_A, supportType, special, height, imageColourFlags, underground, gPaintSession.WoodenSupportsPrependTo); } -bool wooden_b_supports_paint_setup(paint_session * session, int supportType, int special, int height, uint32 imageColourFlags, bool *underground) { +bool wooden_b_supports_paint_setup(paint_session * session, int supportType, int special, int height, uint32_t imageColourFlags, bool *underground) { return PaintIntercept::PaintWoodenSupports(SUPPORTS_WOOD_B, supportType, special, height, imageColourFlags, underground, gPaintSession.WoodenSupportsPrependTo); } -bool metal_a_supports_paint_setup(paint_session * session, uint8 supportType, uint8 segment, int special, int height, uint32 imageColourFlags) { +bool metal_a_supports_paint_setup(paint_session * session, uint8_t supportType, uint8_t segment, int special, int height, uint32_t imageColourFlags) { return PaintIntercept::PaintMetalSupports(SUPPORTS_METAL_A, supportType, segment, special, height, imageColourFlags, gPaintSession.SupportSegments); } -bool metal_b_supports_paint_setup(paint_session * session, uint8 supportType, uint8 segment, int special, int height, uint32 imageColourFlags) { +bool metal_b_supports_paint_setup(paint_session * session, uint8_t supportType, uint8_t segment, int special, int height, uint32_t imageColourFlags) { return PaintIntercept::PaintMetalSupports(SUPPORTS_METAL_B, supportType, segment, special, height, imageColourFlags, gPaintSession.SupportSegments); } -paint_struct *sub_98196C(paint_session * session, uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset) { +paint_struct *sub_98196C(paint_session * session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset) { return PaintIntercept::Paint6C(image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, session->CurrentRotation); } paint_struct *sub_98197C( paint_session * session, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z + uint32_t image_id, + int8_t x_offset, int8_t y_offset, + int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z ) { return PaintIntercept::PaintFull( PAINT_98197C, @@ -340,11 +340,11 @@ paint_struct *sub_98197C( paint_struct *sub_98198C( paint_session * session, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z + uint32_t image_id, + int8_t x_offset, int8_t y_offset, + int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z ) { return PaintIntercept::PaintFull( PAINT_98198C, @@ -359,11 +359,11 @@ paint_struct *sub_98198C( paint_struct *sub_98199C( paint_session * session, - uint32 image_id, - sint8 x_offset, sint8 y_offset, - sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, - sint16 z_offset, - sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z + uint32_t image_id, + int8_t x_offset, int8_t y_offset, + int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, + int16_t z_offset, + int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z ) { return PaintIntercept::PaintFull( PAINT_98199C, @@ -376,6 +376,6 @@ paint_struct *sub_98199C( ); } -bool paint_attach_to_previous_ps(paint_session * session, uint32 image_id, uint16 x, uint16 y) { +bool paint_attach_to_previous_ps(paint_session * session, uint32_t image_id, uint16_t x, uint16_t y) { return false; } diff --git a/test/testpaint/Printer.cpp b/test/testpaint/Printer.cpp index 758acc2503..2a7c81dbc7 100644 --- a/test/testpaint/Printer.cpp +++ b/test/testpaint/Printer.cpp @@ -28,7 +28,7 @@ namespace Printer { "paint_util_set_segment_support_height", }; - static std::string GetImageIdString(uint32 imageId); + static std::string GetImageIdString(uint32_t imageId); static std::string GetOffsetExpressionString(int offset); @@ -36,7 +36,7 @@ namespace Printer { static std::string PrintSideTunnelEdge(TunnelCall edge); - std::string PrintFunctionCalls(std::vector calls, uint16 baseHeight) { + std::string PrintFunctionCalls(std::vector calls, uint16_t baseHeight) { std::string out; for (auto &&call : calls) { @@ -47,7 +47,7 @@ namespace Printer { return out; } - std::string PrintFunctionCall(function_call call, uint16 baseHeight) { + std::string PrintFunctionCall(function_call call, uint16_t baseHeight) { std::string imageId = GetImageIdString(call.supports.colour_flags); assert(call.function < Util::CountOf(functionNames)); const char *functionName = functionNames[call.function]; @@ -239,12 +239,12 @@ namespace Printer { return s; } - static std::string GetImageIdString(uint32 imageId) + static std::string GetImageIdString(uint32_t imageId) { std::string result; - uint32 image = imageId & 0x7FFFF; - uint32 palette = imageId & ~0x7FFFF; + uint32_t image = imageId & 0x7FFFF; + uint32_t palette = imageId & ~0x7FFFF; std::string paletteName; if (palette == TestPaint::DEFAULT_SCHEME_TRACK) paletteName = "SCHEME_TRACK"; @@ -266,7 +266,7 @@ namespace Printer { return result; } - std::string PrintHeightOffset(uint16 height, uint16 baseHeight) { + std::string PrintHeightOffset(uint16_t height, uint16_t baseHeight) { int offset = height - baseHeight; return String::Format("height%s", GetOffsetExpressionString(offset).c_str()); diff --git a/test/testpaint/Printer.hpp b/test/testpaint/Printer.hpp index d57217d533..d6facb7836 100644 --- a/test/testpaint/Printer.hpp +++ b/test/testpaint/Printer.hpp @@ -17,12 +17,12 @@ #include "SegmentSupportHeightCall.hpp" namespace Printer { - std::string PrintFunctionCall(function_call call, uint16 baseHeight); - std::string PrintFunctionCalls(std::vector calls, uint16 baseHeight); + std::string PrintFunctionCall(function_call call, uint16_t baseHeight); + std::string PrintFunctionCalls(std::vector calls, uint16_t baseHeight); std::string PrintSegmentSupportHeightCalls(std::vector calls); std::string PrintSideTunnelCalls(TunnelCall tunnelCalls[4][4]); - std::string PrintHeightOffset(uint16 height, uint16 baseHeight); + std::string PrintHeightOffset(uint16_t height, uint16_t baseHeight); } diff --git a/test/testpaint/SegmentSupportHeightCall.cpp b/test/testpaint/SegmentSupportHeightCall.cpp index 1a76766472..f693890a13 100644 --- a/test/testpaint/SegmentSupportHeightCall.cpp +++ b/test/testpaint/SegmentSupportHeightCall.cpp @@ -27,8 +27,8 @@ static bool SortSegmentSupportCalls(SegmentSupportCall lhs, SegmentSupportCall r return lhs.segments < rhs.segments; } -std::vector SegmentSupportHeightCall::getSegmentCalls(support_height *supports, uint8 rotation) { - uint16 positionsRemaining = SEGMENTS_ALL; +std::vector SegmentSupportHeightCall::getSegmentCalls(support_height *supports, uint8_t rotation) { + uint16_t positionsRemaining = SEGMENTS_ALL; for (int i = 0; i < 9; i++) { if (supports[i].height == 0 && supports[i].slope == 0xFF) { @@ -58,7 +58,7 @@ std::vector SegmentSupportHeightCall::getSegmentCalls(suppor } } - uint16 positionsMatched = 0; + uint16_t positionsMatched = 0; for (int i = 0; i < 9; i++) { if (supports[i].height == referenceSupport.height && supports[i].slope == referenceSupport.slope) { positionsMatched |= segment_offsets[i]; diff --git a/test/testpaint/SegmentSupportHeightCall.hpp b/test/testpaint/SegmentSupportHeightCall.hpp index 1ee68884e6..f9b5efae38 100644 --- a/test/testpaint/SegmentSupportHeightCall.hpp +++ b/test/testpaint/SegmentSupportHeightCall.hpp @@ -16,9 +16,9 @@ struct SegmentSupportCall { - uint16 segments; - sint32 height; - sint16 slope; + uint16_t segments; + int32_t height; + int16_t slope; bool operator<(const SegmentSupportCall &other) const { if (height != other.height) { @@ -35,7 +35,7 @@ struct SegmentSupportCall class SegmentSupportHeightCall { public: - static std::vector getSegmentCalls(support_height supports[9], uint8 rotation); + static std::vector getSegmentCalls(support_height supports[9], uint8_t rotation); static bool CallsMatch(std::vector tileSegmentSupportCalls[4]); static bool CallsEqual(std::vector lhs, std::vector rhs); static bool FindMostCommonSupportCall(std::vector calls[4], std::vector * out); diff --git a/test/testpaint/SideTunnelCall.cpp b/test/testpaint/SideTunnelCall.cpp index 8258473abe..c3e2ef81e0 100644 --- a/test/testpaint/SideTunnelCall.cpp +++ b/test/testpaint/SideTunnelCall.cpp @@ -9,8 +9,8 @@ #include "SideTunnelCall.hpp" -sint16 SideTunnelCall::GetTunnelOffset(uint32 baseHeight, tunnel_entry calls[3]) { - for (sint16 offset = -56; offset <= 56; offset += 8) { +int16_t SideTunnelCall::GetTunnelOffset(uint32_t baseHeight, tunnel_entry calls[3]) { + for (int16_t offset = -56; offset <= 56; offset += 8) { if (calls[0].height != (baseHeight - 8 + offset) / 16) continue; if (calls[1].height != (baseHeight + 0 + offset) / 16) continue; if (calls[2].height != (baseHeight + 8 + offset) / 16) continue; @@ -23,7 +23,7 @@ sint16 SideTunnelCall::GetTunnelOffset(uint32 baseHeight, tunnel_entry calls[3]) } -TunnelCall SideTunnelCall::ExtractTunnelCalls(tunnel_entry *calls, uint8 count, uint16 baseHeight, bool *error) { +TunnelCall SideTunnelCall::ExtractTunnelCalls(tunnel_entry *calls, uint8_t count, uint16_t baseHeight, bool *error) { TunnelCall tunnelCall = {}; if (count == 0) { diff --git a/test/testpaint/SideTunnelCall.hpp b/test/testpaint/SideTunnelCall.hpp index 4c2339e649..282af7291c 100644 --- a/test/testpaint/SideTunnelCall.hpp +++ b/test/testpaint/SideTunnelCall.hpp @@ -19,14 +19,14 @@ enum { }; struct TunnelCall { - uint8 call; - sint16 offset; - uint8 type; + uint8_t call; + int16_t offset; + uint8_t type; }; namespace SideTunnelCall { - sint16 GetTunnelOffset(uint32 baseHeight, tunnel_entry calls[3]); - TunnelCall ExtractTunnelCalls(tunnel_entry * list, uint8 count, uint16 baseHeight, bool * error); + int16_t GetTunnelOffset(uint32_t baseHeight, tunnel_entry calls[3]); + TunnelCall ExtractTunnelCalls(tunnel_entry * list, uint8_t count, uint16_t baseHeight, bool * error); bool TunnelPatternsMatch(TunnelCall expected[4], TunnelCall actual[4]); void GetTunnelCallReferencePattern(TunnelCall tunnelCalls[4][4], TunnelCall (*out)[4]); diff --git a/test/testpaint/TestPaint.cpp b/test/testpaint/TestPaint.cpp index c2d0eb6214..2bffa5bd25 100644 --- a/test/testpaint/TestPaint.cpp +++ b/test/testpaint/TestPaint.cpp @@ -114,8 +114,8 @@ namespace TestPaint struct IgnoredEntry { - uint8 Direction; - uint8 TrackSequence; + uint8_t Direction; + uint8_t TrackSequence; }; static bool _ignoredAll; @@ -127,7 +127,7 @@ namespace TestPaint _ignoredEntries.clear(); } - void testIgnore(uint8 direction, uint8 trackSequence) + void testIgnore(uint8_t direction, uint8_t trackSequence) { _ignoredEntries.push_back({ direction, trackSequence }); } @@ -137,7 +137,7 @@ namespace TestPaint _ignoredAll = true; } - bool testIsIgnored(uint8 direction, uint8 trackSequence) + bool testIsIgnored(uint8_t direction, uint8_t trackSequence) { if (_ignoredAll) return true; for (const IgnoredEntry &entry : _ignoredEntries) @@ -157,7 +157,7 @@ void testpaint_clear_ignore() TestPaint::testClearIgnore(); } -void testpaint_ignore(uint8 direction, uint8 trackSequence) +void testpaint_ignore(uint8_t direction, uint8_t trackSequence) { TestPaint::testIgnore(direction, trackSequence); } @@ -167,7 +167,7 @@ void testpaint_ignore_all() TestPaint::testIgnoreAll(); } -bool testpaint_is_ignored(uint8 direction, uint8 trackSequence) +bool testpaint_is_ignored(uint8_t direction, uint8_t trackSequence) { return TestPaint::testIsIgnored(direction, trackSequence); } diff --git a/test/testpaint/TestPaint.hpp b/test/testpaint/TestPaint.hpp index f0b013d362..aad2693bf3 100644 --- a/test/testpaint/TestPaint.hpp +++ b/test/testpaint/TestPaint.hpp @@ -24,29 +24,29 @@ #define g_currently_drawn_item RCT2_GLOBAL(0x009DE578, void*) #define gEndOfPaintStructArray RCT2_GLOBAL(0x00EE7880, paint_entry *) #define gPaintSpritePosition RCT2_GLOBAL(0x009DE568, LocationXY16) -#define gPaintInteractionType RCT2_GLOBAL(0x009DE570, uint8) +#define gPaintInteractionType RCT2_GLOBAL(0x009DE570, uint8_t) #define gSupportSegments RCT2_ADDRESS(0x0141E9B4, support_height) #define gSupport RCT2_GLOBAL(0x0141E9D8, support_height) #define gWoodenSupportsPrependTo RCT2_GLOBAL(0x009DEA58, paint_struct *) #define gPaintMapPosition RCT2_GLOBAL(0x009DE574, LocationXY16) #define gLeftTunnels RCT2_ADDRESS(0x009E3138, tunnel_entry) -#define gLeftTunnelCount RCT2_GLOBAL(0x0141F56A, uint8) +#define gLeftTunnelCount RCT2_GLOBAL(0x0141F56A, uint8_t) #define gRightTunnels RCT2_ADDRESS(0x009E30B6, tunnel_entry) -#define gRightTunnelCount RCT2_GLOBAL(0x0141F56B, uint8) -#define gVerticalTunnelHeight RCT2_GLOBAL(0x009E323C, uint8) +#define gRightTunnelCount RCT2_GLOBAL(0x0141F56B, uint8_t) +#define gVerticalTunnelHeight RCT2_GLOBAL(0x009E323C, uint8_t) #define gSurfaceElement RCT2_GLOBAL(0x009E3250, rct_tile_element *) #define gDidPassSurface RCT2_GLOBAL(0x009DE57C, bool) -#define g141E9DB RCT2_GLOBAL(0x0141E9DB, uint8) -#define gUnk141E9DC RCT2_GLOBAL(0x0141E9DC, uint16) -#define gTrackColours RCT2_ADDRESS(0x00F44198, uint32) -#define RCT2_CurrentViewportFlags RCT2_GLOBAL(0x0141E9E4, uint32) -#define RCT2_CurrentRotation RCT2_GLOBAL(0x0141E9E0, uint8) -#define RCT2_ScenarioTicks RCT2_GLOBAL(0x00F663AC, uint32) +#define g141E9DB RCT2_GLOBAL(0x0141E9DB, uint8_t) +#define gUnk141E9DC RCT2_GLOBAL(0x0141E9DC, uint16_t) +#define gTrackColours RCT2_ADDRESS(0x00F44198, uint32_t) +#define RCT2_CurrentViewportFlags RCT2_GLOBAL(0x0141E9E4, uint32_t) +#define RCT2_CurrentRotation RCT2_GLOBAL(0x0141E9E0, uint8_t) +#define RCT2_ScenarioTicks RCT2_GLOBAL(0x00F663AC, uint32_t) #define RCT2_Rides RCT2_ADDRESS(0x013628F8, rct2_ride) #define RCT2_Unk140E9A8 RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo *) -#define RCT2_PaintBoundBoxOffsetX RCT2_GLOBAL(0x009DEA52, sint16) -#define RCT2_PaintBoundBoxOffsetY RCT2_GLOBAL(0x009DEA54, sint16) -#define RCT2_PaintBoundBoxOffsetZ RCT2_GLOBAL(0x009DEA56, sint16) +#define RCT2_PaintBoundBoxOffsetX RCT2_GLOBAL(0x009DEA52, int16_t) +#define RCT2_PaintBoundBoxOffsetY RCT2_GLOBAL(0x009DEA54, int16_t) +#define RCT2_PaintBoundBoxOffsetZ RCT2_GLOBAL(0x009DEA56, int16_t) enum { TEST_SUCCESS, @@ -56,19 +56,19 @@ enum { namespace TestPaint { - static const uint32 DEFAULT_SCHEME_TRACK = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_GREY, COLOUR_WHITE); - static const uint32 DEFAULT_SCHEME_SUPPORTS = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_LIGHT_BLUE, COLOUR_ICY_BLUE); - static const uint32 DEFAULT_SCHEME_MISC = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_DARK_PURPLE, COLOUR_LIGHT_PURPLE); - static const uint32 DEFAULT_SCHEME_3 = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_BRIGHT_PURPLE, COLOUR_DARK_BLUE); + static const uint32_t DEFAULT_SCHEME_TRACK = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_GREY, COLOUR_WHITE); + static const uint32_t DEFAULT_SCHEME_SUPPORTS = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_LIGHT_BLUE, COLOUR_ICY_BLUE); + static const uint32_t DEFAULT_SCHEME_MISC = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_DARK_PURPLE, COLOUR_LIGHT_PURPLE); + static const uint32_t DEFAULT_SCHEME_3 = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_BRIGHT_PURPLE, COLOUR_DARK_BLUE); void ResetEnvironment(); void ResetTunnels(); void ResetSupportHeights(); void testClearIgnore(); - void testIgnore(uint8 direction, uint8 trackSequence); + void testIgnore(uint8_t direction, uint8_t trackSequence); void testIgnoreAll(); - bool testIsIgnored(uint8 direction, uint8 trackSequence); + bool testIsIgnored(uint8_t direction, uint8_t trackSequence); } enum Verbosity { @@ -76,4 +76,4 @@ enum Verbosity { NORMAL, }; -int generatePaintCode(uint8 rideType); +int generatePaintCode(uint8_t rideType); diff --git a/test/testpaint/TestTrack.cpp b/test/testpaint/TestTrack.cpp index 65e9d037de..ea6da77bbc 100644 --- a/test/testpaint/TestTrack.cpp +++ b/test/testpaint/TestTrack.cpp @@ -32,13 +32,13 @@ interface ITestTrackFilter { public: virtual ~ITestTrackFilter() {} - virtual bool AppliesTo(uint8 rideType, uint8 trackType) abstract; + virtual bool AppliesTo(uint8_t rideType, uint8_t trackType) abstract; - virtual int Variations(uint8 rideType, uint8 trackType) abstract; + virtual int Variations(uint8_t rideType, uint8_t trackType) abstract; - virtual std::string VariantName(uint8 rideType, uint8 trackType, int variant) abstract; + virtual std::string VariantName(uint8_t rideType, uint8_t trackType, int variant) abstract; - virtual void ApplyTo(uint8 rideType, uint8 trackType, int variant, + virtual void ApplyTo(uint8_t rideType, uint8_t trackType, int variant, rct_tile_element *tileElement, rct_tile_element *surfaceElement, Ride *ride, rct_ride_entry *rideEntry ) abstract; @@ -46,19 +46,19 @@ public: class CableLiftFilter : public ITestTrackFilter { public: - bool AppliesTo(uint8 rideType, uint8 trackType) override { + bool AppliesTo(uint8_t rideType, uint8_t trackType) override { return rideType == RIDE_TYPE_GIGA_COASTER; } - int Variations(uint8 rideType, uint8 trackType) override { + int Variations(uint8_t rideType, uint8_t trackType) override { return 2; } - std::string VariantName(uint8 rideType, uint8 trackType, int variant) override { + std::string VariantName(uint8_t rideType, uint8_t trackType, int variant) override { return String::Format("cableLift:%d", variant); } - virtual void ApplyTo(uint8 rideType, uint8 trackType, int variant, + virtual void ApplyTo(uint8_t rideType, uint8_t trackType, int variant, rct_tile_element *tileElement, rct_tile_element *surfaceElement, Ride *ride, rct_ride_entry *rideEntry ) override { @@ -75,19 +75,19 @@ public: class ChainLiftFilter : public ITestTrackFilter { public: - bool AppliesTo(uint8 rideType, uint8 trackType) override { + bool AppliesTo(uint8_t rideType, uint8_t trackType) override { return !ride_type_has_flag(rideType, RIDE_TYPE_FLAG_FLAT_RIDE); } - int Variations(uint8 rideType, uint8 trackType) override { + int Variations(uint8_t rideType, uint8_t trackType) override { return 2; } - std::string VariantName(uint8 rideType, uint8 trackType, int variant) override { + std::string VariantName(uint8_t rideType, uint8_t trackType, int variant) override { return String::Format("chainLift:%d", variant); } - virtual void ApplyTo(uint8 rideType, uint8 trackType, int variant, + virtual void ApplyTo(uint8_t rideType, uint8_t trackType, int variant, rct_tile_element *tileElement, rct_tile_element *surfaceElement, Ride *ride, rct_ride_entry *rideEntry ) override { @@ -101,7 +101,7 @@ public: class InvertedFilter : public ITestTrackFilter { public: - bool AppliesTo(uint8 rideType, uint8 trackType) override { + bool AppliesTo(uint8_t rideType, uint8_t trackType) override { if (rideType == RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER || rideType == RIDE_TYPE_FLYING_ROLLER_COASTER || rideType == RIDE_TYPE_LAY_DOWN_ROLLER_COASTER) { @@ -111,15 +111,15 @@ public: return false; } - int Variations(uint8 rideType, uint8 trackType) override { + int Variations(uint8_t rideType, uint8_t trackType) override { return 2; } - std::string VariantName(uint8 rideType, uint8 trackType, int variant) override { + std::string VariantName(uint8_t rideType, uint8_t trackType, int variant) override { return String::Format("inverted:%d", variant); } - virtual void ApplyTo(uint8 rideType, uint8 trackType, int variant, + virtual void ApplyTo(uint8_t rideType, uint8_t trackType, int variant, rct_tile_element *tileElement, rct_tile_element *surfaceElement, Ride *ride, rct_ride_entry *rideEntry ) override { @@ -136,7 +136,7 @@ public: class EntranceStyleFilter : public ITestTrackFilter { public: - bool AppliesTo(uint8 rideType, uint8 trackType) override { + bool AppliesTo(uint8_t rideType, uint8_t trackType) override { if (trackType == TRACK_ELEM_BEGIN_STATION || trackType == TRACK_ELEM_MIDDLE_STATION || trackType == TRACK_ELEM_END_STATION) { @@ -146,15 +146,15 @@ public: return false; } - int Variations(uint8 rideType, uint8 trackType) override { + int Variations(uint8_t rideType, uint8_t trackType) override { return RIDE_ENTRANCE_STYLE_COUNT - 1; } - std::string VariantName(uint8 rideType, uint8 trackType, int variant) override { + std::string VariantName(uint8_t rideType, uint8_t trackType, int variant) override { return String::Format("entranceStyle:%d", variant); } - virtual void ApplyTo(uint8 rideType, uint8 trackType, int variant, + virtual void ApplyTo(uint8_t rideType, uint8_t trackType, int variant, rct_tile_element *tileElement, rct_tile_element *surfaceElement, Ride *ride, rct_ride_entry *rideEntry ) override { @@ -166,15 +166,15 @@ public: static void CallOriginal( - uint8 rideType, - uint8 trackType, - uint8 direction, - uint8 trackSequence, - uint16 height, + uint8_t rideType, + uint8_t trackType, + uint8_t direction, + uint8_t trackSequence, + uint16_t height, rct_tile_element *tileElement ) { - uint32 *trackDirectionList = (uint32 *) RideTypeTrackPaintFunctionsOld[rideType][trackType]; - const uint8 rideIndex = 0; + uint32_t *trackDirectionList = (uint32_t *) RideTypeTrackPaintFunctionsOld[rideType][trackType]; + const uint8_t rideIndex = 0; // Have to call from this point as it pushes esi and expects callee to pop it RCT2_CALLPROC_X( @@ -190,11 +190,11 @@ static void CallOriginal( } static void CallNew( - uint8 rideType, - uint8 trackType, - uint8 direction, - uint8 trackSequence, - uint16 height, + uint8_t rideType, + uint8_t trackType, + uint8_t direction, + uint8_t trackSequence, + uint16_t height, rct_tile_element *tileElement ) { TRACK_PAINT_FUNCTION_GETTER newPaintFunctionGetter = RideTypeTrackPaintFunctions[rideType]; @@ -203,19 +203,19 @@ static void CallNew( newPaintFunction(&gPaintSession, 0, trackSequence, direction, height, tileElement); } -using TestFunction = uint8 (*)(uint8, uint8, uint8, std::string *); +using TestFunction = uint8_t (*)(uint8_t, uint8_t, uint8_t, std::string *); -static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error); +static uint8_t TestTrackElementPaintCalls(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error); -static uint8 TestTrackElementSegmentSupportHeight(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error); +static uint8_t TestTrackElementSegmentSupportHeight(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error); -static uint8 TestTrackElementGeneralSupportHeight(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error); +static uint8_t TestTrackElementGeneralSupportHeight(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error); -static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error); +static uint8_t TestTrackElementSideTunnels(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error); -static uint8 TestTrackElementVerticalTunnels(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error); +static uint8_t TestTrackElementVerticalTunnels(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error); -uint8 TestTrack::TestPaintTrackElement(uint8 rideType, uint8 trackType, std::string *out) { +uint8_t TestTrack::TestPaintTrackElement(uint8_t rideType, uint8_t trackType, std::string *out) { if (!Utils::rideSupportsTrackType(rideType, trackType)) { return TEST_FAILED; } @@ -231,7 +231,7 @@ uint8 TestTrack::TestPaintTrackElement(uint8 rideType, uint8 trackType, std::str int sequenceCount = Utils::getTrackSequenceCount(rideType, trackType); std::string error = String::Format("rct2: 0x%08X\n", RideTypeTrackPaintFunctionsOld[rideType][trackType]); - uint8 retVal = TEST_SUCCESS; + uint8_t retVal = TEST_SUCCESS; static TestFunction functions[] = { TestTrackElementPaintCalls, @@ -255,8 +255,8 @@ uint8 TestTrack::TestPaintTrackElement(uint8 rideType, uint8 trackType, std::str return retVal; } -static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) { - uint16 height = 3 * 16; +static uint8_t TestTrackElementPaintCalls(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error) { + uint16_t height = 3 * 16; rct_tile_element tileElement = {}; tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE; @@ -301,19 +301,19 @@ static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 t } // Add an element so there's always something to add to - std::vector filler; + std::vector filler; filler.push_back(0); - std::vector> argumentPermutations; + std::vector> argumentPermutations; argumentPermutations.push_back(filler); for (size_t filterIndex = 0; filterIndex < activeFilters.size(); ++filterIndex) { ITestTrackFilter *filter = activeFilters[filterIndex]; - uint8 variantCount = filter->Variations(rideType, trackType); + uint8_t variantCount = filter->Variations(rideType, trackType); - std::vector> newArgumentPermutations; + std::vector> newArgumentPermutations; for (int variant = 0; variant < variantCount; variant++) { for (auto &&oldPermutation : argumentPermutations) { - std::vector permutation; + std::vector permutation; permutation.insert(permutation.begin(), oldPermutation.begin(), oldPermutation.end()); permutation.push_back(variant); newArgumentPermutations.push_back(permutation); @@ -329,7 +329,7 @@ static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 t std::string baseCaseName = "["; for (size_t filterIndex = 0; filterIndex < activeFilters.size(); ++filterIndex) { - uint8 &variant = arguments[1 + filterIndex]; + uint8_t &variant = arguments[1 + filterIndex]; baseCaseName += activeFilters[filterIndex]->VariantName(rideType, trackType, variant); baseCaseName += " "; @@ -342,8 +342,8 @@ static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 t RCT2_CurrentRotation = currentRotation; gPaintSession.CurrentRotation = currentRotation; for (int direction = 0; direction < 4; direction++) { - RCT2_GLOBAL(0x009DE56A, sint16) = 64; // x - RCT2_GLOBAL(0x009DE56E, sint16) = 64; // y + RCT2_GLOBAL(0x009DE56A, int16_t) = 64; // x + RCT2_GLOBAL(0x009DE56E, int16_t) = 64; // y std::string caseName = String::Format( "%srotation:%d direction:%d trackSequence:%d]", @@ -403,8 +403,8 @@ static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 t return TEST_SUCCESS; } -static uint8 TestTrackElementSegmentSupportHeight(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) { - uint16 height = 3 * 16; +static uint8_t TestTrackElementSegmentSupportHeight(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error) { + uint16_t height = 3 * 16; rct_tile_element tileElement = {}; tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE; @@ -482,8 +482,8 @@ static uint8 TestTrackElementSegmentSupportHeight(uint8 rideType, uint8 trackTyp return TEST_SUCCESS; } -static uint8 TestTrackElementGeneralSupportHeight(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) { - uint16 height = 3 * 16; +static uint8_t TestTrackElementGeneralSupportHeight(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error) { + uint16_t height = 3 * 16; rct_tile_element tileElement = {}; tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE; @@ -578,8 +578,8 @@ static uint8 TestTrackElementGeneralSupportHeight(uint8 rideType, uint8 trackTyp return TEST_SUCCESS; } -static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) { - uint16 height = 3 * 16; +static uint8_t TestTrackElementSideTunnels(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error) { + uint16_t height = 3 * 16; rct_tile_element tileElement = {}; tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE; @@ -607,12 +607,12 @@ static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 for (int direction = 0; direction < 4; direction++) { TestPaint::ResetTunnels(); - for (sint8 offset = -8; offset <= 8; offset += 8) { + for (int8_t offset = -8; offset <= 8; offset += 8) { CallOriginal(rideType, trackType, direction, trackSequence, height + offset, &tileElement); } - uint8 rightIndex = (direction + 1) % 4; - uint8 leftIndex = direction; + uint8_t rightIndex = (direction + 1) % 4; + uint8_t leftIndex = direction; for (int i = 0; i < 4; ++i) { tileTunnelCalls[direction][i].call = TUNNELCALL_SKIPPED; @@ -637,13 +637,13 @@ static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 TestPaint::testClearIgnore(); - for (sint8 offset = -8; offset <= 8; offset += 8) { + for (int8_t offset = -8; offset <= 8; offset += 8) { // TODO: move tunnel pushing to interface so we don't have to check the output 3 times CallNew(rideType, trackType, direction, trackSequence, height + offset, &tileElement); } - uint8 rightIndex = (direction + 1) % 4; - uint8 leftIndex = direction; + uint8_t rightIndex = (direction + 1) % 4; + uint8_t leftIndex = direction; for (int i = 0; i < 4; ++i) { newTileTunnelCalls[direction][i].call = TUNNELCALL_SKIPPED; @@ -694,8 +694,8 @@ static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 return TEST_SUCCESS; } -static uint8 TestTrackElementVerticalTunnels(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) { - uint16 height = 3 * 16; +static uint8_t TestTrackElementVerticalTunnels(uint8_t rideType, uint8_t trackType, uint8_t trackSequence, std::string *error) { + uint16_t height = 3 * 16; rct_tile_element tileElement = {}; tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE; @@ -716,12 +716,12 @@ static uint8 TestTrackElementVerticalTunnels(uint8 rideType, uint8 trackType, ui TestPaint::ResetEnvironment(); TestPaint::ResetTunnels(); - uint16 verticalTunnelHeights[4]; + uint16_t verticalTunnelHeights[4]; for (int direction = 0; direction < 4; direction++) { - uint8 tunnelHeights[3] = {0}; + uint8_t tunnelHeights[3] = {0}; - for (uint8 i = 0; i < 3; i++) { + for (uint8_t i = 0; i < 3; i++) { gVerticalTunnelHeight = 0; CallOriginal(rideType, trackType, direction, trackSequence, height - 8 + i * 8, &tileElement); tunnelHeights[i] = gVerticalTunnelHeight; @@ -738,7 +738,7 @@ static uint8 TestTrackElementVerticalTunnels(uint8 rideType, uint8 trackType, ui return TEST_SUCCESS; } - uint16 referenceHeight = verticalTunnelHeights[0]; + uint16_t referenceHeight = verticalTunnelHeights[0]; for (int direction = 0; direction < 4; direction++) { diff --git a/test/testpaint/TestTrack.hpp b/test/testpaint/TestTrack.hpp index 46523b1efa..1fd475d6aa 100644 --- a/test/testpaint/TestTrack.hpp +++ b/test/testpaint/TestTrack.hpp @@ -15,5 +15,5 @@ class TestTrack { public: - static uint8 TestPaintTrackElement(uint8 rideType, uint8 trackType, std::string *out); + static uint8_t TestPaintTrackElement(uint8_t rideType, uint8_t trackType, std::string *out); }; diff --git a/test/testpaint/Utils.cpp b/test/testpaint/Utils.cpp index 1382bef9d1..785f0f9f99 100644 --- a/test/testpaint/Utils.cpp +++ b/test/testpaint/Utils.cpp @@ -14,7 +14,7 @@ #include namespace Utils { - int getTrackSequenceCount(uint8 rideType, uint8 trackType) { + int getTrackSequenceCount(uint8_t rideType, uint8_t trackType) { int sequenceCount = 0; const rct_preview_track **trackBlocks; @@ -35,7 +35,7 @@ namespace Utils { return sequenceCount; } - bool rideSupportsTrackType(uint8 rideType, uint8 trackType) { + bool rideSupportsTrackType(uint8_t rideType, uint8_t trackType) { TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; if (newPaintGetter == nullptr) { @@ -53,7 +53,7 @@ namespace Utils { return true; } - bool rideIsImplemented(uint8 rideType) { + bool rideIsImplemented(uint8_t rideType) { TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; return (newPaintGetter != 0); } diff --git a/test/testpaint/Utils.hpp b/test/testpaint/Utils.hpp index 19bfdd01ea..46b5b14cf7 100644 --- a/test/testpaint/Utils.hpp +++ b/test/testpaint/Utils.hpp @@ -12,7 +12,7 @@ #include namespace Utils { - int getTrackSequenceCount(uint8 rideType, uint8 trackType); - bool rideSupportsTrackType(uint8 rideType, uint8 trackType); - bool rideIsImplemented(uint8 rideType); + int getTrackSequenceCount(uint8_t rideType, uint8_t trackType); + bool rideSupportsTrackType(uint8_t rideType, uint8_t trackType); + bool rideIsImplemented(uint8_t rideType); } diff --git a/test/testpaint/VerticalTunnelCall.cpp b/test/testpaint/VerticalTunnelCall.cpp index ec8e1930a1..5f222d4c57 100644 --- a/test/testpaint/VerticalTunnelCall.cpp +++ b/test/testpaint/VerticalTunnelCall.cpp @@ -9,12 +9,12 @@ #include "VerticalTunnelCall.hpp" -uint16 VerticalTunnelCall::GetTunnelHeight(uint16 baseHeight, uint8 *calls) { +uint16_t VerticalTunnelCall::GetTunnelHeight(uint16_t baseHeight, uint8_t *calls) { if (calls[0] == 0 && calls[1] == 0 && calls[2] == 0) { return 0; } - for (sint16 offset = 0; offset <= 256; offset += 8) { + for (int16_t offset = 0; offset <= 256; offset += 8) { if (calls[0] != (baseHeight - 8 + offset) / 16) continue; if (calls[1] != (baseHeight + 0 + offset) / 16) continue; if (calls[2] != (baseHeight + 8 + offset) / 16) continue; @@ -26,7 +26,7 @@ uint16 VerticalTunnelCall::GetTunnelHeight(uint16 baseHeight, uint8 *calls) { return 0; } -bool VerticalTunnelCall::HeightIsConsistent(uint16 *heights) { +bool VerticalTunnelCall::HeightIsConsistent(uint16_t *heights) { for (int i = 1; i < 4; ++i) { if (heights[i] != heights[0]) return false; } diff --git a/test/testpaint/VerticalTunnelCall.hpp b/test/testpaint/VerticalTunnelCall.hpp index 9f3994ebb4..660357748c 100644 --- a/test/testpaint/VerticalTunnelCall.hpp +++ b/test/testpaint/VerticalTunnelCall.hpp @@ -12,6 +12,6 @@ #include namespace VerticalTunnelCall { - uint16 GetTunnelHeight(uint16 baseHeight, uint8 *calls); - bool HeightIsConsistent(uint16 *heights); + uint16_t GetTunnelHeight(uint16_t baseHeight, uint8_t *calls); + bool HeightIsConsistent(uint16_t *heights); }; diff --git a/test/testpaint/generate.cpp b/test/testpaint/generate.cpp index c9a4b37131..2491cee0c7 100644 --- a/test/testpaint/generate.cpp +++ b/test/testpaint/generate.cpp @@ -31,7 +31,7 @@ class PaintCodeGenerator { public: - int Generate(uint8 rideType) + int Generate(uint8_t rideType) { auto filename = "paint_" + std::to_string(rideType) + ".c"; FILE * file = fopen(filename.c_str(), "w"); @@ -52,7 +52,7 @@ public: private: std::string _rideName; - uint8 _rideType; + uint8_t _rideType; FILE * _file; bool _conditionalSupports; @@ -121,9 +121,9 @@ private: if (trackType == TRACK_ELEM_END_STATION) { - const uint32 * paintFunctionList = RideTypeTrackPaintFunctionsOld[_rideType]; + const uint32_t * paintFunctionList = RideTypeTrackPaintFunctionsOld[_rideType]; WriteLine(0, "/** rct2: 0x%08X, 0x%08X, 0x%08X */", paintFunctionList[TRACK_ELEM_END_STATION], paintFunctionList[TRACK_ELEM_BEGIN_STATION], paintFunctionList[TRACK_ELEM_MIDDLE_STATION]); - WriteLine(0, "static void " + _rideName + "_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_tile_element * tileElement)"); + WriteLine(0, "static void " + _rideName + "_track_station(uint8_t rideIndex, uint8_t trackSequence, uint8_t direction, int height, rct_tile_element * tileElement)"); WriteLine(0, "{"); WriteLine(0, "}"); WriteLine(); @@ -134,7 +134,7 @@ private: void GenerateTrackFunction(int trackType) { WriteLine(0, "/** rct2: 0x%08X */", RideTypeTrackPaintFunctionsOld[_rideType][trackType]); - WriteLine(0, "static void " + GetTrackFunctionName(trackType) + "(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_tile_element * tileElement)"); + WriteLine(0, "static void " + GetTrackFunctionName(trackType) + "(uint8_t rideIndex, uint8_t trackSequence, uint8_t direction, int height, rct_tile_element * tileElement)"); WriteLine(0, "{"); if (!GenerateMirrorCall(1, trackType)) { @@ -181,7 +181,7 @@ private: bool GenerateMirrorCall(int tabs, int trackType) { - uint8 mirrorTable[][3] = { + uint8_t mirrorTable[][3] = { { 0, TRACK_ELEM_25_DEG_DOWN, TRACK_ELEM_25_DEG_UP }, { 0, TRACK_ELEM_60_DEG_DOWN, TRACK_ELEM_60_DEG_UP }, { 0, TRACK_ELEM_FLAT_TO_25_DEG_DOWN, TRACK_ELEM_25_DEG_UP_TO_FLAT }, @@ -387,7 +387,7 @@ private: std::vector calls[4], chainLiftCalls[4], cableLiftCalls[4]; TunnelCall tileTunnelCalls[4][4]; - sint16 verticalTunnelHeights[4]; + int16_t verticalTunnelHeights[4]; std::vector segmentSupportCalls[4]; support_height generalSupports[4] = {}; for (int direction = 0; direction < 4; direction++) { @@ -402,8 +402,8 @@ private: g_currently_drawn_item = &tileElement; // Set position - RCT2_GLOBAL(0x009DE56A, sint16) = 64; - RCT2_GLOBAL(0x009DE56E, sint16) = 64; + RCT2_GLOBAL(0x009DE56A, int16_t) = 64; + RCT2_GLOBAL(0x009DE56E, int16_t) = 64; function_call callBuffer[256] = {}; PaintIntercept::ClearCalls(); @@ -446,8 +446,8 @@ private: // Check a different position for direction 0 to see if supports are different if (direction == 0) { - RCT2_GLOBAL(0x009DE56A, sint16) = 64 + 32; - RCT2_GLOBAL(0x009DE56E, sint16) = 64; + RCT2_GLOBAL(0x009DE56A, int16_t) = 64 + 32; + RCT2_GLOBAL(0x009DE56E, int16_t) = 64; tileElement.type = 0; track_element_clear_cable_lift(&tileElement); PaintIntercept::ClearCalls(); @@ -636,7 +636,7 @@ private: WriteLine(tabs, s); } - std::string FormatXYSwap(sint16 x, sint16 y, int direction) + std::string FormatXYSwap(int16_t x, int16_t y, int direction) { if (direction & 1) { @@ -724,7 +724,7 @@ private: int height, rct_tile_element * tileElement, TunnelCall tileTunnelCalls[4][4], - sint16 verticalTunnelHeights[4]) + int16_t verticalTunnelHeights[4]) { TestPaint::ResetTunnels(); @@ -733,8 +733,8 @@ private: CallOriginal(trackType, direction, trackSequence, height + offset, tileElement); } - uint8 rightIndex = (4 - direction) % 4; - uint8 leftIndex = (rightIndex + 1) % 4; + uint8_t rightIndex = (4 - direction) % 4; + uint8_t leftIndex = (rightIndex + 1) % 4; for (int i = 0; i < 4; ++i) { tileTunnelCalls[direction][i].call = TUNNELCALL_SKIPPED; @@ -774,12 +774,12 @@ private: return true; } - void GenerateTunnelCall(int tabs, TunnelCall tileTunnelCalls[4][4], sint16 verticalTunnelHeights[4]) + void GenerateTunnelCall(int tabs, TunnelCall tileTunnelCalls[4][4], int16_t verticalTunnelHeights[4]) { - constexpr uint8 TunnelLeft = 0; - constexpr uint8 TunnelRight = 1; - constexpr uint8 TunnelNA = 255; - static const uint8 dsToWay[4][4] = + constexpr uint8_t TunnelLeft = 0; + constexpr uint8_t TunnelRight = 1; + constexpr uint8_t TunnelNA = 255; + static const uint8_t dsToWay[4][4] = { { TunnelRight, TunnelLeft, TunnelNA, TunnelNA }, { TunnelLeft, TunnelNA, TunnelNA, TunnelRight }, @@ -788,8 +788,8 @@ private: }; - sint16 tunnelOffset[4] = { 0 }; - uint8 tunnelType[4] = { 0xFF, 0xFF, 0xFF, 0xFF }; + int16_t tunnelOffset[4] = { 0 }; + uint8_t tunnelType[4] = { 0xFF, 0xFF, 0xFF, 0xFF }; for (int direction = 0; direction < 4; direction++) { for (int side = 0; side < 4; side++) @@ -921,7 +921,7 @@ private: } WriteLine(tabs, "paint_util_set_general_support_height(session, height%s, 0x%02X);", - GetOffsetExpressionString((sint16)generalSupports[0].height).c_str(), + GetOffsetExpressionString((int16_t)generalSupports[0].height).c_str(), generalSupports[0].slope); if (!AllMatch(generalSupports, 4)) { @@ -929,12 +929,12 @@ private: } } - std::string GetImageIdString(uint32 imageId) + std::string GetImageIdString(uint32_t imageId) { std::string result; - uint32 image = imageId & 0x7FFFF; - uint32 palette = imageId & ~0x7FFFF; + uint32_t image = imageId & 0x7FFFF; + uint32_t palette = imageId & ~0x7FFFF; std::string paletteName; if (palette == TestPaint::DEFAULT_SCHEME_TRACK) paletteName = "gTrackColours[SCHEME_TRACK]"; @@ -996,7 +996,7 @@ private: TestPaint::ResetEnvironment(); TestPaint::ResetSupportHeights(); - uint32 *trackDirectionList = (uint32 *)RideTypeTrackPaintFunctionsOld[_rideType][trackType]; + uint32_t *trackDirectionList = (uint32_t *)RideTypeTrackPaintFunctionsOld[_rideType][trackType]; // Have to call from this point as it pushes esi and expects callee to pop it RCT2_CALLPROC_X( 0x006C4934, @@ -1084,7 +1084,7 @@ private: } }; -int generatePaintCode(uint8 rideType) +int generatePaintCode(uint8_t rideType) { if (ride_type_has_flag(rideType, RIDE_TYPE_FLAG_FLAT_RIDE)) { diff --git a/test/testpaint/main.cpp b/test/testpaint/main.cpp index 0513025609..004be9c152 100644 --- a/test/testpaint/main.cpp +++ b/test/testpaint/main.cpp @@ -31,8 +31,8 @@ #include struct TestCase { - uint8 rideType; - std::vector trackTypes; + uint8_t rideType; + std::vector trackTypes; }; enum CLIColour { @@ -186,7 +186,7 @@ int main(int argc, char *argv[]); static HMODULE _dllModule = nullptr; -utf8 *utf8_write_codepoint(utf8 *dst, uint32 codepoint) +utf8 *utf8_write_codepoint(utf8 *dst, uint32_t codepoint) { if (codepoint <= 0x7F) { dst[0] = (utf8)codepoint; @@ -274,10 +274,10 @@ __declspec(dllexport) int StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInsta char *segments = (char *)(GOOD_PLACE_FOR_DATA_SEGMENT); -static uint32 sawyercoding_calculate_checksum(const uint8* buffer, size_t length) +static uint32_t sawyercoding_calculate_checksum(const uint8_t* buffer, size_t length) { size_t i; - uint32 checksum = 0; + uint32_t checksum = 0; for (i = 0; i < length; i++) checksum += buffer[i]; @@ -352,10 +352,10 @@ static bool openrct2_setup_rct2_segment() // Check that the expected data is at various addresses. // Start at 0x9a6000, which is start of .data, to skip the region containing addresses to DLL // calls, which can be changed by windows/wine loader. - const uint32 c1 = sawyercoding_calculate_checksum((const uint8*)(segments + (uintptr_t)(0x009A6000 - 0x8a4000)), 0x009E0000 - 0x009A6000); - const uint32 c2 = sawyercoding_calculate_checksum((const uint8*)(segments + (uintptr_t)(0x01428000 - 0x8a4000)), 0x014282BC - 0x01428000); - const uint32 exp_c1 = 10114815; - const uint32 exp_c2 = 23564; + const uint32_t c1 = sawyercoding_calculate_checksum((const uint8_t*)(segments + (uintptr_t)(0x009A6000 - 0x8a4000)), 0x009E0000 - 0x009A6000); + const uint32_t c2 = sawyercoding_calculate_checksum((const uint8_t*)(segments + (uintptr_t)(0x01428000 - 0x8a4000)), 0x014282BC - 0x01428000); + const uint32_t exp_c1 = 10114815; + const uint32_t exp_c2 = 23564; if (c1 != exp_c1 || c2 != exp_c2) { log_warning("c1 = %u, expected %u, match %d", c1, exp_c1, c1 == exp_c1); log_warning("c2 = %u, expected %u, match %d", c2, exp_c2, c2 == exp_c2); @@ -367,7 +367,7 @@ static bool openrct2_setup_rct2_segment() static void PrintRideTypes() { - for (uint8 rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) { + for (uint8_t rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) { CLIColour colour = CLIColour::DEFAULT; bool implemented = Utils::rideIsImplemented(rideType); const char * rideName = RideNames[rideType]; @@ -421,7 +421,7 @@ int main(int argc, char *argv[]) { std::vector testCases; bool generate = false; - uint8 specificRideType = 0xFF; + uint8_t specificRideType = 0xFF; for (int i = 0; i < argc; ++i) { char *arg = argv[i]; if (strcmp(arg, "--gtest_color=no") == 0) { @@ -456,7 +456,7 @@ int main(int argc, char *argv[]) { return generatePaintCode(specificRideType); } - for (uint8 rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) { + for (uint8_t rideType = 0; rideType < RIDE_TYPE_COUNT; rideType++) { if (specificRideType != RIDE_TYPE_NULL && rideType != specificRideType) { continue; } diff --git a/test/tests/CryptTests.cpp b/test/tests/CryptTests.cpp index d18cc85265..7f81175e87 100644 --- a/test/tests/CryptTests.cpp +++ b/test/tests/CryptTests.cpp @@ -122,7 +122,7 @@ TEST_F(CryptTests, SHA1_Many) TEST_F(CryptTests, RSA_Basic) { - std::vector data = { 0, 1, 2, 3, 4, 5, 6, 7 }; + std::vector data = { 0, 1, 2, 3, 4, 5, 6, 7 }; auto file = File::ReadAllText(GetTestPrivateKeyPath()); auto key = Crypt::CreateRSAKey(); @@ -136,7 +136,7 @@ TEST_F(CryptTests, RSA_Basic) TEST_F(CryptTests, RSA_VerifyWithPublic) { - std::vector data = { 7, 6, 5, 4, 3, 2, 1, 0 }; + std::vector data = { 7, 6, 5, 4, 3, 2, 1, 0 }; auto privateFile = File::ReadAllText(GetTestPrivateKeyPath()); auto privateKey = Crypt::CreateRSAKey(); diff --git a/test/tests/ImageImporterTests.cpp b/test/tests/ImageImporterTests.cpp index 585cadcbd1..79df287558 100644 --- a/test/tests/ImageImporterTests.cpp +++ b/test/tests/ImageImporterTests.cpp @@ -23,12 +23,12 @@ public: return Path::Combine(TestData::GetBasePath(), "images", name.data()); } - static uint32 GetHash(void * buffer, size_t bufferLength) + static uint32_t GetHash(void * buffer, size_t bufferLength) { - uint32 hash = 27; + uint32_t hash = 27; for (size_t i = 0; i < bufferLength; i++) { - hash = (13 * hash) + ((uint8 *)buffer)[i]; + hash = (13 * hash) + ((uint8_t *)buffer)[i]; } return hash; } diff --git a/test/tests/IniReaderTest.cpp b/test/tests/IniReaderTest.cpp index 63394e7f21..f98d6e8c1d 100644 --- a/test/tests/IniReaderTest.cpp +++ b/test/tests/IniReaderTest.cpp @@ -24,7 +24,7 @@ protected: static const std::string caseInsensitive; }; -static auto Enum_Currency = ConfigEnum({}); +static auto Enum_Currency = ConfigEnum({}); TEST_F(IniReaderTest, create_empty) { @@ -35,9 +35,9 @@ TEST_F(IniReaderTest, create_empty) ASSERT_NE(ir, nullptr); ASSERT_EQ(ir->GetBoolean("nobody", true), true); ASSERT_EQ(ir->GetCString("expects", nullptr), nullptr); - ASSERT_EQ(ir->GetEnum("spanish", 12345, Enum_Currency), 12345); + ASSERT_EQ(ir->GetEnum("spanish", 12345, Enum_Currency), 12345); ASSERT_EQ(ir->GetFloat("inquisition", 1.234f), 1.234f); - ASSERT_EQ(ir->GetSint32("universal_answer", 42), 42); + ASSERT_EQ(ir->Getint32_t("universal_answer", 42), 42); delete ir; } @@ -51,23 +51,23 @@ TEST_F(IniReaderTest, read_prepared) ASSERT_EQ(ir->ReadSection("doesnt_exist"), false); ASSERT_EQ(ir->ReadSection("bool"), true); // name of section - ASSERT_EQ(ir->GetSint32("bool", 42), 42); + ASSERT_EQ(ir->Getint32_t("bool", 42), 42); // value from different section - ASSERT_EQ(ir->GetSint32("one", 42), 42); + ASSERT_EQ(ir->Getint32_t("one", 42), 42); // existing value as different type - ASSERT_EQ(ir->GetSint32("boolval", 42), 42); + ASSERT_EQ(ir->Getint32_t("boolval", 42), 42); ASSERT_EQ(ir->GetBoolean("boolval", false), true); // skip one section ASSERT_EQ(ir->ReadSection("string"), true); // values from different sections - ASSERT_EQ(ir->GetSint32("one", 42), 42); + ASSERT_EQ(ir->Getint32_t("one", 42), 42); ASSERT_EQ(ir->GetBoolean("boolval", false), true); const utf8 * str = ir->GetCString("path", nullptr); ASSERT_STREQ(str, u8"C:'\\some/dir\\here/神鷹暢遊"); Memory::Free(str); // go back a section ASSERT_EQ(ir->ReadSection("int"), true); - ASSERT_EQ(ir->GetSint32("one", 42), 1); + ASSERT_EQ(ir->Getint32_t("one", 42), 1); delete ir; } @@ -90,7 +90,7 @@ TEST_F(IniReaderTest, read_duplicate) ASSERT_EQ(ir->GetBoolean("one", false), false); ASSERT_EQ(ir->GetBoolean("two", false), false); ASSERT_EQ(ir->GetBoolean("three", false), true); - ASSERT_EQ(ir->GetSint32("fortytwo", 100), 41); + ASSERT_EQ(ir->Getint32_t("fortytwo", 100), 41); ASSERT_EQ(ir->ReadSection("section"), true); // test 4 times, there are only 3 sections ASSERT_EQ(ir->ReadSection("section"), true); diff --git a/test/tests/IniWriterTest.cpp b/test/tests/IniWriterTest.cpp index d6341eb1c8..9d45a6b11a 100644 --- a/test/tests/IniWriterTest.cpp +++ b/test/tests/IniWriterTest.cpp @@ -19,8 +19,8 @@ class IniWriterTest : public testing::Test { }; -static auto Enum_Currency = ConfigEnum({ - ConfigEnumEntry("GBP", 1), +static auto Enum_Currency = ConfigEnum({ + ConfigEnumEntry("GBP", 1), }); TEST_F(IniWriterTest, create_empty) @@ -39,7 +39,7 @@ TEST_F(IniWriterTest, create_one_section) IIniWriter * iw = CreateIniWriter(&ms); ASSERT_NE(iw, nullptr); iw->WriteSection("OpenRCT2"); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 12); ASSERT_LE(ms.GetPosition(), 13); // Accommodate for varying-sized newline (Windows) @@ -60,7 +60,7 @@ TEST_F(IniWriterTest, create_multiple_sections) iw->WriteSection("OpenRCT2"); iw->WriteSection("OpenRCT3"); iw->WriteSection("OpenRCT4"); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 48); ASSERT_LE(ms.GetPosition(), 55); // Accommodate for varying-sized newline (Windows) @@ -79,7 +79,7 @@ TEST_F(IniWriterTest, create_loose_bool_entry) IIniWriter * iw = CreateIniWriter(&ms); ASSERT_NE(iw, nullptr); iw->WriteBoolean("boolval", true); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 16); ASSERT_LE(ms.GetPosition(), 17); // Accommodate for varying-sized newline (Windows) @@ -97,15 +97,15 @@ TEST_F(IniWriterTest, create_loose_enum_entry) IIniWriter * iw = CreateIniWriter(&ms); ASSERT_NE(iw, nullptr); iw->WriteEnum("by_string", "stringval"); - iw->WriteEnum("sint32", 0, Enum_Currency); - uint8 null_terminator = 0; + iw->WriteEnum("int32_t", 0, Enum_Currency); + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 34); ASSERT_LE(ms.GetPosition(), 36); // Accommodate for varying-sized newline (Windows) ASSERT_EQ(ms.GetLength(), ms.GetPosition()); ms.SetPosition(0); const char * ini = (const char *)ms.ReadString(); - ASSERT_STREQ(ini, "by_string = stringval" PLATFORM_NEWLINE "sint32 = 0" PLATFORM_NEWLINE); + ASSERT_STREQ(ini, "by_string = stringval" PLATFORM_NEWLINE "int32_t = 0" PLATFORM_NEWLINE); Memory::Free(ini); delete iw; } @@ -116,7 +116,7 @@ TEST_F(IniWriterTest, create_loose_float_entry) IIniWriter * iw = CreateIniWriter(&ms); ASSERT_NE(iw, nullptr); iw->WriteFloat("one", 1.); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 16); ASSERT_LE(ms.GetPosition(), 17); // Accommodate for varying-sized newline (Windows) @@ -129,17 +129,17 @@ TEST_F(IniWriterTest, create_loose_float_entry) delete iw; } -TEST_F(IniWriterTest, create_loose_sint32_entry) +TEST_F(IniWriterTest, create_loose_int32_t_entry) { MemoryStream ms(1000); IIniWriter * iw = CreateIniWriter(&ms); ASSERT_NE(iw, nullptr); - iw->WriteSint32("one", 1); - iw->WriteSint32("zero", 0); - iw->WriteSint32("minusone", -1); - iw->WriteSint32("intmin", (std::numeric_limits::min)()); - iw->WriteSint32("intmax", (std::numeric_limits::max)()); - uint8 null_terminator = 0; + iw->Writeint32_t("one", 1); + iw->Writeint32_t("zero", 0); + iw->Writeint32_t("minusone", -1); + iw->Writeint32_t("intmin", (std::numeric_limits::min)()); + iw->Writeint32_t("intmax", (std::numeric_limits::max)()); + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 73); ASSERT_LE(ms.GetPosition(), 78); // Accommodate for varying-sized newline (Windows) @@ -158,7 +158,7 @@ TEST_F(IniWriterTest, create_loose_string_entry) IIniWriter * iw = CreateIniWriter(&ms); ASSERT_NE(iw, nullptr); iw->WriteString("path", u8"C:'\\some/dir\\here/神鷹暢遊"); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 43); ASSERT_LE(ms.GetPosition(), 44); // Accommodate for varying-sized newline (Windows) @@ -178,11 +178,11 @@ TEST_F(IniWriterTest, create_multiple_section_with_values) iw->WriteSection("bool"); iw->WriteBoolean("boolval", true); iw->WriteSection("int"); - iw->WriteSint32("one", 1); - iw->WriteSint32("zero", 0); + iw->Writeint32_t("one", 1); + iw->Writeint32_t("zero", 0); iw->WriteSection("string"); iw->WriteString("path", u8"C:'\\some/dir\\here/神鷹暢遊"); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 99); ASSERT_LE(ms.GetPosition(), 108); // Accommodate for varying-sized newline (Windows) @@ -205,7 +205,7 @@ TEST_F(IniWriterTest, create_duplicate_sections) iw->WriteSection("section"); iw->WriteSection("section"); iw->WriteSection("section"); - uint8 null_terminator = 0; + uint8_t null_terminator = 0; ms.Write(&null_terminator, 1); ASSERT_GE(ms.GetPosition(), 33); ASSERT_LE(ms.GetPosition(), 43); // Accommodate for varying-sized newline (Windows) diff --git a/test/tests/MultiLaunch.cpp b/test/tests/MultiLaunch.cpp index f9bdb6b52f..cd542343d0 100644 --- a/test/tests/MultiLaunch.cpp +++ b/test/tests/MultiLaunch.cpp @@ -25,7 +25,7 @@ using namespace OpenRCT2; -constexpr sint32 updatesToTest = 10; +constexpr int32_t updatesToTest = 10; TEST(MultiLaunchTest, all) { diff --git a/test/tests/sawyercoding_test.cpp b/test/tests/sawyercoding_test.cpp index c88f858db0..f4ba83964f 100644 --- a/test/tests/sawyercoding_test.cpp +++ b/test/tests/sawyercoding_test.cpp @@ -17,27 +17,27 @@ constexpr size_t BUFFER_SIZE = 0x600000; class SawyerCodingTest : public testing::Test { protected: - static const uint8 randomdata[1024]; - static const uint8 nonedata[1029]; - static const uint8 rledata[1038]; - static const uint8 rlecompresseddata[1949]; - static const uint8 rotatedata[1029]; + static const uint8_t randomdata[1024]; + static const uint8_t nonedata[1029]; + static const uint8_t rledata[1038]; + static const uint8_t rlecompresseddata[1949]; + static const uint8_t rotatedata[1029]; - void test_encode_decode(uint8 encoding_type) + void test_encode_decode(uint8_t encoding_type) { // Encode sawyercoding_chunk_header chdr_in; chdr_in.encoding = encoding_type; chdr_in.length = sizeof(randomdata); - uint8 * encodedDataBuffer = new uint8[BUFFER_SIZE]; - size_t encodedDataSize = sawyercoding_write_chunk_buffer(encodedDataBuffer, (const uint8 *)randomdata, chdr_in); + uint8_t * encodedDataBuffer = new uint8_t[BUFFER_SIZE]; + size_t encodedDataSize = sawyercoding_write_chunk_buffer(encodedDataBuffer, (const uint8_t *)randomdata, chdr_in); ASSERT_GT(encodedDataSize, sizeof(sawyercoding_chunk_header)); // Decode MemoryStream ms(encodedDataBuffer, encodedDataSize); SawyerChunkReader reader(&ms); auto chunk = reader.ReadChunk(); - ASSERT_EQ((uint8)chunk->GetEncoding(), chdr_in.encoding); + ASSERT_EQ((uint8_t)chunk->GetEncoding(), chdr_in.encoding); ASSERT_EQ(chunk->GetLength(), chdr_in.length); auto result = memcmp(chunk->GetData(), randomdata, sizeof(randomdata)); ASSERT_EQ(result, 0); @@ -45,7 +45,7 @@ protected: delete[] encodedDataBuffer; } - void test_decode(const uint8 * data, size_t size) + void test_decode(const uint8_t * data, size_t size) { auto expectedLength = size - sizeof(sawyercoding_chunk_header); auto chdr_in = reinterpret_cast(data); @@ -54,7 +54,7 @@ protected: MemoryStream ms(data, size); SawyerChunkReader reader(&ms); auto chunk = reader.ReadChunk(); - ASSERT_EQ((uint8)chunk->GetEncoding(), chdr_in->encoding); + ASSERT_EQ((uint8_t)chunk->GetEncoding(), chdr_in->encoding); ASSERT_EQ(chunk->GetLength(), sizeof(randomdata)); auto result = memcmp(chunk->GetData(), randomdata, sizeof(randomdata)); ASSERT_EQ(result, 0); @@ -108,7 +108,7 @@ TEST_F(SawyerCodingTest, decode_chunk_rotate) // 1024 bytes of random data // use `dd if=/dev/urandom bs=1024 count=1 | xxd -i` to get your own -const uint8 SawyerCodingTest::randomdata[] = { +const uint8_t SawyerCodingTest::randomdata[] = { 0x3a, 0x97, 0x63, 0x8b, 0xbf, 0xe5, 0x6e, 0x0e, 0xc4, 0xac, 0xdc, 0x84, 0xd7, 0x68, 0xf1, 0x4d, 0xcb, 0xaf, 0x1e, 0x5a, 0x29, 0x40, 0x87, 0x80, 0x3f, 0xf9, 0xb8, 0xad, 0x01, 0xd3, 0x79, 0x3d, 0xe9, 0x87, 0xa8, 0x95, 0x68, 0xc0, 0xc2, 0x3d, 0x15, 0x87, 0xdb, 0xa6, 0x90, 0x8c, 0x26, 0x98, 0x2a, 0x3f, 0x2e, 0x0c, 0x82, 0x43, 0x00, 0x10, 0x6d, 0x60, 0xb9, 0xd4, @@ -165,7 +165,7 @@ const uint8 SawyerCodingTest::randomdata[] = { // Following are compressed versions of the data above. -const uint8 SawyerCodingTest::nonedata[] = { +const uint8_t SawyerCodingTest::nonedata[] = { 0x00, 0x00, 0x04, 0x00, 0x00, 0x3a, 0x97, 0x63, 0x8b, 0xbf, 0xe5, 0x6e, 0x0e, 0xc4, 0xac, 0xdc, 0x84, 0xd7, 0x68, 0xf1, 0x4d, 0xcb, 0xaf, 0x1e, 0x5a, 0x29, 0x40, 0x87, 0x80, 0x3f, 0xf9, 0xb8, 0xad, 0x01, 0xd3, 0x79, 0x3d, 0xe9, 0x87, 0xa8, 0x95, 0x68, 0xc0, 0xc2, 0x3d, 0x15, 0x87, 0xdb, 0xa6, 0x90, 0x8c, 0x26, 0x98, 0x2a, 0x3f, 0x2e, 0x0c, 0x82, 0x43, 0x00, @@ -220,7 +220,7 @@ const uint8 SawyerCodingTest::nonedata[] = { 0x80, 0xbe, 0x9e, 0xd7, 0x5e, 0xb5, 0x72, 0x22, 0xbc }; -const uint8 SawyerCodingTest::rledata[] = { +const uint8_t SawyerCodingTest::rledata[] = { 0x01, 0x09, 0x04, 0x00, 0x00, 0x7d, 0x3a, 0x97, 0x63, 0x8b, 0xbf, 0xe5, 0x6e, 0x0e, 0xc4, 0xac, 0xdc, 0x84, 0xd7, 0x68, 0xf1, 0x4d, 0xcb, 0xaf, 0x1e, 0x5a, 0x29, 0x40, 0x87, 0x80, 0x3f, 0xf9, 0xb8, 0xad, 0x01, 0xd3, 0x79, 0x3d, 0xe9, 0x87, 0xa8, 0x95, 0x68, 0xc0, 0xc2, 0x3d, 0x15, 0x87, 0xdb, 0xa6, 0x90, 0x8c, 0x26, 0x98, 0x2a, 0x3f, 0x2e, 0x0c, 0x82, 0x43, @@ -275,7 +275,7 @@ const uint8 SawyerCodingTest::rledata[] = { 0x1d, 0x15, 0x29, 0x5b, 0xd0, 0x66, 0x72, 0xb8, 0x38, 0x80, 0xbe, 0x9e, 0xd7, 0x5e, 0xb5, 0x72, 0x22, 0xbc }; -const uint8 SawyerCodingTest::rlecompresseddata[] = { +const uint8_t SawyerCodingTest::rlecompresseddata[] = { 0x02, 0x98, 0x07, 0x00, 0x00, 0x7d, 0xff, 0x3a, 0xff, 0x97, 0xff, 0x63, 0xff, 0x8b, 0xff, 0xbf, 0xff, 0xe5, 0xff, 0x6e, 0xff, 0x0e, 0xff, 0xc4, 0xff, 0xac, 0xff, 0xdc, 0xff, 0x84, 0xff, 0xd7, 0xff, 0x68, 0xff, 0xf1, 0xff, 0x4d, 0xff, 0xcb, 0xff, 0xaf, 0xff, 0x1e, 0xff, 0x5a, 0xff, 0x29, 0xff, 0x40, 0xff, 0x87, 0xff, 0x80, 0xff, 0x3f, 0xff, 0xf9, 0xff, 0xb8, @@ -376,7 +376,7 @@ const uint8 SawyerCodingTest::rlecompresseddata[] = { 0xff, 0x5e, 0xff, 0xb5, 0xb8, 0xff, 0x22, 0xff, 0xbc }; -const uint8 SawyerCodingTest::rotatedata[] = { +const uint8_t SawyerCodingTest::rotatedata[] = { 0x03, 0x00, 0x04, 0x00, 0x00, 0x74, 0xbc, 0x6c, 0xc5, 0x7f, 0x2f, 0xcd, 0x07, 0x89, 0x65, 0x9b, 0x42, 0xaf, 0x43, 0x3e, 0xa6, 0x97, 0x7d, 0xc3, 0x2d, 0x52, 0x02, 0xf0, 0x40, 0x7e, 0xcf, 0x17, 0xd6, 0x02, 0x9e, 0x2f, 0x9e, 0xd3, 0x3c, 0x15, 0xca, 0xd0, 0x06, 0x58, 0x9e, 0x2a, 0x3c, 0x7b, 0x53, 0x21, 0x64, 0xc4, 0x4c, 0x54, 0xf9, 0xc5, 0x06, 0x05, 0x1a, 0x00,