mirror of
https://github.com/GTAmodding/re3.git
synced 2021-02-19 17:49:54 +01:00
Merge pull request #88 from gennariarmando/master
Implemented frontend inputs.
This commit is contained in:
commit
743668c5c4
@ -50,3 +50,8 @@ void CControllerConfigManager::LoadSettings(int32 file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WRAPPER void CControllerConfigManager::SaveSettings(int32 file)
|
||||
{
|
||||
EAXJMP(0x58B800);
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
|
||||
int32 GetJoyButtonJustDown();
|
||||
void LoadSettings(int32 file);
|
||||
void SaveSettings(int32 file);
|
||||
void MakeControllerActionsBlank();
|
||||
void InitDefaultControlConfiguration();
|
||||
void InitDefaultControlConfigMouse(CMouseControllerState const &mousestate);
|
||||
|
1321
src/Frontend.cpp
1321
src/Frontend.cpp
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,11 @@
|
||||
#define MENUSELECT_BOX_MAX 20.5f
|
||||
#define MENUSELECT_BOX_MIN 17.0f
|
||||
|
||||
#ifndef MID_RADIOICONS
|
||||
#define MENURADIO_ICON_X 31.5f
|
||||
#else
|
||||
#define MENURADIO_ICON_X -262.0f
|
||||
#endif
|
||||
#define MENURADIO_ICON_Y 29.5f
|
||||
#define MENURADIO_ICON_W 60.0f
|
||||
#define MENURADIO_ICON_H 60.0f
|
||||
@ -39,6 +43,8 @@
|
||||
|
||||
#define MENUSLIDER_X 306.0f
|
||||
|
||||
#define buf(a) (char*)(a)
|
||||
|
||||
enum eLanguages
|
||||
{
|
||||
LANGUAGE_AMERICAN,
|
||||
@ -314,6 +320,7 @@ enum eMenuColumns
|
||||
|
||||
enum eMenuRow
|
||||
{
|
||||
MENUROW_NONE = -1,
|
||||
MENUROW_0,
|
||||
MENUROW_1,
|
||||
MENUROW_2,
|
||||
@ -347,7 +354,8 @@ struct tSkinInfo
|
||||
struct CMenuScreen
|
||||
{
|
||||
char m_ScreenName[8];
|
||||
int32 m_PreviousPage[3]; // eMenuScreen
|
||||
int32 unk;
|
||||
int32 m_PreviousPage[2]; // eMenuScreen
|
||||
int32 m_ParentEntry[2]; // eMenuRow
|
||||
|
||||
struct CMenuEntry
|
||||
@ -417,7 +425,7 @@ public:
|
||||
int m_nHoverOption;
|
||||
int m_nCurrScreen;
|
||||
int m_nCurrOption;
|
||||
int m_nCurrentInput;
|
||||
int m_nPrevOption;
|
||||
int m_nPrevScreen;
|
||||
int field_558;
|
||||
int m_nCurrSaveSlot;
|
||||
@ -443,6 +451,8 @@ public:
|
||||
static int8 &m_bFrontEnd_ReloadObrTxtGxt;
|
||||
static int32 &m_PrefsMusicVolume;
|
||||
static int32 &m_PrefsSfxVolume;
|
||||
static uint8 *m_PrefsSkinFile;
|
||||
|
||||
static bool &m_bStartUpFrontEndRequested;
|
||||
static bool &m_bShutDownFrontEndRequested;
|
||||
static bool &m_PrefsAllowNastyGame;
|
||||
@ -452,6 +462,7 @@ public:
|
||||
static void CentreMousePointer();
|
||||
void CheckCodesForControls(int, int);
|
||||
bool CheckHover(int x1, int x2, int y1, int y2);
|
||||
void CheckSliderMovement(int);
|
||||
int CostructStatLine(int);
|
||||
void DisplayHelperText();
|
||||
float DisplaySlider(float, float, float, float, float, float);
|
||||
@ -489,6 +500,12 @@ public:
|
||||
void SwitchMenuOnAndOff();
|
||||
void UnloadTextures();
|
||||
void WaitForUserCD();
|
||||
|
||||
// New content:
|
||||
uint8 GetNumberOfMenuOptions();
|
||||
void SwitchToNewScreen(int8 screen);
|
||||
void SetDefaultPreferences(int8 screen);
|
||||
|
||||
};
|
||||
|
||||
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
||||
|
@ -12,7 +12,7 @@ const CMenuScreen aScreens[] = {
|
||||
// MENUPAGE_NEW_GAME = 2
|
||||
{ "FET_SGA", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_0, MENUROW_1,
|
||||
MENUACTION_CHANGEMENU, "FES_SNG", SAVESLOT_NONE, MENUPAGE_NEW_GAME_RELOAD,
|
||||
MENUACTION_UPDATESAVE, "GMLOAD", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT,
|
||||
MENUACTION_CHANGEMENU, "GMLOAD", SAVESLOT_NONE, MENUPAGE_CHOOSE_LOAD_SLOT,
|
||||
MENUACTION_CHANGEMENU, "FES_DGA", SAVESLOT_NONE, MENUPAGE_CHOOSE_DELETE_SLOT,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
},
|
||||
@ -43,7 +43,7 @@ const CMenuScreen aScreens[] = {
|
||||
{ "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_2, MENUROW_2,
|
||||
MENUACTION_BRIGHTNESS, "FED_BRI", 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,
|
||||
MENUACTION_FRAMELIMIT, "FEM_FRM", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
|
||||
MENUACTION_TRAILS, "FED_TRA", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
|
||||
MENUACTION_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
|
||||
@ -55,45 +55,45 @@ const CMenuScreen aScreens[] = {
|
||||
|
||||
// MENUPAGE_LANGUAGE_SETTINGS = 7
|
||||
{ "FET_LAN", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_3, MENUROW_3,
|
||||
MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
|
||||
MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
|
||||
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
|
||||
MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
|
||||
MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
|
||||
MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
},
|
||||
|
||||
// MENUPAGE_CHOOSE_LOAD_SLOT = 8
|
||||
{ "FET_LG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUROW_1, MENUROW_1,
|
||||
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL3", SAVESLOT_3, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_4, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_5, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_6, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_7, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL8", SAVESLOT_8, 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_SL3", SAVESLOT_3, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_4, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_5, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_6, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_7, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL8", SAVESLOT_8, MENUPAGE_LOAD_SLOT_CONFIRM,
|
||||
},
|
||||
|
||||
// MENUPAGE_CHOOSE_DELETE_SLOT = 9
|
||||
{ "FET_DG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUROW_2, MENUROW_2,
|
||||
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL3", SAVESLOT_3, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL4", SAVESLOT_4, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL5", SAVESLOT_5, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL6", SAVESLOT_6, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL7", SAVESLOT_7, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL8", SAVESLOT_8, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL3", SAVESLOT_3, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_4, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_5, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_6, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_7, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
MENUACTION_CHECKSAVE, "FEM_SL8", SAVESLOT_8, MENUPAGE_DELETE_SLOT_CONFIRM,
|
||||
},
|
||||
|
||||
// MENUPAGE_NEW_GAME_RELOAD = 10
|
||||
{ "FET_NG", MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, MENUROW_0, MENUROW_0,
|
||||
MENUACTION_LABEL, "FESZ_QR", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
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_NONE,
|
||||
},
|
||||
|
||||
// MENUPAGE_LOAD_SLOT_CONFIRM = 11
|
||||
@ -181,14 +181,14 @@ const CMenuScreen aScreens[] = {
|
||||
// MENUPAGE_CHOOSE_SAVE_SLOT = 26
|
||||
{ "FET_SG", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUROW_0, MENUROW_0,
|
||||
MENUACTION_UPDATEMEMCARDSAVE, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_1, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_2, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL3", SAVESLOT_3, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL4", SAVESLOT_4, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL5", SAVESLOT_5, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL6", SAVESLOT_6, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL7", SAVESLOT_7, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_CHANGEMENU, "FEM_SL8", SAVESLOT_8, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL3", SAVESLOT_3, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL4", SAVESLOT_4, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL5", SAVESLOT_5, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL6", SAVESLOT_6, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL7", SAVESLOT_7, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
MENUACTION_UPDATESAVE, "FEM_SL8", SAVESLOT_8, MENUPAGE_SAVE_OVERWRITE_CONFIRM,
|
||||
},
|
||||
|
||||
// MENUPAGE_SAVE_OVERWRITE_CONFIRM = 27
|
||||
@ -236,7 +236,7 @@ const CMenuScreen aScreens[] = {
|
||||
// MENUPAGE_CONTROLLER_PC = 35
|
||||
{ "FET_CTL", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_0, MENUROW_0,
|
||||
MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
MENUACTION_REDEFCTRL, "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_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
@ -270,17 +270,17 @@ const CMenuScreen aScreens[] = {
|
||||
// MENUPAGE_OPTIONS = 41
|
||||
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_1, MENUROW_4,
|
||||
MENUACTION_CHANGEMENU, "FET_CTL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
MENUACTION_LOADRADIO, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
|
||||
MENUACTION_CHANGEMENU, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
|
||||
MENUACTION_CHANGEMENU, "FET_DIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
|
||||
MENUACTION_CHANGEMENU, "FET_LAN", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
|
||||
MENUACTION_PLAYERSETUP, "FET_PSU", SAVESLOT_NONE, MENUPAGE_SKIN_SELECT,
|
||||
MENUACTION_CHANGEMENU, "FET_PSU", SAVESLOT_NONE, MENUPAGE_SKIN_SELECT,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
},
|
||||
|
||||
// MENUPAGE_EXIT = 42
|
||||
{ "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, MENUROW_2, MENUROW_5,
|
||||
MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_DONTCANCLE, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
MENUACTION_CANCLEGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
},
|
||||
|
||||
@ -352,19 +352,19 @@ const CMenuScreen aScreens[] = {
|
||||
|
||||
// MENUPAGE_SKIN_SELECT = 54
|
||||
{ "FET_PSU", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, MENUROW_4, MENUROW_4,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN,
|
||||
//MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_MULTIPLAYER_MAIN,
|
||||
},
|
||||
|
||||
// MENUPAGE_KEYBOARD_CONTROLS = 55
|
||||
{ "FET_STI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUROW_1, MENUROW_1,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
//MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
},
|
||||
|
||||
// MENUPAGE_MOUSE_CONTROLS = 56
|
||||
{ "FET_MTI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, MENUROW_2, MENUROW_2,
|
||||
MENUACTION_MOUSESENS, "FEC_MSH", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
MENUACTION_INVVERT, "FEC_IVV", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
MENUACTION_MOUSESTEER, "FET_MST", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
|
||||
MENUACTION_MOUSESENS, "FEC_MSH", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
|
||||
MENUACTION_INVVERT, "FEC_IVV", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
|
||||
MENUACTION_MOUSESTEER, "FET_MST", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
|
||||
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
|
||||
},
|
||||
|
||||
|
@ -4,9 +4,17 @@
|
||||
#include "PCSave.h"
|
||||
|
||||
WRAPPER void C_PcSave::SetSaveDirectory(const char *path) { EAXJMP(0x591EA0); }
|
||||
WRAPPER int8 C_PcSave::PopulateSlotInfo() { EAXJMP(0x592090); }
|
||||
WRAPPER int8 C_PcSave::DeleteSlot(int) { EAXJMP(0x5922F0); }
|
||||
WRAPPER int8 C_PcSave::SaveSlot(int) { EAXJMP(0x591EC0); }
|
||||
|
||||
WRAPPER int8 CheckSlotDataValid(int) { EAXJMP(0x591A40); }
|
||||
|
||||
WRAPPER wchar *GetNameOfSavedGame(int counter) { EAXJMP(0x591B60); }
|
||||
WRAPPER wchar *GetSavedGameDateAndTime(int counter) { EAXJMP(0x591B50); }
|
||||
|
||||
|
||||
C_PcSave PcSaveHelper = *(C_PcSave*)0x8E2C60;
|
||||
int *Slots = (int*)0x728040;
|
||||
int *SlotFileName = (int*)0x6F07C8;
|
||||
int *SlotSaveDate = (int*)0x72B858;
|
||||
|
@ -3,12 +3,19 @@
|
||||
class C_PcSave
|
||||
{
|
||||
public:
|
||||
int32 m_nHelper;
|
||||
|
||||
static void SetSaveDirectory(const char *path);
|
||||
int8 PopulateSlotInfo();
|
||||
int8 DeleteSlot(int);
|
||||
int8 SaveSlot(int);
|
||||
};
|
||||
|
||||
extern int8 CheckSlotDataValid(int);
|
||||
extern wchar *GetNameOfSavedGame(int counter);
|
||||
extern wchar *GetSavedGameDateAndTime(int counter);
|
||||
|
||||
extern C_PcSave PcSaveHelper;
|
||||
extern int *Slots;
|
||||
extern int *SlotFileName;
|
||||
extern int *SlotSaveDate;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "Weather.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
CPad *Pads = (CPad*)0x6F0360; // [2]
|
||||
CMousePointerStateHelper &MousePointerStateHelper = *(CMousePointerStateHelper*)0x95CC8C;
|
||||
|
||||
@ -531,7 +532,7 @@ void CPad::AddToPCCheatString(char c)
|
||||
// "NASTYLIMBSCHEAT"
|
||||
if ( !_CHEATCMP("TAEHCSBMILYTSAN") )
|
||||
NastyLimbsCheat();
|
||||
|
||||
|
||||
#ifdef KANGAROO_CHEAT
|
||||
// "KANGAROO"
|
||||
if (!_CHEATCMP("OORAGNAK"))
|
||||
|
5
src/PlayerSkin.cpp
Normal file
5
src/PlayerSkin.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "patcher.h"
|
||||
#include "PlayerSkin.h"
|
||||
|
||||
WRAPPER void CPlayerSkin::BeginFrontEndSkinEdit() { EAXJMP(0x59BC70); }
|
7
src/PlayerSkin.h
Normal file
7
src/PlayerSkin.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
class CPlayerSkin
|
||||
{
|
||||
public:
|
||||
static void BeginFrontEndSkinEdit();
|
||||
};
|
@ -63,10 +63,17 @@ struct CBlip
|
||||
static_assert(sizeof(CBlip) == 0x30, "CBlip: error");
|
||||
|
||||
// Values for screen space
|
||||
#ifndef SA_STYLE_RADAR
|
||||
#define RADAR_LEFT (40.0f)
|
||||
#define RADAR_BOTTOM (47.0f)
|
||||
#define RADAR_WIDTH (94.0f)
|
||||
#define RADAR_HEIGHT (76.0f)
|
||||
#else
|
||||
#define RADAR_LEFT (34.0f)
|
||||
#define RADAR_BOTTOM (25.0f)
|
||||
#define RADAR_WIDTH (86.0f)
|
||||
#define RADAR_HEIGHT (82.0f)
|
||||
#endif
|
||||
|
||||
class CRadar
|
||||
{
|
||||
|
@ -17,8 +17,13 @@ WRAPPER bool cDMAudio::CheckForAnAudioFileOnCD() { EAXJMP(0x57CA70); }
|
||||
WRAPPER void cDMAudio::ChangeMusicMode(uint8 mode) { EAXJMP(0x57CCF0); }
|
||||
|
||||
WRAPPER void cDMAudio::PlayFrontEndSound(uint32, uint32) { EAXJMP(0x57CC20); }
|
||||
WRAPPER void cDMAudio::PlayOneShot(int, uint16, float) { EAXJMP(0x57C840); }
|
||||
|
||||
WRAPPER void cDMAudio::PlayFrontEndTrack(uint32, uint32) { EAXJMP(0x57CC80); }
|
||||
WRAPPER void cDMAudio::StopFrontEndTrack() { EAXJMP(0x57CCB0); }
|
||||
WRAPPER void cDMAudio::PlayOneShot(int32, uint16, float) { EAXJMP(0x57C840); }
|
||||
WRAPPER void cDMAudio::SetMusicMasterVolume(int8) { EAXJMP(0x57C8C0); }
|
||||
WRAPPER void cDMAudio::SetEffectsMasterVolume(int8) { EAXJMP(0x57C890); }
|
||||
WRAPPER int8 cDMAudio::SetCurrent3DProvider(int8) { EAXJMP(0x57C9B0); }
|
||||
WRAPPER int32 cDMAudio::SetSpeakerConfig(int32) { EAXJMP(0x57C9D0); }
|
||||
|
||||
WRAPPER int32 cDMAudio::GetRadioInCar() { EAXJMP(0x57CE40); }
|
||||
WRAPPER uint8 cDMAudio::IsMP3RadioChannelAvailable() { EAXJMP(0x57C9F0); }
|
||||
|
@ -188,7 +188,13 @@ public:
|
||||
bool CheckForAnAudioFileOnCD(void);
|
||||
void ChangeMusicMode(uint8 mode);
|
||||
void PlayFrontEndSound(uint32, uint32);
|
||||
void PlayOneShot(int, uint16, float);
|
||||
void PlayFrontEndTrack(uint32, uint32);
|
||||
void StopFrontEndTrack();
|
||||
void PlayOneShot(int32, uint16, float);
|
||||
void SetMusicMasterVolume(int8);
|
||||
void SetEffectsMasterVolume(int8);
|
||||
int8 SetCurrent3DProvider(int8);
|
||||
int32 SetSpeakerConfig(int32);
|
||||
int32 GetRadioInCar(void);
|
||||
void SetEffectsFadeVol(uint8);
|
||||
void SetMusicFadeVol(uint8);
|
||||
|
@ -82,6 +82,7 @@ extern void **rwengine;
|
||||
#define SCREEN_STRETCH_FROM_BOTTOM(a) float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a))
|
||||
|
||||
#define SCREEN_MULTIPLIER (CDraw::GetScreenMult())
|
||||
#define SCREEN_COORD(a) (a * SCREEN_ASPECT_RATIO)
|
||||
#define SCREEN_SCALE(a) float((a) * (4.0f / 3.0f) / SCREEN_ASPECT_RATIO)
|
||||
#define SCREEN_SCALE_X(a) SCREEN_SCALE(SCREEN_STRETCH_X(a) * SCREEN_MULTIPLIER)
|
||||
#define SCREEN_SCALE_Y(a) (SCREEN_STRETCH_Y(a) * SCREEN_MULTIPLIER)
|
||||
|
@ -79,3 +79,7 @@ enum Config {
|
||||
#define NASTY_GAME
|
||||
#define PS2_MATFX
|
||||
#define KANGAROO_CHEAT
|
||||
#define HOR_PLUS
|
||||
#define MID_RADIOICONS
|
||||
#define NO_ROCKET_BORDERS
|
||||
#define SA_STYLE_RADAR
|
||||
|
@ -12,7 +12,8 @@ bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75;
|
||||
bool &CVehicle::bCheat3 = *(bool *)0x95CD66;
|
||||
bool &CVehicle::bCheat4 = *(bool *)0x95CD65;
|
||||
bool &CVehicle::bCheat5 = *(bool *)0x95CD64;
|
||||
|
||||
bool &CVehicle::m_bDisableMouseSteering = *(bool *)0x60252C;
|
||||
|
||||
void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); }
|
||||
void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); }
|
||||
void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); }
|
||||
|
@ -135,6 +135,7 @@ public:
|
||||
static bool &bCheat3;
|
||||
static bool &bCheat4;
|
||||
static bool &bCheat5;
|
||||
static bool &m_bDisableMouseSteering;
|
||||
};
|
||||
|
||||
static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error");
|
||||
|
@ -341,7 +341,11 @@ Render2dStuff(void)
|
||||
firstPersonWeapon = true;
|
||||
|
||||
// Draw black border for sniper and rocket launcher
|
||||
#ifndef NO_ROCKET_BORDERS
|
||||
if((weaponType == WEAPONTYPE_SNIPERRIFLE || weaponType == WEAPONTYPE_ROCKETLAUNCHER) && firstPersonWeapon){
|
||||
#else
|
||||
if (weaponType == WEAPONTYPE_SNIPERRIFLE && firstPersonWeapon) {
|
||||
#endif
|
||||
CRGBA black(0, 0, 0, 255);
|
||||
|
||||
// top and bottom strips
|
||||
@ -357,6 +361,7 @@ Render2dStuff(void)
|
||||
CSprite2d::DrawRect(CRect(SCREENW / 2 + SCREEN_SCALE_X(210), 0.0f, SCREENW, SCREENH), black);
|
||||
}
|
||||
|
||||
|
||||
MusicManager.DisplayRadioStationName();
|
||||
// TheConsole.Display();
|
||||
/*
|
||||
@ -782,7 +787,7 @@ AppEventHandler(RsEvent event, void *param)
|
||||
{
|
||||
|
||||
CameraSize(Scene.camera, (RwRect *)param,
|
||||
DEFAULT_VIEWWINDOW, DEFAULT_ASPECTRATIO);
|
||||
DEFAULT_VIEWWINDOW, SCREEN_ASPECT_RATIO);
|
||||
|
||||
return rsEVENTPROCESSED;
|
||||
}
|
||||
|
@ -19,3 +19,4 @@ void LoadingIslandScreen(const char *levelName);
|
||||
CSprite2d *LoadSplash(const char *name);
|
||||
char *GetLevelSplashScreen(int level);
|
||||
char *GetRandomSplashScreen(void);
|
||||
extern bool &b_FoundRecentSavedGameWantToLoad;
|
||||
|
@ -16,43 +16,70 @@ uint8 &CDraw::FadeRed = *(uint8*)0x95CD90;
|
||||
uint8 &CDraw::FadeGreen = *(uint8*)0x95CD71;
|
||||
uint8 &CDraw::FadeBlue = *(uint8*)0x95CD53;
|
||||
|
||||
void
|
||||
CDraw::CalculateAspectRatio()
|
||||
void CDraw::CalculateAspectRatio()
|
||||
{
|
||||
SetScreenMult(DEFAULT_SCALE);
|
||||
|
||||
if(FrontEndMenuManager.m_PrefsUseWideScreen)
|
||||
ms_fAspectRatio = 16.0f/9.0f;
|
||||
#ifndef HOR_PLUS
|
||||
if (FrontEndMenuManager.m_PrefsUseWideScreen)
|
||||
ms_fAspectRatio = 16.0f / 9.0f;
|
||||
else
|
||||
ms_fAspectRatio = 4.0f/3.0f;
|
||||
ms_fAspectRatio = 4.0f / 3.0f;
|
||||
#else
|
||||
switch (FrontEndMenuManager.m_PrefsUseWideScreen) {
|
||||
case AR_AUTO:
|
||||
ms_fAspectRatio = (float)SCREEN_WIDTH / (float)SCREEN_HEIGHT;
|
||||
return;
|
||||
case AR_3_2:
|
||||
ms_fAspectRatio = 3.0f / 2.0f;
|
||||
return;
|
||||
case AR_4_3:
|
||||
ms_fAspectRatio = 4.0f / 3.0f;
|
||||
return;
|
||||
case AR_5_3:
|
||||
ms_fAspectRatio = 5.0f / 3.0f;
|
||||
return;
|
||||
case AR_5_4:
|
||||
ms_fAspectRatio = 5.0f / 4.0f;
|
||||
return;
|
||||
case AR_15_9:
|
||||
ms_fAspectRatio = 15.0f / 9.0f;
|
||||
return;
|
||||
case AR_16_9:
|
||||
ms_fAspectRatio = 16.0f / 9.0f;
|
||||
return;
|
||||
case AR_16_10:
|
||||
ms_fAspectRatio = 16.0f / 10.0f;
|
||||
return;
|
||||
case AR_64_27:
|
||||
ms_fAspectRatio = 64.0f / 27.0f;
|
||||
return;
|
||||
};
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static float hFov2vFov(float hfov)
|
||||
float
|
||||
HorToVert(float hfov)
|
||||
{
|
||||
float w = SCREENW;
|
||||
float h = SCREENH;
|
||||
|
||||
// => tan(hFOV/2) = tan(vFOV/2)*aspectRatio
|
||||
// => tan(vFOV/2) = tan(hFOV/2)/aspectRatio
|
||||
float ar1 = 4.0/3.0;
|
||||
float ar2 = w/h;
|
||||
hfov = DEGTORAD(hfov);
|
||||
float vfov = atan(tan(hfov/2) / ar1) *2;
|
||||
hfov = atan(tan(vfov/2) * ar2) *2;
|
||||
return RADTODEG(hfov);
|
||||
float vfov = atan(tan(DEGTORAD(hfov) / 2) / (4.0 / 3.0)) * 2;
|
||||
return RADTODEG(hfov = atan(tan(vfov / 2) * CDraw::GetAspectRatio()) * 2);
|
||||
}
|
||||
|
||||
void
|
||||
CDraw::SetFOV(float fov)
|
||||
{
|
||||
// TODO: fix FOV here or somewhere else?
|
||||
// ms_fFOV = hFov2vFov(fov);
|
||||
#ifndef HOR_PLUS
|
||||
ms_fFOV = fov;
|
||||
#else
|
||||
ms_fFOV = HorToVert(fov);
|
||||
#endif
|
||||
}
|
||||
|
||||
STARTPATCHES
|
||||
InjectHook(0x4FE7B0, CDraw::SetFOV, PATCH_JUMP);
|
||||
|
||||
// Some patches to fix aiming offset on "CCamera::Find3rdPersonCamTargetVector".
|
||||
Nop(0x46B618, 2);
|
||||
Patch<float>(0x5F0A64, 1.3333334f);
|
||||
ENDPATCHES
|
||||
|
@ -3,6 +3,18 @@
|
||||
#define HUD_SCALE 0.8f
|
||||
#define DEFAULT_SCALE 1.0f
|
||||
|
||||
enum eAspectRatio {
|
||||
AR_AUTO,
|
||||
AR_3_2,
|
||||
AR_4_3,
|
||||
AR_5_3,
|
||||
AR_5_4,
|
||||
AR_15_9,
|
||||
AR_16_9,
|
||||
AR_16_10,
|
||||
AR_64_27,
|
||||
};
|
||||
|
||||
class CDraw
|
||||
{
|
||||
private:
|
||||
|
@ -125,6 +125,15 @@ WRAPPER void CHud::Draw(void) { EAXJMP(0x5052A0); }
|
||||
#else
|
||||
void CHud::Draw()
|
||||
{
|
||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
|
||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||
RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void*)rwTEXTUREADDRESSMIRROR);
|
||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (void*)FALSE);
|
||||
RwRenderStateSet(rwRENDERSTATESHADEMODE, (void*)rwSHADEMODEFLAT);
|
||||
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
|
||||
|
||||
if (CReplay::IsPlayingBack())
|
||||
return;
|
||||
|
||||
@ -168,6 +177,7 @@ void CHud::Draw()
|
||||
float fMultBright = SpriteBrightness * 0.03f * (0.25f * fStep + 0.75f);
|
||||
CRect rect;
|
||||
|
||||
#ifndef HOR_PLUS
|
||||
float fWidescreenOffset[2] = { 0.0f, 0.0f };
|
||||
|
||||
if (FrontEndMenuManager.m_PrefsUseWideScreen) {
|
||||
@ -178,7 +188,11 @@ void CHud::Draw()
|
||||
if (Mode_RunAround && TheCamera.Cams->Using3rdPersonMouseCam()) {
|
||||
float f3rdX = SCREENW * TheCamera.m_f3rdPersonCHairMultX + fWidescreenOffset[0];
|
||||
float f3rdY = SCREENH * TheCamera.m_f3rdPersonCHairMultY - fWidescreenOffset[1];
|
||||
|
||||
#else
|
||||
if (Mode_RunAround && TheCamera.Cams->Using3rdPersonMouseCam()) {
|
||||
float f3rdX = (((TheCamera.m_f3rdPersonCHairMultX - 0.5f) / ((CDraw::GetAspectRatio()) / (4.0f / 3.0f))) + 0.5f) * SCREENW;
|
||||
float f3rdY = SCREENH * TheCamera.m_f3rdPersonCHairMultY;
|
||||
#endif
|
||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed && WeaponType == WEAPONTYPE_M16) {
|
||||
rect.left = f3rdX - SCREEN_SCALE_X(32.0f * 0.6f);
|
||||
rect.top = f3rdY - SCREEN_SCALE_Y(32.0f * 0.6f);
|
||||
@ -1443,7 +1457,7 @@ STARTPATCHES
|
||||
InjectHook(0x5048F0, &CHud::Initialise, PATCH_JUMP);
|
||||
InjectHook(0x504CC0, &CHud::ReInitialise, PATCH_JUMP);
|
||||
InjectHook(0x50A250, &CHud::SetBigMessage, PATCH_JUMP);
|
||||
InjectHook(0x5051E0, &CHud::SetHelpMessage, PATCH_JUMP);
|
||||
//InjectHook(0x5051E0, &CHud::SetHelpMessage, PATCH_JUMP);
|
||||
InjectHook(0x50A210, &CHud::SetMessage, PATCH_JUMP);
|
||||
InjectHook(0x50A320, &CHud::SetPagerMessage, PATCH_JUMP);
|
||||
InjectHook(0x505290, &CHud::SetVehicleName, PATCH_JUMP);
|
||||
|
@ -1355,10 +1355,14 @@ psSelectDevice()
|
||||
{
|
||||
while ( !modeFound && GcurSelVM < RwEngineGetNumVideoModes() )
|
||||
{
|
||||
RECT Rect;
|
||||
GetWindowRect(GetDesktopWindow(), &Rect);
|
||||
printf(gString, "Cannot find %dx%dx32 video mode", Rect.right, Rect.bottom);
|
||||
|
||||
RwEngineGetVideoModeInfo(&vm, GcurSelVM);
|
||||
if ( defaultFullscreenRes && vm.width != 640
|
||||
|| vm.height != 480
|
||||
|| vm.depth != 16
|
||||
if ( defaultFullscreenRes && vm.width != Rect.right
|
||||
|| vm.height != Rect.bottom
|
||||
|| vm.depth != 32
|
||||
|| !(vm.flags & rwVIDEOMODEEXCLUSIVE) )
|
||||
++GcurSelVM;
|
||||
else
|
||||
@ -1367,7 +1371,7 @@ psSelectDevice()
|
||||
|
||||
if ( !modeFound )
|
||||
{
|
||||
MessageBox(nil, "Cannot find 640x480 video mode", "GTA3", MB_OK);
|
||||
MessageBox(nil, gString, "GTA3", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ void CenterVideo(void);
|
||||
void CloseClip(void);
|
||||
|
||||
RwChar **_psGetVideoModeList();
|
||||
RwInt32 _psGetNumVideModes();
|
||||
|
||||
void _psSelectScreenVM(RwInt32 videoMode);
|
||||
void HandleExit();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user