Skip to content

Commit ed6fa79

Browse files
committed
dungeon walls
1 parent 2af397d commit ed6fa79

25 files changed

+368
-244
lines changed

data/gfx.tgz

2.2 KB
Binary file not shown.

src/gfx_32x32.cpp

+66-47
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ void gfx_init_32x32(void)
1717
"",
1818
"",
1919
"",
20-
"",
21-
"",
22-
"",
23-
"",
20+
"dungeon_floor.1",
21+
"dungeon_floor.2",
22+
"dungeon_floor.3",
23+
"dungeon_floor.4",
2424
"",
2525
"",
2626
"",
@@ -66,42 +66,61 @@ void gfx_init_32x32(void)
6666
"",
6767
"",
6868
// ##############################################################################
69-
"dungeon_wall_IS_JOIN_TL2",
70-
"dungeon_wall_IS_JOIN_T_3",
71-
"dungeon_wall_IS_JOIN_TR2",
69+
"dungeon_wall.IS_JOIN_TL2",
70+
"dungeon_wall.IS_JOIN_T_3",
71+
"dungeon_wall.IS_JOIN_TR2",
7272
"",
73-
"dungeon_wall_IS_JOIN_TOP",
73+
"dungeon_wall.IS_JOIN_TOP",
7474
"",
75-
"dungeon_wall_IS_JOIN_X4_180",
76-
"dungeon_wall_IS_JOIN_X4_270",
75+
"dungeon_wall.IS_JOIN_X4_180",
76+
"dungeon_wall.IS_JOIN_X4_270",
7777
"",
78-
"dungeon_wall_IS_JOIN_X2_270",
79-
"dungeon_wall_IS_JOIN_X2",
78+
"dungeon_wall.IS_JOIN_X2_270",
79+
"dungeon_wall.IS_JOIN_X2",
8080
"",
81-
"dungeon_wall_IS_JOIN_X1_180",
82-
"dungeon_wall_IS_JOIN_X1",
81+
"dungeon_wall.IS_JOIN_X1_180",
82+
"dungeon_wall.IS_JOIN_X1",
8383
"",
84-
"dungeon_wall_IS_JOIN_X",
84+
"dungeon_wall.IS_JOIN_X",
8585
"",
8686
"",
8787
// ##############################################################################
88-
"dungeon_wall_IS_JOIN_T270_3",
89-
"dungeon_wall_IS_JOIN_BLOCK",
90-
"dungeon_wall_IS_JOIN_T90_3",
88+
"dungeon_wall.IS_JOIN_T270_3",
89+
"dungeon_wall.IS_JOIN_BLOCK",
90+
"dungeon_wall.IS_JOIN_T90_3",
91+
"",
92+
"dungeon_wall.IS_JOIN_VERT",
93+
"",
94+
"dungeon_wall.IS_JOIN_X4_90",
95+
"dungeon_wall.IS_JOIN_X4",
96+
"",
97+
"dungeon_wall.IS_JOIN_X2_180",
98+
"dungeon_wall.IS_JOIN_X2_90",
99+
"",
100+
"dungeon_wall.IS_JOIN_X1_90",
101+
"dungeon_wall.IS_JOIN_X1_270",
102+
"",
103+
"dungeon_wall.IS_JOIN_X3_180",
104+
"dungeon_wall.IS_JOIN_X3",
105+
"",
106+
// ##############################################################################
107+
"dungeon_wall.IS_JOIN_BL2",
108+
"dungeon_wall.IS_JOIN_T180_3",
109+
"dungeon_wall.IS_JOIN_BR2",
110+
"",
111+
"dungeon_wall.IS_JOIN_BOT",
112+
"",
113+
"",
114+
"",
115+
"",
116+
"",
117+
"",
118+
"",
91119
"",
92-
"dungeon_wall_IS_JOIN_VERT",
93120
"",
94-
"dungeon_wall_IS_JOIN_X4_90",
95-
"dungeon_wall_IS_JOIN_X4",
96121
"",
97-
"dungeon_wall_IS_JOIN_X2_180",
98-
"dungeon_wall_IS_JOIN_X2_90",
99122
"",
100-
"dungeon_wall_IS_JOIN_X1_90",
101-
"dungeon_wall_IS_JOIN_X1_270",
102123
"",
103-
"dungeon_wall_IS_JOIN_X3_180",
104-
"dungeon_wall_IS_JOIN_X3",
105124
"",
106125
// ##############################################################################
107126
"",
@@ -110,36 +129,36 @@ void gfx_init_32x32(void)
110129
"",
111130
"",
112131
"",
113-
"dungeon_wall_IS_JOIN_T_1",
114-
"dungeon_wall_IS_JOIN_T_2",
132+
"dungeon_wall.IS_JOIN_T_1",
133+
"dungeon_wall.IS_JOIN_T_2",
115134
"",
116-
"dungeon_wall_IS_JOIN_T270_2",
117-
"dungeon_wall_IS_JOIN_T90_1",
135+
"dungeon_wall.IS_JOIN_T270_2",
136+
"dungeon_wall.IS_JOIN_T90_1",
118137
"",
119-
"dungeon_wall_IS_JOIN_T",
120-
"dungeon_wall_IS_JOIN_T90",
138+
"dungeon_wall.IS_JOIN_T",
139+
"dungeon_wall.IS_JOIN_T90",
121140
"",
122-
"dungeon_wall_IS_JOIN_TL",
123-
"dungeon_wall_IS_JOIN_TR",
141+
"dungeon_wall.IS_JOIN_TL",
142+
"dungeon_wall.IS_JOIN_TR",
124143
"",
125144
// ##############################################################################
126-
"dungeon_wall_IS_JOIN_LEFT",
127-
"dungeon_wall_IS_JOIN_HORIZ",
128-
"dungeon_wall_IS_JOIN_RIGHT",
145+
"dungeon_wall.IS_JOIN_LEFT",
146+
"dungeon_wall.IS_JOIN_HORIZ",
147+
"dungeon_wall.IS_JOIN_RIGHT",
129148
"",
130-
"dungeon_wall_IS_JOIN_NODE",
149+
"dungeon_wall.IS_JOIN_NODE",
131150
"",
132-
"dungeon_wall_IS_JOIN_T180_2",
133-
"dungeon_wall_IS_JOIN_T180_1",
151+
"dungeon_wall.IS_JOIN_T180_2",
152+
"dungeon_wall.IS_JOIN_T180_1",
134153
"",
135-
"dungeon_wall_IS_JOIN_T270_1",
136-
"dungeon_wall_IS_JOIN_T90_2",
154+
"dungeon_wall.IS_JOIN_T270_1",
155+
"dungeon_wall.IS_JOIN_T90_2",
137156
"",
138-
"dungeon_wall_IS_JOIN_T270",
139-
"dungeon_wall_IS_JOIN_T180",
157+
"dungeon_wall.IS_JOIN_T270",
158+
"dungeon_wall.IS_JOIN_T180",
140159
"",
141-
"dungeon_wall_IS_JOIN_BL",
142-
"dungeon_wall_IS_JOIN_BR",
160+
"dungeon_wall.IS_JOIN_BL",
161+
"dungeon_wall.IS_JOIN_BR",
143162
"",
144163
// ##############################################################################
145164
};

