Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge branch 'master' of https://github.com/GTAmodding/re3
  • Loading branch information
Filip Gawin committed Apr 18, 2020
2 parents 63951d9 + eadb5a1 commit 2b1570de703c32ab43c979c286413a3a1c5e3dc0
@@ -1,4 +1,4 @@
Librw = os.getenv("LIBRW")
Librw = os.getenv("LIBRW") or "librw"

workspace "re3"
configurations { "Debug", "Release", "ReleaseFH", "DebugRW", "ReleaseRW" }
@@ -54,8 +54,8 @@ workspace "re3"
filter "configurations:Debug or Release"
files { "src/fakerw/*.*" }
includedirs { "src/fakerw" }
includedirs { "librw" }
libdirs { path.join("librw", "lib/win-x86-d3d9/%{cfg.buildcfg}") }
includedirs { Librw }
libdirs { path.join(Librw, "lib/win-x86-d3d9/%{cfg.buildcfg}") }
links { "rw", "d3d9" }
filter {}

@@ -106,31 +106,33 @@ project "re3"
defines { "DEBUG", "LIBRW", "RW_D3D9" }
staticruntime "off"
symbols "Full"
setpaths("$(GTA_III_RE_DIR)/", "re3.exe", "")
setpaths("$(GTA_III_RE_DIR)/", "$(TargetFileName)", "")

filter "configurations:Release"
defines { "NDEBUG", "LIBRW", "RW_D3D9" }
optimize "On"
staticruntime "off"
symbols "Full"
setpaths("$(GTA_III_RE_DIR)/", "re3.exe", "")
setpaths("$(GTA_III_RE_DIR)/", "$(TargetFileName)", "")

filter "configurations:ReleaseFH"
defines { "NDEBUG" }
symbols "Full"
optimize "off"
staticruntime "on"
setpaths("$(GTA_III_RE_DIR)/", "re3.exe", "")
setpaths("$(GTA_III_RE_DIR)/", "$(TargetFileName)", "")

filter "configurations:DebugRW"
defines { "DEBUG" }
staticruntime "on"
symbols "On"
setpaths("$(GTA_III_RE_DIR)/", "re3.exe", "")
setpaths("$(GTA_III_RE_DIR)/", "$(TargetFileName)", "")
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"

filter "configurations:ReleaseRW"
defines { "NDEBUG" }
optimize "On"
staticruntime "on"
setpaths("$(GTA_III_RE_DIR)/", "re3.exe", "")
setpaths("$(GTA_III_RE_DIR)/", "$(TargetFileName)", "")
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"

@@ -143,28 +143,17 @@ class tSound
int32 m_nSampleIndex;
uint8 m_bBankIndex;
bool m_bIs2D;
uint8 field_14; // unused
uint8 field_15; // unused
int32 m_nReleasingVolumeModificator;
int32 m_nFrequency;
uint8 m_bVolume;
uint8 field_25; // unused
uint8 field_26; // unused
uint8 field_27; // unused
float m_fDistance;
int32 m_nLoopCount;
int32 m_nLoopStart;
int32 m_nLoopEnd;
uint8 m_bEmittingVolume;
uint8 field_45; // unused
uint8 field_46; // unused
uint8 field_47; // unused
float m_fSpeedMultiplier;
float m_fSoundIntensity;
bool m_bReleasingSoundFlag;
uint8 field_57; // unused
uint8 field_58; // unused
uint8 field_59; // unused
CVector m_vecPos;
bool m_bReverbFlag;
uint8 m_bLoopsRemaining;
@@ -173,15 +162,8 @@ class tSound
int32 m_nReleasingVolumeDivider;
bool m_bIsProcessed;
bool m_bLoopEnded;
uint8 field_82; // unused
uint8 field_83; // unused
int32 m_nCalculatedVolume;
int8 m_nVolumeChange;
uint8 field_89; // unused
uint8 field_90; // unused
uint8 field_91; // unused

// no methods
};

static_assert(sizeof(tSound) == 92, "tSound: error");
@@ -197,12 +179,8 @@ class tAudioEntity
bool m_bIsUsed;
uint8 m_bStatus;
int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS];
//uint8 gap_18[2];
float m_afVolume[NUM_AUDIOENTITY_EVENTS];
uint8 m_AudioEvents;
uint8 field_25[3];

