mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-08 15:40:28 -04:00
Merge branch 'main' of https://github.com/ondra-novak/gates_of_skeldal into main
This commit is contained in:
commit
fe7918f488
5 changed files with 58 additions and 16 deletions
|
@ -23,6 +23,7 @@
|
|||
#define AUTOMAP_LAVA RGB555(31,16,0)
|
||||
#define AUTOMAP_FORE RGB555(18,17,14)
|
||||
#define AUTOMAP_FORE_LVP RGB555(14,13,11)
|
||||
#define AUTOMAP_BKG RGB888(164,160,147)
|
||||
#define AUTOMAP_LINE1 RGB555(13,11,10)
|
||||
#define AUTOMAP_LINE2 RGB555(31,22,6)
|
||||
#define AUTOMAP_MOB RGB555(31,8,8)
|
||||
|
@ -422,7 +423,7 @@ static void draw_amap_sector(int x,int y,int sector,int mode,int turn,int line1,
|
|||
case S_DIRA:set_font(H_FSYMB,AUTOMAP_FONT_COLOR);print_symbol(x,y,'N');break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
for(j=0;j<4;j++)
|
||||
{
|
||||
i=(j+turn)&3;
|
||||
|
@ -441,6 +442,7 @@ static void draw_amap_sector(int x,int y,int sector,int mode,int turn,int line1,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -554,7 +556,7 @@ void draw_automap(int xr,int yr)
|
|||
|
||||
x+=320;y+=197;
|
||||
draw_amap_sector(x,y,i,k,0,AUTOMAP_LINE1,AUTOMAP_LINE2);
|
||||
if (map_coord[i].flags & MC_PLAYER && !noarrows)
|
||||
if (k == 1 && (map_coord[i].flags & MC_PLAYER) && !noarrows)
|
||||
{
|
||||
int j,l=-1;
|
||||
|
||||
|
@ -995,7 +997,7 @@ char map_target_select(int id,int xa,int ya,int xr,int yr)
|
|||
|
||||
ya,xa;
|
||||
for (id=1;id<mapsize;id++)
|
||||
if (map_coord[id].flags & (MC_AUTOMAP|MC_DISCLOSED))
|
||||
if ((map_coord[id].flags & (MC_AUTOMAP|MC_DISCLOSED)) && (map_coord[id].flags & (MC_MARKED)) && map_coord[id].layer == cur_depth)
|
||||
{
|
||||
x1=(map_coord[id].x*8-map_xr);
|
||||
y1=(map_coord[id].y*8-map_yr);
|
||||
|
@ -1005,7 +1007,6 @@ char map_target_select(int id,int xa,int ya,int xr,int yr)
|
|||
y2=y1+8;
|
||||
if (xr>=x1 && xr<=x2 && yr>=y1 && yr<=y2)
|
||||
{
|
||||
if (!labyrinth_find_path(viewsector,id,SD_PLAY_IMPS,path_ok,NULL,NULL)) return 0;
|
||||
last_selected=id;
|
||||
exit_wait=1;
|
||||
return 1;
|
||||
|
@ -1015,13 +1016,17 @@ char map_target_select(int id,int xa,int ya,int xr,int yr)
|
|||
}
|
||||
|
||||
|
||||
int select_teleport_target(void)
|
||||
int select_teleport_target(char nolimit)
|
||||
{
|
||||
*otevri_zavoru=1;
|
||||
unwire_proc();
|
||||
disable_all_map();
|
||||
labyrinth_find_path(viewsector,65535,SD_PLAY_IMPS,path_ok,NULL,NULL);
|
||||
map_coord[viewsector].flags|=MC_MARKED;
|
||||
if (nolimit) {
|
||||
enable_all_map();
|
||||
} else {
|
||||
labyrinth_find_path(viewsector,65535,SD_PLAY_IMPS,path_ok,NULL,NULL);
|
||||
map_coord[viewsector].flags|=MC_MARKED;
|
||||
}
|
||||
schovej_mysku();
|
||||
send_message(E_ADD,E_KEYBOARD,map_teleport_keyboard);
|
||||
show_automap(0);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define console_max_lines 16
|
||||
|
||||
void macro_drop_item(int sector,int smer,short item);
|
||||
|
||||
/****/
|
||||
|
||||
|
||||
|
@ -366,6 +365,7 @@ static char display_game_status(void)
|
|||
void unaffect();
|
||||
extern char immortality;
|
||||
extern char nohassle;
|
||||
extern char dead_food;
|
||||
extern char pass_all_mobs;
|
||||
|
||||
|
||||
|
@ -519,9 +519,15 @@ static int process_on_off_command(const char *cmd, char on) {
|
|||
pass_all_mobs = on;
|
||||
return 1;
|
||||
}
|
||||
if (stricmp(cmd, "dead-food") == 0) {
|
||||
dead_food = on;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void postavy_teleport_effect(int sector,int dir,int postava,char effect);
|
||||
|
||||
static int process_actions(const char *command) {
|
||||
if (stricmp(command, "flute") == 0) {
|
||||
bott_draw_fletna();
|
||||
|
@ -552,7 +558,6 @@ static int process_actions(const char *command) {
|
|||
}
|
||||
if (stricmp(command, "echo-location") == 0) {
|
||||
for (int i = 1; i < mapsize; ++i) {
|
||||
if (map_coord[i].flags & MC_NOAUTOMAP) continue;
|
||||
map_coord[i].flags |= MC_AUTOMAP;
|
||||
}
|
||||
play_fx_at(FX_MAP);
|
||||
|
@ -598,6 +603,28 @@ static int process_actions(const char *command) {
|
|||
printf("\n");
|
||||
return 1;
|
||||
}
|
||||
if (stricmp(command, "beam-me-up") == 0) {
|
||||
for (int i = 1; i < mapsize; ++i) {
|
||||
map_coord[i].flags |= MC_AUTOMAP;
|
||||
}
|
||||
play_fx_at(FX_MAP);
|
||||
int kdo = 0;
|
||||
THUMAN *h = postavy;
|
||||
for(int i=0;i<POCET_POSTAV;i++,h++) {
|
||||
if (postavy[i].used && postavy[i].sektor == viewsector) kdo|=1<<i;
|
||||
}
|
||||
int sektor = select_teleport_target(1);
|
||||
if (sektor) {
|
||||
postavy_teleport_effect(sektor, viewdir, kdo, 1);
|
||||
return 1;
|
||||
} else {
|
||||
unwire_proc();
|
||||
wire_proc();
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1643,7 +1643,7 @@ char get_spell_track(int num);
|
|||
void mob_cast(int num,TMOB *m,int mob_num);
|
||||
void thing_cast(int num,int postava,int sector,TMOB *victim,char noanim);//vyvolavaji veci
|
||||
void area_cast(int num,int sector,int owner,char noanim);
|
||||
int select_teleport_target(void);
|
||||
int select_teleport_target(char nolimit);
|
||||
char get_spell_teleport(int num);
|
||||
void spell_throw(int cil,int what); //to je procedura ktera umoznuje potvoram strilet
|
||||
void play_big_mgif_animation(int block);
|
||||
|
|
|
@ -116,6 +116,7 @@ static inline word _impl_get_word(unsigned char **c) {
|
|||
char running_anm=0;
|
||||
|
||||
char hlubina_level=0;
|
||||
char dead_food = 0; //cheat - likvidační kouzlu
|
||||
|
||||
word *anim_render_buffer;
|
||||
|
||||
|
@ -462,9 +463,17 @@ void spell_create(int cil,int what)
|
|||
char dir;
|
||||
short p[2];
|
||||
|
||||
get_sector_dir(cil,§or,&dir);
|
||||
p[0]=what+1; p[1]=0;
|
||||
push_item(sector,dir,p);
|
||||
if (dead_food) {
|
||||
for (int i = 0; i < MAX_MOBS; ++i) {
|
||||
if ((mobs[i].vlajky & (MOB_IN_BATTLE | MOB_LIVE))==(MOB_IN_BATTLE | MOB_LIVE)) {
|
||||
mob_hit(mobs+i, mobs[i].lives);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
get_sector_dir(cil,§or,&dir);
|
||||
p[0]=what+1; p[1]=0;
|
||||
push_item(sector,dir,p);
|
||||
}
|
||||
}
|
||||
|
||||
void spell_create_weapon(int cil,int what)
|
||||
|
|
|
@ -1478,12 +1478,13 @@ static char ask_who_proc(int id,int xa,int ya,int xr,int yr)
|
|||
p=&postavy[i];
|
||||
if (can_select_player(p, death_play, far_play)) {
|
||||
{
|
||||
if (get_spell_teleport(magic_data->data1))
|
||||
if ((magic_data->data2=select_teleport_target())==0)
|
||||
if (get_spell_teleport(magic_data->data1)) {
|
||||
if ((magic_data->data2=select_teleport_target(0))==0)
|
||||
{
|
||||
cancel_power(id,xa,ya,xr,yr);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
magic_data->data1+=(i+1)<<9;
|
||||
magic_data->action=AC_MAGIC;
|
||||
if (battle) souboje_vybrano(AC_MAGIC);
|
||||
|
@ -1525,7 +1526,7 @@ char power(int id,int xa,int ya,int xr,int yr)
|
|||
}
|
||||
magic_data->action=AC_MAGIC;
|
||||
if (get_spell_teleport(magic_data->data1))
|
||||
if ((magic_data->data2=select_teleport_target())==0)
|
||||
if ((magic_data->data2=select_teleport_target(0))==0)
|
||||
{
|
||||
cancel_power(id,xa,ya,xr,yr);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue