mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
add track definitions
This commit is contained in:
parent
41358c734a
commit
75dc8243c4
5 changed files with 151 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
|||
<ClInclude Include="..\src\sprites.h" />
|
||||
<ClInclude Include="..\src\strings.h" />
|
||||
<ClInclude Include="..\src\title.h" />
|
||||
<ClInclude Include="..\src\track.h" />
|
||||
<ClInclude Include="..\src\tutorial.h" />
|
||||
<ClInclude Include="..\src\util.h" />
|
||||
<ClInclude Include="..\src\viewport.h" />
|
||||
|
@ -67,6 +68,7 @@
|
|||
<ClCompile Include="..\src\scenario.c" />
|
||||
<ClCompile Include="..\src\strings.c" />
|
||||
<ClCompile Include="..\src\title.c" />
|
||||
<ClCompile Include="..\src\track.c" />
|
||||
<ClCompile Include="..\src\tutorial.c" />
|
||||
<ClCompile Include="..\src\util.c" />
|
||||
<ClCompile Include="..\src\viewport.c" />
|
||||
|
|
|
@ -108,6 +108,9 @@
|
|||
<ClInclude Include="..\src\util.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\track.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\game.c">
|
||||
|
@ -227,6 +230,9 @@
|
|||
<ClCompile Include="..\src\window_ride_list.c">
|
||||
<Filter>Windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\track.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\openrct2.exe">
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "ride.h"
|
||||
#include "scenario.h"
|
||||
#include "title.h"
|
||||
#include "track.h"
|
||||
#include "viewport.h"
|
||||
|
||||
#define GAME_PATH "C:\\Program Files (x86)\\Infogrames\\RollerCoaster Tycoon 2"
|
||||
|
@ -111,7 +112,7 @@ void rct2_init()
|
|||
// RCT2_CALLPROC_EBPSAFE(0x00674B81); // pointless expansion pack crap
|
||||
object_load_list();
|
||||
scenario_load_list();
|
||||
RCT2_CALLPROC_X(0x006CED50, 0, 0, 0, 253, 0, 0, 0); // track_load_list(253)
|
||||
track_load_list(253);
|
||||
gfx_load_g1();
|
||||
RCT2_CALLPROC_EBPSAFE(0x006C19AC);
|
||||
osinterface_init();
|
||||
|
|
46
src/track.c
Normal file
46
src/track.c
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (c) 2014 Ted John
|
||||
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
||||
*
|
||||
* This file is part of OpenRCT2.
|
||||
*
|
||||
* OpenRCT2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "addresses.h"
|
||||
#include "track.h"
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x00997C9D
|
||||
*/
|
||||
const rct_trackdefinition gTrackDefinitions[] = {
|
||||
// TYPE VANGLE END VANGLE START BANK END BANK START SPECIAL
|
||||
{ TRACK_FLAT, TRACK_NONE, TRACK_NONE, TRACK_BANK_NONE, TRACK_BANK_NONE, TRACK_NONE }, // flat
|
||||
{ TRACK_FLAT, TRACK_NONE, TRACK_NONE, TRACK_BANK_NONE, TRACK_BANK_NONE, TRACK_NONE }, // station end
|
||||
{ TRACK_FLAT, TRACK_NONE, TRACK_NONE, TRACK_BANK_NONE, TRACK_BANK_NONE, TRACK_NONE }, // station begin
|
||||
{ TRACK_FLAT, TRACK_NONE, TRACK_NONE, TRACK_BANK_NONE, TRACK_BANK_NONE, TRACK_NONE }, // station middle
|
||||
{ TRACK_FLAT, TRACK_UP_25, TRACK_UP_25, TRACK_BANK_NONE, TRACK_BANK_NONE, TRACK_NONE }, // 25 deg up
|
||||
{ TRACK_FLAT, TRACK_UP_60, TRACK_UP_60, TRACK_BANK_NONE, TRACK_BANK_NONE, TRACK_NONE }, // 60 deg up
|
||||
// TODO the rest
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006CED50
|
||||
*/
|
||||
void track_load_list(int edx)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x006CED50, 0, 0, 0, edx, 0, 0, 0);
|
||||
}
|
95
src/track.h
Normal file
95
src/track.h
Normal file
|
@ -0,0 +1,95 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (c) 2014 Ted John
|
||||
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
||||
*
|
||||
* This file is part of OpenRCT2.
|
||||
*
|
||||
* OpenRCT2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _TRACK_H_
|
||||
#define _TRACK_H_
|
||||
|
||||
#include "rct2.h"
|
||||
|
||||
typedef struct {
|
||||
uint8 type;
|
||||
uint8 vangle_end;
|
||||
uint8 vangle_start;
|
||||
uint8 bank_end;
|
||||
uint8 bank_start;
|
||||
uint8 special;
|
||||
uint8 pad[2];
|
||||
} rct_trackdefinition;
|
||||
|
||||
enum {
|
||||
TRACK_NONE = 0,
|
||||
|
||||
TRACK_FLAT = 0,
|
||||
TRACK_STATION_END = 2,
|
||||
TRACK_VERTICAL_LOOP = 7,
|
||||
TRACK_S_BEND = 13,
|
||||
TRACK_TWIST = 17,
|
||||
TRACK_HALF_LOOP = 18,
|
||||
TRACK_CORKSCREW = 19,
|
||||
TRACK_TOWER_BASE = 20,
|
||||
TRACK_HELIX_SMALL= 21,
|
||||
TRACK_HELIX_LARGE= 22,
|
||||
TRACK_HELIX_LARGE_UNBANKED = 23,
|
||||
TRACK_BRAKES = 24,
|
||||
TRACK_ON_RIDE_PHOTO = 26,
|
||||
TRACK_WATER_SPLASH = 27,
|
||||
TRACK_BARREL_ROLL = 29,
|
||||
TRACK_POWERED_LIFT = 30,
|
||||
TRACK_HALF_LOOP_2 = 31, // ?
|
||||
TRACK_LOG_FLUME_REVERSER = 33,
|
||||
TRACK_WHOA_BELLY = 36,
|
||||
TRACK_LIFT_HILL = 43,
|
||||
TRACK_SPINNING_TUNNEL = 46,
|
||||
TRACK_ROTATION_CONTROL_TOGGLE = 47,
|
||||
TRACK_RAPIDS = 52,
|
||||
TRACK_WATERFALL = 152,
|
||||
TRACK_WHIRLPOOL = 152,
|
||||
TRACK_BRAKE_FOR_DROP = 172
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACK_UP_25 = 2,
|
||||
TRACK_UP_60 = 4,
|
||||
TRACK_DOWN_25 = 6,
|
||||
TRACK_DOWN_60 = 8,
|
||||
TRACK_UP_90 = 10,
|
||||
TRACK_DOWN_90 = 18,
|
||||
|
||||
TRACK_VANGLE_TOWER = 10,
|
||||
TRACK_VANGLE_WHOA_BELLY = 10
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACK_BANK_NONE = 0,
|
||||
TRACK_BANK_LEFT = 2,
|
||||
TRACK_BANK_RIGHT = 4,
|
||||
TRACK_BANK_UPSIDE_DOWN = 15,
|
||||
};
|
||||
|
||||
enum {
|
||||
TRACK_HALF_LOOP_UP = 64,
|
||||
TRACK_HALF_LOOP_DOWN = 192,
|
||||
TRACK_UNKNOWN_VERTICAL_LOOP = 208,
|
||||
TRACK_CORKSCREW_DOWN = 224
|
||||
};
|
||||
|
||||
void track_load_list(int edx);
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue