ScummVM API documentation
Dgds::Global Class Referenceabstract

#include <globals.h>

Inheritance diagram for Dgds::Global:
Dgds::ReadOnlyGlobal< T > Dgds::ReadWriteGlobal< T >

Public Member Functions

 Global (uint16 num)
 
virtual int16 get ()=0
 
virtual int16 set (int16 val)=0
 
virtual uint16 getNum () const
 
virtual void setRaw (int16 val)=0
 

Detailed Description

The original game uses a struct here with 3 entries:

  1. global variable num (uint16)
  2. pointer to the variable (uint16)
  3. pointer - get+set function ptr or 1 == R/W or 0 == RO (32 bits) We make that a bit nicer using c++.

The original also creates a lookup table to do O(1) lookups of each global, but there are only ~20 of them so we just iterate through each time.


The documentation for this class was generated from the following file: