Include struct at `0x0097DD78`

This commit is contained in:
Marijn van der Werf 2016-04-03 13:41:00 +02:00
parent e9bd7e56fc
commit e4fadc5a66
4 changed files with 111 additions and 7 deletions

View File

@ -1082,6 +1082,103 @@ const rct_ride_data_4 RideData4[91] = {
{ 20, 20, RIDE_TYPE_FLAG4_ALLOW_MUSIC | RIDE_TYPE_FLAG4_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG4_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG4_HAS_AIR_TIME | RIDE_TYPE_FLAG4_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG4_11 | RIDE_TYPE_FLAG4_13, MUSIC_STYLE_ROCK, 0, 0 }, // RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER
};
// rct2: 0x0097DD78
const ride_cost RideTrackCosts[91] = {
{ 70, 5 }, // RIDE_TYPE_SPIRAL_ROLLER_COASTER
{ 100, 5 }, // RIDE_TYPE_STAND_UP_ROLLER_COASTER
{ 95, 5 }, // RIDE_TYPE_SUSPENDED_SWINGING_COASTER
{ 110, 5 }, // RIDE_TYPE_INVERTED_ROLLER_COASTER
{ 45, 4 }, // RIDE_TYPE_JUNIOR_ROLLER_COASTER
{ 35, 6 }, // RIDE_TYPE_MINIATURE_RAILWAY
{ 42, 5 }, // RIDE_TYPE_MONORAIL
{ 60, 5 }, // RIDE_TYPE_MINI_SUSPENDED_COASTER
{ 55, 5 }, // RIDE_TYPE_BOAT_RIDE
{ 50, 6 }, // RIDE_TYPE_WOODEN_WILD_MOUSE
{ 57, 4 }, // RIDE_TYPE_STEEPLECHASE
{ 25, 5 }, // RIDE_TYPE_CAR_RIDE
{ 50, 0 }, // RIDE_TYPE_LAUNCHED_FREEFALL
{ 80, 5 }, // RIDE_TYPE_BOBSLEIGH_COASTER
{ 37, 0 }, // RIDE_TYPE_OBSERVATION_TOWER
{ 90, 5 }, // RIDE_TYPE_LOOPING_ROLLER_COASTER
{ 40, 4 }, // RIDE_TYPE_DINGHY_SLIDE
{ 82, 6 }, // RIDE_TYPE_MINE_TRAIN_COASTER
{ 65, 1 }, // RIDE_TYPE_CHAIRLIFT
{ 105, 5 }, // RIDE_TYPE_CORKSCREW_ROLLER_COASTER
{ 55, 2 }, // RIDE_TYPE_MAZE
{ 165, 2 }, // RIDE_TYPE_SPIRAL_SLIDE
{ 62, 4 }, // RIDE_TYPE_GO_KARTS
{ 45, 5 }, // RIDE_TYPE_LOG_FLUME
{ 62, 6 }, // RIDE_TYPE_RIVER_RAPIDS
{ 55, 2 }, // RIDE_TYPE_DODGEMS
{ 155, 2 }, // RIDE_TYPE_PIRATE_SHIP
{ 212, 2 }, // RIDE_TYPE_SWINGING_INVERTER_SHIP
{ 600, 0 }, // RIDE_TYPE_FOOD_STALL
{ 700, 0 }, // RIDE_TYPE_1D
{ 500, 0 }, // RIDE_TYPE_DRINK_STALL
{ 600, 0 }, // RIDE_TYPE_1F
{ 400, 0 }, // RIDE_TYPE_SHOP
{ 115, 2 }, // RIDE_TYPE_MERRY_GO_ROUND
{ 500, 0 }, // RIDE_TYPE_22
{ 500, 0 }, // RIDE_TYPE_INFORMATION_KIOSK
{ 450, 0 }, // RIDE_TYPE_TOILETS
{ 225, 2 }, // RIDE_TYPE_FERRIS_WHEEL
{ 220, 2 }, // RIDE_TYPE_MOTION_SIMULATOR
{ 140, 2 }, // RIDE_TYPE_3D_CINEMA
{ 145, 2 }, // RIDE_TYPE_TOP_SPIN
{ 72, 2 }, // RIDE_TYPE_SPACE_RINGS
{ 200, 0 }, // RIDE_TYPE_REVERSE_FREEFALL_COASTER
{ 39, 0 }, // RIDE_TYPE_LIFT
{ 120, 5 }, // RIDE_TYPE_VERTICAL_DROP_ROLLER_COASTER
{ 400, 0 }, // RIDE_TYPE_CASH_MACHINE
{ 90, 2 }, // RIDE_TYPE_TWIST
{ 85, 2 }, // RIDE_TYPE_HAUNTED_HOUSE
{ 500, 0 }, // RIDE_TYPE_FIRST_AID
{ 125, 2 }, // RIDE_TYPE_CIRCUS_SHOW
{ 26, 5 }, // RIDE_TYPE_GHOST_TRAIN
{ 120, 5 }, // RIDE_TYPE_TWISTER_ROLLER_COASTER
{ 75, 7 }, // RIDE_TYPE_WOODEN_ROLLER_COASTER
{ 55, 6 }, // RIDE_TYPE_SIDE_FRICTION_ROLLER_COASTER
{ 55, 4 }, // RIDE_TYPE_WILD_MOUSE
{ 180, 5 }, // RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER
{ 180, 5 }, // RIDE_TYPE_38
{ 125, 5 }, // RIDE_TYPE_FLYING_ROLLER_COASTER
{ 125, 5 }, // RIDE_TYPE_3A
{ 53, 6 }, // RIDE_TYPE_VIRGINIA_REEL
{ 57, 5 }, // RIDE_TYPE_SPLASH_BOATS
{ 25, 5 }, // RIDE_TYPE_MINI_HELICOPTERS
{ 107, 5 }, // RIDE_TYPE_LAY_DOWN_ROLLER_COASTER
{ 65, 5 }, // RIDE_TYPE_SUSPENDED_MONORAIL
{ 107, 5 }, // RIDE_TYPE_40
{ 55, 6 }, // RIDE_TYPE_REVERSER_ROLLER_COASTER
{ 135, 7 }, // RIDE_TYPE_HEARTLINE_TWISTER_COASTER
{ 50, 7 }, // RIDE_TYPE_MINI_GOLF
{ 120, 5 }, // RIDE_TYPE_GIGA_COASTER
{ 55, 0 }, // RIDE_TYPE_ROTO_DROP
{ 70, 4 }, // RIDE_TYPE_FLYING_SAUCERS
{ 65, 2 }, // RIDE_TYPE_CROOKED_HOUSE
{ 20, 5 }, // RIDE_TYPE_MONORAIL_CYCLES
{ 100, 5 }, // RIDE_TYPE_COMPACT_INVERTED_COASTER
{ 55, 4 }, // RIDE_TYPE_WATER_COASTER
{ 200, 0 }, // RIDE_TYPE_AIR_POWERED_VERTICAL_COASTER
{ 67, 4 }, // RIDE_TYPE_INVERTED_HAIRPIN_COASTER
{ 198, 2 }, // RIDE_TYPE_MAGIC_CARPET
{ 70, 0 }, // RIDE_TYPE_SUBMARINE_RIDE
{ 40, 5 }, // RIDE_TYPE_RIVER_RAFTS
{ 525, 0 }, // RIDE_TYPE_50
{ 100, 2 }, // RIDE_TYPE_ENTERPRISE
{ 500, 0 }, // RIDE_TYPE_52
{ 520, 0 }, // RIDE_TYPE_53
{ 420, 0 }, // RIDE_TYPE_54
{ 105, 5 }, // RIDE_TYPE_55
{ 125, 5 }, // RIDE_TYPE_INVERTED_IMPULSE_COASTER
{ 65, 4 }, // RIDE_TYPE_MINI_ROLLER_COASTER
{ 85, 4 }, // RIDE_TYPE_MINE_RIDE
{ 55, 4 }, // RIDE_TYPE_59
{ 95, 5 }, // RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER
};
// rct2: 0x00982358
const money8 DefaultShopItemPrice[SHOP_ITEM_COUNT] = {
MONEY(0,90), // SHOP_ITEM_BALLOON

View File

@ -56,6 +56,11 @@ typedef struct {
uint8 pad[2];
} rct_ride_data_4;
typedef struct {
uint16 track_price;
uint16 support_price;
} ride_cost;
typedef struct {
uint8 sound_id;
uint8 minimum_speed;
@ -99,6 +104,7 @@ extern const rct_ride_entrance_definition RideEntranceDefinitions[RIDE_ENTRANCE_
extern const rct_ride_lift_data RideLiftData[91];
extern const rct_ride_data_4 RideData4[91];
extern const ride_cost RideTrackCosts[91];
extern const money8 DefaultShopItemPrice[SHOP_ITEM_COUNT];
extern const rct_shop_item_string_types ShopItemStringIds[SHOP_ITEM_COUNT];

View File

@ -3474,7 +3474,7 @@ money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, sint16
// Calculate price
money32 price = 0;
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
price = RCT2_ADDRESS(0x0097DD78, money16)[ride->type * 2] * RCT2_GLOBAL(0x0099DBC8, money32);
price = RideTrackCosts[ride->type].track_price * RCT2_GLOBAL(0x0099DBC8, money32);
price = (price >> 17) * 10;
}
@ -4733,7 +4733,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
support_height = 10;
}
cost += ((support_height / 2) * RCT2_ADDRESS(0x0097DD7A, uint16)[ride->type * 2]) * 5;
cost += ((support_height / 2) * RideTrackCosts[ride->type].support_price) * 5;
//6c56d3
@ -4873,7 +4873,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
network_set_player_last_action_coord(network_get_player_index(game_command_playerid), coord);
}
money32 price = RCT2_ADDRESS(0x0097DD78, money16)[ride->type * 2];
money32 price = RideTrackCosts[ride->type].track_price;
price *= (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) ?
RCT2_ADDRESS(0x0099DE34, money32)[type] :
RCT2_ADDRESS(0x0099DA34, money32)[type];
@ -5092,7 +5092,7 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
support_height = 10;
}
cost += (support_height / 2) * RCT2_ADDRESS(0x0097DD7A, uint16)[ride->type * 2];
cost += (support_height / 2) * RideTrackCosts[ride->type].support_price;
if (!(flags & GAME_COMMAND_FLAG_APPLY))
continue;
@ -5153,7 +5153,7 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
}
}
money32 price = RCT2_ADDRESS(0x0097DD78, money16)[ride->type * 2];;
money32 price = RideTrackCosts[ride->type].track_price;
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE)) {
price *= RCT2_ADDRESS(0x0099DE34, money32)[type];
}
@ -5293,7 +5293,7 @@ money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y, uint8 r
rct_ride *ride = get_ride(rideIndex);
money32 price = (((RCT2_ADDRESS(0x0097DD78, money16)[ride->type * 2] * RCT2_GLOBAL(0x0099DBC8, money32)) >> 16));
money32 price = (((RideTrackCosts[ride->type].track_price * RCT2_GLOBAL(0x0099DBC8, money32)) >> 16));
RCT2_GLOBAL(0x00F4413E, money32) = price / 2 * 10;
if (!(flags & GAME_COMMAND_FLAG_APPLY)) {

View File

@ -34,6 +34,7 @@
#include "../ride/ride.h"
#include "../ride/track.h"
#include "../world/scenery.h"
#include "../ride/ride_data.h"
#define _window_new_ride_current_tab RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8)
@ -911,7 +912,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
// Get price of ride
int unk2 = RCT2_GLOBAL(0x0097CC68 + (item.type * 2), uint8);
money32 price = RCT2_GLOBAL(0x0097DD78 + (item.type * 4), uint16);
money32 price = RideTrackCosts[item.type].track_price;
if (ride_type_has_flag(item.type, RIDE_TYPE_FLAG_FLAT_RIDE)) {
price *= RCT2_ADDRESS(0x0099DE34, uint32)[unk2];
} else {