summaryrefslogtreecommitdiff
path: root/include/GShierMemObject.h
blob: 60af7b780d01f682d62c810aa71b6d68b04ea769 (plain)
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
#ifndef POKEREVO_GSHIERMEMOBJECT_H
#define POKEREVO_GSHIERMEMOBJECT_H

#include "code_801DAAE0.h"

// TODO: determine file that defines this
extern MEMHeapHandle lbl_8063E8F8;

// Note: This is the root base class for various classes such as GScamera,
// GSlight, GSmodel, etc. These classes are all new/deleted using an alternative set of
// routines than the global new and delete, which we infer is defined inline here.

// TODO: abstract class?

class GShierMemObject
{
public:
    void* operator new(size_t sz)
    {
        if (func_801DAB28())
            return func_801DAC94(lbl_8063E8F8, sz);
        else
            return NULL;
    }
    
    void operator delete(void* ptr)
    {
        func_801DAD48(lbl_8063E8F8, ptr);
    }
};

#endif //POKEREVO_GSHIERMEMOBJECT_H