mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-28 06:30:18 +00:00
tfv: differentiate the limit breaks
This commit is contained in:
parent
6455ea8b39
commit
2447ac6a22
@ -43,7 +43,7 @@ Forest? Grassland? Artic? Ocean?
|
|||||||
MAGIC LIMIT
|
MAGIC LIMIT
|
||||||
SUMMON RUN
|
SUMMON RUN
|
||||||
|
|
||||||
SUMMONS -> METROCAT
|
SUMMONS -> METROCAT VORTEXCN
|
||||||
MAGIC -> HEAL FIRE
|
MAGIC -> HEAL FIRE
|
||||||
ICE MALAISE
|
ICE MALAISE
|
||||||
BOLT
|
BOLT
|
||||||
@ -194,19 +194,18 @@ static int gr_put_num(int xx,int yy,int number) {
|
|||||||
digit=number/100;
|
digit=number/100;
|
||||||
if ((digit) && (digit<10)) {
|
if ((digit) && (digit<10)) {
|
||||||
grsim_put_sprite(numbers[digit],xt,yy);
|
grsim_put_sprite(numbers[digit],xt,yy);
|
||||||
|
xt+=4;
|
||||||
}
|
}
|
||||||
hundreds=digit;
|
hundreds=digit;
|
||||||
left=number%100;
|
left=number%100;
|
||||||
xt+=4;
|
|
||||||
|
|
||||||
digit=left/10;
|
digit=left/10;
|
||||||
if ((digit) || (hundreds)) {
|
if ((digit) || (hundreds)) {
|
||||||
grsim_put_sprite(numbers[digit],xt,yy);
|
grsim_put_sprite(numbers[digit],xt,yy);
|
||||||
|
xt+=4;
|
||||||
}
|
}
|
||||||
left=number%10;
|
left=number%10;
|
||||||
|
|
||||||
xt+=4;
|
|
||||||
|
|
||||||
digit=left;
|
digit=left;
|
||||||
grsim_put_sprite(numbers[digit],xt,yy);
|
grsim_put_sprite(numbers[digit],xt,yy);
|
||||||
|
|
||||||
@ -218,7 +217,7 @@ static int gr_put_num(int xx,int yy,int number) {
|
|||||||
MAGIC LIMIT
|
MAGIC LIMIT
|
||||||
SUMMON ESCAPE
|
SUMMON ESCAPE
|
||||||
|
|
||||||
SUMMONS -> METROCAT
|
SUMMONS -> METROCAT VORTEXCN
|
||||||
MAGIC -> HEAL FIRE
|
MAGIC -> HEAL FIRE
|
||||||
ICE MALAISE
|
ICE MALAISE
|
||||||
BOLT
|
BOLT
|
||||||
@ -383,6 +382,12 @@ static int draw_battle_bottom(int enemy_type) {
|
|||||||
move_cursor();
|
move_cursor();
|
||||||
if (menu_position==0) print_inverse("METROCAT");
|
if (menu_position==0) print_inverse("METROCAT");
|
||||||
else print("METROCAT");
|
else print("METROCAT");
|
||||||
|
|
||||||
|
vtab(22);
|
||||||
|
htab(32);
|
||||||
|
move_cursor();
|
||||||
|
if (menu_position==1) print_inverse("VORTEXCN");
|
||||||
|
else print("VORTEXCN");
|
||||||
}
|
}
|
||||||
if (menu_state==MENU_MAGIC) {
|
if (menu_state==MENU_MAGIC) {
|
||||||
vtab(21);
|
vtab(21);
|
||||||
@ -790,6 +795,8 @@ static void magic_attack(int which) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Limit Break "Drop" */
|
||||||
|
/* Jump into sky, drop down and slice enemy in half */
|
||||||
|
|
||||||
static void limit_break_drop(void) {
|
static void limit_break_drop(void) {
|
||||||
|
|
||||||
@ -884,21 +891,25 @@ static void limit_break_drop(void) {
|
|||||||
for(i=0;i<20;i++) {
|
for(i=0;i<20;i++) {
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
}
|
}
|
||||||
limit=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Limit Break "Slice" */
|
||||||
|
/* Run up and slap a bunch with sword */
|
||||||
|
/* TODO: cause damage value to bounce around more? */
|
||||||
|
|
||||||
static void limit_break_slice(void) {
|
static void limit_break_slice(void) {
|
||||||
|
|
||||||
int ax=34,ay=20;
|
int tx=34,ty=20;
|
||||||
int damage=100;
|
int damage=5;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
while(ay>0) {
|
while(tx>10) {
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
gr_copy_to_current(0xc00);
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
grsim_put_sprite(tfv_stand_left,tx,ty);
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
grsim_put_sprite(tfv_led_sword,tx-5,ty);
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
||||||
|
|
||||||
@ -906,95 +917,76 @@ static void limit_break_slice(void) {
|
|||||||
|
|
||||||
page_flip();
|
page_flip();
|
||||||
|
|
||||||
ay-=1;
|
tx-=1;
|
||||||
|
|
||||||
usleep(20000);
|
usleep(20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
ax=10;
|
/* Slicing */
|
||||||
ay=0;
|
for(i=0;i<20;i++) {
|
||||||
|
|
||||||
/* Falling */
|
|
||||||
|
|
||||||
while(ay<=20) {
|
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
gr_copy_to_current(0xc00);
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
if (i&1) {
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
grsim_put_sprite(tfv_stand_left,tx,20);
|
||||||
|
grsim_put_sprite(tfv_led_sword,tx-5,20);
|
||||||
draw_battle_bottom(enemy_type);
|
|
||||||
|
|
||||||
color_equals(13);
|
|
||||||
vlin(0,ay,ax-5);
|
|
||||||
|
|
||||||
page_flip();
|
|
||||||
|
|
||||||
ay+=1;
|
|
||||||
|
|
||||||
usleep(100000);
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
i=0;
|
grsim_put_sprite(tfv_victory,tx,20);
|
||||||
while(i<13) {
|
grsim_put_sprite(tfv_led_sword,tx-2,14);
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
|
||||||
|
|
||||||
draw_battle_bottom(enemy_type);
|
|
||||||
|
|
||||||
color_equals(COLOR_LIGHTGREEN);
|
|
||||||
vlin(ay,ay+i,ax-5);
|
|
||||||
|
|
||||||
page_flip();
|
|
||||||
i++;
|
|
||||||
|
|
||||||
usleep(100000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ax=34;
|
|
||||||
ay=20;
|
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
|
||||||
|
|
||||||
draw_battle_bottom(enemy_type);
|
|
||||||
|
|
||||||
color_equals(COLOR_LIGHTGREEN);
|
|
||||||
vlin(20,33,5);
|
|
||||||
|
|
||||||
damage_enemy(damage);
|
damage_enemy(damage);
|
||||||
gr_put_num(2,10,damage);
|
gr_put_num(2+(i%2),10+((i%2)*2),damage);
|
||||||
|
|
||||||
|
draw_battle_bottom(enemy_type);
|
||||||
|
|
||||||
|
page_flip();
|
||||||
|
|
||||||
|
usleep(100000);
|
||||||
|
}
|
||||||
|
|
||||||
|
tx=34;
|
||||||
|
ty=20;
|
||||||
|
|
||||||
|
gr_copy_to_current(0xc00);
|
||||||
|
|
||||||
|
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
||||||
|
|
||||||
|
grsim_put_sprite(tfv_stand_left,tx,ty);
|
||||||
|
grsim_put_sprite(tfv_led_sword,tx-5,ty);
|
||||||
|
|
||||||
|
draw_battle_bottom(enemy_type);
|
||||||
|
|
||||||
page_flip();
|
page_flip();
|
||||||
|
|
||||||
for(i=0;i<20;i++) {
|
for(i=0;i<20;i++) {
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
}
|
}
|
||||||
limit=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Limit Break "Zap" */
|
||||||
|
/* Zap with a laser out of the LED sword */
|
||||||
|
|
||||||
static void limit_break_zap(void) {
|
static void limit_break_zap(void) {
|
||||||
|
|
||||||
int ax=34,ay=20;
|
int tx=34,ty=20;
|
||||||
int damage=100;
|
int damage=100;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
while(ay>0) {
|
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
gr_copy_to_current(0xc00);
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
/* Draw background */
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
color_equals(COLOR_AQUA);
|
||||||
|
vlin(12,24,34);
|
||||||
|
hlin_double(ram[DRAW_PAGE],28,38,18);
|
||||||
|
|
||||||
|
/* Sword in air */
|
||||||
|
grsim_put_sprite(tfv_victory,tx,20);
|
||||||
|
grsim_put_sprite(tfv_led_sword,tx-2,14);
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
||||||
|
|
||||||
@ -1002,73 +994,41 @@ static void limit_break_zap(void) {
|
|||||||
|
|
||||||
page_flip();
|
page_flip();
|
||||||
|
|
||||||
ay-=1;
|
usleep(500000);
|
||||||
|
|
||||||
usleep(20000);
|
for(i=0;i<20;i++) {
|
||||||
}
|
|
||||||
|
|
||||||
ax=10;
|
|
||||||
ay=0;
|
|
||||||
|
|
||||||
/* Falling */
|
|
||||||
|
|
||||||
while(ay<=20) {
|
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
gr_copy_to_current(0xc00);
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
if (i%2==0) {
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
color_equals(COLOR_YELLOW);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
color_equals(COLOR_RED);
|
||||||
|
}
|
||||||
|
hlin_double(ram[DRAW_PAGE],5,30,22);
|
||||||
|
|
||||||
|
grsim_put_sprite(tfv_stand_left,tx,ty);
|
||||||
|
grsim_put_sprite(tfv_led_sword,tx-5,ty);
|
||||||
|
|
||||||
draw_battle_bottom(enemy_type);
|
draw_battle_bottom(enemy_type);
|
||||||
|
|
||||||
color_equals(13);
|
|
||||||
vlin(0,ay,ax-5);
|
|
||||||
|
|
||||||
page_flip();
|
page_flip();
|
||||||
|
|
||||||
ay+=1;
|
usleep(200000);
|
||||||
|
|
||||||
usleep(100000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i=0;
|
|
||||||
while(i<13) {
|
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
gr_copy_to_current(0xc00);
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
grsim_put_sprite(tfv_stand_left,tx,ty);
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
grsim_put_sprite(tfv_led_sword,tx-5,ty);
|
||||||
|
|
||||||
draw_battle_bottom(enemy_type);
|
draw_battle_bottom(enemy_type);
|
||||||
|
|
||||||
color_equals(COLOR_LIGHTGREEN);
|
|
||||||
vlin(ay,ay+i,ax-5);
|
|
||||||
|
|
||||||
page_flip();
|
|
||||||
i++;
|
|
||||||
|
|
||||||
usleep(100000);
|
|
||||||
}
|
|
||||||
|
|
||||||
ax=34;
|
|
||||||
ay=20;
|
|
||||||
|
|
||||||
gr_copy_to_current(0xc00);
|
|
||||||
|
|
||||||
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
|
|
||||||
|
|
||||||
grsim_put_sprite(tfv_stand_left,ax,ay);
|
|
||||||
grsim_put_sprite(tfv_led_sword,ax-5,ay);
|
|
||||||
|
|
||||||
draw_battle_bottom(enemy_type);
|
|
||||||
|
|
||||||
color_equals(COLOR_LIGHTGREEN);
|
|
||||||
vlin(20,33,5);
|
|
||||||
|
|
||||||
damage_enemy(damage);
|
damage_enemy(damage);
|
||||||
gr_put_num(2,10,damage);
|
gr_put_num(2,10,damage);
|
||||||
page_flip();
|
page_flip();
|
||||||
@ -1076,21 +1036,24 @@ static void limit_break_zap(void) {
|
|||||||
for(i=0;i<20;i++) {
|
for(i=0;i<20;i++) {
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
}
|
}
|
||||||
limit=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MENU_LIMIT_DROP 0
|
#define MENU_LIMIT_SLICE 0
|
||||||
#define MENU_LIMIT_SLICE 1
|
#define MENU_LIMIT_ZAP 1
|
||||||
#define MENU_LIMIT_ZAP 2
|
#define MENU_LIMIT_DROP 2
|
||||||
|
|
||||||
|
|
||||||
static void limit_break(int which) {
|
static void limit_break(int which) {
|
||||||
|
|
||||||
|
|
||||||
if (which==MENU_LIMIT_DROP) limit_break_drop();
|
if (which==MENU_LIMIT_DROP) limit_break_drop();
|
||||||
else if (which==MENU_LIMIT_SLICE) limit_break_slice();
|
else if (which==MENU_LIMIT_SLICE) limit_break_slice();
|
||||||
else if (which==MENU_LIMIT_ZAP) limit_break_zap();
|
else if (which==MENU_LIMIT_ZAP) limit_break_zap();
|
||||||
|
|
||||||
|
/* reset limit counter */
|
||||||
|
limit=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void summon(int which) {
|
static void summon(int which) {
|
||||||
|
@ -427,6 +427,15 @@ unsigned char jen_liz[]={
|
|||||||
|
|
||||||
|
|
||||||
/* Numbers */
|
/* Numbers */
|
||||||
|
|
||||||
|
/*
|
||||||
|
****** ** **** **** ** ** ****** **** ****** ****** ******
|
||||||
|
** ** **** ** ** ** ** ** ** ** ** ** ** **
|
||||||
|
** ** ** **** **** ****** **** ****** ** ****** ******
|
||||||
|
** ** ** ** ** ** ** ** ** ** ** ** **
|
||||||
|
****** ****** ****** **** ** **** ****** ** ****** **
|
||||||
|
*/
|
||||||
|
|
||||||
unsigned char numbers[10][11]={
|
unsigned char numbers[10][11]={
|
||||||
|
|
||||||
[0]={
|
[0]={
|
||||||
@ -461,9 +470,9 @@ unsigned char numbers[10][11]={
|
|||||||
},
|
},
|
||||||
[5]={
|
[5]={
|
||||||
0x3,0x3,
|
0x3,0x3,
|
||||||
0x55,0x55,0x55,
|
0x55,0x05,0x05,
|
||||||
0x55,0x55,0x55,
|
0x05,0x05,0x00,
|
||||||
0x55,0x55,0x55,
|
0x50,0x50,0x05,
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
0x3,0x3,
|
0x3,0x3,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user