From 3783f7242d204c3ef1c2afe38839ff3bfe11ec50 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Tue, 4 Mar 2014 09:35:17 +0000 Subject: Bring back classic mode, fix several minor bugs. --- CHANGELOG.TXT | 7 ++++++- hge/system.cpp | 2 +- levels.h | 7 ++++--- main.cpp | 1 + menus.h | 26 +++++++++++++++----------- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 3ee7b53..5d8810e 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -2,7 +2,8 @@ Next version: 0.7.2-2_PR/0.7.3-0_PR TODOs: -Couple of tests, new levels, pre-release preparation. +Test classic mode, difficulty adjustments. +P.S.: Level 1 may be too hard now. There's only one level left before the next pre-release version!! 0.7.x-x_PR will be another public pre-release version. @@ -16,6 +17,10 @@ extending libcgh and bump its version at the same time.(*2) Put the new level to the correct place. Bring back "Minesweeper" level, adjust it to the new interfaces. Convert Bullet from struct to class. +Bring back Classic Mode. There are no "easy", "normal" or "hard" +now, there's only "classic"! Fix problems with the classic mode in +the new code base. +Fixed a bug appeared after the levels were put together. Other minor changes to the level WOP. Minor cleanups and code style adjustments. Add missing free's and delete's. diff --git a/hge/system.cpp b/hge/system.cpp index 5ec280a..e6fa158 100644 --- a/hge/system.cpp +++ b/hge/system.cpp @@ -111,7 +111,7 @@ bool CALL HGE_Impl::System_Initiate() } #else - system("uname -s -r -m > os.out"); + system("uname -s -v -m > os.out"); char osv[100];FILE* a=fopen("os.out","r");fgets(osv,50,a);fclose(a); osv[strlen(osv)-1]='\0'; System_Log("%s: OS: %s",SYSTEM_SRC_FN,osv); diff --git a/levels.h b/levels.h index d0a165b..1c4187a 100644 --- a/levels.h +++ b/levels.h @@ -45,9 +45,10 @@ double towers[16];int tcnt; double dscroll,roll; bool sout,tendone;bool dmt[16]; //static const char* LEVEL_H_FN="levels.h"; +void Level1Part0(){++part;} void Level1Part1() { - if ((tower[CreateTower1(400,300,857,2)].RendColor>>24)>=0x80)IfCallLevel=false; + CreateTower1(400,300,857,2); frameleft=AMinute*2; tcnt=1;sout=false;dscroll=-0.025f;memset(dmt,true,sizeof(dmt)); for (int i=0;iAddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Same as the third one")); + StartGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Classic")); StartGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Not Available!!")); StartGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Same as the second one")); StartGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Free Play Mode")); @@ -41,21 +41,24 @@ void StartGUI_FrameFnk() switch (id) { case 1: - /*playerpos.x=400,playerpos.y=400,playerrot=0; - frameleft=TenSeconds; - level=1,part=1;frms=0,averfps=0.0;restarts=0;bsscale=0.75; - towcnt=bulcnt=0; - mode=4; - score=0; - coll=semicoll=clrusg=0; + playerpos.x=400,playerpos.y=400,playerrot=0; + frameleft=ThirtySeconds;infofade=0xFF;Dis8ref=t8special=false; + level=1,part=1;frms=0,averfps=0.0;bsscale=1; + towcnt=bulcnt=0;whrcnt=12;skyactive=false; + score=0;Mult_Init();//Music_Init("./Resources/Music/CanonTechno.ogg"); + lpst=4625568;lped=9234584;//Music_Play(); + coll=semicoll=clrusg=0;playerLockX=playerLockY=false; + Lock.Init(2); + //Lock.SetTexture(SprSheet,151,264,2,8); clrrad=pi/2;clrrange=0; memset(tower,0,sizeof(tower)); memset(bullet,0,sizeof(bullet)); Complete=false; - Refliction=false; + Current_Position=1; Level1Part1(); IfCallLevel=true; - break;*/ + mode=1; + break; case 2: /*playerpos.x=400,playerpos.y=400,playerrot=0; frameleft=TenSeconds; @@ -157,11 +160,12 @@ void DeathGUI_FrameFnk() { case 7: IfCallLevel=true; + IfShowTip=true; Current_Position=1; DeathGUI->Leave(); score=-abs(score); ++restarts; - part=1; + part=0; clockrot=deltarot=0; coll=towcnt=bulcnt=0; DisableAllTower=DisablePlayer=false; -- cgit v1.2.3