mirror of
https://github.com/halpz/re3.git
synced 2025-06-02 03:20:15 +00:00
Add files via upload
This commit is contained in:
parent
61771d1c2c
commit
bea06ff528
|
@ -1776,6 +1776,7 @@ CCamera::CamControl(void)
|
|||
void
|
||||
CCamera::UpdateTargetEntity(void)
|
||||
{
|
||||
//if(!PLAYER) { return; }
|
||||
bool enteringCar = false;
|
||||
bool obbeCam = false;
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ void
|
|||
CDirectory::AddItem(const DirectoryInfo &dirinfo)
|
||||
{
|
||||
assert(numEntries < maxEntries);
|
||||
/*if(!(numEntries < maxEntries)) {
|
||||
debug("");
|
||||
}*/
|
||||
#ifdef FIX_BUGS
|
||||
// don't add if already exists
|
||||
uint32 offset, size;
|
||||
|
|
|
@ -174,6 +174,7 @@ struct ColHeader
|
|||
uint32 size;
|
||||
};
|
||||
|
||||
__declspec(noinline)
|
||||
void
|
||||
CFileLoader::LoadCollisionFile(const char *filename, uint8 colSlot)
|
||||
{
|
||||
|
@ -190,6 +191,10 @@ CFileLoader::LoadCollisionFile(const char *filename, uint8 colSlot)
|
|||
|
||||
while(CFileMgr::Read(fd, (char*)&header, sizeof(header))){
|
||||
assert(header.ident == 'LLOC');
|
||||
//assert((header.ident == 'LLOC') || (header.ident == 'COLL'));
|
||||
//if(!((header.ident == 'LLOC') || (header.ident == 'COLL'))) {
|
||||
// debug("");
|
||||
//}
|
||||
CFileMgr::Read(fd, (char*)work_buff, header.size);
|
||||
memcpy(modelname, work_buff, 24);
|
||||
|
||||
|
@ -1284,12 +1289,19 @@ CFileLoader::LoadObjectInstance(const char *line)
|
|||
RwMatrixRotate(xform, &axis, angle, rwCOMBINEREPLACE);
|
||||
RwMatrixTranslate(xform, &trans, rwCOMBINEPOSTCONCAT);
|
||||
|
||||
int pathobj = 0;
|
||||
if(mi->GetObjectID() == -1){
|
||||
if(ThePaths.IsPathObject(id)){
|
||||
entity = new CTreadable;
|
||||
ThePaths.RegisterMapObject((CTreadable*)entity);
|
||||
pathobj = 1;
|
||||
}else
|
||||
entity = new CBuilding;
|
||||
assert(entity);
|
||||
if(!entity) {
|
||||
debug("!ent %d\n", pathobj);
|
||||
}
|
||||
|
||||
entity->SetModelIndexNoCreate(id);
|
||||
entity->GetMatrix() = CMatrix(xform);
|
||||
entity->m_level = CTheZones::GetLevelFromPosition(&entity->GetPosition());
|
||||
|
|
|
@ -36,11 +36,13 @@
|
|||
#include "User.h"
|
||||
#include "sampman.h"
|
||||
|
||||
// --LCS: changed a bit to have lcs feel, needs more work
|
||||
// --VCS: changed a bit to have vcs feel, needs more work
|
||||
// Similar story to Hud.cpp:
|
||||
// Game has colors inlined in code.
|
||||
// For easier modification we collect them here:
|
||||
const CRGBA LABEL_COLOR(115, 173, 216, 255);
|
||||
#define VC_COLOR_
|
||||
#ifdef VC_COLOR
|
||||
const CRGBA LABEL_COLOR(216, 118, 214, 255);
|
||||
const CRGBA SELECTIONBORDER_COLOR(25, 130, 70, 255);
|
||||
const CRGBA MENUOPTION_COLOR = LABEL_COLOR;
|
||||
const CRGBA SELECTEDMENUOPTION_COLOR(255, 255, 255, 255);
|
||||
|
@ -53,6 +55,22 @@ const CRGBA LIST_OPTION_COLOR(155, 155, 155, 255);
|
|||
const CRGBA RADIO_SELECTOR_COLOR = SLIDEROFF_COLOR;
|
||||
const CRGBA INACTIVE_RADIO_COLOR(100, 100, 255, 100);
|
||||
const CRGBA SCROLLBAR_COLOR = LABEL_COLOR;
|
||||
#else // reVC
|
||||
const CRGBA LABEL_COLOR(255, 150, 225, 255);
|
||||
const CRGBA SELECTIONBORDER_COLOR(25, 130, 70, 255);
|
||||
const CRGBA MENUOPTION_COLOR = LABEL_COLOR;
|
||||
//const CRGBA SELECTEDMENUOPTION_COLOR = LABEL_COLOR;
|
||||
const CRGBA SELECTEDMENUOPTION_COLOR(255, 255, 255, 255); // white selected
|
||||
const CRGBA HEADER_COLOR = LABEL_COLOR;
|
||||
const CRGBA DARKMENUOPTION_COLOR(195, 90, 165, 255);
|
||||
const CRGBA SLIDERON_COLOR(97, 194, 247, 255);
|
||||
const CRGBA SLIDEROFF_COLOR(27, 89, 130, 255);
|
||||
const CRGBA LIST_BACKGROUND_COLOR(49, 101, 148, 130);
|
||||
const CRGBA LIST_OPTION_COLOR(155, 155, 155, 255);
|
||||
const CRGBA RADIO_SELECTOR_COLOR = SLIDEROFF_COLOR;
|
||||
const CRGBA INACTIVE_RADIO_COLOR(100, 100, 255, 100);
|
||||
const CRGBA SCROLLBAR_COLOR = LABEL_COLOR;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// Mobile
|
||||
|
@ -67,6 +85,7 @@ const CRGBA SCROLLBAR_COLOR = LABEL_COLOR;
|
|||
#define MAX_BRIGHTNESS 0x180
|
||||
#endif
|
||||
|
||||
#define RED_DELETE_BACKGROUND
|
||||
#define MAP_MIN_SIZE 162.f
|
||||
#define MAP_SIZE_TO_ALLOW_X_MOVE 297.f
|
||||
|
||||
|
@ -144,8 +163,8 @@ uint32 TimeToStopPadShaking;
|
|||
#endif
|
||||
|
||||
const char* FrontendFilenames[][2] = {
|
||||
{"background", ""},
|
||||
{"vc_logo", "vc_logom"},
|
||||
{"background1", ""},
|
||||
{"vcs_logo", "vc_logom"},
|
||||
{"mouse", "mousea"},
|
||||
{"mapTop01", "mapTop01A"},
|
||||
{"mapTop02", "mapTop02A"},
|
||||
|
@ -437,6 +456,36 @@ CMenuManager::GetPreviousPageOption()
|
|||
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
|
||||
void DoRWStuffEndOfFrame(void);
|
||||
|
||||
//void
|
||||
//InitSizeMap() // mazahaka
|
||||
//{
|
||||
// // re3 orig from CMenuManager::LoadAllTextures()!!!! in MENU_MAP
|
||||
// // FrontEndMenuManager.m_fMapSize = SCREEN_HEIGHT * 2.0f;
|
||||
// // FrontEndMenuManager.m_fMapCenterX = 0.0f;
|
||||
// // FrontEndMenuManager.m_fMapCenterY = 0.0f;
|
||||
//
|
||||
// // custom
|
||||
// FrontEndMenuManager.m_fMapSize = SCREEN_HEIGHT * 0.92f; // custom
|
||||
// FrontEndMenuManager.m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
|
||||
// FrontEndMenuManager.m_fMapCenterY = MENU_Y(100.0f);
|
||||
//
|
||||
// //FrontEndMenuManager.m_fMapSize = SCREEN_HEIGHT * 0.92f; // custom
|
||||
// //FrontEndMenuManager.m_fMapCenterX = 0.0f;
|
||||
// //FrontEndMenuManager.m_fMapCenterY = 0.0f;
|
||||
//
|
||||
// //////////FrontEndMenuManager.m_fMapSize = SCREEN_HEIGHT * 0.92f;
|
||||
// //FrontEndMenuManager.m_fMapCenterX = MENU_X_RIGHT_ALIGNED(320.0f);
|
||||
// //FrontEndMenuManager.m_fMapCenterY = MENU_Y(225.0f);
|
||||
//
|
||||
// //FrontEndMenuManager.m_fMapSize = MENU_Y(162.0f); // Y because of HOR+ // CMenuManager::Initialise(void)
|
||||
// /////////FrontEndMenuManager.m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
|
||||
// /////////FrontEndMenuManager.m_fMapCenterY = MENU_Y(225.0f);
|
||||
//
|
||||
// //FrontEndMenuManager.m_fMapSize = MENU_Y(162.0f); // Y because of HOR+ // ctor CmenuManager::cme
|
||||
// //FrontEndMenuManager.m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
|
||||
// //FrontEndMenuManager.m_fMapCenterY = MENU_Y(225.0f);
|
||||
//}
|
||||
|
||||
void
|
||||
CMenuManager::SwitchToNewScreen(int8 screen)
|
||||
{
|
||||
|
@ -543,9 +592,18 @@ CMenuManager::CMenuManager()
|
|||
m_bWantToLoad = false;
|
||||
m_nMenuFadeAlpha = 0;
|
||||
m_OnlySaveMenu = false;
|
||||
|
||||
// vc
|
||||
m_fMapSize = MENU_Y(162.0f); // Y because of HOR+
|
||||
m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
|
||||
m_fMapCenterY = MENU_Y(225.0f);
|
||||
//InitSizeMap(); // mazahaka
|
||||
|
||||
// re3 mazahaka
|
||||
//m_fMapSize = SCREEN_HEIGHT * 2.0f;
|
||||
//m_fMapCenterX = 0.0f;
|
||||
//m_fMapCenterY = 0.0f;
|
||||
|
||||
DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
|
||||
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
|
||||
|
||||
|
@ -594,9 +652,12 @@ CMenuManager::Initialise(void)
|
|||
#else
|
||||
m_bShowMouse = true;
|
||||
#endif
|
||||
|
||||
m_fMapSize = MENU_Y(162.0f); // Y because of HOR+
|
||||
m_fMapCenterX = MENU_X_LEFT_ALIGNED(320.0f);
|
||||
m_fMapCenterY = MENU_Y(225.0f);
|
||||
//InitSizeMap();
|
||||
|
||||
CPad::StopPadsShaking();
|
||||
#ifdef MISSION_REPLAY
|
||||
if (!m_OnlySaveMenu) {
|
||||
|
@ -626,9 +687,9 @@ CMenuManager::Initialise(void)
|
|||
|
||||
DMAudio.SetMP3BoostVolume(m_PrefsMP3BoostVolume);
|
||||
if (DMAudio.IsMP3RadioChannelAvailable()) {
|
||||
if (m_PrefsRadioStation < WILDSTYLE || m_PrefsRadioStation > USERTRACK)
|
||||
if (m_PrefsRadioStation < FLASH_FM || m_PrefsRadioStation > USERTRACK)
|
||||
m_PrefsRadioStation = CGeneral::GetRandomNumber() % (USERTRACK + 1);
|
||||
} else if (m_PrefsRadioStation < WILDSTYLE || m_PrefsRadioStation > WAVE)
|
||||
} else if (m_PrefsRadioStation < FLASH_FM || m_PrefsRadioStation > WAVE)
|
||||
m_PrefsRadioStation = CGeneral::GetRandomNumber() % (WAVE + 1);
|
||||
|
||||
CFileMgr::SetDir("");
|
||||
|
@ -1233,36 +1294,15 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
|
|||
break;
|
||||
case MENUACTION_RADIO:
|
||||
switch (m_PrefsRadioStation) {
|
||||
case WILDSTYLE:
|
||||
rightText = TheText.Get("FEA_FM0");
|
||||
break;
|
||||
case FLASH_FM:
|
||||
rightText = TheText.Get("FEA_FM1");
|
||||
break;
|
||||
case KCHAT:
|
||||
rightText = TheText.Get("FEA_FM2");
|
||||
break;
|
||||
case FEVER:
|
||||
rightText = TheText.Get("FEA_FM3");
|
||||
break;
|
||||
case V_ROCK:
|
||||
rightText = TheText.Get("FEA_FM4");
|
||||
break;
|
||||
case VCPR:
|
||||
rightText = TheText.Get("FEA_FM5");
|
||||
break;
|
||||
case RADIO_ESPANTOSO:
|
||||
rightText = TheText.Get("FEA_FM6");
|
||||
break;
|
||||
case EMOTION:
|
||||
rightText = TheText.Get("FEA_FM7");
|
||||
break;
|
||||
case WAVE:
|
||||
rightText = TheText.Get("FEA_FM8");
|
||||
break;
|
||||
case USERTRACK:
|
||||
rightText = TheText.Get("FEA_MP3");
|
||||
break;
|
||||
case FLASH_FM: rightText = TheText.Get("FEA_FM0"); break;
|
||||
case V_ROCK: rightText = TheText.Get("FEA_FM1"); break;
|
||||
case PARADISE: rightText = TheText.Get("FEA_FM2"); break;
|
||||
case VCPR: rightText = TheText.Get("FEA_FM3"); break;
|
||||
case VCFL: rightText = TheText.Get("FEA_FM4"); break;
|
||||
case WAVE: rightText = TheText.Get("FEA_FM5"); break;
|
||||
case FRESH: rightText = TheText.Get("FEA_FM6"); break;
|
||||
case ESPANTOSO: rightText = TheText.Get("FEA_FM7"); break;
|
||||
case EMOTION: rightText = TheText.Get("FEA_FM8"); break;
|
||||
}
|
||||
break;
|
||||
case MENUACTION_LEGENDS:
|
||||
|
@ -2300,6 +2340,7 @@ CMenuManager::DrawFrontEnd()
|
|||
SETUP_SCROLLING(m_nCurrScreen)
|
||||
}
|
||||
|
||||
|
||||
if (m_nCurrOption == 0 && aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)
|
||||
m_nCurrOption = 1;
|
||||
|
||||
|
@ -2307,6 +2348,16 @@ CMenuManager::DrawFrontEnd()
|
|||
bMenuChangeOngoing = false;
|
||||
|
||||
DrawBackground(false);
|
||||
|
||||
#ifdef RED_DELETE_BACKGROUND
|
||||
if (m_nCurrScreen == MENUPAGE_CHOOSE_DELETE_SLOT || m_nCurrScreen == MENUPAGE_DELETE_SLOT_CONFIRM) {
|
||||
CSprite2d::Draw2DPolygon(0.0f, 0.0f,
|
||||
SCREEN_WIDTH, 0.0f,
|
||||
0.0f, SCREEN_HEIGHT,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT,
|
||||
CRGBA(150, 0, 0, 80));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2318,16 +2369,26 @@ CMenuManager::DrawBackground(bool transitionCall)
|
|||
SetFrontEndRenderStates();
|
||||
|
||||
if (m_firstStartCounter < 255) {
|
||||
#ifdef TRANSPARENT_MENU // try not draw black fade
|
||||
if(FrontEndMenuManager.m_bGameNotLoaded) { CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(0, 0, 0, 255)); }
|
||||
#else
|
||||
CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(0, 0, 0, 255));
|
||||
#endif
|
||||
}
|
||||
|
||||
//int max_bg_bright = 20;
|
||||
if (m_nMenuFadeAlpha != 0) {
|
||||
|
||||
if (m_nMenuFadeAlpha < 255) {
|
||||
|
||||
menuBg.Translate(m_nMenuFadeAlpha);
|
||||
SetFrontEndRenderStates();
|
||||
#ifdef TRANSPARENT_MENU
|
||||
m_aFrontEndSprites[MENUSPRITE_BACKGROUND].HKMenuDraw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
#else
|
||||
m_aFrontEndSprites[MENUSPRITE_BACKGROUND].Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
//m_aFrontEndSprites[MENUSPRITE_BACKGROUND].Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, (max_bg_bright)));
|
||||
#endif
|
||||
if (m_nCurrScreen == MENUPAGE_MAP)
|
||||
PrintMap();
|
||||
|
||||
|
@ -2349,7 +2410,12 @@ CMenuManager::DrawBackground(bool transitionCall)
|
|||
} else {
|
||||
m_nMenuFadeAlpha = 255;
|
||||
m_firstStartCounter = 255;
|
||||
#ifdef TRANSPARENT_MENU
|
||||
m_aFrontEndSprites[MENUSPRITE_BACKGROUND].HKMenuDraw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
#else
|
||||
m_aFrontEndSprites[MENUSPRITE_BACKGROUND].Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
//m_aFrontEndSprites[MENUSPRITE_BACKGROUND].Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, (max_bg_bright)));
|
||||
#endif
|
||||
if (m_nCurrScreen == MENUPAGE_MAP)
|
||||
PrintMap();
|
||||
|
||||
|
@ -3466,7 +3532,11 @@ CMenuManager::PrintStats()
|
|||
if (y >= MENU_Y(STATS_TOP_Y + STATS_FADING_AREA_LENGTH) && y <= MENU_Y(STATS_BOTTOM_Y - STATS_FADING_AREA_LENGTH))
|
||||
alpha = 255.0f;
|
||||
|
||||
#ifdef MAZAHAKA_STATS_COLOR_FIX
|
||||
CFont::SetColor(CRGBA(255, 255, 255, FadeIn(Min(255.f, alpha))));
|
||||
#else
|
||||
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(Min(255.f, alpha))));
|
||||
#endif
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(STATS_ROW_LEFT_MARGIN), y, gUString);
|
||||
CFont::SetRightJustifyOn();
|
||||
|
@ -5811,6 +5881,141 @@ CMenuManager::DrawQuitGameScreen(void)
|
|||
m_AllowNavigation = false;
|
||||
}
|
||||
|
||||
// re3 test
|
||||
/*void
|
||||
CMenuManager::PrintMap(void)
|
||||
{
|
||||
m_bMenuMapActive = true;
|
||||
CRadar::InitFrontEndMap();
|
||||
|
||||
float halfTile = m_fMapSize * 2.f / 3.f / 2.f;
|
||||
|
||||
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
|
||||
|
||||
// Добавляем смещение вправо
|
||||
float mapOffsetX = 120.0f; // Пример значения смещения (настраивайте по необходимости)
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX - m_fMapSize || SCREEN_HEIGHT >= m_fMapCenterY - m_fMapSize) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPTOP01].Draw(CRect(m_fMapCenterX + mapOffsetX - m_fMapSize, m_fMapCenterY - m_fMapSize,
|
||||
m_fMapCenterX + mapOffsetX - halfTile, m_fMapCenterY - halfTile), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX - halfTile || SCREEN_HEIGHT >= m_fMapCenterY - m_fMapSize) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPTOP02].Draw(CRect(m_fMapCenterX + mapOffsetX - halfTile, m_fMapCenterY - m_fMapSize,
|
||||
m_fMapCenterX + mapOffsetX + halfTile, m_fMapCenterY - halfTile), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX + halfTile || SCREEN_HEIGHT >= m_fMapCenterY - m_fMapSize) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPTOP03].Draw(CRect(m_fMapCenterX + mapOffsetX + halfTile, m_fMapCenterY - m_fMapSize,
|
||||
m_fMapCenterX + mapOffsetX + m_fMapSize, m_fMapCenterY - halfTile), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX - m_fMapSize || SCREEN_HEIGHT >= m_fMapCenterY - halfTile) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPMID01].Draw(CRect(m_fMapCenterX + mapOffsetX - m_fMapSize, m_fMapCenterY - halfTile,
|
||||
m_fMapCenterX + mapOffsetX - halfTile, m_fMapCenterY + halfTile), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX - halfTile || SCREEN_HEIGHT >= m_fMapCenterY - halfTile) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPMID02].Draw(CRect(m_fMapCenterX + mapOffsetX - halfTile, m_fMapCenterY - halfTile,
|
||||
m_fMapCenterX + mapOffsetX + halfTile, m_fMapCenterY + halfTile), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX + halfTile || SCREEN_HEIGHT >= m_fMapCenterY - halfTile) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPMID03].Draw(CRect(m_fMapCenterX + mapOffsetX + halfTile, m_fMapCenterY - halfTile,
|
||||
m_fMapCenterX + mapOffsetX + m_fMapSize, m_fMapCenterY + halfTile), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX - m_fMapSize || SCREEN_HEIGHT >= m_fMapCenterY + halfTile) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPBOT01].Draw(CRect(m_fMapCenterX + mapOffsetX - m_fMapSize, m_fMapCenterY + halfTile,
|
||||
m_fMapCenterX + mapOffsetX - halfTile, m_fMapCenterY + m_fMapSize), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX - halfTile || SCREEN_HEIGHT >= m_fMapCenterY + halfTile) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPBOT02].Draw(CRect(m_fMapCenterX + mapOffsetX - halfTile, m_fMapCenterY + halfTile,
|
||||
m_fMapCenterX + mapOffsetX + halfTile, m_fMapCenterY + m_fMapSize), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
if (SCREEN_WIDTH >= m_fMapCenterX + mapOffsetX + halfTile || SCREEN_HEIGHT >= m_fMapCenterY + halfTile) {
|
||||
m_aFrontEndSprites[MENUSPRITE_MAPBOT03].Draw(CRect(m_fMapCenterX + mapOffsetX + halfTile, m_fMapCenterY + halfTile,
|
||||
m_fMapCenterX + mapOffsetX + m_fMapSize, m_fMapCenterY + m_fMapSize), CRGBA(255, 255, 255, FadeIn(255)));
|
||||
}
|
||||
|
||||
CRadar::DrawBlips();
|
||||
//m_PrefsShowLegends = false; // mazahaka tmp
|
||||
if (m_PrefsShowLegends) {
|
||||
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(40.0f));
|
||||
CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(84.0f));
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255)));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.65f), SCREEN_SCALE_Y(0.95f));
|
||||
|
||||
int secondColumnStart = (CRadar::MapLegendCounter - 1) / 2;
|
||||
int boxBottom = MENU_Y(100.0f);
|
||||
|
||||
// + 3, because we want 19*3 px padding
|
||||
for (int i = 0; i < secondColumnStart + 3; i++) {
|
||||
boxBottom += MENU_Y(19.f);
|
||||
}
|
||||
|
||||
CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(95.0f), MENU_Y(100.0f), MENU_X_LEFT_ALIGNED(555.f), boxBottom),
|
||||
CRGBA(0, 0, 0, FadeIn(190)));
|
||||
|
||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), MENU_Y(102.0f), TheText.Get("FE_MLG"));
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||
if (m_PrefsLanguage == LANGUAGE_AMERICAN)
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.55f), SCREEN_SCALE_Y(0.55f));
|
||||
else
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.45f), SCREEN_SCALE_Y(0.55f));
|
||||
|
||||
CFont::SetColor(CRGBA(225, 225, 225, FadeIn(255)));
|
||||
CFont::SetDropShadowPosition(0);
|
||||
|
||||
int y = MENU_Y(127.0f);
|
||||
int x = MENU_X_LEFT_ALIGNED(160.0f);
|
||||
|
||||
for (int16 i = 0; i < CRadar::MapLegendCounter; i++) {
|
||||
CRadar::DrawLegend(x, y, CRadar::MapLegendList[i]);
|
||||
|
||||
if (i == secondColumnStart) {
|
||||
x = MENU_X_LEFT_ALIGNED(350.0f);
|
||||
y = MENU_Y(127.0f);
|
||||
} else {
|
||||
y += MENU_Y(19.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
if (m_nMenuFadeAlpha != 255 && !m_bShowMouse) {
|
||||
mapCrosshair.x = SCREEN_WIDTH / 2;
|
||||
mapCrosshair.y = SCREEN_HEIGHT / 2;
|
||||
} else if (m_bShowMouse) {
|
||||
mapCrosshair.x = m_nMousePosX;
|
||||
mapCrosshair.y = m_nMousePosY;
|
||||
}
|
||||
|
||||
CSprite2d::DrawRect(CRect(mapCrosshair.x - MENU_X(1.0f), 0.0f,
|
||||
mapCrosshair.x + MENU_X(1.0f), SCREEN_HEIGHT),
|
||||
CRGBA(0, 0, 0, 150));
|
||||
CSprite2d::DrawRect(CRect(0.0f, mapCrosshair.y + MENU_X(1.0f),
|
||||
SCREEN_WIDTH, mapCrosshair.y - MENU_X(1.0f)),
|
||||
CRGBA(0, 0, 0, 150));
|
||||
|
||||
#endif
|
||||
m_bMenuMapActive = false;
|
||||
|
||||
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_X_MARGIN));
|
||||
CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_X_MARGIN));
|
||||
DisplayHelperText("FEH_MPH");
|
||||
}*/
|
||||
|
||||
|
||||
// lcs
|
||||
void
|
||||
CMenuManager::PrintMap(void)
|
||||
{
|
||||
|
@ -5940,6 +6145,7 @@ CMenuManager::PrintMap(void)
|
|||
DisplayHelperText("FEH_MPH");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CMenuManager::ChangeRadioStation(int8 increaseBy)
|
||||
{
|
||||
|
@ -5957,15 +6163,15 @@ CMenuManager::ChangeRadioStation(int8 increaseBy)
|
|||
}
|
||||
|
||||
if (DMAudio.IsMP3RadioChannelAvailable()) {
|
||||
if (m_PrefsRadioStation < WILDSTYLE)
|
||||
if (m_PrefsRadioStation < FLASH_FM)
|
||||
m_PrefsRadioStation = USERTRACK;
|
||||
if (m_PrefsRadioStation > USERTRACK)
|
||||
m_PrefsRadioStation = WILDSTYLE;
|
||||
m_PrefsRadioStation = FLASH_FM;
|
||||
} else {
|
||||
if (m_PrefsRadioStation < WILDSTYLE)
|
||||
if (m_PrefsRadioStation < FLASH_FM)
|
||||
m_PrefsRadioStation = WAVE;
|
||||
if (m_PrefsRadioStation > WAVE)
|
||||
m_PrefsRadioStation = WILDSTYLE;
|
||||
m_PrefsRadioStation = FLASH_FM;
|
||||
}
|
||||
DMAudio.StopFrontEndTrack();
|
||||
DMAudio.PlayFrontEndSound(SOUND_RADIO_CHANGE, 0);
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
#include "Ropes.h"
|
||||
#include "WindModifiers.h"
|
||||
#include "WaterCreatures.h"
|
||||
#include "FerrisWheel.h"
|
||||
#include "postfx.h"
|
||||
#include "custompipes.h"
|
||||
#include "screendroplets.h"
|
||||
|
@ -96,6 +97,9 @@
|
|||
#ifdef USE_TEXTURE_POOL
|
||||
#include "TexturePools.h"
|
||||
#endif
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
#include "../plugin/plugin.h"
|
||||
#endif
|
||||
|
||||
eLevelName CGame::currLevel;
|
||||
int32 CGame::currArea;
|
||||
|
@ -321,6 +325,10 @@ void CGame::ShutdownRenderWare(void)
|
|||
|
||||
bool CGame::InitialiseOnceAfterRW(void)
|
||||
{
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_InitialiseOnceAfterRW_Before(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
|
||||
TheText.Load();
|
||||
CTimer::Initialise();
|
||||
gpTempColModels->Initialise();
|
||||
|
@ -353,6 +361,10 @@ bool CGame::InitialiseOnceAfterRW(void)
|
|||
DMAudio.SetEffectsFadeVol(127);
|
||||
DMAudio.SetMusicFadeVol(127);
|
||||
#endif
|
||||
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_InitialiseOnceAfterRW_After(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -366,6 +378,10 @@ CGame::FinalShutdown(void)
|
|||
|
||||
bool CGame::Initialise(const char* datFile)
|
||||
{
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_OnInit_Before(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
|
||||
ResetLoadingScreenBar();
|
||||
strcpy(aDatFile, datFile);
|
||||
|
||||
|
@ -388,7 +404,11 @@ bool CGame::Initialise(const char* datFile)
|
|||
#ifdef USE_TEXTURE_POOL
|
||||
_TexturePoolsUnknown(false);
|
||||
#endif
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
currLevel = LEVEL_INDUSTRIAL;
|
||||
#else
|
||||
currLevel = LEVEL_BEACH;
|
||||
#endif
|
||||
currArea = AREA_MAIN_MAP;
|
||||
|
||||
PUSH_MEMID(MEMID_TEXTURES);
|
||||
|
@ -457,9 +477,16 @@ bool CGame::Initialise(const char* datFile)
|
|||
CPickups::Init();
|
||||
CTheCarGenerators::Init();
|
||||
|
||||
CdStreamAddImage("MODELS\\GTA3.IMG");
|
||||
//CdStreamAddImage("MODELS\\GTAVCS.IMG");
|
||||
//CdStreamAddImage("MODELS\\_\\GTA3.IMG");
|
||||
CdStreamAddImage("MODELS\\GTA3.IMG"); // lower is priority [dummy tmp] áåç íåãî èãðà íå ñòàðòóåò lol
|
||||
//CdStreamAddImage("MODELS\\LCS_PEDS.IMG");
|
||||
//CdStreamAddImage("MODELS\\GTAVCS.IMG");//cols
|
||||
//CdStreamAddImage("MODELS\\GTAVC.IMG");
|
||||
//CdStreamAddImage("MODELS\\_\\LCS_OTHER.IMG"); // lower is priority, other main cdimage map+obj
|
||||
|
||||
// CFileLoader::LoadLevel("DATA\\DEFAULT.DAT");
|
||||
|
||||
//CFileLoader::LoadLevel("DATA\\DEFAULT.DAT");
|
||||
CFileLoader::LoadLevel(datFile);
|
||||
|
||||
LoadingScreen("Loading the Game", "Add Particles", nil);
|
||||
|
@ -483,8 +510,10 @@ bool CGame::Initialise(const char* datFile)
|
|||
CDraw::ms_fLODDistance = 500.0f;
|
||||
|
||||
LoadingScreen("Loading the Game", "Setup streaming", nil);
|
||||
//#ifndef MAZAHAKA_DISABLE_CARPEDGEN
|
||||
CStreaming::LoadInitialVehicles();
|
||||
CStreaming::LoadInitialPeds();
|
||||
//#endif
|
||||
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
CStreaming::RemoveIslandsNotUsed(currLevel);
|
||||
|
@ -492,10 +521,14 @@ bool CGame::Initialise(const char* datFile)
|
|||
|
||||
LoadingScreen("Loading the Game", "Load animations", GetRandomSplashScreen());
|
||||
PUSH_MEMID(MEMID_ANIMATION);
|
||||
//#ifndef MAZAHAKA_DISABLE_CARPEDGEN // todo
|
||||
CAnimManager::LoadAnimFiles();
|
||||
//#endif
|
||||
POP_MEMID();
|
||||
|
||||
//#ifndef MAZAHAKA_DISABLE_CARPEDGEN
|
||||
CStreaming::LoadInitialWeapons();
|
||||
//#endif
|
||||
CStreaming::LoadAllRequestedModels(0);
|
||||
CPed::Initialise();
|
||||
CRouteNode::Initialise();
|
||||
|
@ -548,9 +581,9 @@ bool CGame::Initialise(const char* datFile)
|
|||
CSpecialFX::Init();
|
||||
CRopes::Init();
|
||||
CWaterCannons::Init();
|
||||
CBridge::Init();
|
||||
CGarages::Init();
|
||||
|
||||
CBridge::Init(); // need?
|
||||
CGarages::Init(); // ? here?
|
||||
CFerrisWheel::Init(); // vcs
|
||||
LoadingScreen("Loading the Game", "Position dynamic objects", nil);
|
||||
LoadingScreen("Loading the Game", "Initialise vehicle paths", nil);
|
||||
|
||||
|
@ -590,6 +623,10 @@ bool CGame::Initialise(const char* datFile)
|
|||
|
||||
DMAudio.SetStartingTrackPositions(TRUE);
|
||||
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
||||
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_OnInit_After(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -650,6 +687,9 @@ bool CGame::ShutDown(void)
|
|||
CdStreamRemoveImages();
|
||||
#ifdef USE_TEXTURE_POOL
|
||||
_TexturePoolsFinalShutdown();
|
||||
#endif
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_Shutdown(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
@ -677,9 +717,14 @@ bool CGame::ReInitGameObjectVariables(bool load)
|
|||
CDraw::SetFOV(120.0f);
|
||||
CDraw::ms_fLODDistance = 500.0f;
|
||||
CStreaming::RequestBigBuildings(LEVEL_GENERIC);
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
|
||||
CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
|
||||
CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
|
||||
#else
|
||||
CStreaming::RemoveIslandsNotUsed(LEVEL_BEACH); // revc ~674
|
||||
CStreaming::RemoveIslandsNotUsed(LEVEL_MAINLAND);
|
||||
#endif
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
currArea = AREA_MAIN_MAP;
|
||||
CPed::Initialise();
|
||||
|
@ -709,8 +754,8 @@ bool CGame::ReInitGameObjectVariables(bool load)
|
|||
CHeli::InitHelis();
|
||||
CMovingThings::Init();
|
||||
CDarkel::Init();
|
||||
if(!load) // erase loaded stats bug
|
||||
CStats::Init();
|
||||
if(!load) // if load save data already have in fields!!
|
||||
CStats::Init(); // mazahaka
|
||||
CPickups::Init();
|
||||
CPacManPickups::Init();
|
||||
if (!load)
|
||||
|
@ -779,6 +824,10 @@ void CGame::ShutDownForRestart(void)
|
|||
|
||||
void CGame::InitialiseWhenRestarting(void)
|
||||
{
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_OnRestart_Before(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
|
||||
CRect rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
CRGBA color(255, 255, 255, 255);
|
||||
|
||||
|
@ -815,8 +864,10 @@ void CGame::InitialiseWhenRestarting(void)
|
|||
|
||||
if ( FrontEndMenuManager.m_bWantToLoad == true )
|
||||
{
|
||||
// FrontEndMenuManager.m_bWantToLoad = false; // removed by lcs mazahaka
|
||||
InitRadioStationPositionList();
|
||||
if ( bLoadSuccessful == true )
|
||||
// if(GenericLoad() == true) // removed by lcs mazahaka
|
||||
if(bLoadSuccessful == true) // orig áåç íåãî ðåèíèò çàáûâàåò ïåðåìåííûå save. init, load save, init => result lost save variables mazahaka
|
||||
{
|
||||
DMAudio.ResetTimers(CTimer::GetTimeInMilliseconds());
|
||||
CFerry::InitFerrys();
|
||||
|
@ -835,7 +886,7 @@ void CGame::InitialiseWhenRestarting(void)
|
|||
ShutDownForRestart();
|
||||
CTimer::Stop();
|
||||
CTimer::Initialise();
|
||||
//FrontEndMenuManager.m_bWantToLoad = false;
|
||||
// FrontEndMenuManager.m_bWantToLoad = false; // remove by lcs
|
||||
ReInitGameObjectVariables(false);
|
||||
currLevel = LEVEL_GENERIC;
|
||||
CCollision::SortOutCollisionAfterLoad();
|
||||
|
@ -845,17 +896,26 @@ void CGame::InitialiseWhenRestarting(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
FrontEndMenuManager.m_bWantToLoad = true;
|
||||
FrontEndMenuManager.m_bWantToLoad = true; // new by lcs
|
||||
CTimer::Update();
|
||||
|
||||
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
||||
#ifdef USE_TEXTURE_POOL
|
||||
_TexturePoolsUnknown(true);
|
||||
#endif
|
||||
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_OnRestart_After(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
}
|
||||
|
||||
void CGame::Process(void)
|
||||
{
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_OnDraw_Before(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
|
||||
//--------------new block lcs áåç íåãî êðàøèò
|
||||
if (FrontEndMenuManager.m_bWantToLoad) {
|
||||
CTheScripts::StartTestScript();
|
||||
CTheScripts::Process();
|
||||
|
@ -870,6 +930,10 @@ void CGame::Process(void)
|
|||
CStreaming::LoadScene(TheCamera.GetPosition());
|
||||
FrontEndMenuManager.m_bWantToLoad = false;
|
||||
}
|
||||
//--------------!new block
|
||||
|
||||
|
||||
|
||||
CPad::UpdatePads();
|
||||
#ifdef USE_CUSTOM_ALLOCATOR
|
||||
ProcessTidyUpMemory();
|
||||
|
@ -933,6 +997,7 @@ void CGame::Process(void)
|
|||
CEventList::Update();
|
||||
CParticle::Update();
|
||||
gFireManager.Update();
|
||||
#ifndef MAZAHAKA_DISABLE_CARPEDGEN
|
||||
//if (processTime >= 2) {
|
||||
// CPopulation::Update(false);
|
||||
//} else {
|
||||
|
@ -940,6 +1005,7 @@ void CGame::Process(void)
|
|||
CPopulation::Update(true);
|
||||
// processTime = CTimer::GetCurrentTimeInCycles() / CTimer::GetCyclesPerMillisecond() - startTime;
|
||||
//}
|
||||
#endif
|
||||
CWeapon::UpdateWeapons();
|
||||
if (!CCutsceneMgr::IsRunning())
|
||||
CTheCarGenerators::Process();
|
||||
|
@ -968,6 +1034,7 @@ void CGame::Process(void)
|
|||
CCullZones::Update();
|
||||
if (!CReplay::IsPlayingBack())
|
||||
CGameLogic::Update();
|
||||
CFerrisWheel::Update(); // vcs
|
||||
CBridge::Update();
|
||||
CCoronas::DoSunAndMoon();
|
||||
CCoronas::Update();
|
||||
|
@ -976,6 +1043,7 @@ void CGame::Process(void)
|
|||
gPhoneInfo.Update();
|
||||
if (!CReplay::IsPlayingBack())
|
||||
{
|
||||
#ifndef MAZAHAKA_DISABLE_CARPEDGEN
|
||||
PUSH_MEMID(MEMID_CARS);
|
||||
//if (processTime < 2)
|
||||
CCarCtrl::GenerateRandomCars();
|
||||
|
@ -983,11 +1051,16 @@ void CGame::Process(void)
|
|||
CCarCtrl::RemoveDistantCars();
|
||||
CCarCtrl::RemoveCarsIfThePoolGetsFull();
|
||||
POP_MEMID();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef GTA_PS2
|
||||
CMemCheck::DoTest();
|
||||
#endif
|
||||
|
||||
#ifdef MAZAHAKA_PLUGIN_CODE
|
||||
PLG_OnDraw_After(); // PLG PLUGIN MAZAHAKA
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_CUSTOM_ALLOCATOR
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
enum eLevelName {
|
||||
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
|
||||
LEVEL_GENERIC = 0,
|
||||
|
@ -10,6 +11,16 @@ enum eLevelName {
|
|||
|
||||
NUM_LEVELS
|
||||
};
|
||||
#else
|
||||
enum eLevelName {
|
||||
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
|
||||
LEVEL_GENERIC = 0,
|
||||
LEVEL_BEACH,
|
||||
LEVEL_MAINLAND,
|
||||
|
||||
NUM_LEVELS
|
||||
};
|
||||
#endif
|
||||
|
||||
enum eAreaName {
|
||||
AREA_MAIN_MAP,
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
node->prev = nil;
|
||||
node->next = first;
|
||||
if(first)
|
||||
|
||||
first->prev = node;
|
||||
first = node;
|
||||
return node;
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
#include "Font.h"
|
||||
#include "SaveBuf.h"
|
||||
|
||||
//--mazahaka
|
||||
#include "rwcore.h"
|
||||
#include "rwplcore.h"
|
||||
#include "rpanisot.h"
|
||||
|
||||
float CRadar::m_radarRange;
|
||||
sRadarTrace CRadar::ms_RadarTrace[NUMRADARBLIPS];
|
||||
CVector2D vec2DRadarOrigin;
|
||||
|
@ -97,7 +102,10 @@ CSprite2d CRadar::MapHereSprite4;
|
|||
CSprite2d CRadar::MapHereSprite5;
|
||||
CSprite2d CRadar::MapHereSprite6;
|
||||
CSprite2d CRadar::MapHereSprite7;
|
||||
CSprite2d CRadar::MapWayPoint;
|
||||
//CSprite2d CRadar::MapWayPoint;
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
CSprite2d CRadar::WaypointSprite;
|
||||
#endif
|
||||
|
||||
CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
|
||||
nil,
|
||||
|
@ -162,7 +170,10 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
|
|||
&MapHereSprite5,
|
||||
&MapHereSprite6,
|
||||
&MapHereSprite7,
|
||||
&MapWayPoint,
|
||||
//&MapWayPoint,
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
&WaypointSprite,
|
||||
#endif
|
||||
};
|
||||
|
||||
// Why this doesn't coincide with world coordinates i don't know
|
||||
|
@ -576,7 +587,8 @@ void CRadar::Draw3dMarkers()
|
|||
}
|
||||
}
|
||||
|
||||
void CRadar::DrawBlips()
|
||||
|
||||
void CRadar::DrawBlips() //----------------------- îòðèñîâêà èêîíîê íà êàðòå
|
||||
{
|
||||
if (!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud) {
|
||||
#ifdef SECUROM
|
||||
|
@ -605,7 +617,7 @@ void CRadar::DrawBlips()
|
|||
else
|
||||
angle = FindPlayerHeading() - (PI + TheCamera.GetForward().Heading());
|
||||
|
||||
DrawRotatingRadarSprite(&CentreSprite, out.x, out.y, angle, 255);
|
||||
DrawRotatingRadarSprite(&CentreSprite, out.x, out.y, angle, 255); // îòðèñîâêà íà êðóãëîì ðàäàðå â èãðå
|
||||
|
||||
CVector2D vec2d;
|
||||
vec2d.x = vec2DRadarOrigin.x;
|
||||
|
@ -720,7 +732,230 @@ void CRadar::DrawBlips()
|
|||
}
|
||||
}
|
||||
|
||||
void CRadar::DrawMap()
|
||||
|
||||
|
||||
// re3
|
||||
/*void
|
||||
CRadar::DrawBlips()
|
||||
{
|
||||
if((!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud)
|
||||
|| FrontEndMenuManager.m_bMenuMapActive
|
||||
) {
|
||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE);
|
||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)FALSE);
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
|
||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void *)rwBLENDSRCALPHA);
|
||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDINVSRCALPHA);
|
||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void *)FALSE);
|
||||
|
||||
CVector2D out;
|
||||
CVector2D in = CVector2D(0.0f, 0.0f);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
|
||||
#ifdef MENU_MAP
|
||||
if(!CMenuManager::bMenuMapActive) {
|
||||
#endif
|
||||
float angle;
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN) angle = PI + FindPlayerHeading();
|
||||
#ifdef FIX_BUGS
|
||||
else if(TheCamera.GetLookDirection() != LOOKING_FORWARD)
|
||||
angle = FindPlayerHeading() - (PI + (TheCamera.Cams[TheCamera.ActiveCam].CamTargetEntity->GetPosition() -
|
||||
TheCamera.Cams[TheCamera.ActiveCam].SourceBeforeLookBehind)
|
||||
.Heading());
|
||||
#endif
|
||||
else
|
||||
angle = FindPlayerHeading() - (PI + TheCamera.GetForward().Heading());
|
||||
|
||||
DrawRotatingRadarSprite(&CentreSprite, out.x, out.y, angle, 255);
|
||||
|
||||
CVector2D vec2d;
|
||||
vec2d.x = vec2DRadarOrigin.x;
|
||||
vec2d.y = M_SQRT2 * m_radarRange + vec2DRadarOrigin.y;
|
||||
TransformRealWorldPointToRadarSpace(in, vec2d);
|
||||
LimitRadarPoint(in);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
DrawRadarSprite(RADAR_SPRITE_NORTH, out.x, out.y, 255);
|
||||
#ifdef MENU_MAP
|
||||
}
|
||||
#endif
|
||||
|
||||
CEntity *blipEntity = nil;
|
||||
for(int blipId = 0; blipId < NUMRADARBLIPS; blipId++) {
|
||||
// A little hack to reuse cleared blips in menu map. hehe
|
||||
if(!FrontEndMenuManager.m_bMenuMapActive || ms_RadarTrace[blipId].m_eBlipType == BLIP_CAR || ms_RadarTrace[blipId].m_eBlipType == BLIP_CHAR ||
|
||||
ms_RadarTrace[blipId].m_eBlipType == BLIP_OBJECT)
|
||||
if(!ms_RadarTrace[blipId].m_bInUse) continue;
|
||||
|
||||
switch(ms_RadarTrace[blipId].m_eBlipType) {
|
||||
case BLIP_CAR:
|
||||
case BLIP_CHAR:
|
||||
case BLIP_OBJECT:
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE ||
|
||||
ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_GUN) {
|
||||
|
||||
switch(ms_RadarTrace[blipId].m_eBlipType) {
|
||||
case BLIP_CAR: blipEntity = CPools::GetVehiclePool()->GetAt(ms_RadarTrace[blipId].m_nEntityHandle); break;
|
||||
case BLIP_CHAR:
|
||||
blipEntity = CPools::GetPedPool()->GetAt(ms_RadarTrace[blipId].m_nEntityHandle);
|
||||
if(blipEntity != nil) {
|
||||
if(((CPed *)blipEntity)->InVehicle()) blipEntity = ((CPed *)blipEntity)->m_pMyVehicle;
|
||||
}
|
||||
break;
|
||||
case BLIP_OBJECT: blipEntity = CPools::GetObjectPool()->GetAt(ms_RadarTrace[blipId].m_nEntityHandle); break;
|
||||
default: break;
|
||||
}
|
||||
if(blipEntity) {
|
||||
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
|
||||
if(CTheScripts::IsDebugOn()) {
|
||||
ShowRadarMarker(blipEntity->GetPosition(), color, ms_RadarTrace[blipId].m_Radius);
|
||||
ms_RadarTrace[blipId].m_Radius = ms_RadarTrace[blipId].m_Radius - 0.1f;
|
||||
if(ms_RadarTrace[blipId].m_Radius < 1.0f) ms_RadarTrace[blipId].m_Radius = 5.0f;
|
||||
}
|
||||
}
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BLIP_ONLY) {
|
||||
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
|
||||
float dist = LimitRadarPoint(in);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
|
||||
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
|
||||
} else {
|
||||
ShowRadarTrace(out.x, out.y, ms_RadarTrace[blipId].m_wScale, (uint8)(color >> 24),
|
||||
(uint8)(color >> 16), (uint8)(color >> 8), 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BLIP_COORD:
|
||||
case BLIP_CONTACT_POINT:
|
||||
if((ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE ||
|
||||
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())) {
|
||||
|
||||
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
|
||||
if(CTheScripts::IsDebugOn()) {
|
||||
ShowRadarMarker(ms_RadarTrace[blipId].m_vecPos, color, ms_RadarTrace[blipId].m_Radius);
|
||||
ms_RadarTrace[blipId].m_Radius = ms_RadarTrace[blipId].m_Radius - 0.1f;
|
||||
if(ms_RadarTrace[blipId].m_Radius < 1.0f) ms_RadarTrace[blipId].m_Radius = 5.0f;
|
||||
}
|
||||
}
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BLIP_ONLY) {
|
||||
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
|
||||
float dist = LimitRadarPoint(in);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
|
||||
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
|
||||
} else {
|
||||
ShowRadarTrace(out.x, out.y, ms_RadarTrace[blipId].m_wScale, (uint8)(color >> 24), (uint8)(color >> 16),
|
||||
(uint8)(color >> 8), 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
for(int blipId = 0; blipId < NUMRADARBLIPS; blipId++) {
|
||||
if(!ms_RadarTrace[blipId].m_bInUse) continue;
|
||||
|
||||
switch(ms_RadarTrace[blipId].m_eBlipType) {
|
||||
case BLIP_CAR:
|
||||
case BLIP_CHAR:
|
||||
case BLIP_OBJECT:
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE &&
|
||||
ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_GUN) {
|
||||
|
||||
switch(ms_RadarTrace[blipId].m_eBlipType) {
|
||||
case BLIP_CAR: blipEntity = CPools::GetVehiclePool()->GetAt(ms_RadarTrace[blipId].m_nEntityHandle); break;
|
||||
case BLIP_CHAR:
|
||||
blipEntity = CPools::GetPedPool()->GetAt(ms_RadarTrace[blipId].m_nEntityHandle);
|
||||
if(blipEntity != nil) {
|
||||
if(((CPed *)blipEntity)->InVehicle()) blipEntity = ((CPed *)blipEntity)->m_pMyVehicle;
|
||||
}
|
||||
break;
|
||||
case BLIP_OBJECT: blipEntity = CPools::GetObjectPool()->GetAt(ms_RadarTrace[blipId].m_nEntityHandle); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if(blipEntity) {
|
||||
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
|
||||
if(CTheScripts::IsDebugOn()) {
|
||||
ShowRadarMarker(blipEntity->GetPosition(), color, ms_RadarTrace[blipId].m_Radius);
|
||||
ms_RadarTrace[blipId].m_Radius = ms_RadarTrace[blipId].m_Radius - 0.1f;
|
||||
if(ms_RadarTrace[blipId].m_Radius < 1.0f) ms_RadarTrace[blipId].m_Radius = 5.0f;
|
||||
}
|
||||
}
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BLIP_ONLY) {
|
||||
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
|
||||
float dist = LimitRadarPoint(in);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
|
||||
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
|
||||
else
|
||||
ShowRadarTrace(out.x, out.y, ms_RadarTrace[blipId].m_wScale, (uint8)(color >> 24),
|
||||
(uint8)(color >> 16), (uint8)(color >> 8), 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
for(int blipId = 0; blipId < NUMRADARBLIPS; blipId++) {
|
||||
if(!ms_RadarTrace[blipId].m_bInUse) continue;
|
||||
|
||||
switch(ms_RadarTrace[blipId].m_eBlipType) {
|
||||
case BLIP_COORD:
|
||||
case BLIP_CONTACT_POINT:
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE &&
|
||||
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())) {
|
||||
|
||||
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
|
||||
if(CTheScripts::IsDebugOn()) {
|
||||
ShowRadarMarker(ms_RadarTrace[blipId].m_vecPos, color, ms_RadarTrace[blipId].m_Radius);
|
||||
ms_RadarTrace[blipId].m_Radius = ms_RadarTrace[blipId].m_Radius - 0.1f;
|
||||
if(ms_RadarTrace[blipId].m_Radius < 1.0f) ms_RadarTrace[blipId].m_Radius = 5.0f;
|
||||
}
|
||||
}
|
||||
if(ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BOTH ||
|
||||
ms_RadarTrace[blipId].m_eBlipDisplay == BLIP_DISPLAY_BLIP_ONLY) {
|
||||
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
|
||||
float dist = LimitRadarPoint(in);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
if(ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
|
||||
DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
|
||||
else
|
||||
ShowRadarTrace(out.x, out.y, ms_RadarTrace[blipId].m_wScale, (uint8)(color >> 24), (uint8)(color >> 16),
|
||||
(uint8)(color >> 8), 255);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
if(FrontEndMenuManager.m_bMenuMapActive) {
|
||||
CVector2D in, out;
|
||||
TransformRealWorldPointToRadarSpace(in, FindPlayerCentreOfWorld_NoSniperShift());
|
||||
LimitRadarPoint(in);
|
||||
TransformRadarPointToScreenSpace(out, in);
|
||||
DrawYouAreHereSprite(out.x, out.y);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void CRadar::DrawMap() // êðóãëûé ðàäàð â èãðå
|
||||
{
|
||||
if (!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud) {
|
||||
CalculateCachedSinCos();
|
||||
|
@ -874,6 +1109,9 @@ void CRadar::DrawRadarSection(int32 x, int32 y)
|
|||
|
||||
void CRadar::DrawRadarSprite(uint16 sprite, float x, float y, uint8 alpha)
|
||||
{
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
if(sprite == RADAR_SPRITE_WAYPOINT) alpha = 255;
|
||||
#endif
|
||||
RadarSprites[sprite]->Draw(CRect(x - SCREEN_SCALE_X(8.0f), y - SCREEN_SCALE_Y(8.0f), x + SCREEN_SCALE_X(8.0f), y + SCREEN_SCALE_Y(8.0f)), CRGBA(255, 255, 255, alpha));
|
||||
|
||||
if (FrontEndMenuManager.m_bMenuMapActive) {
|
||||
|
@ -991,6 +1229,9 @@ const char* gRadarTexNames[] = {
|
|||
void
|
||||
CRadar::Initialise()
|
||||
{
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
TargetMarkerId = -1;
|
||||
#endif
|
||||
for (int i = 0; i < NUMRADARBLIPS; i++) {
|
||||
ms_RadarTrace[i].m_BlipIndex = 1;
|
||||
SetRadarMarkerState(i, false);
|
||||
|
@ -1170,7 +1411,43 @@ CRadar::LoadTextures()
|
|||
MapHereSprite5.SetTexture("radar_arrow_05");
|
||||
MapHereSprite6.SetTexture("radar_arrow_06");
|
||||
MapHereSprite7.SetTexture("radar_arrow_07");
|
||||
MapWayPoint.SetTexture("radar_player_target");
|
||||
//MapWayPoint.SetTexture("radar_player_target"); // lcs
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
WaypointSprite.SetTexture("radar_waypoint");
|
||||
if(!WaypointSprite.m_pTexture) {
|
||||
// create the texture if it's missing in TXD
|
||||
#define WAYPOINT_R (255)
|
||||
#define WAYPOINT_G (72)
|
||||
#define WAYPOINT_B (77)
|
||||
|
||||
RwRaster *raster = RwRasterCreate(16, 16, 0, rwRASTERTYPETEXTURE | rwRASTERFORMAT8888);
|
||||
|
||||
RwUInt32 *pixels = (RwUInt32 *)RwRasterLock(raster, 0, rwRASTERLOCKWRITE);
|
||||
for(int x = 0; x < 16; x++)
|
||||
for(int y = 0; y < 16; y++) {
|
||||
int x2 = x < 8 ? x : 7 - (x & 7);
|
||||
int y2 = y < 8 ? y : 7 - (y & 7);
|
||||
if((y2 >= 4 && x2 >= 4) // square in the center is transparent
|
||||
|| (x2 < 2 && y2 == 0) // two pixels on each side of first/last line are transparent
|
||||
|| (x2 < 1 && y2 == 1)) // one pixel on each side of second to first/last line is transparent
|
||||
pixels[x + y * 16] = 0;
|
||||
else if((x2 == 2 && y2 >= 2) || (y2 == 2 && x2 >= 2)) // colored square inside
|
||||
#ifdef RW_GL3
|
||||
pixels[x + y * 16] = WAYPOINT_R | (WAYPOINT_G << 8) | (WAYPOINT_B << 16) | (255 << 24);
|
||||
#else
|
||||
pixels[x + y * 16] = WAYPOINT_B | (WAYPOINT_G << 8) | (WAYPOINT_R << 16) | (255 << 24);
|
||||
#endif
|
||||
else
|
||||
pixels[x + y * 16] = 0xFF000000; // black
|
||||
}
|
||||
RwRasterUnlock(raster);
|
||||
WaypointSprite.m_pTexture = RwTextureCreate(raster);
|
||||
RwTextureSetFilterMode(WaypointSprite.m_pTexture, rwFILTERLINEAR);
|
||||
#undef WAYPOINT_R
|
||||
#undef WAYPOINT_G
|
||||
#undef WAYPOINT_B
|
||||
}
|
||||
#endif
|
||||
CTxdStore::PopCurrentTxd();
|
||||
}
|
||||
|
||||
|
@ -1389,7 +1666,10 @@ void CRadar::Shutdown()
|
|||
MapHereSprite5.Delete();
|
||||
MapHereSprite6.Delete();
|
||||
MapHereSprite7.Delete();
|
||||
MapWayPoint.Delete();
|
||||
//MapWayPoint.Delete();
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
WaypointSprite.Delete();
|
||||
#endif
|
||||
/*RadioWildstyleSprite.Delete();
|
||||
RadioFlashSprite.Delete();
|
||||
RadioKChatSprite.Delete();
|
||||
|
@ -1509,6 +1789,7 @@ CRadar::InitFrontEndMap()
|
|||
ArrowBlipColour2 = CRGBA(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CRadar::DrawYouAreHereSprite(float x, float y)
|
||||
{
|
||||
|
@ -1554,6 +1835,7 @@ CRadar::DrawYouAreHereSprite(float x, float y)
|
|||
MapLegendList[MapLegendCounter++] = RADAR_SPRITE_MAP_HERE;
|
||||
}
|
||||
|
||||
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
void
|
||||
CRadar::ToggleTargetMarker(float x, float y)
|
||||
|
@ -1580,7 +1862,8 @@ CRadar::ToggleTargetMarker(float x, float y)
|
|||
ms_RadarTrace[nextBlip].m_nEntityHandle = 0;
|
||||
ms_RadarTrace[nextBlip].m_wScale = 5;
|
||||
ms_RadarTrace[nextBlip].m_eBlipDisplay = BLIP_DISPLAY_BLIP_ONLY;
|
||||
ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_NONE;
|
||||
//ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_NONE; // lcs
|
||||
ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_WAYPOINT;
|
||||
TargetMarkerId = CRadar::GetNewUniqueBlipIndex(nextBlip);
|
||||
} else {
|
||||
ClearBlip(TargetMarkerId);
|
||||
|
@ -1658,7 +1941,7 @@ CRadar::DrawEntityBlip(int32 blipId)
|
|||
}
|
||||
|
||||
void
|
||||
CRadar::DrawCoordBlip(int32 blipId)
|
||||
CRadar::DrawCoordBlip(int32 blipId) // map
|
||||
{
|
||||
CVector2D out;
|
||||
CVector2D in;
|
||||
|
@ -1758,10 +2041,10 @@ CRadar::DrawLegend(int32 x, int32 y, int32 sprite)
|
|||
text = TheText.Get("LG_35");
|
||||
break;
|
||||
case RADAR_SPRITE_MAP_HERE:
|
||||
text = TheText.Get("LG_01");
|
||||
text = TheText.Get("LG_02");
|
||||
break;
|
||||
case RADAR_SPRITE_AVERY:
|
||||
text = TheText.Get("LG_02");
|
||||
text = TheText.Get("LG_TODO");
|
||||
break;
|
||||
case RADAR_SPRITE_BIKER:
|
||||
text = TheText.Get("LG_03");
|
||||
|
@ -1868,8 +2151,17 @@ CRadar::DrawLegend(int32 x, int32 y, int32 sprite)
|
|||
case RADAR_SPRITE_RADIO_WAVE:
|
||||
text = TheText.Get("LG_34");
|
||||
break;*/
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
case RADAR_SPRITE_WAYPOINT:
|
||||
//text = TheText.Get("LG_38"); // 8ball
|
||||
text = TheText.Get("LG_50"); // destination
|
||||
//text = TheText.Get("LG_34"); // tmp hack wawe 103 radio station
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
text = TheText.Get("LG_34"); // tmp hack
|
||||
//text = TheText.Get("LG_34"); // tmp hack // lcs no waypoint error. other label
|
||||
text = TheText.Get("TEXT"); // tmp hack missing text mazahaka
|
||||
//text = nil;
|
||||
break;
|
||||
}
|
||||
CFont::PrintString(SCREEN_SCALE_X(20.f) + x, SCREEN_SCALE_Y(3.0f) + y, text);
|
||||
|
|
|
@ -25,14 +25,13 @@
|
|||
#define NUM_MAP_LEGENDS 75
|
||||
|
||||
#define MENU_MAP_LENGTH_UNIT 1190.0f // in game unit
|
||||
#define MENU_MAP_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f)
|
||||
#define MENU_MAP_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f)
|
||||
#define MENU_MAP_HEIGHT_SCALE 1.119f // in game unit (originally 1.118714268907563f)
|
||||
#define MENU_MAP_TOP_OFFSET 0.28f // in length unit defined above - ~333 game unit
|
||||
#define MENU_MAP_LEFT_OFFSET 0.185f // in length unit defined above - ~220 game unit
|
||||
#define MENU_MAP_TOP_OFFSET 0.28f // in length unit defined above - ~333 game unit
|
||||
#define MENU_MAP_LEFT_OFFSET 0.185f // in length unit defined above - ~220 game unit
|
||||
#define MENU_MAP_LENGTH (4000.f / MENU_MAP_LENGTH_UNIT)
|
||||
|
||||
enum eBlipType
|
||||
{
|
||||
enum eBlipType {
|
||||
BLIP_NONE,
|
||||
BLIP_CAR,
|
||||
BLIP_CHAR,
|
||||
|
@ -115,8 +114,9 @@ enum eRadarSprite
|
|||
RADAR_SPRITE_MAPHERE5,
|
||||
RADAR_SPRITE_MAPHERE6,
|
||||
RADAR_SPRITE_MAPHERE7,
|
||||
RADAR_SPRITE_MAPWAYPOINT,
|
||||
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
RADAR_SPRITE_WAYPOINT,
|
||||
#endif
|
||||
RADAR_SPRITE_COUNT
|
||||
};
|
||||
|
||||
|
@ -278,7 +278,7 @@ public:
|
|||
static CSprite2d MapHereSprite5;
|
||||
static CSprite2d MapHereSprite6;
|
||||
static CSprite2d MapHereSprite7;
|
||||
static CSprite2d MapWayPoint;
|
||||
//static CSprite2d MapWayPoint;
|
||||
static CSprite2d *RadarSprites[RADAR_SPRITE_COUNT];
|
||||
static float cachedCos;
|
||||
static float cachedSin;
|
||||
|
@ -288,6 +288,7 @@ public:
|
|||
static int16 MapLegendCounter;
|
||||
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
static CSprite2d WaypointSprite;
|
||||
static int TargetMarkerId;
|
||||
static CVector TargetMarkerPos;
|
||||
#endif
|
||||
|
|
|
@ -1315,31 +1315,31 @@ CStats::ConstructStatLine(int rowIdx)
|
|||
}
|
||||
}
|
||||
switch (mostListenedRadio) {
|
||||
case WILDSTYLE:
|
||||
case FLASH_FM:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM0"));
|
||||
break;
|
||||
case FLASH_FM:
|
||||
case V_ROCK:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM1"));
|
||||
break;
|
||||
case KCHAT:
|
||||
case PARADISE:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM2"));
|
||||
break;
|
||||
case FEVER:
|
||||
case VCPR:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM3"));
|
||||
break;
|
||||
case V_ROCK:
|
||||
case VCFL:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM4"));
|
||||
break;
|
||||
case VCPR:
|
||||
case WAVE:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM5"));
|
||||
break;
|
||||
case RADIO_ESPANTOSO:
|
||||
case FRESH:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM6"));
|
||||
break;
|
||||
case EMOTION:
|
||||
case ESPANTOSO:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM7"));
|
||||
break;
|
||||
case WAVE:
|
||||
case EMOTION:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM8"));
|
||||
break;
|
||||
case USERTRACK:
|
||||
|
@ -1370,31 +1370,31 @@ CStats::ConstructStatLine(int rowIdx)
|
|||
#endif
|
||||
|
||||
switch (leastListenedRadio) {
|
||||
case WILDSTYLE:
|
||||
case FLASH_FM:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM0"));
|
||||
break;
|
||||
case FLASH_FM:
|
||||
case V_ROCK:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM1"));
|
||||
break;
|
||||
case KCHAT:
|
||||
case PARADISE:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM2"));
|
||||
break;
|
||||
case FEVER:
|
||||
case VCPR:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM3"));
|
||||
break;
|
||||
case V_ROCK:
|
||||
case VCFL:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM4"));
|
||||
break;
|
||||
case VCPR:
|
||||
case WAVE:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM5"));
|
||||
break;
|
||||
case RADIO_ESPANTOSO:
|
||||
case FRESH:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM6"));
|
||||
break;
|
||||
case EMOTION:
|
||||
case ESPANTOSO:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM7"));
|
||||
break;
|
||||
case WAVE:
|
||||
case EMOTION:
|
||||
TEXT_ON_RIGHT(TheText.Get("FEA_FM8"));
|
||||
break;
|
||||
case USERTRACK:
|
||||
|
|
|
@ -77,6 +77,7 @@ size_t CStreaming::ms_memoryAvailable;
|
|||
|
||||
int32 desiredNumVehiclesLoaded = 12;
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
CEntity *pIslandLODindustEntity;
|
||||
CEntity *pIslandLODcomIndEntity;
|
||||
CEntity *pIslandLODcomSubEntity;
|
||||
|
@ -87,6 +88,12 @@ int32 islandLODcomInd;
|
|||
int32 islandLODcomSub;
|
||||
int32 islandLODsubInd;
|
||||
int32 islandLODsubCom;
|
||||
#else
|
||||
CEntity *pIslandLODmainlandEntity;
|
||||
CEntity *pIslandLODbeachEntity;
|
||||
int32 islandLODmainland;
|
||||
int32 islandLODbeach;
|
||||
#endif
|
||||
|
||||
#ifndef MASTER
|
||||
bool gbPrintStats;
|
||||
|
@ -249,6 +256,7 @@ CStreaming::Init2(void)
|
|||
|
||||
// find island LODs
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
pIslandLODindustEntity = nil;
|
||||
pIslandLODcomIndEntity = nil;
|
||||
pIslandLODcomSubEntity = nil;
|
||||
|
@ -264,6 +272,14 @@ CStreaming::Init2(void)
|
|||
CModelInfo::GetModelInfo("IslandLODcomSUB", &islandLODcomSub);
|
||||
CModelInfo::GetModelInfo("IslandLODsubIND", &islandLODsubInd);
|
||||
CModelInfo::GetModelInfo("IslandLODsubCOM", &islandLODsubCom);
|
||||
#else
|
||||
pIslandLODmainlandEntity = nil;
|
||||
pIslandLODbeachEntity = nil;
|
||||
islandLODmainland = -1;
|
||||
islandLODbeach = -1;
|
||||
CModelInfo::GetModelInfo("IslandLODmainland", &islandLODmainland);
|
||||
CModelInfo::GetModelInfo("IslandLODbeach", &islandLODbeach);
|
||||
#endif
|
||||
|
||||
#ifndef MASTER
|
||||
VarConsole.Add("Streaming Debug", &gbPrintStats, true);
|
||||
|
@ -770,6 +786,7 @@ CStreaming::FinishLoadingLargeFile(int8 *buf, int32 streamId)
|
|||
return true;
|
||||
}
|
||||
|
||||
__declspec(noinline)
|
||||
void
|
||||
CStreaming::RequestModel(int32 id, int32 flags)
|
||||
{
|
||||
|
@ -807,6 +824,11 @@ CStreaming::RequestModel(int32 id, int32 flags)
|
|||
if(ms_aInfoForModel[id].m_loadState == STREAMSTATE_NOTLOADED){
|
||||
if(id < STREAM_OFFSET_TXD){
|
||||
mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(id);
|
||||
assert(mi);
|
||||
if(!mi) {
|
||||
debug("%d", id);
|
||||
mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(id);
|
||||
}
|
||||
RequestTxd(mi->GetTxdSlot(), flags);
|
||||
int anim = mi->GetAnimFileIndex();
|
||||
if(anim != -1)
|
||||
|
@ -930,6 +952,7 @@ CStreaming::InstanceLoadedModels(const CVector &pos)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
void
|
||||
CStreaming::RequestIslands(eLevelName level)
|
||||
{
|
||||
|
@ -950,6 +973,24 @@ CStreaming::RequestIslands(eLevelName level)
|
|||
default: break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void
|
||||
CStreaming::RequestIslands(eLevelName level)
|
||||
{
|
||||
ISLAND_LOADING_ISNT(HIGH)
|
||||
switch(level){
|
||||
case LEVEL_MAINLAND:
|
||||
if(islandLODbeach != -1)
|
||||
RequestModel(islandLODbeach, BIGBUILDINGFLAGS);
|
||||
break;
|
||||
case LEVEL_BEACH:
|
||||
if(islandLODmainland != -1)
|
||||
RequestModel(islandLODmainland, BIGBUILDINGFLAGS);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *csPlayerNames[] =
|
||||
{
|
||||
|
@ -1003,7 +1044,8 @@ CStreaming::RequestSpecialModel(int32 modelId, const char *modelName, int32 flag
|
|||
int i, n;
|
||||
|
||||
mi = CModelInfo::GetModelInfo(modelId);
|
||||
if (CKeyGen::GetUppercaseKey(modelName) == CKeyGen::GetUppercaseKey("cstoni_a")) {
|
||||
if (CKeyGen::GetUppercaseKey(modelName) == CKeyGen::GetUppercaseKey("cstoni_a")) // vcs csplr?
|
||||
{
|
||||
i = 0;
|
||||
while (csPlayerNames[i][0] != '\0') {
|
||||
if (CModelInfo::GetModelInfo(0)->GetNameHashKey() == CKeyGen::GetUppercaseKey(playerNames[i])) {
|
||||
|
@ -1151,6 +1193,7 @@ CStreaming::RemoveModel(int32 id)
|
|||
ms_aInfoForModel[id].m_loadState = STREAMSTATE_NOTLOADED;
|
||||
}
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
void
|
||||
CStreaming::RemoveUnusedBuildings(eLevelName level)
|
||||
{
|
||||
|
@ -1158,6 +1201,16 @@ CStreaming::RemoveUnusedBuildings(eLevelName level)
|
|||
if(level != i)
|
||||
RemoveBuildings((eLevelName)i);
|
||||
}
|
||||
#else
|
||||
void
|
||||
CStreaming::RemoveUnusedBuildings(eLevelName level)
|
||||
{
|
||||
if(level != LEVEL_BEACH)
|
||||
RemoveBuildings(LEVEL_BEACH);
|
||||
if(level != LEVEL_MAINLAND)
|
||||
RemoveBuildings(LEVEL_MAINLAND);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
CStreaming::RemoveBuildings(eLevelName level)
|
||||
|
@ -1274,6 +1327,7 @@ CStreaming::RemoveBuildingsNotInArea(int32 area)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
void
|
||||
CStreaming::RemoveUnusedBigBuildings(eLevelName level)
|
||||
{
|
||||
|
@ -1285,6 +1339,20 @@ CStreaming::RemoveUnusedBigBuildings(eLevelName level)
|
|||
}
|
||||
RemoveIslandsNotUsed(level);
|
||||
}
|
||||
#else
|
||||
void
|
||||
CStreaming::RemoveUnusedBigBuildings(eLevelName level)
|
||||
{
|
||||
ISLAND_LOADING_IS(LOW)
|
||||
{
|
||||
if(level != LEVEL_BEACH)
|
||||
RemoveBigBuildings(LEVEL_BEACH);
|
||||
if(level != LEVEL_MAINLAND)
|
||||
RemoveBigBuildings(LEVEL_MAINLAND);
|
||||
}
|
||||
RemoveIslandsNotUsed(level);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
DeleteIsland(CEntity *island)
|
||||
|
@ -1299,6 +1367,7 @@ DeleteIsland(CEntity *island)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef MAZAHAKA_MAPZONE_VC
|
||||
void
|
||||
CStreaming::RemoveIslandsNotUsed(eLevelName level)
|
||||
{
|
||||
|
@ -1353,6 +1422,38 @@ CStreaming::RemoveIslandsNotUsed(eLevelName level)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void
|
||||
CStreaming::RemoveIslandsNotUsed(eLevelName level)
|
||||
{
|
||||
int i;
|
||||
if(pIslandLODmainlandEntity == nil)
|
||||
for(i = CPools::GetBuildingPool()->GetSize()-1; i >= 0; i--){
|
||||
CBuilding *building = CPools::GetBuildingPool()->GetSlot(i);
|
||||
if(building == nil)
|
||||
continue;
|
||||
if(building->GetModelIndex() == islandLODmainland)
|
||||
pIslandLODmainlandEntity = building;
|
||||
if(building->GetModelIndex() == islandLODbeach)
|
||||
pIslandLODbeachEntity = building;
|
||||
}
|
||||
#ifdef NO_ISLAND_LOADING
|
||||
if(FrontEndMenuManager.m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_HIGH) {
|
||||
DeleteIsland(pIslandLODmainlandEntity);
|
||||
DeleteIsland(pIslandLODbeachEntity);
|
||||
} else
|
||||
#endif
|
||||
switch(level){
|
||||
case LEVEL_MAINLAND:
|
||||
DeleteIsland(pIslandLODmainlandEntity);
|
||||
break;
|
||||
case LEVEL_BEACH:
|
||||
DeleteIsland(pIslandLODbeachEntity);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
CStreaming::RemoveBigBuildings(eLevelName level)
|
||||
|
@ -2053,7 +2154,7 @@ inline bool
|
|||
ModelNotLoaded(int32 modelId)
|
||||
{
|
||||
CStreamingInfo *si = &CStreaming::ms_aInfoForModel[modelId];
|
||||
return si->m_loadState != STREAMSTATE_LOADED && si->m_loadState != STREAMSTATE_READING;
|
||||
return !si || (si->m_loadState != STREAMSTATE_LOADED && si->m_loadState != STREAMSTATE_READING); // mazahaka vcs
|
||||
}
|
||||
|
||||
inline bool TxdNotLoaded(int32 txdId) { return ModelNotLoaded(txdId + STREAM_OFFSET_TXD); }
|
||||
|
|
|
@ -235,8 +235,8 @@ public:
|
|||
};
|
||||
|
||||
// LCS(TODO): put them into CStreaming::mspInst
|
||||
extern int32 islandLODindust;
|
||||
extern int32 islandLODcomInd;
|
||||
extern int32 islandLODcomSub;
|
||||
extern int32 islandLODsubInd;
|
||||
extern int32 islandLODsubCom;
|
||||
//extern int32 islandLODindust;
|
||||
//extern int32 islandLODcomInd;
|
||||
//extern int32 islandLODcomSub;
|
||||
//extern int32 islandLODsubInd;
|
||||
//extern int32 islandLODsubCom;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "Shadows.h"
|
||||
#include "TempColModels.h"
|
||||
#include "WaterLevel.h"
|
||||
#include "FerrisWheel.h"
|
||||
#include "World.h"
|
||||
|
||||
#define OBJECT_REPOSITION_OFFSET_Z 2.0f
|
||||
|
@ -1747,6 +1748,7 @@ CWorld::ShutDown(void)
|
|||
void
|
||||
CWorld::ClearForRestart(void)
|
||||
{
|
||||
CFerrisWheel::Shutdown(); // vcs
|
||||
if(CCutsceneMgr::HasLoaded()) CCutsceneMgr::DeleteCutsceneData();
|
||||
CProjectileInfo::RemoveAllProjectiles();
|
||||
CObject::DeleteAllTempObjects();
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
/* Sectors span from -2000 to 2000 in x and y.
|
||||
* With 100x100 sectors, each is 40x40 units. */
|
||||
|
||||
#define SECTOR_SIZE_X (40.0f)
|
||||
// lcs
|
||||
/*#define SECTOR_SIZE_X (40.0f)
|
||||
#define SECTOR_SIZE_Y (40.0f)
|
||||
|
||||
#define NUMSECTORS_X (100)
|
||||
|
@ -23,6 +23,44 @@
|
|||
#define WORLD_MAX_X (WORLD_MIN_X + WORLD_SIZE_X)
|
||||
#define WORLD_MAX_Y (WORLD_MIN_Y + WORLD_SIZE_Y)
|
||||
|
||||
#define MAP_Z_LOW_LIMIT -100.0f*/
|
||||
|
||||
// revc
|
||||
//#define SECTOR_SIZE_X (50.0f)
|
||||
//#define SECTOR_SIZE_Y (50.0f)
|
||||
//
|
||||
//#define NUMSECTORS_X (80)
|
||||
//#define NUMSECTORS_Y (80)
|
||||
//
|
||||
//#define WORLD_SIZE_X (NUMSECTORS_X * SECTOR_SIZE_X)
|
||||
//#define WORLD_SIZE_Y (NUMSECTORS_Y * SECTOR_SIZE_Y)
|
||||
//
|
||||
//#define WORLD_MIN_X (-2400.0f)
|
||||
//#define WORLD_MIN_Y (-2000.0f)
|
||||
//
|
||||
//#define WORLD_MAX_X (WORLD_MIN_X + WORLD_SIZE_X)
|
||||
//#define WORLD_MAX_Y (WORLD_MIN_Y + WORLD_SIZE_Y)
|
||||
//
|
||||
//#define MAP_Z_LOW_LIMIT -100.0f
|
||||
|
||||
|
||||
//__int64 __fastcall CWorld::ProcessLineOfSight 0x1908C0
|
||||
// custom reVCS
|
||||
#define SECTOR_SIZE_X (50.0f)
|
||||
#define SECTOR_SIZE_Y (50.0f)
|
||||
|
||||
#define NUMSECTORS_X (80)
|
||||
#define NUMSECTORS_Y (80)
|
||||
|
||||
#define WORLD_SIZE_X (NUMSECTORS_X * SECTOR_SIZE_X)
|
||||
#define WORLD_SIZE_Y (NUMSECTORS_Y * SECTOR_SIZE_Y)
|
||||
|
||||
#define WORLD_MIN_X (-2400.0f)
|
||||
#define WORLD_MIN_Y (-2000.0f)
|
||||
|
||||
#define WORLD_MAX_X (WORLD_MIN_X + WORLD_SIZE_X)
|
||||
#define WORLD_MAX_Y (WORLD_MIN_Y + WORLD_SIZE_Y)
|
||||
|
||||
#define MAP_Z_LOW_LIMIT -100.0f
|
||||
|
||||
enum
|
||||
|
|
|
@ -360,30 +360,40 @@ CTheZones::FindSmallestNavigationZoneForPosition(const CVector *v, bool findDefa
|
|||
return best;
|
||||
}
|
||||
|
||||
//#pragma optimize("", off)
|
||||
int16
|
||||
CTheZones::FindZoneByLabelAndReturnIndex(char *name, eZoneType type)
|
||||
{
|
||||
char str[8];
|
||||
char str[8]; // not used
|
||||
memset(str, 0, 8);
|
||||
strncpy(str, name, 8);
|
||||
switch(type){
|
||||
case ZONE_DEFAULT:
|
||||
case ZONE_NAVIG:
|
||||
for(FindIndex = 0; FindIndex < TotalNumberOfNavigationZones; FindIndex++)
|
||||
{
|
||||
// debug("zone dbg: %s\n", GetNavigationZone(FindIndex)->name);
|
||||
if(strcmp(GetNavigationZone(FindIndex)->name, name) == 0)
|
||||
return FindIndex;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZONE_INFO:
|
||||
for(FindIndex = 0; FindIndex < TotalNumberOfInfoZones; FindIndex++)
|
||||
{
|
||||
//debug("zone dbg: %s\n", GetInfoZone(FindIndex)->name);
|
||||
if(strcmp(GetInfoZone(FindIndex)->name, name) == 0)
|
||||
return FindIndex;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZONE_MAPZONE:
|
||||
for(FindIndex = 0; FindIndex < TotalNumberOfMapZones; FindIndex++)
|
||||
{
|
||||
//debug("zone dbg: %s\n", GetMapZone(FindIndex)->name);
|
||||
if(strcmp(GetMapZone(FindIndex)->name, name) == 0)
|
||||
return FindIndex;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
|
|
|
@ -1,5 +1,39 @@
|
|||
#pragma once
|
||||
|
||||
#define MAZAHAKA_DEBUG
|
||||
#define MAZAHAKA_FIX_BACKGROUND_APP_NO_HOLD_MOUSE // alt + tab // or on bg change activate menu
|
||||
|
||||
//#define TRANSPARENT_MENU // MAZAHAKA // todo fade black
|
||||
#ifdef TRANSPARENT_MENU
|
||||
#define TRANSPARENT_MENU_HUD_RENDER // ++ MAZAHAKA
|
||||
#endif
|
||||
|
||||
#define DISABLE_CONVERT_TXD_IMG
|
||||
#define MAZAHAKA_PLUGIN_CODE
|
||||
#define MAZAHAKA_MISC // carspawn normal,
|
||||
//#define MAZAHAKA_ANIM_STUFF // for test
|
||||
#define MAZAHAKA_STATS_COLOR_FIX
|
||||
#define MAZAHAKA_DEBUG_CUSTOM_VALS
|
||||
//#define MAZAHAKA_DEBUG_NOFILE // userfiles/SCRDBG.LOG
|
||||
#define MAZAHAKA_TRY_SFX_FIX
|
||||
#define MAZAHAKA_TRY_FIX_AUTOCHANGE_WEAPON_SLOT_IF_ZERO_AMMO // camera bug, silent photo at last capture autofire next weapon and mission failed
|
||||
#define MAZAHAKA_8_IN_LOCAL_VARS_SCRIPTS_ASSERT_STUFF
|
||||
#define MAZAHAKA_TMP_FIX_MAIN_SCM_ERRORS_IN_CODE
|
||||
|
||||
#define MAZAHAKA_INCREASE_CONFIG_2_IMG // äë˙ 2ő img
|
||||
#define MAZAHAKA_MAPZONE_VC // todo !!Streaming re3 revc / relcs need for move relcs to revcs tmp!
|
||||
//#define MAZAHAKA_DISABLE_CARPEDGEN
|
||||
|
||||
// disable path dir
|
||||
//#define FLIGHT_PATH
|
||||
//#define GTA_TRAIN
|
||||
//#define GTA_BRIDGE
|
||||
//#define GTA_FERRY // mazahaka
|
||||
|
||||
//#define MAZAHAKA_HUD_ZERO_MONEY_FIX // ? todo
|
||||
|
||||
|
||||
|
||||
// disables (most) stuff that wasn't in original gta-vc.exe
|
||||
#ifdef __MWERKS__
|
||||
#define VANILLA_DEFINES
|
||||
|
@ -9,21 +43,39 @@ enum Config {
|
|||
NUMPLAYERS = 1,
|
||||
|
||||
NUMCDIMAGES = 6, // gta3.img duplicates (not used on PC)
|
||||
#ifdef MAZAHAKA_INCREASE_CONFIG_2_IMG
|
||||
MAX_CDIMAGES = 8*3, // additional cdimages
|
||||
#else
|
||||
MAX_CDIMAGES = 8, // additional cdimages
|
||||
#endif
|
||||
MAX_CDCHANNELS = 5,
|
||||
|
||||
#ifdef MAZAHAKA_INCREASE_CONFIG_2_IMG
|
||||
MODELINFOSIZE = 4900*7,
|
||||
TXDSTORESIZE = 1200*3,
|
||||
COLSTORESIZE = 15*10,
|
||||
EXTRADIRSIZE = 256*30,
|
||||
CUTSCENEDIRSIZE = 512*10,
|
||||
SIMPLEMODELSIZE = 3885*3,
|
||||
#else
|
||||
MODELINFOSIZE = 4900,
|
||||
TXDSTORESIZE = 1200,
|
||||
COLSTORESIZE = 15,
|
||||
EXTRADIRSIZE = 256,
|
||||
CUTSCENEDIRSIZE = 512,
|
||||
|
||||
SIMPLEMODELSIZE = 3885,
|
||||
#endif
|
||||
|
||||
|
||||
TIMEMODELSIZE = 385,
|
||||
CLUMPMODELSIZE = 10,
|
||||
WEAPONMODELSIZE = 37,
|
||||
PEDMODELSIZE = 130,
|
||||
#ifdef MAZAHAKA_INCREASE_CONFIG_2_IMG
|
||||
VEHICLEMODELSIZE = 110*3,
|
||||
#else
|
||||
VEHICLEMODELSIZE = 110,
|
||||
#endif
|
||||
TWODFXSIZE = 1210,
|
||||
|
||||
MAXVEHICLESLOADED = 50, // 70 on mobile
|
||||
|
@ -31,16 +83,29 @@ enum Config {
|
|||
NUMOBJECTINFO = 210,
|
||||
|
||||
// Pool sizes
|
||||
#ifdef MAZAHAKA_INCREASE_CONFIG_2_IMG
|
||||
NUMPTRNODES = 50000*7, // only 30100
|
||||
NUMENTRYINFOS = 4000*4,
|
||||
#else
|
||||
NUMPTRNODES = 50000, // only 30100
|
||||
NUMENTRYINFOS = 4000,
|
||||
#endif
|
||||
NUMPEDS = 140, // only 70
|
||||
NUMVEHICLES = 110, // only 70
|
||||
#ifdef MAZAHAKA_INCREASE_CONFIG_2_IMG
|
||||
NUMBUILDINGS = 7000*3, // only 6757
|
||||
#else
|
||||
NUMBUILDINGS = 7000, // only 6757
|
||||
#endif
|
||||
NUMTREADABLES = 1300,
|
||||
NUMOBJECTS = 475,
|
||||
NUMDUMMIES = 3000,
|
||||
NUMAUDIOSCRIPTOBJECTS = 192,
|
||||
#ifdef MAZAHAKA_INCREASE_CONFIG_2_IMG
|
||||
NUMCOLMODELS = 4400*5,
|
||||
#else
|
||||
NUMCOLMODELS = 4400,
|
||||
#endif
|
||||
NUMCUTSCENEOBJECTS = 50, // not a pool in VC
|
||||
|
||||
NUMANIMBLOCKS = 60,
|
||||
|
@ -156,9 +221,6 @@ enum Config {
|
|||
//#define GTA_PS2
|
||||
//#define GTA_XBOX
|
||||
|
||||
#define GTA_TRAIN
|
||||
#define GTA_BRIDGE
|
||||
|
||||
// Version defines
|
||||
#define GTAVC_PS2 400
|
||||
#define GTAVC_PC_10 410
|
||||
|
@ -189,7 +251,7 @@ enum Config {
|
|||
# ifndef GTA_HANDHELD
|
||||
# define PC_PLAYER_CONTROLS // mouse player/cam mode
|
||||
# endif
|
||||
//# define GTA_REPLAY
|
||||
# define GTA_REPLAY
|
||||
# define GTA_SCENE_EDIT
|
||||
# define PC_MENU
|
||||
# define PC_WATER
|
||||
|
@ -288,7 +350,7 @@ enum Config {
|
|||
#endif
|
||||
|
||||
#define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds.
|
||||
//#define MORE_LANGUAGES // Add more translations to the game
|
||||
//#define MORE_LANGUAGES // Add more translations to the game //-------------------------------------------------------------
|
||||
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms
|
||||
//#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES
|
||||
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
|
||||
|
@ -318,7 +380,11 @@ enum Config {
|
|||
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios
|
||||
#define PROPER_SCALING // use original DEFAULT_SCREEN_WIDTH/DEFAULT_SCREEN_HEIGHT from PS2 instead of PC(R* changed HEIGHT here to make radar look better, but broke other hud elements aspect ratio).
|
||||
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
|
||||
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||
|
||||
#ifndef DISABLE_CONVERT_TXD_IMG
|
||||
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||
#endif
|
||||
|
||||
#define PS2_ALPHA_TEST // emulate ps2 alpha test
|
||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||
|
@ -408,9 +474,17 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
|||
//#define SIMPLER_MISSIONS // apply simplifications from mobile
|
||||
//#define USE_MISSION_REPLAY_OVERRIDE_FOR_NON_MOBILE_SCRIPT
|
||||
#endif
|
||||
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT // mazahaka tmp disabled. error ScriptDebug 1741 localvar index < size
|
||||
#define SCRIPT_LOG_FILE_LEVEL 1 // 0 == no log, 1 == overwrite every frame, 2 == full log
|
||||
|
||||
#if(defined MAZAHAKA_DEBUG_NOFILE && defined USE_ADVANCED_SCRIPT_DEBUG_OUTPUT)
|
||||
#undef SCRIPT_LOG_FILE_LEVEL
|
||||
#define SCRIPT_LOG_FILE_LEVEL 2
|
||||
#else
|
||||
//#undef SCRIPT_LOG_FILE_LEVEL
|
||||
//#define SCRIPT_LOG_FILE_LEVEL 0
|
||||
#endif
|
||||
|
||||
#if SCRIPT_LOG_FILE_LEVEL == 0
|
||||
#undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
#endif
|
||||
|
|
|
@ -75,9 +75,17 @@
|
|||
#include "custompipes.h"
|
||||
#include "screendroplets.h"
|
||||
#include "VarConsole.h"
|
||||
#include "Radar.h"
|
||||
#ifdef USE_OUR_VERSIONING
|
||||
#include "GitSHA1.h"
|
||||
#endif
|
||||
#ifdef MAZAHAKA_FIX_BACKGROUND_APP_NO_HOLD_MOUSE
|
||||
#include "win.h" // IsForegroundApp() not work correct
|
||||
//#include "../../utils/Utils.h"
|
||||
#ifdef MAZAHAKA_FIX_BACKGROUND_APP_NO_HOLD_MOUSE_ALLOW_KEY_NO_HOLD
|
||||
#include "Windows.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
GlobalScene Scene;
|
||||
|
||||
|
@ -118,7 +126,8 @@ RwRGBA gColourTop;
|
|||
bool gameAlreadyInitialised;
|
||||
|
||||
float NumberOfChunksLoaded;
|
||||
#define TOTALNUMCHUNKS 52.0f
|
||||
//#define TOTALNUMCHUNKS 52.0f // lcs
|
||||
#define TOTALNUMCHUNKS 78.0f
|
||||
|
||||
bool g_SlowMode = false;
|
||||
char version_name[64];
|
||||
|
@ -887,6 +896,7 @@ tZonePrint ZonePrint[] =
|
|||
{ "WASHINBTM", "AC", CRect(-255.0f, -1200.0f, 500.0f, -1690.0f)}
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
PrintMemoryUsage(void)
|
||||
{
|
||||
|
@ -1068,13 +1078,23 @@ return;
|
|||
void
|
||||
DisplayGameDebugText()
|
||||
{
|
||||
static bool bDisplayCheatStr = false; // custom
|
||||
static bool bDisplayCheatStr = false;
|
||||
static bool bDisplayPosn = false;
|
||||
static bool bDisplayRate = false;
|
||||
|
||||
// mazahaka
|
||||
static bool bDisplayMapPosn = false;
|
||||
static bool bDisplayCamPosn = false;
|
||||
|
||||
#ifndef FINAL
|
||||
{
|
||||
SETTWEAKPATH("Debug");
|
||||
TWEAKBOOL(bDisplayPosn);
|
||||
TWEAKBOOL(bDisplayCheatStr);
|
||||
TWEAKBOOL(bDisplayPosn);
|
||||
TWEAKBOOL(bDisplayRate);
|
||||
___tw___TWEAKPATH = "MaZaHaKa";
|
||||
TWEAKBOOL(bDisplayMapPosn);
|
||||
TWEAKBOOL(bDisplayCamPosn);
|
||||
}
|
||||
|
||||
if(gbPrintMemoryUsage)
|
||||
|
@ -1124,25 +1144,43 @@ DisplayGameDebugText()
|
|||
#if defined _DEBUG || defined DEBUG
|
||||
"DEBUG "
|
||||
#endif
|
||||
"%.8s",
|
||||
g_GIT_SHA1);
|
||||
////"%.8s",
|
||||
//"%.40s",
|
||||
//g_GIT_SHA1
|
||||
"BY MaZaHaKa"
|
||||
);
|
||||
AsciiToUnicode(verA, ver);
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.7f));
|
||||
|
||||
//CFont::SetScale(SCREEN_SCALE_X(0.3f), SCREEN_SCALE_Y(0.3f));
|
||||
////CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.7f));
|
||||
#else
|
||||
AsciiToUnicode(version_name, ver);
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
|
||||
AsciiToUnicode(version_name, ver);
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
|
||||
#endif
|
||||
|
||||
CFont::SetPropOn();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
//CFont::SetFontStyle(FONT_STANDARD);
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
CFont::SetCentreOff();
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::SetWrapx(SCREEN_WIDTH);
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_X(10.0f + 2.0f), SCREEN_SCALE_Y(10.0f + 2.0f), ver); // òåíü
|
||||
|
||||
//CFont::SetColor(CRGBA(255, 108, 0, 255)); // orig lcs
|
||||
//CFont::SetColor(CRGBA(255, 108, 0, 255)); // orig orange
|
||||
CFont::SetColor(CRGBA(39, 152, 7, 255)); // green
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_X(10.0f), SCREEN_SCALE_Y(10.0f), ver);
|
||||
#else
|
||||
CFont::PrintString(10.0f, 10.0f, ver);
|
||||
#endif
|
||||
}
|
||||
#endif // #ifdef DRAW_GAME_VERSION_TEXT
|
||||
|
||||
|
@ -1164,11 +1202,11 @@ DisplayGameDebugText()
|
|||
FrameSamples = 0;
|
||||
}
|
||||
|
||||
if ( bDisplayPosn )
|
||||
if(bDisplayPosn || bDisplayRate || bDisplayMapPosn || bDisplayCamPosn)
|
||||
{
|
||||
CVector pos = FindPlayerCoors();
|
||||
int32 ZoneId = ARRAY_SIZE(ZonePrint)-1; // no zone
|
||||
|
||||
|
||||
for ( int32 i = 0; i < ARRAY_SIZE(ZonePrint)-1; i++ )
|
||||
{
|
||||
if ( pos.x > ZonePrint[i].rect.left
|
||||
|
@ -1180,28 +1218,69 @@ DisplayGameDebugText()
|
|||
}
|
||||
}
|
||||
|
||||
//NOTE: fps should be 30, but its 29 due to different fp2int conversion
|
||||
sprintf(str, "X:%4.0f Y:%4.0f Z:%4.0f F-%d %s-%s", pos.x, pos.y, pos.z, (int32)FramesPerSecond,
|
||||
ZonePrint[ZoneId].name, ZonePrint[ZoneId].area);
|
||||
// CUSTOM
|
||||
|
||||
// heading 0-360
|
||||
CPlayerPed *pPed = FindPlayerPed();
|
||||
float angle = pPed->bInVehicle ? pPed->m_pMyVehicle->GetForward().Heading() : pPed->GetForward().Heading();
|
||||
angle = RADTODEG(angle);
|
||||
angle = fmod(angle, 360.0f);
|
||||
if(angle < 0.0f) { angle += 360.0f; }
|
||||
//angle = CGeneral::LimitAngle(RADTODEG(angle));
|
||||
|
||||
// map coords
|
||||
if(bDisplayMapPosn) { pos = (CRadar::TargetMarkerId != -1) ? CRadar::TargetMarkerPos : CVector(0, 0, 0); }
|
||||
if(bDisplayCamPosn)
|
||||
{
|
||||
pos = CVector(TheCamera.GetPosition());
|
||||
//angle = TheCamera.SetHeading();
|
||||
angle = /*CGeneral::LimitAngle*/(RADTODEG(TheCamera.GetForward().Heading()));
|
||||
//angle = (RADTODEG(TheCamera.GetUp().Heading()));
|
||||
angle = fmod(angle, 360.0f);
|
||||
if(angle < 0.0f) { angle += 360.0f; }
|
||||
}
|
||||
//if(bDisplayCamPosn) { pos = CVector(TheCamera.GetGameCamPosition()); } // ?
|
||||
|
||||
//NOTE: fps should be 30, but its 29 due to different fp2int conversion
|
||||
if ( bDisplayRate )
|
||||
sprintf(str, "X:%5.1f, Y:%5.1f, Z:%5.1f, F-%d, %s", pos.x, pos.y, pos.z, (int32)FramesPerSecond, ZonePrint[ZoneId].name);
|
||||
else
|
||||
sprintf(str, "X:%5.1f, Y:%5.1f, Z:%5.1f, %d, %s", pos.x, pos.y, pos.z, (int)angle, ZonePrint[ZoneId].name);
|
||||
|
||||
|
||||
AsciiToUnicode(str, ustr);
|
||||
|
||||
CFont::SetPropOn();
|
||||
CFont::SetPropOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.6f), SCREEN_SCALE_Y(0.8f));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.7f), SCREEN_SCALE_Y(1.5f));
|
||||
#else
|
||||
CFont::SetScale(0.7f, 1.5f);
|
||||
#endif
|
||||
CFont::SetCentreOff();
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::SetDropShadowPosition(2);
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(41.0f, 41.0f, ustr);
|
||||
#else
|
||||
CFont::SetWrapx(DEFAULT_SCREEN_WIDTH);
|
||||
#endif
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
|
||||
CFont::SetColor(CRGBA(205, 205, 0, 255));
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_X(40.0f+2.0f), SCREEN_SCALE_Y(40.0f+2.0f), ustr);
|
||||
#else
|
||||
CFont::PrintString(40.0f+2.0f, 40.0f+2.0f, ustr);
|
||||
#endif
|
||||
|
||||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_X(40.0f), SCREEN_SCALE_Y(40.0f), ustr);
|
||||
#else
|
||||
CFont::PrintString(40.0f, 40.0f, ustr);
|
||||
#endif
|
||||
}
|
||||
|
||||
// custom
|
||||
|
@ -1219,10 +1298,14 @@ DisplayGameDebugText()
|
|||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f)+2.f, SCREEN_SCALE_FROM_BOTTOM(20.0f)+2.f, ustr);
|
||||
CFont::PrintString(SCREEN_SCALE_X(40.0f + 2.0f), SCREEN_SCALE_Y(40.0f + 2.0f), ustr);
|
||||
//CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f)+2.f, SCREEN_SCALE_FROM_BOTTOM(20.0f)+2.f, ustr);
|
||||
|
||||
CFont::SetColor(CRGBA(255, 150, 225, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f), SCREEN_SCALE_FROM_BOTTOM(20.0f), ustr);
|
||||
//CFont::SetColor(CRGBA(255, 150, 225, 255)); // revc
|
||||
CFont::SetColor(CRGBA(255, 108, 0, 255)); // re3
|
||||
|
||||
//CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f), SCREEN_SCALE_FROM_BOTTOM(20.0f), ustr);
|
||||
CFont::PrintString(SCREEN_SCALE_X(40.0f), SCREEN_SCALE_Y(40.0f), ustr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1374,6 +1457,13 @@ RenderScene(void)
|
|||
POP_RENDERGROUP();
|
||||
}
|
||||
|
||||
#ifdef TRANSPARENT_MENU // ||
|
||||
#ifdef TRANSPARENT_MENU_HUD_RENDER
|
||||
void RenderDebugShit(void);
|
||||
void HKMenuRenderDebugShit(void) { if(!FrontEndMenuManager.m_bMenuActive) { RenderDebugShit(); } }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
RenderDebugShit(void)
|
||||
{
|
||||
|
@ -1418,6 +1508,13 @@ RenderEffects(void)
|
|||
POP_RENDERGROUP();
|
||||
}
|
||||
|
||||
#ifdef TRANSPARENT_MENU // ||
|
||||
#ifdef TRANSPARENT_MENU_HUD_RENDER
|
||||
void Render2dStuff(void);
|
||||
void HKMenuRender2dStuff(void) { if (!FrontEndMenuManager.m_bMenuActive) { Render2dStuff(); } }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
Render2dStuff(void)
|
||||
{
|
||||
|
@ -1568,14 +1665,40 @@ Idle(void *arg)
|
|||
|
||||
PUSH_MEMID(MEMID_RENDER);
|
||||
|
||||
#ifdef TRANSPARENT_MENU
|
||||
bool FrontEndMenuManager_m_bRenderGameInMenu = true; // or if !render render = 1
|
||||
if((!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager_m_bRenderGameInMenu) && TheCamera.GetScreenFadeStatus() != FADE_2)
|
||||
#else
|
||||
if(!FrontEndMenuManager.m_bMenuActive && TheCamera.GetScreenFadeStatus() != FADE_2)
|
||||
#endif
|
||||
{
|
||||
// This is from SA, but it's nice for windowed mode
|
||||
#if defined(GTA_PC) && !defined(RW_GL3)
|
||||
RwV2d pos;
|
||||
pos.x = SCREEN_WIDTH / 2.0f;
|
||||
pos.y = SCREEN_HEIGHT / 2.0f;
|
||||
RsMouseSetPos(&pos);
|
||||
#if defined(GTA_PC) && !defined(RW_GL3) && defined(FIX_BUGS)
|
||||
// This is from SA, but it's nice for windowed mode [MAZAHAKA: NO!]
|
||||
//if(!FrontEndMenuManager.m_bRenderGameInMenu)
|
||||
|
||||
#ifdef MAZAHAKA_FIX_BACKGROUND_APP_NO_HOLD_MOUSE
|
||||
//printf("fore: %d\n", IsForegroundApp()); // LOL print 1 at alt tab
|
||||
//if((!FrontEndMenuManager.GetIsMenuActive()) && IsForegroundApp()) // IsForegroundApp 1
|
||||
//if(!FrontEndMenuManager.GetIsMenuActive()) // default
|
||||
//HWND window = ((psGlobalType *)(RsGlobal.ps))->window; //PSGLOBAL(window)
|
||||
#ifdef MAZAHAKA_FIX_BACKGROUND_APP_NO_HOLD_MOUSE_ALLOW_KEY_NO_HOLD
|
||||
bool bIsPressingUnHoldKey = (GetAsyncKeyState(VK_F4) & 0x8000);
|
||||
#endif
|
||||
if((!FrontEndMenuManager.GetIsMenuActive())
|
||||
&& CheckWindowStateIsOpenedMaZaHaKa()
|
||||
#ifdef MAZAHAKA_FIX_BACKGROUND_APP_NO_HOLD_MOUSE_ALLOW_KEY_NO_HOLD
|
||||
&& (!bIsPressingUnHoldKey)
|
||||
#endif
|
||||
)
|
||||
#else
|
||||
if(!FrontEndMenuManager.GetIsMenuActive())
|
||||
#endif
|
||||
{ // ++ mazahaka fix
|
||||
RwV2d pos;
|
||||
pos.x = SCREEN_WIDTH / 2.0f;
|
||||
pos.y = SCREEN_HEIGHT / 2.0f;
|
||||
RsMouseSetPos(&pos); // íå äà¸ò êóðñîð íà äðóãîé ìîíèòîð
|
||||
}
|
||||
#endif
|
||||
|
||||
tbStartTimer(0, "CnstrRenderList");
|
||||
|
@ -1584,7 +1707,19 @@ Idle(void *arg)
|
|||
#endif
|
||||
CWorld::AdvanceCurrentScanCode();
|
||||
CRenderer::ClearForFrame();
|
||||
|
||||
// TODO mazahaka menu
|
||||
#ifdef TRANSPARENT_MENU // ||
|
||||
#ifdef TRANSPARENT_MENU_HUD_RENDER
|
||||
// CRenderer::HKMenuConstructRenderList(); // from wsfix wtf? nw
|
||||
CRenderer::ConstructRenderList();
|
||||
#else
|
||||
CRenderer::ConstructRenderList();
|
||||
#endif
|
||||
#else
|
||||
CRenderer::ConstructRenderList();
|
||||
#endif
|
||||
//CRenderer::ConstructRenderList();
|
||||
tbEndTimer("CnstrRenderList");
|
||||
|
||||
tbStartTimer(0, "PreRender");
|
||||
|
@ -1623,7 +1758,17 @@ Idle(void *arg)
|
|||
CustomPipes::EnvMapRender();
|
||||
#endif
|
||||
|
||||
#ifdef TRANSPARENT_MENU // ||
|
||||
#ifdef TRANSPARENT_MENU_HUD_RENDER
|
||||
HKMenuRenderDebugShit();
|
||||
#else
|
||||
RenderDebugShit();
|
||||
#endif
|
||||
#else
|
||||
RenderDebugShit();
|
||||
#endif
|
||||
|
||||
// RenderDebugShit(); // mazahaka menu hook [if bMenuVisible render]
|
||||
RenderEffects();
|
||||
|
||||
if((TheCamera.m_BlurType == MOTION_BLUR_NONE || TheCamera.m_BlurType == MOTION_BLUR_LIGHT_SCENE) &&
|
||||
|
@ -1641,7 +1786,16 @@ Idle(void *arg)
|
|||
tbEndTimer("RenderMotionBlur");
|
||||
|
||||
tbStartTimer(0, "Render2dStuff");
|
||||
#ifdef TRANSPARENT_MENU // ||
|
||||
#ifdef TRANSPARENT_MENU_HUD_RENDER
|
||||
HKMenuRender2dStuff();
|
||||
#else
|
||||
Render2dStuff();
|
||||
#endif
|
||||
#else
|
||||
Render2dStuff();
|
||||
#endif
|
||||
// Render2dStuff(); // mazahaka menu hook [HUD] [if bMenuVisible render]
|
||||
tbEndTimer("Render2dStuff");
|
||||
}else{
|
||||
CDraw::CalculateAspectRatio();
|
||||
|
@ -1726,7 +1880,10 @@ void
|
|||
InitialiseGame(void)
|
||||
{
|
||||
LoadingScreen(nil, nil, "loadsc0");
|
||||
CGame::Initialise("DATA\\GTA_VC.DAT");
|
||||
//CGame::Initialise("DATA\\LCS\\GTA_LCS.DAT"); // anti europe detect
|
||||
//CGame::Initialise("DATA\\GTA_LLCS.DAT"); // anti europe detect
|
||||
//CGame::Initialise("DATA\\GTA_LCS.DAT");
|
||||
CGame::Initialise("DATA\\GTA_VCS.DAT");
|
||||
}
|
||||
|
||||
RsEventStatus
|
||||
|
|
200
src/core/re3.cpp
200
src/core/re3.cpp
|
@ -48,9 +48,18 @@
|
|||
#include "Population.h"
|
||||
#include "IniFile.h"
|
||||
#include "Zones.h"
|
||||
#include "Pools.h"
|
||||
|
||||
#include "crossplatform.h"
|
||||
|
||||
#ifdef MAZAHAKA_MISC
|
||||
#include "../utils/Utils.h"
|
||||
#endif
|
||||
|
||||
#ifdef MAZAHAKA_DEBUG_CUSTOM_VALS
|
||||
#include "../plugin/TimecycleDebuger.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "assert.h"
|
||||
#include <stdarg.h>
|
||||
|
@ -194,7 +203,7 @@ CustomFrontendOptionsPopulate(void)
|
|||
#define MINI_CASE_SENSITIVE
|
||||
#include "ini.h"
|
||||
|
||||
mINI::INIFile ini("reLCS.ini");
|
||||
mINI::INIFile ini("reVCS.ini");
|
||||
mINI::INIStructure cfg;
|
||||
|
||||
bool ReadIniIfExists(const char *cat, const char *key, uint32 *out)
|
||||
|
@ -314,6 +323,37 @@ void StoreIni(const char *cat, const char *key, char *val, int size)
|
|||
cfg[cat][key] = val;
|
||||
}
|
||||
|
||||
|
||||
#ifdef MISSION_SWITCHER
|
||||
static const char* missions[] = {
|
||||
"initial: objects", "initial: hidden packages", "initial: car generators", "initial: pickups", "initial: unique stunt jumps",
|
||||
"initial: player", "initial: general info", "initial: lods", "initial: weapons", "Home Sweet Home", "Taxi-Driver Sub-Mission",
|
||||
"Paramedic Sub-Mission", "Vigilante Sub-Mission", "Karmageddon", "Firefighter Sub-Mission", "Trash Dash", "RC Triad Take-Down",
|
||||
"Thrashin' RC", "Ragin' RC", "Chasin' RC", "GO GO Faggio", "Noodleboy", "Pizzaboy", "Wong Side Of The Tracks", "Bumps and Grinds: Course 1",
|
||||
"Bumps and Grinds: Course 2", "Bumps and Grinds: Course 3", "Bumps and Grinds: Course 4", "Bumps and Grinds: Course 5", "Bumps and Grinds: Course 6",
|
||||
"Bumps and Grinds: Course 7", "Bumps and Grinds: Course 8", "Bumps and Grinds: Course 9", "Bumps and Grinds: Course 10", "Car Salesman", "Bike Salesman",
|
||||
"RACE: Low-Rider Rumble", "RACE: Deimos Dash", "RACE: Wi-Cheetah Run", "RACE: Red Light Racing", "RACE: Torrington TT", "RACE: Gangsta GP",
|
||||
"Scooter Shooter", "AWOL Angel", "9mm Mayhem", "Scrapyard Challenge", "See the Sight Before your Flight", "SlashTV", "Slacker (Vincenzo)",
|
||||
"Dealing Revenge (Vincenzo)", "Snuff (Vincenzo)", "Smash and Grab (Vincenzo)", "Hot Wheels (Vincenzo)", "The Portland Chainsaw Masquerade (Vincenzo)",
|
||||
"The Offer (Salvatore)", "Ho Selecta! (Salvatore)", "Frighteners (Salvatore)", "Rollercoaster Ride (Salvatore)", "Contra-Banned (Salvatore)",
|
||||
"Sindacco Sabotage (Salvatore)", "The Trouble with Triads (Salvatore)", "Driving Mr Leone (Salvatore)", "conversation (JD)", "Bone Voyeur! (JD)",
|
||||
"Don in 60 Seconds (JD)", "A Volatile Situation (JD)", "Blow up 'Dolls' (JD)", "Salvatore's Salvation (JD)", "The Guns of Leone (JD)",
|
||||
"Calm before the Storm (JD)", "The Made Man (JD)", "Snappy Dresser (Ma Cipriani)", "Big Rumble in Little China (Ma Cipriani)", "Grease Sucho (Ma Cipriani)",
|
||||
"Dead Meat (Ma Cipriani)", "No Son of Mine (Ma Cipriani)", "Shop 'til you Strop (Maria)", "Taken for a Ride (Maria)", "Booby Prize (Maria)",
|
||||
"Biker Heat (Maria)", "Overdose of Trouble (Maria)", "Making Toni (Salvatore)", "A Walk In The Park (Salvatore)", "Caught In The Act (Salvatore)",
|
||||
"Search And Rescue (Salvatore)", "Taking The Peace (Salvatore)", "Shoot The Messenger (Salvatore)", "Sayonara Sindaccos (Leon McAffrey)",
|
||||
"The Whole 9 Yardies (Leon McAffrey)", "Crazy '69' (Leon McAffrey)", "Night Of The Livid Dreads (Leon McAffrey)", "Munitions Dump (Leon McAffrey)",
|
||||
"The Morgue Party Candidate (Donald Love)", "Steering The Vote (Donald Love)", "Cam-Pain (Donald Love)", "Friggin' The Riggin' (Donald Love)",
|
||||
"Love & Bullets (Donald Love)", "Counterfeit Count (Donald Love)", "Love On The Rocks (Donald Love)", "L.C. Confidential (Church Confessional)",
|
||||
"The Passion Of The Heist (Church Confessional)", "Karmageddon (Church Confessional)", "False Idols (Church Confessional)", "Rough Justice (Salvatore)",
|
||||
"Dead Reckoning (Salvatore)", "Shogun Showdown (Salvatore)", "The Shoreside Redemption (Salvatore)", "The Sicilian Gambit (Salvatore)",
|
||||
"Panlantic Land Grab (Donald Love)", "Stop the Press (Donald Love)", "Morgue Party Resurrection (Donald Love)", "No Money, Mo' Problems (Donald Love)",
|
||||
"Bringing the House Down (Donald Love)", "Love on the Run (Donald Love)", "More Deadly than the Male (Toshiko Kasen)", "Cash Clash (Toshiko Kasen)",
|
||||
"A Date with Death (Toshiko Kasen)", "Cash in Kazuki's Chips (Toshiko Kasen)"
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
const char *iniControllerActions[] = { "PED_FIREWEAPON", "PED_CYCLE_WEAPON_RIGHT", "PED_CYCLE_WEAPON_LEFT", "GO_FORWARD", "GO_BACK", "GO_LEFT", "GO_RIGHT", "PED_SNIPER_ZOOM_IN",
|
||||
"PED_SNIPER_ZOOM_OUT", "VEHICLE_ENTER_EXIT", "CAMERA_CHANGE_VIEW_ALL_SITUATIONS", "PED_JUMPING", "PED_SPRINT", "PED_LOOKBEHIND", "PED_DUCK", "PED_ANSWER_PHONE",
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
|
@ -717,49 +757,64 @@ SpawnCar(int id)
|
|||
CVector playerpos;
|
||||
CStreaming::RequestModel(id, 0);
|
||||
CStreaming::LoadAllRequestedModels(false);
|
||||
if(CStreaming::HasModelLoaded(id)){
|
||||
if(CStreaming::HasModelLoaded(id)) {
|
||||
playerpos = FindPlayerCoors();
|
||||
#ifndef MAZAHAKA_MISC // Vehicles created with the help of cheat codes are spawned in front of the player
|
||||
int node;
|
||||
if(!CModelInfo::IsBoatModel(id)){
|
||||
if(!CModelInfo::IsBoatModel(id)) {
|
||||
node = ThePaths.FindNodeClosestToCoors(playerpos, 0, 100.0f, false, false);
|
||||
if(node < 0)
|
||||
return;
|
||||
if(node < 0) return;
|
||||
}
|
||||
#endif
|
||||
|
||||
CVehicle *v;
|
||||
if(CModelInfo::IsBoatModel(id))
|
||||
v = new CBoat(id, RANDOM_VEHICLE);
|
||||
else if(CModelInfo::IsBikeModel(id))
|
||||
v = new CBike(id, RANDOM_VEHICLE);
|
||||
else
|
||||
v = new CAutomobile(id, RANDOM_VEHICLE);
|
||||
|
||||
v->bHasBeenOwnedByPlayer = true;
|
||||
if(carCol1)
|
||||
DebugMenuEntrySetAddress(carCol1, &v->m_currentColour1);
|
||||
if(carCol2)
|
||||
DebugMenuEntrySetAddress(carCol2, &v->m_currentColour2);
|
||||
if(carCol1) DebugMenuEntrySetAddress(carCol1, &v->m_currentColour1);
|
||||
if(carCol2) DebugMenuEntrySetAddress(carCol2, &v->m_currentColour2);
|
||||
|
||||
#ifdef MAZAHAKA_MISC // Vehicles created with the help of cheat codes are spawned in front of the player
|
||||
v->SetPosition(FindPlayerPed()->GetPosition() + CVector(0.0f, 0.0f, 2.5f) + FindPlayerPed()->GetForward() * 5.0f);
|
||||
CVector leftVector = -FindPlayerPed()->GetRight();
|
||||
v->SetOrientation(0.0f, 0.0f, leftVector.Heading());
|
||||
#else
|
||||
if(CModelInfo::IsBoatModel(id))
|
||||
v->SetPosition(TheCamera.GetPosition() + TheCamera.GetForward()*15.0f);
|
||||
v->SetPosition(TheCamera.GetPosition() + TheCamera.GetForward() * 15.0f);
|
||||
else
|
||||
v->SetPosition(ThePaths.m_pathNodes[node].GetPosition());
|
||||
|
||||
v->GetMatrix().GetPosition().z += 4.0f;
|
||||
v->SetOrientation(0.0f, 0.0f, 3.49f);
|
||||
#endif
|
||||
v->SetStatus(STATUS_ABANDONED);
|
||||
v->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CWorld::Add(v);
|
||||
//v->bExplosionProof = true; // mazahaka debug
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
FixCar(void)
|
||||
{
|
||||
CVehicle *veh = FindPlayerVehicle();
|
||||
if(veh == nil)
|
||||
return;
|
||||
#ifdef MAZAHAKA_MISC
|
||||
if(veh == nil) { // try fix near player car mazahaka
|
||||
veh = GetVehicleNearPlayer();
|
||||
}
|
||||
#endif
|
||||
|
||||
if(veh == nil) { return; }
|
||||
|
||||
#ifdef MAZAHAKA_MISC
|
||||
veh->m_fHealth = 1200.0f;
|
||||
#else
|
||||
veh->m_fHealth = 1000.0f;
|
||||
#endif
|
||||
if(veh->IsCar()){
|
||||
((CAutomobile*)veh)->Damage.SetEngineStatus(0);
|
||||
((CAutomobile*)veh)->Fix();
|
||||
|
@ -772,6 +827,11 @@ FixCar(void)
|
|||
static void
|
||||
TeleportToWaypoint(void)
|
||||
{
|
||||
CPlayerPed *pPlayer = FindPlayerPed();
|
||||
if(pPlayer && (!pPlayer->InVehicle())) {
|
||||
pPlayer->m_nPedState = PedState::PED_IDLE;
|
||||
pPlayer->StopNonPartialAnims();
|
||||
}
|
||||
if (CRadar::TargetMarkerId == -1)
|
||||
return;
|
||||
CEntity* pEntityToTeleport = FindPlayerEntity();
|
||||
|
@ -781,6 +841,18 @@ TeleportToWaypoint(void)
|
|||
vNewPos.z = CWorld::FindGroundZForCoord(vNewPos.x, vNewPos.y) + pEntityToTeleport->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pEntityToTeleport->Teleport(vNewPos);
|
||||
}
|
||||
|
||||
static void
|
||||
TeleportToCamPoint(void)
|
||||
{
|
||||
CEntity *pEntityToTeleport = FindPlayerEntity();
|
||||
CVector vNewPos = TheCamera.GetPosition();
|
||||
CGame::currLevel = CTheZones::GetLevelFromPosition(&vNewPos);
|
||||
CCollision::SortOutCollisionAfterLoad();
|
||||
CStreaming::LoadScene(vNewPos);
|
||||
//vNewPos.z = CWorld::FindGroundZForCoord(vNewPos.x, vNewPos.y) + pEntityToTeleport->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pEntityToTeleport->Teleport(vNewPos);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -799,6 +871,58 @@ ToggleComedy(void)
|
|||
veh->bComedyControls = !veh->bComedyControls;
|
||||
}
|
||||
|
||||
static void
|
||||
KillPedPool(void)
|
||||
{
|
||||
CPlayerPed *pPlayer = FindPlayerPed();
|
||||
bool key = (GetAsyncKeyState(VK_SHIFT) & 0x8000); // CPad::GetPad(0)->GetShift()??
|
||||
int j = CPools::GetPedPool()->GetSize();
|
||||
while(j-- > 0) {
|
||||
if(CPed *ped = CPools::GetPedPool()->GetSlot(j)) { // COMMAND_SET_CHAR_HEALTH
|
||||
if(ped == pPlayer) { continue; } // need??
|
||||
if(key && (ped->InVehicle())) { continue; }
|
||||
ped->m_fHealth = 0.0f;
|
||||
ped->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FixVehPool(void)
|
||||
{
|
||||
int j = CPools::GetPedPool()->GetSize();
|
||||
while(j-- > 0) {
|
||||
if(CVehicle *pVehicle = CPools::GetVehiclePool()->GetSlot(j)) { // COMMAND_SET_CHAR_HEALTH
|
||||
if(pVehicle->IsCar()) {
|
||||
pVehicle->m_fHealth = 1200.0f;
|
||||
((CAutomobile *)pVehicle)->Damage.SetEngineStatus(0);
|
||||
((CAutomobile *)pVehicle)->Fix();// carsh handling
|
||||
}/* else if(pVehicle->IsBike()) {
|
||||
((CBike *)pVehicle)->Fix();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
BlowVehPool(void) // BlowUpCarsCheat
|
||||
{
|
||||
CVehicle *pPlayerVeh = FindPlayerVehicle();
|
||||
if(pPlayerVeh == nil) { // try fix near player car mazahaka
|
||||
pPlayerVeh = GetVehicleNearPlayer();
|
||||
}
|
||||
//if(pPlayerVeh == nil) { return; }
|
||||
|
||||
int i = CPools::GetVehiclePool()->GetSize();
|
||||
while(i-- > 0) {
|
||||
if(CVehicle *veh = CPools::GetVehiclePool()->GetSlot(i))
|
||||
{
|
||||
if(veh == pPlayerVeh) { continue; }
|
||||
veh->BlowUpCar(nil);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
PlaceOnRoad(void)
|
||||
{
|
||||
|
@ -999,7 +1123,7 @@ DebugMenuPopulate(void)
|
|||
DebugMenuAddCmd("Spawn", "Spawn Rhino", [](){ SpawnCar(MI_RHINO); });
|
||||
DebugMenuAddCmd("Spawn", "Spawn Firetruck", [](){ SpawnCar(MI_FIRETRUCK); });
|
||||
DebugMenuAddCmd("Spawn", "Spawn Predator", [](){ SpawnCar(MI_PREDATOR); });
|
||||
DebugMenuAddCmd("Spawn", "Spawn PCJ 600", [](){ SpawnCar(MI_PCJ600); });
|
||||
//DebugMenuAddCmd("Spawn", "Spawn PCJ 600", [](){ SpawnCar(MI_PCJ600); }); // wtf lol ? mazahaka
|
||||
DebugMenuAddCmd("Spawn", "Spawn Faggio", [](){ SpawnCar(MI_FAGGIO); });
|
||||
DebugMenuAddCmd("Spawn", "Spawn Freeway", [](){ SpawnCar(MI_FREEWAY); });
|
||||
|
||||
|
@ -1121,16 +1245,21 @@ extern bool gbRenderDebugEnvMap;
|
|||
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
DebugMenuAddCmd("Game", "Teleport to map waypoint", TeleportToWaypoint);
|
||||
DebugMenuAddCmd("Game", "Teleport to cam waypoint", TeleportToCamPoint);
|
||||
#endif
|
||||
DebugMenuAddCmd("Game", "Fix Car", FixCar);
|
||||
DebugMenuAddCmd("Game", "Place Car on Road", PlaceOnRoad);
|
||||
DebugMenuAddCmd("Game", "Switch car collision", SwitchCarCollision);
|
||||
DebugMenuAddCmd("Game", "Toggle Comedy Controls", ToggleComedy);
|
||||
DebugMenuAddCmd("Game", "Kill Ped Pool", KillPedPool); // mazahaka
|
||||
DebugMenuAddCmd("Game", "Kill Vehicle Pool", BlowVehPool); // mazahaka
|
||||
DebugMenuAddCmd("Game", "Fix Vehicle Pool", FixVehPool); // mazahaka
|
||||
|
||||
|
||||
#ifdef MISSION_SWITCHER
|
||||
DebugMenuEntry *missionEntry;
|
||||
static const char* missions[] = {
|
||||
// in global sp
|
||||
/*static const char* missions[] = {
|
||||
"initial: objects", "initial: hidden packages", "initial: car generators", "initial: pickups", "initial: unique stunt jumps",
|
||||
"initial: player", "initial: general info", "initial: lods", "initial: weapons", "Home Sweet Home", "Taxi-Driver Sub-Mission",
|
||||
"Paramedic Sub-Mission", "Vigilante Sub-Mission", "Karmageddon", "Firefighter Sub-Mission", "Trash Dash", "RC Triad Take-Down",
|
||||
|
@ -1155,7 +1284,7 @@ extern bool gbRenderDebugEnvMap;
|
|||
"Panlantic Land Grab (Donald Love)", "Stop the Press (Donald Love)", "Morgue Party Resurrection (Donald Love)", "No Money, Mo' Problems (Donald Love)",
|
||||
"Bringing the House Down (Donald Love)", "Love on the Run (Donald Love)", "More Deadly than the Male (Toshiko Kasen)", "Cash Clash (Toshiko Kasen)",
|
||||
"A Date with Death (Toshiko Kasen)", "Cash in Kazuki's Chips (Toshiko Kasen)"
|
||||
};
|
||||
};*/
|
||||
|
||||
missionEntry = DebugMenuAddVar("Game", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions);
|
||||
DebugMenuEntrySetWrap(missionEntry, true);
|
||||
|
@ -1172,6 +1301,33 @@ extern bool gbRenderDebugEnvMap;
|
|||
DebugMenuAddCmd("Cam", "Normal", []() { DebugCamMode = 0; });
|
||||
DebugMenuAddCmd("Cam", "Reset Statics", ResetCamStatics);
|
||||
|
||||
#ifdef MAZAHAKA_DEBUG_CUSTOM_VALS
|
||||
//DebugMenuAddVar("MaZaHaKa", "Debug1", &CMBlur::Drunkness, nil, 0.05f, 0, 1.0f);
|
||||
//DebugMenuAddVar("MaZaHaKa", "Debug1", &PLG_TD::Debug1_val, nil, 0.05f, 0, 1.0f);
|
||||
|
||||
//---float
|
||||
DebugMenuAddVar("MaZaHaKa", "fDebug1", &PLG_TD::fDebug1_val, nil, 0.01f, 0, 1.0f);
|
||||
DebugMenuAddVar("MaZaHaKa", "fDebug2", &PLG_TD::fDebug2_val, nil, 0.01f, 0, 1.0f);
|
||||
DebugMenuAddVar("MaZaHaKa", "fDebug3", &PLG_TD::fDebug3_val, nil, 0.01f, 0, 1.0f);
|
||||
DebugMenuAddVar("MaZaHaKa", "fDebug4", &PLG_TD::fDebug4_val, nil, 0.01f, 0, 1.0f);
|
||||
DebugMenuAddVar("MaZaHaKa", "fDebug5", &PLG_TD::fDebug5_val, nil, 0.01f, 0, 1.0f);
|
||||
|
||||
//---int
|
||||
int vmax = 32565;
|
||||
SETTWEAKPATH("MaZaHaKa");
|
||||
TWEAKINT32(PLG_TD::iDebug1_val, 0, vmax, 1);
|
||||
TWEAKINT32(PLG_TD::iDebug2_val, 0, vmax, 1);
|
||||
TWEAKINT32(PLG_TD::iDebug3_val, 0, vmax, 1);
|
||||
TWEAKINT32(PLG_TD::iDebug4_val, 0, vmax, 1);
|
||||
TWEAKINT32(PLG_TD::iDebug5_val, 0, vmax, 1);
|
||||
|
||||
/*DebugMenuAddVar("MaZaHaKa", "iDebug1", &PLG_TD::iDebug1_val, nil, (uint8_t)1, (uint8_t)0, max);
|
||||
DebugMenuAddVar("MaZaHaKa", "iDebug2", &PLG_TD::iDebug2_val, nil, 1, 0, max);
|
||||
DebugMenuAddVar("MaZaHaKa", "iDebug3", &PLG_TD::iDebug3_val, nil, 1, 0, max);
|
||||
DebugMenuAddVar("MaZaHaKa", "iDebug4", &PLG_TD::iDebug4_val, nil, 1, 0, max);
|
||||
DebugMenuAddVar("MaZaHaKa", "iDebug5", &PLG_TD::iDebug5_val, nil, 1, 0, max);*/
|
||||
#endif
|
||||
|
||||
CTweakVars::AddDBG("Debug");
|
||||
}
|
||||
}
|
||||
|
@ -1186,6 +1342,7 @@ static char re3_buff[re3_buffsize];
|
|||
#ifndef MASTER
|
||||
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func)
|
||||
{
|
||||
//return; // tmp
|
||||
#ifdef _WIN32
|
||||
int nCode;
|
||||
|
||||
|
@ -1212,8 +1369,9 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
|||
strcat_s(re3_buff, re3_buffsize, "(Press Retry to debug the application)");
|
||||
|
||||
|
||||
nCode = ::MessageBoxA(nil, re3_buff, "RELCS Assertion Failed!",
|
||||
nCode = ::MessageBoxA(nil, re3_buff, "reVCS Assertion Failed!",
|
||||
MB_ABORTRETRYIGNORE|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL);
|
||||
return; // mazahaka
|
||||
|
||||
if (nCode == IDABORT)
|
||||
{
|
||||
|
@ -1233,7 +1391,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
|||
abort();
|
||||
#else
|
||||
// TODO
|
||||
printf("\nRELCS ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
printf("\nreVCS ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
assert(false);
|
||||
#endif
|
||||
}
|
||||
|
@ -1287,14 +1445,14 @@ void re3_usererror(const char *format, ...)
|
|||
vsprintf_s(re3_buff, re3_buffsize, format, va);
|
||||
va_end(va);
|
||||
|
||||
::MessageBoxA(nil, re3_buff, "RELCS Error!",
|
||||
::MessageBoxA(nil, re3_buff, "reVCS Error!",
|
||||
MB_OK|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL);
|
||||
|
||||
raise(SIGABRT);
|
||||
_exit(3);
|
||||
#else
|
||||
vsprintf(re3_buff, format, va);
|
||||
printf("\nRELCS Error!\n\t%s\n",re3_buff);
|
||||
printf("\nreVCS Error!\n\t%s\n",re3_buff);
|
||||
assert(false);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue