diff --git a/game/automap.c b/game/automap.c index 90f8cce..10990ae 100644 --- a/game/automap.c +++ b/game/automap.c @@ -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=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); diff --git a/game/console.c b/game/console.c index 70cf817..5f313a6 100644 --- a/game/console.c +++ b/game/console.c @@ -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;idata1)) - 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;