-
Notifications
You must be signed in to change notification settings - Fork 0
/
Photon.h
65 lines (53 loc) · 3.98 KB
/
Photon.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include "Bitmap.h"
#include "Character2D.h"
#include "Graphics_Info.h"
#include "Linked_List.h"
#include "resource.h"
#include "Scroller.h"
#include "Timing.h"
class Photon
{
public:
Photon ();
void Init (HWND Window, Graphics_Info Graphics);
void Finish_Frame ();
void load_bitmap (HBITMAP &bitmap, LPCWSTR path);
HBITMAP load_bitmap (LPCWSTR path);
void draw_rectangle (HDC, int, int, int, int, HBRUSH);
void draw_debug (HDC destination, Timing timer);
void draw_bitmap (HBITMAP bitmap, HDC destination, int x, int y);
void draw_bitmap (HBITMAP bitmap, HDC destination, int x, int y, float scale);
//void get_client_screen_size (HWND Window, int &width, int &height);
//int window_width;
//int window_height;
//int screen_width;
//int screen_height;
//int small_width;
//int small_height;
int background_width;
int background_height;
HDC hdc;
HDC hdc_frame_buffer; // Source buffer for entire frame blitting
HBITMAP bitmap_frame_buffer;
HDC hdc_temp; // Source buffer for individual sprite blitting
//Linked_List<HDC> hdc_layers; // Buffers for the various sprite layers
HDC hdc_layer0, hdc_layer1;
HBITMAP bitmap_layer0, bitmap_layer1;
Graphics_Info graphics;
private:
COLORREF color_red = RGB (192, 0, 0);
COLORREF color_yellow = RGB (224, 224, 0);
COLORREF color_green = RGB (0, 192, 0);
COLORREF color_blue = RGB (0, 0, 192);
COLORREF color_black = RGB (0, 0, 0);
COLORREF color_white = RGB (255, 255, 255);
COLORREF color_light_grey = RGB (192, 192, 192);
HBRUSH brush_red = CreateSolidBrush (color_red);
HBRUSH brush_yellow = CreateSolidBrush (color_yellow);
HBRUSH brush_green = CreateSolidBrush (color_green);
HBRUSH brush_blue = CreateSolidBrush (color_blue);
HBRUSH brush_black = CreateSolidBrush (color_black);
HBRUSH brush_white = CreateSolidBrush (color_white);
HBRUSH brush_light_grey = CreateSolidBrush (color_light_grey);
};