-
Notifications
You must be signed in to change notification settings - Fork 3
/
graphics.h
50 lines (44 loc) · 1.61 KB
/
graphics.h
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
/* -----------------------------------------------------------------------------
A DoomLike 3D graphics engine by Alpyre 14-04-2017
Graphic related stuff
*/
/*********************************************************************
* This is a custom struct to pass all the info on the opened screen *
* in graphics.c, to the main.c. *
*********************************************************************/
struct ScreenInfo
{
struct View* view;
struct View* oldView; //hold a pointer to the intuitions screen
struct ViewPort* viewPort;
struct BitMap* bitMap[2]; //two bitmaps for a double buffered screen
struct cprlist* LOFcprList[2]; //two copper lists for the double buffer
struct cprlist* SHFcprList[2];
struct RastPort* rastPort;
struct ColorMap* colorMap;
UWORD width;
UWORD height;
BOOL currentBuffer; //The currentBuffer displayed
/* Pointers to be remembered that will be used when disposing the screen */
struct ViewExtra* vExtra;
struct ViewPortExtra* vpExtra;
struct RasInfo* rasInfo;
struct DimensionInfo* dimquery;
UBYTE depth; //Screens depth (how many bitplanes)
};
struct Texture
{
struct MinNode node;
LONG ID;
struct BitMap *bitMap;
};
// default texture sizes (for now)
#define DEFAULTTEXTUREWIDTH 48
#define DEFAULTTEXTUREHEIGHT 48
struct ScreenInfo* CreateScreen(UWORD, UWORD, UBYTE);
VOID DisposeScreen(struct ScreenInfo*);
VOID ScreenSwap(struct ScreenInfo*);
struct BitMap* loadILBMTexture(STRPTR);
VOID freeTexture(struct BitMap*);
BOOL loadWallTextures(VOID);
VOID freeWallTextures(VOID);