// no methods
};

static_assert(sizeof(tAudioEntity) == 40, "tAudioEntity: error");
@@ -216,8 +194,6 @@ class tPedComment
float m_fDistance;
uint8 m_bVolume;
int8 m_nProcess;

// no methods
};

static_assert(sizeof(tPedComment) == 28, "tPedComment: error");
@@ -244,18 +220,12 @@ class cMissionAudio
public:
CVector m_vecPos;
bool m_bPredefinedProperties;
//uint8 gap_13[3];
int m_nSampleIndex;
uint8 m_bLoadingStatus;
uint8 m_bPlayStatus;
uint8 field_22; // todo find a name
uint8 field_23; // unused
int32 m_nMissionAudioCounter;
bool m_bIsPlayed;
uint8 field_29; // unused
uint8 field_30; // unused
uint8 field_31; // unused
// no methods
};

static_assert(sizeof(cMissionAudio) == 32, "cMissionAudio: error");
@@ -305,17 +275,11 @@ class cAudioManager
uint8 m_bActiveSamples;
uint8 field_4; // unused
bool m_bDynamicAcousticModelingStatus;
uint8 field_6; // unused
uint8 field_7; // unused
float m_fSpeedOfSound;
bool m_bTimerJustReset;
uint8 field_13; // unused
uint8 field_14; // unused
uint8 field_15; // unused
int32 m_nTimer;
tSound m_sQueueSample;
bool m_bActiveSampleQueue;
uint8 gap_109[3]; // unused
tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
uint8 m_bSampleRequestQueuesStatus[NUM_SOUNDS_SAMPLES_BANKS];
@@ -341,7 +305,6 @@ class cAudioManager
uint8 m_bTimeSpent;
uint8 m_bUserPause;
uint8 m_bPreviousUserPause;
uint8 field_19195; // unused
uint32 m_FrameCounter;

cAudioManager();
@@ -6909,7 +6909,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
CVector cp3 = tmp_matrix * CVector(pColModel->boundingBox.min.x, pColModel->boundingBox.max.y, pColModel->boundingBox.min.z);
CVector cp4 = tmp_matrix * CVector(pColModel->boundingBox.min.x, pColModel->boundingBox.min.y, pColModel->boundingBox.max.z);
int16 collisions;
CWorld::FindObjectsIntersectingAngledCollisionBox(pColModel->boundingBox, tmp_matrix, pos,
CWorld::FindObjectsIntersectingAngledCollisionBox(pColModel->boundingBox, tmp_matrix, newPosition,
min(cp1.x, min(cp2.x, min(cp3.x, cp4.x))),
min(cp1.y, min(cp2.y, min(cp3.y, cp4.y))),
max(cp1.x, max(cp2.x, max(cp3.x, cp4.x))),
@@ -112,20 +112,17 @@ class CControllerConfigManager
};

bool m_bFirstCapture;
char _pad0[3];
#ifdef __DINPUT_INCLUDED__
DIJOYSTATE2 m_OldState;
DIJOYSTATE2 m_NewState;
#else
uint8 ___padd[0x110 * 2];
uint32 ___padd[0x110 / 4 * 2];
#endif
wchar m_aActionNames[MAX_CONTROLLERACTIONS][ACTIONNAME_LENGTH];
bool m_aButtonStates[MAX_BUTTONS];
char _pad1[3];
tControllerConfigBind m_aSettings[MAX_CONTROLLERACTIONS][MAX_CONTROLLERTYPES];
bool m_aSimCheckers[MAX_SIMS][MAX_CONTROLLERTYPES];
bool m_bMouseAssociated;
char _pad2[3];

CControllerConfigManager();

@@ -118,7 +118,7 @@ const CRGBA TEXT_COLOR = CRGBA(150, 110, 30, 255);
const CRGBA TEXT_COLOR = CRGBA(235, 170, 50, 255); // PC briefs text color
#endif

const float menuXYpadding = MENUACTION_POS_Y; // *(float*)0x5F355C; // not original name
const float menuXYpadding = MENUACTION_POS_Y; // TODO this is non-existant, remove it
float MENU_TEXT_SIZE_X = SMALLTEXT_X_SCALE;
float MENU_TEXT_SIZE_Y = SMALLTEXT_Y_SCALE;

@@ -754,9 +754,9 @@ CMenuManager::Draw()

#ifdef FIX_BUGS
// Label is wrapped from right by StretchX(40)px, but wrapped from left by 40px. And this is only place R* didn't use StretchX in here.
CFont::PrintString(MENU_X_LEFT_ALIGNED(MENU_X_MARGIN), MENU_Y(menuXYpadding), str);
CFont::PrintString(MENU_X_LEFT_ALIGNED(MENU_X_MARGIN), MENU_Y(MENUACTION_POS_Y), str);
#else
CFont::PrintString(MENU_X_MARGIN, menuXYpadding, str);
CFont::PrintString(MENU_X_MARGIN, MENUACTION_POS_Y, str);
#endif
}

