source: golgotha/src/render/tnode.hh

Last change on this file was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.7 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef R1_TNODE_HH
10#define R1_TNODE_HH
11
12// this sturcture is preceeds the system (8bit pal) texture in memory
13
14
15struct r1_texture_entry_struct;
16
17typedef void *r1_local_texture_handle_type;
18
19//#define R1_CHECK_TEXTURE_MEMORY
20
21struct r1_texture_node_struct
22{
23  r1_texture_node_struct *lower;   // 0 if texture is lowest level mip, otherwise next lowest mip
24  sw32 signed_size;
25 
26  sw32 size() { return -signed_size; }
27  void set_size(sw32 size) { signed_size=-size; }
28
29  r1_texture_entry_struct *entry;  // pointer to entry in entry table
30  r1_texture_node_struct *higher;  // higher mip level, or 0 if this is the highest loaded
31
32
33#ifdef R1_CHECK_TEXTURE_MEMORY
34  w32 check_sum;
35#endif
36
37public:
38
39  r1_local_texture_handle_type vram_handle;  // handle vram installed texture
40
41  i4_bool is_loaded_in_vram() { return vram_handle!=0; }
42
43  sw32 last_used;                           // last time this was used by the game
44
45  //  i4_float u_correct, v_correct;
46
47  // this stuff needs to be at the end of the structure becuase
48  // it's read in by the async read (don't forget to convert byte-order after read)
49  w16 w,h;
50  w32 next_size;
51
52
53  w16 width() { return w; }
54  w16 height() { return h; }
55};
56
57
58#endif
Note: See TracBrowser for help on using the repository browser.