From d747c360427071a329bed01b1fb33aab6b87c568 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Sun, 25 May 2014 03:54:56 +0000 Subject: Content freeze -- nothing will be added or removed any more (music etc excluded). Fix build failure in Archlinux. Fix font issue in Archlinux. realloc may change the base address... That's the cause of the crashes... --now removing all Bullet* based implementations. Affected parts: Assessment: Constant patterns, pinball All parts in level 2. L4P2, and more L5P5~6 L-1P17 L-1P19 L3P3 L7P12 L7P14 L7P25 Avoid memory leaks... I don't know if they have been really fixed... --- main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index e083558..eb47dc0 100644 --- a/main.cpp +++ b/main.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1251,7 +1252,8 @@ int main(int argc,char *argv[]) #ifdef WIN32 if(!rbPanelFont.Init("C:/Windows/Fonts/cour.ttf",18))return 1; #else - if(!rbPanelFont.Init("/usr/share/fonts/truetype/freefont/FreeMono.ttf",18))return 1; + if(!rbPanelFont.Init("/usr/share/fonts/truetype/freefont/FreeMono.ttf",18)) + if(!rbPanelFont.Init("/usr/share/fonts/TTF/FreeMono.ttf",18))return 1; #endif fnt=new hgeFont("./Resources/charmap.fnt"); MenuFont=new hgeFont("./Resources/charmap.fnt"); @@ -1296,7 +1298,7 @@ int main(int argc,char *argv[]) hge->System_Log("%s: Starting from Level%dPart%d",MAIN_SRC_FN,startLvl,startPrt); playerpos.x=400,playerpos.y=400,playerrot=0; frameleft=ThirtySeconds;infofade=0xFF;Dis8ref=t8special=false; - level=startLvl,part=startPrt;frms=0,averfps=0.0;bsscale=1; + level=startLvl,part=startPrt;frms=0,averfps=0.0;bsscale=1;DBGColor=0xFF000000; if(bullet){free(bullet);bullet=NULL;} towcnt=bulcnt=0;whrcnt=12;skyactive=false;PlayerSplit=false; score=0;Mult_Init();//Music_Init("./Resources/Music/CanonTechno.ogg"); @@ -1323,6 +1325,7 @@ int main(int argc,char *argv[]) hge->Texture_Free(SprSheet);hge->Texture_Free(TLeaf); hge->Texture_Free(quad.tex);hge->Texture_Free(TSflake); hge->Texture_Free(TexTitle);hge->Texture_Free(TexCredits); + if(bullet){free(bullet);bullet=NULL;} } hge->System_Shutdown(); hge->Release(); -- cgit v1.2.3