MacLO/src/GameWindow.h

49 lines
1.0 KiB
C
Raw Normal View History

// Copyright (c) Jon Thysell <http://jonthysell.com>
// Licensed under the MIT License.
#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H
#include "MacCommon.h"
#include "GameEngine.h"
#define WindowPattern black
#define PlayfieldMargin 4
#define PlayfieldPadding 2
#define PlayfieldCornerSize 12
#define LightMargin 6
#define LightSize 50
#define LightCornerSize 8
#define PlayfieldPattern ltGray
#define HUDMargin PlayfieldMargin
#define HUDCornerSize PlayfieldCornerSize
#define HUDPattern PlayfieldPattern
2021-10-20 16:34:31 +00:00
typedef enum GameMode
{
Title,
Play,
LevelComplete,
GameComplete
} GameMode;
typedef struct GameWindow
{
2021-10-20 16:34:31 +00:00
WindowPtr Window;
GameEngine Engine;
GameMode GameMode;
2021-10-20 16:34:31 +00:00
Rect PlayfieldRect;
Rect HUDRect;
} GameWindow;
void GameWindow_Init(GameWindow *pGameWindow);
2021-10-20 16:34:31 +00:00
void GameWindow_Draw(const GameWindow *pGameWindow, bool fullRefresh);
2021-10-20 16:34:31 +00:00
void GameWindow_Show(const GameWindow *pGameWindow);
void GameWindow_Click(GameWindow *pGameWindow, const Point *pPosition);
#endif