Skip to content

Commit 0c991e0

Browse files
bitdw files
still wip bros
1 parent 29a4bf5 commit 0c991e0

94 files changed

Lines changed: 6595 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile.split

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ SLIDE_TEXTURES := $(wildcard $(TEXTURE_DIR)/slide/*.png)
165165
EFFECT_TEXTURES := $(wildcard $(TEXTURE_DIR)/effect/*.png)
166166
INSIDE_TEXTURES := $(wildcard $(TEXTURE_DIR)/inside/*.png)
167167
WATER_TEXTURES := $(wildcard $(TEXTURE_DIR)/water/*.png)
168+
SKY_TEXTURES := $(wildcard $(TEXTURE_DIR)/sky/*.png)
168169
MACHINE_TEXTURES := $(wildcard $(TEXTURE_DIR)/machine/*.png)
169170
GRASS_TEXTURES := $(wildcard $(TEXTURE_DIR)/grass/*.png)
170171

@@ -178,6 +179,7 @@ $(BUILD_DIR)/bin/slide.o: $(SLIDE_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
178179
$(BUILD_DIR)/bin/effect.o: $(EFFECT_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
179180
$(BUILD_DIR)/bin/inside.o: $(INSIDE_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
180181
$(BUILD_DIR)/bin/water.o: $(WATER_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
182+
$(BUILD_DIR)/bin/sky.o: $(SKY_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
181183
$(BUILD_DIR)/bin/machine.o: $(MACHINE_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
182184
$(BUILD_DIR)/bin/grass.o: $(GRASS_TEXTURES:%.png=$(BUILD_DIR)/%.inc.c)
183185

@@ -192,6 +194,7 @@ $(BUILD_DIR)/bin/outside.elf: SEGMENT_ADDRESS := 0x09000000
192194
$(BUILD_DIR)/bin/slide.elf: SEGMENT_ADDRESS := 0x09000000
193195
$(BUILD_DIR)/bin/inside.elf: SEGMENT_ADDRESS := 0x09000000
194196
$(BUILD_DIR)/bin/water.elf: SEGMENT_ADDRESS := 0x09000000
197+
$(BUILD_DIR)/bin/sky.elf: SEGMENT_ADDRESS := 0x09000000
195198
$(BUILD_DIR)/bin/machine.elf: SEGMENT_ADDRESS := 0x09000000
196199
$(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000
197200

bin/sky.c

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#include "macros.h"
2+
#include "types.h"
3+
4+
#include "make_const_nonconst.h"
5+
6+
// 0x09000000
7+
ALIGNED8 const Texture sky_09000000[] = {
8+
#include "textures/sky/rr_textures.00000.rgba16.inc.c"
9+
};
10+
11+
// 0x09000800
12+
ALIGNED8 const Texture sky_09000800[] = {
13+
#include "textures/sky/rr_textures.00800.rgba16.inc.c"
14+
};
15+
16+
// 0x09001000
17+
ALIGNED8 const Texture sky_09001000[] = {
18+
#include "textures/sky/rr_textures.01000.rgba16.inc.c"
19+
};
20+
21+
// 0x09001800
22+
ALIGNED8 const Texture sky_09001800[] = {
23+
#include "textures/sky/rr_textures.01800.rgba16.inc.c"
24+
};
25+
26+
// 0x09002000
27+
ALIGNED8 const Texture sky_09002000[] = {
28+
#include "textures/sky/rr_textures.02000.rgba16.inc.c"
29+
};
30+
31+
// 0x09003000
32+
ALIGNED8 const Texture sky_09003000[] = {
33+
#include "textures/sky/rr_textures.03000.rgba16.inc.c"
34+
};
35+
36+
// 0x09003800
37+
ALIGNED8 const Texture sky_09003800[] = {
38+
#include "textures/sky/rr_textures.03800.rgba16.inc.c"
39+
};
40+
41+
// 0x09004800
42+
ALIGNED8 const Texture sky_09004800[] = {
43+
#include "textures/sky/rr_textures.04800.rgba16.inc.c"
44+
};
45+
46+
// 0x09005000
47+
ALIGNED8 const Texture sky_09005000[] = {
48+
#include "textures/sky/rr_textures.05000.rgba16.inc.c"
49+
};
50+
51+
// 0x09005800
52+
ALIGNED8 const Texture sky_09005800[] = {
53+
#include "textures/sky/rr_textures.05800.rgba16.inc.c"
54+
};
55+
56+
// 0x09006000
57+
ALIGNED8 const Texture sky_09006000[] = {
58+
#include "textures/sky/rr_textures.06000.rgba16.inc.c"
59+
};
60+
61+
ALIGNED8 const Texture texture_metal_hole[] = {
62+
#include "textures/sky/metal_hole.rgba16.inc.c"
63+
};
64+
65+
// 0x09007000
66+
ALIGNED8 const Texture sky_09007000[] = {
67+
#include "textures/sky/rr_textures.07000.rgba16.inc.c"
68+
};
69+
70+
// 0x09007800
71+
ALIGNED8 const Texture sky_09007800[] = {
72+
#include "textures/sky/rr_textures.07800.rgba16.inc.c"
73+
};
74+
75+
// 0x09008000
76+
ALIGNED8 const Texture sky_09008000[] = {
77+
#include "textures/sky/rr_textures.08000.rgba16.inc.c"
78+
};

include/segment_symbols.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ DECLARE_SEGMENT(fire_mio0)
7676
DECLARE_SEGMENT(spooky_mio0)
7777
DECLARE_SEGMENT(generic_mio0)
7878
DECLARE_SEGMENT(water_mio0)
79+
DECLARE_SEGMENT(sky_mio0)
7980
DECLARE_SEGMENT(slide_mio0)
8081
DECLARE_SEGMENT(cave_mio0)
8182
DECLARE_SEGMENT(machine_mio0)

levels/bitdw/0.rgba16.png

1.49 KB
Loading

levels/bitdw/1.rgba16.png

3.17 KB
Loading

levels/bitdw/2.rgba16.png

1.32 KB
Loading

levels/bitdw/3.rgba16.png

1.83 KB
Loading

levels/bitdw/areas/1/1/model.inc.c

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// 0x07002000 - 0x07002080
2+
static const Vtx bitdw_seg7_vertex_07002000[] = {
3+
{{{ 2516, -2357, 2962}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
4+
{{{ 2415, -2440, 3024}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
5+
{{{ 2517, -2439, 3023}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
6+
{{{ 2413, -2358, 2962}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
7+
{{{ -3038, -2766, 2960}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
8+
{{{ -3139, -2849, 3023}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
9+
{{{ -3037, -2848, 3022}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
10+
{{{ -3141, -2768, 2961}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
11+
};
12+
13+
// 0x07002080 - 0x070020C8
14+
static const Gfx bitdw_seg7_dl_07002080[] = {
15+
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_metal_hole),
16+
gsDPLoadSync(),
17+
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
18+
gsSPVertex(bitdw_seg7_vertex_07002000, 8, 0),
19+
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
20+
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
21+
gsSPEndDisplayList(),
22+
};
23+
24+
// 0x070020C8 - 0x07002138
25+
const Gfx bitdw_seg7_dl_070020C8[] = {
26+
gsDPPipeSync(),
27+
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
28+
gsSPClearGeometryMode(G_LIGHTING),
29+
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
30+
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
31+
gsDPTileSync(),
32+
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
33+
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
34+
gsSPDisplayList(bitdw_seg7_dl_07002080),
35+
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
36+
gsDPPipeSync(),
37+
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
38+
gsSPSetGeometryMode(G_LIGHTING),
39+
gsSPEndDisplayList(),
40+
};

0 commit comments

Comments
 (0)