Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami

This commit is contained in:
eray orçunus 2020-05-18 00:27:36 +03:00
commit f71cfdf8ef
3 changed files with 232 additions and 119 deletions

View File

@ -21,49 +21,87 @@ sRadarTrace CRadar::ms_RadarTrace[NUMRADARBLIPS];
CVector2D vec2DRadarOrigin; CVector2D vec2DRadarOrigin;
int32 gRadarTxdIds[64]; int32 gRadarTxdIds[64];
CSprite2d CRadar::AsukaSprite;
CSprite2d CRadar::BombSprite;
CSprite2d CRadar::CatSprite;
CSprite2d CRadar::CentreSprite; CSprite2d CRadar::CentreSprite;
CSprite2d CRadar::CopcarSprite; CSprite2d CRadar::MapHereSprite;
CSprite2d CRadar::DonSprite;
CSprite2d CRadar::EightSprite;
CSprite2d CRadar::ElSprite;
CSprite2d CRadar::IceSprite;
CSprite2d CRadar::JoeySprite;
CSprite2d CRadar::KenjiSprite;
CSprite2d CRadar::LizSprite;
CSprite2d CRadar::LuigiSprite;
CSprite2d CRadar::NorthSprite; CSprite2d CRadar::NorthSprite;
CSprite2d CRadar::RaySprite; CSprite2d CRadar::AverySprite;
CSprite2d CRadar::SalSprite; CSprite2d CRadar::BikerSprite;
CSprite2d CRadar::SaveSprite; CSprite2d CRadar::CortezSprite;
CSprite2d CRadar::DiazSprite;
CSprite2d CRadar::KentSprite;
CSprite2d CRadar::LawyerSprite;
CSprite2d CRadar::PhilSprite;
CSprite2d CRadar::BikersSprite;
CSprite2d CRadar::BoatyardSprite;
CSprite2d CRadar::MalibuClubSprite;
CSprite2d CRadar::CubansSprite;
CSprite2d CRadar::FilmSprite;
CSprite2d CRadar::GunSprite;
CSprite2d CRadar::HaitiansSprite;
CSprite2d CRadar::HardwareSprite;
CSprite2d CRadar::SaveHouseSprite;
CSprite2d CRadar::StripSprite;
CSprite2d CRadar::IceSprite;
CSprite2d CRadar::KCabsSprite;
CSprite2d CRadar::LovefistSprite;
CSprite2d CRadar::PrintworksSprite;
CSprite2d CRadar::PropertySprite;
CSprite2d CRadar::SunYardSprite;
CSprite2d CRadar::SpraySprite; CSprite2d CRadar::SpraySprite;
CSprite2d CRadar::TonySprite; CSprite2d CRadar::TShirtSprite;
CSprite2d CRadar::WeaponSprite; CSprite2d CRadar::TommySprite;
CSprite2d CRadar::PhoneSprite;
CSprite2d CRadar::RadioWildstyleSprite;
CSprite2d CRadar::RadioFlashSprite;
CSprite2d CRadar::RadioKChatSprite;
CSprite2d CRadar::RadioFeverSprite;
CSprite2d CRadar::RadioVRockSprite;
CSprite2d CRadar::RadioVCPRSprite;
CSprite2d CRadar::RadioEspantosoSprite;
CSprite2d CRadar::RadioEmotionSprite;
CSprite2d CRadar::RadioWaveSprite;
CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = { CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
nil, nil,
&AsukaSprite,
&BombSprite,
&CatSprite,
&CentreSprite, &CentreSprite,
&CopcarSprite, &MapHereSprite,
&DonSprite,
&EightSprite,
&ElSprite,
&IceSprite,
&JoeySprite,
&KenjiSprite,
&LizSprite,
&LuigiSprite,
&NorthSprite, &NorthSprite,
&RaySprite, &AverySprite,
&SalSprite, &BikerSprite,
&SaveSprite, &CortezSprite,
&DiazSprite,
&KentSprite,
&LawyerSprite,
&PhilSprite,
&BikersSprite,
&BoatyardSprite,
&MalibuClubSprite,
&CubansSprite,
&FilmSprite,
&GunSprite,
&HaitiansSprite,
&HardwareSprite,
&SaveHouseSprite,
&StripSprite,
&IceSprite,
&KCabsSprite,
&LovefistSprite,
&PrintworksSprite,
&PropertySprite,
&SunYardSprite,
&SpraySprite, &SpraySprite,
&TonySprite, &TShirtSprite,
&WeaponSprite &TommySprite,
&PhoneSprite,
&RadioWildstyleSprite,
&RadioFlashSprite,
&RadioKChatSprite,
&RadioFeverSprite,
&RadioVRockSprite,
&RadioVCPRSprite,
&RadioEspantosoSprite,
&RadioEmotionSprite,
&RadioWaveSprite
}; };
// Why this doesn't coincide with world coordinates i don't know // Why this doesn't coincide with world coordinates i don't know
@ -374,9 +412,8 @@ int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect)
bool CRadar::DisplayThisBlip(int32 counter) bool CRadar::DisplayThisBlip(int32 counter)
{ {
switch (ms_RadarTrace[counter].m_eRadarSprite) { switch (ms_RadarTrace[counter].m_eRadarSprite) {
case RADAR_SPRITE_BOMB:
case RADAR_SPRITE_SPRAY: case RADAR_SPRITE_SPRAY:
case RADAR_SPRITE_WEAPON: case RADAR_SPRITE_GUN:
return true; return true;
default: default:
return false; return false;
@ -484,8 +521,8 @@ void CRadar::DrawBlips()
case BLIP_CAR: case BLIP_CAR:
case BLIP_CHAR: case BLIP_CHAR:
case BLIP_OBJECT: case BLIP_OBJECT:
if (ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE if (ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE
|| ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_WEAPON) { || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_GUN) {
switch (ms_RadarTrace[blipId].m_eBlipType) { switch (ms_RadarTrace[blipId].m_eBlipType) {
case BLIP_CAR: case BLIP_CAR:
@ -543,8 +580,8 @@ void CRadar::DrawBlips()
break; break;
case BLIP_COORD: case BLIP_COORD:
case BLIP_CONTACT_POINT: case BLIP_CONTACT_POINT:
if ((ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE if ((ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE
|| ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_WEAPON) || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_GUN)
&& (ms_RadarTrace[blipId].m_eBlipType != BLIP_CONTACT_POINT || !CTheScripts::IsPlayerOnAMission())) { && (ms_RadarTrace[blipId].m_eBlipType != BLIP_CONTACT_POINT || !CTheScripts::IsPlayerOnAMission())) {
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim); uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
@ -594,8 +631,8 @@ void CRadar::DrawBlips()
case BLIP_CAR: case BLIP_CAR:
case BLIP_CHAR: case BLIP_CHAR:
case BLIP_OBJECT: case BLIP_OBJECT:
if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE
&& ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_WEAPON) { && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_GUN) {
switch (ms_RadarTrace[blipId].m_eBlipType) { switch (ms_RadarTrace[blipId].m_eBlipType) {
case BLIP_CAR: case BLIP_CAR:
@ -663,8 +700,8 @@ void CRadar::DrawBlips()
switch (ms_RadarTrace[blipId].m_eBlipType) { switch (ms_RadarTrace[blipId].m_eBlipType) {
case BLIP_COORD: case BLIP_COORD:
case BLIP_CONTACT_POINT: case BLIP_CONTACT_POINT:
if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE
&& ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_WEAPON && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_GUN
&& (ms_RadarTrace[blipId].m_eBlipType != BLIP_CONTACT_POINT || !CTheScripts::IsPlayerOnAMission())) { && (ms_RadarTrace[blipId].m_eBlipType != BLIP_CONTACT_POINT || !CTheScripts::IsPlayerOnAMission())) {
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim); uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
@ -1038,26 +1075,45 @@ CRadar::LoadTextures()
{ {
CTxdStore::PushCurrentTxd(); CTxdStore::PushCurrentTxd();
CTxdStore::SetCurrentTxd(CTxdStore::FindTxdSlot("hud")); CTxdStore::SetCurrentTxd(CTxdStore::FindTxdSlot("hud"));
AsukaSprite.SetTexture("radar_asuka");
BombSprite.SetTexture("radar_bomb");
CatSprite.SetTexture("radar_cat");
CentreSprite.SetTexture("radar_centre"); CentreSprite.SetTexture("radar_centre");
CopcarSprite.SetTexture("radar_copcar"); MapHereSprite.SetTexture("arrow");
DonSprite.SetTexture("radar_don");
EightSprite.SetTexture("radar_eight");
ElSprite.SetTexture("radar_el");
IceSprite.SetTexture("radar_ice");
JoeySprite.SetTexture("radar_joey");
KenjiSprite.SetTexture("radar_kenji");
LizSprite.SetTexture("radar_liz");
LuigiSprite.SetTexture("radar_luigi");
NorthSprite.SetTexture("radar_north"); NorthSprite.SetTexture("radar_north");
RaySprite.SetTexture("radar_ray"); AverySprite.SetTexture("radar_avery");
SalSprite.SetTexture("radar_sal"); BikerSprite.SetTexture("radar_biker");
SaveSprite.SetTexture("radar_save"); CortezSprite.SetTexture("radar_cortez");
SpraySprite.SetTexture("radar_spray"); DiazSprite.SetTexture("radar_diaz");
TonySprite.SetTexture("radar_tony"); KentSprite.SetTexture("radar_kent");
WeaponSprite.SetTexture("radar_weapon"); LawyerSprite.SetTexture("radar_lawyer");
PhilSprite.SetTexture("radar_phil");
BikersSprite.SetTexture("bikers");
BoatyardSprite.SetTexture("boatyard");
MalibuClubSprite.SetTexture("club");
CubansSprite.SetTexture("cubans");
FilmSprite.SetTexture("filmstudio");
GunSprite.SetTexture("gun");
HaitiansSprite.SetTexture("haitians");
HardwareSprite.SetTexture("hardware");
SaveHouseSprite.SetTexture("radar_save");
StripSprite.SetTexture("radar_strip");
IceSprite.SetTexture("icecream");
KCabsSprite.SetTexture("kcabs");
LovefistSprite.SetTexture("lovefist");
PrintworksSprite.SetTexture("printworks");
PropertySprite.SetTexture("property");
SunYardSprite.SetTexture("SunYard");
SpraySprite.SetTexture("spray");
TShirtSprite.SetTexture("tshirt");
TommySprite.SetTexture("tommy");
PhoneSprite.SetTexture("phone");
RadioWildstyleSprite.SetTexture("RWildstyle");
RadioFlashSprite.SetTexture("RFlash");
RadioKChatSprite.SetTexture("RKchat");
RadioFeverSprite.SetTexture("RFever");
RadioVRockSprite.SetTexture("RVRock");
RadioVCPRSprite.SetTexture("RVCPR");
RadioEspantosoSprite.SetTexture("REspantoso");
RadioEmotionSprite.SetTexture("REmotion");
RadioWaveSprite.SetTexture("RWave");
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();
} }
@ -1239,26 +1295,45 @@ void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red,
void CRadar::Shutdown() void CRadar::Shutdown()
{ {
AsukaSprite.Delete();
BombSprite.Delete();
CatSprite.Delete();
CentreSprite.Delete(); CentreSprite.Delete();
CopcarSprite.Delete(); MapHereSprite.Delete();
DonSprite.Delete();
EightSprite.Delete();
ElSprite.Delete();
IceSprite.Delete();
JoeySprite.Delete();
KenjiSprite.Delete();
LizSprite.Delete();
LuigiSprite.Delete();
NorthSprite.Delete(); NorthSprite.Delete();
RaySprite.Delete(); AverySprite.Delete();
SalSprite.Delete(); BikerSprite.Delete();
SaveSprite.Delete(); CortezSprite.Delete();
DiazSprite.Delete();
KentSprite.Delete();
LawyerSprite.Delete();
PhilSprite.Delete();
BikersSprite.Delete();
BoatyardSprite.Delete();
MalibuClubSprite.Delete();
CubansSprite.Delete();
FilmSprite.Delete();
GunSprite.Delete();
HaitiansSprite.Delete();
HardwareSprite.Delete();
SaveHouseSprite.Delete();
StripSprite.Delete();
IceSprite.Delete();
KCabsSprite.Delete();
LovefistSprite.Delete();
PrintworksSprite.Delete();
PropertySprite.Delete();
SunYardSprite.Delete();
SpraySprite.Delete(); SpraySprite.Delete();
TonySprite.Delete(); TShirtSprite.Delete();
WeaponSprite.Delete(); TommySprite.Delete();
PhoneSprite.Delete();
RadioWildstyleSprite.Delete();
RadioFlashSprite.Delete();
RadioKChatSprite.Delete();
RadioFeverSprite.Delete();
RadioVRockSprite.Delete();
RadioVCPRSprite.Delete();
RadioEspantosoSprite.Delete();
RadioEmotionSprite.Delete();
RadioWaveSprite.Delete();
RemoveRadarSections(); RemoveRadarSections();
} }

View File

@ -33,27 +33,47 @@ enum eRadarSprite
RADAR_SPRITE_COORD_BLIP = -1, RADAR_SPRITE_COORD_BLIP = -1,
#endif #endif
RADAR_SPRITE_NONE = 0, RADAR_SPRITE_NONE = 0,
RADAR_SPRITE_ASUKA = 1, RADAR_SPRITE_CENTRE,
RADAR_SPRITE_BOMB = 2, RADAR_SPRITE_MAP_HERE,
RADAR_SPRITE_CAT = 3, RADAR_SPRITE_NORTH,
RADAR_SPRITE_CENTRE = 4, RADAR_SPRITE_AVERY,
RADAR_SPRITE_COPCAR = 5, RADAR_SPRITE_BIKER,
RADAR_SPRITE_DON = 6, RADAR_SPRITE_CORTEZ,
RADAR_SPRITE_EIGHT = 7, RADAR_SPRITE_DIAZ,
RADAR_SPRITE_EL = 8, RADAR_SPRITE_KENT,
RADAR_SPRITE_ICE = 9, RADAR_SPRITE_LAWYER,
RADAR_SPRITE_JOEY = 10, RADAR_SPRITE_PHIL,
RADAR_SPRITE_KENJI = 11, RADAR_SPRITE_BIKERS,
RADAR_SPRITE_LIZ = 12, RADAR_SPRITE_BOATYARD,
RADAR_SPRITE_LUIGI = 13, RADAR_SPRITE_MALIBU_CLUB,
RADAR_SPRITE_NORTH = 14, RADAR_SPRITE_CUBANS,
RADAR_SPRITE_RAY = 15, RADAR_SPRITE_FILM,
RADAR_SPRITE_SAL = 16, RADAR_SPRITE_GUN,
RADAR_SPRITE_SAVE = 17, RADAR_SPRITE_HAITIANS,
RADAR_SPRITE_SPRAY = 18, RADAR_SPRITE_HARDWARE,
RADAR_SPRITE_TONY = 19, RADAR_SPRITE_SAVE,
RADAR_SPRITE_WEAPON = 20, RADAR_SPRITE_STRIP,
RADAR_SPRITE_COUNT = 21, RADAR_SPRITE_ICE,
RADAR_SPRITE_KCABS,
RADAR_SPRITE_LOVEFIST,
RADAR_SPRITE_PRINTWORKS,
RADAR_SPRITE_PROPERTY,
RADAR_SPRITE_SUNYARD,
RADAR_SPRITE_SPRAY,
RADAR_SPRITE_TSHIRT,
RADAR_SPRITE_TOMMY,
RADAR_SPRITE_PHONE,
RADAR_SPRITE_RADIO_WILDSTYLE,
RADAR_SPRITE_RADIO_FLASH,
RADAR_SPRITE_RADIO_KCHAT,
RADAR_SPRITE_RADIO_FEVER,
RADAR_SPRITE_RADIO_VROCK,
RADAR_SPRITE_RADIO_VCPR,
RADAR_SPRITE_RADIO_ESPANTOSO,
RADAR_SPRITE_RADIO_EMOTION,
RADAR_SPRITE_RADIO_WAVE,
RADAR_SPRITE_COUNT
}; };
enum enum
@ -91,27 +111,46 @@ class CRadar
public: public:
static float m_radarRange; static float m_radarRange;
static sRadarTrace ms_RadarTrace[NUMRADARBLIPS]; static sRadarTrace ms_RadarTrace[NUMRADARBLIPS];
static CSprite2d AsukaSprite;
static CSprite2d BombSprite;
static CSprite2d CatSprite;
static CSprite2d CentreSprite; static CSprite2d CentreSprite;
static CSprite2d CopcarSprite; static CSprite2d MapHereSprite;
static CSprite2d DonSprite;
static CSprite2d EightSprite;
static CSprite2d ElSprite;
static CSprite2d IceSprite;
static CSprite2d JoeySprite;
static CSprite2d KenjiSprite;
static CSprite2d LizSprite;
static CSprite2d LuigiSprite;
static CSprite2d NorthSprite; static CSprite2d NorthSprite;
static CSprite2d RaySprite; static CSprite2d AverySprite;
static CSprite2d SalSprite; static CSprite2d BikerSprite;
static CSprite2d SaveSprite; static CSprite2d CortezSprite;
static CSprite2d DiazSprite;
static CSprite2d KentSprite;
static CSprite2d LawyerSprite;
static CSprite2d PhilSprite;
static CSprite2d BikersSprite;
static CSprite2d BoatyardSprite;
static CSprite2d MalibuClubSprite;
static CSprite2d CubansSprite;
static CSprite2d FilmSprite;
static CSprite2d GunSprite;
static CSprite2d HaitiansSprite;
static CSprite2d HardwareSprite;
static CSprite2d SaveHouseSprite;
static CSprite2d StripSprite;
static CSprite2d IceSprite;
static CSprite2d KCabsSprite;
static CSprite2d LovefistSprite;
static CSprite2d PrintworksSprite;
static CSprite2d PropertySprite;
static CSprite2d SunYardSprite;
static CSprite2d SpraySprite; static CSprite2d SpraySprite;
static CSprite2d TonySprite; static CSprite2d TShirtSprite;
static CSprite2d WeaponSprite; static CSprite2d TommySprite;
static CSprite2d *RadarSprites[21]; static CSprite2d PhoneSprite;
static CSprite2d RadioWildstyleSprite;
static CSprite2d RadioFlashSprite;
static CSprite2d RadioKChatSprite;
static CSprite2d RadioFeverSprite;
static CSprite2d RadioVRockSprite;
static CSprite2d RadioVCPRSprite;
static CSprite2d RadioEspantosoSprite;
static CSprite2d RadioEmotionSprite;
static CSprite2d RadioWaveSprite;
static CSprite2d *RadarSprites[RADAR_SPRITE_COUNT];
static float cachedCos; static float cachedCos;
static float cachedSin; static float cachedSin;
#ifdef MENU_MAP #ifdef MENU_MAP

View File

@ -445,7 +445,6 @@ ResetLoadingScreenBar()
NumberOfChunksLoaded = 0.0f; NumberOfChunksLoaded = 0.0f;
} }
// TODO: compare with PS2
//--MIAMI: done //--MIAMI: done
void void
LoadingScreen(const char *str1, const char *str2, const char *splashscreen) LoadingScreen(const char *str1, const char *str2, const char *splashscreen)