From 29af708c2ee8cfbef4130d7f768fc736defc1e15 Mon Sep 17 00:00:00 2001 From: tx00100xt Date: Mon, 26 Dec 2022 23:16:50 +0300 Subject: [PATCH] Fixed building of the modification from under FreeBSD. --- Sources/EntitiesMP/Common/Common.cpp | 10 ++-- Sources/EntitiesMP/Common/HUD.cpp | 2 +- Sources/EntitiesMP/Display.es | 18 ++++---- Sources/EntitiesMP/KeyItem.es | 2 +- Sources/EntitiesMP/PESpawnBattery.es | 8 ++-- Sources/EntitiesMP/PESpawner.es | 2 +- Sources/EntitiesMP/Player.es | 6 +-- Sources/EntitiesMP/PlayerActionMarker.es | 6 +-- Sources/EntitiesMP/PlayerBotMarker.es | 2 +- Sources/EntitiesMP/PropertyChanger.es | 58 ++++++++++++------------ Sources/EntitiesMP/Warp.es | 2 +- Sources/EntitiesMP/condition.es | 24 +++++----- Sources/GameMP/Game.cpp | 2 +- 13 files changed, 71 insertions(+), 71 deletions(-) diff --git a/Sources/EntitiesMP/Common/Common.cpp b/Sources/EntitiesMP/Common/Common.cpp index 5c39fa5..7988fcd 100644 --- a/Sources/EntitiesMP/Common/Common.cpp +++ b/Sources/EntitiesMP/Common/Common.cpp @@ -1511,7 +1511,7 @@ void ParseCPP(void) CPrintF("^cff0000Parsing CPP File...\n"); CTString strFileName = "Rail"; CTFileName fn; - fn.PrintF("Files\\%s.cpp", strFileName); + fn.PrintF("Files\\%s.cpp", (const char *)strFileName); if (FileExists(fn)) { CTString strLine; @@ -1526,14 +1526,14 @@ void ParseCPP(void) // if anything failed } catch (const char *strError) { // report error - CPrintF(TRANS("\n"), strError); + CPrintF(TRANS("\n"), (const char *)strError); } // create file CTFileStream strmFile; CTFileName fnm; - fnm.PrintF("Files\\%sP.cpp", strFileName); - CPrintF("^cff0000Creating CPP File...%s\n", fnm); + fnm.PrintF("Files\\%sP.cpp", (const char *)strFileName); + CPrintF("^cff0000Creating CPP File...%s\n", (const char *)fnm); strmFile.Create_t( fnm, CTStream::CM_TEXT); // repeat @@ -1549,7 +1549,7 @@ void ParseCPP(void) strLineShort.TrimRight(5); if (strLineShort!="#line") { //CPrintF("%s\n", strLine); - strLine.PrintF("%s", strLine); + strLine.PrintF("%s", (const char *)strLine); strmFile.PutLine_t( strLine); } } diff --git a/Sources/EntitiesMP/Common/HUD.cpp b/Sources/EntitiesMP/Common/HUD.cpp index 6ff01fa..dac9f02 100644 --- a/Sources/EntitiesMP/Common/HUD.cpp +++ b/Sources/EntitiesMP/Common/HUD.cpp @@ -1860,7 +1860,7 @@ extern void DrawHUD( const CPlayer *penPlayerCurrent, CDrawPort *pdpCurrent, BOO } CTString strTmp; // put name under icon - strTmp.PrintF("%s", strName); + strTmp.PrintF("%s", (const char*)strName); if( m_fPlayerHealth<=0.01f) { _pDP->PutTextC( strTmp, posX, posZ+4*fScaling, C_WHITE|200); } else { diff --git a/Sources/EntitiesMP/Display.es b/Sources/EntitiesMP/Display.es index af6c843..247fec1 100644 --- a/Sources/EntitiesMP/Display.es +++ b/Sources/EntitiesMP/Display.es @@ -111,7 +111,7 @@ procedures: bstr=TRUE; } }else if( m_bDebug){ - CPrintF(TRANS("%s:Property not found\n"),m_strName); + CPrintF(TRANS("%s:Property not found\n"),(const char *)m_strName); } }else if(m_eVT==ECT_POSX){ fValue=m_penTarget->GetPlacement().pl_PositionVector(1); @@ -168,11 +168,11 @@ procedures: } }else if(m_bDebug){ - CPrintF(TRANS("%s 1: Don't use speeds on not moving entities or health on entities without health\n"),m_strName); + CPrintF(TRANS("%s 1: Don't use speeds on not moving entities or health on entities without health\n"),(const char *)m_strName); } }else if(m_bDebug){ - CPrintF(TRANS("%s:No target set\n"),m_strName); + CPrintF(TRANS("%s:No target set\n"),(const char *)m_strName); } if (bf){ strReplace.PrintF(TRANS("%f"),fValue); @@ -189,7 +189,7 @@ procedures: } }else if(!bstr){ if(m_bDebug){ - CPrintF(TRANS("%s: Unknown Error(maybe wrong data type)\n"),m_strName); + CPrintF(TRANS("%s: Unknown Error(maybe wrong data type)\n"),(const char *)m_strName); } if(m_bDeactivate){ {FOREACHINDYNAMICCONTAINER(GetWorld()->wo_cenEntities, CEntity, iten) { @@ -236,7 +236,7 @@ procedures: } if(IsOfClass(eTrigger.penCaused,"Player")){ if(m_bDebug){ - CPrintF(TRANS("%s: Recieved ETrigger from Player, adding to display list.\n"),GetName()); + CPrintF(TRANS("%s: Recieved ETrigger from Player, adding to display list.\n"),(const char *)GetName()); } if(!((CPlayer&)*eTrigger.penCaused).m_dcDisplay.IsMember(this)){ ((CPlayer&)*eTrigger.penCaused).m_dcDisplay.Add(this); @@ -249,7 +249,7 @@ procedures: on (EStart eStart) : { if(IsOfClass(eStart.penCaused,"Player")){ if(m_bDebug){ - CPrintF(TRANS("%s: Recieved EStart from Player, removing from display list.\n"),GetName()); + CPrintF(TRANS("%s: Recieved EStart from Player, removing from display list.\n"),(const char *)GetName()); } if(((CPlayer&)*eStart.penCaused).m_dcDisplay.IsMember(this)){ ((CPlayer&)*eStart.penCaused).m_dcDisplay.Remove(this); @@ -259,7 +259,7 @@ procedures: } on (EEnvironmentStart eStart):{ if(m_bDebug){ - CPrintF(TRANS("%s: Recieved EEnvironmentStart, adding all players to display list list.\n"),GetName()); + CPrintF(TRANS("%s: Recieved EEnvironmentStart, adding all players to display list list.\n"),(const char *)GetName()); } CEntityPointer penPlayer; for (INDEX iPlayer=0; iPlayersp_bCooperative && m_bCanBeenPicked) { if (IsOfClass(epass.penOther, "Player")) { CTString strKey = GetKeyName(m_kitType); - CPrintF(TRANS("^cFF0000%s - %s^r\n"), ((CPlayer &)*epass.penOther).GetPlayerName(), strKey); + CPrintF(TRANS("^cFF0000%s - %s^r\n"), (const char*)((CPlayer &)*epass.penOther).GetPlayerName(), (const char*)strKey); } } diff --git a/Sources/EntitiesMP/PESpawnBattery.es b/Sources/EntitiesMP/PESpawnBattery.es index 75d5f34..9bae8b0 100644 --- a/Sources/EntitiesMP/PESpawnBattery.es +++ b/Sources/EntitiesMP/PESpawnBattery.es @@ -141,7 +141,7 @@ functions: const CTString &GetDescription(void) const { ((CTString&)m_strDescription).PrintF("->"); if (m_penTarget!=NULL) { - ((CTString&)m_strDescription).PrintF("->%s", m_penTarget->GetName()); + ((CTString&)m_strDescription).PrintF("->%s", (const char *)m_penTarget->GetName()); } CTString strRange = ""; if (m_bUseBMan) { strRange += "BMan "; } @@ -341,13 +341,13 @@ functions: if (m_iRandomTotal==1) { m_bUseSingleType = TRUE; } - if (GetSP()->sp_bTestSpawnerBatteries) { CPrintF("m_iRandomTotal = %d\n", m_iRandomTotal); } + if (GetSP()->sp_bTestSpawnerBatteries) { CPrintF("m_iRandomTotal = %d\n", (const char *)m_iRandomTotal); } } void GetRandomTemplate(void) { m_iRandomChosen = IRnd()%m_iRandomTotal; - if (GetSP()->sp_bTestSpawnerBatteries) { CPrintF("m_iRandomChosen = %d\n", m_iRandomChosen); } + if (GetSP()->sp_bTestSpawnerBatteries) { CPrintF("m_iRandomChosen = %d\n", (const char *)m_iRandomChosen); } INDEX iRandomTemp = -1; if (m_bUseBMan) { @@ -600,7 +600,7 @@ procedures: // fire a spawner projectile FireProjectile(); - if (GetSP()->sp_bTestSpawnerBatteries) { CPrintF("Fire Projectile: %d\n", m_ctInGroup); } + if (GetSP()->sp_bTestSpawnerBatteries) { CPrintF("Fire Projectile: %d\n", (const char *)m_ctInGroup); } // wait between two entities in group m_tmDelay = FRnd()*0.2f; // wait between two entities in group diff --git a/Sources/EntitiesMP/PESpawner.es b/Sources/EntitiesMP/PESpawner.es index 5b7a122..b75c388 100644 --- a/Sources/EntitiesMP/PESpawner.es +++ b/Sources/EntitiesMP/PESpawner.es @@ -148,7 +148,7 @@ functions: const CTString &GetDescription(void) const { ((CTString&)m_strDescription).PrintF("->"); if (m_penTarget!=NULL) { - ((CTString&)m_strDescription).PrintF("->%s", m_penTarget->GetName()); + ((CTString&)m_strDescription).PrintF("->%s", (const char *)m_penTarget->GetName()); } CTString strRange = ""; if (m_bUseBMan) { strRange += "BMan "; } diff --git a/Sources/EntitiesMP/Player.es b/Sources/EntitiesMP/Player.es index b86da95..01750a1 100644 --- a/Sources/EntitiesMP/Player.es +++ b/Sources/EntitiesMP/Player.es @@ -2063,9 +2063,9 @@ functions: INDEX iPing = (INDEX)ceil(penPlayer->en_tmPing*1000.0f); // add his stats short //strStats+="^cFFFFFF"+CenterString(penPlayer->GetPlayerName())+"^r\n\n"; - strStats+=CTString(0, "%s", penPlayer->GetPlayerName()); + strStats+=CTString(0, "%s", (const char*)penPlayer->GetPlayerName()); strStats+="\n"; - strStats+=AlignString(CTString(0, "%s:^r\n%d", TRANS("PING"), iPing)); + strStats+=AlignString(CTString(0, "%s:^r\n%d", (const char*)TRANS("PING"), iPing)); strStats+="\n"; penPlayer->GetDetailStatsSP(strStats, 2); strStats+="\n"; @@ -2122,7 +2122,7 @@ functions: strStats+="\n"; if (iCoopType<=1) { if( m_bEndOfLevel) { - strStats+=AlignString(CTString(0, "%s:^r\n%s", (const char *) TRANS("ESTIMATED TIME"), TimeToString(m_tmEstTime))); + strStats+=AlignString(CTString(0, "%s:^r\n%s", (const char *) TRANS("ESTIMATED TIME"), (const char*)TimeToString(m_tmEstTime))); strStats+="\n"; strStats+=AlignString(CTString(0, "%s:^r\n%d", (const char *) TRANS("TIME BONUS"), m_iTimeScore)); strStats+="\n"; diff --git a/Sources/EntitiesMP/PlayerActionMarker.es b/Sources/EntitiesMP/PlayerActionMarker.es index e8b5723..23453ce 100644 --- a/Sources/EntitiesMP/PlayerActionMarker.es +++ b/Sources/EntitiesMP/PlayerActionMarker.es @@ -115,7 +115,7 @@ functions: // if triggered by a player if( IsDerivedFromClass(eTrigger.penCaused, "Player")) { if (hud_bShowPEInfo) { - CPrintF("PlayerActionMarker: %s, Triggered by: Player\n", m_strDescription); + CPrintF("PlayerActionMarker: %s, Triggered by: Player\n", (const char*)m_strDescription); } // send it event to start auto actions from here EAutoAction eAutoAction; @@ -129,7 +129,7 @@ functions: // if triggered by a player bot else if( IsDerivedFromClass(eTrigger.penCaused, "PlayerBot")) { if (hud_bShowPEInfo) { - CPrintF("PlayerActionMarker %s, Triggered by: Player Bot\n", m_strDescription); + CPrintF("PlayerActionMarker %s, Triggered by: Player Bot\n", (const char*)m_strDescription); } CEntity *pen = eTrigger.penCaused; // send event to the bot's owner @@ -145,7 +145,7 @@ functions: // if somehow we ended up being triggered by something else, really bad idea? else { if (hud_bShowPEInfo) { - CPrintF("PlayerActionMarker: %s, Triggered by: Other ... Do fixup to player?\n", m_strDescription); + CPrintF("PlayerActionMarker: %s, Triggered by: Other ... Do fixup to player?\n", (const char*)m_strDescription); } // get a player to send the event to /*CEntity *penCaused = FixupCausedToPlayer(this, eTrigger.penCaused); diff --git a/Sources/EntitiesMP/PlayerBotMarker.es b/Sources/EntitiesMP/PlayerBotMarker.es index 8402e74..a7e6fcb 100644 --- a/Sources/EntitiesMP/PlayerBotMarker.es +++ b/Sources/EntitiesMP/PlayerBotMarker.es @@ -44,7 +44,7 @@ functions: { ((CTString&)m_strDescription).PrintF("->"); if (m_penTarget!=NULL) { - ((CTString&)m_strDescription).PrintF("->%s", m_penTarget->GetName()); + ((CTString&)m_strDescription).PrintF("->%s", (const char *)m_penTarget->GetName()); } return m_strDescription; } diff --git a/Sources/EntitiesMP/PropertyChanger.es b/Sources/EntitiesMP/PropertyChanger.es index 77642e6..e795971 100644 --- a/Sources/EntitiesMP/PropertyChanger.es +++ b/Sources/EntitiesMP/PropertyChanger.es @@ -68,7 +68,7 @@ functions: if(m_penTarget){ if(m_penTarget->PropertyForName(m_strProperty)==NULL) { if(m_bDebug){ - CPrintF(TRANS("%s : %s Not Found\n"),m_strName,m_strProperty); + CPrintF(TRANS("%s : %s Not Found\n"),(const char *)m_strName,(const char *)m_strProperty); } }else{ if(m_ePT==ECT_ENTITY){ @@ -90,7 +90,7 @@ functions: *fNew=*((INDEX *)(((UBYTE *)(CEntity*) m_penSource.ep_pen)+offset1)); } }else if(m_bDebug){ - CPrintF(TRANS("%s:Source Property %s not found\n"),GetName(),m_strSource); + CPrintF(TRANS("%s:Source Property %s not found\n"),(const char *)GetName(),(const char *)m_strSource); } //if(*fValue!=NULL){ if(m_eOperation==EO_SET){ @@ -105,7 +105,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } @@ -137,7 +137,7 @@ functions: if(*penNew){ str2=((CEntity&)*penNew).GetName(); } - CPrintF(TRANS("%s changing Pointer %s from %s to %s\n"),m_strName,m_strProperty,str1,str2); + CPrintF(TRANS("%s changing Pointer %s from %s to %s\n"),(const char *)m_strName,(const char *)m_strProperty,(const char *)str1,(const char *)str2); } //INDEX @@ -165,29 +165,29 @@ functions: *iValue/=*iNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } if(m_bDebug){ - CPrintF(TRANS("%s: Target Entity Property: %s.%s is currently (INDEX)%d\n"),m_strName,((CEntity&)*m_penTarget).GetName(),m_strProperty,iOld); + CPrintF(TRANS("%s: Target Entity Property: %s.%s is currently (INDEX)%d\n"),(const char *)m_strName,(const char *)((CEntity&)*m_penTarget).GetName(),(const char *)m_strProperty,iOld); if(m_penSource&&m_penSource->PropertyForName(m_strSource)->ep_eptType==CEntityProperty::EPT_INDEX){ - CPrintF(TRANS("%s: Source Entity Property: %s.%s is currently (INDEX)%d\n"),m_strName,((CEntity&)*m_penSource).GetName(),m_strSource,*iNew); + CPrintF(TRANS("%s: Source Entity Property: %s.%s is currently (INDEX)%d\n"),(const char *)m_strName,(const char *)((CEntity&)*m_penSource).GetName(),(const char *)m_strSource,*iNew); }else{ - CPrintF(TRANS("%s: Source Value: (INDEX)%d\n"),m_strName,m_iValue); + CPrintF(TRANS("%s: Source Value: (INDEX)%d\n"),(const char *)m_strName,m_iValue); } if(m_eOperation==EO_SET){ - CPrintF(TRANS("%s: %s=(INDEX)%d\n"),m_strName,m_strProperty,*iValue); + CPrintF(TRANS("%s: %s=(INDEX)%d\n"),(const char *)m_strName,(const char *)m_strProperty,*iValue); }else if(m_eOperation==EO_ADD){ - CPrintF(TRANS("%s: %s=(INDEX)%d+(INDEX)%d="),m_strName,m_strProperty,((CEntity&)*m_penTarget).GetName(),*iNew); + CPrintF(TRANS("%s: %s=(INDEX)%s+(INDEX)%d="),(const char *)m_strName,(const char *)m_strProperty,(const char *)((CEntity&)*m_penTarget).GetName(),*iNew); CPrintF(TRANS("%d\n"),*iValue); }else if(m_eOperation==EO_SUBSTRACT){ - CPrintF(TRANS("%s: %s=(INDEX)%d-(INDEX)%d="),m_strName,m_strProperty,((CEntity&)*m_penTarget).GetName(),*iNew); + CPrintF(TRANS("%s: %s=(INDEX)%s-(INDEX)%d="),(const char *)m_strName,(const char *)m_strProperty,(const char *)((CEntity&)*m_penTarget).GetName(),*iNew); CPrintF(TRANS("%d\n"),*iValue); }else if(m_eOperation==EO_MULTIPLY){ - CPrintF(TRANS("%s: %s=(INDEX)%d*(INDEX)%d="),m_strName,m_strProperty,((CEntity&)*m_penTarget).GetName(),*iNew); + CPrintF(TRANS("%s: %s=(INDEX)%s*(INDEX)%d="),(const char *)m_strName,(const char *)m_strProperty,(const char *)((CEntity&)*m_penTarget).GetName(),*iNew); CPrintF(TRANS("%d\n"),*iValue); }else if(m_eOperation==EO_DIVIDE&&m_iValue!=0){ - CPrintF(TRANS("%s: %s=(INDEX)%d/(INDEX)%d="),m_strName,m_strProperty,((CEntity&)*m_penTarget).GetName(),*iNew); + CPrintF(TRANS("%s: %s=(INDEX)%s/(INDEX)%d="),(const char *)m_strName,(const char *)m_strProperty,(const char *)((CEntity&)*m_penTarget).GetName(),*iNew); CPrintF(TRANS("%d\n"),*iValue); } } @@ -251,7 +251,7 @@ functions: *rValue/=*rNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } @@ -298,7 +298,7 @@ functions: *anValue/=*anNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } @@ -347,7 +347,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(m_ePT==ECT_POSY){ @@ -375,7 +375,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(m_ePT==ECT_POSZ){ @@ -403,7 +403,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(m_ePT==ECT_ROTH){ @@ -431,7 +431,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(m_ePT==ECT_ROTP){ @@ -459,7 +459,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(m_ePT==ECT_ROTB){ @@ -487,7 +487,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(m_penTarget->GetFlags()&ENF_ALIVE&&m_ePT==ECT_HEALTH){ @@ -515,7 +515,7 @@ functions: ((CLiveEntity&)*m_penTarget).SetHealth(fValue / *fNew); }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } }else if(IsDerivedFromClass(m_penTarget,"MovableEntity")){ @@ -544,7 +544,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); @@ -573,7 +573,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); @@ -603,7 +603,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); @@ -632,7 +632,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); @@ -661,7 +661,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); @@ -690,7 +690,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); @@ -719,7 +719,7 @@ functions: *fValue/=*fNew; }else{ if(m_bDebug){ - CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),m_strName); + CPrintF(TRANS("%s: DO NOT DIVIDE THROUGH 0!\n"),(const char *)m_strName); } } ((CMovableEntity&)*m_penTarget).AddToMovers(); diff --git a/Sources/EntitiesMP/Warp.es b/Sources/EntitiesMP/Warp.es index a749006..67e5271 100644 --- a/Sources/EntitiesMP/Warp.es +++ b/Sources/EntitiesMP/Warp.es @@ -36,7 +36,7 @@ functions: const CTString &GetDescription(void) const { ((CTString&)m_strDescription).PrintF("->"); if (m_penTarget!=NULL) { - ((CTString&)m_strDescription).PrintF("->%s", m_penTarget->GetName()); + ((CTString&)m_strDescription).PrintF("->%s", (const char *)m_penTarget->GetName()); } return m_strDescription; } diff --git a/Sources/EntitiesMP/condition.es b/Sources/EntitiesMP/condition.es index 480cc68..fe4db0a 100644 --- a/Sources/EntitiesMP/condition.es +++ b/Sources/EntitiesMP/condition.es @@ -85,15 +85,15 @@ functions: BOOL bResult=0,be=0; if(m_penifCondition2){ if(m_bDebug&&m_eCT1==ECT_ENTITY&&m_eCT2==ECT_ENTITY&&m_penifCondition1->PropertyForName(m_strProperty1)&&m_penifCondition2->PropertyForName(m_strProperty2)&&m_penifCondition1->PropertyForName(m_strProperty1)->ep_eptType!=m_penifCondition2->PropertyForName(m_strProperty2)->ep_eptType){ - CPrintF(TRANS("%s : Different Data Types\n"),m_strName); + CPrintF(TRANS("%s : Different Data Types\n"),(const char *)m_strName); } }else{ if(m_bDebug){ - CPrintF(TRANS("%s:Second Condition Target not set\n"),m_strName); + CPrintF(TRANS("%s:Second Condition Target not set\n"),(const char *)m_strName); } } if(m_eCT1==ECT_ENTITY&&m_bDebug&&m_penifCondition1->PropertyForName(m_strProperty1)==NULL) { - CPrintF(TRANS("Condition 1 : %s : %s Not Found\n"),m_strName,m_strProperty1); + CPrintF(TRANS("Condition 1 : %s : %s Not Found\n"),(const char *)m_strName,(const char *)m_strProperty1); }else if(m_eCT1==ECT_TYPE){ if(IsDerivedFromClass(m_penifCondition1, m_strClass)){ bResult=TRUE; @@ -180,7 +180,7 @@ functions: }else{ be=true; if(m_bDebug){ - CPrintF(TRANS("%s 1: Don't use speeds on not moving entities or health on entities without health\n"),m_strName); + CPrintF(TRANS("%s 1: Don't use speeds on not moving entities or health on entities without health\n"),(const char *)m_strName); } } if(m_penifCondition2){ @@ -254,11 +254,11 @@ functions: }else{ be=true; if(m_bDebug){ - CPrintF(TRANS("%s 2: Don't use speeds on not moving entities or health on entities without health\n"),m_strName); + CPrintF(TRANS("%s 2: Don't use speeds on not moving entities or health on entities without health\n"),(const char *)m_strName); } } }else{ - CPrintF(TRANS("%sSet the second condition target goddammit\n"),GetName()); + CPrintF(TRANS("%s Set the second condition target goddammit\n"),(const char *)GetName()); } } @@ -317,7 +317,7 @@ functions: } }else{ if(m_bDebug){ - CPrintF(TRANS("%s:Second Condition Pointer not set, checking if %s.%s exists instead\n"),m_strName,((CEntity&)*m_penifCondition1).GetName(),m_strProperty1); + CPrintF(TRANS("%s:Second Condition Pointer not set, checking if %s.%s exists instead\n"),(const char *)m_strName,(const char *)((CEntity&)*m_penifCondition1).GetName(),(const char *)m_strProperty1); } if(penPointer!=NULL){ bResult=TRUE; @@ -349,7 +349,7 @@ functions: }else{ be=true; if(m_bDebug){ - CPrintF(TRANS("%s : Unsupported Data Type\n"),m_strName); + CPrintF(TRANS("%s : Unsupported Data Type\n"),(const char *)m_strName); } } } @@ -360,20 +360,20 @@ functions: if(bResult){ if(m_penifTarget){ if(m_bDebug){ - CPrintF(TRANS("%s: Triggering if Target:%s\n"),m_strName,m_penifTarget->GetName()); + CPrintF(TRANS("%s: Triggering if Target:%s\n"),(const char *)m_strName,(const char *)m_penifTarget->GetName()); } m_penifTarget->SendEvent(ETrigger()); }else if(m_bDebug){ - CPrintF(TRANS("%s: Result=TRUE, but no if Target to trigger\n"),m_strName); + CPrintF(TRANS("%s: Result=TRUE, but no if Target to trigger\n"),(const char *)m_strName); } }else{ if(m_penelseTarget){ if(m_bDebug){ - CPrintF(TRANS("%s: Triggering else Target:%s\n"),m_strName,m_penelseTarget->GetName()); + CPrintF(TRANS("%s: Triggering else Target:%s\n"),(const char *)m_strName,(const char *)m_penelseTarget->GetName()); } m_penelseTarget->SendEvent(ETrigger()); }else if(m_bDebug){ - CPrintF(TRANS("%s: Result=FALSE, but no else Target to trigger\n"),m_strName); + CPrintF(TRANS("%s: Result=FALSE, but no else Target to trigger\n"),(const char *)m_strName); } } } diff --git a/Sources/GameMP/Game.cpp b/Sources/GameMP/Game.cpp index 1dfc9ea..380d3e5 100644 --- a/Sources/GameMP/Game.cpp +++ b/Sources/GameMP/Game.cpp @@ -2055,7 +2055,7 @@ static void PrintStats( CDrawPort *pdpDrawPort) strColon.PrintF( ":"); pdpDrawPort->PutTextR( strColon, slDPWidth*0.707f, slDPHeight*0.97f, C_WHITE|CT_OPAQUE); pdpDrawPort->SetTextScaling( 0.6f*fTextScale); - strAMPMOut.PrintF( "%s", strAMPM); + strAMPMOut.PrintF( "%s", (const char*)strAMPM); pdpDrawPort->PutTextR( strAMPMOut, slDPWidth*0.757f, slDPHeight*0.979f, C_WHITE|CT_OPAQUE); }