summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-05-25 03:54:56 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-05-25 03:54:56 +0000
commitd747c360427071a329bed01b1fb33aab6b87c568 (patch)
treec9bef1b080cf7eeaca86610a9c2dfe7966f0b7ed /main.cpp
parent63832a6bea48ad70b3507ee2d39036b81243d567 (diff)
downloadbullet-lab-remix-d747c360427071a329bed01b1fb33aab6b87c568.tar.xz
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...
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index e083558..eb47dc0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -37,6 +37,7 @@
#include <hgegui.h>
#include <hgedistort.h>
#include <hgerect.h>
+#include <cassert>
#include <cmath>
#include <ctime>
#include <cstdlib>
@@ -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();