Skip to content

Commit

Permalink
Fixed building of the modification from under FreeBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Dec 26, 2022
1 parent 7b75bd0 commit 29af708
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 71 deletions.
10 changes: 5 additions & 5 deletions Sources/EntitiesMP/Common/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/Common/HUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
18 changes: 9 additions & 9 deletions Sources/EntitiesMP/Display.es
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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; iPlayer<GetMaxPlayers(); iPlayer++) {
Expand All @@ -274,15 +274,15 @@ procedures:
}
on (EStop):{
if(m_bDebug){
CPrintF(TRANS("%s: Recieved ETrigger from Player, removing all players from display list list.\n"),GetName());
CPrintF(TRANS("%s: Recieved ETrigger from Player, removing all players from display list list.\n"),(const char *)GetName());
}
CEntityPointer penPlayer;
for (INDEX iPlayer=0; iPlayer<GetMaxPlayers(); iPlayer++) {
penPlayer=GetPlayerEntity(iPlayer);
if(penPlayer!=NULL){
if(((CPlayer&)*penPlayer).m_dcDisplay.IsMember(this)){
if(m_bDebug){
CPrintF(TRANS("%s: Player found, removing us from display list.\n"),GetName());
CPrintF(TRANS("%s: Player found, removing us from display list.\n"),(const char *)GetName());
}
((CPlayer&)*penPlayer).m_dcDisplay.Remove(this);
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/KeyItem.es
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ procedures:
if (GetSP()->sp_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);
}
}

Expand Down
8 changes: 4 additions & 4 deletions Sources/EntitiesMP/PESpawnBattery.es
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ functions:
const CTString &GetDescription(void) const {
((CTString&)m_strDescription).PrintF("-><none>");
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 "; }
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/PESpawner.es
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ functions:
const CTString &GetDescription(void) const {
((CTString&)m_strDescription).PrintF("-><none>");
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 "; }
Expand Down
6 changes: 3 additions & 3 deletions Sources/EntitiesMP/Player.es
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions Sources/EntitiesMP/PlayerActionMarker.es
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/PlayerBotMarker.es
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ functions:
{
((CTString&)m_strDescription).PrintF("-><none>");
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;
}
Expand Down
Loading

0 comments on commit 29af708

Please sign in to comment.