-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63e162c
commit 5924ec2
Showing
25 changed files
with
552 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// new module header | ||
#define TRASH 3 | ||
#define TRASH 6 | ||
#define GAMEW 224 | ||
#define GAMEH 320 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,63 @@ | ||
// new module script | ||
#define NLETTERS 8 | ||
|
||
Character * ar_letter[NLETTERS]; | ||
|
||
void shouldLetterBeTrashed(Character * cALetter){ | ||
if(cALetter.Room == player.Room && (cALetter.x < 0 || cALetter.x > GAMEW || cALetter.y < 0 || cALetter.y > GAMEH)){ | ||
cALetter.ChangeRoom(TRASH); | ||
} | ||
} | ||
|
||
void game_start(){ | ||
ar_letter[0] = cLetter1; | ||
ar_letter[1] = cLetter2; | ||
ar_letter[2] = cLetter3; | ||
ar_letter[3] = cLetter4; | ||
ar_letter[4] = cLetter5; | ||
ar_letter[5] = cLetter6; | ||
ar_letter[6] = cLetter7; | ||
ar_letter[7] = cLetter8; | ||
} | ||
|
||
void ThrowLetter(int x, int y, CharacterDirection direction){ | ||
if(direction == eDirectionLeft){ | ||
Character * LetterChar; | ||
|
||
int i=0; | ||
while(i<NLETTERS){ | ||
if(ar_letter[i].Room == TRASH){ | ||
if(direction == eDirectionRight){ | ||
ar_letter[i].ChangeRoom(player.Room, x+8, y); | ||
} else { | ||
ar_letter[i].ChangeRoom(player.Room, x-8, y); | ||
} | ||
LetterChar = ar_letter[i]; | ||
break; | ||
} | ||
i++; | ||
} | ||
|
||
LetterChar.Animate(0, 2, eRepeat, eNoBlock, eForwards); | ||
if(direction == eDirectionLeft){ | ||
LetterChar.TweenX(1.2, x-GAMEW, eEaseLinearTween, eNoBlockTween); | ||
LetterChar.TweenY(0.3, y-40, eEaseOutExpoTween, eNoBlockTween); | ||
LetterChar.TweenY(0.7, y+40, eEaseLinearTween, eNoBlockTween, 0.3); | ||
} else { | ||
// must be right | ||
|
||
LetterChar.TweenX(1.2, x+GAMEW, eEaseLinearTween, eNoBlockTween); | ||
LetterChar.TweenY(0.3, y-40, eEaseOutExpoTween, eNoBlockTween); | ||
LetterChar.TweenY(0.7, y+40, eEaseLinearTween, eNoBlockTween, 0.3); | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
void repeatedly_execute_always(){ | ||
if(cLetter1.Room == player.Room && (cLetter1.x < 0 || cLetter1.x > GAMEW || cLetter1.y < 0 || cLetter1.y > GAMEH)){ | ||
cLetter1.ChangeRoom(TRASH); | ||
} | ||
if(cLetter2.Room == player.Room && (cLetter2.x < 0 || cLetter2.x > GAMEW || cLetter2.y < 0 || cLetter2.y > GAMEH)){ | ||
cLetter2.ChangeRoom(TRASH); | ||
} | ||
if(cLetter3.Room == player.Room && (cLetter3.x < 0 || cLetter3.x > GAMEW || cLetter3.y < 0 || cLetter3.y > GAMEH)){ | ||
cLetter3.ChangeRoom(TRASH); | ||
} | ||
if(cLetter4.Room == player.Room && (cLetter4.x < 0 || cLetter4.x > GAMEW || cLetter4.y < 0 || cLetter4.y > GAMEH)){ | ||
cLetter4.ChangeRoom(TRASH); | ||
int i=0; | ||
while(i<NLETTERS){ | ||
shouldLetterBeTrashed(ar_letter[i]); | ||
i++; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
// new module header | ||
import void ThrowLetter(int x, int y, CharacterDirection direction); |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,8 @@ function room_Leave() | |
{ | ||
FakeScreen.Disable(); | ||
} | ||
|
||
function room_Load() | ||
{ | ||
cBonePile.ChangeRoom(1, 21, 285); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
// room script file | ||
function room_LeaveLeft() | ||
{ | ||
doLeaveLeft(); | ||
} | ||
|
||
|
||
function room_LeaveRight() | ||
{ | ||
doLeaveRight(); | ||
} | ||
|
||
|
||
function room_LeaveTop() | ||
{ | ||
|
||
} | ||
|
||
|
||
function room_RepExec() | ||
{ | ||
//dealWithEnemy1(cEnemy1_0); | ||
//dealWithEnemy1(cEnemy1_1); | ||
// dealWithEnemy1(cEnemy1_2); | ||
checkBonePileRepExe(); | ||
|
||
} | ||
|
||
function room_AfterFadeIn() | ||
{ | ||
// init_enemy1(cEnemy1_0); | ||
// init_enemy1(cEnemy1_1); | ||
// init_enemy1(cEnemy1_2); | ||
FakeScreen.Enable(); | ||
} | ||
|
||
function room_Leave() | ||
{ | ||
FakeScreen.Disable(); | ||
} | ||
|
||
function room_Load() | ||
{ | ||
cBonePile.ChangeRoom(3, 21, 285); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// room script file | ||
function room_LeaveLeft() | ||
{ | ||
doLeaveLeft(); | ||
} | ||
|
||
|
||
function room_LeaveRight() | ||
{ | ||
doLeaveRight(); | ||
} | ||
|
||
|
||
function room_LeaveTop() | ||
{ | ||
|
||
} | ||
|
||
|
||
function room_RepExec() | ||
{ | ||
//dealWithEnemy1(cEnemy1_0); | ||
//dealWithEnemy1(cEnemy1_1); | ||
// dealWithEnemy1(cEnemy1_2); | ||
checkBonePileRepExe(); | ||
|
||
} | ||
|
||
function room_AfterFadeIn() | ||
{ | ||
// init_enemy1(cEnemy1_0); | ||
//init_enemy1(cEnemy1_1); | ||
// init_enemy1(cEnemy1_2); | ||
FakeScreen.Enable(); | ||
} | ||
|
||
function room_Leave() | ||
{ | ||
FakeScreen.Disable(); | ||
} | ||
|
||
function room_Load() | ||
{ | ||
cBonePile.ChangeRoom(4, 21, 285); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// room script file | ||
function room_LeaveLeft() | ||
{ | ||
doLeaveLeft(); | ||
} | ||
|
||
|
||
function room_LeaveRight() | ||
{ | ||
doLeaveRight(); | ||
} | ||
|
||
|
||
function room_LeaveTop() | ||
{ | ||
|
||
} | ||
|
||
|
||
function room_RepExec() | ||
{ | ||
//dealWithEnemy1(cEnemy1_0); | ||
//dealWithEnemy1(cEnemy1_1); | ||
// dealWithEnemy1(cEnemy1_2); | ||
checkBonePileRepExe(); | ||
|
||
} | ||
|
||
function room_AfterFadeIn() | ||
{ | ||
//init_enemy1(cEnemy1_0); | ||
//init_enemy1(cEnemy1_1); | ||
//init_enemy1(cEnemy1_2); | ||
FakeScreen.Enable(); | ||
} | ||
|
||
function room_Leave() | ||
{ | ||
FakeScreen.Disable(); | ||
} | ||
|
||
function room_Load() | ||
{ | ||
cBonePile.ChangeRoom(5, 21, 285); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// room script file |
Binary file not shown.