-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexternBitmaps.h
More file actions
141 lines (122 loc) · 8.99 KB
/
Copy pathexternBitmaps.h
File metadata and controls
141 lines (122 loc) · 8.99 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#pragma once
#include <Arduino.h>
#include "settings.h"
#include "dungeonTypes.h"
// monsters
extern const uint8_t joey[] PROGMEM;
extern const uint8_t beholder[] PROGMEM;
extern const uint8_t rat[] PROGMEM;
// objects
extern const uint8_t newBars[] PROGMEM;
extern const uint8_t door[] PROGMEM;
extern const uint8_t leverLeft[] PROGMEM;
extern const uint8_t leverRight[] PROGMEM;
extern const uint8_t chestClosed[] PROGMEM;
extern const uint8_t chestOpen[] PROGMEM;
extern const uint8_t fountain[] PROGMEM;
extern const uint8_t statusPanel[] PROGMEM;
extern const uint8_t statusPanelVertical[] PROGMEM;
extern const uint8_t compass[] PROGMEM;
// walls
extern const unsigned char smallFrontWall_D1[] PROGMEM;
extern const unsigned char smallFrontWall_D2[] PROGMEM;
extern const unsigned char smallFrontWall_D3[] PROGMEM;
extern const unsigned char leftRightWalls_D0[] PROGMEM;
extern const unsigned char leftRightWalls_D1[] PROGMEM;
extern const unsigned char leftRightWalls_D2[] PROGMEM;
extern const unsigned char leftRightWalls_D3[] PROGMEM;
extern const unsigned char outerLeftRightWalls_D2[] PROGMEM;
extern const unsigned char outerLeftRightWalls_D3[] PROGMEM;
#ifdef _USE_ARDUBOY2_
// floor
extern const unsigned char dungeonFloor[] PROGMEM;
#endif
// list of possible non wall objects (i.e. monsters, doors, ...) (9 bytes per object)
const NON_WALL_OBJECT objectList [11] PROGMEM = {
// itemType , width, verticalOffsetBits, heightBytes, scalingThreshold, bitmapData
{ SKELETON , 28, 2 * 8, 5, { 1, 2, 5 }, joey }, // 0
{ BEHOLDER , 32, 0 * 8, 7, { 1, 2, 5 }, beholder }, // 1
{ BARS , 28, 1 * 8, 6, { 1, 2, 5 }, newBars }, // 2
{ DOOR , 32, 1 * 8, 7, { 1, 3, 12 }, door }, // 3
{ SWITCH_L , 16, 3 * 8, 1, { 1, 2, 8 }, leverLeft }, // 4
{ SWITCH_R , 16, 3 * 8, 1, { 1, 2, 8 }, leverRight }, // 5
{ CLOSED_CHEST, 24, 4 * 8, 3, { 1, 3, 8 }, chestClosed }, // 6
/* TODO: there is no reason to keep the MIMIC as a separate bitmap object, as it is identical to the closed chest!
Is there an easy way to fix this? */
{ MIMIC , 24, 4 * 8, 3, { 1, 3, 8 }, chestClosed }, // 7
{ OPEN_CHEST , 24, 4 * 8, 3, { 1, 3, 8 }, chestOpen }, // 8
{ FOUNTAIN , 12, 4 * 8, 3, { 1, 2, 99 }, fountain }, // 9
{ RAT , 20, 5 * 8, 2, { 1, 2, 99 }, rat }, // 10
};
// array of conditions for wall display (9 bytes per row)
// 'WALL & ~FLAG_SOLID' means all walls, fake or not...
// CAUTION: The entries must be ordered from min. distance(0) to max. distance (6)
// Otherwise display errors will occur
const SIMPLE_WALL_INFO arrayOfWallInfo[] PROGMEM = {
#if 0
// *wallBitmap , startX, endX, posStartEndY, viewDistance, l/r offset,relPos, width
// distance 7
{ leftRightWalls_D3 , 37 , 41 , 0x34 , 7 , -1 , 0 , 10 }, // 19
{ leftRightWalls_D3 , 54 , 58 , 0x34 , 7 , +1 , 5 , 10 }, // 20
{ outerLeftRightWalls_D3 , 15 , 29 , 0x34 , 7 , -2 , 0 , 30 }, // 21
{ outerLeftRightWalls_D3 , 66 , 80 , 0x34 , 7 , +2 , 15 , 30 }, // 22
// distance 6
{ smallFrontWall_D3 , 0 , 14 , 0x34 , 6 , -2 , 7 , 22 }, // 14
{ smallFrontWall_D3 , 15 , 36 , 0x34 , 6 , -1 , 0 , 22 }, // 15
{ smallFrontWall_D3 , 37 , 58 , 0x34 , 6 , 0 , 0 , 22 }, // 16
{ smallFrontWall_D3 , 59 , 80 , 0x34 , 6 , +1 , 0 , 22 }, // 17
{ smallFrontWall_D3 , 81 , 95 , 0x34 , 6 , +2 , 0 , 22 }, // 18
// distance 5
{ leftRightWalls_D2 , 26 , 36 , 0x25 , 5 , -1 , 0 , 22 }, // 10
{ leftRightWalls_D2 , 59 , 69 , 0x25 , 5 , +1 , 11 , 22 }, // 11
{ outerLeftRightWalls_D2 , 0 , 14 , 0x25 , 5 , -2 , 0 , 30 }, // 12
{ outerLeftRightWalls_D2 , 81 , 95 , 0x25 , 5 , +2 , 15 , 30 }, // 13
// distance 4
{ smallFrontWall_D2 , 0 , 25 , 0x25 , 4 , -1 , 18 , 44 }, // 7
{ smallFrontWall_D2 , 26 , 69 , 0x25 , 4 , 0 , 0 , 44 }, // 8
{ smallFrontWall_D2 , 70 , 95 , 0x25 , 4 , +1 , 0 , 44 }, // 9
// distance 3
{ leftRightWalls_D1 , 4 , 25 , 0x07 , 3 , -1 , 0 , 44 }, // 5
{ leftRightWalls_D1 , 70 , 91 , 0x07 , 3 , +1 , 22 , 44 }, // 6
// distance 2
{ smallFrontWall_D1 , 0 , 3 , 0x07 , 2 , -1 , 84 , 88 }, // 2
{ smallFrontWall_D1 , 4 , 91 , 0x07 , 2 , 0 , 0 , 88 }, // 3
{ smallFrontWall_D1 , 92 , 95 , 0x07 , 2 , +1 , 0 , 88 }, // 4
// distance 1
{ leftRightWalls_D0 , 0 , 3 , 0x07 , 1 , -1 , 0 , 8 }, // 0
{ leftRightWalls_D0 , 92 , 95 , 0x07 , 1 , +1 , 4 , 8 }, // 1
// no wall found, assuming full size (is this required?)
{ NULL , 0 , 0 , 0x07 , 0 , 0 , 0 , 96 }, // 23
#else
// *wallBitmap , startX, endX, posStartEndY, distance, l/r offset,relPos, width
// distance 0
{ leftRightWalls_D0 , 0 , 3 , 0x07 , 0 , -1 , 0 , 8 }, // 0
{ leftRightWalls_D0 , 92 , 95 , 0x07 , 0 , +1 , 4 , 8 }, // 1
// distance 1
{ smallFrontWall_D1 , 0 , 3 , 0x07 , 1 , -1 , 84 , 88 }, // 2
{ smallFrontWall_D1 , 4 , 91 , 0x07 , 1 , 0 , 0 , 88 }, // 3
{ smallFrontWall_D1 , 92 , 95 , 0x07 , 1 , +1 , 0 , 88 }, // 4
{ leftRightWalls_D1 , 4 , 25 , 0x07 , 1 , -1 , 0 , 44 }, // 5
{ leftRightWalls_D1 , 70 , 91 , 0x07 , 1 , +1 , 22 , 44 }, // 6
// distance 2
{ smallFrontWall_D2 , 0 , 25 , 0x25 , 2 , -1 , 18 , 44 }, // 7
{ smallFrontWall_D2 , 26 , 69 , 0x25 , 2 , 0 , 0 , 44 }, // 8
{ smallFrontWall_D2 , 70 , 95 , 0x25 , 2 , +1 , 0 , 44 }, // 9
{ leftRightWalls_D2 , 26 , 36 , 0x25 , 2 , -1 , 0 , 22 }, // 10
{ leftRightWalls_D2 , 59 , 69 , 0x25 , 2 , +1 , 11 , 22 }, // 11
{ outerLeftRightWalls_D2 , 0 , 14 , 0x25 , 2 , -2 , 0 , 30 }, // 12
{ outerLeftRightWalls_D2 , 81 , 95 , 0x25 , 2 , +2 , 15 , 30 }, // 13
// distance 3
{ smallFrontWall_D3 , 0 , 14 , 0x34 , 3 , -2 , 7 , 22 }, // 14
{ smallFrontWall_D3 , 15 , 36 , 0x34 , 3 , -1 , 0 , 22 }, // 15
{ smallFrontWall_D3 , 37 , 58 , 0x34 , 3 , 0 , 0 , 22 }, // 16
{ smallFrontWall_D3 , 59 , 80 , 0x34 , 3 , +1 , 0 , 22 }, // 17
{ smallFrontWall_D3 , 81 , 95 , 0x34 , 3 , +2 , 0 , 22 }, // 18
{ leftRightWalls_D3 , 37 , 41 , 0x34 , 3 , -1 , 0 , 10 }, // 19
{ leftRightWalls_D3 , 54 , 58 , 0x34 , 3 , +1 , 5 , 10 }, // 20
{ outerLeftRightWalls_D3 , 15 , 29 , 0x34 , 3 , -2 , 0 , 30 }, // 21
{ outerLeftRightWalls_D3 , 66 , 80 , 0x34 , 3 , +2 , 15 , 30 }, // 22
// no wall found, assuming full size (is this required?)
{ NULL , 0 , 0 , 0x07 , 0 , 0 , 0 , 96 }, // 23
#endif
};