summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a1cd7d)
raw | patch | inline | side by side (parent: 5a1cd7d)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 23 Aug 2017 19:06:13 +0000 (22:06 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 23 Aug 2017 19:06:25 +0000 (22:06 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_holmes.pas | patch | blob | history | |
src/game/g_monsters.pas | patch | blob | history | |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 129370db0db8b867a81199199808fa13d86c8572..a2f74cdfe5c18f8b4568570408f869868916f396 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
p.viewPortW := sWidth;
p.viewPortH := sHeight;
+ if (p = gPlayer1) then
+ begin
+ g_Holmes_plrView(p.viewPortX, p.viewPortY, p.viewPortW, p.viewPortH);
+ end;
+
renderMapInternal(-c, -d, a, b+p.IncCam, true);
if p.FSpectator then
diff --git a/src/game/g_holmes.pas b/src/game/g_holmes.pas
index 87788a4b03b6f2ac449ecf91a5de91ae524a6ea1..37ade0969ba649690bfaecbb95c1821fa85842c3 100644 (file)
--- a/src/game/g_holmes.pas
+++ b/src/game/g_holmes.pas
function g_Holmes_KeyEvent (var ev: THKeyEvent): Boolean;
+var
+ mon: TMonster;
begin
result := false;
msB := ev.bstate;
showAllMonsCells := not showAllMonsCells;
exit;
end;
+ // M-A: wake up monster
+ if (ev.scan = SDL_SCANCODE_A) and ((ev.kstate and THKeyEvent.ModAlt) <> 0) then
+ begin
+ result := true;
+ if (monMarkedUID <> -1) then
+ begin
+ mon := g_Monsters_ByUID(monMarkedUID);
+ if (mon <> nil) then mon.WakeUp();
+ end;
+ exit;
+ end;
end;
end;
//drawText8Prop(10, 20, 'Hi there, I''m Holmes!', 255, 255, 0);
drawCursor();
+
+ laserSet := false;
end;
index 5fb769dbdab703eb9daff973c5877a6ea556025b..7b22e56dfcc3cffee624d01a965ac6dfa208e31f 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
begin
FObj.Rect.Y := FObj.Rect.Y + FObj.Rect.Height-12;
FObj.Rect.Height := 12;
+ positionChanged();
end;
// Óðîí áûë ñèëüíûì => ñëàáûå - â êàøó:
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 92aec4017d01675a83b8b37ad0aa4a98772bf619..ebbd2043e5fc69d7784346b031c5b51d804f637c 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure TPlayer.DrawAim();
procedure drawCast (sz: Integer; ax0, ay0, ax1, ay1: Integer);
-
- {
- procedure drawTileGrid ();
- var
- x, y: Integer;
- begin
- y := mapGrid.gridY0;
- while (y < mapGrid.gridY0+mapGrid.gridHeight) do
- begin
- x := mapGrid.gridX0;
- while (x < mapGrid.gridX0+mapGrid.gridWidth) do
- begin
- if (x+mapGrid.tileSize > viewPortX) and (y+mapGrid.tileSize > viewPortY) and
- (x < viewPortX+viewPortW) and (y < viewPortY+viewPortH) then
- begin
- e_DrawQuad(x, y, x+mapGrid.tileSize-1, y+mapGrid.tileSize-1, 96, 96, 96, 96);
- end;
- Inc(x, mapGrid.tileSize);
- end;
- Inc(y, mapGrid.tileSize);
- end;
- end;
- }
-
var
ex, ey: Integer;
begin
if isValidViewPort and (self = gPlayer1) then
begin
- g_Holmes_plrView(viewPortX, viewPortY, viewPortW, viewPortH);
g_Holmes_plrLaser(ax0, ay0, ax1, ay1);
end;
begin
e_DrawLine(sz, ax0, ay0, ex, ey, 0, 0, 255, 96);
end;
-
- //drawTileGrid();
end;
var