@@ -3181,7 +3181,7 @@ CMenuManager::PrintBriefs()
CFont::SetRightJustifyOff();
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why

float nextY = 40.0f;
float nextY = BRIEFS_TOP_MARGIN;
CRGBA newColor;
for (int i = 4; i >= 0; i--) {
tPreviousBrief &brief = CMessages::PreviousBriefs[i];
@@ -3214,8 +3214,8 @@ CMenuManager::PrintBriefs()
newColor.a = FadeIn(255);
CFont::SetColor(newColor);
#endif
CFont::PrintString(MENU_X_LEFT_ALIGNED(50.0f), nextY, gUString);
nextY += MENU_Y(menuXYpadding);
CFont::PrintString(MENU_X_LEFT_ALIGNED(BRIEFS_LINE_X), nextY, gUString);
nextY += MENU_Y(BRIEFS_LINE_HEIGHT);
}
}

@@ -3252,6 +3252,9 @@ void
CMenuManager::PrintStats()
{
int rowNum = ConstructStatLine(99999);
#ifdef GTA3_1_1_PATCH
CFont::SetFontStyle(FONT_BANK);
#endif
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why
float nextYChange, y, alphaMult;

@@ -68,6 +68,10 @@
#define STATS_RATING_X 24.0f
#define STATS_RATING_Y 20.0f

#define BRIEFS_TOP_MARGIN 40.0f
#define BRIEFS_LINE_X 50.0f
#define BRIEFS_LINE_HEIGHT 60.0f

#define CONTSETUP_STANDARD_ROW_HEIGHT 10.7f
#define CONTSETUP_CLASSIC_ROW_HEIGHT 9.0f
#define CONTSETUP_BOUND_HIGHLIGHT_HEIGHT 10
@@ -155,7 +155,6 @@ class CPad
uint8 DisablePlayerControls;
int8 bApplyBrakes;
char CheatString[12];
char _pad0[3];
int32 LastTimeTouched;
int32 AverageWeapon;
int32 AverageEntries;
@@ -31,31 +31,20 @@ class CPlayerInfo
uint32 m_nLastBumpPlayerCarTimer;
uint32 m_nUnusedTaxiTimer;
bool m_bUnusedTaxiThing;
int8 field_197;
int8 field_198;
int8 field_199;
uint32 m_nNextSexFrequencyUpdateTime;
uint32 m_nNextSexMoneyUpdateTime;
int32 m_nSexFrequency;
CCivilianPed *m_pHooker;
int8 m_WBState; // eWastedBustedState
int8 field_217;
int8 field_218;
int8 field_219;
uint32 m_nWBTime;
bool m_bInRemoteMode;
int8 field_225;
int8 field_226;
int8 field_227;
uint32 m_nTimeLostRemoteCar;
uint32 m_nTimeLastHealthLoss;
uint32 m_nTimeLastArmourLoss;
uint32 m_nTimeTankShotGun;
int32 m_nUpsideDownCounter;
int32 field_248;
int16 m_nTrafficMultiplier;
int8 field_254;
int8 field_255;
float m_fRoadDensity;
uint32 m_nPreviousTimeRewardedForExplosion;
int32 m_nExplosionsSinceLastReward;
@@ -90,7 +79,6 @@ class CPlayerInfo
void FindClosestCarSectorList(CPtrList&, CPed*, float, float, float, float, float*, CVehicle**);

~CPlayerInfo() { };
void dtor(void) { this->CPlayerInfo::~CPlayerInfo(); }
};

static_assert(sizeof(CPlayerInfo) == 0x13C, "CPlayerInfo: error");

0 comments on commit 2b1570d

Please sign in to comment.