fixed bam.lua

fixed some compiler warnings
This commit is contained in:
GreYFoXGTi 2010-10-27 01:17:11 +02:00
parent 8a3102233f
commit e7d6c67446
3 changed files with 5 additions and 5 deletions

View file

@ -16,7 +16,7 @@ config:Finalize("config.lua")
-- data compiler -- data compiler
function Script(name) function Script(name)
if family == "windows" then if family == "windows" then
str_replace(name, "/", "\\") return str_replace(name, "/", "\\")
end end
return "python " .. name return "python " .. name
end end

View file

@ -76,7 +76,7 @@ void CCollision::Init(class CLayers *pLayers)
} }
// DDRace tiles // DDRace tiles
if(Index == TILE_THROUGH || Index >= TILE_FREEZE && Index<=TILE_BOOSTS || Index >= TILE_TELEIN && Index<=TILE_STOPA || Index >= TILE_CP_D && Index<=TILE_NPH) if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index<=TILE_BOOSTS) || (Index >= TILE_TELEIN && Index<=TILE_STOPA) || (Index >= TILE_CP_D && Index<=TILE_NPH))
m_pFront[i].m_Index = Index; m_pFront[i].m_Index = Index;
} }
} }
@ -119,7 +119,7 @@ int CCollision::GetPureMapIndex(vec2 Pos)
return ny*m_Width+nx; return ny*m_Width+nx;
} }
std::list<int> CCollision::GetMapIndices(vec2 PrevPos, vec2 Pos, int MaxIndices) std::list<int> CCollision::GetMapIndices(vec2 PrevPos, vec2 Pos, unsigned MaxIndices)
{ {
std::list< int > Indices; std::list< int > Indices;
float d = distance(PrevPos, Pos); float d = distance(PrevPos, Pos);
@ -574,7 +574,7 @@ int CCollision::IsThrough(int x, int y)
int nx = clamp(x/32, 0, m_Width-1); int nx = clamp(x/32, 0, m_Width-1);
int ny = clamp(y/32, 0, m_Height-1); int ny = clamp(y/32, 0, m_Height-1);
int Index = m_pTiles[ny*m_Width+nx].m_Index; int Index = m_pTiles[ny*m_Width+nx].m_Index;
int Findex; int Findex = 0;
if (m_pFront) if (m_pFront)
Findex = m_pFront[ny*m_Width+nx].m_Index; Findex = m_pFront[ny*m_Width+nx].m_Index;
if (Index == TILE_THROUGH) if (Index == TILE_THROUGH)

View file

@ -50,7 +50,7 @@ public:
int Entity(int x, int y, bool Front); int Entity(int x, int y, bool Front);
//DDRace //DDRace
int GetPureMapIndex(vec2 Pos); int GetPureMapIndex(vec2 Pos);
std::list<int> GetMapIndices(vec2 PrevPos, vec2 Pos, int MaxIndices = 0); std::list<int> GetMapIndices(vec2 PrevPos, vec2 Pos, unsigned MaxIndices = 0);
vec2 GetPos(int Index); vec2 GetPos(int Index);
int GetTileIndex(int Index); int GetTileIndex(int Index);
int GetFTileIndex(int Index); int GetFTileIndex(int Index);