mirror of https://github.com/OpenRCT2/OpenRCT2.git
Identified peep.staff_type and days_in_month table.
This commit is contained in:
parent
4cb286d8b9
commit
9f321fa339
|
@ -22,6 +22,10 @@
|
|||
#include "date.h"
|
||||
#include "rct2.h"
|
||||
|
||||
// rtc2: 0x00993988
|
||||
const sint16 days_in_month[MONTH_COUNT] = { 31, 30, 31, 30, 31, 31, 30, 31 };
|
||||
|
||||
|
||||
int date_get_month(int months)
|
||||
{
|
||||
return months % MONTH_COUNT;
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef _DATE_H_
|
||||
#define _DATE_H_
|
||||
|
||||
#include "rct2.h"
|
||||
|
||||
enum {
|
||||
MONTH_MARCH,
|
||||
MONTH_APRIL,
|
||||
|
@ -34,6 +36,8 @@ enum {
|
|||
MONTH_COUNT
|
||||
};
|
||||
|
||||
extern const sint16 days_in_month[MONTH_COUNT];
|
||||
|
||||
int date_get_month(int months);
|
||||
int date_get_total_months(int month, int year);
|
||||
void date_reset();
|
||||
|
|
|
@ -30,6 +30,13 @@ enum PEEP_TYPE {
|
|||
PEEP_TYPE_STAFF
|
||||
};
|
||||
|
||||
enum STAFF_TYPE {
|
||||
STAFF_TYPE_HANDYMAN,
|
||||
STAFF_TYPE_MECHANIC,
|
||||
STAFF_TYPE_SECURITY,
|
||||
STAFF_TYPE_ENTERTAINER
|
||||
};
|
||||
|
||||
enum {
|
||||
PEEP_FLAGS_TRACKING = 8
|
||||
};
|
||||
|
@ -65,7 +72,7 @@ typedef struct {
|
|||
uint8 pad_2C;
|
||||
uint8 sprite_type; // 0x2D
|
||||
uint8 type; // 0x2E
|
||||
uint8 var_2F;
|
||||
uint8 staff_type; // 0x2F
|
||||
uint8 var_30;
|
||||
uint8 var_31;
|
||||
uint8 pad_32[0x08];
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "addresses.h"
|
||||
#include "climate.h"
|
||||
#include "date.h"
|
||||
#include "news_item.h"
|
||||
#include "park.h"
|
||||
#include "peep.h"
|
||||
|
@ -220,7 +221,7 @@ static void window_game_bottom_toolbar_tooltip()
|
|||
break;
|
||||
case WIDX_DATE:
|
||||
month = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, sint16) & 7;
|
||||
day = ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_DAY, sint16) * ((short*)0x00993988)[month]) >> 16) & 0xFF;
|
||||
day = ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_DAY, sint16) * days_in_month[month]) >> 16) & 0xFF;
|
||||
*((short*)0x013CE952) = STR_DATE_DAY_1 + day;
|
||||
*((short*)0x013CE954) = STR_MONTH_MARCH + month;
|
||||
widgetIndex = 0;
|
||||
|
|
Loading…
Reference in New Issue