-
Notifications
You must be signed in to change notification settings - Fork 6
/
window.h
40 lines (35 loc) · 953 Bytes
/
window.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
// --------------------------------------------------------------------------
//
// C Kong
// Copyright (C) 2018 Jeff Panici
// All rights reserved.
//
// This software source file is licensed according to the
// MIT License. Refer to the LICENSE file distributed along
// with this source file to learn more.
//
// --------------------------------------------------------------------------
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "fwd.h"
#include "linked_list.h"
#define SCALE_X (4)
#define SCALE_Y (4)
#define SCREEN_WIDTH (256)
#define SCREEN_HEIGHT (256)
typedef struct {
bool valid;
uint32_t x;
uint32_t y;
uint32_t width;
uint32_t height;
uint32_t scale_x;
uint32_t scale_y;
ll_node_t* messages;
struct SDL_Window* window;
struct SDL_Surface* surface;
struct SDL_Texture* texture;
struct SDL_Renderer* renderer;
} window_t;
window_t window_create(int32_t y, int32_t x);