File: node.c

package info (click to toggle)
conquest 8.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,984 kB
  • ctags: 3,086
  • sloc: ansic: 39,393; sh: 8,540; yacc: 446; makefile: 296; lex: 146
file content (50 lines) | stat: -rw-r--r-- 883 bytes parent folder | download
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
/* nodes....
 *
 * Jon Trulson, 1/2004
 *
 * $Id: node.c,v 1.4 2004/09/04 07:38:02 jon Exp $
 *
 * Copyright 2004 Jon Trulson under the ARTISTIC LICENSE. (See LICENSE).
 */

#include "c_defs.h"
#include "gldisplay.h"
#include "node.h"

static scrNode_t *topNodePtr = NULL; /* the currently running top node */
static scrNode_t *topONodePtr = NULL; /* the currently running top overlay
                                         node */
static scrNode_t *currentNodePtr = NULL; /* the currently running node */

/* can only set the top node */
void setNode(scrNode_t *node)
{
  topNodePtr = node;

  return;
}

/* can only set the top Onode */
void setONode(scrNode_t *node)
{
  topONodePtr = node;

  return;
}

scrNode_t *getTopNode(void)
{
  return topNodePtr;
}

scrNode_t *getTopONode(void)
{
  return topONodePtr;
}

scrNode_t *getCurrentNode(void)
{
  return currentNodePtr;
}