summaryrefslogtreecommitdiffhomepage
path: root/Stars45/GameWinDX9.h
blob: 50484ff00358e6d3f21ad896b8c06b0ef45cb27e (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
/*  Starshatter: The Open Source Project
    Copyright (c) 2021-2022, Starshatter: The Open Source Project Contributors
    Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
    Copyright (c) 1997-2006, Destroyer Studios LLC.
*/

#ifndef GameWinDX9_h
#define GameWinDX9_h

#include "Color.h"
#include "Game.h"
#include "Types.h"


class GameWinDX9 : public Game
{
public:
    static GameWinDX9* GetInstance();

    GameWinDX9();
    virtual ~GameWinDX9();

    virtual bool Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow);
    virtual bool InitApplication(HINSTANCE hInstance);
    virtual bool InitInstance(HINSTANCE hInstance, int nCmdShow);
    virtual bool InitGame();

    virtual bool SetupPalette();
    virtual bool LoadPalette(PALETTEENTRY* pal, BYTE* inv);

    int MaxTexSize() const;
    int MaxTexAspect() const;
    Color GetScreenColor() const;
    int GetScreenWidth() const;
    int GetScreenHeight() const;

    void SetMaxTexSize(int n);
    void SetScreenColor(Color c);


protected:
    PALETTEENTRY      standard_palette[256];
    BYTE              inverse_palette[32768];

    int               max_tex_size;
    Color             screen_color;

private:
    static GameWinDX9* instance;
};


#endif  // GameWinDX9_h