X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_holmes.pas;h=87788a4b03b6f2ac449ecf91a5de91ae524a6ea1;hb=3d4d252857394f4e2bbcf72d706f654de40103d9;hp=210368deda7b60c463d95b1acc1b13fe11395527;hpb=5599208111f3a6c4f303cb719a26e8e405e82a69;p=d2df-sdl.git diff --git a/src/game/g_holmes.pas b/src/game/g_holmes.pas index 210368d..87788a4 100644 --- a/src/game/g_holmes.pas +++ b/src/game/g_holmes.pas @@ -104,6 +104,7 @@ var kbS: Word = 0; // keyboard modifiers state showMonsInfo: Boolean = false; showMonsLOS2Plr: Boolean = false; + showAllMonsCells: Boolean = false; // ////////////////////////////////////////////////////////////////////////// // @@ -372,6 +373,12 @@ procedure plrDebugDraw (); } end; + function highlightAllMonsterCells (mon: TMonster): Boolean; + begin + result := false; // don't stop + monsGrid.forEachBodyCell(mon.proxyId, hilightCell); + end; + var mon: TMonster; mx, my, mw, mh: Integer; @@ -399,6 +406,8 @@ begin end; end; + if showAllMonsCells then g_Mons_ForEach(highlightAllMonsterCells); + //e_DrawPoint(16, laserX0, laserY0, 255, 255, 255); glPopMatrix(); @@ -453,6 +462,13 @@ begin showMonsLOS2Plr := not showMonsLOS2Plr; exit; end; + // M-G: toggle "show all cells occupied by monsters" + if (ev.scan = SDL_SCANCODE_G) and ((ev.kstate and THKeyEvent.ModAlt) <> 0) then + begin + result := true; + showAllMonsCells := not showAllMonsCells; + exit; + end; end; end;