-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcursor.h
63 lines (51 loc) · 1.71 KB
/
cursor.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
/*
============================================================
Depth-first Search Algorithm - NES Proof-of-concept
Copyright 2018 - 2021 Ninja Dynamics - See license below
============================================================
Creative Commons - Attribution 3.0 Unported
https://creativecommons.org/licenses/by/3.0/legalcode
You are free to:
------------------------------------------------------------
Share - copy and redistribute the material in any
medium or format.
Adapt - remix, transform, and build upon the material
for any purpose, even commercially.
Under the following terms:
------------------------------------------------------------
Attribution - You must give appropriate credit,
provide a link to the license, and indicate if
changes were made. You may do so in any reasonable
manner, but not in any way that suggests the licensor
endorses you or your use.
No additional restrictions — You may not apply legal
terms or technological measures that legally restrict
others from doing anything the license permits.
============================================================
*/
#ifndef _CURSOR_H
#define _CURSOR_H
#include "neslib.h"
#include <inttypes.h>
#define OFF 0
#define ON 1
#define CURSOR_FRAME_DELAY 5
#define TILE_MODE 0
#define PIXEL_MODE 1
#define MAP_SIZE_X 32
#define MAP_SIZE_Y 32
typedef struct Cursor {
uint16_t x;
uint16_t y;
uint8_t mx;
uint8_t my;
byte state;
byte value;
byte mode;
char sprite;
uint8_t framecount;
} Cursor;
extern Cursor cursor;
void __fastcall__ cursor_init(byte mode, char sprite);
void __fastcall__ cursor_move(void);
#endif // cursor.h