-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Overworld.h
62 lines (42 loc) · 1.67 KB
/
Overworld.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
// Filename: Overworld.h
// Declarations specific to the "overworld" screen should go here.
//
// Project Codename: GameB
// TODO: Come up with a better name later.
// 2020 Joseph Ryan Ries <ryanries09@gmail.com>
// My YouTube series where we program an entire video game from scratch in C.
// Watch it on YouTube: https://www.youtube.com/watch?v=3zFFrBSdBvA
// Follow along on GitHub: https://github.com/ryanries/GameB
// Find me on Twitter @JosephRyanRies
// # License
// ----------
// The source code in this project is licensed under the MIT license.
// The media assets such as artwork, custom fonts, music and sound effects are licensed under a separate license.
// A copy of that license can be found in the 'Assets' directory.
// stb_vorbis by Sean Barrett is public domain and a copy of its license can be found in the stb_vorbis.c file.
#pragma once
// Could be a door, or a gateway, or a staircase, or a cave entrace, etc...
typedef struct PORTAL
{
// Where is this portal located, in world coordinates?
POINT WorldPos;
// Where should the portal take the player, in world coordinates?
POINT WorldDestination;
// Where should the player be located, in screen coordinates?
POINT ScreenDestination;
// Where should the camera be located, in world coordinates?
POINT CameraPos;
// Which area does the portal take you to?
GAMEAREA DestinationArea;
} PORTAL;
extern PORTAL gPortal001;
extern PORTAL gPortal002;
extern PORTAL gPortals[2];
extern GAMEAREA gCurrentArea;
extern GAMEAREA gOverworldArea;
extern GAMEAREA gHomeGameArea;
void PPI_Overworld(void);
void DrawOverworld(void);
void PortalHandler(void);
void RandomMonsterEncounter(void);
int InventoryItemCount(void);