1 (* Copyright (C) DooM 2D:Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *)
16 {$INCLUDE ../shared/a_modes.inc}
19 interface
21 uses
22 e_log,
25 xprofiler;
28 type
30 public
31 const
32 // both for but and for bstate
39 // event types
44 public
54 public
55 const
68 function g_Holmes_mouseEvent (var ev: THMouseEvent): Boolean; // returns `true` if event was eaten
71 // hooks for player
76 var
80 implementation
82 uses
87 var
88 //globalInited: Boolean = false;
95 // ////////////////////////////////////////////////////////////////////////// //
96 {$INCLUDE g_holmes.inc}
98 // ////////////////////////////////////////////////////////////////////////// //
100 begin
101 e_WriteLog(Format('Inspector: videomode changed: %dx%d', [gScreenWidth, gScreenHeight]), MSG_NOTIFY);
102 // texture space is possibly lost here, idc
108 //createCursorTexture();
112 begin
118 begin
122 // ////////////////////////////////////////////////////////////////////////// //
123 var
132 begin
141 begin
157 begin
163 begin
167 //if pan.Enabled then g_Map_DisableWall(pan.arrIdx) else g_Map_EnableWall(pan.arrIdx);
170 begin
171 //e_WriteLog(Format('mouse: x=%d; y=%d; but=%d; bstate=%d', [msx, msy, but, bstate]), MSG_NOTIFY);
176 begin
178 exit;
182 begin
187 exit;
195 var
198 begin
203 begin
209 var
214 begin
217 //mx += mw div 2;
219 //fillRect(mx-4, my-7*8-6, 110, 7*8+6, 0, 0, 94, 250);
224 // type
225 drawText6(mx, my, Format('%s(U:%u)', [monsTypeToString(mon.MonsterType), mon.UID]), 255, 127, 0); my -= 8;
226 // beh
227 drawText6(mx, my, Format('Beh: %s', [monsBehToString(mon.MonsterBehaviour)]), 255, 127, 0); my -= 8;
228 // state
229 drawText6(mx, my, Format('State:%s (%d)', [monsStateToString(mon.MonsterState), mon.MonsterSleep]), 255, 127, 0); my -= 8;
230 // health
232 // ammo
234 // target
240 begin
243 begin
247 end
249 begin
252 begin
258 {
259 property MonsterRemoved: Boolean read FRemoved write FRemoved;
260 property MonsterPain: Integer read FPain write FPain;
261 property MonsterAnim: Byte read FCurAnim write FCurAnim;
262 }
265 var
268 begin
269 //e_DrawPoint(4, plrMouseX, plrMouseY, 255, 0, 255);
272 //e_WriteLog(Format('(%d,%d)-(%d,%d)', [laserX0, laserY0, laserX1, laserY1]), MSG_NOTIFY);
280 begin
283 begin
290 //e_DrawPoint(16, laserX0, laserY0, 255, 255, 255);
296 {
297 procedure drawTileGrid ();
298 var
299 x, y: Integer;
300 begin
301 y := mapGrid.gridY0;
302 while (y < mapGrid.gridY0+mapGrid.gridHeight) do
303 begin
304 x := mapGrid.gridX0;
305 while (x < mapGrid.gridX0+mapGrid.gridWidth) do
306 begin
307 if (x+mapGrid.tileSize > vpx) and (y+mapGrid.tileSize > vpy) and
308 (x < vpx+vpw) and (y < vpy+vph) then
309 begin
310 e_DrawQuad(x, y, x+mapGrid.tileSize-1, y+mapGrid.tileSize-1, 96, 96, 96, 96);
311 end;
312 Inc(x, mapGrid.tileSize);
313 end;
314 Inc(y, mapGrid.tileSize);
315 end;
316 end;
317 }
320 // ////////////////////////////////////////////////////////////////////////// //
322 begin
333 begin
338 // ////////////////////////////////////////////////////////////////////////// //
340 begin
348 begin
352 //drawText6Prop(10, 10, 'Hi there, I''m Holmes!', 255, 255, 0);
353 //drawText8Prop(10, 20, 'Hi there, I''m Holmes!', 255, 255, 0);