2016-05-04 19:24:41 +02:00
|
|
|
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
|
2014-10-05 16:23:52 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
|
|
|
*
|
2016-05-04 19:24:41 +02:00
|
|
|
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
|
|
|
|
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
|
2014-10-05 16:23:52 +02:00
|
|
|
*
|
|
|
|
* 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.
|
2016-05-04 19:24:41 +02:00
|
|
|
*
|
|
|
|
* A full copy of the GNU General Public License can be found in licence.txt
|
2014-10-05 16:23:52 +02:00
|
|
|
*****************************************************************************/
|
2016-05-04 19:24:41 +02:00
|
|
|
#pragma endregion
|
2014-10-05 16:23:52 +02:00
|
|
|
|
|
|
|
#ifndef _RESEARCH_H_
|
|
|
|
#define _RESEARCH_H_
|
|
|
|
|
2014-10-07 20:10:16 +02:00
|
|
|
#include "../common.h"
|
|
|
|
|
2014-10-08 00:42:17 +02:00
|
|
|
typedef struct {
|
|
|
|
// Bit 16 (0: scenery entry, 1: ride entry)
|
|
|
|
sint32 entryIndex;
|
|
|
|
uint8 category;
|
|
|
|
} rct_research_item;
|
|
|
|
|
2015-10-20 20:16:30 +02:00
|
|
|
enum{
|
2015-06-06 21:07:27 +02:00
|
|
|
RESEARCH_ENTRY_FLAG_SCENERY_SET_ALWAYS_RESEARCHED = (1 << 29),
|
|
|
|
RESEARCH_ENTRY_FLAG_RIDE_ALWAYS_RESEARCHED = (1 << 30),
|
|
|
|
};
|
|
|
|
|
2015-06-06 14:25:26 +02:00
|
|
|
// Everything before this point has been researched
|
2015-06-24 12:41:19 +02:00
|
|
|
#define RESEARCHED_ITEMS_SEPARATOR -1
|
|
|
|
// Everything before this point and after separator still requires research
|
2014-10-08 23:11:50 +02:00
|
|
|
#define RESEARCHED_ITEMS_END -2
|
2015-06-06 14:25:26 +02:00
|
|
|
// Extra end of list entry. Unsure why?
|
2014-12-16 02:24:13 +01:00
|
|
|
#define RESEARCHED_ITEMS_END_2 -3
|
2014-10-08 00:42:17 +02:00
|
|
|
|
2014-10-05 18:53:08 +02:00
|
|
|
enum {
|
|
|
|
RESEARCH_FUNDING_NONE,
|
|
|
|
RESEARCH_FUNDING_MINIMUM,
|
|
|
|
RESEARCH_FUNDING_NORMAL,
|
|
|
|
RESEARCH_FUNDING_MAXIMUM
|
|
|
|
};
|
|
|
|
|
2014-10-05 16:23:52 +02:00
|
|
|
enum {
|
|
|
|
RESEARCH_STAGE_INITIAL_RESEARCH,
|
|
|
|
RESEARCH_STAGE_DESIGNING,
|
|
|
|
RESEARCH_STAGE_COMPLETING_DESIGN,
|
2015-03-28 13:42:09 +01:00
|
|
|
RESEARCH_STAGE_UNKNOWN,
|
|
|
|
RESEARCH_STAGE_FINISHED_ALL
|
2014-10-05 16:23:52 +02:00
|
|
|
};
|
|
|
|
|
2015-03-31 18:09:16 +02:00
|
|
|
enum {
|
|
|
|
RESEARCH_CATEGORY_TRANSPORT,
|
|
|
|
RESEARCH_CATEGORY_GENTLE,
|
|
|
|
RESEARCH_CATEGORY_ROLLERCOASTER,
|
|
|
|
RESEARCH_CATEGORY_THRILL,
|
|
|
|
RESEARCH_CATEGORY_WATER,
|
|
|
|
RESEARCH_CATEGORY_SHOP,
|
|
|
|
RESEARCH_CATEGORY_SCENERYSET
|
|
|
|
};
|
|
|
|
|
2016-04-26 00:26:26 +02:00
|
|
|
#define gResearchFundingLevel RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8)
|
|
|
|
#define gResearchPriorities RCT2_GLOBAL(RCT2_ADDRESS_ACTIVE_RESEARCH_TYPES, uint8)
|
|
|
|
#define gResearchProgress RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS, uint16)
|
|
|
|
#define gResearchProgressStage RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8)
|
2016-05-09 21:38:26 +02:00
|
|
|
#define gResearchLastItemSubject RCT2_GLOBAL(RCT2_ADDRESS_LAST_RESEARCHED_ITEM_SUBJECT, uint32)
|
2016-04-26 00:26:26 +02:00
|
|
|
#define gResearchExpectedMonth RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_MONTH, uint8)
|
|
|
|
#define gResearchExpectedDay RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_DAY, uint8)
|
|
|
|
#define gResearchNextCategory RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_CATEGORY, uint8)
|
|
|
|
#define gResearchNextItem RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_ITEM, uint32)
|
|
|
|
|
2014-10-08 00:42:17 +02:00
|
|
|
extern rct_research_item *gResearchItems;
|
2014-10-05 20:18:36 +02:00
|
|
|
extern uint8 gResearchUncompletedCategories;
|
2015-05-23 20:56:54 +02:00
|
|
|
extern bool gSilentResearch;
|
2014-10-05 20:18:36 +02:00
|
|
|
|
2014-10-08 23:11:50 +02:00
|
|
|
void research_reset_items();
|
2014-10-05 20:18:36 +02:00
|
|
|
void research_update_uncompleted_types();
|
2014-10-05 16:23:52 +02:00
|
|
|
void research_update();
|
2014-11-01 01:13:15 +01:00
|
|
|
void sub_684AC3();
|
2015-03-31 16:17:43 +02:00
|
|
|
void research_remove_non_separate_vehicle_types();
|
2015-03-31 18:09:16 +02:00
|
|
|
void research_populate_list_random();
|
2015-05-23 20:56:54 +02:00
|
|
|
void research_populate_list_researched();
|
2014-10-05 16:23:52 +02:00
|
|
|
|
2015-01-24 19:41:55 +01:00
|
|
|
void research_set_funding(int amount);
|
|
|
|
void research_set_priority(int activeCategories);
|
|
|
|
void game_command_set_research_funding(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp);
|
2015-05-23 20:56:54 +02:00
|
|
|
void research_finish_item(sint32 entryIndex);
|
|
|
|
void research_insert(int researched, int entryIndex, int category);
|
2015-06-19 22:33:37 +02:00
|
|
|
void research_remove(sint32 entryIndex);
|
2015-01-24 19:41:55 +01:00
|
|
|
|
2016-04-17 00:56:09 +02:00
|
|
|
void research_insert_ride_entry(uint8 entryIndex, bool researched);
|
|
|
|
void research_insert_scenery_group_entry(uint8 entryIndex, bool researched);
|
|
|
|
|
2015-06-24 12:41:19 +02:00
|
|
|
#endif
|