aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-13 23:18:51 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-13 23:18:51 +0800
commit543e4f570be9b279ba558ca61cc02cda251af384 (patch)
tree47d27a17e8d23fef389c7d318b04d155f0804ca1
parent9b5621bda033c2e6b7c622c7494c56a172543554 (diff)
downloadbullet-lab-remix-543e4f570be9b279ba558ca61cc02cda251af384.tar.xz
Make BLR 16:9.
Port Junko's final spell card to BLR... make it the default testing level.
-rw-r--r--src/blr3.dtpbin459997 -> 460367 bytes
-rw-r--r--src/core/gamescene.cpp20
-rw-r--r--src/master/intro.cpp13
-rw-r--r--src/ui/mainmenu.cpp8
-rw-r--r--tools/lsrc/junko.lsr287
-rw-r--r--tools/lsrc/test.lsr18
6 files changed, 323 insertions, 23 deletions
diff --git a/src/blr3.dtp b/src/blr3.dtp
index 58a5de6..05a4f8d 100644
--- a/src/blr3.dtp
+++ b/src/blr3.dtp
Binary files differ
diff --git a/src/core/gamescene.cpp b/src/core/gamescene.cpp
index 99f61c3..535a3df 100644
--- a/src/core/gamescene.cpp
+++ b/src/core/gamescene.cpp
@@ -11,10 +11,10 @@ gameScene::gameScene()
rtarget=sm->smTargetCreate(800,600);
tgquad.tex=sm->smTargetTexture(rtarget);
tgquad.blend=BLEND_ALPHABLEND;
- tgquad.v[0].x=190;tgquad.v[0].y=75;
- tgquad.v[1].x=950;tgquad.v[1].y=75;
- tgquad.v[2].x=950;tgquad.v[2].y=645;
- tgquad.v[3].x=190;tgquad.v[3].y=645;
+ tgquad.v[0].x=420;tgquad.v[0].y=60;
+ tgquad.v[1].x=1220;tgquad.v[1].y=60;
+ tgquad.v[2].x=1220;tgquad.v[2].y=660;
+ tgquad.v[3].x=420;tgquad.v[3].y=660;
for(int i=0;i<4;++i)tgquad.v[i].z=0.5,tgquad.v[i].col=0xFFFFFFFF;
int rw=sm->smTextureGetWidth(tgquad.tex);
int rh=sm->smTextureGetHeight(tgquad.tex);
@@ -26,7 +26,7 @@ gameScene::gameScene()
player=new playerBase;
vm=new blrScriptVM;
utime=0;
- ttfont.loadTTFFromMemory(blrdtp.getFilePtr("FreeMono.ttf"),blrdtp.getFileSize("FreeMono.ttf"),12);
+ ttfont.loadTTFFromMemory(blrdtp.getFilePtr("FreeMono.ttf"),blrdtp.getFileSize("FreeMono.ttf"),18);
bmInstance->init();
vm->vmInit(61616);
vm->loadLSBFromMemory(blrdtp.getFilePtr("test.lsb"),blrdtp.getFileSize("test.lsb"));
@@ -61,15 +61,15 @@ bool gameScene::sceneRender()
extern sceneManager *sceneMgr;float lps=sceneMgr->getLPS();
if(udly>1){udly=0;utime=sceneMgr->getTHUpdateTime();}
ttfont.updateString(L"Coll: %d\n",player->coll);
- ttfont.render(0,50,0xFFFFFFFF,ALIGN_LEFT);
+ ttfont.render(0,60,0xFFFFFFFF,ALIGN_LEFT);
ttfont.updateString(L"SColl: %d\n",player->scoll);
- ttfont.render(0,65,0xFFFFFFFF,ALIGN_LEFT);
+ ttfont.render(0,80,0xFFFFFFFF,ALIGN_LEFT);
ttfont.updateString(L"LPS: %.2f",lps);
- ttfont.render(0,680,0xFFFFFFFF,ALIGN_LEFT);
+ ttfont.render(0,660,0xFFFFFFFF,ALIGN_LEFT);
ttfont.updateString(L"Update Time: %dns",utime);
- ttfont.render(0,695,0xFFFFFFFF,ALIGN_LEFT);
+ ttfont.render(0,680,0xFFFFFFFF,ALIGN_LEFT);
ttfont.updateString(L"FPS: %.2f",sm->smGetFPS());
- ttfont.render(0,710,0xFFFFFFFF,ALIGN_LEFT);
+ ttfont.render(0,700,0xFFFFFFFF,ALIGN_LEFT);
return false;
}
bool gameScene::threadUpdate()
diff --git a/src/master/intro.cpp b/src/master/intro.cpp
index 1e45ddb..820a3f8 100644
--- a/src/master/intro.cpp
+++ b/src/master/intro.cpp
@@ -4,7 +4,7 @@
#include <cstdlib>
#include <ctime>
#include "../ui/menus.hpp"
-#define XOFFSET 75
+#define XOFFSET 250
#define YOFFSET 100
extern sceneManager *sceneMgr;
@@ -170,9 +170,15 @@ bool introScene::sceneUpdate()
bool introScene::sceneRender()
{
if(ch!=11)
- sm->smClrscr(0xFF000000);
+ {
+ sm->smClrscr(0xFF000000);
+ blt->setColor(0xC0FFFFFF);
+ }
else
- {int c=step*4>255?255:step*4;sm->smClrscr(ARGB(255,c,c,c));}
+ {
+ int c=step*4>255?255:step*4;sm->smClrscr(ARGB(255,c,c,c));
+ blt->setColor(SETA(0x00FFFFFF,DWORD((1.-c/255.)*192)));
+ }
for(int i=0;i<bcnt;++i)
blt->render(pos[i].x,pos[i].y,0,scale[i],scale[i]);
return false;
@@ -186,7 +192,6 @@ introScene::introScene()
smTexInfo *ti=ssanm.getTextureInfo(bsnames[rand()%8]);
blt=new smEntity2D(ti->tex,ti->rect);
blt->setCentre(12,12);
- blt->setColor(0xC0FFFFFF);
sceneMgr->registerScene(this,"Intro",1000);
}
void introScene::introInit()
diff --git a/src/ui/mainmenu.cpp b/src/ui/mainmenu.cpp
index 7bb62b8..a83630c 100644
--- a/src/ui/mainmenu.cpp
+++ b/src/ui/mainmenu.cpp
@@ -28,9 +28,9 @@ mainMenuScene::mainMenuScene()
sm=smGetInterface(SMELT_APILEVEL);
menubg.loadAnmFromMemory(blrdtp.getFilePtr("menu.anm"),blrdtp.getFileSize("menu.anm"));
menubEnt=new smEntity2D(menubg.getTextureInfo("menubg")->tex,menubg.getTextureInfo("menubg")->rect);
- whitexf=new smEntity2D(0,0,0,960,720);whitea=0xFF;whitexf->setZ(1);
+ whitexf=new smEntity2D(0,0,0,1280,720);whitea=0xFF;whitexf->setZ(1);
sceneMgr->registerScene(this,"MainMenu",990);
- menu=new menuLCD(43,20,7,360,370,&lcdfont);
+ menu=new menuLCD(43,20,7,520,370,&lcdfont);
menu->addCtrl(new menuCtrlLCD(0,20,&lcdfont));
menu->getCtrl(0)->setText(NULL,"START");
menu->getCtrl(0)->onKeyPressed(startPressed);
@@ -58,10 +58,10 @@ mainMenuScene::~mainMenuScene()
bool mainMenuScene::sceneUpdate(){return menu->update();}
bool mainMenuScene::sceneRender()
{
- sm->smClrscr(0xFF000000);
+ sm->smClrscr(0xFF102848);
if(whitea>6)whitea-=6;else whitea=0;
whitexf->setColor(SETA(0x00FFFFFF,whitea));
- menubEnt->render(0,0);
+ menubEnt->render(160,0);
menu->render();
whitexf->render(0,0);
return false;
diff --git a/tools/lsrc/junko.lsr b/tools/lsrc/junko.lsr
new file mode 100644
index 0000000..df0f3ce
--- /dev/null
+++ b/tools/lsrc/junko.lsr
@@ -0,0 +1,287 @@
+.init ;junko's final spell card...
+mov i00 0 ;i00: stage counter
+mov i01 0 ;st1 circle counter, st1: red*28, 16, fair
+mov i02 0 ;st2 circle counter, st2: purple*10, 32, fair
+mov i03 0 ;st3 circle counter, st3: blue*60, 64, faster, random
+mov i04 0 ;st4 circle counter, st4: cyan*25, 8, fastest, fixed
+,
+
+.update
+add i00 1 ;++i00
+mov i05 i00 ;if(i00<=2560)
+sub i05 2560
+elz i05
+jnz i05 40 ;do not enter st4========================
+add i04 1 ;++i04
+mov i05 i04 ;if(i04<8)
+sub i05 8
+ltz i05
+jnz i05 40 ;do not shoot st4 bullets================
+mov i04 0
+mov i06 0 ;for(i06=0;i06<25;++i06)
+mov i07 i06
+sub i07 25
+ltz i07
+jez i07 40 ;========================================
+mov r00 i06
+mul r00 0.251327412
+add r00 1.570796327
+push r00
+push 4.0
+push 200.0
+push 400.0
+call createBullet
+push 1
+push 3
+push irt
+call setBulletPropi
+add i06 1
+jmp 22 ;========================================
+nop ;end of loop
+mov i05 i00 ;if(i00<=1536)
+sub i05 1536
+elz i05
+jnz i05 138 ;do not enter st3========================
+add i03 1 ;++i03
+mov i05 i03 ;if(i03<64)
+sub i05 64
+ltz i05
+jnz i05 138 ;do not shoot st3 bullets================
+mov i03 0
+push 250.0 ;get random source1
+push 150.0
+call randr
+mov r01 rrt
+push 250.0
+push 150.0
+call randr
+mov r02 rrt
+push 6.28
+push 0.0
+call randr
+mov r03 rrt
+mov i06 0 ;for(i06=0;i06<60;++i06)
+mov i07 i06
+sub i07 60
+ltz i07
+jez i07 94 ;========================================
+mov r00 i06
+mul r00 0.104719755
+sub r00 r03
+mov r04 r02 ;r02-=30*sin(r00)
+push r00
+call sin
+mov r06 rrt
+mul r06 30
+sub r04 r06
+mov r05 r01 ;r01-=30*cos(r00)
+push r00
+call cos
+mov r06 rrt
+mul r06 30
+sub r05 r06
+push r00
+push 2.5
+push r04
+push r05
+call createBullet
+push 6
+push 3
+push irt
+call setBulletPropi
+add i06 1
+jmp 64 ;========================================
+nop ;end of loop1
+push 650.0 ;get random source2
+push 550.0
+call randr
+mov r01 rrt
+push 250.0
+push 150.0
+call randr
+mov r02 rrt
+push 6.28
+push 0.0
+call randr
+mov r03 rrt
+mov i06 0 ;for(i06=0;i06<60;++i06)
+mov i07 i06
+sub i07 60
+ltz i07
+jez i07 138 ;========================================
+mov r00 i06
+mul r00 0.104719755
+sub r00 r03
+mov r04 r02 ;r02-=30*sin(r00)
+push r00
+call sin
+mov r06 rrt
+mul r06 30
+sub r04 r06
+mov r05 r01 ;r01-=30*cos(r00)
+push r00
+call cos
+mov r06 rrt
+mul r06 30
+sub r05 r06
+push r00
+push 2.5
+push r04
+push r05
+call createBullet
+push 6
+push 3
+push irt
+call setBulletPropi
+add i06 1
+jmp 108 ;========================================
+nop ;end of loop2
+mov i05 i00 ;if(i00<=512)
+sub i05 512
+elz i05
+jnz i05 236 ;do not enter st2========================
+add i02 1 ;++i02
+mov i05 i02 ;if(i02<32)
+sub i05 32
+ltz i05
+jnz i05 236 ;do not shoot st2 bullets================
+mov i02 0
+push 250.0 ;get random source1
+push 150.0
+call randr
+mov r01 rrt
+push 250.0
+push 150.0
+call randr
+mov r02 rrt
+push 6.28
+push 0.0
+call randr
+mov r03 rrt
+mov i06 0 ;for(i06=0;i06<10;++i06)
+mov i07 i06
+sub i07 10
+ltz i07
+jez i07 192 ;========================================
+mov r00 i06
+mul r00 0.628318531
+sub r00 r03
+mov r04 r02 ;r02-=25*sin(r00)
+push r00
+call sin
+mov r06 rrt
+mul r06 25
+sub r04 r06
+mov r05 r01 ;r01-=25*cos(r00)
+push r00
+call cos
+mov r06 rrt
+mul r06 25
+sub r05 r06
+push r00
+push 2.5
+push r04
+push r05
+call createBullet
+push 3
+push 3
+push irt
+call setBulletPropi
+add i06 1
+jmp 162 ;========================================
+nop ;end of loop1
+push 650.0 ;get random source2
+push 550.0
+call randr
+mov r01 rrt
+push 220.0
+push 180.0
+call randr
+mov r02 rrt
+push 6.28
+push 0.0
+call randr
+mov r03 rrt
+mov i06 0 ;for(i06=0;i06<10;++i06)
+mov i07 i06
+sub i07 10
+ltz i07
+jez i07 236 ;========================================
+mov r00 i06
+mul r00 0.628318531
+sub r00 r03
+mov r04 r02 ;r02-=25*sin(r00)
+push r00
+call sin
+mov r06 rrt
+mul r06 25
+sub r04 r06
+mov r05 r01 ;r01-=25*cos(r00)
+push r00
+call cos
+mov r06 rrt
+mul r06 25
+sub r05 r06
+push r00
+push 2.5
+push r04
+push r05
+call createBullet
+push 3
+push 3
+push irt
+call setBulletPropi
+add i06 1
+jmp 206 ;========================================
+nop ;end of loop2
+add i01 1 ;++i01,stage 1
+mov i05 i01 ;if(i01<16)
+sub i05 16
+ltz i05
+jnz i05 286 ;do not shoot st1 bullets================
+mov i01 0
+push 450.0 ;get random source1
+push 350.0
+call randr
+mov r01 rrt
+push 250.0
+push 150.0
+call randr
+mov r02 rrt
+push 6.28
+push 0.0
+call randr
+mov r03 rrt
+mov i06 0 ;for(i06=0;i06<28;++i06)
+mov i07 i06
+sub i07 28
+ltz i07
+jez i07 286 ;========================================
+mov r00 i06
+mul r00 0.224399475
+sub r00 r03
+mov r04 r02 ;r02-=40*sin(r00)
+push r00
+call sin
+mov r06 rrt
+mul r06 40
+sub r04 r06
+mov r05 r01 ;r01-=40*cos(r00)
+push r00
+call cos
+mov r06 rrt
+mul r06 40
+sub r05 r06
+push r00
+push 2.5
+push r04
+push r05
+call createBullet
+push 4
+push 3
+push irt
+call setBulletPropi
+add i06 1
+jmp 256 ;========================================
+nop ;end of loop
+, \ No newline at end of file
diff --git a/tools/lsrc/test.lsr b/tools/lsrc/test.lsr
index 25ca8fe..6dbcb46 100644
--- a/tools/lsrc/test.lsr
+++ b/tools/lsrc/test.lsr
@@ -1,19 +1,19 @@
.init
-mov r00 0
+mov i00 0
,
.update
add i00 1 ;++i00
-mov i01 i00 ;if(i00<15)
-sub i01 15
+mov i01 i00 ;if(i00<8)
+sub i01 8
ltz i01
-jnz i01 24
+jnz i01 32
mov i00 0 ;reset the timer
push 6.28
push 0.0
call randr ;get the random angle
mov r01 rrt
-push 5.0
+push 4.0
push 1.0
call randr ;get the random speed
push r01
@@ -21,5 +21,13 @@ push rrt
push 300.0
push 400.0
call createBullet ;CreateBullet(400,300,speed,angle)
+mov i01 irt
+push 10
+push 0
+call randi
+push irt
+push 3
+push i01
+call setBulletPropi ;Set random color
nop ;no-op
,