mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 12:55:34 +00:00
Compilation fixes for C++20
This commit is contained in:
parent
e16351605b
commit
1940becb2d
40 changed files with 220 additions and 211 deletions
|
|
@ -443,7 +443,7 @@ bool afxMagicMissileData::onAdd()
|
|||
{
|
||||
// Tokenize input string and convert to Point3F array
|
||||
//
|
||||
Vector<char*> dataBlocks(__FILE__, __LINE__);
|
||||
Vector<String> dataBlocks(__FILE__, __LINE__);
|
||||
|
||||
// make a copy of points_string
|
||||
dsize_t tokCopyLen = dStrlen(wiggle_axis_string) + 1;
|
||||
|
|
|
|||
|
|
@ -258,9 +258,9 @@ void afxSpellBook::unpackUpdate(NetConnection * con, BitStream * stream)
|
|||
}
|
||||
}
|
||||
|
||||
#define SPELL_DATA_NOT_FOUND "\n<just:center><font:Arial:20><color:FF0000>** Spell data not found **\n\n\n\n"
|
||||
#define SPELL_DATA_NOT_FOUND "\n<just:center><font:Arial:20><color:FF0000>** Spell data not found **\n\n\n\n";
|
||||
|
||||
char* afxSpellBook::formatDesc(char* buffer, int len, S32 page, S32 slot) const
|
||||
const char* afxSpellBook::formatDesc(char* buffer, int len, S32 page, S32 slot) const
|
||||
{
|
||||
S32 idx = mDataBlock->getPageSlotIndex(page, slot);
|
||||
if (idx < 0 || !mDataBlock->rpg_spells[idx])
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
static void initPersistFields();
|
||||
|
||||
S32 getPageSlotIndex(S32 page, S32 slot);
|
||||
char* formatDesc(char* buffer, int len, S32 page, S32 slot) const;
|
||||
const char* formatDesc(char* buffer, int len, S32 page, S32 slot) const;
|
||||
const char* getSpellIcon(S32 page, S32 slot) const;
|
||||
bool isPlaceholder(S32 page, S32 slot) const;
|
||||
afxMagicSpellData* getSpellData(S32 page, S32 slot);
|
||||
|
|
|
|||
|
|
@ -328,9 +328,9 @@ void afxSpellButton::setPage(U8 page)
|
|||
update_bitmap();
|
||||
}
|
||||
|
||||
char* afxSpellButton::formatDesc(char* buffer, int len) const
|
||||
const char* afxSpellButton::formatDesc(char* buffer, int len) const
|
||||
{
|
||||
return (spellbook) ? spellbook->formatDesc(buffer, len, book_slot.x, book_slot.y) : (char*)"";
|
||||
return (spellbook) ? spellbook->formatDesc(buffer, len, book_slot.x, book_slot.y) : "";
|
||||
}
|
||||
|
||||
afxMagicSpellData* afxSpellButton::getSpellDataBlock() const
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
void setBitmap(const char *name, bool placholder=false);
|
||||
void setSpellBook(afxSpellBook*, U8 page);
|
||||
void setPage(U8 page);
|
||||
char* formatDesc(char* buffer, int len) const;
|
||||
const char* formatDesc(char* buffer, int len) const;
|
||||
|
||||
afxMagicSpellData* getSpellDataBlock() const;
|
||||
afxRPGMagicSpellData* getSpellRPGDataBlock() const;
|
||||
|
|
|
|||
|
|
@ -225,20 +225,6 @@ afxXM_Base* afxXM_OscillateData::create(afxEffectWrapper* fx, bool on_server)
|
|||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
inline F32 lerp(F32 t, F32 a, F32 b)
|
||||
{
|
||||
return a + t * (b - a);
|
||||
}
|
||||
|
||||
inline Point3F lerpV(F32 t, const Point3F& a, const Point3F& b)
|
||||
{
|
||||
return Point3F( a.x + t * (b.x - a.x),
|
||||
a.y + t * (b.y - a.y),
|
||||
a.z + t * (b.z - a.z) );
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
afxXM_Oscillate_rot::afxXM_Oscillate_rot(afxXM_OscillateData* db, afxEffectWrapper* fxw)
|
||||
: afxXM_WeightedBase(db, fxw)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public:
|
|||
virtual void interpolate(F32 t, afxXM_Params& params)=0;
|
||||
virtual void pulse()=0;
|
||||
|
||||
static F32 lerp(F32 t, F32 a, F32 b) { return a + t * (b - a); }
|
||||
static inline F32 lerp(F32 t, F32 a, F32 b) { return a + t * (b - a); }
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
|
|
@ -169,6 +169,19 @@ protected:
|
|||
public:
|
||||
/*C*/ afxXM_WeightedBase(afxXM_WeightedBaseData*, afxEffectWrapper*);
|
||||
virtual ~afxXM_WeightedBase() { }
|
||||
|
||||
F32 lerp(F32 t, F32 a, F32 b)
|
||||
{
|
||||
return a + t * (b - a);
|
||||
}
|
||||
|
||||
Point3F lerpV(F32 t, const Point3F& a, const Point3F& b)
|
||||
{
|
||||
return Point3F( a.x + t * (b.x - a.x),
|
||||
a.y + t * (b.y - a.y),
|
||||
a.z + t * (b.z - a.z) );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue