1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-06-25 23:42:09 +02:00
SpaceCadetPinball/SpaceCadetPinball/splash.h
Muzychenko Andrey d594f5fdb7 Converted memory to direct pointers.
Fixed memory leaks in uninit.
Fixed some of the code analysis warnings.
Enabled /MP build.
Cleaned up the code.
2021-02-02 18:29:54 +03:00

36 lines
982 B
C++

#pragma once
struct LOGPALETTEx256;
struct splash_struct
{
HWND WindowHandle;
HPALETTE Palette;
HBITMAP Bitmap;
HDC DrawingContext;
int Width;
int Height;
int CenterX;
int CenterY;
char BmpName1[200];
char BmpName2[200];
};
class splash
{
public:
static splash_struct* splash_screen(HINSTANCE hInstance, LPCSTR bmpName1, LPCSTR bmpName2);
static void splash_bitmap_setup(splash_struct* splashStruct);
static HBITMAP load_title_bitmap(HMODULE hModule, HDC hdc, LPCSTR lpName, UINT iStart, int iEnd,
HPALETTE* palettePtr);
static HPALETTE splash_init_palette(LOGPALETTE* plpal);
static void splash_paint(splash_struct* splashStruct, HDC dc);
static void splash_destroy(splash_struct* splashStruct);
static void splash_hide(splash_struct* splashStruct);
static LRESULT __stdcall splash_message_handler(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
private:
static HINSTANCE HInstance;
static HGDIOBJ OriginalDcBitmap;
};