mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-10 08:23:49 +00:00
tfv: make battleground match climate
This commit is contained in:
parent
03a7a03462
commit
00c9c49edc
@ -1283,7 +1283,7 @@ void menu_keypress(int ch) {
|
||||
}
|
||||
|
||||
|
||||
int do_battle(void) {
|
||||
int do_battle(int ground_color) {
|
||||
|
||||
int i,ch;
|
||||
|
||||
@ -1302,9 +1302,6 @@ int do_battle(void) {
|
||||
// random, with weight toward proper terrain
|
||||
// 50% completely random, 50% terrain based?
|
||||
enemy_type=random_8()%0x7;
|
||||
|
||||
|
||||
/* Setup Enemy HP */
|
||||
enemy_hp=enemies[enemy_type].hp_base+
|
||||
(rand()&enemies[enemy_type].hp_mask);
|
||||
|
||||
@ -1325,12 +1322,13 @@ int do_battle(void) {
|
||||
}
|
||||
|
||||
/* Draw ground */
|
||||
/* FIXME: base on map location */
|
||||
color_equals(COLOR_LIGHTGREEN);
|
||||
color_equals(ground_color);
|
||||
for(i=10;i<40;i++) {
|
||||
hlin_double(ram[DRAW_PAGE],0,39,i);
|
||||
}
|
||||
|
||||
/* Draw some background images for variety? */
|
||||
|
||||
ram[DRAW_PAGE]=saved_drawpage;
|
||||
|
||||
draw_battle_bottom(enemy_type);
|
||||
|
@ -25,7 +25,7 @@ void print_help(void);
|
||||
|
||||
int name_screen(void);
|
||||
|
||||
int do_battle(void);
|
||||
int do_battle(int background);
|
||||
|
||||
int world_map(void);
|
||||
|
||||
|
@ -219,7 +219,7 @@ int world_map(void) {
|
||||
|
||||
if (ch=='h') print_help();
|
||||
if (ch=='b') {
|
||||
do_battle();
|
||||
do_battle(map_info[map_location].ground_color);
|
||||
refresh=1;
|
||||
}
|
||||
if (ch=='i') print_info();
|
||||
|
Loading…
Reference in New Issue
Block a user