blob: c74384ff7d49175450a41ceb50d8f0548b7995ab (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef __KOOPATLAS_MAP_H
#define __KOOPATLAS_MAP_H
#include "koopatlas/core.h"
// Can't remember why I had this. Who cares
#define GEKKO
#include "rvl/mtx.h"
#include "rvl/GXEnum.h"
#include "rvl/GXStruct.h"
#include "rvl/GXTransform.h"
#include "rvl/GXGeometry.h"
#include "rvl/GXDispList.h"
#include "rvl/GXLighting.h"
#include "rvl/GXTev.h"
#include "rvl/GXTexture.h"
#include "rvl/GXCull.h"
#include "rvl/GXPixel.h"
#include "rvl/GXBump.h"
#include "rvl/GXVert.h"
#include "rvl/vifuncs.h"
class dWMMap_c : public dBase_c {
public:
dWMMap_c();
int onCreate();
int onDelete();
int onExecute();
int onDraw();
class renderer_c : public m3d::proc_c {
public:
mAllocator_c allocator;
void drawOpa();
void drawXlu();
private:
void drawLayers();
void beginRendering();
void endRendering();
void renderTileLayer(dKPLayer_s *layer, dKPLayer_s::sector_s *sector);
void renderDoodadLayer(dKPLayer_s *layer);
void loadTexture(GXTexObj *obj);
void loadCamera();
void loadCamera(Mtx m);
GXTexObj *currentTexture;
Mtx renderMtx;
float baseZ;
int minX, minY, maxX, maxY;
};
renderer_c renderer;
static dWMMap_c *build();
static dWMMap_c *instance;
};
#endif
|