Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp
index 6fc985a8f..84013d1b1 100644
--- a/src/openrct2/peep/Peep.cpp
+++ b/src/openrct2/peep/Peep.cpp
@@ -2890,7 +2890,31 @@ static void peep_update_ride_sub_state_1(rct_peep * peep)
invalidate_sprite_2((rct_sprite *)peep);
- z = ride->station_heights[peep->current_ride_station] * 8;
+ // Find entrance height, in case its height differs from the station height through hacks
struct Rotation
{
const uint8 & Value() const
{
Guard::Assert(_rotation == (_rotation & 3));
return _rotation;
}
Rotation & operator=(Rotation rhs)
{
Function: keyboard_shortcut_handle
'rct2:' comment: 0x006E3E68
Function: game_handle_input
'rct2:' comment: 0x006EA627
Function: game_get_next_input
'rct2:' comment: 0x006E83C7
Function: get_mouse_input
address # function
------- - --------
0x006E3E68 1 keyboard_shortcut_handle
0x006EA627 1 game_handle_input
0x006E83C7 1 game_get_next_input
0x00407074 1 get_mouse_input
0x006E957F 1 input_scroll_drag_begin
0x006E9E0E 2 input_scroll_drag_continue
0x006E9ED0 2 input_scroll_drag_continue
0x006E8ACB 1 input_scroll_right
using System.Text.RegularExpressions;
using System.IO;
using System;
using System.Collections.Generic;
using System.Linq;
namespace format_rct2_functionlist_cs
{
class Program
{
/// header_1.h =====
enum class SurfacePropertyMasks
{
SlopeRaisedCornersMask = 0b0001111,
SlopeDiagonalFlag = 0b00010000,
SlopeMask = SlopeRaisedCornersMask | SlopeDiagonalFlag,
EdgeStyleMask = 0b11100000,
SurfaceWaterHeightMask = 0b00011111,
SurfaceTerrainMask = 0b11100000,
};
@Broxzier
Broxzier / vov_vs_lov.cpp
Last active April 24, 2018 15:01
Vector of Vectors vs List of Vectors
// Vector of vectors
{
// Initialize vector of vectors
std::vector<std::vector<int>> vov;
vov.resize(1);
vov.back() = { 1, 2, 3, 4 };
// Get reference to first list - used as argument for the threads
auto& ref = vov.back();
@Broxzier
Broxzier / hue-circle.js
Last active August 18, 2021 07:58
Hue circle generator
(function(radius, numSlices) {
var canvas = {};
canvas.node = document.createElement('canvas');
canvas.context = canvas.node.getContext('2d');
canvas.node.width = radius * 2 + 1;
canvas.node.height = radius * 2 + 1;
document.body.appendChild(canvas.node);
var ctx = canvas.context;
function remap(in_l, in_r, out_l, out_r, value) {
@Broxzier
Broxzier / update-version-workflow.yml
Created November 25, 2021 16:02
GitHub Action to update a version file on PR merge
name: Update file on PR merge
on:
pull_request:
branches:
- master
- develop
types: closed
jobs:
update_date:
@Broxzier
Broxzier / git-swap-merge
Created May 11, 2022 16:56
A shell script to easily swap the parents of a merge commit, so that you can avoid having files that you changed be touched and force a rebuild. Place this in your `~/bin` folder and you can simply use `git swap-merge`
#!/bin/bash
# Check if HEAD is a merge commit
numParents=$(git show -s --format=%p HEAD | wc -w)
if [[ "$numParents" != "2" ]]; then
echo "HEAD is not a merge commit"
exit 1
fi
# Format the new commit message