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 implementation
78 uses
83 var
84 //globalInited: Boolean = false;
91 // ////////////////////////////////////////////////////////////////////////// //
92 {$INCLUDE g_holmes.inc}
94 // ////////////////////////////////////////////////////////////////////////// //
96 begin
97 e_WriteLog(Format('Inspector: videomode changed: %dx%d', [gScreenWidth, gScreenHeight]), MSG_NOTIFY);
98 // texture space is possibly lost here, idc
104 //createCursorTexture();
108 begin
114 begin
118 // ////////////////////////////////////////////////////////////////////////// //
119 var
128 begin
137 begin
153 begin
159 begin
163 //if pan.Enabled then g_Map_DisableWall(pan.arrIdx) else g_Map_EnableWall(pan.arrIdx);
166 begin
167 //e_WriteLog(Format('mouse: x=%d; y=%d; but=%d; bstate=%d', [msx, msy, but, bstate]), MSG_NOTIFY);
172 begin
174 exit;
178 begin
183 exit;
191 var
194 begin
199 begin
205 var
207 begin
210 //mx += mw div 2;
212 //fillRect(mx-4, my-7*8-6, 110, 7*8+6, 0, 0, 94, 250);
217 // type
218 drawText6(mx, my, Format('%s(U:%u)', [monsTypeToString(mon.MonsterType), mon.UID]), 255, 127, 0); my -= 8;
219 // beh
220 drawText6(mx, my, Format('Beh: %s', [monsBehToString(mon.MonsterBehaviour)]), 255, 127, 0); my -= 8;
221 // state
222 drawText6(mx, my, Format('State:%s (%d)', [monsStateToString(mon.MonsterState), mon.MonsterSleep]), 255, 127, 0); my -= 8;
223 // health
225 // ammo
227 // target
231 {
232 property MonsterRemoved: Boolean read FRemoved write FRemoved;
233 property MonsterPain: Integer read FPain write FPain;
234 property MonsterAnim: Byte read FCurAnim write FCurAnim;
235 }
238 var
241 begin
242 //e_DrawPoint(4, plrMouseX, plrMouseY, 255, 0, 255);
245 //e_WriteLog(Format('(%d,%d)-(%d,%d)', [laserX0, laserY0, laserX1, laserY1]), MSG_NOTIFY);
253 begin
256 begin
263 //e_DrawPoint(16, laserX0, laserY0, 255, 255, 255);
269 {
270 procedure drawTileGrid ();
271 var
272 x, y: Integer;
273 begin
274 y := mapGrid.gridY0;
275 while (y < mapGrid.gridY0+mapGrid.gridHeight) do
276 begin
277 x := mapGrid.gridX0;
278 while (x < mapGrid.gridX0+mapGrid.gridWidth) do
279 begin
280 if (x+mapGrid.tileSize > vpx) and (y+mapGrid.tileSize > vpy) and
281 (x < vpx+vpw) and (y < vpy+vph) then
282 begin
283 e_DrawQuad(x, y, x+mapGrid.tileSize-1, y+mapGrid.tileSize-1, 96, 96, 96, 96);
284 end;
285 Inc(x, mapGrid.tileSize);
286 end;
287 Inc(y, mapGrid.tileSize);
288 end;
289 end;
290 }
293 // ////////////////////////////////////////////////////////////////////////// //
295 begin
306 begin
311 // ////////////////////////////////////////////////////////////////////////// //
313 begin
321 begin
325 //drawText6Prop(10, 10, 'Hi there, I''m Holmes!', 255, 255, 0);
326 //drawText8Prop(10, 20, 'Hi there, I''m Holmes!', 255, 255, 0);