aboutsummaryrefslogtreecommitdiff
path: root/archive/blr1
diff options
context:
space:
mode:
Diffstat (limited to 'archive/blr1')
-rw-r--r--archive/blr1/ChangeLog40
-rw-r--r--archive/blr1/Compiling.txt9
-rw-r--r--archive/blr1/Compiling_zh.txt9
-rw-r--r--archive/blr1/README.txt178
-rw-r--r--archive/blr1/README_zh.txt166
-rw-r--r--archive/blr1/VERSION.txt1
-rw-r--r--archive/blr1/resources/bg.pngbin0 -> 261 bytes
-rw-r--r--archive/blr1/resources/blnsns.pngbin0 -> 9928 bytes
-rw-r--r--archive/blr1/resources/charmap.fnt99
-rw-r--r--archive/blr1/resources/credits.pngbin0 -> 3281111 bytes
-rw-r--r--archive/blr1/resources/ss1.pngbin0 -> 25257 bytes
-rw-r--r--archive/blr1/resources/ss2.pngbin0 -> 49339 bytes
-rw-r--r--archive/blr1/resources/tap.oggbin0 -> 3626 bytes
-rw-r--r--archive/blr1/resources/title.pngbin0 -> 822432 bytes
-rw-r--r--archive/blr1/src/effects.h88
-rw-r--r--archive/blr1/src/global.h297
-rw-r--r--archive/blr1/src/levels.h1880
-rw-r--r--archive/blr1/src/loading.h384
-rw-r--r--archive/blr1/src/main.cpp510
-rw-r--r--archive/blr1/src/menuitem.cpp201
-rw-r--r--archive/blr1/src/menuitem.h46
-rw-r--r--archive/blr1/src/menus.h742
-rw-r--r--archive/blr1/src/scorec.h252
-rw-r--r--archive/blr1/src/towernbullet.h983
24 files changed, 5885 insertions, 0 deletions
diff --git a/archive/blr1/ChangeLog b/archive/blr1/ChangeLog
new file mode 100644
index 0000000..6125f79
--- /dev/null
+++ b/archive/blr1/ChangeLog
@@ -0,0 +1,40 @@
+0.5.3
+-Fixed a problem in bullet position calculating.
+0.5.4
+-Replaces arc- functions to make calculating more efficient.
+0.7.0
+-Levels->7
+0.7.4
+-Clear range added
+0.8.4
+-Limiting clear range usage. Freezing Level design.
+0.8.6
+-Adding readme files. Fixing small bugs in program.
+-Semi-Collision Effects.
+0.8.7α
+-Spliting main.cpp into mulitiple headers.
+-Compressing resources.
+-Removing dependency of Bass.dll
+0.8.8α
+-Maintaince version.
+0.8.9α
+-Rewriting menus, pause etc. added.
+-Highscore recording. Basic level complete information.
+-Average FPS.
+-Preparation for porting to Linux.
+1.0.0 Pre-Release
+-Upgrading hge graphic engine to DirectX9.
+-Removing some cheats.
+-Linux version built successfully(using hge-unix).
+1.0.1 Pre-Release
+-Embedding HGE into project, getting rid of hge.dll
+-Merging configuration program.
+-Adding first start up configuration, no initial configuration file needed.
+1.0.2 Pre-Release
+-Sync code with Bullet Lab Remix II.
+-Status->Main Functions Frozen+Core Frozen+Level Frozen.
+-Fix some bugs with the keyboard and the render engine.
+-Trying SFX and Music.
+1.0.3 Stable Release
+-Fix hidden bullets.
+-Build up for final release. \ No newline at end of file
diff --git a/archive/blr1/Compiling.txt b/archive/blr1/Compiling.txt
new file mode 100644
index 0000000..b883265
--- /dev/null
+++ b/archive/blr1/Compiling.txt
@@ -0,0 +1,9 @@
+Compiling BLR under Linux
+1. Get HGE UNIX here: http://icculus.org/hge-unix/.
+2. Replace the same files in hge-unix using the files in /hgehack.
+3. Compile and install hge-unix.
+4. Run compile if hge-unix has been successfully installed.
+5. Enjoy BLR by executing BulletLabRemix!
+If you have any problem compiling BLR, just write a feedback.
+Email: chirs241097@163.com
+Forum: http://tieba.baidu.com/f?kw=chrisoft \ No newline at end of file
diff --git a/archive/blr1/Compiling_zh.txt b/archive/blr1/Compiling_zh.txt
new file mode 100644
index 0000000..8f3acf8
--- /dev/null
+++ b/archive/blr1/Compiling_zh.txt
@@ -0,0 +1,9 @@
+在Linux下编译BLR
+1. 获取HGE-UNIX: http://icculus.org/hge-unix/。
+2. 用/hgehack内的文件替换hge-unix里的同名文件。
+3. 编译并安装hge-unix。
+4. 如果hge-unix已经成功安装,运行compile脚本。
+5. 运行BulletLabRemix!
+如果你在编译时遇到了任何问题,请与作者联系。
+Email: chirs241097@163.com
+贴吧: http://tieba.baidu.com/f?kw=chrisoft
diff --git a/archive/blr1/README.txt b/archive/blr1/README.txt
new file mode 100644
index 0000000..e5b1ddc
--- /dev/null
+++ b/archive/blr1/README.txt
@@ -0,0 +1,178 @@
+/*************************************\
+ * Bullet Lab Remix HGE 1.0.3 *
+ * The Creature of Colour *
+ * CopyLeft Chris Xiong *
+ * Readme File for binary release *
+\*************************************/
+*************************************************************
+First, I'm glad to annonce the first stable release of BLR.
+After three and a half of lazy work, BLR1 Stable came out at last.
+Well, this is just the start. Let's expect BLR2!
+*************************************************************
+WARNING: Everything works correctly on my computer, but I can't guarantee the same
+thing will happen on your computer!
+----------------------------------------------------------------------------------
+Why I am writting this "Game":
+
+-Do not care details...
+----------------------------------------------------------------------------------
+Attention: If you are using Linux, just ignore this and read Compiling.txt
+Basic requirements of this game:
+
+Hardware requirements:
+CPU: Better than none.
+RAM: If you are using Windows XP+, you can ignore this.
+GPU: Any GPU supporting DirectX 9 is okay.
+A keyboard is necessary. Although this game doesn't use a mouse to control, you'd
+better have one to use your operating system...
+
+Software requirements:
+If your computer is not from the last century and the game wouldn't start, check...
+If DirectX 9 Runtime is installed.
+If you are using Windows XP or later version.
+
+Something else...:
+CheatEngine (Optional, recommended for people who are urgent to highscores.)
+No Trypophobia! (Important!!)
+
+Additional:
+To run it in High FPS mode (much better experience than Low FPS mode)
+-Turn on "Lock FPS to the highest level" in BLR config
+-Configure your GPU correctly. A mis-configured GPU can cause many problems...
+-Have a stronger CPU. Quad core is recommended.
+
+If FPS is only around 500... Just give it up... Turn on Low FPS mode in BLR config.
+
+Another small tip:
+I found that Intel HD Graphics always get the highest FPS easily...
+----------------------------------------------------------------------------------
+[Attention!]: The topic below is for those who have tried to play but failed.
+
+Operating with keyboard:
+Arrow keys: Move
+Shift+Arrow keys: Precise move (If you ignore this you will probably NEVER pass easy)
+(Well, I was joking. You can "Continue" anyway.)
+Z (or X, determined in your configuration): Call Clear Range
+Z/Enter(In menus): Confirm
+Esc(In game): Pause
+
+Collision & "Semi-collision":
+Only a VERY close distance will be treat as a collision (about 2 pixels, imagine that.)
+Other bullets passed by you(in 4 pixels) will be treat as a semi-collision, which would
+plus your score by 2000.
+
+Configuring the player:
+You can customize the player in the Player Profile menu.
+You can determine the player's moving speed(both in normal mode or precise mode).
+And a clear range bonus.
+You should know that you are customizing yourself in the limit of "Ability Points".
+----------------------------------------------------------------------------------
+Softwared used to develop Bullet Lab Remix:
+Visual Studio 2012 (Compiler)
+DirectX SDK (Aug. 2009)
+HGE (Packed DirectX APIs)
+Photosohop CS6 for graphic resources
+Inkscape for vector graphics
+Porting to Linux is also done by Chris Xiong, using Kwrite and Geany.
+----------------------------------------------------------------------------------
+Frequently Asked Questions and my own problems
+
+Q: ...The game crashes and quit automatically?
+A: I didn't have that problem... This may be caused by a wrong RAM access.
+ Make sure you have enough RAM to run this game.
+
+Q: It stopped working just before the menu appears...
+A: Well, I use "freopen" for file operations. M$ said that's not safe but I insisted..
+ Just be patient and restart the game.
+
+Q: Huge RAM usage?
+A: The main code uses less than 5 MB RAM. However, levels with too much bullets may
+ use a huge amount of RAM.
+
+Q: "Cannot decompress resources!"
+A: Resources used in this game have been compressed with Microsoft LZ compresss program.
+ If you meet this fault, check if there's already a folder called "Decompressed" in
+ the Resources folder. If so, delete it. (Now the program could delete it automatically
+ even the error has already been reported. So you may not find this folder. Just restart
+ the game)
+ If that doesn't work, check if "expand.exe" is included in your system.
+
+Q: Everything runs slowly!
+A: Check FPS which is displayed at the right bottom corner of the game. The game
+ should run at at least 850 FPS (In HighFPS mode).
+ If it is below 700 (at the menu scene), turn on Low FPS mode using the
+ configure application.
+ If it is fixed at 60 and it is running EXTREMELY slowly, try turn off vertical
+ sync first (in your graphics driver settings). If it doesn't work, turn on Low
+ FPS mode.
+ Please note that Low FPS mode may provide a horrible experience...
+
+Q: What is "Average FPS"?
+A: Average FPS is the average of FPS during the game(WTF!). It showed how your computer felt during
+ the game...
+
+Q: Tell me something about the UI.
+A: The main menu:
+ Start---------------Enter the difficulty selecting menu.
+ Highscore && Records--------Enter highscore view selecting menu.
+ Options--------------Enter options menu.
+ Credits--------------Show a long, dull credits list.
+ Exit---------------Parents are coming!!!
+ The difficulty selecting menu:
+ Easy---------------Difficulty without difficulty.
+ Normal--------------For most human-beings.
+ Extreme--------------Who would like to try?
+ Free Play Mode----------No deaths, go for highest score.
+ Back---------------Giving up?
+ The Options menu:
+ Fullscreen: ...----------Toggle fullscreen, the settings will be applied after restarting the game.
+ FPS Level: ...-------------Toggle FPS level mode. Possible modes are: Low FPS, Highest and Natural.
+Use Key . for Clear Range------Change the key to call Clear Range.
+ Player Profile-------------Customize the player.
+ Back------------------Done setting, I'm ready!
+Tips:
+ If supported, you can toggle fullscreen in game by pressing Alt+Enter. However this won't affect your settings.
+ Use key Left/Right to adjust values in Player Profile page.
+
+Q: How to load default configuration?
+A: To load default configuration, just delete blr.cfg. Then start BLR, you can do your initial settings again.
+ Attention: YOUR SCORE FILE WILL BE CLEARED AS WELL!!
+
+Q: When I use a Clear Range, FPS falls terriblely.
+A: This is normal... Because the code of Clear Range is terribly inefficient...
+
+Q: Some levels are impossible to pass!
+A: That may be true... (I got the same result from some of the testers)
+ However this is an excuse, I think.
+
+Q: Ain't there any background?
+A: It is painful to think about a background...
+ So think about your own background... everyone will have his own version...(Chemistry Laboratory etc.)
+
+Q: Where to get the source code?
+A: The source code is terribly ugly...
+ However, when I release the binary version, I will also release a tarball of
+ the source code.
+ To be more creative, WRITE YOUR OWN CODE.
+----------------------------------------------------------------------------------
+Version History && Planning Versions
+For detailed information, view CHANGELOG.txt.
+
+1.0.3sr: Hope this fix for hidden bullets could work!
+1.0.2pr: Some input event fixes. Fixed a problem in the render engine. Get rid of the config program.
+1.0.1pr: Get rid of hge.dll. Merging hge into project.
+1.0.0pr: Fixing small bugs and cheats. Upgrading DirectX to DX9. Trying porting to Linux.
+0.8.9α : Adding a lot of lacking functions in earlier versions.
+0.8.8α : Small fixes for adding functions.
+0.8.7α : Preparation for 1.0.0, categorizing code, bug fixes, resoureces compression andadding some effects etc.
+0.8.6α : Second released version, small bugs fixed, a better icon for configure program.
+0.8.4α : First released version, most cheats are removed, level frozen version(No new levels will be added).
+0.7.4 : A developer only version, the game system is almost completed.
+0.7.0 : A developer only version, 7 levels available now.
+0.5.3 : A developer only version, 5 levels available now, added collision and semi-collision detection.
+0.2.1 : First tower, first bullet. 2 basic levels completed. Basic effects added.
+0.0.1 : Only a main menu!
+
+2013-5-11: Project Started
+Let's remember the great day!
+Thank everyone that waste time to test my poor project! \ No newline at end of file
diff --git a/archive/blr1/README_zh.txt b/archive/blr1/README_zh.txt
new file mode 100644
index 0000000..d4f8f25
--- /dev/null
+++ b/archive/blr1/README_zh.txt
@@ -0,0 +1,166 @@
+/*************************************\
+ * Bullet Lab Remix HGE 1.0.3 * ->后文将称其为BLR
+ * The Creature of Colour *
+ * 版权所无 Chris Xiong *
+ * 可执行文件自述 *
+\*************************************/
+*************************************************************
+首先,非常高兴地“宣布”BLR1的正式版终于可以发布了!
+经过三个半月的偷懒工作,BLR1的正式版终于出来了。。
+当然,这只是个开始。等待BLR2的开发吧!
+*************************************************************
+警告:不保证本程序在所有计算机上都能正常运行。
+----------------------------------------------------------------------------------
+为什么写这破玩意?
+
+-不要在意细节。。。
+----------------------------------------------------------------------------------
+注意:如果你正在使用Linux,无视这部分内容好了。直接去看Compiling_CHS.txt。
+运行BLR的基本要求:
+
+硬件需求
+CPU: 要比没有强。
+RAM: 如果你的操作系统能够启动,这项可以忽略。
+GPU: 任何支持DirectX9的GPU都行。
+键盘是必要的。虽然本游戏不需要鼠标来操作,你也最好用鼠标来使用来控制操作系统。。。
+
+软件需求
+如果你的电脑不是从上世纪来的,但是游戏仍无法启动,检查:
+DirectX9运行库是否已经安装
+你运行的是否是Windows XP或以后的版本。
+
+其他
+CheatEngine (非必需。这是为那些特别想要高分的人准备的)
+没有密集恐惧症(非常重要!)
+
+附加条件:
+要想在高帧率模式下运行(1000FPS,流畅度自行想象),你需要:
+-在设置程序中打开"Lock FPS to the highest level"(将帧率锁定在最大值)
+-正确地设置你的GPU。错误的设置可能导致许多问题。。
+-要有一颗足够快的CPU,最好四核
+
+如果FPS只在500附近(或者更低),放弃吧。。。在设置程序内打开
+"Low FPS mode"(低帧率模式,60FPS)
+
+无意义内容:
+我发现Intel集成显卡总是非常容易地达到1000FPS。。。
+----------------------------------------------------------------------------------
+注意:以下内容是为尝试过但是失败了的人写的。
+
+如何用键盘操作:
+方向键:移动
+Shift+方向键:精确移动(如果你无视这个你可能永远无法通过Easy关)
+(当然,我只是开玩笑。无论如何你也可以选择继续。。。)
+Z(或者是X,取决于你的设置):调用Clear Range。
+(在菜单中)Z或回车:确认
+Esc(在游戏界面):暂停
+
+碰撞和所谓的半碰撞(<-自造词)
+只有【特别近】的接触将会被当作是碰撞(大于仅有两个像素,想象一下)
+其他从你附近飞过的子弹(约4像素)将会被当作“半碰撞”,每次将加分2000点。
+
+设置你所控制的小方块:
+你可以在玩家设定菜单自行决定小方块的属性。
+你可以设置的项目有移动速度(普通移动和精确移动速度都可以设定)和额外的Clear Range。
+当然,不能随便设置。需要在"Ability Points"(能力点)的限制之内。
+----------------------------------------------------------------------------------
+开发所用的软件
+Visual Studio 2012(编译器)
+DirectX SDK (Aug. 2009)
+HGE(封装DirectX接口)
+Photoshop CS6处理图形资源
+Inkscape处理矢量图
+移植到Linux的工作也是由作者自行完成的。使用了kwrite和Geany。
+----------------------------------------------------------------------------------
+常见问题和我自己的问题
+
+Q: 游戏崩溃了并自动退出。。
+A: 我没遇到过此类问题。。可能是由于错误的RAM存取。
+ 保证你有足够的内存。
+
+Q: 它在菜单出现前就停止工作。。。
+A: 我用了freopen来处理文件。微软说那可能不安全但我没有理他。重启游戏就好了。
+
+Q: 巨大的RAM开销。。
+A: 主程序仅占用5MB内存。但是,子弹太多的关卡可能用很多的RAM。
+
+Q: "Cannot decompress resources!"(无法解压资源!)
+A: 本游戏使用的资源已经使用微软的压缩程序压缩过了。如果你遇到了这个问题,检查游戏资源文件夹
+ (/Resources/)内是否已经有了一个叫做"Decompressed"的文件夹。如果有,删掉它。(即使已经报错,
+ 程序现在已经可以自动删掉它了,所以你可能找不到这个文件夹,重启游戏即可)
+ 如果那不管用,检查/system32里是否有expand.exe。
+
+Q: 一切都运行缓慢!
+A: 看看显示在右下角的FPS数。此游戏应该至少运行在850FPS(在高帧率模式下)。
+ 如果主菜单的FPS也小于700,用设置程序打开低帧率模式。
+ 如果帧率固定在60FPS并且运行【极其】缓慢,先试试关掉显卡的垂直同步。不行再用低帧率模式。
+ 请注意低帧率模式可能带来接近恐怖的体验。。。
+
+Q: 什么是"Average FPS"(平均帧率)?
+A: Average FPS就是平均帧率(什么玩意儿。。)。它表示了你的电脑的在游戏中的受罪程度。。。
+ (CPU压力什么的)
+
+Q: 界面上都是什么意思。。
+A: 主菜单:
+ Start---------------开始。进入难度选择界面
+ Highscore && Records--------高分和记录。在这里回顾高分(记录是数据,不是录像!)
+ Options--------------选项菜单
+ Credits--------------制作者。显示一个长而无聊的制作者名单(就一个“制作者”,对吧。。)
+ Exit---------------退出。家长来了!!!
+ 难度选择菜单:
+ Easy---------------没有难度的难度。
+ Normal--------------为大部分人准备的难度。
+ Extreme--------------谁愿意试试?
+ Free Play Mode----------不死模式,刷分专用。
+ Back---------------放弃了?
+ 选项菜单:
+ Fullscreen: ...----------切换全屏显示。重启游戏后生效。
+ FPS Level: ...-------------切换FPS模式。可能的选项为:Low FPS(低帧率),Highest(最高)和Natural(不限制)。
+Use key . for Clear Range------选择用X或者是Z键使用Clear Range
+ Player Profile-------------自定义玩家属性。
+ Back------------------完成设置。
+Tips:
+ 如果电脑支持,你可以在游戏中用Alt+回车来切换全屏。但这不会改写配置文件。
+ 在玩家设定页面内用左右键来调整数值。
+
+Q: 如何恢复原始设定?
+A: 只需要删除blr.cfg这个文件。然后启动BLR,就可以重新做初始化设定了。
+ 注意:你的分数文件也将被清空!
+
+Q: 用了Clear Range之后FPS严重下降。
+A: 这很正常。。Clear Range的代码效率不高。
+
+Q: 有些关过不了!
+A: 可能是真的吧(我从一些测试人员那里也得到了相同的结果)
+ 但是这可能是个借口,我想。(语序错乱)
+
+Q: 没有背景(所谓的background)?
+A: 想一个背景是痛苦的事情。。
+ 自己YY一个吧。。每个人都会有他自己的版本。。(化学实验室之类的)
+
+Q: 如何取得源代码?
+A: 代码写的非常丑陋。。
+ 但是每次发布可执行文件时,我也会发布一个源代码包。
+ 为了创新,【还是写自己的代码】。
+----------------------------------------------------------------------------------
+版本历史和以后的版本
+有关版本的详细信息,请见ChangeLog
+
+1.0.3sr: 希望这次解决隐藏子弹的方案没有问题。。
+1.0.2pr: 解决了一些键盘和渲染引擎的问题。将配置程序并入游戏中。
+1.0.1pr: 不再依赖hge.dll。将hge并入工程。
+1.0.0pr: 解决小的问题,封一部分cheats。升级DirectX到DX9。移植Linux版工作开始。
+0.8.9α : 添加了一堆早期版本缺失的功能。
+0.8.8α : 为添加功能做准备。
+0.8.7α : 为1.0.0做准备。代码分类,解决小问题,压缩资源并添加一些特效。
+0.8.6α : 第二个发布版本,解决了一部分问题。换了图标。
+0.8.4α : 第一个发布版本。移除了一部分内挂(。。。)。关卡冻结版本(不会再添加新的关卡)
+0.7.4 : 开发者版本。游戏系统已经基本完成。
+0.7.0 : 开发者版本。有7个关卡。
+0.5.3 : 开发者版本。已有5关。添加了碰撞检测。
+0.2.1 : 一切的开始。写完了两关。最基本的效果。
+0.0.1 : 菜单。。
+
+2013-5-11: 工程开始。
+让我们记住这伟大的一天!
+感谢所有浪费时间来测试这个烂工程的人! \ No newline at end of file
diff --git a/archive/blr1/VERSION.txt b/archive/blr1/VERSION.txt
new file mode 100644
index 0000000..245832a
--- /dev/null
+++ b/archive/blr1/VERSION.txt
@@ -0,0 +1 @@
+1.0.3 Stable release \ No newline at end of file
diff --git a/archive/blr1/resources/bg.png b/archive/blr1/resources/bg.png
new file mode 100644
index 0000000..bb0a8a2
--- /dev/null
+++ b/archive/blr1/resources/bg.png
Binary files differ
diff --git a/archive/blr1/resources/blnsns.png b/archive/blr1/resources/blnsns.png
new file mode 100644
index 0000000..8651ee1
--- /dev/null
+++ b/archive/blr1/resources/blnsns.png
Binary files differ
diff --git a/archive/blr1/resources/charmap.fnt b/archive/blr1/resources/charmap.fnt
new file mode 100644
index 0000000..4d90feb
--- /dev/null
+++ b/archive/blr1/resources/charmap.fnt
@@ -0,0 +1,99 @@
+[HGEFONT]
+
+Bitmap=blnsns.png
+
+Char=" ",1,1,3,30,-1,5
+Char="!",5,1,5,30,1,0
+Char=""",11,1,8,30,0,0
+Char="#",20,1,18,30,0,0
+Char="$",39,1,12,30,0,0
+Char="%",52,1,20,30,0,0
+Char="&",73,1,19,30,0,0
+Char="'",93,1,4,30,0,1
+Char="(",98,1,10,30,0,-1
+Char=")",109,1,10,30,-1,0
+Char="*",120,1,11,30,0,-1
+Char="+",132,1,12,30,-1,0
+Char=",",145,1,7,30,-1,0
+Char="-",153,1,10,30,0,0
+Char=".",164,1,6,30,0,0
+Char="/",171,1,10,30,-1,-1
+Char="0",182,1,16,30,0,0
+Char="1",199,1,7,30,0,1
+Char="2",207,1,15,30,-1,-1
+Char="3",223,1,14,30,-1,0
+Char="4",238,1,14,30,0,0
+Char="5",1,32,14,30,-1,0
+Char="6",16,32,14,30,0,0
+Char="7",31,32,14,30,-1,-1
+Char="8",46,32,13,30,-1,0
+Char="9",60,32,14,30,0,0
+Char=":",75,32,6,30,0,0
+Char=";",82,32,7,30,-1,0
+Char="<",90,32,10,30,0,0
+Char="=",101,32,12,30,0,0
+Char=">",114,32,10,30,0,0
+Char="?",125,32,12,30,-1,0
+Char="@",138,32,17,30,0,0
+Char="A",156,32,19,30,-1,0
+Char="B",176,32,16,30,1,0
+Char="C",193,32,17,30,0,-1
+Char="D",211,32,17,30,1,0
+Char="E",229,32,14,30,1,0
+Char="F",1,63,13,30,1,0
+Char="G",15,63,18,30,0,0
+Char="H",34,63,17,30,1,1
+Char="I",52,63,5,30,1,1
+Char="J",58,63,7,30,0,1
+Char="K",66,63,16,30,1,-1
+Char="L",83,63,13,30,1,0
+Char="M",97,63,19,30,1,1
+Char="N",117,63,17,30,1,1
+Char="O",135,63,20,30,0,0
+Char="P",156,63,16,30,1,0
+Char="Q",173,63,20,30,0,0
+Char="R",194,63,15,30,1,0
+Char="S",210,63,13,30,1,-1
+Char="T",224,63,15,30,0,-1
+Char="U",1,94,16,30,1,1
+Char="V",18,94,17,30,0,0
+Char="W",36,94,25,30,0,0
+Char="X",62,94,15,30,0,0
+Char="Y",78,94,17,30,-1,0
+Char="Z",96,94,15,30,-1,0
+Char="[",112,94,9,30,1,0
+Char="\",122,94,8,30,0,0
+Char="]",131,94,9,30,0,1
+Char="^",141,94,13,30,0,0
+Char="_",155,94,14,30,-1,-1
+Char="`",170,94,9,30,0,0
+Char="a",180,94,15,30,0,0
+Char="b",196,94,15,30,0,0
+Char="c",212,94,11,30,0,0
+Char="d",224,94,15,30,0,0
+Char="e",240,94,13,30,0,0
+Char="f",1,125,10,30,-2,0
+Char="g",12,125,14,30,0,0
+Char="h",27,125,14,30,0,0
+Char="i",42,125,6,30,0,-1
+Char="j",49,125,8,30,-2,-1
+Char="k",58,125,15,30,0,0
+Char="l",74,125,5,30,0,0
+Char="m",80,125,21,30,0,0
+Char="n",102,125,14,30,0,0
+Char="o",117,125,14,30,0,0
+Char="p",132,125,15,30,0,0
+Char="q",148,125,15,30,0,0
+Char="r",164,125,10,30,0,-1
+Char="s",175,125,8,30,0,0
+Char="t",184,125,11,30,-2,0
+Char="u",196,125,15,30,0,0
+Char="v",212,125,13,30,0,0
+Char="w",226,125,21,30,0,-1
+Char="x",1,156,12,30,0,0
+Char="y",14,156,13,30,0,0
+Char="z",28,156,12,30,0,-1
+Char="{",41,156,10,30,0,-1
+Char="|",52,156,4,30,1,2
+Char="}",57,156,10,30,-1,0
+Char="~",68,156,15,30,-1,-1
diff --git a/archive/blr1/resources/credits.png b/archive/blr1/resources/credits.png
new file mode 100644
index 0000000..14c2a49
--- /dev/null
+++ b/archive/blr1/resources/credits.png
Binary files differ
diff --git a/archive/blr1/resources/ss1.png b/archive/blr1/resources/ss1.png
new file mode 100644
index 0000000..19dd5c2
--- /dev/null
+++ b/archive/blr1/resources/ss1.png
Binary files differ
diff --git a/archive/blr1/resources/ss2.png b/archive/blr1/resources/ss2.png
new file mode 100644
index 0000000..5959cdf
--- /dev/null
+++ b/archive/blr1/resources/ss2.png
Binary files differ
diff --git a/archive/blr1/resources/tap.ogg b/archive/blr1/resources/tap.ogg
new file mode 100644
index 0000000..1ef00b0
--- /dev/null
+++ b/archive/blr1/resources/tap.ogg
Binary files differ
diff --git a/archive/blr1/resources/title.png b/archive/blr1/resources/title.png
new file mode 100644
index 0000000..b4205c2
--- /dev/null
+++ b/archive/blr1/resources/title.png
Binary files differ
diff --git a/archive/blr1/src/effects.h b/archive/blr1/src/effects.h
new file mode 100644
index 0000000..044a803
--- /dev/null
+++ b/archive/blr1/src/effects.h
@@ -0,0 +1,88 @@
+//Chrisoft Bullet Lab Remix HGE
+//Effects Implementations
+//"Copyleft" Chrisoft 2013
+void SCEffect_Attatch()
+{
+ int cnt=rand()%8+3;
+ for (int ii=1;ii<=cnt;++ii)
+ {
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=254;
+ bullet[i].bulletpos.x=playerpos.x;
+ bullet[i].bulletpos.y=playerpos.y;
+ bullet[i].bulletdir.x=rand()%100-50;
+ bullet[i].bulletdir.y=rand()%100-50;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=rand()%4+2;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,46,0,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ }
+}
+void SCEffect_Process()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=254)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ ++effskp;
+ if (effskp==7)
+ bullet[i].bulletspr->SetColor(bullet[i].bulletspr->GetColor()-0x1F000000),effskp=0;
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ ++effskp;
+ if (effskp==7)
+ bullet[i].bulletspr->SetColor(bullet[i].bulletspr->GetColor()-0x1000000),effskp=0;
+ }
+ //bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ //bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (GETA(bullet[i].bulletspr->GetColor())<=0x0A||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x,bullet[i].bulletpos.y,0,0.2,0);
+ }
+ }
+
+}
+void BulletEffect_Attatch(int n)
+{
+ bullet[n].scale=2;
+ bullet[n].effbrk=17;
+}
+void BulletEffect_Process(int n)
+{
+ if (bullet[n].scale<=1){bullet[n].scale=1;return;}
+ if (LOWFPS)
+ bullet[n].effbrk-=17;
+ else
+ --bullet[n].effbrk;
+ if (bullet[n].effbrk<=0)
+ bullet[n].scale-=0.04,bullet[n].effbrk=17;
+} \ No newline at end of file
diff --git a/archive/blr1/src/global.h b/archive/blr1/src/global.h
new file mode 100644
index 0000000..85804e8
--- /dev/null
+++ b/archive/blr1/src/global.h
@@ -0,0 +1,297 @@
+//Chrisoft Bullet Lab Remix HGE
+//Global varibles and implementations
+//"Copyleft" Chrisoft 2013
+#include "hge.h"
+#include "hgefont.h"
+#include "hgegui.h"
+HGE *hge=0;
+HEFFECT snd;
+HTEXTURE tex;
+hgeQuad quad;
+hgeGUI *gui;
+hgeFont *fnt;
+hgeSprite *spr,*titlespr;
+//Here are some Varibles in Bullet Lab
+int Current_Position;//Where are we now.
+/*Scenes:
+0: main menu
+1: game scene
+2: tip scene
+3: start menu
+4: about scene
+5: death scene
+6: complete scene
+7: new highscore scene
+8: highscore scene
+9: highscore view scene
+10: highscore details scene
+11: Pause scene
+12: BackToTitle Confirm
+13: Options scene
+14: Player Profile scene
+*/
+HTEXTURE SprSheet1,SprSheet2,TexTitle,TexCredits;
+/*
+Texture Mapping:
+SprSheet1:
+Player 47,46,24,24
+Cursor 24,46,24,24
+Blue 0,0,24,24
+Green 23,0,24,24
+Pnt 46,0,24,24
+Purple 0,23,24,24
+Red 23,23,24,24
+White 46,23,24,24
+Yellow 0,46,24,24
+SprSheet2:
+Blue 0,0,44,44
+Green 44,0,44,44
+Purple 88,0,44,44
+Red 0,44,44,44
+White 44,44,44,44
+Yellow 88,44,44,44
+*/
+const double zero=1e-3;
+struct vector2d
+{
+ double x,y;
+};
+struct Bullet
+{
+ hgeSprite *bulletspr;
+ vector2d bulletpos;
+ vector2d bulletdir;
+ double dist;
+ int bullettype;
+ int redexplo,redattrib,oriexplo,whicnt;
+ double bulletspeed;
+ bool exist;
+ double scale;
+ int whirem,whiskp,yelbrk;
+ int lifetime;
+ bool scollable;
+ int effbrk;
+}bullet[10000];
+//Something about bullets:
+//bullettype:
+//1: dir-based green bullet
+//2: degree-based blue bullet (for clocks only)
+//3: 12direction-based blue bullet
+//4: yellow chaser bullet
+//5: purple slow down bullet
+//6: red exploding bullet
+//7: white stalled bullet
+//8: black shading bullet (dummy in version 1)
+//254: Semi-collision effect
+//255: Score point
+struct Tower
+{
+ hgeSprite *towerspr;
+ vector2d towerpos;
+ int towertype;
+ int towertimer,curtimer;
+ double bulletspeed;
+ int redexplo,whicnt,yelbrk;
+ int t3t;
+ bool exist;
+ bool effect;
+}tower[100];
+//t3t is for Tower3
+//0:All 12 directions
+//1:four default directions
+//2:random left/right
+//3:random up/down
+struct Line
+{
+ vector2d pos;
+ double radian;
+ DWORD color;
+ bool exist;
+}line[12];
+//Line is currently dummy.
+int bulcnt=0,towcnt=0,linecnt=0;
+vector2d playerpos;
+double playerrot;
+double playerspeed;
+double playerslospeed;
+double playerfulspd=0.2;
+double playerfulslospd=0.05;
+double clockrot,deltarot,deltadelta;
+double whirot,dwhirot;
+hgeSprite *playerspr;
+int frameleft;
+int level,part,clrtime,clrbns;
+int coll,semicoll,mode,dsmc,restarts;
+double clrrange;
+bool IfCallLevel;
+bool DisableAllTower=false;
+bool DisablePlayer=false;
+int frameskips=0,stepskips=0;
+bool IfShowTip=false,FadeTip=false;
+hgeFont *TipFont;
+char lasttip[200];
+int p2t1,p2t2,p2t3,p2t4;
+int whicnt,shots,clrusg;
+bool yelattrib;
+bool LOWFPS=false,diffkey=false;
+bool Complete=false;
+bool Refliction=false;
+double linerad=0;
+double bsscale;
+long long score,scminus;
+int frms;double averfps;
+int plrspd,plrslospd;
+int TenSeconds=10000,TwentySeconds=20000,ThirtySeconds=30000,AMinute=60000;
+int effskp=0;
+hgeSprite *Credits,*CreditsRail;
+double scroll;
+bool tfs;
+int fpslvl;
+
+void Error(char EC[],bool hgecreated=false)
+{
+ fprintf(stderr,EC);
+ hge->System_Log(EC);
+ if (hgecreated)
+ {
+ hge->System_Shutdown();
+ hge->Release();
+ }
+ exit(0);
+}
+inline double GetDist(const vector2d a,const vector2d b)
+{
+ return sqrtf((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
+}
+void ShowTip(char tip[])
+{
+ if (strcmp(tip,lasttip)!=0)
+ {
+ TipFont->SetColor(0x00FFFFFF);
+ }
+ memcpy(lasttip,tip,sizeof(lasttip));
+ DisableAllTower=true;
+ DisablePlayer=true;
+ if (hge->Input_GetKeyStateEx(HGEK_Z)==HGEKST_HIT)
+ {
+ //DisableAllTower=false;
+ //DisablePlayer=false;
+ //Current_Position=1;
+ FadeTip=true;
+ }
+ double width=TipFont->GetStringWidth(tip);
+ TipFont->printf(400-width/2,400,HGETEXT_LEFT,tip);
+ if (FadeTip)
+ {
+ if (LOWFPS)
+ {
+ if (TipFont->GetColor()>>24>=0x08)
+ TipFont->SetColor(TipFont->GetColor()-0x8000000);
+ else
+ {
+ DisableAllTower=false;
+ DisablePlayer=false;
+ Current_Position=1;
+ }
+ }
+ else
+ {
+ if (TipFont->GetColor()>>24>=0x01)
+ TipFont->SetColor(TipFont->GetColor()-0x1000000);
+ else
+ {
+ DisableAllTower=false;
+ DisablePlayer=false;
+ Current_Position=1;
+ }
+ }
+ return;
+ }
+ if (!LOWFPS)
+ {
+ if (TipFont->GetColor()>>24<=0xFE)
+ TipFont->SetColor(TipFont->GetColor()+0x01000000);
+ }
+ else
+ {
+ if (TipFont->GetColor()>>24<=0xF7)
+ TipFont->SetColor(TipFont->GetColor()+0x08000000);
+ }
+}
+void ClearAll()
+{
+ DisableAllTower=true;
+ bool none=true;
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)continue;
+ if (LOWFPS)
+ {
+ if (tower[i].towerspr->GetColor()>>24>=0x08)
+ {
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()-0x8000000);
+ none=false;
+ }
+ }
+ else
+ {
+ if (tower[i].towerspr->GetColor()>>24>=0x01)
+ {
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()-0x1000000);
+ none=false;
+ }
+ }
+ }
+ if (none)
+ {
+ towcnt=0;
+ memset(tower,0,sizeof(tower));
+ }
+ none=true;
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (LOWFPS)
+ {
+ if (bullet[i].bulletspr->GetColor()>>24>=0x08)
+ {
+ bullet[i].bulletspr->SetColor(bullet[i].bulletspr->GetColor()-0x8000000);
+ none=false;
+ }
+ }
+ else
+ {
+ if (bullet[i].bulletspr->GetColor()>>24>=0x01)
+ {
+ bullet[i].bulletspr->SetColor(bullet[i].bulletspr->GetColor()-0x1000000);
+ none=false;
+ }
+ }
+ }
+ if (none)
+ {
+ bulcnt=0;
+ memset(bullet,0,sizeof(bullet));
+ }
+ none=true;
+ for (int i=1;i<=bulcnt;++i)if (bullet[i].bulletspr->GetColor()>>24>=0x3F){none=false;break;}
+ if (none)
+ bulcnt=0,memset(bullet,0,sizeof(bullet));
+}
+void SaySomethingAndBye(char *text)
+{
+ ClearAll();
+ DisableAllTower=false;
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip(text);
+ return;
+ }
+ Current_Position=0;
+ towcnt=bulcnt=0;
+ memset(tower,0,sizeof(tower));
+ memset(bullet,0,sizeof(bullet));
+ gui->Enter();
+}
diff --git a/archive/blr1/src/levels.h b/archive/blr1/src/levels.h
new file mode 100644
index 0000000..d706f4a
--- /dev/null
+++ b/archive/blr1/src/levels.h
@@ -0,0 +1,1880 @@
+//Chrisoft Bullet Lab Remix HGE
+//Level Implementations
+//"Copyleft" Chrisoft 2013
+void Level1Part1()
+{
+ //Level procedure
+ //Simple Level procedures should only run once during a level, you know.
+ if ((tower[CreateTower1(400,300,2000,1)].towerspr->GetColor()>>24)>=0x80)IfCallLevel=false;
+ Current_Position=2;
+ ShowTip("Welcome to Bullet Lab Remix...\nMove around and hit nothing, easy right?\n\Press Z to close these tips.");
+}
+void Level1Part2()
+{
+ frameleft=TenSeconds;
+ ++frameskips;
+ int secondtower=CreateTower1(567,300,2000,1);
+ if (tower[secondtower].towerspr->GetColor()==0x80FFFFFF)
+ tower[secondtower].towerspr->SetColor(0x00FFFFFF);
+ if (frameskips<10&&!LOWFPS&&!LOWFPS)return;
+ frameskips=0;
+ if ((tower[secondtower].towerspr->GetColor()>>24)<=0x80)
+ tower[secondtower].towerspr->SetColor(tower[secondtower].towerspr->GetColor()+0x01FFFFFF);
+ if (tower[1].towerpos.x>=233)--tower[1].towerpos.x;
+ if (tower[1].towerpos.x<233)
+ {
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Want another tower?");
+ IfCallLevel=false;
+ }
+ }
+}
+void Level1Part3()
+{
+ frameleft=TenSeconds;
+ tower[1].bulletspeed=4;
+ tower[1].towertimer=1500;
+ tower[2].bulletspeed=4;
+ tower[2].towertimer=1500;
+ IfCallLevel=false;
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Maybe faster bullets will kill you?");
+ IfCallLevel=false;
+ }
+}
+void Level1Part4()
+{
+ frameleft=TenSeconds;
+ tower[1].bulletspeed=2;
+ tower[1].towertimer=100;
+ tower[2].bulletspeed=2;
+ tower[2].towertimer=100;
+ IfCallLevel=false;
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("There are two things to tell you.\nFirst one is that this game has very\
+ loose collision detection.\nNext one is two machineguns are ready for\
+ the next level...");
+ IfCallLevel=false;
+ }
+}
+void Level2Part0()
+{
+ frameleft=50;
+ if (towcnt==2)
+ {
+ ClearAll();
+ return;
+ }
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ DisableAllTower=false;
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Level 2 - Divide and Conquer!");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ p2t1=p2t2=p2t3=p2t4=0;
+ return;
+ }
+}
+void Level2Part1()
+{
+ frameleft=TwentySeconds;
+ if (p2t1==0)p2t1=CreateTower1(399,299,1000,2);
+ if (p2t2==0)p2t2=CreateTower1(401,299,1000,2);
+ if (p2t3==0)p2t3=CreateTower1(399,301,1000,2);
+ if (p2t4==0)p2t4=CreateTower1(401,301,1000,2);
+ bool none=true;
+ if (!LOWFPS)
+ {
+ if (tower[p2t1].towerpos.x>=10)tower[p2t1].towerpos.x-=0.4075,none=false;
+ if (tower[p2t1].towerpos.y>=10)tower[p2t1].towerpos.y-=0.3,none=false;
+ if (tower[p2t2].towerpos.x<=766)tower[p2t2].towerpos.x+=0.3813,none=false;
+ if (tower[p2t2].towerpos.y>=10)tower[p2t2].towerpos.y-=0.3,none=false;
+ if (tower[p2t3].towerpos.x>=10)tower[p2t3].towerpos.x-=0.4453125,none=false;
+ if (tower[p2t3].towerpos.y<=566)tower[p2t3].towerpos.y+=0.3,none=false;
+ if (tower[p2t4].towerpos.x<=766)tower[p2t4].towerpos.x+=0.455859,none=false;
+ if (tower[p2t4].towerpos.y<=566)tower[p2t4].towerpos.y+=0.3,none=false;
+ }
+ else
+ {
+ if (tower[p2t1].towerpos.x>=10)tower[p2t1].towerpos.x-=0.4075*10,none=false;
+ if (tower[p2t1].towerpos.y>=10)tower[p2t1].towerpos.y-=0.3*10,none=false;
+ if (tower[p2t2].towerpos.x<=766)tower[p2t2].towerpos.x+=0.3813*10,none=false;
+ if (tower[p2t2].towerpos.y>=10)tower[p2t2].towerpos.y-=0.3*10,none=false;
+ if (tower[p2t3].towerpos.x>=10)tower[p2t3].towerpos.x-=0.4453125*10,none=false;
+ if (tower[p2t3].towerpos.y<=566)tower[p2t3].towerpos.y+=0.3*10,none=false;
+ if (tower[p2t4].towerpos.x<=766)tower[p2t4].towerpos.x+=0.455859*10,none=false;
+ if (tower[p2t4].towerpos.y<=566)tower[p2t4].towerpos.y+=0.3*10,none=false;
+ }
+ if (none)IfCallLevel=false;
+}
+void Level2Part2()
+{
+ frameleft=TenSeconds;
+ tower[p2t1].bulletspeed=tower[p2t2].bulletspeed=4;
+ tower[p2t3].bulletspeed=tower[p2t4].bulletspeed=4;
+ IfCallLevel=false;
+}
+void Level2Part3()
+{
+ frameleft=ThirtySeconds;
+ tower[p2t1].bulletspeed=tower[p2t2].bulletspeed=1;
+ tower[p2t3].bulletspeed=tower[p2t4].bulletspeed=1;
+ tower[p2t1].towertimer=tower[p2t2].towertimer=100;
+ tower[p2t3].towertimer=tower[p2t4].towertimer=100;
+ IfCallLevel=false;
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Got ready for being hunted by four machineguns?\n\
+Don't tell me you've got stuck just here...");
+ IfCallLevel=false;
+ }
+}
+void Level3Part0()
+{
+ frameleft=50;
+ if (towcnt==4&&(mode!=2))
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ if (mode==2)
+ ShowTip("Let's start from a higher position...\n\
+Level 3 - Blue Masters");
+ else
+ ShowTip("Time for something new now...\n\
+Level 3 - Blue Masters");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ return;
+ }
+}
+void Level3Part1()
+{
+ frameleft=ThirtySeconds;
+ ++frameskips;
+ if (towcnt==4)towcnt=0;
+ deltadelta=0.004363322313;
+ int towerclk=CreateTower2(400,300,100,1,true);
+ if (tower[towerclk].towerspr->GetColor()==0x80FFFFFF)
+ tower[towerclk].towerspr->SetColor(0x00FFFFFF);
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ if ((tower[towerclk].towerspr->GetColor()>>24)<=0x80)
+ tower[towerclk].towerspr->SetColor(tower[towerclk].towerspr->GetColor()+0x01FFFFFF);
+ else IfCallLevel=false;
+}
+//L3P2: /*Magic, DO NOT TOUCH!!*/
+void Level3Part2()
+{
+ frameleft=TenSeconds;
+ if (towcnt==1)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Are you scared?\nI'm just joking last time!");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower1(233,300,500,2);
+ CreateTower1(567,300,500,2);
+ int tmp=CreateTower3(100,100,1000,1,true);
+ tower[tmp].t3t=1;
+ tmp=CreateTower3(300,100,1000,1,true);
+ tower[tmp].t3t=1;
+ tmp=CreateTower3(500,100,1000,1,true);
+ tower[tmp].t3t=1;
+ tmp=CreateTower3(700,100,1000,1,true);
+ tower[tmp].t3t=1;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level3Part3()
+{
+ frameleft=TwentySeconds;
+ if (towcnt==6&&IfShowTip)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Got stuck in my pentagon...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower3(30,10,500,2,true);
+ CreateTower3(746,10,500,2,true);
+ CreateTower3(30,556,500,2,true);
+ CreateTower3(746,556,500,2,true);
+ for (int i=1;i<=4;++i)
+ tower[i].t3t=0;
+ CreateTower1(5,10,1000,2);
+ CreateTower1(771,10,1000,2);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level3Part4()
+{
+ frameleft=TwentySeconds;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towertype==3)tower[i].towertimer=300;else tower[i].towertimer=500;
+ int aa=CreateTower1(5,556,500,2);
+ int bb=CreateTower1(771,556,500,2);
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ if (tower[aa].towerspr->GetColor()==0x80FFFFFF)
+ tower[aa].towerspr->SetColor(0x00FFFFFF);
+ if (tower[bb].towerspr->GetColor()==0x80FFFFFF)
+ tower[bb].towerspr->SetColor(0x00FFFFFF);
+ if ((tower[aa].towerspr->GetColor()>>24)<=0x80)
+ tower[aa].towerspr->SetColor(tower[aa].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+ if ((tower[bb].towerspr->GetColor()>>24)<=0x80)
+ tower[bb].towerspr->SetColor(tower[bb].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level3Part5()
+{
+ frameleft=ThirtySeconds;
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ for (int i=1;i<=4;++i)tower[i].t3t=1;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towertype==1)
+ tower[i].towertimer=750;
+ bool none=true;
+ if (tower[1].towerpos.x<=120)++tower[1].towerpos.x,none=false;
+ if (tower[1].towerpos.y<=80)++tower[1].towerpos.y,none=false;
+ if (tower[2].towerpos.x>=660)--tower[2].towerpos.x,none=false;
+ if (tower[2].towerpos.y<=80)++tower[2].towerpos.y,none=false;
+ if (tower[3].towerpos.x<=120)++tower[3].towerpos.x,none=false;
+ if (tower[3].towerpos.y>=480)--tower[3].towerpos.y,none=false;
+ if (tower[4].towerpos.x>=660)--tower[4].towerpos.x,none=false;
+ if (tower[4].towerpos.y>=480)--tower[4].towerpos.y,none=false;
+ if (none)IfCallLevel=false;
+}
+void Level3Part6()
+{
+ frameleft=ThirtySeconds;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towertype==1)
+ tower[i].towertimer=1000,tower[i].bulletspeed=6;
+ IfCallLevel=false;
+}
+void Level3Part7()
+{
+ frameleft=ThirtySeconds;
+ if (towcnt==8)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("This part will be a great fun if the green tower didn't exist...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower1(400,540,750,3);
+ for (int i=1;i<=33;++i)
+ {
+ int tmp=CreateTower3(i*24-20,570,300,2);
+ tower[tmp].t3t=3;
+ }
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level4Part0()
+{
+ frameleft=50;
+ if (towcnt==34)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Someone is following you.\n\
+Level 4 - At the Pet Store");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ return;
+ }
+}
+void Level4Part1()
+{
+ frameleft=TenSeconds;
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower4(400,300,2000,2);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level4Part2()
+{
+ frameleft=TwentySeconds;
+ if (towcnt==1)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("May be they are kittens petted by you?..");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower4(30,10,2000,1);
+ CreateTower4(746,10,2000,1);
+ CreateTower4(30,556,2000,1);
+ CreateTower4(746,556,2000,1);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level4Part3()
+{
+ frameleft=TenSeconds;
+ if (towcnt==4)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower3(30,10,300,2);
+ CreateTower3(746,10,300,2);
+ CreateTower3(30,556,300,2);
+ CreateTower3(746,556,300,2);
+ for (int i=1;i<=4;++i)
+ tower[i].t3t=1;
+ CreateTower4(5,10,2000,2);
+ CreateTower4(771,10,2000,2);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level4Part4()
+{
+ frameleft=TwentySeconds;
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ tower[5].towertimer=tower[6].towertimer=1500;
+ bool none=true;
+ if (tower[1].towerpos.x<=120)++tower[1].towerpos.x,none=false;
+ if (tower[1].towerpos.y<=80)++tower[1].towerpos.y,none=false;
+ if (tower[2].towerpos.x>=660)--tower[2].towerpos.x,none=false;
+ if (tower[2].towerpos.y<=80)++tower[2].towerpos.y,none=false;
+ if (tower[3].towerpos.x<=120)++tower[3].towerpos.x,none=false;
+ if (tower[3].towerpos.y>=480)--tower[3].towerpos.y,none=false;
+ if (tower[4].towerpos.x>=660)--tower[4].towerpos.x,none=false;
+ if (tower[4].towerpos.y>=480)--tower[4].towerpos.y,none=false;
+ if (none)IfCallLevel=false;
+}
+void Level4Part5()
+{
+ frameleft=ThirtySeconds;
+ if (towcnt==6)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Keep your rhythm!");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower3(30,10,300,2);
+ CreateTower3(746,10,300,2);
+ CreateTower3(30,556,300,2);
+ CreateTower3(746,556,300,2);
+ CreateTower3(400,10,300,2);
+ CreateTower3(400,556,300,2);
+ CreateTower4(6,10,2000,2);
+ CreateTower4(760,10,2000,2);
+ CreateTower4(6,556,2000,2);
+ CreateTower4(760,556,2000,2);
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ if (tower[i].towertype==3)
+ tower[i].t3t=1;
+ }
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+
+}
+void Level4Part6()
+{
+ frameleft=ThirtySeconds;
+ if (towcnt==10)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Play with a kitten in the maze?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower4(400,540,3000,2);
+ for (int i=1;i<=33;++i)
+ {
+ int tmp=CreateTower3(i*24-20,570,500,2);
+ tower[tmp].t3t=3;
+ }
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level5Part0()
+{
+ frameleft=50;
+ if (towcnt==34)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Bullets that kill you won't move so fast...\n\
+Level 5 - A Huge Joke");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ return;
+ }
+}
+void Level5Part1()
+{
+ frameleft=TenSeconds;
+ if (towcnt==8)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ int tmp=CreateTower5(i*24-20,30,200,10);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level5Part2()
+{
+ frameleft=TwentySeconds;
+ if (towcnt==33)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower1(233,300,750,4);
+ CreateTower1(567,300,750,4);
+ for (int i=1;i<=33;++i)
+ int tmp=CreateTower5(i*24-20,30,500,4);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level5Part3()
+{
+ frameleft=ThirtySeconds;
+ if (towcnt==35)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower4(400,300,1000,2);
+ for (int i=1;i<=33;++i)
+ int tmp=CreateTower5(i*24-20,30,500,4);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level5Part4()
+{
+ frameleft=ThirtySeconds;
+ if (towcnt==34)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Avoiding is no longer an option.");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ int tmp=CreateTower1(i*24-20,30,500,4);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part0()
+{
+ frameleft=50;
+ if (towcnt==33)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Now you are going to meet my ultimate fire power...\n\
+Level 6 - The Great Clock");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ return;
+ }
+}
+void Level6Part1()
+{
+ frameleft=TwentySeconds;clrtime=0;
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower6(400,300,1000,2,1000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part2()
+{
+ frameleft=ThirtySeconds;clrtime=5;
+ if (towcnt==1)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Let's test the Advanced Bullet Script...\n\
+From now on you can use your Clear Ranges, try pressing Z in game.");
+ }
+ if (Current_Position==1)
+ {
+ ++part;
+ }
+}
+int Level6Part3_Child()
+{
+ ++stepskips;
+ if (stepskips<100)return 0;
+ stepskips=0;
+ if (towcnt==1){towcnt=0;return 0;}
+ CreateTower6(rand()%800,rand()%300,50,2,500);
+ return 1;
+}
+void Level6Part3()
+{
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ if (Level6Part3_Child())
+ {
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ return;
+ }
+ }
+}
+void Level6Part4()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (bulcnt!=0||towcnt!=5&&towcnt!=0)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Last level was very cool, wasn't it?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower6(400,300,750,2,1000);
+ CreateTower6(30,10,750,2,1000);
+ CreateTower6(746,10,750,2,1000);
+ CreateTower6(30,556,750,2,1000);
+ CreateTower6(746,556,750,2,1000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part5()
+{
+ frameleft=ThirtySeconds;clrtime=5;
+ if (bulcnt!=0||towcnt!=33)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("A row of fierce red tower?...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ int tmp=CreateTower6(i*24-20,30,3000,2,1000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part6()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (bulcnt!=0||towcnt!=37)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Enjoy the same maze.");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower6(30,10,1500,2,1000);
+ CreateTower6(746,10,1500,2,1000);
+ CreateTower6(30,556,1500,2,1000);
+ CreateTower6(746,556,1500,2,1000);
+ for (int i=1;i<=33;++i)
+ {
+ int tmp=CreateTower3(i*24-20,570,1000,2,true);
+ tower[tmp].t3t=3;
+ }
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part7()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (towcnt==37)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("You are supposed to leave now...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower4(30,10,2000,2);
+ CreateTower4(746,10,2000,2);
+ CreateTower4(30,556,2000,2);
+ CreateTower4(746,556,2000,2);
+ CreateTower3(120,80,300,2);
+ CreateTower3(660,80,300,2);
+ CreateTower3(120,480,300,2);
+ CreateTower3(660,480,300,2);
+ CreateTower1(400,30,500,2);
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ if (tower[i].towertype==3)tower[i].t3t=1;
+ }
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part8()
+{
+ frameleft=ThirtySeconds;clrtime=1;
+ if (towcnt==9)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("I don't think you can pass this easily...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower1(30,10,300,2);
+ CreateTower1(746,10,300,2);
+ CreateTower1(30,556,300,2);
+ CreateTower1(746,556,300,2);
+ CreateTower4(400,30,3000,3);
+ CreateTower3(900,900,999999,1);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level6Part9()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (towcnt!=2&&towcnt!=0)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Okay you survived...\n\
+But that was nothing much, more bombs is always the answer!");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower2(400,300,100,1);
+ CreateTower6(400,301,2000,1,1500);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part0()
+{
+ frameleft=50;
+ if (towcnt==2||bulcnt!=0)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Some freezy small objects are getting nearer...\n\
+Level 7 - Frozen Towers");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ return;
+ }
+}
+void Level7Part1()
+{
+ frameleft=ThirtySeconds;clrtime=0;
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ whicnt=10;
+ CreateTower7(400,300,1000,2,3000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part2()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (bulcnt!=0||(towcnt!=5&&towcnt!=0))
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Is it horrifying?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ whicnt=8;
+ CreateTower7(400,300,2000,1,3000);
+ CreateTower7(30,10,2000,1,3000);
+ CreateTower7(746,10,2000,1,3000);
+ CreateTower7(30,556,2000,1,3000);
+ CreateTower7(746,556,2000,1,3000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part3()
+{
+ frameleft=ThirtySeconds;clrtime=5;
+ if (towcnt==5)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Red & White.\n\
+Bloody snow?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ whicnt=5;
+ for (int i=1;i<=33;++i)
+ if (i&1)
+ CreateTower6(i*24-20,30,3000,2,1000);
+ else
+ CreateTower7(i*24-20,30,3000,2,1000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part4()
+{
+ frameleft=ThirtySeconds;clrtime=0;
+ if (towcnt==33||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Or this is only a bonus level?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ CreateTower1(i*24-20,30,1000,4),CreateTower1(i*24-20,567,1000,4);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part5()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (towcnt==66||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Wasn't that enough?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ CreateTower1(i*24-20,30,500,4),CreateTower5(i*24-20,567,500,4);
+ CreateTower3(900,900,999999,1);//Dummy tower for avoiding mis-clearing
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part6()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (towcnt==67||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("The impossible thing happened in the end...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ if (i&1)
+ CreateTower6(i*24-20,30,3000,1,1500),CreateTower5(i*24-20,567,500,3);
+ else
+ CreateTower5(i*24-20,567,500,3);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part7()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (towcnt==50||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Do you think you are fooled?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ whicnt=3;
+ for (int i=1;i<=33;++i)
+ if (i&1)
+ CreateTower7(i*24-20,30,2000,1,2000),CreateTower5(i*24-20,567,500,3);
+ else
+ CreateTower5(i*24-20,567,500,3);
+ CreateTower3(900,900,999999,1);//Dummy tower
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+
+}
+void Level7Part8()
+{
+ frameleft=ThirtySeconds;clrtime=5;
+ if (towcnt==51)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("I won't let you go easily...\n\
+But why?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ whicnt=2;
+ for (int i=1;i<=33;++i)
+ if (i&1)
+ CreateTower6(400,30,3000,1,2000);//,CreateTower5(i*24-20,567,2000,3);
+ else
+ CreateTower1(i*24-20,567,2000,3);//,CreateTower7(i*24-20,30,3000,1,2000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part9()
+{
+ frameleft=TwentySeconds;clrtime=1;
+ if (towcnt!=5&&towcnt!=0)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Let's relax a bit...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ CreateTower1(400,30,300,2);
+ CreateTower6(30,10,1000,2,1000);
+ CreateTower6(746,10,1000,2,1000);
+ CreateTower6(30,556,1000,2,1000);
+ CreateTower6(746,556,1000,2,1000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+
+}
+void Level7Part10()
+{
+ frameleft=ThirtySeconds;clrtime=3;
+ if (towcnt==5)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("I still can't let you go...\n\
+Just play with me! (And enjoy the double laby!)");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ for (int i=1;i<=33;++i)
+ {
+ int tmp=CreateTower3(i*24-20,570,500,2);
+ tower[tmp].t3t=3;
+ }
+ for (int i=1;i<=23;++i)
+ {
+ int tmp=CreateTower3(772,i*24,500,2);
+ tower[tmp].t3t=2;
+ }
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part11()
+{
+ frameleft=AMinute;clrtime=3;
+ if ((towcnt!=5&&towcnt!=0)||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("You will be full of holes after this level...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ whicnt=50;
+ CreateTower7(400,30,3000,1,3000);
+ CreateTower6(30,10,2000,1,2000);
+ CreateTower6(746,10,2000,1,2000);
+ CreateTower6(30,556,2000,1,2000);
+ CreateTower6(746,556,2000,1,2000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level7Part12()
+{
+ frameleft=AMinute;clrtime=3;
+ if ((towcnt!=6&&towcnt!=0)||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Well, here it is.");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ whicnt=50;
+ CreateTower7(400,30,3000,1,3000);
+ CreateTower6(400,300,2000,1,1500);
+ CreateTower1(30,10,2000,2);
+ CreateTower1(746,10,2000,2);
+ CreateTower1(30,556,2000,2);
+ CreateTower1(746,556,2000,2);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+
+}
+void Level8Part0()
+{
+ frameleft=50;
+ if (towcnt==6)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Welcome to the world that is only known by...masochism\n\
+Level 8 - Entertainment!");
+ IfCallLevel=false;
+ }
+ if (Current_Position==1)
+ {
+ frameleft=0;
+ return;
+ }
+}
+void Level8Part1()
+{
+ frameleft=ThirtySeconds;clrtime=0;
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower7(400,300,2500,8,750);
+ whicnt=25;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+
+}
+void Level8Part2()
+{
+ frameleft=TenSeconds;clrtime=3;
+ if (towcnt!=2&&bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Just another joke?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ deltadelta=0.004363322313/4;
+ CreateTower2(420,60,100,3);
+ CreateTower2(380,60,100,3);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level8Part3()
+{
+ frameleft=TenSeconds;
+ CreateTower2(460,100,100,3);
+ CreateTower2(340,100,100,3);
+ deltadelta=0.004363322313/8;
+ IfCallLevel=false;
+}
+void Level8Part4()
+{
+ frameleft=TenSeconds;
+ CreateTower2(500,140,100,3);
+ CreateTower2(300,140,100,3);
+ deltadelta=0.004363322313/16;
+ IfCallLevel=false;
+}
+void Level8Part5()
+{
+ frameleft=ThirtySeconds;clrtime=1;
+ if (towcnt==6||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("They are not cute enough to follow you all the time...");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ yelattrib=true;
+ for (int i=1;i<=33;++i)
+ int tmp=CreateTower4(i*24-20,30,2000,4,2000);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level8Part6()
+{
+ frameleft=AMinute;clrtime=3;
+ clrtime=3;
+ if (towcnt==33||(bulcnt!=0&&towcnt!=4))
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Hope you can enjoy... the entertaining level\n\
+Are they bullets or other object?");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower1(30,10,20,10);
+ CreateTower1(746,10,20,10);
+ CreateTower1(30,556,20,10);
+ CreateTower1(746,556,20,10);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level8Part7()
+{
+ frameleft=ThirtySeconds;clrtime=5;
+ if (towcnt==4||bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Nautilus!");
+ }
+ if (Current_Position==1)
+ {
+ ++part;
+ }
+}
+int Level8Part8_Child()
+{
+ ++stepskips;
+ if (stepskips<2)return 0;
+ stepskips=0;
+ linerad+=0.05;
+ for (int i=1;;++i)
+ {
+ double tx=400+sin(linerad)*i*12;
+ double ty=300+cos(linerad)*i*12;
+ if (tx>800||tx<0||ty>600||ty<0)
+ {
+ hge->Gfx_RenderLine(400,300,tx,ty,0x80CCFF00);
+ break;
+ }
+ int bult=CreateBullet1(tx,ty,1);
+ bullet[bult].bulletdir.x=-sin(linerad/*-1.5707963268*/);
+ bullet[bult].bulletdir.y=-cos(linerad/*-1.5707963268*/);
+ bullet[bult].dist=bullet[bult].bulletdir.x*bullet[bult].bulletdir.x+bullet[bult].bulletdir.y*bullet[bult].bulletdir.y;
+ bullet[bult].dist=sqrt(bullet[bult].dist);
+ }
+ return 1;
+}
+void Level8Part8()
+{
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ frameskips=0;
+ if (Level8Part8_Child())
+ {
+ }
+}
+void Level8Part9()
+{
+ frameleft=AMinute;clrtime=5;
+ if (bulcnt!=0&&towcnt!=2)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Two towers means too much");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower6(380,60,1000,8,1000);
+ CreateTower7(420,60,1000,8,750);
+ whicnt=16;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level8Part10()
+{
+ frameleft=AMinute;clrtime=5;
+ if (towcnt==2)
+ {
+ ClearAll();
+ return;
+ }
+ DisableAllTower=false;
+ bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Well, here is the final mixture.\n\
+Enjoy it!");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ CreateTower4(30,10,2000,2,3000);
+ CreateTower4(746,10,2000,2,3000);
+ CreateTower4(30,556,2000,2,3000);
+ CreateTower4(746,556,2000,2,3000);
+ CreateTower3(120,80,300,2);
+ CreateTower3(660,80,300,2);
+ CreateTower3(120,480,300,2);
+ CreateTower3(660,480,300,2);
+ CreateTower1(400,30,500,2);
+ CreateTower6(380,60,1000,6,1000);
+ CreateTower7(420,60,1000,6,750);
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towertype==3)
+ tower[i].t3t=1;
+ yelattrib=true;
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+}
+void Level8Part11()
+{
+ frameleft=AMinute;
+ if (towcnt!=1&&bulcnt!=0)
+ {
+ ClearAll();
+ if (bulcnt!=0||towcnt!=0)return;
+ }
+ DisableAllTower=false;
+ towcnt=0;bulcnt=0;memset(bullet,0,sizeof(bullet));
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("Addition Level: Reflection++\n\
+Give yourself an award even if you cannot pass this level.");
+ return;
+ }
+ ++frameskips;
+ if (frameskips<10&&!LOWFPS)return;
+ Refliction=true;
+ CreateTower6(400,566,1000,2,1000);
+ /*for (int i=1;i<=33;++i)
+ {
+ int tmp=CreateTower3(i*24-20,570,1000,2);
+ tower[tmp].t3t=3;
+ }
+ for (int i=1;i<=23;++i)
+ {
+ int tmp=CreateTower3(772,i*24,1000,2);
+ tower[tmp].t3t=2;
+ }*/
+ for (int i=1;i<=towcnt;++i)
+ if (tower[i].towerspr->GetColor()==0x80FFFFFF)
+ tower[i].towerspr->SetColor(0x00FFFFFF);
+ for (int i=1;i<=towcnt;++i)
+ if ((tower[i].towerspr->GetColor()>>24)<=0x80)
+ tower[i].towerspr->SetColor(tower[i].towerspr->GetColor()+0x01FFFFFF);
+ else
+ {
+ IfCallLevel=false;
+ return;
+ }
+} \ No newline at end of file
diff --git a/archive/blr1/src/loading.h b/archive/blr1/src/loading.h
new file mode 100644
index 0000000..acf59aa
--- /dev/null
+++ b/archive/blr1/src/loading.h
@@ -0,0 +1,384 @@
+unsigned char Loading[]=
+{0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x00,0x60,
+0x00,0x00,0x00,0x20,0x08,0x06,0x00,0x00,0x00,0xED,0xC0,0x7D,0x54,0x00,0x00,0x00,0x09,0x70,0x48,
+0x59,0x73,0x00,0x00,0x0B,0x13,0x00,0x00,0x0B,0x13,0x01,0x00,0x9A,0x9C,0x18,0x00,0x00,0x0A,0x4D,
+0x69,0x43,0x43,0x50,0x50,0x68,0x6F,0x74,0x6F,0x73,0x68,0x6F,0x70,0x20,0x49,0x43,0x43,0x20,0x70,
+0x72,0x6F,0x66,0x69,0x6C,0x65,0x00,0x00,0x78,0xDA,0x9D,0x53,0x77,0x58,0x93,0xF7,0x16,0x3E,0xDF,
+0xF7,0x65,0x0F,0x56,0x42,0xD8,0xF0,0xB1,0x97,0x6C,0x81,0x00,0x22,0x23,0xAC,0x08,0xC8,0x10,0x59,
+0xA2,0x10,0x92,0x00,0x61,0x84,0x10,0x12,0x40,0xC5,0x85,0x88,0x0A,0x56,0x14,0x15,0x11,0x9C,0x48,
+0x55,0xC4,0x82,0xD5,0x0A,0x48,0x9D,0x88,0xE2,0xA0,0x28,0xB8,0x67,0x41,0x8A,0x88,0x5A,0x8B,0x55,
+0x5C,0x38,0xEE,0x1F,0xDC,0xA7,0xB5,0x7D,0x7A,0xEF,0xED,0xED,0xFB,0xD7,0xFB,0xBC,0xE7,0x9C,0xE7,
+0xFC,0xCE,0x79,0xCF,0x0F,0x80,0x11,0x12,0x26,0x91,0xE6,0xA2,0x6A,0x00,0x39,0x52,0x85,0x3C,0x3A,
+0xD8,0x1F,0x8F,0x4F,0x48,0xC4,0xC9,0xBD,0x80,0x02,0x15,0x48,0xE0,0x04,0x20,0x10,0xE6,0xCB,0xC2,
+0x67,0x05,0xC5,0x00,0x00,0xF0,0x03,0x79,0x78,0x7E,0x74,0xB0,0x3F,0xFC,0x01,0xAF,0x6F,0x00,0x02,
+0x00,0x70,0xD5,0x2E,0x24,0x12,0xC7,0xE1,0xFF,0x83,0xBA,0x50,0x26,0x57,0x00,0x20,0x91,0x00,0xE0,
+0x22,0x12,0xE7,0x0B,0x01,0x90,0x52,0x00,0xC8,0x2E,0x54,0xC8,0x14,0x00,0xC8,0x18,0x00,0xB0,0x53,
+0xB3,0x64,0x0A,0x00,0x94,0x00,0x00,0x6C,0x79,0x7C,0x42,0x22,0x00,0xAA,0x0D,0x00,0xEC,0xF4,0x49,
+0x3E,0x05,0x00,0xD8,0xA9,0x93,0xDC,0x17,0x00,0xD8,0xA2,0x1C,0xA9,0x08,0x00,0x8D,0x01,0x00,0x99,
+0x28,0x47,0x24,0x02,0x40,0xBB,0x00,0x60,0x55,0x81,0x52,0x2C,0x02,0xC0,0xC2,0x00,0xA0,0xAC,0x40,
+0x22,0x2E,0x04,0xC0,0xAE,0x01,0x80,0x59,0xB6,0x32,0x47,0x02,0x80,0xBD,0x05,0x00,0x76,0x8E,0x58,
+0x90,0x0F,0x40,0x60,0x00,0x80,0x99,0x42,0x2C,0xCC,0x00,0x20,0x38,0x02,0x00,0x43,0x1E,0x13,0xCD,
+0x03,0x20,0x4C,0x03,0xA0,0x30,0xD2,0xBF,0xE0,0xA9,0x5F,0x70,0x85,0xB8,0x48,0x01,0x00,0xC0,0xCB,
+0x95,0xCD,0x97,0x4B,0xD2,0x33,0x14,0xB8,0x95,0xD0,0x1A,0x77,0xF2,0xF0,0xE0,0xE2,0x21,0xE2,0xC2,
+0x6C,0xB1,0x42,0x61,0x17,0x29,0x10,0x66,0x09,0xE4,0x22,0x9C,0x97,0x9B,0x23,0x13,0x48,0xE7,0x03,
+0x4C,0xCE,0x0C,0x00,0x00,0x1A,0xF9,0xD1,0xC1,0xFE,0x38,0x3F,0x90,0x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x40,0x2B,0x01,0x00,0xCD,0x97,0xA4,0xE3,0x00,0x00,0xBC,0xE8,0x18,0x5C,0xA8,0x94,0x17,0x4C,
+0xC6,0x08,0x00,0x00,0x44,0xA0,0x81,0x2A,0xB0,0x41,0x07,0x0C,0xC1,0x14,0xAC,0xC0,0x0E,0x9C,0xC1,
+0x1D,0xBC,0xC0,0x17,0x02,0x61,0x06,0x44,0x40,0x0C,0x24,0xC0,0x3C,0x10,0x42,0x06,0xE4,0x80,0x1C,
+0x0A,0xA1,0x18,0x96,0x41,0x19,0x54,0xC0,0x3A,0xD8,0x04,0xB5,0xB0,0x03,0x1A,0xA0,0x11,0x9A,0xE1,
+0x10,0xB4,0xC1,0x31,0x38,0x0D,0xE7,0xE0,0x12,0x5C,0x81,0xEB,0x70,0x17,0x06,0x60,0x18,0x9E,0xC2,
+0x18,0xBC,0x86,0x09,0x04,0x41,0xC8,0x08,0x13,0x61,0x21,0x3A,0x88,0x11,0x62,0x8E,0xD8,0x22,0xCE,
+0x08,0x17,0x99,0x8E,0x04,0x22,0x61,0x48,0x34,0x92,0x80,0xA4,0x20,0xE9,0x88,0x14,0x51,0x22,0xC5,
+0xC8,0x72,0xA4,0x02,0xA9,0x42,0x6A,0x91,0x5D,0x48,0x23,0xF2,0x2D,0x72,0x14,0x39,0x8D,0x5C,0x40,
+0xFA,0x90,0xDB,0xC8,0x20,0x32,0x8A,0xFC,0x8A,0xBC,0x47,0x31,0x94,0x81,0xB2,0x51,0x03,0xD4,0x02,
+0x75,0x40,0xB9,0xA8,0x1F,0x1A,0x8A,0xC6,0xA0,0x73,0xD1,0x74,0x34,0x0F,0x5D,0x80,0x96,0xA2,0x6B,
+0xD1,0x1A,0xB4,0x1E,0x3D,0x80,0xB6,0xA2,0xA7,0xD1,0x4B,0xE8,0x75,0x74,0x00,0x7D,0x8A,0x8E,0x63,
+0x80,0xD1,0x31,0x0E,0x66,0x8C,0xD9,0x61,0x5C,0x8C,0x87,0x45,0x60,0x89,0x58,0x1A,0x26,0xC7,0x16,
+0x63,0xE5,0x58,0x35,0x56,0x8F,0x35,0x63,0x1D,0x58,0x37,0x76,0x15,0x1B,0xC0,0x9E,0x61,0xEF,0x08,
+0x24,0x02,0x8B,0x80,0x13,0xEC,0x08,0x5E,0x84,0x10,0xC2,0x6C,0x82,0x90,0x90,0x47,0x58,0x4C,0x58,
+0x43,0xA8,0x25,0xEC,0x23,0xB4,0x12,0xBA,0x08,0x57,0x09,0x83,0x84,0x31,0xC2,0x27,0x22,0x93,0xA8,
+0x4F,0xB4,0x25,0x7A,0x12,0xF9,0xC4,0x78,0x62,0x3A,0xB1,0x90,0x58,0x46,0xAC,0x26,0xEE,0x21,0x1E,
+0x21,0x9E,0x25,0x5E,0x27,0x0E,0x13,0x5F,0x93,0x48,0x24,0x0E,0xC9,0x92,0xE4,0x4E,0x0A,0x21,0x25,
+0x90,0x32,0x49,0x0B,0x49,0x6B,0x48,0xDB,0x48,0x2D,0xA4,0x53,0xA4,0x3E,0xD2,0x10,0x69,0x9C,0x4C,
+0x26,0xEB,0x90,0x6D,0xC9,0xDE,0xE4,0x08,0xB2,0x80,0xAC,0x20,0x97,0x91,0xB7,0x90,0x0F,0x90,0x4F,
+0x92,0xFB,0xC9,0xC3,0xE4,0xB7,0x14,0x3A,0xC5,0x88,0xE2,0x4C,0x09,0xA2,0x24,0x52,0xA4,0x94,0x12,
+0x4A,0x35,0x65,0x3F,0xE5,0x04,0xA5,0x9F,0x32,0x42,0x99,0xA0,0xAA,0x51,0xCD,0xA9,0x9E,0xD4,0x08,
+0xAA,0x88,0x3A,0x9F,0x5A,0x49,0x6D,0xA0,0x76,0x50,0x2F,0x53,0x87,0xA9,0x13,0x34,0x75,0x9A,0x25,
+0xCD,0x9B,0x16,0x43,0xCB,0xA4,0x2D,0xA3,0xD5,0xD0,0x9A,0x69,0x67,0x69,0xF7,0x68,0x2F,0xE9,0x74,
+0xBA,0x09,0xDD,0x83,0x1E,0x45,0x97,0xD0,0x97,0xD2,0x6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xD0,0x74,0xCB,0xEF,0xCF,0x0D,0xE7,0x23,
+0x8E,0x43,0xC7,0x0F,0x36,0xE6,0x5C,0x85,0xA7,0x2A,0xC0,0x2A,0xBA,0xA2,0x8F,0x85,0x30,0x4A,0x26,
+0x06,0x58,0x22,0xFC,0xE3,0x92,0x2E,0xA7,0xC7,0x95,0x18,0xE7,0x4C,0x43,0x96,0x2F,0x78,0x4C,0x35,
+0xBF,0xDF,0x8B,0x8D,0xE3,0x4C,0x1C,0x79,0xA7,0x4C,0xD1,0xA5,0x7E,0x96,0xEC,0x8D,0x01,0x22,0x6C,
+0xE4,0x0D,0x79,0xA6,0x66,0x8F,0xB8,0x18,0x0D,0xFD,0xEC,0x18,0x07,0x36,0x9A,0x9E,0x60,0x74,0x0E,
+0xDD,0x8B,0x44,0x0F,0x78,0xFF,0x51,0x78,0xE8,0x38,0x3C,0x1A,0xE0,0x1A,0x11,0x43,0x50,0x34,0x40,
+0x34,0x40,0x44,0x34,0xC0,0xD7,0xC5,0xFF,0x01,0x00,0xCC,0x01,0x97,0x8B,0x00,0x58,0xE9,0x5F,0x00,
+0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82};
+unsigned char LoadCircle[]=
+{0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A,0x00,0x00,0x00,0x0D,0x49,0x48,0x44,0x52,0x00,0x00,0x00,0x30,
+0x00,0x00,0x00,0x2E,0x08,0x06,0x00,0x00,0x00,0x6E,0xDE,0x9A,0x6C,0x00,0x00,0x00,0x09,0x70,0x48,
+0x59,0x73,0x00,0x00,0x0B,0x13,0x00,0x00,0x0B,0x13,0x01,0x00,0x9A,0x9C,0x18,0x00,0x00,0x0A,0x4D,
+0x69,0x43,0x43,0x50,0x50,0x68,0x6F,0x74,0x6F,0x73,0x68,0x6F,0x70,0x20,0x49,0x43,0x43,0x20,0x70,
+0x72,0x6F,0x66,0x69,0x6C,0x65,0x00,0x00,0x78,0xDA,0x9D,0x53,0x77,0x58,0x93,0xF7,0x16,0x3E,0xDF,
+0xF7,0x65,0x0F,0x56,0x42,0xD8,0xF0,0xB1,0x97,0x6C,0x81,0x00,0x22,0x23,0xAC,0x08,0xC8,0x10,0x59,
+0xA2,0x10,0x92,0x00,0x61,0x84,0x10,0x12,0x40,0xC5,0x85,0x88,0x0A,0x56,0x14,0x15,0x11,0x9C,0x48,
+0x55,0xC4,0x82,0xD5,0x0A,0x48,0x9D,0x88,0xE2,0xA0,0x28,0xB8,0x67,0x41,0x8A,0x88,0x5A,0x8B,0x55,
+0x5C,0x38,0xEE,0x1F,0xDC,0xA7,0xB5,0x7D,0x7A,0xEF,0xED,0xED,0xFB,0xD7,0xFB,0xBC,0xE7,0x9C,0xE7,
+0xFC,0xCE,0x79,0xCF,0x0F,0x80,0x11,0x12,0x26,0x91,0xE6,0xA2,0x6A,0x00,0x39,0x52,0x85,0x3C,0x3A,
+0xD8,0x1F,0x8F,0x4F,0x48,0xC4,0xC9,0xBD,0x80,0x02,0x15,0x48,0xE0,0x04,0x20,0x10,0xE6,0xCB,0xC2,
+0x67,0x05,0xC5,0x00,0x00,0xF0,0x03,0x79,0x78,0x7E,0x74,0xB0,0x3F,0xFC,0x01,0xAF,0x6F,0x00,0x02,
+0x00,0x70,0xD5,0x2E,0x24,0x12,0xC7,0xE1,0xFF,0x83,0xBA,0x50,0x26,0x57,0x00,0x20,0x91,0x00,0xE0,
+0x22,0x12,0xE7,0x0B,0x01,0x90,0x52,0x00,0xC8,0x2E,0x54,0xC8,0x14,0x00,0xC8,0x18,0x00,0xB0,0x53,
+0xB3,0x64,0x0A,0x00,0x94,0x00,0x00,0x6C,0x79,0x7C,0x42,0x22,0x00,0xAA,0x0D,0x00,0xEC,0xF4,0x49,
+0x3E,0x05,0x00,0xD8,0xA9,0x93,0xDC,0x17,0x00,0xD8,0xA2,0x1C,0xA9,0x08,0x00,0x8D,0x01,0x00,0x99,
+0x28,0x47,0x24,0x02,0x40,0xBB,0x00,0x60,0x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DB,
+0x7A,0xF0,0x00,0x71,0x9A,0x40,0x99,0xAD,0xC0,0xA3,0x83,0xFD,0x71,0x61,0x6E,0x76,0xAE,0x52,0x8E,
+0xE7,0xCB,0x04,0x42,0x31,0x6E,0xF7,0xE7,0x23,0xFE,0xC7,0x85,0x7F,0xFD,0x8E,0x29,0xD1,0xE2,0x34,
+0xB1,0x5C,0x2C,0x15,0x8A,0xF1,0x58,0x89,0xB8,0x50,0x22,0x4D,0xC7,0x79,0xB9,0x52,0x91,0x44,0x21,
+0xC9,0x95,0xE2,0x12,0xE9,0x7F,0x32,0xF1,0x1F,0x96,0xFD,0x09,0x93,0x77,0x0D,0x00,0xAC,0x86,0x4F,
+0xC0,0x4E,0xB6,0x07,0xB5,0xCB,0x6C,0xC0,0x7E,0xEE,0x01,0x02,0x8B,0x0E,0x58,0xD2,0x76,0x00,0x40,
+0x7E,0xF3,0x2D,0x8C,0x1A,0x0B,0x91,0x00,0x10,0x67,0x34,0x32,0x79,0xF7,0x00,0x00,0x93,0xBF,0xF9,
+0x8F,0x40,0x2B,0x01,0x00,0xCD,0x97,0xA4,0xE3,0x00,0x00,0xBC,0xE8,0x18,0x5C,0xA8,0x94,0x17,0x4C,
+0xC6,0x08,0x00,0x00,0x44,0xA0,0x81,0x2A,0xB0,0x41,0x07,0x0C,0xC1,0x14,0xAC,0xC0,0x0E,0x9C,0xC1,
+0x1D,0xBC,0xC0,0x17,0x02,0x61,0x06,0x44,0x40,0x0C,0x24,0xC0,0x3C,0x10,0x42,0x06,0xE4,0x80,0x1C,
+0x0A,0xA1,0x18,0x96,0x41,0x19,0x54,0xC0,0x3A,0xD8,0x04,0xB5,0xB0,0x03,0x1A,0xA0,0x11,0x9A,0xE1,
+0x10,0xB4,0xC1,0x31,0x38,0x0D,0xE7,0xE0,0x12,0x5C,0x81,0xEB,0x70,0x17,0x06,0x60,0x18,0x9E,0xC2,
+0x18,0xBC,0x86,0x09,0x04,0x41,0xC8,0x08,0x13,0x61,0x21,0x3A,0x88,0x11,0x62,0x8E,0xD8,0x22,0xCE,
+0x08,0x17,0x99,0x8E,0x04,0x22,0x61,0x48,0x34,0x92,0x80,0xA4,0x20,0xE9,0x88,0x14,0x51,0x22,0xC5,
+0xC8,0x72,0xA4,0x02,0xA9,0x42,0x6A,0x91,0x5D,0x48,0x23,0xF2,0x2D,0x72,0x14,0x39,0x8D,0x5C,0x40,
+0xFA,0x90,0xDB,0xC8,0x20,0x32,0x8A,0xFC,0x8A,0xBC,0x47,0x31,0x94,0x81,0xB2,0x51,0x03,0xD4,0x02,
+0x75,0x40,0xB9,0xA8,0x1F,0x1A,0x8A,0xC6,0xA0,0x73,0xD1,0x74,0x34,0x0F,0x5D,0x80,0x96,0xA2,0x6B,
+0xD1,0x1A,0xB4,0x1E,0x3D,0x80,0xB6,0xA2,0xA7,0xD1,0x4B,0xE8,0x75,0x74,0x00,0x7D,0x8A,0x8E,0x63,
+0x80,0xD1,0x31,0x0E,0x66,0x8C,0xD9,0x61,0x5C,0x8C,0x87,0x45,0x60,0x89,0x58,0x1A,0x26,0xC7,0x16,
+0x63,0xE5,0x58,0x35,0x56,0x8F,0x35,0x63,0x1D,0x58,0x37,0x76,0x15,0x1B,0xC0,0x9E,0x61,0xEF,0x08,
+0x24,0x02,0x8B,0x80,0x13,0xEC,0x08,0x5E,0x84,0x10,0xC2,0x6C,0x82,0x90,0x90,0x47,0x58,0x4C,0x58,
+0x43,0xA8,0x25,0xEC,0x23,0xB4,0x12,0xBA,0x08,0x57,0x09,0x83,0x84,0x31,0xC2,0x27,0x22,0x93,0xA8,
+0x4F,0xB4,0x25,0x7A,0x12,0xF9,0xC4,0x78,0x62,0x3A,0xB1,0x90,0x58,0x46,0xAC,0x26,0xEE,0x21,0x1E,
+0x21,0x9E,0x25,0x5E,0x27,0x0E,0x13,0x5F,0x93,0x48,0x24,0x0E,0xC9,0x92,0xE4,0x4E,0x0A,0x21,0x25,
+0x90,0x32,0x49,0x0B,0x49,0x6B,0x48,0xDB,0x48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0xFB,
+0x25,0xD2,0x9F,0x33,0x00,0x00,0x00,0x20,0x63,0x48,0x52,0x4D,0x00,0x00,0x7A,0x25,0x00,0x00,0x80,
+0x83,0x00,0x00,0xF9,0xFF,0x00,0x00,0x80,0xE9,0x00,0x00,0x75,0x30,0x00,0x00,0xEA,0x60,0x00,0x00,
+0x3A,0x98,0x00,0x00,0x17,0x6F,0x92,0x5F,0xC5,0x46,0x00,0x00,0x03,0x6A,0x49,0x44,0x41,0x54,0x78,
+0xDA,0xD4,0x99,0xDB,0x8B,0x4D,0x51,0x1C,0xC7,0x3F,0x73,0x30,0x33,0xB9,0x1B,0x91,0x26,0xE4,0x96,
+0x41,0x23,0x64,0xBC,0x10,0x21,0x22,0x49,0xE4,0xC1,0x03,0x25,0xA6,0x49,0xE3,0x6F,0xF0,0xE4,0x4D,
+0xA3,0x88,0x72,0x8B,0x79,0x91,0x86,0x22,0x21,0x91,0x68,0x94,0x6B,0x6E,0x33,0xEE,0x23,0x14,0x66,
+0x18,0x53,0x43,0x72,0x3B,0xE3,0xFA,0xF5,0x60,0x4D,0x9D,0x8E,0x73,0xF6,0x59,0x6B,0xED,0x7D,0xCE,
+0x71,0xBE,0xB5,0xDA,0x9D,0xCE,0xDA,0xBF,0xB5,0xBE,0xEB,0xB7,0x7E,0xD7,0x5D,0x24,0x89,0x42,0x46,
+0xCF,0x88,0xE4,0x14,0x03,0x53,0x81,0xF1,0x40,0x15,0x30,0x0E,0x18,0x06,0xF4,0x06,0x3E,0x03,0xED,
+0xC0,0x33,0xE0,0x16,0xF0,0x04,0x68,0x02,0xF4,0x3F,0x10,0x98,0x02,0xD4,0x00,0xCB,0x80,0x11,0x0E,
+0xEF,0x3D,0x07,0x4E,0x00,0x07,0x80,0x47,0xA1,0x76,0x20,0xC9,0x67,0xCC,0x94,0x74,0x51,0xD1,0xE0,
+0xB4,0xA4,0xE9,0x9E,0xFB,0x70,0x26,0x50,0x26,0xE9,0xB0,0xB2,0x83,0x7A,0x49,0xFD,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AF,0x14,0x58,0x14,0xE4,0x46,0x87,0x03,0x63,0x2D,0x17,0xDD,0x05,
+0x3C,0x88,0xD0,0x5D,0xD6,0x59,0xCE,0x9B,0x1C,0x44,0x60,0x06,0x50,0x69,0x21,0xE4,0x3D,0xB0,0x3D,
+0x62,0x7F,0x7F,0x09,0xB8,0x62,0x59,0x7F,0xA4,0x25,0x30,0xD1,0x5C,0xA3,0x4C,0xD8,0x0B,0x74,0x64,
+0x21,0x68,0xD9,0x68,0xB4,0xC2,0x54,0x7A,0x29,0x09,0x94,0x03,0x43,0x32,0x08,0x88,0x03,0xFB,0xB3,
+0x14,0x75,0x6D,0x34,0x50,0x02,0xF4,0x4D,0x47,0xA0,0x9F,0x99,0x10,0x84,0x5F,0xC0,0x97,0x2C,0x11,
+0x68,0xB5,0x98,0xD3,0x03,0xE8,0x95,0x8E,0xC0,0x77,0x13,0xE6,0x03,0xB3,0x6F,0x43,0x22,0x1B,0xB0,
+0xAD,0xAC,0x62,0xE9,0x7E,0xBC,0x05,0xDE,0x65,0x78,0xF9,0x37,0xF0,0xC3,0x63,0x73,0x03,0xCD,0x08,
+0xC2,0x08,0x1F,0xA2,0x89,0x04,0x9E,0x05,0xA5,0xAD,0x21,0xD1,0x60,0x2A,0xAD,0xB2,0x0C,0x25,0x2B,
+0x16,0x57,0xF8,0x5B,0x3A,0x02,0xD7,0x81,0x7B,0x19,0x04,0xF4,0x75,0x6C,0x9F,0x74,0x63,0x14,0x30,
+0x1A,0x38,0x17,0x40,0x62,0xB2,0x25,0x81,0xAE,0x74,0x04,0xDE,0x98,0x91,0xC9,0x88,0x56,0x78,0x10,
+0xF8,0x69,0x9E,0xD3,0x81,0x0B,0xC6,0x61,0x24,0x62,0xB6,0xA5,0x06,0xF4,0x8F,0xAD,0x24,0xE5,0x16,
+0x55,0x16,0x39,0x49,0x9B,0xA4,0x41,0x8E,0xF9,0xCE,0xBD,0x24,0x19,0xF7,0x93,0x5A,0x28,0x27,0x2D,
+0xF3,0xA1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x8D,0x98,0xE9,0x4E,0xD7,0x48,0x7A,0xE9,
+0xE9,0x52,0x8F,0x85,0xFD,0x4A,0x19,0x15,0xCA,0x4D,0xF5,0x15,0xB7,0x98,0x5B,0x64,0x6E,0x49,0x31,
+0x70,0x33,0x55,0xEE,0x95,0x0F,0x02,0x91,0x22,0x46,0x81,0xE3,0xCF,0x00,0xD2,0xF0,0xF4,0x75,0x05,
+0xC1,0xEC,0xA0,0x00,0x00,0x00,0x00,0x49,0x45,0x4E,0x44,0xAE,0x42,0x60,0x82};
diff --git a/archive/blr1/src/main.cpp b/archive/blr1/src/main.cpp
new file mode 100644
index 0000000..d0ca2ed
--- /dev/null
+++ b/archive/blr1/src/main.cpp
@@ -0,0 +1,510 @@
+//Chrisoft Bullet Lab Remix HGE
+//Main Code
+//"Copyleft" Chrisoft 2013
+//#define Debug
+#include "hge.h"
+#include "hgefont.h"
+#include "hgegui.h"
+#include <cmath>
+#include <ctime>
+#include <cstdlib>
+#include <cstdio>
+#include "menuitem.h"
+#include "global.h"
+#include "towernbullet.h"
+#include "levels.h"
+#include "scorec.h"
+#include "menus.h"
+void firststartup()
+{
+ /*if (MessageBoxA(NULL,"It seems that you are running BLR for the First time!\nLet's do some \
+basic settings first!\n\nEnable Low FPS Mode?","First Start Up",0x00000024)==6)
+ fpslvl=1;
+ else*/
+ fpslvl=0;
+ /*if (MessageBoxA(NULL,"Enable Fullscreen?","First Start Up",0x00000024)==6)
+ tfs=1;
+ else*/
+ tfs=0;
+ diffkey=false;
+ plrspd=3;plrslospd=3;clrbns=0;
+ hge->System_Log("Finishing first start up configuraion...");
+ Options_Writeback();
+ Score_Initailize();
+}
+void Player_Clear()
+{
+ if (LOWFPS)
+ clrrange+=13.6;
+ else
+ clrrange+=0.8;
+ for (int i=1;i<=bulcnt;++i)
+ {
+ double dis=GetDist(bullet[i].bulletpos,playerpos);
+ if (dis<=clrrange&&bullet[i].exist)
+ {
+ CreateBullet255(bullet[i].bulletpos.x,bullet[i].bulletpos.y,10);
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ }
+}
+void ProcessPlayer()
+{
+ playerspr->RenderEx(playerpos.x+8.4,playerpos.y+8.4,playerrot,0.7,0);
+ if (DisablePlayer)return;
+ if (!LOWFPS)
+ playerrot+=0.00174533;
+ else
+ playerrot+=0.00174533*17;
+ double realspd;
+ if (hge->Input_GetKeyState(HGEK_SHIFT))
+ if (LOWFPS)
+ realspd=playerslospeed*17;
+ else
+ realspd=playerslospeed;
+ else
+ if (LOWFPS)
+ realspd=playerspeed*17;
+ else
+ realspd=playerspeed;
+ if (hge->Input_GetKeyState(HGEK_LEFT))
+ {
+ if (playerpos.x>10)
+ playerpos.x-=realspd;
+ }
+ if (hge->Input_GetKeyState(HGEK_RIGHT))
+ {
+ if (playerpos.x<770)
+ playerpos.x+=realspd;
+ }
+ if (hge->Input_GetKeyState(HGEK_UP))
+ {
+ if (playerpos.y>10)
+ playerpos.y-=realspd;
+ }
+ if (hge->Input_GetKeyState(HGEK_DOWN))
+ {
+ if (playerpos.y<570)
+ playerpos.y+=realspd;
+ }
+ if (hge->Input_GetKeyState(HGEK_Z)&&clrrange==0&&clrtime+clrbns&&!diffkey)
+ {
+ Player_Clear();--clrtime;++clrusg;
+ }
+ if (hge->Input_GetKeyState(HGEK_X)&&clrrange==0&&clrtime+clrbns&&diffkey)
+ {
+ Player_Clear();--clrtime;++clrusg;
+ }
+ //Player_Attack();
+ if (clrrange!=0)Player_Clear();
+ if (clrrange>=300)clrrange=0;
+}
+void RefreshScore()
+{
+ if (DisablePlayer)return;
+ int multp=1;
+ if (mode==2)multp=5;
+ if (LOWFPS)
+ score+=multp*16;
+ else
+ score+=multp;
+ score+=100*shots;
+ score-=scminus;
+ score+=2000*dsmc;
+ ++frms;
+ averfps=(averfps*(frms-1)+hge->Timer_GetFPS())/(double)frms;
+}
+void CallLevels()
+{
+ //Use this to call level procedures.
+ //Don't use this to call the first level!
+ if (level<6)clrtime=0;
+ if ((mode==4||mode<=2)&&coll!=0){DeathGUI_Init();return;}
+ if (!IfCallLevel) return;
+ if (level==7&&part==0&&mode==4)//Easy
+ {
+ CompleteGUI_Init();
+ return;
+ }
+ if (level==8&&part==0&&mode==4)//Easy
+ {
+ CompleteGUI_Init();
+ return;
+ }
+ if (level==8&&part==12&&(mode==2||mode==3))//Extreme or FPM
+ {
+ CompleteGUI_Init();
+ return;
+ }
+ if (level==1&&part==1)Level1Part1();
+ if (level==1&&part==2)Level1Part2();
+ if (level==1&&part==3)Level1Part3();
+ if (level==1&&part==4)Level1Part4();
+ if (level==2&&part==0)Level2Part0();
+ if (level==2&&part==1)Level2Part1();
+ if (level==2&&part==2)Level2Part2();
+ if (level==2&&part==3)Level2Part3();
+ if (level==3&&part==0)Level3Part0();
+ if (level==3&&part==1)Level3Part1();
+ if (level==3&&part==2)Level3Part2();
+ if (level==3&&part==3)Level3Part3();
+ if (level==3&&part==4)Level3Part4();
+ if (level==3&&part==5)Level3Part5();
+ if (level==3&&part==6)Level3Part6();
+ if (level==3&&part==7)Level3Part7();
+ if (level==4&&part==0)Level4Part0();
+ if (level==4&&part==1)Level4Part1();
+ if (level==4&&part==2)Level4Part2();
+ if (level==4&&part==3)Level4Part3();
+ if (level==4&&part==4)Level4Part4();
+ if (level==4&&part==5)Level4Part5();
+ if (level==4&&part==6)Level4Part6();
+ if (level==5&&part==0)Level5Part0();
+ if (level==5&&part==1)Level5Part1();
+ if (level==5&&part==2)Level5Part2();
+ if (level==5&&part==3)Level5Part3();
+ if (level==5&&part==4)Level5Part4();
+ if (level==6&&part==0)Level6Part0();
+ if (level==6&&part==1)Level6Part1();
+ if (level==6&&part==2)Level6Part2();
+ if (level==6&&part==3)Level6Part3();
+ if (level==6&&part==4)Level6Part4();
+ if (level==6&&part==5)Level6Part5();
+ if (level==6&&part==6)Level6Part6();
+ if (level==6&&part==7)Level6Part7();
+ if (level==6&&part==8)Level6Part8();
+ if (level==6&&part==9)Level6Part9();
+ if (level==7&&part==0)Level7Part0();
+ if (level==7&&part==1)Level7Part1();
+ if (level==7&&part==2)Level7Part2();
+ if (level==7&&part==3)Level7Part3();
+ if (level==7&&part==4)Level7Part4();
+ if (level==7&&part==5)Level7Part5();
+ if (level==7&&part==6)Level7Part6();
+ if (level==7&&part==7)Level7Part7();
+ if (level==7&&part==8)Level7Part8();
+ if (level==7&&part==9)Level7Part9();
+ if (level==7&&part==10)Level7Part10();
+ if (level==7&&part==11)Level7Part11();
+ if (level==7&&part==12)Level7Part12();
+ if (level==8&&part==0)Level8Part0();
+ if (level==8&&part==1)Level8Part1();
+ if (level==8&&part==2)Level8Part2();
+ if (level==8&&part==3)Level8Part3();
+ if (level==8&&part==4)Level8Part4();
+ if (level==8&&part==5)Level8Part5();
+ if (level==8&&part==6)Level8Part6();
+ if (level==8&&part==7)Level8Part7();
+ if (level==8&&part==8)Level8Part8();
+ if (level==8&&part==9)Level8Part9();
+ if (level==8&&part==10)Level8Part10();
+ if (level==8&&part==11)Level8Part11();
+}
+void AboutScene()
+{
+ if (LOWFPS)scroll+=0.51;else scroll+=0.03;
+ Credits->Render(200,600-scroll);
+ CreditsRail->Render(200,0);
+ if(hge->Input_GetKeyState(HGEK_Z)||scroll>1624)
+ {
+ Current_Position=0;
+ gui->SetFocus(1);
+ gui->Enter();
+ }
+}
+bool FrameFunc()
+{
+ float dt=hge->Timer_GetDelta();
+ static float t=0.0f;
+ float tx,ty;
+ int id;
+ static int lastid=0;
+ // If ESCAPE was pressed, tell the GUI to finish
+ if (hge->Input_GetKeyState(HGEK_ESCAPE)&&Current_Position==0) { lastid=5; gui->Leave(); }
+ if (Current_Position==1&&hge->Input_GetKeyState(HGEK_ESCAPE))PauseGUI_Init();
+ // We update the GUI and take an action if
+ // one of the menu items was selected
+ if (Current_Position==0)
+ {
+ id=gui->Update(dt);
+ if(id == -1)
+ {
+ switch(lastid)
+ {
+ case 1:Current_Position=3; StartGUI_Init();gui->Leave();break;
+ case 2:gui->Leave();HighScoreGUI_Init();break;
+ case 3:gui->Leave();OptionsGUI_Init();break;
+ case 4:
+ Credits=new hgeSprite(TexCredits,0,0,400,1024);
+ CreditsRail=new hgeSprite(TexCredits,400,0,400,1024);
+ scroll=0;
+ Current_Position=4;
+ AboutScene();
+ lastid=0;
+ break;
+ case 5: return true;
+ }
+ }
+ else if(id) { lastid=id; gui->Leave(); }
+ }
+ if (Current_Position==3)StartGUI_FrameFnk();
+ if (Current_Position==5)DeathGUI_FrameFnk();
+ if (Current_Position==6)CompleteGUI_FrameFnk();
+ if (Current_Position==7)NewHighScoreGUI_FrameFnk();
+ if (Current_Position==8)HighScoreGUI_FrameFnk();
+ if (Current_Position==9)HSViewGUI_FrameFnk();
+ if (Current_Position==10)HSDetGUI_FrameFnk();
+ if (Current_Position==11)PauseGUI_FrameFnk();
+ if (Current_Position==12)BkTTitleGUI_FrameFnk();
+ if (Current_Position==13)OptionsGUI_FrameFnk();
+ if (Current_Position==14)PlayerProfGUI_FrameFnk();
+ // Here we update our background animation
+ t+=dt;
+ tx=50*cosf(t/60);
+ ty=50*sinf(t/60);
+ quad.v[0].tx=tx; quad.v[0].ty=ty;
+ quad.v[1].tx=tx+800/64; quad.v[1].ty=ty;
+ quad.v[2].tx=tx+800/64; quad.v[2].ty=ty+600/64;
+ quad.v[3].tx=tx; quad.v[3].ty=ty+600/64;
+ return false;
+}
+bool RenderFunc()
+{
+ // Render graphics
+ hge->Gfx_BeginScene();
+ hge->Gfx_RenderQuad(&quad);
+ if (Current_Position==0||Current_Position==3||Current_Position==8||
+ Current_Position==9||Current_Position==10||Current_Position==13||Current_Position==14)
+ {
+ if (Current_Position==0)
+ gui->Render();
+ titlespr->Render(160,0);
+ }
+ if (Current_Position==3)
+ StartGUI->Render();
+ if (Current_Position==1||Current_Position==2||Current_Position==5||Current_Position==11||Current_Position==12)
+ {
+ //If we are at the main scene or tip scene(which towers and bullets should still appear..)
+ //Render towers, bullets and player.
+ shots=0;
+ dsmc=0;
+ scminus=0;
+ ProcessTower1();
+ ProcessTower2();
+ ProcessTower3();
+ ProcessTower4();
+ ProcessTower5();
+ ProcessTower6();
+ ProcessTower7();
+ ProcessBullet1();
+ ProcessBullet2();
+ //No ProcessBullet3() needed
+ ProcessBullet4();
+ ProcessBullet5();
+ ProcessBullet6();
+ ProcessBullet7();
+ ProcessBullet255();
+ ProcessPlayer();
+ SCEffect_Process();
+ RefreshScore();
+ if (!DisablePlayer)
+ --frameleft;//If we are at the tip scene, disable the player movement.
+ if (!LOWFPS)
+ {
+ if (playerspeed<playerfulspd)playerspeed+=playerfulspd/400;
+ if (playerslospeed<playerfulslospd)playerslospeed+=playerfulslospd/400;
+ }
+ else
+ {
+ if (playerspeed<playerfulspd)playerspeed+=playerfulspd/25;
+ if (playerslospeed<playerfulslospd)playerslospeed+=playerfulslospd/25;
+ }
+ }
+ if (frameleft == 0&&Current_Position==1)
+ {
+ IfCallLevel=true;
+ ++part;
+ IfShowTip=true;
+ if (level==1&&part==5)++level,part=0;
+ if (level==2&&part==4)++level,part=0;
+ if (level==3&&part==8)++level,part=0;
+ if (level==4&&part==7)++level,part=0;
+ if (level==5&&part==5)++level,part=0;
+ if (level==6&&part==10)++level,part=0;
+ if (level==7&&part==13)++level,part=0;
+ }
+ if (Current_Position==1)
+ {
+ CallLevels();
+ }
+ if (shots)hge->Effect_Play(snd);
+ if (Current_Position==2)
+ {
+ ShowTip(lasttip);
+ //if (Complete)
+ // TipFont->printf(200,200,HGETEXT_LEFT,"Score");
+ }
+ if (Current_Position==4)AboutScene();
+ if (Current_Position==5)DeathGUI->Render();
+ if (Current_Position==6)CompleteGUI->Render();
+ if (Current_Position==7)NewHighScoreGUI_Render();
+ if (Current_Position==8)HighScoreGUI->Render();
+ if (Current_Position==9)HSViewGUI->Render();
+ if (Current_Position==10)HSDetailGUI->Render();
+ if (Current_Position==11)PauseGUI->Render();
+ if (Current_Position==12)BkTTitleGUI->Render();
+ if (Current_Position==13)OptionsGUI->Render();
+ if (Current_Position==14)PlayerProfGUI->Render();
+ fnt->SetColor(0xFFFFFFFF);
+ fnt->printf(680, 575, HGETEXT_LEFT, "FPS: %d", hge->Timer_GetFPS());
+ if (Current_Position==1||Current_Position==2)
+ {
+ fnt->printf(670,555, HGETEXT_LEFT, "AF: %.2f", averfps);
+ fnt->printf(5, 0, HGETEXT_LEFT, "Frames to go: %d",frameleft);
+ fnt->printf(5, 25, HGETEXT_LEFT, "Score: %lld",score);
+ fnt->printf(5, 50, HGETEXT_LEFT, "Level %d Part %d",level,part);
+ if (mode==3)
+ fnt->printf(5, 75, HGETEXT_LEFT, "Collisions: %d",coll);
+ else
+ fnt->printf(5, 75, HGETEXT_LEFT, "Restarts: %d",restarts);
+ fnt->printf(5, 100, HGETEXT_LEFT, "Semi-Collisions: %d",semicoll);
+ fnt->printf(5, 125, HGETEXT_LEFT, "Clear Range Left: %d",clrtime+clrbns);
+ }
+ hge->Gfx_EndScene();
+ return false;
+}
+int main()
+{
+ srand(time(NULL));
+ hge = hgeCreate(HGE_VERSION);
+ hge->System_SetState(HGE_LOGFILE, "BLRLOG.txt");
+ hge->System_Log("Bullet Lab Remix Log File");
+ hge->System_Log("Folder Decompressed created successfully.");
+ /*
+ Resourece Files list
+ bg.lz->bg.png
+ blnsns.lz->blnsns.png
+ charmap.lz->charmap.fnt
+ ss1.lz->ss1.png
+ ss2.lz->ss2.png
+ title.lz->title.png
+ credits.lz->credits.png
+ tap.lz->tap.wav
+ */
+ hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
+ hge->System_SetState(HGE_RENDERFUNC, RenderFunc);
+ hge->System_SetState(HGE_TITLE, "Bullet Lab Remix");
+ hge->System_SetState(HGE_WINDOWED, true);
+ hge->System_SetState(HGE_SCREENWIDTH, 800);
+ hge->System_SetState(HGE_SCREENHEIGHT, 600);
+ hge->System_SetState(HGE_SCREENBPP, 32);
+ hge->System_SetState(HGE_SHOWSPLASH, false);
+ hge->System_SetState(HGE_FPS,0);
+ if((access("blr.cfg",0))==-1)
+ {
+ hge->System_Log("Config file not found. Calling first startup.");
+ firststartup();
+ }
+ hge->System_Log("Loading config file");
+ freopen("blr.cfg","r",stdin);
+ char tch=getchar();
+ if (tch!=';'){}
+ tch=getchar();
+ if (tch!='C'){}
+ tch=getchar();
+ if (tch!='B'){}
+ tch=getchar();
+ if (tch!='L'){}
+ fpslvl=0;
+ tch=getchar();//LOWFPS
+ if (tch==1)
+ {
+ LOWFPS=true;
+ TenSeconds=600;
+ TwentySeconds=1200;
+ ThirtySeconds=1800;
+ AMinute=3600;
+ hge->System_SetState(HGE_FPS,61);
+ fpslvl=1;
+ }
+ tch=getchar();//FULLSCRREEN
+ tfs=false;
+ if (tch==1)
+ hge->System_SetState(HGE_WINDOWED, false),tfs=true;
+ tch=getchar();//LockFPS
+ if (tch==1&&!LOWFPS)
+ {
+ hge->System_SetState(HGE_FPS,1000);
+ fpslvl=2;
+ }
+ tch=getchar();//Key binding
+ if (tch==1)diffkey=true;
+ plrspd=tch=getchar();
+ playerfulspd=(tch)*0.05f;
+ playerspeed=playerfulspd;
+ plrslospd=tch=getchar();
+ playerfulslospd=(tch)*0.0125f;
+ playerslospeed=playerfulslospd;
+ tch=getchar();
+ clrbns=tch;
+ fclose(stdin);
+ if (AP_Update(plrspd,plrslospd,clrbns)>10000)Error("Invalid configuration!\nDelete blr.cfg and run the game again!");
+ hge->System_Log("Loading Score file");
+ Score_Init();
+#ifdef Debug
+ playerspeed=playerfulspd=0.2;
+ playerslospeed=playerfulslospd=0.05;
+#endif
+ Current_Position=0;//We are at the main menu at first
+ if(hge->System_Initiate())
+ {
+ quad.tex=hge->Texture_Load("./Resources/bg.png");
+ SprSheet1=hge->Texture_Load("./Resources/ss1.png");
+ SprSheet2=hge->Texture_Load("./Resources/ss2.png");
+ TexTitle=hge->Texture_Load("./Resources/title.png");
+ TexCredits=hge->Texture_Load("./Resources/credits.png");
+ snd=hge->Effect_Load("./Resources/tap.ogg");
+ titlespr=new hgeSprite(TexTitle,0,0,640,320);
+ playerspr=new hgeSprite(SprSheet1,47,46,24,24);
+ playerspr->SetHotSpot(12,12);//Set player anchor
+ playerspr->SetColor(0xC0FFFFFF);
+ if(!quad.tex||!SprSheet1||!SprSheet2||!TexTitle||!TexCredits)
+ {
+ Error("Error Loading Resources!",true);
+ }
+ quad.blend=BLEND_ALPHABLEND | BLEND_COLORMUL | BLEND_NOZWRITE;
+ for(int i=0;i<4;i++)
+ {
+ quad.v[i].z=0.5f;
+ quad.v[i].col=0xFFFFFFFF;
+ }
+ quad.v[0].x=0; quad.v[0].y=0;
+ quad.v[1].x=800; quad.v[1].y=0;
+ quad.v[2].x=800; quad.v[2].y=600;
+ quad.v[3].x=0; quad.v[3].y=600;
+ fnt=new hgeFont("./Resources/charmap.fnt");
+ TipFont=new hgeFont("./Resources/charmap.fnt");
+ spr=new hgeSprite(SprSheet1,24,46,24,24);
+ gui=new hgeGUI();
+ gui->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Start"));
+ gui->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Highscores && Records"));
+ gui->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Options"));
+ gui->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"About"));
+ gui->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Exit"));
+ gui->SetNavMode(HGEGUI_UPDOWN | HGEGUI_CYCLED);
+ gui->SetCursor(spr);
+ gui->SetFocus(1);
+ gui->Enter();
+ if (LOWFPS)
+ hge->System_Log("Low FPS Mode Enabled.\n");
+ hge->System_Start();
+ }
+ // Clean up and shutdown
+ hge->System_Shutdown();
+ hge->Release();
+ return 0;
+}
diff --git a/archive/blr1/src/menuitem.cpp b/archive/blr1/src/menuitem.cpp
new file mode 100644
index 0000000..353b6b7
--- /dev/null
+++ b/archive/blr1/src/menuitem.cpp
@@ -0,0 +1,201 @@
+/*
+** Haaf's Game Engine 1.7
+** Copyright (C) 2003-2007, Relish Games
+** hge.relishgames.com
+**
+** Tutorial 06 - Creating menus
+*/
+
+// In menuitem.cpp/h we define the
+// behaviour of our custom GUI control
+
+#include "menuitem.h"
+#define UnfocColor 0xFFAAAAAA
+#define FocColor 0xFFFFFFFF
+// This is a GUI control constructor,
+// we should initialize all the variables here
+hgeGUIMenuItem::hgeGUIMenuItem(int _id, hgeFont *_fnt, HEFFECT _snd, float _x, float _y, float _delay, char *_title)
+{
+ float w;
+
+ id=_id;
+ fnt=_fnt;
+ snd=_snd;
+ delay=_delay;
+ title=_title;
+
+ color.SetHWColor(UnfocColor);
+ shadow.SetHWColor(0x30000000);
+ offset=0.0f;
+ timer=-1.0f;
+ timer2=-1.0f;
+
+ bStatic=false;
+ bVisible=true;
+ bEnabled=true;
+
+ w=fnt->GetStringWidth(title);
+ rect.Set(_x-w/2, _y, _x+w/2, _y+fnt->GetHeight());
+}
+
+// Reposition the item
+void hgeGUIMenuItem::RePos(float x,float y)
+{
+ float w=fnt->GetStringWidth(title);
+ rect.Set(x-w/2, y, x+w/2, y+fnt->GetHeight());
+}
+
+// This method is called when the control should be rendered
+void hgeGUIMenuItem::Render()
+{
+ fnt->SetColor(shadow.GetHWColor());
+ fnt->Render(rect.x1+offset+3, rect.y1+3, HGETEXT_LEFT, title);
+ fnt->SetColor(color.GetHWColor());
+ fnt->Render(rect.x1-offset, rect.y1-offset, HGETEXT_LEFT, title);
+}
+
+// This method is called each frame,
+// we should update the animation here
+void hgeGUIMenuItem::Update(float dt)
+{
+ if(timer2 != -1.0f)
+ {
+ timer2+=dt;
+ if(timer2 >= delay+0.1f)
+ {
+ color=scolor2+dcolor2;
+ shadow=sshadow+dshadow;
+ offset=0.0f;
+ timer2=-1.0f;
+ }
+ else
+ {
+ if(timer2 < delay) { color=scolor2; shadow=sshadow; }
+ else { color=scolor2+dcolor2*(timer2-delay)*10; shadow=sshadow+dshadow*(timer2-delay)*10; }
+ }
+ }
+ else if(timer != -1.0f)
+ {
+ timer+=dt;
+ if(timer >= 0.2f)
+ {
+ color=scolor+dcolor;
+ offset=soffset+doffset;
+ timer=-1.0f;
+ }
+ else
+ {
+ color=scolor+dcolor*timer*5;
+ offset=soffset+doffset*timer*5;
+ }
+ }
+}
+
+// This method is called when the GUI
+// is about to appear on the screen
+void hgeGUIMenuItem::Enter()
+{
+ hgeColor tcolor2;
+
+ scolor2.SetHWColor(UnfocColor&0x00FFFFFF);
+ tcolor2.SetHWColor(UnfocColor);
+ dcolor2=tcolor2-scolor2;
+
+ sshadow.SetHWColor(0x00000000);
+ tcolor2.SetHWColor(0x30000000);
+ dshadow=tcolor2-sshadow;
+
+ timer2=0.0f;
+}
+
+// This method is called when the GUI
+// is about to disappear from the screen
+void hgeGUIMenuItem::Leave()
+{
+ hgeColor tcolor2;
+
+ scolor2.SetHWColor(UnfocColor);
+ tcolor2.SetHWColor(UnfocColor&0x00FFFFFF);
+ dcolor2=tcolor2-scolor2;
+
+ sshadow.SetHWColor(0x30000000);
+ tcolor2.SetHWColor(0x00000000);
+ dshadow=tcolor2-sshadow;
+
+ timer2=0.0f;
+}
+
+// This method is called to test whether the control
+// have finished it's Enter/Leave animation
+bool hgeGUIMenuItem::IsDone()
+{
+ if(timer2==-1.0f) return true;
+ else return false;
+}
+
+// This method is called when the control
+// receives or loses keyboard input focus
+void hgeGUIMenuItem::Focus(bool bFocused)
+{
+ hgeColor tcolor;
+
+ if(bFocused)
+ {
+ hge->Effect_Play(snd);
+ scolor.SetHWColor(UnfocColor);
+ tcolor.SetHWColor(FocColor);
+ soffset=0;
+ doffset=4;
+ }
+ else
+ {
+ scolor.SetHWColor(FocColor);
+ tcolor.SetHWColor(UnfocColor);
+ soffset=4;
+ doffset=-4;
+ }
+
+ dcolor=tcolor-scolor;
+ timer=0.0f;
+}
+
+// This method is called to notify the control
+// that the mouse cursor has entered or left it's area
+void hgeGUIMenuItem::MouseOver(bool bOver)
+{
+ if(bOver) gui->SetFocus(id);
+}
+
+// This method is called to notify the control
+// that the left mouse button state has changed.
+// If it returns true - the caller will receive
+// the control's ID
+bool hgeGUIMenuItem::MouseLButton(bool bDown)
+{
+ if(!bDown)
+ {
+ offset=4;
+ return true;
+ }
+ else
+ {
+ hge->Effect_Play(snd);
+ offset=0;
+ return false;
+ }
+}
+
+// This method is called to notify the
+// control that a key has been clicked.
+// If it returns true - the caller will
+// receive the control's ID
+bool hgeGUIMenuItem::KeyClick(int key, int chr)
+{
+ if(key==HGEK_ENTER || key==HGEK_SPACE || key==HGEK_Z)
+ {
+ MouseLButton(true);
+ return MouseLButton(false);
+ }
+
+ return false;
+}
diff --git a/archive/blr1/src/menuitem.h b/archive/blr1/src/menuitem.h
new file mode 100644
index 0000000..5788ed9
--- /dev/null
+++ b/archive/blr1/src/menuitem.h
@@ -0,0 +1,46 @@
+/*
+** Haaf's Game Engine 1.7
+** Copyright (C) 2003-2007, Relish Games
+** hge.relishgames.com
+**
+** Tutorial 06 - Creating menus
+*/
+
+// In menuitem.cpp/h we define the
+// behaviour of our custom GUI control
+
+#include "hge.h"
+#include "hgegui.h"
+#include "hgefont.h"
+#include "hgecolor.h"
+
+
+class hgeGUIMenuItem : public hgeGUIObject
+{
+public:
+ hgeGUIMenuItem(int id, hgeFont *fnt, HEFFECT snd, float x, float y, float delay, char *title);
+
+ virtual void Render();
+ virtual void Update(float dt);
+
+ virtual void Enter();
+ virtual void Leave();
+ virtual bool IsDone();
+ virtual void Focus(bool bFocused);
+ virtual void MouseOver(bool bOver);
+
+ virtual bool MouseLButton(bool bDown);
+ virtual bool KeyClick(int key, int chr);
+ virtual void RePos(float x,float y);
+ char *title;
+
+private:
+ hgeFont *fnt;
+ HEFFECT snd;
+ float delay;
+
+ hgeColor scolor, dcolor, scolor2, dcolor2, sshadow, dshadow;
+ hgeColor color, shadow;
+ float soffset, doffset, offset;
+ float timer, timer2;
+};
diff --git a/archive/blr1/src/menus.h b/archive/blr1/src/menus.h
new file mode 100644
index 0000000..cffcee7
--- /dev/null
+++ b/archive/blr1/src/menus.h
@@ -0,0 +1,742 @@
+//Chrisoft Bullet Lab Remix HGE
+//Menu Implementations
+//"Copyleft" Chrisoft 2013
+hgeGUI *StartGUI,*DeathGUI,*CompleteGUI,*HighScoreGUI;
+hgeGUI *HSViewGUI,*HSDetailGUI,*PauseGUI,*BkTTitleGUI;
+hgeGUI *OptionsGUI,*PlayerProfGUI;
+char ds1[255],ds2[255],ds3[255],ds4[255];
+char hs1[255],hs2[255],hs3[255],hs4[255],hs5[255],hs6[255];
+char HSVstr[7][255];
+char HSDetstr[10][255];
+char opt[10][255];
+bool toogleundl;
+int view,detv;
+int lastkeypressed;
+void HSViewGUI_Init();
+void HighScoreGUI_Init();
+void PauseGUI_Init();
+void StartGUI_Init()
+{
+ StartGUI=new hgeGUI();
+ StartGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Easy"));
+ StartGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Normal"));
+ StartGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Extreme"));
+ StartGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Free Play Mode"));
+ StartGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Back"));
+ StartGUI->SetCursor(spr);
+ StartGUI->SetNavMode(HGEGUI_UPDOWN);
+ StartGUI->SetFocus(1);
+ StartGUI->Enter();
+}
+void StartGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=StartGUI->Update(dt);
+ if (id)
+ {
+ 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;
+ memset(tower,0,sizeof(tower));
+ memset(bullet,0,sizeof(bullet));
+ Complete=false;
+ Refliction=false;
+ Level1Part1();
+ IfCallLevel=true;
+ break;
+ case 2:
+ playerpos.x=400,playerpos.y=400,playerrot=0;
+ frameleft=TenSeconds;
+ level=1,part=1;frms=0,averfps=0.0;restarts=0;bsscale=1;
+ towcnt=bulcnt=0;
+ mode=1;
+ score=0;
+ coll=semicoll=clrusg=0;
+ memset(tower,0,sizeof(tower));
+ memset(bullet,0,sizeof(bullet));
+ Complete=false;
+ Refliction=false;
+ Level1Part1();
+ IfCallLevel=true;
+ break;
+ case 3:
+ playerpos.x=400,playerpos.y=400,playerrot=0;
+ frameleft=ThirtySeconds;
+ level=3,part=1;frms=0,averfps=0.0;restarts=0;bsscale=1.5;
+ towcnt=4;bulcnt=0;
+ memset(tower,0,sizeof(tower));
+ memset(bullet,0,sizeof(bullet));
+ mode=2;
+ score=0;
+ coll=semicoll=clrusg=0;
+ IfShowTip=true;
+ Complete=false;
+ Refliction=false;
+ Level3Part0();
+ IfCallLevel=true;
+ break;
+ case 4:
+ playerpos.x=400,playerpos.y=400,playerrot=0;
+ frameleft=TenSeconds;
+ level=1,part=1;frms=0,averfps=0.0;bsscale=1;
+ towcnt=bulcnt=0;
+ score=0;
+ coll=semicoll=clrusg=0;
+ memset(tower,0,sizeof(tower));
+ memset(bullet,0,sizeof(bullet));
+ Complete=false;
+ Refliction=false;
+ Level1Part1();
+ IfCallLevel=true;
+ mode=3;
+ break;
+ case 5:
+ Current_Position=0;
+ StartGUI->Leave();
+ gui->Enter();
+ }
+ }
+}
+void DeathGUI_Init()
+{
+ DeathGUI=new hgeGUI();
+ Current_Position=5;
+ DisableAllTower=true;DisablePlayer=true;
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,160,0.0f,"You Are Dead!"));
+ sprintf(ds1,"You scored %lld at level %d",score,level);
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,200,0.1f,ds1));
+ switch (mode)
+ {
+ case 1:sprintf(ds2,"Difficulty: Normal");break;
+ case 2:sprintf(ds2,"Difficulty: Extreme");break;
+ case 3:sprintf(ds2,"What Happened?! You died in Free Play Mode?!");break;
+ case 4:sprintf(ds2,"Difficulty: Easy");break;
+ }
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,240,0.2f,ds2));
+ sprintf(ds3,"Average FPS: %.2f",averfps);
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,280,0.3f,ds3));
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,320,0.3f,""));
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(6,fnt,snd,400,360,0.4f,"Continue from beginning of level? Your score will be set to minus!"));
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,400,0.5f,"Continue!"));
+ DeathGUI->AddCtrl(new hgeGUIMenuItem(8,fnt,snd,400,440,0.6f,"No thanks..."));
+ for (int i=1;i<=6;++i)DeathGUI->EnableCtrl(i,false);
+ DeathGUI->SetCursor(spr);
+ DeathGUI->SetNavMode(HGEGUI_UPDOWN|HGEGUI_CYCLED);
+ DeathGUI->SetFocus(7);
+ DeathGUI->Enter();
+}
+void DeathGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=DeathGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 7:
+ IfCallLevel=true;
+ Current_Position=1;
+ DeathGUI->Leave();
+ score=-abs(score);
+ ++restarts;
+ part=1;
+ clockrot=deltarot=0;
+ coll=towcnt=bulcnt=0;
+ DisableAllTower=DisablePlayer=false;
+ break;
+ case 8:Current_Position=0;gui->Enter();DeathGUI->Leave();break;
+ }
+ }
+}
+void NewHighScoreGUI_Init()
+{
+ Current_Position=7;
+ memset(newname,0,sizeof(newname));newlen=0;tbframebrk=0;toogleundl=false;
+ TipFont->SetColor(0xFFFFFFFF);
+}
+void nameins(char a)
+{
+ if (newlen<=14)
+ newname[newlen++]=a;
+}
+void namedel()
+{
+ if (newlen>0)newname[--newlen]=0;
+}
+void NewHighScoreGUI_FrameFnk()
+{
+ int key=hge->Input_GetKey();
+ if (key>=0x30&&key<=0x39)nameins('0'+key-0x30);
+ if (key>=0x41&&key<=0x5A)
+ nameins('a'+key-0x41);
+ if (key==HGEK_SPACE)nameins('_');
+ if (key==HGEK_BACKSPACE)namedel();
+ if (key==HGEK_ENTER)
+ {
+ InsertHighScore();
+ switch (mode)
+ {
+ case 4:view=1;HSViewGUI_Init();break;
+ case 1:view=2;HSViewGUI_Init();break;
+ case 2:view=3;HSViewGUI_Init();break;
+ case 3:view=4;HSViewGUI_Init();break;
+ }
+ }
+}
+void NewHighScoreGUI_Render()
+{
+ if (LOWFPS)tbframebrk+=17;else ++tbframebrk;
+ if (tbframebrk>=500)toogleundl=!toogleundl,tbframebrk=0;
+ TipFont->printf(200,200,HGETEXT_LEFT,"Please Enter Your Honorable Name...");
+ if (!toogleundl)
+ TipFont->printf(200,240,HGETEXT_LEFT,"%s",newname);
+ else
+ TipFont->printf(200,240,HGETEXT_LEFT,"%s_",newname);
+}
+void CompleteGUI_Init()
+{
+ CompleteGUI=new hgeGUI();
+ Current_Position=6;
+ DisableAllTower=true;DisablePlayer=true;
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,120,0.0f,"YOU DID THAT!"));
+ if (CheckHighScore()!=-1)
+ sprintf(hs1,"New Highscore %lld!",score);
+ else
+ sprintf(hs1,"Score %lld",score);
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,160,0.1f,hs1));
+ switch (mode)
+ {
+ case 1:
+ case 2:
+ case 4:sprintf(hs2,"Restarts %d",restarts);break;
+ case 3:sprintf(hs2,"Collisions %d",coll);break;
+ }
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,200,0.2f,hs2));
+ sprintf(hs3,"Semi-Collisions %d",semicoll);
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,240,0.3f,hs3));
+ sprintf(hs4,"CLR usage %d",clrusg);
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,280,0.3f,hs4));
+ sprintf(hs5,"Average FPS %.2f",averfps);
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(6,fnt,snd,400,320,0.4f,hs5));
+ if (CheckHighScore()!=-1)
+ {
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,360,0.5f,"Keep this in your record?"));
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(8,fnt,snd,400,400,0.6f,"Yes"));
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(9,fnt,snd,400,440,0.7f,"No thanks..."));
+ }
+ else
+ {
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,360,0.5f,""));
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(8,fnt,snd,400,400,0.6f,""));
+ CompleteGUI->AddCtrl(new hgeGUIMenuItem(9,fnt,snd,400,440,0.7f,"Back to menu"));
+ }
+ for (int i=1;i<=7;++i)CompleteGUI->EnableCtrl(i,false);
+ CompleteGUI->SetCursor(spr);
+ CompleteGUI->SetNavMode(HGEGUI_UPDOWN|HGEGUI_CYCLED);
+ CompleteGUI->SetFocus(7);
+ CompleteGUI->Enter();
+}
+void CompleteGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=CompleteGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 8:NewHighScoreGUI_Init();CompleteGUI->Leave();break;
+ case 9:Current_Position=0;gui->Enter();CompleteGUI->Leave();break;
+ }
+ }
+}
+void HSDetGUI_Init()
+{
+ HSDetailGUI=new hgeGUI();
+ Current_Position=10;
+ switch (view)
+ {
+ case 1:
+ memset(HSDetstr,0,sizeof(HSDetstr));
+ if (!ERec[detv].score)sprintf(HSDetstr[1],"Nothing here...");
+ else
+ {
+ sprintf(HSDetstr[1],"No. %d of Easy Mode",detv);
+ sprintf(HSDetstr[2],"Scored %lld by %s",ERec[detv].score,ERec[detv].name);
+ sprintf(HSDetstr[3],"Restarts %d",ERec[detv].rescol);
+ sprintf(HSDetstr[4],"Semi-Collisions %d",ERec[detv].scoll);
+ sprintf(HSDetstr[5],"CLR Usage %d",ERec[detv].clrusg);
+ sprintf(HSDetstr[6],"Average FPS %d.%d",ERec[detv].af_int,ERec[detv].af_fric);
+ }
+ for (int i=1;i<=6;++i)
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(i,fnt,snd,400,170+30*i,0.1f*i-0.1f,HSDetstr[i])),
+ HSDetailGUI->EnableCtrl(i,false);
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,380,0.6f,"Back"));
+ break;
+ case 2:
+ memset(HSDetstr,0,sizeof(HSDetstr));
+ if (!NRec[detv].score)sprintf(HSDetstr[1],"Nothing here...");
+ else
+ {
+ sprintf(HSDetstr[1],"No. %d of Normal Mode",detv);
+ sprintf(HSDetstr[2],"Scored %lld by %s",NRec[detv].score,NRec[detv].name);
+ sprintf(HSDetstr[3],"Restarts %d",NRec[detv].rescol);
+ sprintf(HSDetstr[4],"Semi-Collisions %d",NRec[detv].scoll);
+ sprintf(HSDetstr[5],"CLR Usage %d",NRec[detv].clrusg);
+ sprintf(HSDetstr[6],"Average FPS %d.%d",NRec[detv].af_int,NRec[detv].af_fric);
+ }
+ for (int i=1;i<=6;++i)
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(i,fnt,snd,400,170+30*i,0.1f*i-0.1f,HSDetstr[i])),
+ HSDetailGUI->EnableCtrl(i,false);
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,380,0.6f,"Back"));
+ break;
+ case 3:
+ memset(HSDetstr,0,sizeof(HSDetstr));
+ if (!ExRec[detv].score)sprintf(HSDetstr[1],"Nothing here...");
+ else
+ {
+ sprintf(HSDetstr[1],"No. %d of Extreme Mode",detv);
+ sprintf(HSDetstr[2],"Scored %lld by %s",ExRec[detv].score,ExRec[detv].name);
+ sprintf(HSDetstr[3],"Restarts %d",ExRec[detv].rescol);
+ sprintf(HSDetstr[4],"Semi-Collisions %d",ExRec[detv].scoll);
+ sprintf(HSDetstr[5],"CLR Usage %d",ExRec[detv].clrusg);
+ sprintf(HSDetstr[6],"Average FPS %d.%d",ExRec[detv].af_int,ExRec[detv].af_fric);
+ }
+ for (int i=1;i<=6;++i)
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(i,fnt,snd,400,170+30*i,0.1f*i-0.1f,HSDetstr[i])),
+ HSDetailGUI->EnableCtrl(i,false);
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,380,0.6f,"Back"));
+ break;
+ case 4:
+ memset(HSDetstr,0,sizeof(HSDetstr));
+ if (!FPMRec[detv].score)sprintf(HSDetstr[1],"Nothing here...");
+ else
+ {
+ sprintf(HSDetstr[1],"No. %d of Free Play Mode",detv);
+ sprintf(HSDetstr[2],"Scored %lld by %s",FPMRec[detv].score,FPMRec[detv].name);
+ sprintf(HSDetstr[3],"Collisions %d",FPMRec[detv].rescol);
+ sprintf(HSDetstr[4],"Semi-Collisions %d",FPMRec[detv].scoll);
+ sprintf(HSDetstr[5],"CLR Usage %d",FPMRec[detv].clrusg);
+ sprintf(HSDetstr[6],"Average FPS %d.%d",FPMRec[detv].af_int,FPMRec[detv].af_fric);
+ }
+ for (int i=1;i<=6;++i)
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(i,fnt,snd,400,170+30*i,0.1f*i-0.1f,HSDetstr[i])),
+ HSDetailGUI->EnableCtrl(i,false);
+ HSDetailGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,380,0.6f,"Back"));
+ break;
+ }
+ HSDetailGUI->SetCursor(spr);
+ HSDetailGUI->SetNavMode(HGEGUI_UPDOWN);
+ HSDetailGUI->SetFocus(7);
+ HSDetailGUI->Enter();
+}
+void HSDetGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=HSDetailGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 7:Current_Position=9;HSDetailGUI->Leave();HSViewGUI->Enter();break;
+ }
+ }
+}
+void HSViewGUI_Init()
+{
+ Current_Position=9;
+ HSViewGUI=new hgeGUI();
+ switch (view)
+ {
+ case 1:
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Highscore - Easy"));
+ for (int i=1;i<=Ecnt;++i)
+ {
+ sprintf(HSVstr[i],"%d. %s - %lld",i,ERec[i].name,ERec[i].score);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ for (int i=Ecnt+1;i<=5;++i)
+ {
+ sprintf(HSVstr[i],"%d. ----------",i);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ break;
+ case 2:
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Highscore - Normal"));
+ for (int i=1;i<=Ncnt;++i)
+ {
+ sprintf(HSVstr[i],"%d. %s - %lld",i,NRec[i].name,NRec[i].score);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ for (int i=Ncnt+1;i<=5;++i)
+ {
+ sprintf(HSVstr[i],"%d. ----------",i);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ break;
+ case 3:
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Highscore - Extreme"));
+ for (int i=1;i<=Excnt;++i)
+ {
+ sprintf(HSVstr[i],"%d. %s - %lld",i,ExRec[i].name,ExRec[i].score);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ for (int i=Excnt+1;i<=5;++i)
+ {
+ sprintf(HSVstr[i],"%d. ----------",i);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ break;
+ case 4:
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Highscore - Free Play Mode"));
+ for (int i=1;i<=FPMcnt;++i)
+ {
+ sprintf(HSVstr[i],"%d. %s - %lld",i,FPMRec[i].name,FPMRec[i].score);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ for (int i=FPMcnt+1;i<=5;++i)
+ {
+ sprintf(HSVstr[i],"%d. ----------",i);
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(i+1,fnt,snd,400,200+30*i,0.1f*i,HSVstr[i]));
+ }
+ break;
+ }
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(7,fnt,snd,400,380,0.6f,"Select one record to view details."));
+ HSViewGUI->AddCtrl(new hgeGUIMenuItem(8,fnt,snd,400,410,0.7f,"Back"));
+ HSViewGUI->EnableCtrl(1,false);HSViewGUI->EnableCtrl(7,false);
+ HSViewGUI->SetCursor(spr);
+ HSViewGUI->SetNavMode(HGEGUI_UPDOWN|HGEGUI_CYCLED);
+ HSViewGUI->SetFocus(2);
+ HSViewGUI->Enter();
+}
+void HSViewGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=HSViewGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 2:detv=1;HSDetGUI_Init();break;
+ case 3:detv=2;HSDetGUI_Init();break;
+ case 4:detv=3;HSDetGUI_Init();break;
+ case 5:detv=4;HSDetGUI_Init();break;
+ case 6:detv=5;HSDetGUI_Init();break;
+ case 8:Current_Position=8;HSViewGUI->Leave();if (!HighScoreGUI)HighScoreGUI_Init();HighScoreGUI->Enter();break;
+ }
+ }
+}
+void HighScoreGUI_Init()
+{
+ HighScoreGUI=new hgeGUI();
+ Current_Position=8;
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,350,200,0.0f,"View Highscores && Records for..."));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Easy"));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Normal"));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Extreme"));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Free Play Mode"));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(6,fnt,snd,400,400,0.5f,"Back"));
+ HighScoreGUI->EnableCtrl(1,false);
+ HighScoreGUI->SetCursor(spr);
+ HighScoreGUI->SetNavMode(HGEGUI_UPDOWN|HGEGUI_CYCLED);
+ HighScoreGUI->SetFocus(7);
+ HighScoreGUI->Enter();
+}
+void HighScoreGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=HighScoreGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 2:view=1;HSViewGUI_Init();break;
+ case 3:view=2;HSViewGUI_Init();break;
+ case 4:view=3;HSViewGUI_Init();break;
+ case 5:view=4;HSViewGUI_Init();break;
+ case 6:Current_Position=0;HighScoreGUI->Leave();gui->Enter();break;
+ }
+ }
+
+}
+void BkTTitleGUI_Init()
+{
+ BkTTitleGUI=new hgeGUI();
+ Current_Position=12;
+ BkTTitleGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Really?"));
+ BkTTitleGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,200,250,0.1f,"I've pressed the wrong key"));
+ BkTTitleGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,600,250,0.2f,"Do return to menu!"));
+ BkTTitleGUI->EnableCtrl(1,false);
+ BkTTitleGUI->SetCursor(spr);
+ BkTTitleGUI->SetNavMode(HGEGUI_LEFTRIGHT|HGEGUI_CYCLED);
+ BkTTitleGUI->SetFocus(2);
+ BkTTitleGUI->Enter();
+}
+void BkTTitleGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=BkTTitleGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 2:
+ BkTTitleGUI->Leave();
+ Current_Position=11;
+ PauseGUI_Init();
+ break;
+ case 3:
+ Current_Position=0;BkTTitleGUI->Leave();gui->Enter();
+ break;
+ }
+ }
+}
+void PauseGUI_Init()
+{
+ PauseGUI=new hgeGUI();
+ Current_Position=11;
+ DisableAllTower=DisablePlayer=true;
+ PauseGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Paused..."));
+ PauseGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Return to Game"));
+ PauseGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Return to Title"));
+ PauseGUI->EnableCtrl(1,false);
+ PauseGUI->SetCursor(spr);
+ PauseGUI->SetNavMode(HGEGUI_UPDOWN|HGEGUI_CYCLED);
+ PauseGUI->SetFocus(2);
+ PauseGUI->Enter();
+}
+void PauseGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=PauseGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 2:
+ PauseGUI->Leave();
+ Current_Position=1;
+ DisableAllTower=DisablePlayer=false;
+ break;
+ case 3:
+ BkTTitleGUI_Init();
+ break;
+ }
+ }
+}
+int AP_Update(int plrspd,int plrslospd,int clrbns)
+{
+ int res=0;
+ if (plrspd<=4)res+=plrspd*1200;else res+=5000;
+ switch (plrslospd)
+ {
+ case 1:res+=4000;break;
+ case 2:res+=3200;break;
+ case 3:res+=2000;break;
+ case 4:res+=1500;break;
+ case 5:res+=700;break;
+ }
+ switch (clrbns)
+ {
+ case 0:break;
+ case 1:res+=1500;break;
+ case 2:res+=2700;break;
+ case 3:res+=4000;break;
+ case 4:res+=5500;break;
+ }
+ return res;
+}
+void Options_Writeback()
+{
+ freopen("blr.cfg","w",stdout);
+ printf(";CBL");
+ printf("%c",fpslvl==1?1:0);
+ printf("%c",tfs?1:0);
+ printf("%c",fpslvl==2?1:0);
+ printf("%c",diffkey?1:0);
+ printf("%c%c%c",plrspd,plrslospd,clrbns);
+ fclose(stdout);
+}
+void OptionsGUI_Init()
+{
+ OptionsGUI=new hgeGUI();
+ Current_Position=13;
+ if (!tfs)
+ sprintf(opt[0],"Fullscreen: Off");
+ else
+ sprintf(opt[0],"Fullscreen: On");
+ OptionsGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,opt[0]));
+ switch (fpslvl)
+ {
+ case 0:sprintf(opt[1],"FPS Level: Natural");break;
+ case 1:sprintf(opt[1],"FPS Level: Low FPS");break;
+ case 2:sprintf(opt[1],"FPS Level: Highest");break;
+ }
+ OptionsGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,opt[1]));
+ if (diffkey)
+ sprintf(opt[2],"Use Key X for Clear Range");
+ else
+ sprintf(opt[2],"Use Key Z for Clear Range");
+ OptionsGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,opt[2]));
+ OptionsGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Player Profile"));
+ OptionsGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Save and Exit"));
+ OptionsGUI->SetNavMode(HGEGUI_UPDOWN);
+ OptionsGUI->SetCursor(spr);
+ OptionsGUI->SetFocus(1);
+ OptionsGUI->Enter();
+}
+void PlayerProfGUI_Init()
+{
+ PlayerProfGUI=new hgeGUI();
+ Current_Position=14;
+ sprintf(opt[3],"Moving Speed: -%d+",plrspd);
+ sprintf(opt[4],"Precise Moving Speed: -%d+",plrslospd);
+ sprintf(opt[5],"Clear Range Bonus: -%d+",clrbns);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ PlayerProfGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,opt[3]));
+ PlayerProfGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,opt[4]));
+ PlayerProfGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,opt[5]));
+ PlayerProfGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,opt[6]));
+ PlayerProfGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Back"));
+ PlayerProfGUI->SetNavMode(HGEGUI_UPDOWN);
+ PlayerProfGUI->SetCursor(spr);
+ PlayerProfGUI->SetFocus(1);
+ PlayerProfGUI->Enter();
+}
+void PlayerProfGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=PlayerProfGUI->Update(dt);
+ if (id==5&&AP_Update(plrspd,plrslospd,clrbns)<=10000)
+ {PlayerProfGUI->Leave();OptionsGUI_Init();}
+ if (hge->Input_GetKeyState(HGEK_LEFT))
+ {
+ if (!LOWFPS)++lastkeypressed;else lastkeypressed+=17;
+ if (lastkeypressed>=100)
+ {
+ switch (PlayerProfGUI->GetFocus())
+ {
+ case 1:
+ if (plrspd>1)--plrspd;
+ sprintf(opt[3],"Moving Speed: -%d+",plrspd);
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(1))->RePos(400,200);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(4))->RePos(400,320);
+ break;
+ case 2:
+ if (plrslospd>1)--plrslospd;
+ sprintf(opt[4],"Precise Moving Speed: -%d+",plrslospd);
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(2))->RePos(400,240);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(4))->RePos(400,320);
+ break;
+ case 3:
+ if (clrbns>0)--clrbns;
+ sprintf(opt[5],"Clear Range Bonus: -%d+",clrbns);
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(3))->RePos(400,280);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(4))->RePos(400,320);
+ break;
+ }
+ lastkeypressed=0;
+ }
+ }
+ if (hge->Input_GetKeyState(HGEK_RIGHT))
+ {
+ if (!LOWFPS)++lastkeypressed;else lastkeypressed+=17;
+ if (lastkeypressed>=100)
+ {
+ switch (PlayerProfGUI->GetFocus())
+ {
+ case 1:
+ if (plrspd<5)++plrspd;
+ sprintf(opt[3],"Moving Speed: -%d+",plrspd);
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(1))->RePos(400,200);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(4))->RePos(400,320);
+ break;
+ case 2:
+ if (plrslospd<5)++plrslospd;
+ sprintf(opt[4],"Precise Moving Speed: -%d+",plrslospd);
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(2))->RePos(400,240);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(4))->RePos(400,320);
+ break;
+ case 3:
+ if (clrbns<4)++clrbns;
+ sprintf(opt[5],"Clear Range Bonus: -%d+",clrbns);
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(3))->RePos(400,280);
+ sprintf(opt[6],"Ability Point %d/10000",AP_Update(plrspd,plrslospd,clrbns));
+ ((hgeGUIMenuItem*)PlayerProfGUI->GetCtrl(4))->RePos(400,320);
+ break;
+ }
+ lastkeypressed=0;
+ }
+ }
+}
+void OptionsGUI_FrameFnk()
+{
+ float dt=hge->Timer_GetDelta();
+ int id=OptionsGUI->Update(dt);
+ if (id)
+ {
+ switch (id)
+ {
+ case 1:
+ tfs=!tfs;
+ if (!tfs)
+ sprintf(opt[0],"Fullscreen: Off");
+ else
+ sprintf(opt[0],"Fullscreen: On");
+ ((hgeGUIMenuItem*)OptionsGUI->GetCtrl(1))->RePos(400,200);
+ break;
+ case 2:
+ switch (fpslvl)
+ {
+ case 0:
+ fpslvl=1;LOWFPS=true;
+ hge->System_SetState(HGE_FPS,61);
+ break;
+ case 1:
+ fpslvl=2;LOWFPS=false;
+ hge->System_SetState(HGE_FPS,1000);
+ break;
+ case 2:
+ fpslvl=0;LOWFPS=false;
+ hge->System_SetState(HGE_FPS,0);
+ break;
+ }
+ switch (fpslvl)
+ {
+ case 0:sprintf(opt[1],"FPS Level: Natural");break;
+ case 1:sprintf(opt[1],"FPS Level: Low FPS");break;
+ case 2:sprintf(opt[1],"FPS Level: Highest");break;
+ }
+ ((hgeGUIMenuItem*)OptionsGUI->GetCtrl(2))->RePos(400,240);
+ break;
+ case 3:
+ diffkey=!diffkey;
+ if (diffkey)
+ sprintf(opt[2],"Use Key X for Clear Range");
+ else
+ sprintf(opt[2],"Use Key Z for Clear Range");
+ ((hgeGUIMenuItem*)OptionsGUI->GetCtrl(3))->RePos(400,280);
+ break;
+ case 4:
+ PlayerProfGUI_Init();
+ break;
+ case 5:
+ Options_Writeback();
+ OptionsGUI->Leave();
+ gui->Enter();
+ Current_Position=0;
+ break;
+ }
+ }
+}
diff --git a/archive/blr1/src/scorec.h b/archive/blr1/src/scorec.h
new file mode 100644
index 0000000..d07615a
--- /dev/null
+++ b/archive/blr1/src/scorec.h
@@ -0,0 +1,252 @@
+//Chrisoft Bullet Lab Remix HGE
+//Score Recording Implementations
+//"Copyleft" Chrisoft 2013
+struct TRecord
+{
+ long long score;
+ int len,rescol,scoll,clrusg;
+ int af_int,af_fric;
+ char name[16];
+}ERec[10],NRec[10],ExRec[10],FPMRec[10];
+unsigned int Ecnt,Ncnt,Excnt,FPMcnt;
+unsigned int header,seprt;
+char newname[16];
+int newlen,tbframebrk;
+unsigned int Getuint()
+{
+ unsigned int c1,c2,c3,c4,res;
+ c1=c2=c3=c4=0;
+ scanf("%c%c%c%c",&c1,&c2,&c3,&c4);
+ res=(c1<<24)+(c2<<16)+(c3<<8)+c4;
+ return res;
+}
+int Getint()
+{
+ return (int)Getuint();
+}
+long long Getll()
+{
+ long long c1,c2,c3,c4,c5,c6,c7,c8,res;
+ c1=c2=c3=c4=c5=c6=c7=c8=0;
+ scanf("%c%c%c%c%c%c%c%c",&c1,&c2,&c3,&c4,&c5,&c6,&c7,&c8);
+ res=(c1<<56)+(c2<<48)+(c3<<40)+(c4<<32)+(c5<<24)+(c6<<16)+(c7<<8)+c8;
+ return res;
+}
+void Putuint(unsigned int a)
+{
+ unsigned int c1,c2,c3,c4;
+ c1=a&0xFF000000;c2=a&0x00FF0000;
+ c3=a&0x0000FF00;c4=a&0x000000FF;
+ printf("%c%c%c%c",c1,c2,c3,c4);
+}
+void Putint(int a)
+{
+ Putuint((unsigned int)a);
+}
+void Putll(long long a)
+{
+ int c1,c2,c3,c4,c5,c6,c7,c8;
+ c1=a&0xFF00000000000000;
+ c2=a&0x00FF000000000000;
+ c3=a&0x0000FF0000000000;
+ c4=a&0x000000FF00000000;
+ c5=a&0x00000000FF000000;
+ c6=a&0x0000000000FF0000;
+ c7=a&0x000000000000FF00;
+ c8=a&0x00000000000000FF;
+ printf("%c%c%c%c%c%c%c%c",c1,c2,c3,c4,c5,c6,c7,c8);
+}
+TRecord GetTRecord()
+{
+ TRecord res;
+ res.len=Getint();
+ memset(res.name,0,sizeof(res.name));
+ for (int i=0;i<res.len;++i)scanf("%c",&res.name[i]);
+ res.score=Getll();
+ res.rescol=Getint();
+ res.scoll=Getint();
+ res.clrusg=Getint();
+ res.af_int=Getint();res.af_fric=Getint();
+ return res;
+}
+void PutTRecord(TRecord a)
+{
+ Putint(a.len);
+ for (int i=0;i<a.len;++i)printf("%c",a.name[i]);
+ Putll(a.score);
+ Putint(a.rescol);
+ Putint(a.scoll);
+ Putint(a.clrusg);
+ Putint(a.af_int);Putint(a.af_fric);
+}
+void Score_Init()
+{
+ freopen("score.cfg","r",stdin);
+ header=Getuint();
+ if (header!=0x3b424c53)//0x3b424c53=";BLS"
+ {
+ fclose(stdin);
+ Error("Error when loading score file!");
+ }
+ seprt=Getuint();
+ if (seprt!=0xd1ffa0c0)
+ {
+ fclose(stdin);
+ Error("Error when loading score file!");
+ }
+ Ecnt=Getuint();
+ for (unsigned int i=1;i<=Ecnt;++i)ERec[i]=GetTRecord();
+ seprt=Getuint();
+ if (seprt!=0xd1ffa0c1)
+ {
+ fclose(stdin);
+ Error("Error when loading score file!");
+ }
+ Ncnt=Getuint();
+ for (unsigned int i=1;i<=Ncnt;++i)NRec[i]=GetTRecord();
+ seprt=Getuint();
+ if (seprt!=0xd1ffa0c2)
+ {
+ fclose(stdin);
+ Error("Error when loading score file!");
+ }
+ Excnt=Getuint();
+ for (unsigned int i=1;i<=Excnt;++i)ExRec[i]=GetTRecord();
+ seprt=Getuint();
+ if (seprt!=0xd1ffa0c3)
+ {
+ fclose(stdin);
+ Error("Error when loading score file!");
+ }
+ FPMcnt=Getuint();
+ for (unsigned int i=1;i<=FPMcnt;++i)FPMRec[i]=GetTRecord();
+ fclose(stdin);
+}
+int CheckHighScore()
+{
+ int i;
+ switch (mode)
+ {
+ case 4:
+ for (i=1;i<=Ecnt;++i)
+ if (ERec[i].score<score)break;
+ if (i==5&&ERec[i].score>score)return -1;
+ if (Ecnt<5&&ERec[Ecnt].score>score)return Ecnt+1;
+ return i;
+ break;
+ case 1:
+ for (i=1;i<=Ncnt;++i)
+ if (NRec[i].score<score)break;
+ if (i==5&&NRec[i].score>score)return -1;
+ if (Ncnt<5&&NRec[Ncnt].score>score)return Ncnt+1;
+ return i;
+ break;
+ case 2:
+ for (i=1;i<=Excnt;++i)
+ if (ExRec[i].score<score)break;
+ if (i==5&&ExRec[i].score>score)return -1;
+ if (Excnt<5&&ExRec[Ncnt].score>score)return Excnt+1;
+ return i;
+ break;
+ case 3:
+ for (i=1;i<=FPMcnt;++i)
+ if (FPMRec[i].score<score)break;
+ if (i==5&&FPMRec[i].score>score)return -1;
+ if (FPMcnt<5&&FPMRec[Ncnt].score>score)return FPMcnt+1;
+ return i;
+ break;
+ }
+}
+void Score_Write()
+{
+ freopen("score.cfg","w",stdout);
+ Putuint(0x3b424c53u);
+ Putuint(0xd1ffa0c0u);
+ Putint(Ecnt);
+ for (int i=1;i<=Ecnt;++i)
+ PutTRecord(ERec[i]);
+ Putuint(0xd1ffa0c1u);
+ Putint(Ncnt);
+ for (int i=1;i<=Ncnt;++i)
+ PutTRecord(NRec[i]);
+ Putuint(0xd1ffa0c2u);
+ Putint(Excnt);
+ for (int i=1;i<=Excnt;++i)
+ PutTRecord(ExRec[i]);
+ Putuint(0xd1ffa0c3u);
+ Putint(FPMcnt);
+ for (int i=1;i<=FPMcnt;++i)
+ PutTRecord(FPMRec[i]);
+ fclose(stdout);
+}
+void Score_Initailize()
+{
+ freopen("score.cfg","w",stdout);
+ printf(";BLS");
+ printf("%c%c%c%c",0xd1,0xff,0xa0,0xc0);printf("%c%c%c%c",0,0,0,0);
+ printf("%c%c%c%c",0xd1,0xff,0xa0,0xc1);printf("%c%c%c%c",0,0,0,0);
+ printf("%c%c%c%c",0xd1,0xff,0xa0,0xc2);printf("%c%c%c%c",0,0,0,0);
+ printf("%c%c%c%c",0xd1,0xff,0xa0,0xc3);printf("%c%c%c%c",0,0,0,0);
+ fclose(stdout);
+}
+void InsertHighScore()
+{
+ int pos=CheckHighScore();
+ switch (mode)
+ {
+ case 4:
+ if (pos<=Ecnt)
+ for (int i=5;i>pos;--i)
+ ERec[i]=ERec[i-1];
+ else ++Ecnt;
+ if (Ecnt<5)++Ecnt;
+ ERec[pos].score=score;
+ ERec[pos].len=newlen;
+ memcpy(ERec[pos].name,newname,sizeof(newname));
+ ERec[pos].clrusg=clrusg;
+ ERec[pos].rescol=restarts;ERec[pos].scoll=semicoll;
+ ERec[pos].af_int=(int)averfps;
+ ERec[pos].af_fric=(int)(averfps*10)%10*10+(int)(averfps*100)%10;
+ break;
+ case 1:
+ if (pos<=Ncnt)
+ for (int i=5;i>pos;--i)
+ NRec[i]=NRec[i-1];
+ if (Ncnt<5)++Ncnt;
+ NRec[pos].score=score;
+ NRec[pos].len=newlen;
+ memcpy(NRec[pos].name,newname,sizeof(newname));
+ NRec[pos].clrusg=clrusg;
+ NRec[pos].rescol=restarts;NRec[pos].scoll=semicoll;
+ NRec[pos].af_int=(int)averfps;
+ NRec[pos].af_fric=(int)(averfps*10)%10*10+(int)(averfps*100)%10;
+ break;
+ case 2:
+ if (pos<=Excnt)
+ for (int i=5;i>pos;--i)
+ ExRec[i]=ExRec[i-1];
+ if (Excnt<5)++Excnt;
+ ExRec[pos].score=score;
+ ExRec[pos].len=newlen;
+ memcpy(ExRec[pos].name,newname,sizeof(newname));
+ ExRec[pos].clrusg=clrusg;
+ ExRec[pos].rescol=restarts;ExRec[pos].scoll=semicoll;
+ ExRec[pos].af_int=(int)averfps;
+ ExRec[pos].af_fric=(int)(averfps*10)%10*10+(int)(averfps*100)%10;
+ break;
+ case 3:
+ if (pos<=FPMcnt)
+ for (int i=5;i>pos;--i)
+ FPMRec[i]=FPMRec[i-1];
+ if (FPMcnt<5)++FPMcnt;
+ FPMRec[pos].score=score;
+ FPMRec[pos].len=newlen;
+ memcpy(FPMRec[pos].name,newname,sizeof(newname));
+ FPMRec[pos].clrusg=clrusg;
+ FPMRec[pos].rescol=coll;FPMRec[pos].scoll=semicoll;
+ FPMRec[pos].af_int=(int)averfps;
+ FPMRec[pos].af_fric=(int)(averfps*10)%10*10+(int)(averfps*100)%10;
+ break;
+ }
+ Score_Write();
+} \ No newline at end of file
diff --git a/archive/blr1/src/towernbullet.h b/archive/blr1/src/towernbullet.h
new file mode 100644
index 0000000..6cae63d
--- /dev/null
+++ b/archive/blr1/src/towernbullet.h
@@ -0,0 +1,983 @@
+//Chrisoft Bullet Lab Remix HGE
+//Towers and Bullets Implementations
+//"Copyleft" Chrisoft 2013
+//WANTED:
+//Human-being which really knows what these mean, please contact Chirsno which is puzzled by these shitty codes..
+#include "effects.h"
+int CreateBullet1(double x,double y,double bs,bool eff=false)
+{
+ ++shots;
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=1;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=x-playerpos.x;
+ bullet[i].bulletdir.y=y-playerpos.y;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=bs;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,23,0,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ bullet[i].scollable=true;
+ bullet[i].scale=1;
+ bullet[i].bulletspr->SetHotSpot(12,12);
+ if (eff)BulletEffect_Attatch(i);
+ return i;
+}
+void CreateBullet2(double x,double y,double bs,double rad,bool eff=false)
+{
+ ++shots;
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=2;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=cos(rad);
+ bullet[i].bulletdir.y=sin(rad);
+ bullet[i].bulletspeed=bs;
+ bullet[i].lifetime=0;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,0,0,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ bullet[i].scollable=true;
+ bullet[i].scale=1;
+ bullet[i].bulletspr->SetHotSpot(12,12);
+ if (eff)BulletEffect_Attatch(i);
+}
+void CreateBullet3(double x,double y,double bs,int dir,bool eff=false)
+{
+ CreateBullet2(x,y,bs,dir*0.5235987756,eff);
+}
+void CreateBullet4(double x,double y,double bs,int yelbrk=0,bool eff=false)
+{
+ ++shots;
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=4;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=x-playerpos.x;
+ bullet[i].bulletdir.y=y-playerpos.y;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=bs;
+ bullet[i].yelbrk=yelbrk;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,0,46,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ bullet[i].scollable=true;
+ bullet[i].scale=1;
+ bullet[i].bulletspr->SetHotSpot(12,12);
+ if (eff)BulletEffect_Attatch(i);
+}
+void CreateBullet5(double x,double y,double bs,bool eff=false)
+{
+ ++shots;
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=5;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=x-playerpos.x;
+ bullet[i].bulletdir.y=y-playerpos.y;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=bs;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,0,23,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ bullet[i].scollable=true;
+ bullet[i].scale=1;
+ bullet[i].bulletspr->SetHotSpot(12,12);
+ if (eff)BulletEffect_Attatch(i);
+}
+int CreateBullet6(double x,double y,double bs,int explo,bool eff=false)
+{
+ ++shots;
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=6;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=rand()%100-50;
+ bullet[i].bulletdir.y=rand()%100-50;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=bs;
+ bullet[i].oriexplo=bullet[i].redexplo=explo;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,23,23,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ bullet[i].scollable=true;
+ bullet[i].scale=1;
+ bullet[i].bulletspr->SetHotSpot(12,12);
+ if (eff)BulletEffect_Attatch(i);
+ return i;
+}
+int CreateBullet7(double x,double y,double bs,int explo,bool eff=false)
+{
+ ++shots;
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=7;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=rand()%100-50;
+ bullet[i].bulletdir.y=rand()%100-50;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=bs;
+ bullet[i].oriexplo=bullet[i].redexplo=explo;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,46,23,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+ bullet[i].redattrib=0;
+ bullet[i].whirem=whicnt;
+ bullet[i].whiskp=0;
+ bullet[i].scollable=true;
+ bullet[i].scale=1;
+ bullet[i].bulletspr->SetHotSpot(12,12);
+ if (eff)BulletEffect_Attatch(i);
+ return i;
+}
+void CreateBullet255(double x,double y,double bs)
+{
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=255;
+ bullet[i].bulletpos.x=x;
+ bullet[i].bulletpos.y=y;
+ bullet[i].bulletdir.x=x-playerpos.x;
+ bullet[i].bulletdir.y=y-playerpos.y;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ bullet[i].bulletspeed=bs;
+ bullet[i].bulletspr=new hgeSprite(SprSheet1,46,0,24,24);
+ bullet[i].bulletspr->SetColor(0x80FFFFFF);
+}
+void ProcessBullet1()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=1)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ }
+ BulletEffect_Process(i);
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ if (dis<=6)++coll,scminus+=10000;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0);
+ if (dis<=16&&bullet[i].scollable)++semicoll,++dsmc,bullet[i].scollable=false,SCEffect_Attatch();
+ }
+ }
+}
+void ProcessBullet2()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=2)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (LOWFPS)bullet[i].lifetime+=17;else ++bullet[i].lifetime;
+ if (bullet[i].lifetime>=15000&&Refliction)
+ {
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ continue;
+ }
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y)/20;//Process bullet's y coor.
+ }
+ }
+ BulletEffect_Process(i);
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ {
+ if (Refliction)
+ bullet[i].bulletdir.x=-bullet[i].bulletdir.x,
+ bullet[i].bulletdir.y=-bullet[i].bulletdir.y;
+ else
+ {
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ continue;
+ }
+ }
+ if (dis<=6)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ ++coll,scminus+=10000;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ continue;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0);
+ if (dis<=16&&bullet[i].scollable)++semicoll,++dsmc,bullet[i].scollable=false,SCEffect_Attatch();
+ }
+ }
+}
+//There is no need for ProcessBullet3() because they are in fact bullet2
+void ProcessBullet4()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=4)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ bullet[i].whirem+=17;
+ else
+ ++bullet[i].whirem;
+ if ((yelattrib&&bullet[i].whirem>=bullet[i].yelbrk)||!yelattrib)
+ {
+ bullet[i].whirem=0;
+ bullet[i].bulletdir.x=bullet[i].bulletpos.x-playerpos.x;
+ bullet[i].bulletdir.y=bullet[i].bulletpos.y-playerpos.y;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ }
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ //bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ //bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ BulletEffect_Process(i);
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ if (dis<=6)++coll,scminus+=10000;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0);
+ if (dis<=16&&bullet[i].scollable)++semicoll,++dsmc,bullet[i].scollable=false,SCEffect_Attatch();
+ }
+ }
+}
+void ProcessBullet5()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=5)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ //bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ //bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ BulletEffect_Process(i);
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ if (dis<=6)playerspeed*=0.9,playerslospeed*=0.9;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0);
+ }
+ }
+}
+void ProcessBullet6()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=6)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ //bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ //bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ BulletEffect_Process(i);
+ if (!LOWFPS)
+ {
+ if (bullet[i].redattrib==0)
+ --bullet[i].redexplo;
+ else
+ bullet[i].redexplo-=2;
+ }
+ else
+ {
+ if (bullet[i].redattrib==0)
+ bullet[i].redexplo-=17;
+ else
+ bullet[i].redexplo-=34;
+ }
+ if (bullet[i].redexplo<=0&&!DisableAllTower)
+ {
+ if (bullet[i].redattrib==0)
+ {
+ for (int j=1;j<=8;++j)
+ {
+ int pnt=CreateBullet6(bullet[i].bulletpos.x,bullet[i].bulletpos.y,bullet[i].bulletspeed,bullet[i].oriexplo);
+ //hge->Effect_PlayEx(snd,100,(bullet[i].bulletpos.x-400)/4);
+ bullet[pnt].bulletdir.x=cos(j*0.785398);
+ bullet[pnt].bulletdir.y=sin(j*0.785398);
+ bullet[pnt].dist=bullet[pnt].bulletdir.x*bullet[pnt].bulletdir.x+bullet[pnt].bulletdir.y*bullet[pnt].bulletdir.y;
+ bullet[pnt].dist=sqrt(bullet[pnt].dist);
+ bullet[pnt].redattrib=1;
+ }
+ }
+ else
+ {
+ for (int j=1;j<=12;++j)
+ CreateBullet2(bullet[i].bulletpos.x,bullet[i].bulletpos.y,bullet[i].bulletspeed,j*0.5236+clockrot);
+ clockrot+=deltarot;
+ deltarot+=0.004363322313;
+ }
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ if (dis<=6)++coll,scminus+=10000;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0);
+ if (dis<=16&&bullet[i].scollable)++semicoll,++dsmc,bullet[i].scollable=false,SCEffect_Attatch();
+ }
+ }
+}
+void ProcessBullet7()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=7)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ //bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ //bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ BulletEffect_Process(i);
+ if (!LOWFPS)
+ {
+ if (bullet[i].redattrib==0)
+ --bullet[i].redexplo;
+ else
+ bullet[i].redexplo-=3;
+ }
+ else
+ {
+ if (bullet[i].redattrib==0)
+ bullet[i].redexplo-=17;
+ else
+ bullet[i].redexplo-=51;
+ }
+ if (bullet[i].redexplo<=0&&!DisableAllTower)
+ {
+ if (bullet[i].redattrib==0)
+ {
+ int pnt=CreateBullet7(bullet[i].bulletpos.x,bullet[i].bulletpos.y,bullet[i].bulletspeed,bullet[i].oriexplo);
+ //hge->Effect_PlayEx(snd,100,(bullet[i].bulletpos.x-400)/4);
+ bullet[pnt].bulletdir.x=0;
+ bullet[pnt].bulletdir.y=0;
+ bullet[pnt].dist=1;
+ bullet[pnt].redattrib=1;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ if (!LOWFPS)
+ ++bullet[i].whiskp;
+ else
+ bullet[i].whiskp+=17;
+ if (bullet[i].whiskp>50)
+ {
+ for (int j=1;j<=12;++j)
+ CreateBullet2(bullet[i].bulletpos.x,bullet[i].bulletpos.y,bullet[i].bulletspeed,j*0.5236+whirot);
+ whirot+=dwhirot;
+ dwhirot+=0.004363322313;
+ bullet[i].whiskp=0;
+ --bullet[i].whirem;
+ }
+ if (bullet[i].whirem<=0)
+ {
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ }
+ }
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ if (dis<=6)++coll,scminus+=10000;
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale,0);
+ if (dis<=16&&bullet[i].scollable)++semicoll,++dsmc,bullet[i].scollable=false,SCEffect_Attatch();
+ }
+ }
+}
+void ProcessBullet255()
+{
+ for (int i=1;i<=bulcnt;++i)
+ {
+ if (!bullet[i].exist||bullet[i].bullettype!=255)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ if (!DisablePlayer)
+ {
+ bullet[i].bulletdir.x=bullet[i].bulletpos.x-playerpos.x;
+ bullet[i].bulletdir.y=bullet[i].bulletpos.y-playerpos.y;
+ bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y;
+ bullet[i].dist=sqrt(bullet[i].dist);
+ if (LOWFPS)
+ {
+ bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20*17;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20*17;//Process bullet's y coor.
+ }
+ else
+ {
+ bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ //bullet[i].bulletpos.x-=bullet[i].bulletspeed*(bullet[i].bulletdir.x/bullet[i].dist)/20;//Process bullet's x coor.
+ //bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20;//Process bullet's y coor.
+ }
+ double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
+ if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
+ //If collision is detected or the bullet flys out of screen, delete it.
+ {
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ }
+ else
+ {
+ bullet[i].bulletspr->RenderEx(bullet[i].bulletpos.x,bullet[i].bulletpos.y,0,0.5,0);
+ }
+ }
+}
+int CreateTower1(double x,double y,int timer,double bs,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)
+ {
+ return i;
+ }
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=1;
+ tower[i].bulletspeed=bs;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,44,0,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].effect=eff;
+ return i;
+}
+int CreateTower2(double x,double y,int timer,double bs,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)return i;
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=2;
+ tower[i].bulletspeed=bs;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,0,0,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].effect=eff;
+ return i;
+}
+int CreateTower3(double x,double y,int timer,double bs,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)return i;
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=3;
+ tower[i].bulletspeed=bs;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,0,0,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].effect=eff;
+ return i;
+}
+int CreateTower4(double x,double y,int timer,double bs,int yelbrk=0,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)
+ {
+ return i;
+ }
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=4;
+ tower[i].bulletspeed=bs;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,88,44,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].yelbrk=yelbrk;
+ tower[i].effect=eff;
+ return i;
+}
+int CreateTower5(double x,double y,int timer,double bs,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)
+ {
+ return i;
+ }
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=5;
+ tower[i].bulletspeed=bs;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,88,0,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].effect=eff;
+ return i;
+}
+int CreateTower6(double x,double y,int timer,double bs,int redexplo,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)
+ {
+ return i;
+ }
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=6;
+ tower[i].bulletspeed=bs;
+ tower[i].redexplo=redexplo;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,0,44,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].effect=eff;
+ return i;
+}
+int CreateTower7(double x,double y,int timer,double bs,int redexplo,bool eff=false)//This returns the created tower number.
+{
+ int i;
+ if (towcnt==0)
+ towcnt=i=1;
+ else
+ {
+ for (i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist)break;
+ if (abs(tower[i].towerpos.x-x)<=zero&&abs(tower[i].towerpos.y-y)<=zero)
+ {
+ return i;
+ }
+ }
+ if (i>towcnt)
+ towcnt=i;
+ }
+ tower[i].exist=true;
+ tower[i].towertype=7;
+ tower[i].bulletspeed=bs;
+ tower[i].redexplo=redexplo;
+ tower[i].towertimer=tower[i].curtimer=timer;
+ tower[i].towerpos.x=x,tower[i].towerpos.y=y;
+ tower[i].towerspr=new hgeSprite(SprSheet2,44,44,44,44);
+ tower[i].towerspr->SetHotSpot(22,22);
+ tower[i].towerspr->SetColor(0x80FFFFFF);
+ tower[i].whicnt=whicnt;
+ tower[i].effect=eff;
+ return i;
+}
+void ProcessTower1()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=1)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ tower[i].curtimer=tower[i].towertimer;
+ CreateBullet1(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,tower[i].effect);
+ }
+ }
+}
+void ProcessTower2()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=2)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ tower[i].curtimer=tower[i].towertimer;
+ for (int j=1;j<=12;++j)
+ CreateBullet2(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,j*0.5236+clockrot,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ clockrot+=deltarot;
+ //deltarot+=0.004363322313;
+ deltarot+=deltadelta;
+ }
+ }
+}
+void ProcessTower3()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=3)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ tower[i].curtimer=tower[i].towertimer;
+ if (tower[i].t3t==0)
+ for (int j=1;j<=12;++j)
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,j,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ if (tower[i].t3t==1)
+ {
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,12,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,3,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,6,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,9,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ if (tower[i].t3t==2)
+ {
+ if (rand()%2==0)
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,12,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ else
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,6,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ if (tower[i].t3t==3)
+ {
+ if (rand()%2==0)
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,3,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ else
+ CreateBullet3(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,9,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ }
+ }
+}
+void ProcessTower4()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=4)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ tower[i].curtimer=tower[i].towertimer;
+ CreateBullet4(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,tower[i].yelbrk,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ }
+}
+void ProcessTower5()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=5)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ tower[i].curtimer=tower[i].towertimer;
+ CreateBullet5(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ }
+}
+void ProcessTower6()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=6)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ tower[i].curtimer=tower[i].towertimer;
+ CreateBullet6(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,tower[i].redexplo,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ }
+}
+void ProcessTower7()
+{
+ for (int i=1;i<=towcnt;++i)
+ {
+ if (!tower[i].exist||tower[i].towertype!=7)continue;
+ tower[i].towerspr->RenderEx(tower[i].towerpos.x+7.2,tower[i].towerpos.y+7.2,0,0.545);
+ if (DisableAllTower)continue;
+ if (LOWFPS)
+ tower[i].curtimer-=17;
+ else
+ --tower[i].curtimer;
+ if (tower[i].curtimer<=0)
+ {
+ tower[i].curtimer=tower[i].towertimer;
+ CreateBullet7(tower[i].towerpos.x,tower[i].towerpos.y,tower[i].bulletspeed,tower[i].redexplo,tower[i].effect);
+ //hge->Effect_PlayEx(snd,100,(tower[i].towerpos.x-400)/4);
+ }
+ }
+}