aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-10 13:47:24 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-10 13:47:24 +0000
commit32a2523dd5c51b31b31f5e43a7cebdb16e7f5e84 (patch)
treec69ce4a4009caf59916400957a6ae7f7e18c86ba
parentd726aac2d9bac76f095ad6559d7dc30d97c3a97f (diff)
downloadbullet-lab-remix-32a2523dd5c51b31b31f5e43a7cebdb16e7f5e84.tar.xz
Dear Pre-Release Candidate version(RC-0).
CLR will collect multiplier +1's in range now. Multiplier +1's caught by player won't disappear now. Add/Move background transitions. Add volume control to options. This make the configuration file not compatible with older versions. Just delete it! Modify hge's API so that it can handle real volume and pan values. Volume value varys from 0 to 1, pan value varys from -1 to 1. Document...
-rwxr-xr-xChangeLog17
-rw-r--r--FAQ3
-rw-r--r--FAQ.zh3
-rw-r--r--Levels63
-rw-r--r--Levels.zh45
-rw-r--r--Readme6
-rw-r--r--Readme.zh35
-rwxr-xr-xVERSION2
-rw-r--r--global.h4
-rw-r--r--hge/CxImage/ximapng.cpp2
-rw-r--r--hge/hge_impl.h6
-rw-r--r--hge/sound.cpp26
-rwxr-xr-xhgewin/hge_impl.h6
-rw-r--r--hgewin/sound.cpp27
-rw-r--r--include/hge.h6
-rw-r--r--levels.h44
-rw-r--r--main.cpp21
-rw-r--r--menus.h131
-rw-r--r--music.h2
-rw-r--r--scoresystem.h22
20 files changed, 314 insertions, 157 deletions
diff --git a/ChangeLog b/ChangeLog
index cc7adbe..c7335db 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,8 +5,9 @@ Todo's:
*Adjust difficulty!*//almost done?
*Add multpo's.*//almost done?
*Distribute CLRs.*//almost done?
+Ranking rewrite.
Bug fixes.
-Tests.
+Tests.*//done?...
Wishlist?
Known bugs:
@@ -21,6 +22,18 @@ In-game music bring back.
of next BLR.)
Pre-Released versions:
+0.9.8-0 (r98)
+Dear Pre-Release Candidate version(RC-0).
+
+CLR will collect multiplier +1's in range now.
+Multiplier +1's caught by player won't disappear now.
+Add/Move background transitions.
+Add volume control to options. This make the configuration file
+not compatible with older versions. Just delete it!
+Modify hge's API so that it can handle real volume and pan values.
+Volume value varys from 0 to 1, pan value varys from -1 to 1.
+Document...
+
0.9.7-0 (r97)
Fix: small semi-coll bullets are collected by clr...
Add Multpo's for Level 7/-1.
@@ -40,6 +53,8 @@ Blinking HangUpText *should* be fixed now...
0.9.5-0 (r95)
Change configuration and score file names. Files with their names
begin with "." may be annoying in Windows though...
+If we find a score file during first start up, assume it's valid and
+don't overwrite it.
Fix the problem that in-game music won't be resumed when back from pause.
Fix the problem that Multpo's won't be removed if a new game is created.
Fix the problem that the first tip is not shown correctly if the game
diff --git a/FAQ b/FAQ
index ac50631..3d3608c 100644
--- a/FAQ
+++ b/FAQ
@@ -113,6 +113,9 @@ Q: It's sssSssso hard!
A: It's supposed to be hard! The only solution is to practice more.
However you can get more CLRs in player preference settings (with
a sacrifice of moving speed).
+
+Q: I can't get those "+1"'s...
+A: It's designed to be so! Some of the "+1"'s are only for adventurers!
Q: Tell me the history.
A: Changelog tracked a full history of this project (Although it's not
diff --git a/FAQ.zh b/FAQ.zh
index 2514429..f1eb990 100644
--- a/FAQ.zh
+++ b/FAQ.zh
@@ -88,6 +88,9 @@ Q: 怎么这么难啊。
A: 这是故意的!唯一的解决方法是多练…
但是你在游戏设置中可以搞到更多的CLR(需要以降低移动速度为代价)。
+Q: 我根本拿不到那些“+1”!
+A: 这也是故意的!一部分“+1”是专门为愿意为它们冒险的人设计的。
+
Q: 我认为图形绘制的有问题。
A: 对于DirectX,我了解的不太多,因为我没有修改hge的DirectX版。
但是它不应该和OpenGL版有太大的不同。
diff --git a/Levels b/Levels
index 3ac34d6..4706cb0 100644
--- a/Levels
+++ b/Levels
@@ -4,6 +4,8 @@ Level index/specifications/hints
I'm still working on this document.
Please don't trouble me if it misled you.
+*Trying the levels before reading this is strongly recommended.*
+
This document is probably NOT suitable for:
Anybody who isn't insterested in this topic
Liberal arts students(?...)
@@ -23,7 +25,8 @@ Someone who is stuck at a part
Level 1 2/180
River levels 120
-It's confusing... so much bullets for Level1?
- However it's fairly easy. Do not seek for death.
+ However it's fairly easy. Do not seek for death(where those "+1" are
+ leading you to)
Double-directed labyrinth 60
-Still very easy.
@@ -34,10 +37,11 @@ Polygon-red 60
Fake bullets aren't always annoying.
Polygon-white 60
--Make good use of precise mode
+-Make good use of precise mode.
Polygon-white locked 6
--Find a good position, e.g. near by a line
+-You can't move vertically!
+ Find a good position, e.g. near by a line.
Polygon-both 30
-This part doesn't make sense.
@@ -51,7 +55,7 @@ Reflective 30
-It's a little difficult... Keep away from the edges!
Rotate ???? 60
--Stay away from the rotating bullets and you'll pass this level.
+-Stay away from the rotating bullets.
Wall of blues? 30
-Rather easy. Do not try to earn too may semi-collisions unless
@@ -95,22 +99,24 @@ High speed threaten 30
-It's JUST threaten!
Precision is important.
Practice makes perfect.
+ If you *can't* move horizonally may be it's easier...
Crossing threaten 30
-Appears very hard.
Choose the correct time to cross those bullets.
-Orange trap2 2+2+2+2
+Orange trap2 2+2+2+5
-Just another level from level 4.
Fish in the barrel 60
--Where have I seen this...
+-Seems to be faster and faster? NO...
Remark: Those bullets are comming directly towards you.
the Unbreakable jail 30
-This is fairly hard. Use CLR if you need it.
Remark: When the 'target' got red, it's about to update its
- position.
+ position. If you keep moving when it's updating its position,
+ it will stuck in update mode, or it will stop.
Level 6 7/390
Snow WHITE 30
@@ -122,6 +128,8 @@ Photokeratitis 10+10+10+10+10
-This is sickly hard...
Treat fast bullets and slow bullets separately.
Remark: It looks like Wriggle Nightbug's spellcard...
+ As of r94, it's not so hard as it was before. Fast bullets
+ won't hit you *if you don't move*.
Squash-4(?) 60
-Do not be trapped! You only need ONE CLR!...
@@ -132,7 +140,8 @@ Avalanche 60
Dangerous target 60
-Keep moving!
It's a nightmare if you've choose a slow player...
- Remark: The target follows you as a yellow bullet does.
+ Remark: The target follows you as a yellow bullet does,
+ but not in the same manner.
Hexagon loops 10+20+7+7+7+19
-Step well back and watch the show.
@@ -147,6 +156,7 @@ Hyperfluid 60
Remark: The white bullets are not accelerated, which are different
from the blue ones. The blue bullets share the same direction: 45 deg.
This part was designed as 「my」 「spellcard」 at first...
+ Also will become easier if horizonal movement is restricted...
Level 7 12/930+ Mapped levels
Spring thunder storm - panic? 60 Thunder storm...
@@ -154,12 +164,14 @@ Spring thunder storm - panic? 60 Thunder storm...
different!
And this one is really easy.
Remark: Try to get to the top of the screen...
+ Try restricting vertical movement this time...
Rainbow tower - color theory 90 rainbow tower
-Basic level.
- Remark: It's taken from the testbed version of BLRII.
+ Remark: It's taken from the old testbed version of BLRII.
+
Rainbow bullets - nauty photon 60 Lazy level;)
--Similar to one part in level1, but a lot harder.
+-Similar to one part in level1, but *much* harder.
Luck is really required.
Remark: The generation of bullets is really strange... If the last position
on the y axis is taken up... sorry that I started to talk about coding again.
@@ -183,14 +195,16 @@ Rainbow effect - photon school 60 "particalization"!
Over the Rainbow - timeless challenge - great circles
-Your goal is to reach the red block...
And, this one is also pretty hard...
- If you're not well-skilled and you are working on FPM, try --suicide--!
+ If you're not well-skilled and you are working on FPM, try --suicide--,
+ it worthwhile to do so!
Remark: This level will never end if you don't reach the red block...
Trypophobia 120 another two classes: Tail & Pile
-Very hard. You'll never know where they will go next.
However, they won't step on the same place twice.
Will this cause trypophobia?
- Remark: I seem to forget an important thing: Bullets with effects won't collide
+ Remark: This level almost burn my computer...
+ I seem to forget an important thing: Bullets with effects won't collide
for a short time after they are created...
Photon fission 90 Use a slightly modified tower8...
@@ -205,16 +219,22 @@ Return to void 90 return (void)(...);
I don't know where this came from.
CLR is useless but it will give you a short period during which you are invincible.
Remark: There are "no solution" cases...
+
Level -1(Extreme) 7/1020
-unknown circles*2 60*2
--Pretty easy as they are only the beginning of nightmare...
+unknown circles1 60
+-They slow down as they approach the border. VERY ANNOYING!!!
+
+unknown circles2 60
+-They STUCK at the border!! And they get THICKER and THICKER!!......
Spiky 120
-Hard. Their behavior is not predictable.
Remark: Again, never try to approach lasers! They are harmful to your eyes...
Achromatopsia 120(90+30)
--Or we should call this "deuteranopia vs protanopia"?
+-There's no way?!
+ Well, mind the name please...
+ Or we should call this "deuteranopia vs protanopia"?
Remark: Color change may suddenly happen!!
Quad thread 120
@@ -222,19 +242,22 @@ Quad thread 120
Remark: I don't...
Gravity vortex 120
--It has nothing to do with gravity at all.
+-It has nothing to do with gravity at all, but it's pretty
+ hard!
+ Seems to be very graceful.
Supernova(additive blending) 120
-After gathering enough power, they explode --
Awesome supernova!
I enjoy coding(such easy parts)...
+ Remark: Newly created bullets are... I can't give more clue.
yellow explosive 90
-There's nothing to code, so I came up with this...
- Not deadly at all.
+ --Not deadly at all.--
Sink over the horizon 90
--Strange. You might be trapped without noticing it.
+-Strange. You will be easily trapped.
Incomplete Reflective 120
-Start in peace, end in mess.
@@ -286,13 +309,13 @@ Density test
-Really high density.
WTF? There's no way?!
You MUST end up in a horrible traffic accident, squeezing every drop of blood
- out on the left board. That's a bad image.
+ out on the left board. That's really a bad image.
"Pinballs"
-Well... They have collisions since r93!
These balls spawn with random velocity!
You may end up...
- just imagine a enlarged bowling ball flying direct towards you.
+ just imagine an eXtra-eXtra Large sized bowling ball flying direct towards you.
Road Blocks
-You'll understand this one day.
diff --git a/Levels.zh b/Levels.zh
index 0647885..e3f364f 100644
--- a/Levels.zh
+++ b/Levels.zh
@@ -4,6 +4,8 @@ BulletLabRemixII
此文档仍未完成。
如果它误导了你,也不要来找我啊。。。
+强烈推荐在阅读本文档前先自己玩一下。
+
不适宜人群:
Anybody who isn't insterested in this topic
Liberal arts students(?...)
@@ -23,7 +25,8 @@ Someone who is stuck at a part
Level 1 2/180
River levels 120
-It's confusing... so much bullets for Level1?
- However it's fairly easy. Do not seek for death.
+ However it's fairly easy. Do not seek for death(where those "+1" are
+ leading you to)
Double-directed labyrinth 60
-Still very easy.
@@ -34,10 +37,11 @@ Polygon-red 60
Fake bullets aren't always annoying.
Polygon-white 60
--Make good use of precise mode
+-Make good use of precise mode.
Polygon-white locked 6
--Find a good position, e.g. near by a line
+-You can't move vertically!
+ Find a good position, e.g. near by a line.
Polygon-both 30
-This part doesn't make sense.
@@ -51,7 +55,7 @@ Reflective 30
-It's a little difficult... Keep away from the edges!
Rotate ???? 60
--Stay away from the rotating bullets and you'll pass this level.
+-Stay away from the rotating bullets.
Wall of blues? 30
-Rather easy. Do not try to earn too may semi-collisions unless
@@ -95,22 +99,24 @@ High speed threaten 30
-It's JUST threaten!
Precision is important.
Practice makes perfect.
+ If you *can't* move horizonally may be it's easier...
Crossing threaten 30
-Appears very hard.
Choose the correct time to cross those bullets.
-Orange trap2 2+2+2+2
+Orange trap2 2+2+2+5
-Just another level from level 4.
Fish in the barrel 60
--Where have I seen this...
+-Seems to be faster and faster? NO...
Remark: Those bullets are comming directly towards you.
the Unbreakable jail 30
-This is fairly hard. Use CLR if you need it.
Remark: When the 'target' got red, it's about to update its
- position.
+ position. If you keep moving when it's updating its position,
+ it will stuck in update mode, or it will stop.
Level 6 7/390
Snow WHITE 30
@@ -122,6 +128,8 @@ Photokeratitis 10+10+10+10+10
-This is sickly hard...
Treat fast bullets and slow bullets separately.
Remark: It looks like Wriggle Nightbug's spellcard...
+ As of r94, it's not so hard as it was before. Fast bullets
+ won't hit you *if you don't move*.
Squash-4(?) 60
-Do not be trapped! You only need ONE CLR!...
@@ -132,7 +140,8 @@ Avalanche 60
Dangerous target 60
-Keep moving!
It's a nightmare if you've choose a slow player...
- Remark: The target follows you as a yellow bullet does.
+ Remark: The target follows you as a yellow bullet does,
+ but not in the same manner.
Hexagon loops 10+20+7+7+7+19
-Step well back and watch the show.
@@ -147,6 +156,7 @@ Hyperfluid 60
Remark: The white bullets are not accelerated, which are different
from the blue ones. The blue bullets share the same direction: 45 deg.
This part was designed as 「my」 「spellcard」 at first...
+ Also will become easier if horizonal movement is restricted...
Level 7 12/930+ Mapped levels
Spring thunder storm - panic? 60 Thunder storm...
@@ -154,12 +164,14 @@ Spring thunder storm - panic? 60 Thunder storm...
different!
And this one is really easy.
Remark: Try to get to the top of the screen...
+ Try restricting vertical movement this time...
Rainbow tower - color theory 90 rainbow tower
-Basic level.
- Remark: It's taken from the testbed version of BLRII.
+ Remark: It's taken from the old testbed version of BLRII.
+
Rainbow bullets - nauty photon 60 Lazy level;)
--Similar to one part in level1, but a lot harder.
+-Similar to one part in level1, but *much* harder.
Luck is really required.
Remark: The generation of bullets is really strange... If the last position
on the y axis is taken up... sorry that I started to talk about coding again.
@@ -183,14 +195,16 @@ Rainbow effect - photon school 60 "particalization"!
Over the Rainbow - timeless challenge - great circles
-Your goal is to reach the red block...
And, this one is also pretty hard...
- If you're not well-skilled and you are working on FPM, try --suicide--!
+ If you're not well-skilled and you are working on FPM, try --suicide--,
+ it worthwhile to do so!
Remark: This level will never end if you don't reach the red block...
Trypophobia 120 another two classes: Tail & Pile
-Very hard. You'll never know where they will go next.
However, they won't step on the same place twice.
Will this cause trypophobia?
- Remark: I seem to forget an important thing: Bullets with effects won't collide
+ Remark: This level almost burn my computer...
+ I seem to forget an important thing: Bullets with effects won't collide
for a short time after they are created...
Photon fission 90 Use a slightly modified tower8...
@@ -205,6 +219,7 @@ Return to void 90 return (void)(...);
I don't know where this came from.
CLR is useless but it will give you a short period during which you are invincible.
Remark: There are "no solution" cases...
+
Level -1(Extreme) 7/1020
unknown circles*2 60*2
-Pretty easy as they are only the beginning of nightmare...
@@ -286,7 +301,7 @@ Sine wave
-示波器?
找一个合适的位置,跟图像一起振动…
说明:有些地方是秒撞的!
- 结局:喂,我在那个示波器上找不到你啊…
+ 结局:喂,我在那个坏掉的示波器上找不到你啊…
Density test
密度测试
@@ -294,8 +309,8 @@ Density test
卧×?没路了?
结局:
玩家×××
- 死于一场可怕的车祸,身体中每滴血都被*挤*到了左边的墙上。
- 这景象真是可怕。
+ 死于一场可怕的车祸,每滴血都被*挤*到了左边的墙上。
+ 这景象真是有点可怕。
"Pinballs"
“弹球”
diff --git a/Readme b/Readme
index f4e5b30..4008694 100644
--- a/Readme
+++ b/Readme
@@ -135,6 +135,10 @@ To Dear Windows Users
This game is developed and tested mostly under Linux. The official Windows version is also
built under Linux(awesome, isn't it?). It's only briefly tested.
+How to play it?
+This section has been moved to the built-in help. Select "help" in the main menu to view
+it.
+
Menus
------------------------------------------------------------------------------------
Main menu
@@ -165,7 +169,7 @@ Go for the highest score!
Free Play Mode
You'll never die! Enjoy!...
-
+Command line options
------------------------------------------------------------------------------------
Yes, it accept command line options! (And some of them may be very useful...)
You can override your settings with them if you can't start it after changing the settings.
diff --git a/Readme.zh b/Readme.zh
index ea6d59a..5621e9f 100644
--- a/Readme.zh
+++ b/Readme.zh
@@ -132,6 +132,10 @@ GPU&VRAM: 非常快的渲染速度。
开发和测试基本是在Linux下进行的。发布的Windows版也是从Linux下编译的(听起来很厉害?)。Windows版
只进行过简单的测试。
+怎么玩?
+这部分已经移动到游戏内的帮助里了,它在主菜单的help选项中。
+如果您看不懂,建议使用机器翻译…
+
菜单
------------------------------------------------------------------------------------
主菜单
@@ -216,35 +220,34 @@ ChangeLog包含了该工程的全部历史。
这里是一个「里程碑」的列表。
0.9.1-1_PR (r86)
-Current public release. Comes with all levels that will appear in the final release.
-Done menu rewrite.
-Make multiplier system functional.
+当前的公开版本。已经包含了所有会出现在最终版本里的关卡。
+菜单重写完成。
+“倍数系统”终于能正常工作了。
0.7.3-0_PR (b73)
-Comes with all seven "normal" levels.
-Many bug fixes, making the Windows port (almost) stable.
-Huge code changes happened here.
+包含7个关卡。
+众多问题修复,Windows版基本稳定了。
+代码发生了巨大的变化。
0.4.4-0_PRG (b37a)
-Comes with four levels and some parts of the fifth level.
-Contains several bug fixes.
+包含4个多一点的关卡。
+修正了一部分问题。
0.2.9-1_PR (b21)
-First public prerelease version.
-Comes with two levels.
-Introduced multiplier system, not functional yet.
+第一个公开版,包含两个完整的关卡。
+初次出现了“倍数”系统,但是没有实际作用。
0.1.7-2_PR (b16)
-Level 1 is finished.
+第一关完成。
TB130907 (b10)
-Laser implementation rev 2.
+激光实现重写。
TB130827 (b8)
-Initial laser implementation.
+最早的支持“激光”的版本。
TB130620~TB130818 (b1~b7)
-New towers and new levels.
+添加新的“塔”和关卡。
TB130610 (b0)
-Creation of the Testbed version.
+试验版本建立。
diff --git a/VERSION b/VERSION
index 9870f8e..fcadebd 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.9.7-0 (r97) \ No newline at end of file
+0.9.8-0 (r98) \ No newline at end of file
diff --git a/global.h b/global.h
index e36af5a..a666c22 100644
--- a/global.h
+++ b/global.h
@@ -302,7 +302,7 @@ double scale;
#ifndef WIN32
double yos;
#endif
-int fpslvl,clrmode;
+int fpslvl,clrmode,sfxvol,bgmvol;
const vector2d splitData[4]={vector2d(0,0),vector2d(400,0),vector2d(0,300),vector2d(400,300)};
//options from command line arguments
bool fNoSound,
@@ -341,7 +341,7 @@ static const char* archive[]={
};
#endif
//static const char* GLOBAL_H_FN="global.h";
-static const char* BLRVERSION="0.9.7-0 (r97)";
+static const char* BLRVERSION="0.9.8-0 (r98)";
static const char *months="JanFebMarAprMayJunJulAugSepOctNovDec";
char *parseDate(const char *date)
{
diff --git a/hge/CxImage/ximapng.cpp b/hge/CxImage/ximapng.cpp
index 2e39d1b..db2f636 100644
--- a/hge/CxImage/ximapng.cpp
+++ b/hge/CxImage/ximapng.cpp
@@ -85,7 +85,7 @@ bool CxImagePNG::Decode(CxFile *hFile)
png_read_info(png_ptr, info_ptr);
png_uint_32 _width,_height;
- int _bit_depth,_color_type,_interlace_type/*,_compression_type,_filter_type*/;
+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
#if PNG_LIBPNG_VER > 10399
png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,
&_interlace_type,&_compression_type,&_filter_type);
diff --git a/hge/hge_impl.h b/hge/hge_impl.h
index 26cb850..bf42c2f 100644
--- a/hge/hge_impl.h
+++ b/hge/hge_impl.h
@@ -156,7 +156,7 @@ public:
virtual HEFFECT CALL Effect_Load(const char *filename, DWORD size=0);
virtual void CALL Effect_Free(HEFFECT eff);
virtual HCHANNEL CALL Effect_Play(HEFFECT eff);
- virtual HCHANNEL CALL Effect_PlayEx(HEFFECT eff, int volume=100, int pan=0, float pitch=1.0f, bool loop=false);
+ virtual HCHANNEL CALL Effect_PlayEx(HEFFECT eff, float volume=1.0, float pan=0.0, float pitch=1.0f, bool loop=false);
virtual HMUSIC CALL Music_Load(const char *filename, DWORD size=0);
virtual void CALL Music_Free(HMUSIC mus);
@@ -175,8 +175,8 @@ public:
virtual void CALL Stream_Free(HSTREAM stream);
virtual HCHANNEL CALL Stream_Play(HSTREAM stream, bool loop, int volume = 100);
- virtual void CALL Channel_SetPanning(HCHANNEL chn, int pan);
- virtual void CALL Channel_SetVolume(HCHANNEL chn, int volume);
+ virtual void CALL Channel_SetPanning(HCHANNEL chn, float pan);
+ virtual void CALL Channel_SetVolume(HCHANNEL chn, float volume);
virtual void CALL Channel_SetPitch(HCHANNEL chn, float pitch);
virtual void CALL Channel_Pause(HCHANNEL chn);
virtual void CALL Channel_Resume(HCHANNEL chn);
diff --git a/hge/sound.cpp b/hge/sound.cpp
index 9f6869c..9024652 100644
--- a/hge/sound.cpp
+++ b/hge/sound.cpp
@@ -217,23 +217,23 @@ HEFFECT CALL HGE_Impl::Effect_Load(const char *filename, DWORD size)
HCHANNEL CALL HGE_Impl::Effect_Play(HEFFECT eff)
{
- return Effect_PlayEx(eff, 100, 0, 1.0f, false);
+ return Effect_PlayEx(eff, 1.0f, 0, 1.0f, false);
}
-HCHANNEL CALL HGE_Impl::Effect_PlayEx(HEFFECT eff, int volume, int pan, float pitch, bool loop)
+HCHANNEL CALL HGE_Impl::Effect_PlayEx(HEFFECT eff, float volume, float pan, float pitch, bool loop)
{
if(hOpenAL)
{
const ALuint sid = get_source(); // find an unused sid, or generate a new one.
if (sid != 0)
{
- if (volume < 0) volume = 0; else if (volume > 100) volume = 100;
- if (pan < -100) pan = -100; else if (pan > 100) pan = 100;
+ if (volume < 0) volume = 0; else if (volume > 1.0) volume = 1.0;
+ if (pan < -1.0) pan = -1.0; else if (pan > 1.0) pan = 1.0;
alSourceStop(sid);
alSourcei(sid, AL_BUFFER, (ALint) eff);
- alSourcef(sid, AL_GAIN, ((ALfloat) volume) / 100.0f);
+ alSourcef(sid, AL_GAIN, volume);
alSourcef(sid, AL_PITCH, pitch);
- alSource3f(sid, AL_POSITION, ((ALfloat) pan) / 100.0f, 0.0f, 0.0f);
+ alSource3f(sid, AL_POSITION, pan, 0.0f, 0.0f);
alSourcei(sid, AL_LOOPING, loop ? AL_TRUE : AL_FALSE);
alSourcePlay(sid);
}
@@ -281,22 +281,22 @@ void CALL HGE_Impl::Stream_Free(HSTREAM stream){}
HCHANNEL CALL HGE_Impl::Stream_Play(HSTREAM stream, bool loop, int volume){return 0;}
-void CALL HGE_Impl::Channel_SetPanning(HCHANNEL chn, int pan)
+void CALL HGE_Impl::Channel_SetPanning(HCHANNEL chn, float pan)
{
- assert(pan >= -100);
- assert(pan <= 100);
+ if(pan>1.0)pan=1.0;
+ if(pan<-1.0)pan=-1.0;
if(hOpenAL)
{
- alSource3f((ALuint) chn, AL_POSITION, ((ALfloat) pan) / 100.0f, 0.0f, 0.0f);
+ alSource3f((ALuint) chn, AL_POSITION, pan, 0.0f, 0.0f);
}
}
-void CALL HGE_Impl::Channel_SetVolume(HCHANNEL chn, int volume)
+void CALL HGE_Impl::Channel_SetVolume(HCHANNEL chn, float volume)
{
if(hOpenAL)
{
- if (volume < 0) volume = 0; else if (volume > 100) volume = 100;
- alSourcef((ALuint) chn, AL_GAIN, ((ALfloat) volume) / 100.0f);
+ if (volume < 0) volume = 0; else if (volume > 1.0f) volume = 1.0f;
+ alSourcef((ALuint) chn, AL_GAIN, volume);
}
}
diff --git a/hgewin/hge_impl.h b/hgewin/hge_impl.h
index 5acdcd4..244dafc 100755
--- a/hgewin/hge_impl.h
+++ b/hgewin/hge_impl.h
@@ -123,7 +123,7 @@ public:
virtual HEFFECT CALL Effect_Load(const char *filename, DWORD size=0);
virtual void CALL Effect_Free(HEFFECT eff);
virtual HCHANNEL CALL Effect_Play(HEFFECT eff);
- virtual HCHANNEL CALL Effect_PlayEx(HEFFECT eff, int volume=100, int pan=0, float pitch=1.0f, bool loop=false);
+ virtual HCHANNEL CALL Effect_PlayEx(HEFFECT eff, float volume=1.0, float pan=0.0, float pitch=1.0f, bool loop=false);
virtual HMUSIC CALL Music_Load(const char *filename, DWORD size=0);
virtual void CALL Music_Free(HMUSIC mus);
@@ -142,8 +142,8 @@ public:
virtual void CALL Stream_Free(HSTREAM stream);
virtual HCHANNEL CALL Stream_Play(HSTREAM stream, bool loop, int volume = 100);
- virtual void CALL Channel_SetPanning(HCHANNEL chn, int pan);
- virtual void CALL Channel_SetVolume(HCHANNEL chn, int volume);
+ virtual void CALL Channel_SetPanning(HCHANNEL chn, float pan);
+ virtual void CALL Channel_SetVolume(HCHANNEL chn, float volume);
virtual void CALL Channel_SetPitch(HCHANNEL chn, float pitch);
virtual void CALL Channel_Pause(HCHANNEL chn);
virtual void CALL Channel_Resume(HCHANNEL chn);
diff --git a/hgewin/sound.cpp b/hgewin/sound.cpp
index 2bde29e..9024652 100644
--- a/hgewin/sound.cpp
+++ b/hgewin/sound.cpp
@@ -16,7 +16,6 @@
// Channel functions are fully supported now. However music and streaming are
// still not supported. Some APIs changed for OpenAL is different from BA$$.
-#include <cassert>
#include "hge_impl.h"
#include "AL/al.h"
@@ -218,23 +217,23 @@ HEFFECT CALL HGE_Impl::Effect_Load(const char *filename, DWORD size)
HCHANNEL CALL HGE_Impl::Effect_Play(HEFFECT eff)
{
- return Effect_PlayEx(eff, 100, 0, 1.0f, false);
+ return Effect_PlayEx(eff, 1.0f, 0, 1.0f, false);
}
-HCHANNEL CALL HGE_Impl::Effect_PlayEx(HEFFECT eff, int volume, int pan, float pitch, bool loop)
+HCHANNEL CALL HGE_Impl::Effect_PlayEx(HEFFECT eff, float volume, float pan, float pitch, bool loop)
{
if(hOpenAL)
{
const ALuint sid = get_source(); // find an unused sid, or generate a new one.
if (sid != 0)
{
- if (volume < 0) volume = 0; else if (volume > 100) volume = 100;
- if (pan < -100) pan = -100; else if (pan > 100) pan = 100;
+ if (volume < 0) volume = 0; else if (volume > 1.0) volume = 1.0;
+ if (pan < -1.0) pan = -1.0; else if (pan > 1.0) pan = 1.0;
alSourceStop(sid);
alSourcei(sid, AL_BUFFER, (ALint) eff);
- alSourcef(sid, AL_GAIN, ((ALfloat) volume) / 100.0f);
+ alSourcef(sid, AL_GAIN, volume);
alSourcef(sid, AL_PITCH, pitch);
- alSource3f(sid, AL_POSITION, ((ALfloat) pan) / 100.0f, 0.0f, 0.0f);
+ alSource3f(sid, AL_POSITION, pan, 0.0f, 0.0f);
alSourcei(sid, AL_LOOPING, loop ? AL_TRUE : AL_FALSE);
alSourcePlay(sid);
}
@@ -282,22 +281,22 @@ void CALL HGE_Impl::Stream_Free(HSTREAM stream){}
HCHANNEL CALL HGE_Impl::Stream_Play(HSTREAM stream, bool loop, int volume){return 0;}
-void CALL HGE_Impl::Channel_SetPanning(HCHANNEL chn, int pan)
+void CALL HGE_Impl::Channel_SetPanning(HCHANNEL chn, float pan)
{
- assert(pan >= -100);
- assert(pan <= 100);
+ if(pan>1.0)pan=1.0;
+ if(pan<-1.0)pan=-1.0;
if(hOpenAL)
{
- alSource3f((ALuint) chn, AL_POSITION, ((ALfloat) pan) / 100.0f, 0.0f, 0.0f);
+ alSource3f((ALuint) chn, AL_POSITION, pan, 0.0f, 0.0f);
}
}
-void CALL HGE_Impl::Channel_SetVolume(HCHANNEL chn, int volume)
+void CALL HGE_Impl::Channel_SetVolume(HCHANNEL chn, float volume)
{
if(hOpenAL)
{
- if (volume < 0) volume = 0; else if (volume > 100) volume = 100;
- alSourcef((ALuint) chn, AL_GAIN, ((ALfloat) volume) / 100.0f);
+ if (volume < 0) volume = 0; else if (volume > 1.0f) volume = 1.0f;
+ alSourcef((ALuint) chn, AL_GAIN, volume);
}
}
diff --git a/include/hge.h b/include/hge.h
index ce5badd..18d57b9 100644
--- a/include/hge.h
+++ b/include/hge.h
@@ -366,7 +366,7 @@ public:
virtual HEFFECT CALL Effect_Load(const char *filename, DWORD size=0) = 0;
virtual void CALL Effect_Free(HEFFECT eff) = 0;
virtual HCHANNEL CALL Effect_Play(HEFFECT eff) = 0;
- virtual HCHANNEL CALL Effect_PlayEx(HEFFECT eff, int volume=100, int pan=0, float pitch=1.0f, bool loop=false) = 0;
+ virtual HCHANNEL CALL Effect_PlayEx(HEFFECT eff, float volume=1.0, float pan=0.0, float pitch=1.0f, bool loop=false) = 0;
virtual HMUSIC CALL Music_Load(const char *filename, DWORD size=0) = 0;
virtual void CALL Music_Free(HMUSIC mus) = 0;
@@ -385,8 +385,8 @@ public:
virtual void CALL Stream_Free(HSTREAM stream) = 0;
virtual HCHANNEL CALL Stream_Play(HSTREAM stream, bool loop, int volume = 100) = 0;
- virtual void CALL Channel_SetPanning(HCHANNEL chn, int pan) = 0;
- virtual void CALL Channel_SetVolume(HCHANNEL chn, int volume) = 0;
+ virtual void CALL Channel_SetPanning(HCHANNEL chn, float pan) = 0;
+ virtual void CALL Channel_SetVolume(HCHANNEL chn, float volume) = 0;
virtual void CALL Channel_SetPitch(HCHANNEL chn, float pitch) = 0;
virtual void CALL Channel_Pause(HCHANNEL chn) = 0;
virtual void CALL Channel_Resume(HCHANNEL chn) = 0;
diff --git a/levels.h b/levels.h
index d866989..1dea6c1 100644
--- a/levels.h
+++ b/levels.h
@@ -1418,7 +1418,7 @@ void Level5Part16()
}
void Level5Part17()
{
- frameleft=TenSeconds/10*2;clrtime=0;
+ frameleft=TenSeconds/2;clrtime=0;
DisableAllTower=false;
if (Current_Position==1)
{
@@ -1532,7 +1532,7 @@ void Level5Part22()
}
void Level6Part0()
{
- frameleft=50;All2pnt();towcnt=0;
+ frameleft=TenSeconds;All2pnt();towcnt=0;
DisableAllTower=false;
if (IfShowTip)
{
@@ -1546,11 +1546,14 @@ void Level6Part0()
Level 6-Peaceful(?) Winter\n\
Look, there's a question mark in the title...\
");
- IfCallLevel=false;
}
if (Current_Position==1)
{
- frameleft=0;
+ if (!LOWFPS)
+ DBGColor=ColorTransfer(DBGColor,0xFF60A0FF);
+ else
+ for (int i=1;i<=17;++i)DBGColor=ColorTransfer(DBGColor,0xFF60A0FF);
+ if(DBGColor==0xFF60A0FF)++part;
return;
}
}
@@ -3277,18 +3280,25 @@ void Levelm1Part13()//Gravity Vortex
ShowTip("Who's collecting such great power here?");
return;
}
- All2pnt();memset(m19lead,0,sizeof(m19lead));
- memset(m19gen,0,sizeof(m19gen));
- ++part;m19rad=m19step=m19cnt=0;
- avabrk=0.05;avacurbrk=0;
- for(int i=0;i<8;++i)
+ if (!LOWFPS)
+ DBGColor=ColorTransfer(DBGColor,0xFF000000);
+ else
+ for (int i=1;i<=17;++i)DBGColor=ColorTransfer(DBGColor,0xFF000000);
+ if (DBGColor==0xFF000000)
{
- m19lead[i]=CreateBullet2(400,300,0,0);
- bullet[m19lead[i]].bulletpos=vector2d(400+250*cos(m19rad+i*pi/4),300+250*sin(m19rad+i*pi/4));
- bullet[m19lead[i]].alterColor=(TColors)i;
- bullet[m19lead[i]].inv=true;
+ All2pnt();memset(m19lead,0,sizeof(m19lead));
+ memset(m19gen,0,sizeof(m19gen));
+ ++part;m19rad=m19step=m19cnt=0;
+ avabrk=0.05;avacurbrk=0;
+ for(int i=0;i<8;++i)
+ {
+ m19lead[i]=CreateBullet2(400,300,0,0);
+ bullet[m19lead[i]].bulletpos=vector2d(400+250*cos(m19rad+i*pi/4),300+250*sin(m19rad+i*pi/4));
+ bullet[m19lead[i]].alterColor=(TColors)i;
+ bullet[m19lead[i]].inv=true;
+ }
+ m19pldir=false;BTarg.targpos=playerpos;
}
- m19pldir=false;BTarg.targpos=playerpos;
}
void Levelm1Part20update()
{
@@ -3386,11 +3396,7 @@ void Levelm1Part15()//"Supernova"
...nova!!");
return;
}
- if (!LOWFPS)
- DBGColor=ColorTransfer(DBGColor,0xFF000000);
- else
- for (int i=1;i<=17;++i)DBGColor=ColorTransfer(DBGColor,0xFF000000);
- if (DBGColor==0xFF000000)
+ if (Current_Position==1)
{
snexTarg.Init(0.001,vector2d(400,300));
All2pnt();
diff --git a/main.cpp b/main.cpp
index 7777a47..033b4a8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -86,7 +86,7 @@ basic settings first!\n\nUse vsync?","First Start Up",0x00000024)==6)
else
tfs=0;
diffkey=false;
- plrspd=3;plrslospd=3;clrbns=clrmode=0;
+ plrspd=3;plrslospd=3;clrbns=clrmode=0;bgmvol=15;sfxvol=10;
hge->System_Log("%s: Finishing first start up configuraion...",MAIN_SRC_FN);
Options_Writeback();
Score_Initailize();
@@ -95,7 +95,7 @@ basic settings first!\n\nUse vsync?","First Start Up",0x00000024)==6)
void firststartup()
{
fpslvl=2;tfs=0;VidMode=0;diffkey=false;
- plrspd=3;plrslospd=3;clrbns=clrmode=0;
+ plrspd=3;plrslospd=3;clrbns=clrmode=0;bgmvol=15;sfxvol=10;
hge->System_Log("%s: Finishing (stubbed) first start up configuraion...",MAIN_SRC_FN);
Options_Writeback();
Score_Initailize();
@@ -824,13 +824,13 @@ bool FrameFunc()
{
if(~OMR)
{
- if(OMR==4||OMR==5)optionMenu.Leave();
- if(OMR==4)
+ if(OMR==6||OMR==7)optionMenu.Leave();
+ if(OMR==6)
{
playerPreferenceMenu.Init(-200);
Current_Position=14;
}
- if(OMR==5)
+ if(OMR==7)
{
Options_Writeback();
mainMenu.Init(-200);
@@ -941,7 +941,7 @@ bool FrameFunc()
++part;
IfShowTip=true;
}
- if (Current_Position==1&&shots)hge->Effect_Play(snd);
+ if(Current_Position==1&&shots)hge->Effect_PlayEx(snd,sfxvol/15.0,0,1,false);
if(mainMenu.isActive())mainMenu.Render();
if(startMenu.isActive())startMenu.Render();
if(optionMenu.isActive())optionMenu.Render();
@@ -955,8 +955,8 @@ bool FrameFunc()
if(highScoreViewMenu.isActive())highScoreViewMenu.Render();
if(highScoreDetailsMenu.isActive())highScoreDetailsMenu.Render();
if(Current_Position==15)HelpScene();if(hshl)HelpScene(1);
- 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||Current_Position==3||Current_Position==8||
+ Current_Position==9||Current_Position==10||Current_Position==13||Current_Position==14)
{
titlespr->Render(160,0);
}
@@ -1202,6 +1202,7 @@ int main(int argc,char *argv[])
#endif
tch=getchar();//Key binding
if (tch==1)diffkey=true;
+ bgmvol=getchar();sfxvol=getchar();
plrspd=tch=getchar();
playerfulspd=(tch)*0.08f;
playerspeed=playerfulspd;
@@ -1310,8 +1311,8 @@ int main(int argc,char *argv[])
level=startLvl,part=startPrt;frms=0,averfps=0.0;bsscale=1;DBGColor=0xFF000000;
if(bullet){free(bullet);bullet=NULL;}
towcnt=bulcnt=0;whrcnt=12;skyactive=false;PlayerSplit=false;
- score=0;Mult_Init();Music_Init("./Resources/Music/CanonTechno.ogg");
- lpst=4607901;lped=9215893;Music_Play();
+ score=0;Mult_Init();Music_Init("./Resources/Music/st05.ogg");
+ lpst=346222;lped=5539039;Music_Play();
coll=semicoll=clrusg=0;playerLockX=playerLockY=false;
Lock.Init(2);IfShowTip=true;lsc=0;
clrrad=pi/2;clrrange=0;re.SetSeed(time(NULL));
diff --git a/menus.h b/menus.h
index 70d6998..7ffc955 100644
--- a/menus.h
+++ b/menus.h
@@ -7,7 +7,7 @@ void TriggerSound(int type)
{
switch(type)
{
- case 0:hge->Effect_Play(snd);break;
+ case 0:hge->Effect_PlayEx(snd,sfxvol/15.0,0,1,false);break;
//case 1:hge->Effect_Play(menuin);break;
//case 2:hge->Effect_Play(menuout);break;
}
@@ -54,6 +54,7 @@ void Options_Writeback()
printf("%c",tfs?1:0);
printf("%c",VidMode);
printf("%c",diffkey?1:0);
+ printf("%c%c",bgmvol,sfxvol);
printf("%c%c%c%c",plrspd,plrslospd,clrbns,clrmode);
fclose(stdout);
}
@@ -84,6 +85,8 @@ static const char* OMStr[]={
"VSync",
"Clear Range Key",
"Resolution",
+ "Music Volume",
+ "SFX Volume",
"Player Preference",
"Save and Exit",
"On",
@@ -368,8 +371,8 @@ public:
if(!onSwitch)
{
if(hge->Input_GetKeyStateEx(HGEK_UP)==HGEKST_HIT&&selected>0)--selected,TriggerSound(0);
- if(hge->Input_GetKeyStateEx(HGEK_DOWN)==HGEKST_HIT&&selected<6-1)++selected,TriggerSound(0);
- if(hge->Input_GetKeyStateEx(HGEK_ESCAPE)==HGEKST_HIT)selected=5,TriggerSound(0);
+ if(hge->Input_GetKeyStateEx(HGEK_DOWN)==HGEKST_HIT&&selected<8-1)++selected,TriggerSound(0);
+ if(hge->Input_GetKeyStateEx(HGEK_ESCAPE)==HGEKST_HIT)selected=7,TriggerSound(0);
}
yoffset=-selected*30;
if(fabs(dyoffset-yoffset)<7)dyoffset=yoffset;
@@ -379,11 +382,11 @@ public:
if(hge->Input_GetKeyStateEx(HGEK_RIGHT)==HGEKST_HIT&&hge->Input_GetKeyStateEx(HGEK_LEFT)==HGEKST_HIT)return -1;
if(hge->Input_GetKeyStateEx(HGEK_RIGHT)==HGEKST_HIT||hge->Input_GetKeyStateEx(HGEK_Z)==HGEKST_HIT||hge->Input_GetKeyStateEx(HGEK_ENTER)==HGEKST_HIT)
{
- if(selected==5&&!(hge->Input_GetKeyStateEx(HGEK_Z)==HGEKST_HIT||hge->Input_GetKeyStateEx(HGEK_ENTER)==HGEKST_HIT))
+ if(selected==7&&!(hge->Input_GetKeyStateEx(HGEK_Z)==HGEKST_HIT||hge->Input_GetKeyStateEx(HGEK_ENTER)==HGEKST_HIT))
return -1;
- TriggerSound(selected==5?2:1);
+ TriggerSound(selected==7?2:1);
if(onSwitch||onSwitchi)return -1;
- if(selected<=3)
+ if(selected<=5)
{
onSwitch=true;
swoffset=100;
@@ -401,13 +404,23 @@ public:
++VidMode;
if(VidMode>4)VidMode=0;
}
+ if(selected==4)
+ {
+ ++bgmvol;
+ if(bgmvol>15)bgmvol=0;
+ }
+ if(selected==5)
+ {
+ ++sfxvol;
+ if(sfxvol>15)sfxvol=0;
+ }
return selected;
}
if(hge->Input_GetKeyStateEx(HGEK_LEFT)==HGEKST_HIT)
{
if(onSwitch||onSwitchi)return -1;
TriggerSound(1);
- if(selected<=3){onSwitchi=true;swoffset=0;}
+ if(selected<=5){onSwitchi=true;swoffset=0;}
if(selected==0)tfs=!tfs;
if(selected==1)
{
@@ -421,13 +434,23 @@ public:
--VidMode;
if(VidMode<0)VidMode=4;
}
+ if(selected==4)
+ {
+ --bgmvol;
+ if(bgmvol<0)bgmvol=15;
+ }
+ if(selected==5)
+ {
+ --sfxvol;
+ if(sfxvol<0)sfxvol=15;
+ }
return selected;
}
return -1;
}
void Render()
{
- for(int i=0;i<6;++i)
+ for(int i=0;i<8;++i)
{
double calcy=i*30+dyoffset+360;
if(calcy>249.9&&calcy<500.1)
@@ -437,24 +460,24 @@ public:
if(i==0)
{
if(!(onSwitch||onSwitchi)||selected!=0)
- MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,OMStr[tfs?6:7]);
+ MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,OMStr[tfs?8:9]);
else
{
if(onSwitch)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?7:6]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?9:8]);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?6:7]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?8:9]);
swoffset-=hge->Timer_GetDelta()*400;
if(swoffset<0)swoffset=0,onSwitch=false;
}
if(onSwitchi)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?6:7]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?8:9]);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?7:6]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[tfs?9:8]);
swoffset+=hge->Timer_GetDelta()*400;
if(swoffset>100)swoffset=0,onSwitchi=false;
}
@@ -463,24 +486,24 @@ public:
if(i==1)
{
if(!(onSwitch||onSwitchi)||selected!=1)
- MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?6:7]);
+ MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?8:9]);
else
{
if(onSwitch)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?7:6]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?9:8]);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?6:7]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?8:9]);
swoffset-=hge->Timer_GetDelta()*400;
if(swoffset<0)swoffset=0,onSwitch=false;
}
if(onSwitchi)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?6:7]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?8:9]);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?7:6]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[fpslvl==2?9:8]);
swoffset+=hge->Timer_GetDelta()*400;
if(swoffset>100)swoffset=0,onSwitchi=false;
}
@@ -489,24 +512,24 @@ public:
if(i==2)
{
if(!(onSwitch||onSwitchi)||selected!=2)
- MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,OMStr[diffkey?8:9]);
+ MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,OMStr[diffkey?10:11]);
else
{
if(onSwitch)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?9:8]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?11:10]);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?8:9]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?10:11]);
swoffset-=hge->Timer_GetDelta()*400;
if(swoffset<0)swoffset=0,onSwitch=false;
}
if(onSwitchi)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?8:9]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?10:11]);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?9:8]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,OMStr[diffkey?11:10]);
swoffset+=hge->Timer_GetDelta()*400;
if(swoffset>100)swoffset=0,onSwitchi=false;
}
@@ -515,24 +538,76 @@ public:
if(i==3)
{
if(!(onSwitch||onSwitchi)||selected!=3)
- MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode+10]:OMStr[15]);
+ MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode+12]:OMStr[17]);
+ else
+ {
+ if(onSwitch)
+ {
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode==0?16:VidMode+11]:OMStr[17]);
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode+12]:OMStr[17]);
+ swoffset-=hge->Timer_GetDelta()*400;
+ if(swoffset<0)swoffset=0,onSwitch=false;
+ }
+ if(onSwitchi)
+ {
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode+12]:OMStr[17]);
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode==4?12:VidMode+13]:OMStr[17]);
+ swoffset+=hge->Timer_GetDelta()*400;
+ if(swoffset>100)swoffset=0,onSwitchi=false;
+ }
+ }
+ }
+ if(i==4)
+ {
+ if(!(onSwitch||onSwitchi)||selected!=4)
+ MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,"%d",bgmvol);
+ else
+ {
+ if(onSwitch)
+ {
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,"%d",bgmvol==0?15:bgmvol-1);
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,"%d",bgmvol);
+ swoffset-=hge->Timer_GetDelta()*400;
+ if(swoffset<0)swoffset=0,onSwitch=false;
+ }
+ if(onSwitchi)
+ {
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,"%d",bgmvol);
+ MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,"%d",bgmvol==15?0:bgmvol+1);
+ swoffset+=hge->Timer_GetDelta()*400;
+ if(swoffset>100)swoffset=0,onSwitchi=false;
+ }
+ }
+ }
+ if(i==5)
+ {
+ if(!(onSwitch||onSwitchi)||selected!=5)
+ MenuFont->printf(xoffset+200,calcy,HGETEXT_LEFT,"%d",sfxvol);
else
{
if(onSwitch)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode==0?14:VidMode+9]:OMStr[15]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,"%d",sfxvol==0?15:sfxvol-1);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode+10]:OMStr[15]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,"%d",sfxvol);
swoffset-=hge->Timer_GetDelta()*400;
if(swoffset<0)swoffset=0,onSwitch=false;
}
if(onSwitchi)
{
MenuFont->SetColor(SETA(0xFFFFFF,255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode+10]:OMStr[15]);
+ MenuFont->printf(xoffset+100+swoffset,calcy,HGETEXT_LEFT,"%d",sfxvol);
MenuFont->SetColor(SETA(0xFFFFFF,255.0f-255.0f*(swoffset/100.0f)));
- MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,VidMode>=0&&VidMode<=4?OMStr[VidMode==4?10:VidMode+11]:OMStr[15]);
+ MenuFont->printf(xoffset+200+swoffset,calcy,HGETEXT_LEFT,"%d",sfxvol==15?0:sfxvol+1);
swoffset+=hge->Timer_GetDelta()*400;
if(swoffset>100)swoffset=0,onSwitchi=false;
}
diff --git a/music.h b/music.h
index 0e9c4bf..ef09c41 100644
--- a/music.h
+++ b/music.h
@@ -12,7 +12,7 @@ void Music_Init(const char* file)
}
void Music_Play()
{
- Muc=hge->Effect_PlayEx(Mus,100,0,1.0,true);
+ Muc=hge->Effect_PlayEx(Mus,bgmvol/15.0,0,1.0,true);
}
void Music_Update()
{
diff --git a/scoresystem.h b/scoresystem.h
index 31bd62b..ff7e4b7 100644
--- a/scoresystem.h
+++ b/scoresystem.h
@@ -42,13 +42,20 @@ public:
void Process()
{
if(GetDist(playerpos,position)<=64)followplyr=true;
+ if(!clrmode)
+ {
+ if(clrrange!=0&&GetDist(playerpos,position)<=clrmaxrange)followplyr=true;
+ }
+ else
+ {
+ if(clrrad-pi/2>1e-7&&GetDist(playerpos,position)<=clrmaxrange)followplyr=true;
+ }
if(followplyr)
{
direction=ToUnitCircle(playerpos-position);
- speed=0.3;
- }
+ speed=0.4;
+ }else Lifetime+=hge->Timer_GetDelta();
if(GetDist(playerpos,position)<=9)++mult,NewMT(),Active=false;
- Lifetime+=hge->Timer_GetDelta();
if(Lifetime>LifeLim)return (void)(Active=false);
if(Lifetime>LifeLim*0.8)
{
@@ -59,8 +66,11 @@ public:
}
else
Mult->RenderEx(position.x,position.y,0,0.8);
- if (position.x>780||position.x<20)direction.x=-direction.x;
- if (position.y>780||position.y<20)direction.y=-direction.y;
+ if(!followplyr)
+ {
+ if (position.x>780||position.x<20)direction.x=-direction.x;
+ if (position.y>780||position.y<20)direction.y=-direction.y;
+ }
int times=1;if (LOWFPS)times=17;
for (int i=1;i<=times;++i)
position.x+=direction.x*speed,position.y+=direction.y*speed;
@@ -71,7 +81,7 @@ void NewMultpo(vector2d pos=vector2d(-99,-99))
{
int i=0;while (Multpo[i].IsActive())++i;
if (pos.x+99<=1e-6&&pos.y+99<=1e-6)
- pos.x=rand()%750+20,pos.y=rand()%550+20;
+ pos.x=re.NextInt(20,770),pos.y=re.NextInt(20,570);
vector2d dir=ToUnitCircle(vector2d(rand()%1000-500,rand()%1000-500));
Multpo[i].Init(7.5,0.02,pos,dir);
}