-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoom.m
More file actions
69 lines (58 loc) · 1.64 KB
/
doom.m
File metadata and controls
69 lines (58 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
classdef doom < handle
properties
wadfiles % cell of char
devparm
nomonsters
respawnparm
fastparm
drone
singletics
inhelpscreens
startskill % skill_t
startepisode
startmap
autostart
debugfile % filehandle
advancedemo
basedefault
events_
eventhead
eventtail
gamemode
gamemission
modifiedgame
wipegamestate
setsizeneeded
showMessages
end
methods
function self = doom(varargin)
self.singletics = false;
self.eventhead = 1;
self.eventtail = 1;
for i = 1:cg.MAX_EVENTS
self.events_(i) = t_factory.event_t(0, 0, 0, 0)
end
self.gamemode = cg.indetermined;
self.gamemission = cg.doom;
modifiedgame = false;
wipegamestate = cg.GS_DEMOSCREEN
end
function D_PostEvent (self, ev)
self.events_(self.eventhead) = ev;
self.eventhead = mod(self.eventhead, cg.MAX_EVENTS)+1;
end
function D_ProcessEvents(self)
if self.game == commercial && W_CheckNumForName("map01")<0
return % // IF STORE DEMO, DO NOT ACCEPT INPUT
end
while self.eventtail != self.eventhead
ev = events_(eventtail);
if (M_Responder (ev))
continue; % // menu ate the event
G_Responder (ev);
self.eventtail = mod(self.eventtail, cg.MAX_EVENTS)+1;
end
end
end
end