Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
298 | serge | 1 | // Emacs style mode select -*- C++ -*- |
2 | //----------------------------------------------------------------------------- |
||
3 | // |
||
4 | // $Id:$ |
||
5 | // |
||
6 | // Copyright (C) 1993-1996 by id Software, Inc. |
||
7 | // |
||
8 | // This source is available for distribution and/or modification |
||
9 | // only under the terms of the DOOM Source Code License as |
||
10 | // published by id Software. All rights reserved. |
||
11 | // |
||
12 | // The source is distributed in the hope that it will be useful, |
||
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License |
||
15 | // for more details. |
||
16 | // |
||
17 | // DESCRIPTION: |
||
18 | // MapObj data. Map Objects or mobjs are actors, entities, |
||
19 | // thinker, take-your-pick... anything that moves, acts, or |
||
20 | // suffers state changes of more or less violent nature. |
||
21 | // |
||
22 | //----------------------------------------------------------------------------- |
||
23 | |||
24 | |||
25 | #ifndef __D_THINK__ |
||
26 | #define __D_THINK__ |
||
27 | |||
28 | |||
29 | #ifdef __GNUG__ |
||
30 | #pragma interface |
||
31 | #endif |
||
32 | |||
33 | |||
34 | |||
35 | // |
||
36 | // Experimental stuff. |
||
37 | // To compile this as "ANSI C with classes" |
||
38 | // we will need to handle the various |
||
39 | // action functions cleanly. |
||
40 | // |
||
41 | typedef void (*actionf_v)(); |
||
42 | typedef void (*actionf_p1)( void* ); |
||
43 | typedef void (*actionf_p2)( void*, void* ); |
||
44 | |||
45 | typedef union |
||
46 | { |
||
47 | actionf_p1 acp1; |
||
48 | actionf_v acv; |
||
49 | actionf_p2 acp2; |
||
50 | |||
51 | } actionf_t; |
||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | // Historically, "think_t" is yet another |
||
58 | // function pointer to a routine to handle |
||
59 | // an actor. |
||
60 | typedef actionf_t think_t; |
||
61 | |||
62 | |||
63 | // Doubly linked list of actors. |
||
64 | typedef struct thinker_s |
||
65 | { |
||
66 | struct thinker_s* prev; |
||
67 | struct thinker_s* next; |
||
68 | think_t function; |
||
69 | |||
70 | } thinker_t; |
||
71 | |||
72 | |||
73 | |||
74 | #endif |
||
75 | //----------------------------------------------------------------------------- |
||
76 | // |
||
77 | // $Log:$ |
||
78 | // |
||
79 | //----------------------------------------------------------------------------- |