src/level.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//
44

55
#include "my_level.hpp"
6-
// REMOVED #include "my_ptrcheck.hpp"
76

87
Level::Level()
98
{

src/level_anim.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#include "my_game.hpp"
66
#include "my_level.hpp"
7-
// REMOVED #include "my_level_data.hpp"
8-
// REMOVED #include "my_main.hpp"
97
#include "my_tp.hpp"
108

119
void Level::anim(void)

src/level_data.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Copyright Neil McGill, goblinhack@gmail.com
33
//
44

5-
// REMOVED #include "my_level.hpp"
65
#include "my_level_data.hpp"
76
#include "my_ptrcheck.hpp"
87

src/level_display.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22
// Copyright Neil McGill, goblinhack@gmail.com
33
//
44

5-
// REMOVED #include "my_color_defs.hpp"
65
#include "my_game.hpp"
7-
// REMOVED #include "my_gl.hpp"
86
#include "my_level.hpp"
9-
// REMOVED #include "my_level_data.hpp"
10-
// REMOVED #include "my_main.hpp"
11-
// REMOVED #include "my_ptrcheck.hpp"
12-
// REMOVED #include "my_tex.hpp"
137
#include "my_tile.hpp"
14-
// REMOVED #include "my_tp.hpp"
158

169
void Level::set_display_bounds(void)
1710
{

src/level_display_dungeon.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ void Level::display_dungeon(void)
185185
for (auto y = miny; y < maxy; y++) {
186186
for (auto x = minx; x < maxx; x++) {
187187
for (auto slot = 0; slot < MAP_SLOTS; slot++) {
188+
display_dungeon_z_layer(x, y, slot, MAP_DEPTH_FLOOR, no_deco);
188189
display_dungeon_z_layer(x, y, slot, MAP_DEPTH_WALL, no_deco);
189190
}
190191
}

src/level_dungeon.cpp

+64-64
Original file line numberDiff line numberDiff line change
@@ -8,68 +8,68 @@ void Level::dungeon_create_and_place()
88
{
99
TRACE_NO_INDENT();
1010
map_set(data,
11-
"................................................................"
12-
"..x............................................................."
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-
"................................................................");
11+
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
12+
"x..............................................................x"
13+
"x..............................................................x"
14+
"x..............................................................x"
15+
"x..............................................................x"
16+
"x..............................................................x"
17+
"x..............................................................x"
18+
"x..............................................................x"
19+
"x..............................................................x"
20+
"x..............................................................x"
21+
"x..............................................................x"
22+
"x..............................................................x"
23+
"x..............................................................x"
24+
"x..............................................................x"
25+
"x..............................................................x"
26+
"x..............................................................x"
27+
"x..............................................................x"
28+
"x..............................................................x"
29+
"x..............................................................x"
30+
"x..............................................................x"
31+
"x..............................................................x"
32+
"x..............................................................x"
33+
"x..............................................................x"
34+
"x..............................................................x"
35+
"x..............................................................x"
36+
"x..............................................................x"
37+
"x..............................................................x"
38+
"x..............................................................x"
39+
"x..............................................................x"
40+
"x..............................................................x"
41+
"x..............................................................x"
42+
"x..............................................................x"
43+
"x..............................................................x"
44+
"x..............................................................x"
45+
"x..............................................................x"
46+
"x..............................................................x"
47+
"x..............................................................x"
48+
"x..............................................................x"
49+
"x..............................................................x"
50+
"x..............................................................x"
51+
"x..............................................................x"
52+
"x..............................................................x"
53+
"x..............................................................x"
54+
"x..............................................................x"
55+
"x..............................................................x"
56+
"x..............................................................x"
57+
"x..............................................................x"
58+
"x..............................................................x"
59+
"x..............................................................x"
60+
"x..............................................................x"
61+
"x..............................................................x"
62+
"x..............................................................x"
63+
"x..............................................................x"
64+
"x..............................................................x"
65+
"x..............................................................x"
66+
"x..............................................................x"
67+
"x..............................................................x"
68+
"x..............................................................x"
69+
"x..............................................................x"
70+
"x..............................................................x"
71+
"x..............................................................x"
72+
"x..............................................................x"
73+
"x..............................................................x"
74+
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
7575
}

src/level_map.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void Level::map_set(LevelDatap data, const char *in)
3333
case CHARMAP_LOCK : break;
3434
case CHARMAP_KEY : break;
3535
case CHARMAP_SECRET_DOOR : break;
36-
case CHARMAP_EMPTY : break;
36+
case CHARMAP_EMPTY : tp = tp_find("dungeon_floor"); break;
3737
default : DIE("unexpected map char '%c'", c);
3838
}
3939

src/level_player.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#include "my_game.hpp"
66
#include "my_level.hpp"
7-
// REMOVED #include "my_level_data.hpp"
8-
// REMOVED #include "my_thing.hpp"
97
#include "my_tp.hpp"
108

119
void Level::player_create_and_place()

src/level_thing.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
#include <string.h>
88

99
#include "my_level.hpp"
10-
// REMOVED #include "my_level_data.hpp"
11-
// REMOVED #include "my_main.hpp"
12-
// REMOVED #include "my_thing.hpp"
13-
// REMOVED #include "my_thing_id.hpp"
1410
#include "my_tp.hpp"
1511

1612
Thingp thing_get(LevelData *data, point p, uint8_t slot, Tpp *out)

src/level_tick.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
// Copyright Neil McGill, goblinhack@gmail.com
33
//
44

5-
// REMOVED #include "my_game.hpp"
65
#include "my_level.hpp"
7-
// REMOVED #include "my_level_data.hpp"
8-
// REMOVED #include "my_main.hpp"
9-
// REMOVED #include "my_tp.hpp"
106

117
void Level::tick(void)
128
{

0 commit comments

Comments
 (0)