Merge pull request #400 from erorcun/erorcun

CMenuManager done and CHud fixes
This commit is contained in:
erorcun 2020-04-12 00:57:46 +03:00 committed by GitHub
commit 207aebc46c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1580 additions and 807 deletions

View File

@ -35,7 +35,6 @@ to reverse at the time, calling the original functions is acceptable.
cAudioManager - WIP cAudioManager - WIP
CBoat CBoat
CBulletInfo CBulletInfo
CMenuManager - WIP
CObject CObject
CPacManPickups CPacManPickups
CPedPath CPedPath

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -7,28 +7,11 @@
#define MENUHEADER_WIDTH 0.84f #define MENUHEADER_WIDTH 0.84f
#define MENUHEADER_HEIGHT 1.6f #define MENUHEADER_HEIGHT 1.6f
#define MENUACTION_X_MARGIN 40.0f #define MENU_X_MARGIN 40.0f
#define MENUACTION_POS_Y 60.0f #define MENUACTION_POS_Y 60.0f
#define MENUACTION_WIDTH 0.38f #define MENUACTION_WIDTH 38.0f
#define MENUACTION_SCALE_MULT 0.9f #define MENUACTION_SCALE_MULT 0.9f
#define MENUCOLUMN_POS_X MENUHEADER_POS_X + 16.0f
#define MENUCOLUMN_MAX_Y 149.0f
#define MENUCOLUMN_MID_Y 100.0f
#define MENUCOLUMN_MIN_Y 110.0f
#define MENUCOLUMN_PAUSE_Y 25.0f
#define MENUCOLUMN_START_Y 9.0f
#define MENUCOLUMN_FEDS 139.0f
#define MENUCOLUMN_SAVE_X 121.0f
#define MENUCOLUMN_SAVE_Y 111.0f
#define MENUCOLUMN_SPACING_MAX 24.0f
#define MENUCOLUMN_SPACING_MIN 20.0f
#define MENUSELECT_BOX_MAX 20.5f
#define MENUSELECT_BOX_MIN 17.0f
#ifndef ASPECT_RATIO_SCALE #ifndef ASPECT_RATIO_SCALE
#define MENURADIO_ICON_X 31.5f #define MENURADIO_ICON_X 31.5f
#else #else
@ -38,12 +21,13 @@
#define MENURADIO_ICON_W 60.0f #define MENURADIO_ICON_W 60.0f
#define MENURADIO_ICON_H 60.0f #define MENURADIO_ICON_H 60.0f
#define MENUDROP_COLOR_A 150
#define MENUDROP_COLOR_SIZE -1
#define MENUSLIDER_X 256.0f #define MENUSLIDER_X 256.0f
#define MENUSLIDER_UNK 256.0f #define MENUSLIDER_UNK 256.0f
#define BIGTEXT_X_SCALE 0.75f
#define BIGTEXT_Y_SCALE 0.9f
#define MEDIUMTEXT_X_SCALE 0.55f
#define MEDIUMTEXT_Y_SCALE 0.8f
#define SMALLTEXT_X_SCALE 0.45f #define SMALLTEXT_X_SCALE 0.45f
#define SMALLTEXT_Y_SCALE 0.7f #define SMALLTEXT_Y_SCALE 0.7f
#define SMALLESTTEXT_X_SCALE 0.4f #define SMALLESTTEXT_X_SCALE 0.4f
@ -67,6 +51,33 @@
#define PLAYERSETUP_LIST_BODY_TOP 47 #define PLAYERSETUP_LIST_BODY_TOP 47
#define PLAYERSETUP_ROW_HEIGHT 9 #define PLAYERSETUP_ROW_HEIGHT 9
#define STATS_SLIDE_Y_PER_SECOND 30.0f
#define STATS_ROW_HEIGHT 20.0f
#define STATS_ROW_X_MARGIN 50.0f
#define STATS_BOTTOM_MARGIN 135.0f
#define STATS_TOP_MARGIN 40.0f
#define STATS_TOP_DIMMING_AREA_LENGTH (93.0f - STATS_TOP_MARGIN)
#define STATS_BOTTOM_DIMMING_AREA_LENGTH 55.0f
#define STATS_PUT_BACK_TO_BOTTOM_Y 50.0f
#define STATS_RATING_X 24.0f
#define STATS_RATING_Y 20.0f
#define CONTSETUP_STANDARD_ROW_HEIGHT 10.7f
#define CONTSETUP_CLASSIC_ROW_HEIGHT 9.0f
#define CONTSETUP_BOUND_HIGHLIGHT_HEIGHT 10
#define CONTSETUP_BOUND_COLUMN_WIDTH 190.0f
#define CONTSETUP_LIST_HEADER_HEIGHT 20.0f
#define CONTSETUP_LIST_TOP 28.0f
#define CONTSETUP_LIST_RIGHT 18.0f
#define CONTSETUP_LIST_BOTTOM 120.0f
#define CONTSETUP_LIST_LEFT 18.0f
#define CONTSETUP_COLUMN_1_X 40.0f
#define CONTSETUP_COLUMN_2_X 210.0f
#define CONTSETUP_COLUMN_3_X (CONTSETUP_COLUMN_2_X + CONTSETUP_BOUND_COLUMN_WIDTH + 10.0f)
#define CONTSETUP_BACK_RIGHT 35.0f
#define CONTSETUP_BACK_BOTTOM 122.0f
#define CONTSETUP_BACK_HEIGHT 25.0f
enum eLanguages enum eLanguages
{ {
LANGUAGE_AMERICAN, LANGUAGE_AMERICAN,
@ -185,19 +196,19 @@ enum eMenuScreen
MENUPAGE_NEW_GAME_RELOAD = 10, MENUPAGE_NEW_GAME_RELOAD = 10,
MENUPAGE_LOAD_SLOT_CONFIRM = 11, MENUPAGE_LOAD_SLOT_CONFIRM = 11,
MENUPAGE_DELETE_SLOT_CONFIRM = 12, MENUPAGE_DELETE_SLOT_CONFIRM = 12,
MENUPAGE_13 = 13, MENUPAGE_NO_MEMORY_CARD = 13,
MENUPAGE_LOADING_IN_PROGRESS = 14, MENUPAGE_LOADING_IN_PROGRESS = 14,
MENUPAGE_DELETING_IN_PROGRESS = 15, MENUPAGE_DELETING_IN_PROGRESS = 15,
MENUPAGE_16 = 16, MENUPAGE_PS2_LOAD_FAILED = 16,
MENUPAGE_DELETE_FAILED = 17, MENUPAGE_DELETE_FAILED = 17,
MENUPAGE_DEBUG_MENU = 18, MENUPAGE_DEBUG_MENU = 18,
MENUPAGE_MEMORY_CARD_1 = 19, MENUPAGE_MEMORY_CARD_DEBUG = 19,
MENUPAGE_MEMORY_CARD_2 = 20, MENUPAGE_MEMORY_CARD_TEST = 20,
MENUPAGE_MULTIPLAYER_MAIN = 21, MENUPAGE_MULTIPLAYER_MAIN = 21,
MENUPAGE_SAVE_FAILED_1 = 22, MENUPAGE_PS2_SAVE_FAILED = 22,
MENUPAGE_SAVE_FAILED_2 = 23, MENUPAGE_PS2_SAVE_FAILED_2 = 23,
MENUPAGE_SAVE = 24, MENUPAGE_SAVE = 24,
MENUPAGE_NO_MEMORY_CARD = 25, MENUPAGE_NO_MEMORY_CARD_2 = 25,
MENUPAGE_CHOOSE_SAVE_SLOT = 26, MENUPAGE_CHOOSE_SAVE_SLOT = 26,
MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27, MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27,
MENUPAGE_MULTIPLAYER_MAP = 28, MENUPAGE_MULTIPLAYER_MAP = 28,
@ -438,7 +449,7 @@ struct BottomBarOption
struct CMenuScreen struct CMenuScreen
{ {
char m_ScreenName[8]; char m_ScreenName[8];
int32 unk; int32 unk; // 2 on MENUPAGE_MULTIPLAYER_START, 1 on everywhere else
int32 m_PreviousPage[2]; // eMenuScreen int32 m_PreviousPage[2]; // eMenuScreen
int32 m_ParentEntry[2]; // row int32 m_ParentEntry[2]; // row
@ -544,11 +555,12 @@ public:
static bool &m_bShutDownFrontEndRequested; static bool &m_bShutDownFrontEndRequested;
static bool &m_PrefsAllowNastyGame; static bool &m_PrefsAllowNastyGame;
static float &menuXYpadding; static uint8 m_PrefsStereoMono;
static float &actionTextScaleX; static int32 m_SelectedMap;
static float &actionTextScaleY; static int32 m_SelectedGameType;
static int32 &sthWithButtons; static uint8 m_PrefsPlayerRed;
static int32 &sthWithButtons2; static uint8 m_PrefsPlayerGreen;
static uint8 m_PrefsPlayerBlue;
#ifndef MASTER #ifndef MASTER
static bool m_PrefsMarketing; static bool m_PrefsMarketing;
@ -557,6 +569,7 @@ public:
#ifdef MENU_MAP #ifdef MENU_MAP
static bool bMenuMapActive; static bool bMenuMapActive;
static bool bMapMouseShownOnce;
static float fMapSize; static float fMapSize;
static float fMapCenterY; static float fMapCenterY;
static float fMapCenterX; static float fMapCenterX;
@ -565,9 +578,9 @@ public:
#endif #endif
public: public:
static void BuildStatLine(char *text, void *stat, uint8 aFloat, void *stat2); static void BuildStatLine(char *text, void *stat, bool itsFloat, void *stat2);
static void CentreMousePointer(); static void CentreMousePointer();
int CheckCodesForControls(int32); void CheckCodesForControls(int);
bool CheckHover(int x1, int x2, int y1, int y2); bool CheckHover(int x1, int x2, int y1, int y2);
void CheckSliderMovement(int); void CheckSliderMovement(int);
int CostructStatLine(int); int CostructStatLine(int);
@ -585,13 +598,13 @@ public:
#endif #endif
void DrawPlayerSetupScreen(); void DrawPlayerSetupScreen();
int FadeIn(int alpha); int FadeIn(int alpha);
void FilterOutColorMarkersFromString(uint16, CRGBA &); void FilterOutColorMarkersFromString(wchar*, CRGBA &);
int GetStartOptionsCntrlConfigScreens(); int GetStartOptionsCntrlConfigScreens();
static void InitialiseChangedLanguageSettings(); static void InitialiseChangedLanguageSettings();
void LoadAllTextures(); void LoadAllTextures();
void LoadSettings(); void LoadSettings();
static void MessageScreen(char *); void MessageScreen(const char *);
static void PickNewPlayerColour(); void PickNewPlayerColour();
void PrintBriefs(); void PrintBriefs();
static void PrintErrorMessage(); static void PrintErrorMessage();
void PrintStats(); void PrintStats();
@ -612,6 +625,7 @@ public:
void WaitForUserCD(); void WaitForUserCD();
void PrintController(); void PrintController();
int GetNumOptionsCntrlConfigScreens(); int GetNumOptionsCntrlConfigScreens();
int ConstructStatLine(int);
// New (not in function or inlined in the game) // New (not in function or inlined in the game)
void ThingsToDoBeforeLeavingPage(); void ThingsToDoBeforeLeavingPage();

View File

@ -1,22 +1,22 @@
#pragma once #pragma once
// There are some missing/wrong entries in here. // TODO: There are some missing/wrong entries in here.
const CMenuScreen aScreens[] = { const CMenuScreen aScreens[] = {
// MENUPAGE_NONE = 0 // MENUPAGE_NONE = 0
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, }, { "", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, },
// MENUPAGE_STATS = 1 - Both PrintStats and Draw were printing the page name, so deleted the string Draw looked for. // MENUPAGE_STATS = 1
#ifdef MENU_MAP #ifdef MENU_MAP
{ ""/*"FET_STA"*/, MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 5, 3, { "FET_STA", 1, MENUPAGE_NONE, MENUPAGE_NONE, 5, 3,
#else #else
{ ""/*"FET_STA"*/, MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2, { "FET_STA", 1, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2,
#endif #endif
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_NEW_GAME = 2 // MENUPAGE_NEW_GAME = 2
{ "FET_SGA", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 0, 1, { "FET_SGA", 1, MENUPAGE_NONE, MENUPAGE_NONE, 0, 1,
MENUACTION_CHANGEMENU, "FES_SNG", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD, MENUACTION_CHANGEMENU, "FES_SNG", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD,
MENUACTION_POPULATESLOTS_CHANGEMENU, "GMLOAD", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT, MENUACTION_POPULATESLOTS_CHANGEMENU, "GMLOAD", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT,
MENUACTION_POPULATESLOTS_CHANGEMENU, "FES_DGA", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, MENUACTION_POPULATESLOTS_CHANGEMENU, "FES_DGA", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT,
@ -25,15 +25,15 @@ const CMenuScreen aScreens[] = {
// MENUPAGE_BRIEFS = 3 // MENUPAGE_BRIEFS = 3
#ifdef MENU_MAP #ifdef MENU_MAP
{ "FET_BRE", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 6, 4, { "FET_BRE", 1, MENUPAGE_NONE, MENUPAGE_NONE, 6, 4,
#else #else
{ "FET_BRE", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 6, 3, { "FET_BRE", 1, MENUPAGE_NONE, MENUPAGE_NONE, 6, 3,
#endif #endif
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENU_CONTROLLER_SETTINGS = 4 // MENU_CONTROLLER_SETTINGS = 4
{ "FET_CON", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0, { "FET_CON", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS,
MENUACTION_CTRLDISPLAY, "FEC_CDP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, MENUACTION_CTRLDISPLAY, "FEC_CDP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS,
MENUACTION_CTRLVIBRATION, "FEC_VIB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, MENUACTION_CTRLVIBRATION, "FEC_VIB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS,
@ -41,7 +41,7 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_SOUND_SETTINGS = 5 // MENUPAGE_SOUND_SETTINGS = 5
{ "FET_AUD", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 1, 1, { "FET_AUD", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 1, 1,
MENUACTION_MUSICVOLUME, "FEA_MUS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, MENUACTION_MUSICVOLUME, "FEA_MUS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_SFXVOLUME, "FEA_SFX", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, MENUACTION_SFXVOLUME, "FEA_SFX", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_AUDIOHW, "FEA_3DH", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, MENUACTION_AUDIOHW, "FEA_3DH", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
@ -53,7 +53,7 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_GRAPHICS_SETTINGS = 6 // MENUPAGE_GRAPHICS_SETTINGS = 6
{ "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 2, 2, { "FET_DIS", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 2, 2,
MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
@ -67,7 +67,7 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_LANGUAGE_SETTINGS = 7 // MENUPAGE_LANGUAGE_SETTINGS = 7
{ "FET_LAN", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 3, 3, { "FET_LAN", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 3, 3,
MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_NONE,
@ -80,7 +80,7 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_CHOOSE_LOAD_SLOT = 8 // MENUPAGE_CHOOSE_LOAD_SLOT = 8
{ "FET_LG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 1, 1, { "FET_LG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 1, 1,
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_LOAD_SLOT_CONFIRM,
@ -93,7 +93,7 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_CHOOSE_DELETE_SLOT = 9 // MENUPAGE_CHOOSE_DELETE_SLOT = 9
{ "FET_DG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 2, 2, { "FET_DG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 2, 2,
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM,
@ -106,104 +106,123 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_NEW_GAME_RELOAD = 10 // MENUPAGE_NEW_GAME_RELOAD = 10
{ "FET_NG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 0, 0, { "FET_NG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 0, 0,
MENUACTION_LABEL, "FESZ_QR", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FESZ_QR", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_NEWGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD, MENUACTION_NEWGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD,
}, },
// MENUPAGE_LOAD_SLOT_CONFIRM = 11 // MENUPAGE_LOAD_SLOT_CONFIRM = 11
{ "FET_LG", MENUPAGE_CHOOSE_LOAD_SLOT, MENUPAGE_CHOOSE_LOAD_SLOT, MENUPAGE_CHOOSE_LOAD_SLOT, 0, 0, { "FET_LG", 1, MENUPAGE_CHOOSE_LOAD_SLOT, MENUPAGE_CHOOSE_LOAD_SLOT, 0, 0,
MENUACTION_LABEL, "FESZ_QL", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FESZ_QL", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT, MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT,
MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_LOADING_IN_PROGRESS, MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_LOADING_IN_PROGRESS,
}, },
// MENUPAGE_DELETE_SLOT_CONFIRM = 12 // MENUPAGE_DELETE_SLOT_CONFIRM = 12
{ "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, 0, 0, { "FET_DG", 1, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, 0, 0,
MENUACTION_LABEL, "FESZ_QD", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FESZ_QD", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT,
MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_DELETING, MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_DELETING,
}, },
// MENUPAGE_13 = 13 // MENUPAGE_NO_MEMORY_CARD = 13
{ "FES_NOC", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FES_NOC", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FEC_OFI", SAVESLOT_NONE, MENUPAGE_NONE, // only in mobile. FEC_OFI is missing
}, },
// MENUPAGE_LOADING_IN_PROGRESS = 14 // MENUPAGE_LOADING_IN_PROGRESS = 14
{ "FET_LG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_LG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FED_LDW", SAVESLOT_NONE, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_LABEL, "FED_LDW", SAVESLOT_NONE, MENUPAGE_LOAD_SLOT_CONFIRM,
}, },
// MENUPAGE_DELETING_IN_PROGRESS = 15 // MENUPAGE_DELETING_IN_PROGRESS = 15
{ "FET_DG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_DG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FEDL_WR", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FEDL_WR", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_16 = 16 // MENUPAGE_PS2_LOAD_FAILED = 16
{ "FET_LG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_LG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FES_LOE", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FES_LOE", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_DELETE_FAILED = 17 // MENUPAGE_DELETE_FAILED = 17
{ "FET_DG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_DG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FES_DEE", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FES_DEE", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT,
}, },
// MENUPAGE_DEBUG_MENU = 18 // MENUPAGE_DEBUG_MENU = 18
{ "FED_DBG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FED_DBG", 1, MENUPAGE_NONE, MENUPAGE_NONE, 4, 0,
MENUACTION_RELOADIDE, "FED_RID", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_RELOADIPL, "FED_RIP", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_SETDBGFLAG, "FED_DFL", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_SWITCHBIGWHITEDEBUGLIGHT, "FED_DLS", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_PEDROADGROUPS, "FED_SPR", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CARROADGROUPS, "FED_SCR", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_COLLISIONPOLYS, "FED_SCP", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_PARSEHEAP, "FED_PAH", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_SHOWCULL, "FED_SCZ", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_DEBUGSTREAM, "FED_DSR", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_MEMORY_CARD_1 = 19 // MENUPAGE_MEMORY_CARD_DEBUG = 19
{ "FEM_MCM", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FEM_MCM", 1, MENUPAGE_NONE, MENUPAGE_NONE, 7, 0,
MENUACTION_REGMEMCARD1, "FEM_RMC", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_TESTFORMATMEMCARD1, "FEM_TFM", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_TESTUNFORMATMEMCARD1, "FEM_TUM", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CREATEROOTDIR, "FEM_CRD", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CREATELOADICONS, "FEM_CLI", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_FILLWITHGUFF, "FEM_FFF", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_SAVEONLYTHEGAME, "FEM_SOG", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_SAVEGAME, "FEM_STG", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_SAVEGAMEUNDERGTA, "FEM_STS", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CREATECOPYPROTECTED, "FEM_CPD", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_MEMORY_CARD_2 = 20 // MENUPAGE_MEMORY_CARD_TEST = 20
{ "FEM_MC2", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FEM_MC2", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_MULTIPLAYER_MAIN = 21 // MENUPAGE_MULTIPLAYER_MAIN = 21
{ "FET_MP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_MP", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_SAVE_FAILED_1 = 22 // MENUPAGE_PS2_SAVE_FAILED = 22
{ "MCDNSP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "MCDNSP", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_SAVE_FAILED_2 = 23 // MENUPAGE_PS2_SAVE_FAILED_2 = 23
{ "MCGNSP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "MCGNSP", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_MEMCARDSAVECONFIRM, "JAILB_U", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// Unused in PC but anyway // Unused in PC but anyway
// MENUPAGE_SAVE = 24 // MENUPAGE_SAVE = 24
#ifdef PS2_SAVE_DIALOG #ifdef PS2_SAVE_DIALOG
{ "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_SG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_CHANGEMENU, "FESZ_SA", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, MENUACTION_CHANGEMENU, "FESZ_SA", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
#else #else
{ "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_SG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_LABEL, "FES_SCG", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FES_SCG", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_POPULATESLOTS_CHANGEMENU, "GMSAVE", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, MENUACTION_POPULATESLOTS_CHANGEMENU, "GMSAVE", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
#endif #endif
// MENUPAGE_NO_MEMORY_CARD = 25 // MENUPAGE_NO_MEMORY_CARD_2 = 25
{ "FES_NOC", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FES_NOC", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_CHOOSE_SAVE_SLOT = 26 // MENUPAGE_CHOOSE_SAVE_SLOT = 26
{ "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_SG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_RESUME_FROM_SAVEZONE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_1, MENUPAGE_SAVE_OVERWRITE_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_1, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_2, MENUPAGE_SAVE_OVERWRITE_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_2, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
@ -216,49 +235,49 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27 // MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0, { "FET_SG", 1, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0,
MENUACTION_LABEL, "FESZ_QO", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FESZ_QO", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_SAVING_IN_PROGRESS, MENUACTION_CHANGEMENU, "FEM_YES", SAVESLOT_NONE, MENUPAGE_SAVING_IN_PROGRESS,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
}, },
// MENUPAGE_MULTIPLAYER_MAP = 28 // MENUPAGE_MULTIPLAYER_MAP = 28
{ "FET_MAP", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_MAP", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_MULTIPLAYER_CONNECTION = 29 // MENUPAGE_MULTIPLAYER_CONNECTION = 29
{ "FET_CON", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_CON", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_MULTIPLAYER_FIND_GAME = 30 // MENUPAGE_MULTIPLAYER_FIND_GAME = 30
{ "FET_FG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_FG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_MULTIPLAYER_MODE = 31 // MENUPAGE_MULTIPLAYER_MODE = 31
{ "FET_GT", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_GT", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_MULTIPLAYER_CREATE = 32 // MENUPAGE_MULTIPLAYER_CREATE = 32
{ "FET_HG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_HG", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_MULTIPLAYER_START = 33 // MENUPAGE_MULTIPLAYER_START = 33
{ "FEN_STA", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FEN_STA", 2, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_SKIN_SELECT_OLD = 34 // MENUPAGE_SKIN_SELECT_OLD = 34
{ "FET_PS", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_PS", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_CONTROLLER_PC = 35 // MENUPAGE_CONTROLLER_PC = 35
{ "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0, { "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
MENUACTION_CHANGEMENU, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS, MENUACTION_CHANGEMENU, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS,
MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
@ -268,7 +287,7 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_CONTROLLER_PC_OLD1 = 36 // MENUPAGE_CONTROLLER_PC_OLD1 = 36
{ "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 0, 0, { "FET_CTL", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 0, 0,
MENUACTION_GETKEY, "FEC_PLB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, MENUACTION_GETKEY, "FEC_PLB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1,
MENUACTION_GETKEY, "FEC_CWL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, MENUACTION_GETKEY, "FEC_CWL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1,
MENUACTION_GETKEY, "FEC_CWR", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1, MENUACTION_GETKEY, "FEC_CWR", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD1,
@ -282,12 +301,12 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_CONTROLLER_PC_OLD2 = 37 // MENUPAGE_CONTROLLER_PC_OLD2 = 37
{ "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 1, 1, { "FET_CTL", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 1, 1,
}, },
// MENUPAGE_CONTROLLER_PC_OLD3 = 38 // MENUPAGE_CONTROLLER_PC_OLD3 = 38
{ "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 2, 2, { "FET_CTL", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 2, 2,
MENUACTION_GETKEY, "FEC_LUP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, MENUACTION_GETKEY, "FEC_LUP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3,
MENUACTION_GETKEY, "FEC_LDN", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, MENUACTION_GETKEY, "FEC_LDN", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3,
MENUACTION_GETKEY, "FEC_SMS", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3, MENUACTION_GETKEY, "FEC_SMS", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC_OLD3,
@ -296,20 +315,24 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_CONTROLLER_PC_OLD4 = 39 // MENUPAGE_CONTROLLER_PC_OLD4 = 39
{ "FET_CTL", MENUPAGE_DISABLED, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 3, 3, { "FET_CTL", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 3, 3,
}, },
// MENUPAGE_CONTROLLER_DEBUG = 40 // MENUPAGE_CONTROLLER_DEBUG = 40
{ "FEC_DBG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FEC_DBG", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 3, 3,
MENUACTION_GETKEY, "FEC_TGD", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG,
MENUACTION_GETKEY, "FEC_TDO", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG,
MENUACTION_GETKEY, "FEC_TSS", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG,
MENUACTION_GETKEY, "FEC_SMS", SAVESLOT_NONE, MENUPAGE_CONTROLLER_DEBUG,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_OPTIONS = 41 // MENUPAGE_OPTIONS = 41
#ifdef MENU_MAP #ifdef MENU_MAP
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 1, 5, { "FET_OPT", 1, MENUPAGE_NONE, MENUPAGE_NONE, 1, 5,
#else #else
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 1, 4, { "FET_OPT", 1, MENUPAGE_NONE, MENUPAGE_NONE, 1, 4,
#endif #endif
MENUACTION_CHANGEMENU, "FET_CTL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_CHANGEMENU, "FET_CTL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
MENUACTION_LOADRADIO, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, MENUACTION_LOADRADIO, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
@ -321,9 +344,9 @@ const CMenuScreen aScreens[] = {
// MENUPAGE_EXIT = 42 // MENUPAGE_EXIT = 42
#ifdef MENU_MAP #ifdef MENU_MAP
{ "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 2, 6, { "FET_QG", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 6,
#else #else
{ "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 2, 5, { "FET_QG", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 5,
#endif #endif
MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE,
@ -331,58 +354,58 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_SAVING_IN_PROGRESS = 43 // MENUPAGE_SAVING_IN_PROGRESS = 43
{ "", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0, { "", 1, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0,
MENUACTION_LABEL, "FES_WAR", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FES_WAR", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_SAVE_SUCCESSFUL = 44 // MENUPAGE_SAVE_SUCCESSFUL = 44
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0, { "FET_SG", 1, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0,
MENUACTION_LABEL, "FES_SSC", SAVESLOT_LABEL, MENUPAGE_NONE, MENUACTION_LABEL, "FES_SSC", SAVESLOT_LABEL, MENUPAGE_NONE,
MENUACTION_RESUME_FROM_SAVEZONE, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, MENUACTION_RESUME_FROM_SAVEZONE, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
}, },
// MENUPAGE_DELETING = 45 // MENUPAGE_DELETING = 45
{ "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, 0, 0, { "FET_DG", 1, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, 0, 0,
MENUACTION_LABEL, "FED_DLW", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FED_DLW", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_DELETE_SUCCESS = 46 // MENUPAGE_DELETE_SUCCESS = 46
{ "FET_DG", MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, 0, 0, { "FET_DG", 1, MENUPAGE_CHOOSE_DELETE_SLOT, MENUPAGE_CHOOSE_DELETE_SLOT, 0, 0,
MENUACTION_LABEL, "DEL_FNM", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "DEL_FNM", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT, MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT,
}, },
// MENUPAGE_SAVE_FAILED = 47 // MENUPAGE_SAVE_FAILED = 47
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0, { "FET_SG", 1, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0,
MENUACTION_LABEL, "FEC_SVU", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FEC_SVU", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT, MENUACTION_CHANGEMENU, "FEC_OKK", SAVESLOT_NONE, MENUPAGE_CHOOSE_SAVE_SLOT,
}, },
// MENUPAGE_LOAD_FAILED = 48 // MENUPAGE_LOAD_FAILED = 48
{ "FET_SG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0, { "FET_SG", 1, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0,
MENUACTION_LABEL, "FEC_SVU", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FEC_SVU", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_LOAD_FAILED_2 = 49 // MENUPAGE_LOAD_FAILED_2 = 49
{ "FET_LG", MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0, { "FET_LG", 1, MENUPAGE_CHOOSE_SAVE_SLOT, MENUPAGE_CHOOSE_SAVE_SLOT, 0, 0,
MENUACTION_LABEL, "FEC_LUN", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FEC_LUN", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT,
}, },
// MENUPAGE_FILTER_GAME = 50 // MENUPAGE_FILTER_GAME = 50
{ "FIL_FLT", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FIL_FLT", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
}, },
// MENUPAGE_START_MENU = 51 // MENUPAGE_START_MENU = 51
{ "FEM_MM", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FEM_MM", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS, MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS,
MENUACTION_CHANGEMENU, "FEM_QT", SAVESLOT_NONE, MENUPAGE_EXIT, MENUACTION_CHANGEMENU, "FEM_QT", SAVESLOT_NONE, MENUPAGE_EXIT,
}, },
// MENUPAGE_PAUSE_MENU = 52 // MENUPAGE_PAUSE_MENU = 52
{ "FET_PAU", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FET_PAU", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
#ifdef MENU_MAP #ifdef MENU_MAP
@ -395,22 +418,24 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_CHOOSE_MODE = 53 // MENUPAGE_CHOOSE_MODE = 53
{ "FEN_STA", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "FEN_STA", 1, MENUPAGE_NONE, MENUPAGE_NONE, 0, 1,
MENUACTION_CHANGEMENU, "FET_SP", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_INITMP, "FET_MP", SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_SKIN_SELECT = 54 // MENUPAGE_SKIN_SELECT = 54
{ "FET_PSU", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 4, 4, { "FET_PSU", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 4, 4,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN,
}, },
// MENUPAGE_KEYBOARD_CONTROLS = 55 // MENUPAGE_KEYBOARD_CONTROLS = 55
{ "FET_STI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 1, 1, { "FET_STI", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 1, 1,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
}, },
// MENUPAGE_MOUSE_CONTROLS = 56 // MENUPAGE_MOUSE_CONTROLS = 56
{ "FET_MTI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 2, 2, { "FET_MTI", 1, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, 2, 2,
MENUACTION_MOUSESENS, "FEC_MSH", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, MENUACTION_MOUSESENS, "FEC_MSH", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
MENUACTION_INVVERT, "FEC_IVV", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, MENUACTION_INVVERT, "FEC_IVV", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
MENUACTION_MOUSESTEER, "FET_MST", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, MENUACTION_MOUSESTEER, "FET_MST", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
@ -418,18 +443,18 @@ const CMenuScreen aScreens[] = {
}, },
// MENUPAGE_57 = 57 // MENUPAGE_57 = 57
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "", 0, MENUPAGE_NONE, MENUPAGE_NONE, 0, 0,
}, },
// MENUPAGE_58 = 58 // MENUPAGE_58 = 58
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, { "", 0, MENUPAGE_NONE, MENUPAGE_NONE, 0, 0,
}, },
#ifdef MENU_MAP #ifdef MENU_MAP
// MENUPAGE_MAP = 59 // MENUPAGE_MAP = 59
{ "FEG_MAP", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2, { "FEG_MAP", 1, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2,
}, },
#endif #endif
}; };

View File

@ -1412,8 +1412,8 @@ CRadar::DrawYouAreHereSprite(float x, float y)
} }
} else { } else {
if (CTimer::GetTimeInMillisecondsPauseMode() - lastChange > 200) { if (CTimer::GetTimeInMillisecondsPauseMode() - lastChange > 200) {
lastChange = CTimer::GetTimeInMillisecondsPauseMode(); lastChange = CTimer::GetTimeInMillisecondsPauseMode();
show = !show; show = !show;
} }
} }
@ -1422,7 +1422,7 @@ CRadar::DrawYouAreHereSprite(float x, float y)
float top = y - SCREEN_SCALE_Y(2.0f); float top = y - SCREEN_SCALE_Y(2.0f);
float right = SCREEN_SCALE_X(12.0) + x; float right = SCREEN_SCALE_X(12.0) + x;
float bottom = y - SCREEN_SCALE_Y(26.0f); float bottom = y - SCREEN_SCALE_Y(26.0f);
CentreSprite.Draw(CRect(left, top, right, bottom), CRGBA(255, 217, 106, 255)); CentreSprite.Draw(CRect(left, top, right, bottom), CRGBA(255, 255, 255, 255));
} }
MapLegendList[MapLegendCounter++] = RADAR_SPRITE_CENTRE; MapLegendList[MapLegendCounter++] = RADAR_SPRITE_CENTRE;
} }
@ -1503,4 +1503,4 @@ STARTPATCHES
InjectHook(0x4A6F30, CRadar::LoadAllRadarBlips, PATCH_JUMP); InjectHook(0x4A6F30, CRadar::LoadAllRadarBlips, PATCH_JUMP);
//InjectHook(0x4A7000, `global constructor keyed to'Radar.cpp, PATCH_JUMP); //InjectHook(0x4A7000, `global constructor keyed to'Radar.cpp, PATCH_JUMP);
//InjectHook(0x4A7260, sRadarTrace::sRadarTrace, PATCH_JUMP); //InjectHook(0x4A7260, sRadarTrace::sRadarTrace, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -34,6 +34,10 @@ LARGE_INTEGER &perfSuspendCounter = *(LARGE_INTEGER*)0x62A318;
//UInt32 suspendDepth; //UInt32 suspendDepth;
uint32 &suspendDepth = *(uint32*)0x62A320; uint32 &suspendDepth = *(uint32*)0x62A320;
#ifdef FIX_BUGS
double frameTime;
#endif
void CTimer::Initialise(void) void CTimer::Initialise(void)
{ {
debug("Initialising CTimer...\n"); debug("Initialising CTimer...\n");
@ -90,17 +94,21 @@ void CTimer::Update(void)
float updInCyclesScaled = updInCycles * ms_fTimeScale; float updInCyclesScaled = updInCycles * ms_fTimeScale;
double upd = updInCyclesScaled / (double)_nCyclesPerMS; // We need that real frame time to fix transparent menu bug.
#ifndef FIX_BUGS
double
#endif
frameTime = updInCyclesScaled / (double)_nCyclesPerMS;
m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + upd; m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + frameTime;
if ( GetIsPaused() ) if ( GetIsPaused() )
ms_fTimeStep = 0.0f; ms_fTimeStep = 0.0f;
else else
{ {
m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd; m_snTimeInMilliseconds = m_snTimeInMilliseconds + frameTime;
m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd; m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + frameTime;
ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0f; ms_fTimeStep = frameTime / 1000.0f * 50.0f;
} }
} }
else else
@ -109,19 +117,23 @@ void CTimer::Update(void)
uint32 updInMs = timer - oldPcTimer; uint32 updInMs = timer - oldPcTimer;
double upd = (double)updInMs * ms_fTimeScale; // We need that real frame time to fix transparent menu bug.
#ifndef FIX_BUGS
double
#endif
frameTime = (double)updInMs * ms_fTimeScale;
oldPcTimer = timer; oldPcTimer = timer;
m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + upd; m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + frameTime;
if ( GetIsPaused() ) if ( GetIsPaused() )
ms_fTimeStep = 0.0f; ms_fTimeStep = 0.0f;
else else
{ {
m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd; m_snTimeInMilliseconds = m_snTimeInMilliseconds + frameTime;
m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd; m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + frameTime;
ms_fTimeStep = upd / 1000.0f * 50.0f; ms_fTimeStep = frameTime / 1000.0f * 50.0f;
} }
} }

View File

@ -54,3 +54,7 @@ public:
static void StartUserPause(void); static void StartUserPause(void);
static void EndUserPause(void); static void EndUserPause(void);
}; };
#ifdef FIX_BUGS
extern double frameTime;
#endif

View File

@ -21,6 +21,7 @@
#include "Particle.h" #include "Particle.h"
#include "Console.h" #include "Console.h"
#include "Debug.h" #include "Debug.h"
#include "Hud.h"
#include <list> #include <list>
@ -342,6 +343,7 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); }); DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); });
DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); }); DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); });
DebugMenuAddVarBool8("Debug", "Draw hud", (int8*)&CHud::m_Wants_To_Draw_Hud, nil);
DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil); DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil);
DebugMenuAddCmd("Debug", "Set Engine Status", SetEngineStatus); DebugMenuAddCmd("Debug", "Set Engine Status", SetEngineStatus);
DebugMenuAddCmd("Debug", "Fix Car", FixCar); DebugMenuAddCmd("Debug", "Fix Car", FixCar);

View File

@ -28,10 +28,8 @@ CCivilianPed::CivilianAI(void)
return; return;
if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS) { if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS) {
if (m_pedInObjective) { if (m_pedInObjective && m_pedInObjective->IsPlayer())
if (m_pedInObjective->IsPlayer()) return;
return;
}
} }
if (CTimer::GetTimeInMilliseconds() <= m_lookTimer) if (CTimer::GetTimeInMilliseconds() <= m_lookTimer)
return; return;
@ -75,7 +73,7 @@ CCivilianPed::CivilianAI(void)
} else { } else {
SetMoveState(PEDMOVE_WALK); SetMoveState(PEDMOVE_WALK);
} }
} else if (threatPed->IsPlayer() && FindPlayerPed()->m_pWanted->m_CurrentCops) { } else if (threatPed->IsPlayer() && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) {
SetFindPathAndFlee(m_threatEntity, 5000); SetFindPathAndFlee(m_threatEntity, 5000);
if (threatDistSqr < sq(10.0f)) { if (threatDistSqr < sq(10.0f)) {
SetMoveState(PEDMOVE_RUN); SetMoveState(PEDMOVE_RUN);
@ -170,8 +168,8 @@ CCivilianPed::CivilianAI(void)
if (m_threatEntity && m_threatEntity->IsPed()) { if (m_threatEntity && m_threatEntity->IsPed()) {
CPed *threatPed = (CPed*)m_threatEntity; CPed *threatPed = (CPed*)m_threatEntity;
if (m_pedStats->m_fear <= 100 - threatPed->m_pedStats->m_temper && threatPed->m_nPedType != PEDTYPE_COP) { if (m_pedStats->m_fear <= 100 - threatPed->m_pedStats->m_temper && threatPed->m_nPedType != PEDTYPE_COP) {
if (threatPed->GetWeapon()->IsTypeMelee() || !GetWeapon()->IsTypeMelee()) { if (threatPed->GetWeapon(m_currentWeapon).IsTypeMelee() || !GetWeapon()->IsTypeMelee()) {
if (threatPed->IsPlayer() && FindPlayerPed()->m_pWanted->m_CurrentCops) { if (threatPed->IsPlayer() && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) {
if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS) { if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS) {
SetFindPathAndFlee(m_threatEntity, 10000); SetFindPathAndFlee(m_threatEntity, 10000);
} }

View File

@ -21,54 +21,52 @@
#include "User.h" #include "User.h"
#include "World.h" #include "World.h"
wchar *CHud::m_HelpMessage = (wchar*)0x86B888; wchar CHud::m_HelpMessage[256]; // = (wchar*)0x86B888;
wchar *CHud::m_LastHelpMessage = (wchar*)0x6E8F28; wchar CHud::m_LastHelpMessage[256]; // = (wchar*)0x6E8F28;
int32 &CHud::m_HelpMessageState = *(int32*)0x880E1C; uint32 CHud::m_HelpMessageState; // = *(int32*)0x880E1C;
int32 &CHud::m_HelpMessageTimer = *(int32*)0x880FA4; uint32 CHud::m_HelpMessageTimer; // = *(int32*)0x880FA4;
int32 &CHud::m_HelpMessageFadeTimer = *(int32*)0x8F6258; int32 CHud::m_HelpMessageFadeTimer; // = *(int32*)0x8F6258;
wchar *CHud::m_HelpMessageToPrint = (wchar*)0x664480; wchar CHud::m_HelpMessageToPrint[256]; // = (wchar*)0x664480;
float &CHud::m_HelpMessageDisplayTime = *(float*)0x8E2C28; float CHud::m_fHelpMessageTime; // *(float *)0x8E2C28;
float &CHud::m_fTextBoxNumLines = *(float*)0x8E2C28; bool CHud::m_HelpMessageQuick; // = *(bool*)0x95CCF7;
float &CHud::m_fHelpMessageTime = *(float *)0x8E2C28; uint32 CHud::m_ZoneState; // = *(int32*)0x8F29AC;
bool &CHud::m_HelpMessageQuick = *(bool *)0x95CCF7;
int32 CHud::m_ZoneState = *(int32*)0x8F29AC;
int32 CHud::m_ZoneFadeTimer; int32 CHud::m_ZoneFadeTimer;
int32 CHud::m_ZoneNameTimer = *(int32*)0x8F1A50; uint32 CHud::m_ZoneNameTimer; // = *(int32*)0x8F1A50;
wchar *&CHud::m_pZoneName = *(wchar **)0x8E2C2C; wchar *CHud::m_pZoneName; // = *(wchar**)0x8E2C2C;
wchar *CHud::m_pLastZoneName = (wchar*)0x8F432C; wchar *CHud::m_pLastZoneName; // = (wchar*)0x8F432C;
wchar *CHud::m_ZoneToPrint; wchar *CHud::m_ZoneToPrint;
int32 CHud::m_VehicleState = *(int32*)0x940560; uint32 CHud::m_VehicleState; // = *(int32*)0x940560;
int32 CHud::m_VehicleFadeTimer; int32 CHud::m_VehicleFadeTimer;
int32 CHud::m_VehicleNameTimer = *(int32*)0x8F2A14; uint32 CHud::m_VehicleNameTimer; // = *(int32*)0x8F2A14;
wchar *&CHud::m_VehicleName = *(wchar **)0x942FB4; wchar *CHud::m_VehicleName; // = *(wchar**)0x942FB4;
wchar *CHud::m_pLastVehicleName = *(wchar **)0x8E2DD8; wchar *CHud::m_pLastVehicleName; // = *(wchar**)0x8E2DD8;
wchar *CHud::m_pVehicleNameToPrint; wchar *CHud::m_pVehicleNameToPrint;
wchar *CHud::m_Message = (wchar*)0x72E318; wchar CHud::m_Message[256];// = (wchar*)0x72E318;
wchar *CHud::m_PagerMessage = (wchar*)0x878840; wchar CHud::m_PagerMessage[256]; // = (wchar*)0x878840;
bool &CHud::m_Wants_To_Draw_Hud = *(bool*)0x95CD89; bool CHud::m_Wants_To_Draw_Hud; // (bool*)0x95CD89;
bool &CHud::m_Wants_To_Draw_3dMarkers = *(bool*)0x95CD62; bool CHud::m_Wants_To_Draw_3dMarkers; // = *(bool*)0x95CD62;
wchar(&CHud::m_BigMessage)[6][128] = *(wchar(*)[6][128])*(uintptr*)0x664CE0; wchar CHud::m_BigMessage[6][128]; // = *(wchar(*)[6][128]) * (uintptr*)0x664CE0;
int16 &CHud::m_ItemToFlash = *(int16*)0x95CC82; int16 CHud::m_ItemToFlash; // = *(int16*)0x95CC82;
// These aren't really in CHud // These aren't really in CHud
float CHud::BigMessageInUse[6]; float CHud::BigMessageInUse[6];
float CHud::BigMessageAlpha[6]; float CHud::BigMessageAlpha[6];
float CHud::BigMessageX[6]; float CHud::BigMessageX[6];
float &CHud::OddJob2OffTimer = *(float*)0x942FA0; float CHud::OddJob2OffTimer; // = *(float*)0x942FA0;
int8 &CHud::CounterOnLastFrame = *(int8*)0x95CD67; bool CHud::CounterOnLastFrame; // = *(int8*)0x95CD67;
float &CHud::OddJob2XOffset = *(float*)0x8F1B5C; float CHud::OddJob2XOffset; // = *(float*)0x8F1B5C;
int16 &CHud::CounterFlashTimer = *(int16*)0x95CC20; uint16 CHud::CounterFlashTimer; // = *(int16*)0x95CC20;
int16 &CHud::OddJob2Timer = *(int16*)0x95CC52; uint16 CHud::OddJob2Timer; // = *(int16*)0x95CC52;
int8 &CHud::TimerOnLastFrame = *(int8*)0x95CDA7; bool CHud::TimerOnLastFrame; //= *(int8*)0x95CDA7;
int16 &CHud::OddJob2On = *(int16*)0x95CC78; int16 CHud::OddJob2On; //= *(int16*)0x95CC78;
int16 &CHud::TimerFlashTimer = *(int16*)0x95CC6C; uint16 CHud::TimerFlashTimer; //= *(int16*)0x95CC6C;
int16 &CHud::PagerSoundPlayed = *(int16*)0x95CC4A; int16 CHud::PagerSoundPlayed; //= *(int16*)0x95CC4A;
int32 &CHud::SpriteBrightness = *(int32*)0x95CC54; int32 CHud::SpriteBrightness; //= *(int32*)0x95CC54;
float &CHud::PagerXOffset = *(float*)0x941590; float CHud::PagerXOffset; //= *(float*)0x941590;
int16 &CHud::PagerTimer = *(int16*)0x95CC3A; int16 CHud::PagerTimer; //= *(int16*)0x95CC3A;
int16 &CHud::PagerOn = *(int16*)0x95CCA0; int16 CHud::PagerOn; //= *(int16*)0x95CCA0;
CSprite2d *CHud::Sprites = (CSprite2d*)0x95CB9C; CSprite2d CHud::Sprites[NUM_HUD_SPRITES]; // = (CSprite2d*)0x95CB9C;
struct struct
{ {
@ -90,14 +88,14 @@ struct
{"detonator", "detonator_mask"}, {"detonator", "detonator_mask"},
{"", ""}, {"", ""},
{"", ""}, {"", ""},
{"radardisc", "radardiscm"}, {"radardisc", "radardisc"},
{"pager", "pagerm"}, {"pager", "pagerm"},
{"", ""}, {"", ""},
{"", ""}, {"", ""},
{"bleeder", ""}, {"bleeder", ""},
{"sitesniper", "sitesniperm"}, {"sitesniper", "sitesniperm"},
{"siteM16", "siteM16m"}, {"siteM16", "siteM16m"},
{"siterocket", "siterocketm"} {"siterocket", "siterocket"}
}; };
RwTexture *&gpSniperSightTex = *(RwTexture**)0x8F5834; RwTexture *&gpSniperSightTex = *(RwTexture**)0x8F5834;
@ -415,7 +413,7 @@ void CHud::Draw()
DrawZoneName DrawZoneName
*/ */
if (m_pZoneName) { if (m_pZoneName) {
float fZoneAlpha = 0.0f; float fZoneAlpha = 255.0f;
if (m_pZoneName != m_pLastZoneName) { if (m_pZoneName != m_pLastZoneName) {
switch (m_ZoneState) { switch (m_ZoneState) {
@ -429,7 +427,7 @@ void CHud::Draw()
case 2: case 2:
case 3: case 3:
case 4: case 4:
m_ZoneNameTimer = 0; m_ZoneNameTimer = 5;
m_ZoneState = 4; m_ZoneState = 4;
break; break;
default: default:
@ -441,6 +439,7 @@ void CHud::Draw()
if (m_ZoneState) { if (m_ZoneState) {
switch (m_ZoneState) { switch (m_ZoneState) {
case 1: case 1:
m_ZoneFadeTimer = 1000;
if (m_ZoneNameTimer > 10000) { if (m_ZoneNameTimer > 10000) {
m_ZoneFadeTimer = 1000; m_ZoneFadeTimer = 1000;
m_ZoneState = 3; m_ZoneState = 3;
@ -468,7 +467,6 @@ void CHud::Draw()
if (m_ZoneFadeTimer < 0) { if (m_ZoneFadeTimer < 0) {
m_ZoneFadeTimer = 0; m_ZoneFadeTimer = 0;
m_ZoneToPrint = m_pLastZoneName; m_ZoneToPrint = m_pLastZoneName;
m_ZoneNameTimer = 0;
m_ZoneState = 2; m_ZoneState = 2;
} }
fZoneAlpha = m_ZoneFadeTimer * 0.001f * 255.0f; fZoneAlpha = m_ZoneFadeTimer * 0.001f * 255.0f;
@ -500,12 +498,6 @@ void CHud::Draw()
} }
} }
} }
/*else {
m_pLastZoneName = nil;
m_ZoneState = 0;
m_ZoneFadeTimer = 0;
m_ZoneNameTimer = 0;
}*/
/* /*
DrawVehicleName DrawVehicleName
@ -633,9 +625,9 @@ void CHud::Draw()
wchar sTimer[16]; wchar sTimer[16];
if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bTimerProcessed) if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bTimerProcessed)
TimerOnLastFrame = 0; TimerOnLastFrame = false;
if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterProcessed) if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterProcessed)
CounterOnLastFrame = 0; CounterOnLastFrame = false;
#ifdef FIX_BUGS #ifdef FIX_BUGS
#define TIMER_RIGHT_OFFSET 34.0f // Taken from VC frenzy timer #define TIMER_RIGHT_OFFSET 34.0f // Taken from VC frenzy timer
@ -647,7 +639,7 @@ void CHud::Draw()
if (!TimerOnLastFrame) if (!TimerOnLastFrame)
TimerFlashTimer = 1; TimerFlashTimer = 1;
TimerOnLastFrame = 1; TimerOnLastFrame = true;
if (TimerFlashTimer) { if (TimerFlashTimer) {
if (++TimerFlashTimer > 50) if (++TimerFlashTimer > 50)
@ -685,7 +677,7 @@ void CHud::Draw()
if (!CounterOnLastFrame) if (!CounterOnLastFrame)
CounterFlashTimer = 1; CounterFlashTimer = 1;
CounterOnLastFrame = 1; CounterOnLastFrame = true;
if (CounterFlashTimer) { if (CounterFlashTimer) {
if (++CounterFlashTimer > 50) if (++CounterFlashTimer > 50)
@ -739,11 +731,9 @@ void CHud::Draw()
/* /*
DrawPager DrawPager
*/ */
if (!m_PagerMessage[0]) { if (!m_PagerMessage[0] && PagerOn == 1) {
if (PagerOn == 1) { PagerSoundPlayed = false;
PagerSoundPlayed = false; PagerOn = 2;
PagerOn = 2;
}
} }
if (m_PagerMessage[0] || PagerOn == 2) { if (m_PagerMessage[0] || PagerOn == 2) {
if (!PagerOn) { if (!PagerOn) {
@ -752,7 +742,7 @@ void CHud::Draw()
} }
if (PagerOn == 1) { if (PagerOn == 1) {
if (PagerXOffset > 0.0f) { if (PagerXOffset > 0.0f) {
float fStep = PagerXOffset * 0.05f; float fStep = PagerXOffset * 0.1f;
if (fStep > 10.0f) if (fStep > 10.0f)
fStep = 10.0f; fStep = 10.0f;
PagerXOffset -= fStep * CTimer::GetTimeStep(); PagerXOffset -= fStep * CTimer::GetTimeStep();
@ -763,10 +753,10 @@ void CHud::Draw()
} }
} }
else if (PagerOn == 2) { else if (PagerOn == 2) {
float fStep = PagerXOffset * 0.05f; float fStep = PagerXOffset * 0.1f;
if (fStep < 2.0f) if (fStep < 2.0f)
fStep = 2.0f; fStep = 2.0f;
PagerXOffset += fStep * CTimer::GetTimeStep(); PagerXOffset += fStep;
if (PagerXOffset > 150.0f) { if (PagerXOffset > 150.0f) {
PagerXOffset = 150.0f; PagerXOffset = 150.0f;
PagerOn = 0; PagerOn = 0;
@ -815,9 +805,7 @@ void CHud::Draw()
DrawScriptText DrawScriptText
*/ */
if (!CTimer::GetIsUserPaused()) { if (!CTimer::GetIsUserPaused()) {
intro_text_line* IntroText = CTheScripts::IntroTextLines; for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroTextLines); i++) {
for (int i = 0; i < MAX_NUM_INTRO_TEXT_LINES; i++) {
if (CTheScripts::IntroTextLines[i].m_Text[0] && CTheScripts::IntroTextLines[i].m_bTextBeforeFade) { if (CTheScripts::IntroTextLines[i].m_Text[0] && CTheScripts::IntroTextLines[i].m_bTextBeforeFade) {
CFont::SetScale(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fScaleX), SCREEN_SCALE_Y(CTheScripts::IntroTextLines[i].m_fScaleY * 0.5f)); CFont::SetScale(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fScaleX), SCREEN_SCALE_Y(CTheScripts::IntroTextLines[i].m_fScaleY * 0.5f));
CFont::SetColor(CTheScripts::IntroTextLines[i].m_sColor); CFont::SetColor(CTheScripts::IntroTextLines[i].m_sColor);
@ -858,31 +846,31 @@ void CHud::Draw()
CFont::SetPropOff(); CFont::SetPropOff();
CFont::SetFontStyle(CTheScripts::IntroTextLines[i].m_nFont); CFont::SetFontStyle(CTheScripts::IntroTextLines[i].m_nFont);
CFont::PrintString(SCREEN_SCALE_X(640.0f - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(448.0f - CTheScripts::IntroTextLines[i].m_fAtY), IntroText->m_Text); CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
} }
} }
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
intro_script_rectangle &IntroRect = CTheScripts::IntroRectangles[i];
intro_script_rectangle* IntroRect = CTheScripts::IntroRectangles; // Yeah, top and bottom changed place. R* vision
if (IntroRect.m_bIsUsed && IntroRect.m_bBeforeFade) {
for (int i = 0; i < 16; i++) { if (IntroRect.m_nTextureId >= 0) {
if (CTheScripts::IntroRectangles[i].m_bIsUsed && CTheScripts::IntroRectangles[i].m_bBeforeFade) {
if (CTheScripts::IntroRectangles[i].m_nTextureId >= 0) {
CRect rect = { CRect rect = {
CTheScripts::IntroRectangles[i].m_sRect.left, IntroRect.m_sRect.left,
CTheScripts::IntroRectangles[i].m_sRect.bottom, IntroRect.m_sRect.top,
CTheScripts::IntroRectangles[i].m_sRect.right, IntroRect.m_sRect.right,
CTheScripts::IntroRectangles[i].m_sRect.bottom }; IntroRect.m_sRect.bottom };
CTheScripts::ScriptSprites[CTheScripts::IntroRectangles[i].m_nTextureId].Draw(rect, IntroRect->m_sColor); CTheScripts::ScriptSprites[IntroRect.m_nTextureId].Draw(rect, IntroRect.m_sColor);
} }
else { else {
CRect rect = { CRect rect = {
CTheScripts::IntroRectangles[i].m_sRect.left, IntroRect.m_sRect.left,
CTheScripts::IntroRectangles[i].m_sRect.bottom, IntroRect.m_sRect.top,
CTheScripts::IntroRectangles[i].m_sRect.right, IntroRect.m_sRect.right,
CTheScripts::IntroRectangles[i].m_sRect.bottom }; IntroRect.m_sRect.bottom };
CSprite2d::DrawRect(rect, IntroRect->m_sColor); CSprite2d::DrawRect(rect, IntroRect.m_sColor);
} }
} }
} }
@ -928,7 +916,7 @@ void CHud::Draw()
CFont::SetCentreSize(SCREEN_SCALE_X(615.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(615.0f));
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
if (BigMessageX[0] >= (SCREEN_WIDTH - 20)) { if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
BigMessageInUse[0] += CTimer::GetTimeStep(); BigMessageInUse[0] += CTimer::GetTimeStep();
if (BigMessageInUse[0] >= 120.0f) { if (BigMessageInUse[0] >= 120.0f) {
@ -945,7 +933,7 @@ void CHud::Draw()
BigMessageX[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f); BigMessageX[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
BigMessageAlpha[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f); BigMessageAlpha[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
if (BigMessageAlpha[0] >= 255.0f) if (BigMessageAlpha[0] > 255.0f)
BigMessageAlpha[0] = 255.0f; BigMessageAlpha[0] = 255.0f;
} }
@ -989,7 +977,7 @@ void CHud::Draw()
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[2])); CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[2]));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f + 4.0f), SCREEN_SCALE_FROM_BOTTOM(78.0f), m_BigMessage[2]); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f - 4.0f), SCREEN_SCALE_FROM_BOTTOM(78.0f), m_BigMessage[2]);
CFont::SetColor(CRGBA(170, 123, 87, BigMessageAlpha[2])); CFont::SetColor(CRGBA(170, 123, 87, BigMessageAlpha[2]));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(82.0f), m_BigMessage[2]); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(82.0f), m_BigMessage[2]);
@ -1018,7 +1006,7 @@ void CHud::DrawAfterFade()
m_HelpMessageState = 2; m_HelpMessageState = 2;
m_HelpMessageTimer = 0; m_HelpMessageTimer = 0;
CMessages::WideStringCopy(m_HelpMessageToPrint, m_HelpMessage, 256); CMessages::WideStringCopy(m_HelpMessageToPrint, m_HelpMessage, 256);
m_HelpMessageDisplayTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f; m_fHelpMessageTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f;
if (TheCamera.m_ScreenReductionPercentage == 0.0f) if (TheCamera.m_ScreenReductionPercentage == 0.0f)
DMAudio.PlayFrontEndSound(SOUND_A0, 0); DMAudio.PlayFrontEndSound(SOUND_A0, 0);
@ -1036,14 +1024,14 @@ void CHud::DrawAfterFade()
CMessages::WideStringCopy(m_LastHelpMessage, m_HelpMessage, 256); CMessages::WideStringCopy(m_LastHelpMessage, m_HelpMessage, 256);
} }
float fAlpha = 255.0f; float fAlpha = 225.0f;
if (m_HelpMessageState) { if (m_HelpMessageState != 0) {
switch (m_HelpMessageState) { switch (m_HelpMessageState) {
case 1: case 1:
fAlpha = 255.0f; fAlpha = 225.0f;
m_HelpMessageFadeTimer = 600; m_HelpMessageFadeTimer = 600;
if (m_HelpMessageTimer > m_fHelpMessageTime * 1000 || m_HelpMessageQuick && m_HelpMessageTimer > 1500) { if (m_HelpMessageTimer > m_fHelpMessageTime * 1000.0f || m_HelpMessageQuick && m_HelpMessageTimer > 1500.0f) {
m_HelpMessageFadeTimer = 600; m_HelpMessageFadeTimer = 600;
m_HelpMessageState = 3; m_HelpMessageState = 3;
} }
@ -1054,24 +1042,24 @@ void CHud::DrawAfterFade()
m_HelpMessageState = 1; m_HelpMessageState = 1;
m_HelpMessageFadeTimer = 0; m_HelpMessageFadeTimer = 0;
} }
fAlpha = m_HelpMessageFadeTimer * 0.001f * 255.0f; fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
break; break;
case 3: case 3:
m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds(); m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds();
if (m_HelpMessageFadeTimer >= 0) { if (m_HelpMessageFadeTimer < 0) {
m_HelpMessageState = 0; m_HelpMessageState = 0;
m_HelpMessageFadeTimer = 0; m_HelpMessageFadeTimer = 0;
} }
fAlpha = m_HelpMessageFadeTimer * 0.001f * 255.0f; fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
break; break;
case 4: case 4:
m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds(); m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds();
if (m_HelpMessageFadeTimer >= 0) { if (m_HelpMessageFadeTimer < 0) {
m_HelpMessageState = 2; m_HelpMessageState = 2;
m_HelpMessageFadeTimer = 0; m_HelpMessageFadeTimer = 0;
CMessages::WideStringCopy(m_HelpMessageToPrint, m_LastHelpMessage, 400); CMessages::WideStringCopy(m_HelpMessageToPrint, m_LastHelpMessage, 256);
} }
fAlpha = m_HelpMessageFadeTimer * 0.001f * 255.0f; fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
break; break;
default: default:
break; break;
@ -1088,19 +1076,75 @@ void CHud::DrawAfterFade()
else else
CFont::SetScale(SCREEN_SCALE_X(0.52f), SCREEN_SCALE_Y(1.1f)); CFont::SetScale(SCREEN_SCALE_X(0.52f), SCREEN_SCALE_Y(1.1f));
CFont::SetColor(CRGBA(175, 175, 175, 255));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 26.0f - 4.0f)); CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 26.0f - 4.0f));
CFont::SetFontStyle(FONT_BANK); CFont::SetFontStyle(FONT_BANK);
CFont::SetBackgroundOn(); CFont::SetBackgroundOn();
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.8f)); CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f));
CFont::SetColor(CRGBA(175, 175, 175, 255));
CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f + (150.0f - PagerXOffset) * 0.6f), CHud::m_HelpMessageToPrint); CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f + (150.0f - PagerXOffset) * 0.6f), CHud::m_HelpMessageToPrint);
CFont::SetAlphaFade(255.0f); CFont::SetAlphaFade(255.0f);
} }
} }
else
m_HelpMessageState = 0; for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroTextLines); i++) {
intro_text_line &line = CTheScripts::IntroTextLines[i];
if (line.m_Text[0] != '\0' && !line.m_bTextBeforeFade) {
CFont::SetScale(SCREEN_SCALE_X(line.m_fScaleX), SCREEN_SCALE_Y(line.m_fScaleY) / 2);
CFont::SetColor(line.m_sColor);
if (line.m_bJustify)
CFont::SetJustifyOn();
else
CFont::SetJustifyOff();
if (line.m_bRightJustify)
CFont::SetRightJustifyOn();
else
CFont::SetRightJustifyOff();
if (line.m_bCentered)
CFont::SetCentreOn();
else
CFont::SetCentreOff();
CFont::SetWrapx(SCREEN_SCALE_X(line.m_fWrapX));
CFont::SetCentreSize(SCREEN_SCALE_X(line.m_fCenterSize));
if (line.m_bBackground)
CFont::SetBackgroundOn();
else
CFont::SetBackgroundOff();
CFont::SetBackgroundColor(line.m_sBackgroundColor);
if (line.m_bBackgroundOnly)
CFont::SetBackGroundOnlyTextOn();
else
CFont::SetBackGroundOnlyTextOff();
if (line.m_bTextProportional)
CFont::SetPropOn();
else
CFont::SetPropOff();
CFont::SetFontStyle(line.m_nFont);
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - line.m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - line.m_fAtY), line.m_Text);
}
}
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
intro_script_rectangle &rectangle = CTheScripts::IntroRectangles[i];
if (rectangle.m_bIsUsed && !rectangle.m_bBeforeFade) {
// Yeah, top and bottom changed place. R* vision
if (rectangle.m_nTextureId >= 0) {
CTheScripts::ScriptSprites[rectangle.m_nTextureId].Draw(CRect(rectangle.m_sRect.left, rectangle.m_sRect.bottom,
rectangle.m_sRect.right, rectangle.m_sRect.top), rectangle.m_sColor);
} else {
CSprite2d::DrawRect(CRect(rectangle.m_sRect.left, rectangle.m_sRect.bottom,
rectangle.m_sRect.right, rectangle.m_sRect.top), rectangle.m_sColor);
}
}
}
/* /*
DrawBigMessage2 DrawBigMessage2
@ -1142,10 +1186,9 @@ void CHud::DrawAfterFade()
if (OddJob2OffTimer > 0) if (OddJob2OffTimer > 0)
OddJob2OffTimer -= CTimer::GetTimeStepInMilliseconds(); OddJob2OffTimer -= CTimer::GetTimeStepInMilliseconds();
static float fStep; float fStep;
if (m_BigMessage[5][0] && OddJob2OffTimer <= 0.0f) { if (m_BigMessage[5][0] && OddJob2OffTimer <= 0.0f) {
if (OddJob2On <= 3) { switch (OddJob2On) {
switch (OddJob2On) {
case 0: case 0:
OddJob2On = 1; OddJob2On = 1;
OddJob2XOffset = 380.0f; OddJob2XOffset = 380.0f;
@ -1156,9 +1199,7 @@ void CHud::DrawAfterFade()
OddJob2On = 2; OddJob2On = 2;
} }
else { else {
fStep = 40.0f; fStep = min(40.0f, OddJob2XOffset / 6.0f);
if ((OddJob2XOffset / 6.0f) <= 40.0f)
fStep = OddJob2XOffset / 6.0f;
OddJob2XOffset = OddJob2XOffset - fStep; OddJob2XOffset = OddJob2XOffset - fStep;
} }
break; break;
@ -1169,9 +1210,7 @@ void CHud::DrawAfterFade()
} }
break; break;
case 3: case 3:
fStep = 30.0f; fStep = max(30.0f, OddJob2XOffset / 5.0f);
if ((OddJob2XOffset / 5.0f) >= 30.0f)
fStep = OddJob2XOffset / 5.0f;
OddJob2XOffset = OddJob2XOffset - fStep; OddJob2XOffset = OddJob2XOffset - fStep;
@ -1182,7 +1221,6 @@ void CHud::DrawAfterFade()
break; break;
default: default:
break; break;
}
} }
if (!m_BigMessage[1][0]) { if (!m_BigMessage[1][0]) {
@ -1216,10 +1254,10 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f)); CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f));
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetRightJustifyWrap(-500.0f); CFont::SetRightJustifyWrap(SCREEN_SCALE_X(-500.0f));
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
if (BigMessageX[1] >= (SCREEN_WIDTH - 20)) { if (BigMessageX[1] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
BigMessageInUse[1] += CTimer::GetTimeStep(); BigMessageInUse[1] += CTimer::GetTimeStep();
if (BigMessageInUse[1] >= 120.0f) { if (BigMessageInUse[1] >= 120.0f) {
@ -1230,12 +1268,11 @@ void CHud::DrawAfterFade()
m_BigMessage[1][0] = 0; m_BigMessage[1][0] = 0;
BigMessageAlpha[1] = 0.0f; BigMessageAlpha[1] = 0.0f;
} }
} } else {
else {
BigMessageX[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f); BigMessageX[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
BigMessageAlpha[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f); BigMessageAlpha[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
if (BigMessageAlpha[1] >= 255.0f) if (BigMessageAlpha[1] > 255.0f)
BigMessageAlpha[1] = 255.0f; BigMessageAlpha[1] = 255.0f;
} }
@ -1273,7 +1310,7 @@ void CHud::GetRidOfAllHudMessages()
m_HelpMessageFadeTimer = 0; m_HelpMessageFadeTimer = 0;
m_HelpMessageState = 0; m_HelpMessageState = 0;
m_HelpMessageQuick = 0; m_HelpMessageQuick = 0;
m_HelpMessageDisplayTime = 1.0f; m_fHelpMessageTime = 1.0f;
m_VehicleName = nil; m_VehicleName = nil;
m_pLastVehicleName = nil; m_pLastVehicleName = nil;
m_pVehicleNameToPrint = nil; m_pVehicleNameToPrint = nil;
@ -1303,7 +1340,7 @@ void CHud::Initialise()
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();
CTxdStore::SetCurrentTxd(HudTXD); CTxdStore::SetCurrentTxd(HudTXD);
for (int i = 0; i < ARRAY_SIZE(WeaponFilenames); i++) { for (int i = 0; i < NUM_HUD_SPRITES; i++) {
Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask); Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask);
} }
@ -1314,14 +1351,14 @@ void CHud::Initialise()
if (gpRocketSightTex == nil) if (gpRocketSightTex == nil)
gpRocketSightTex = RwTextureRead("siterocket", nil); gpRocketSightTex = RwTextureRead("siterocket", nil);
CounterOnLastFrame = 0; CounterOnLastFrame = false;
m_ItemToFlash = ITEM_NONE; m_ItemToFlash = ITEM_NONE;
OddJob2Timer = 0; OddJob2Timer = 0;
OddJob2OffTimer = 0.0f; OddJob2OffTimer = 0.0f;
OddJob2On = 0; OddJob2On = 0;
OddJob2XOffset = 0.0f; OddJob2XOffset = 0.0f;
CounterFlashTimer = 0; CounterFlashTimer = 0;
TimerOnLastFrame = 0; TimerOnLastFrame = false;
TimerFlashTimer = 0; TimerFlashTimer = 0;
SpriteBrightness = 0; SpriteBrightness = 0;
PagerOn = 0; PagerOn = 0;
@ -1338,14 +1375,14 @@ void CHud::ReInitialise() {
GetRidOfAllHudMessages(); GetRidOfAllHudMessages();
CounterOnLastFrame = 0; CounterOnLastFrame = false;
m_ItemToFlash = ITEM_NONE; m_ItemToFlash = ITEM_NONE;
OddJob2Timer = 0; OddJob2Timer = 0;
OddJob2OffTimer = 0.0f; OddJob2OffTimer = 0.0f;
OddJob2On = 0; OddJob2On = 0;
OddJob2XOffset = 0.0f; OddJob2XOffset = 0.0f;
CounterFlashTimer = 0; CounterFlashTimer = 0;
TimerOnLastFrame = 0; TimerOnLastFrame = false;
TimerFlashTimer = 0; TimerFlashTimer = 0;
SpriteBrightness = 0; SpriteBrightness = 0;
PagerOn = 0; PagerOn = 0;
@ -1435,7 +1472,7 @@ void CHud::SetZoneName(wchar *name)
void CHud::Shutdown() void CHud::Shutdown()
{ {
for (int i = 0; i < ARRAY_SIZE(WeaponFilenames); ++i) { for (int i = 0; i < NUM_HUD_SPRITES; ++i) {
Sprites[i].Delete(); Sprites[i].Delete();
} }

View File

@ -27,59 +27,60 @@ enum eSprites
HUD_RADARDISC = 15, HUD_RADARDISC = 15,
HUD_PAGER = 16, HUD_PAGER = 16,
HUD_SITESNIPER = 20, HUD_SITESNIPER = 20,
HUD_SITEM16 = 21 HUD_SITEM16,
HUD_SITEROCKET,
NUM_HUD_SPRITES,
}; };
class CHud class CHud
{ {
public: public:
static CSprite2d *Sprites; static CSprite2d Sprites[NUM_HUD_SPRITES];
static int32 &SpriteBrightness; static wchar m_HelpMessage[256];
static wchar *m_HelpMessage; static wchar m_LastHelpMessage[256];
static wchar *m_LastHelpMessage; static uint32 m_HelpMessageState;
static int32 &m_HelpMessageState; static uint32 m_HelpMessageTimer;
static int32 &m_HelpMessageTimer; static int32 m_HelpMessageFadeTimer;
static int32 &m_HelpMessageFadeTimer; static wchar m_HelpMessageToPrint[256];
static wchar *m_HelpMessageToPrint;
static float &m_HelpMessageDisplayTime; static float &m_HelpMessageDisplayTime;
static float &m_fTextBoxNumLines; static float m_fHelpMessageTime;
static float &m_fHelpMessageTime; static bool m_HelpMessageQuick;
static bool &m_HelpMessageQuick; static uint32 m_ZoneState;
static int32 m_ZoneState;
static int32 m_ZoneFadeTimer; static int32 m_ZoneFadeTimer;
static int32 m_ZoneNameTimer; static uint32 m_ZoneNameTimer;
static wchar *&m_pZoneName; static wchar *m_pZoneName;
static wchar *m_pLastZoneName; static wchar *m_pLastZoneName;
static wchar *m_ZoneToPrint; static wchar *m_ZoneToPrint;
static wchar *&m_VehicleName; static wchar *m_VehicleName;
static wchar *m_pLastVehicleName; static wchar *m_pLastVehicleName;
static wchar *m_pVehicleNameToPrint; static wchar *m_pVehicleNameToPrint;
static int32 m_VehicleState; static uint32 m_VehicleState;
static int32 m_VehicleFadeTimer; static int32 m_VehicleFadeTimer;
static int32 m_VehicleNameTimer; static uint32 m_VehicleNameTimer;
static wchar *m_Message; static wchar m_Message[256];
static wchar *m_PagerMessage; static wchar m_PagerMessage[256];
static bool &m_Wants_To_Draw_Hud; static bool m_Wants_To_Draw_Hud;
static bool &m_Wants_To_Draw_3dMarkers; static bool m_Wants_To_Draw_3dMarkers;
static wchar(&m_BigMessage)[6][128]; static wchar m_BigMessage[6][128];
static int16 &m_ItemToFlash; static int16 m_ItemToFlash;
// These aren't really in CHud // These aren't really in CHud
static float BigMessageInUse[6]; static float BigMessageInUse[6];
static float BigMessageAlpha[6]; static float BigMessageAlpha[6];
static float BigMessageX[6]; static float BigMessageX[6];
static float &OddJob2OffTimer; static float OddJob2OffTimer;
static int8 &CounterOnLastFrame; static bool CounterOnLastFrame;
static float &OddJob2XOffset; static float OddJob2XOffset;
static int16 &CounterFlashTimer; static uint16 CounterFlashTimer;
static int16 &OddJob2Timer; static uint16 OddJob2Timer;
static int8 &TimerOnLastFrame; static bool TimerOnLastFrame;
static int16 &OddJob2On; static int16 OddJob2On;
static int16 &TimerFlashTimer; static uint16 TimerFlashTimer;
static int16 &PagerSoundPlayed; static int16 PagerSoundPlayed;
static float &PagerXOffset; static int32 SpriteBrightness;
static int16 &PagerTimer; static float PagerXOffset;
static int16 &PagerOn; static int16 PagerTimer;
static int16 PagerOn;
public: public:
static void Draw(); static void Draw();