Skip to content

Commit 5003e5c

Browse files
committed
Put boss info on compass instead
1 parent cf3f975 commit 5003e5c

File tree

15 files changed

+43650
-43393
lines changed

15 files changed

+43650
-43393
lines changed

ASM/build/asm_symbols.txt

Lines changed: 1445 additions & 1445 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/build/bundle.o

928 Bytes
Binary file not shown.

ASM/build/c_symbols.txt

Lines changed: 673 additions & 673 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/c/dpad.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,16 @@ void draw_dpad_and_menu_utilities() {
197197
else if (CAN_DRAW_WORLD_INFO && CFG_DPAD_DUNGEON_INFO_ENABLE) {
198198
bool shuffle_dungeons = CFG_DUNGEON_BOSS_INFO[0] > 0;
199199
bool shuffle_bosses = CFG_DUNGEON_BOSS_INFO[0] > 0;
200-
bool mixed_dungeons = CFG_DUNGEON_BOSS_INFO[0] > 1;
201-
bool mixed_bosses = CFG_DUNGEON_BOSS_INFO[0] > 1;
202-
bool mixed = mixed_dungeons || mixed_bosses;
203-
if (shuffle_dungeons || shuffle_bosses) {
204-
if (mixed) {
205-
// boss key on D-right
206-
sprite_load(db, &quest_items_sprite, 14, 1);
207-
sprite_draw(db, &quest_items_sprite, 0, left_main_dpad + 14, top_main_dpad + 2, 12, 12);
208-
}
209-
210-
// map on D-left
200+
// map on D-left
201+
if (shuffle_dungeons) {
211202
sprite_load(db, &quest_items_sprite, 16, 1);
212203
sprite_draw(db, &quest_items_sprite, 0, left_main_dpad - 11, top_main_dpad + 2, 12, 12);
213204
}
205+
// boss key on D-right
206+
if (shuffle_bosses) {
207+
sprite_load(db, &quest_items_sprite, 14, 1);
208+
sprite_draw(db, &quest_items_sprite, 0, left_main_dpad + 14, top_main_dpad + 2, 12, 12);
209+
}
214210
} else { // Main game dpad
215211
if (!CAN_USE_DPAD) {
216212
gDPSetPrimColor(db->p++, 0, 0, 0xFF, 0xFF, 0xFF, alpha * 0x46 / 0xFF);

ASM/c/dungeon_info.c

Lines changed: 82 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,13 @@ void draw_world_info(z64_disp_buf_t* db) {
206206

207207
if (!mixed) {
208208

209-
if (z64_ctxt.input[0].pad_pressed.dl) {
209+
if (z64_ctxt.input[0].pad_pressed.dl && show_dungeons) {
210210
world_display = world_display ? false : true;
211+
boss_display = false;
212+
}
213+
if (z64_ctxt.input[0].pad_pressed.dr && show_bosses) {
214+
boss_display = boss_display ? false : true;
215+
world_display = false;
211216
}
212217

213218
if (world_display) {
@@ -271,11 +276,11 @@ void draw_world_info(z64_disp_buf_t* db) {
271276
// Draw the list of dungeons entrances.
272277
uint16_t top = start_top;
273278
for (uint8_t i = 0; i < rows; i++) {
274-
gDPPipeSync(db->p++);
275279
// Skip Hideout for this menu.
276280
if (i == 10) {
277281
continue;
278282
}
283+
gDPPipeSync(db->p++);
279284
dungeon_entry_t dungeon = dungeons[i];
280285
top += font_height + padding;
281286
text_print_size(db, dungeon.name, left, top, font_width, font_height);
@@ -284,32 +289,86 @@ void draw_world_info(z64_disp_buf_t* db) {
284289
// Draw the list of dungeons interiors.
285290
if (show_dungeons) {
286291
for (uint8_t i = 0; i < rows - 1; i++) {
287-
gDPPipeSync(db->p++);
288-
if (CFG_DUNGEON_BOSS_INFO[i + 2] < 10 && !z64_file.dungeon_items[CFG_DUNGEON_BOSS_INFO[i + 2]].map) {
289-
continue;
290-
}
291292
uint16_t top = start_top + ((font_height + padding) * (i + 1)) + 1;
292-
text_print_size(db, CFG_DUNGEON_ENTRANCES[i], left_dungeon, top, font_width, font_height);
293-
294-
// If boss ER is also on, display the boss on the same line as the actual dungeon.
295-
if (show_bosses) {
293+
if (CFG_DUNGEON_BOSS_INFO[i + 2] > 10 || z64_file.dungeon_items[CFG_DUNGEON_BOSS_INFO[i + 2]].map) {
296294
gDPPipeSync(db->p++);
297-
uint16_t top = start_top + ((font_height + padding) * (i + 1));
298-
text_print_size(db, CFG_BOSSES[i], left_boss, top, font_width, font_height);
295+
text_print_size(db, CFG_DUNGEON_ENTRANCES[i], left_dungeon, top, font_width, font_height);
296+
// If boss ER is also on, display the boss on the same line as the actual dungeon.
297+
if (show_bosses) {
298+
if (CFG_DUNGEON_BOSS_INFO[i + 2] > 10 || z64_file.dungeon_items[CFG_DUNGEON_BOSS_INFO[i + 2]].compass) {
299+
gDPPipeSync(db->p++);
300+
text_print_size(db, CFG_BOSSES[i], left_boss, top, font_width, font_height);
301+
}
302+
}
299303
}
300304
}
301305
}
302-
else {
303-
if (show_bosses) {
304-
for (uint8_t i = 0; i < rows - 1; i++) {
305-
gDPPipeSync(db->p++);
306-
if (CFG_DUNGEON_BOSS_INFO[i + 2] < 10 && !z64_file.dungeon_items[CFG_DUNGEON_BOSS_INFO[i + 2]].map) {
307-
continue;
308-
}
309-
uint16_t top = start_top + ((font_height + padding) * (i + 1));
310-
text_print_size(db, CFG_BOSSES[i], left_boss, top, font_width, font_height);
311-
}
306+
}
307+
if (boss_display) {
308+
show_dungeon_info = 1;
309+
310+
// Set up dimensions
311+
int font_width = 6;
312+
int font_height = 11;
313+
int padding = 1;
314+
int rows = 10;
315+
int bg_width = 10 * 2 * font_width;
316+
int bg_height = (rows * font_height) + ((rows + 1) * padding);
317+
int bg_left = (Z64_SCREEN_WIDTH - bg_width) / 2;
318+
int bg_top = (Z64_SCREEN_HEIGHT - bg_height) / 2;
319+
320+
int start_top = bg_top + padding + 1;
321+
uint16_t left = bg_left + padding;
322+
uint16_t left_area = left + 60;
323+
324+
// Draw background
325+
gDPSetCombineMode(db->p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
326+
for (int i = 0; i < rows; i++) {
327+
uint16_t line_top = bg_top + i * (font_height + padding) + padding;
328+
gDPPipeSync(db->p++);
329+
if (i % 2) {
330+
gDPSetPrimColor(db->p++, 0, 0, 0x00, 0x00, 0x00, 0xD0);
331+
}
332+
else {
333+
gDPSetPrimColor(db->p++, 0, 0, 0x00, 0x00, 0x00, 0xDA);
334+
}
335+
gSPTextureRectangle(db->p++,
336+
bg_left<<2, line_top<<2,
337+
(bg_left + bg_width)<<2, (line_top + font_height + padding)<<2,
338+
0,
339+
0, 0,
340+
1<<10, 1<<10);
341+
}
342+
343+
gDPPipeSync(db->p++);
344+
gDPSetCombineMode(db->p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
345+
gDPSetPrimColor(db->p++, 0, 0, 120, 255, 100, 0xFF);
346+
347+
// Draw the legend at the top.
348+
text_print_size(db, "Dungeon", left, start_top, font_width, font_height);
349+
text_print_size(db, "Boss", left_area, start_top, font_width, font_height);
350+
gDPSetPrimColor(db->p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF);
351+
// Draw the list of dungeons entrances.
352+
uint16_t top = start_top;
353+
for (uint8_t i = 0; i < 13; i++) {
354+
// Skip BotW/Ice/Hideout/GTG.
355+
if (i > 7 && i < 12) {
356+
continue;
357+
}
358+
gDPPipeSync(db->p++);
359+
dungeon_entry_t dungeon = dungeons[i];
360+
top += font_height + padding;
361+
text_print_size(db, dungeon.name, left, top, font_width, font_height);
362+
}
363+
// List of bosses, located in CFG_BOSSES after the first list of 12 for the dpad left menu.
364+
for (uint8_t i = 0; i < rows - 1; i++) {
365+
boss_entry_t boss = bosses[i];
366+
if (boss.has_map && !z64_file.dungeon_items[boss.index].compass) {
367+
continue;
312368
}
369+
gDPPipeSync(db->p++);
370+
uint16_t top = start_top + ((font_height + padding) * (i + 1));
371+
text_print_size(db, CFG_BOSSES[12 + i], left_area, top, font_width, font_height);
313372
}
314373
}
315374
}
@@ -447,7 +506,7 @@ void draw_world_info(z64_disp_buf_t* db) {
447506
for (uint8_t i = 0; i < rows - 1; i++) {
448507
gDPPipeSync(db->p++);
449508
boss_entry_t boss = bosses[i];
450-
if (boss.has_map && !z64_file.dungeon_items[boss.index].map) {
509+
if (boss.has_map && !z64_file.dungeon_items[boss.index].compass) {
451510
continue;
452511
}
453512
uint16_t top = start_top + ((font_height + padding) * (i + 1));

ASM/c/dungeon_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern uint32_t CFG_DUNGEON_INFO_ENABLE;
3939
extern uint8_t CFG_DPAD_DUNGEON_INFO_ENABLE;
4040
extern char CFG_DUNGEON_BOSS_INFO[14];
4141
extern char CFG_DUNGEON_ENTRANCES[12][0x9];
42-
extern char CFG_BOSSES[12][0x9];
42+
extern char CFG_BOSSES[21][0x9];
4343

4444
static int show_dungeon_info = 0;
4545

ASM/src/config.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,9 @@ CFG_DUNGEON_BOSS_INFO:
342342
.area 12 * 0x9, 0x00
343343
CFG_DUNGEON_ENTRANCES:
344344
.endarea
345-
.area 12 * 0x9, 0x00
345+
.area 21 * 0x9, 0x00
346346
CFG_BOSSES:
347347
.endarea
348+
; Bosses are listed twice, first 12 are sorted by the same order as the dungeon entrances (including the 3 with no bosses), then 9 in the usual dungeon order.
348349

349350
.align 4

0 commit comments

Comments
 (0)