From 265fd20253e34adfc7ca1e9ff3c08a70224d98f6 Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Sat, 24 Aug 2019 16:35:52 -0400 Subject: Rename old_charmap and move from graphics-de/unused to graphics/debug. The debug battle text is in English on German ROMs and Japanese on English ROMs. Additionally, old_charmap.bin held the actual text. Weird. I also choose the English when DEBUG_TRANSLATE is on. --- src/data/graphics.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/data') diff --git a/src/data/graphics.c b/src/data/graphics.c index ce2f02b2c..4d076e083 100644 --- a/src/data/graphics.c +++ b/src/data/graphics.c @@ -10,10 +10,18 @@ const u8 gMonBackPic_CircledQuestionMark[] = INCBIN_U8("graphics/pokemon/circled const u16 gMonPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/normal.gbapal.lz"); const u16 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/shiny.gbapal.lz"); -// japanese table and bunch of stuff -const u8 gUnusedOldCharmap_Gfx_lz[] = INCBIN_U8("graphics/unused/old_charmap.4bpp.lz"); -const u8 gUnusedOldCharmap_Tilemap_lz[] = INCBIN_U8("graphics/unused/old_charmap.bin.lz"); -const u16 gUnusedOldCharmap_Pal_lz[] = INCBIN_U16("graphics/unused/old_charmap.gbapal.lz"); +// The test menu debug battle tileset. This uses the old Crystal charmap and +// rendering method (it uses tiles instead of text). +// Oddly, the English version is in Japanese and the German version is in English. +#if DEBUG_TRANSLATE || GERMAN +const u8 gDebugBattleCharmap_Gfx_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.4bpp.lz"); +const u8 gDebugBattleCharmap_Tilemap_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.bin.lz"); +const u8 gDebugBattleCharmap_Pal_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.gbapal.lz"); +#else +const u8 gDebugBattleCharmap_Gfx_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_jp.4bpp.lz"); +const u8 gDebugBattleCharmap_Tilemap_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_jp.bin.lz"); +const u8 gDebugBattleCharmap_Pal_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_jp.gbapal.lz"); +#endif const u8 gSmokescreenImpactTiles[] = INCBIN_U8("graphics/battle_anims/sprites/smokescreen_impact.4bpp.lz"); const u16 gSmokescreenImpactPalette[] = INCBIN_U16("graphics/battle_anims/sprites/smokescreen_impact.gbapal.lz"); -- cgit v1.2.3 From fc2926aa469de176403d0ccaba3ad503c65ff98e Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 30 Sep 2019 19:18:06 -0400 Subject: add fishing rod groups to encounter json --- src/data/wild_encounters.json | 16 ++++++++++++---- src/data/wild_encounters.json.txt | 14 +++++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) (limited to 'src/data') diff --git a/src/data/wild_encounters.json b/src/data/wild_encounters.json index 9adbc28de..37cffbca9 100644 --- a/src/data/wild_encounters.json +++ b/src/data/wild_encounters.json @@ -8,25 +8,33 @@ "type": "land_mons", "encounter_rates": [ 20, 20, 10, 10, 10, 10, 5, 5, 4, 4, 1, 1 - ] + ], + "groups": {} }, { "type": "water_mons", "encounter_rates": [ 60, 30, 5, 4, 1 - ] + ], + "groups": {} }, { "type": "rock_smash_mons", "encounter_rates": [ 60, 30, 5, 4, 1 - ] + ], + "groups": {} }, { "type": "fishing_mons", "encounter_rates": [ 70, 30, 60, 20, 20, 40, 40, 15, 4, 1 - ] + ], + "groups": { + "old_rod": [0, 1], + "good_rod": [2, 3, 4], + "super_rod": [5, 6, 7, 8, 9] + } } ], "encounters": [ diff --git a/src/data/wild_encounters.json.txt b/src/data/wild_encounters.json.txt index de8396dd6..5e0286b61 100644 --- a/src/data/wild_encounters.json.txt +++ b/src/data/wild_encounters.json.txt @@ -3,14 +3,26 @@ ## for wild_encounter_group in wild_encounter_groups {% if wild_encounter_group.for_maps %} ## for wild_encounter_field in wild_encounter_group.fields +{% if isEmpty(wild_encounter_field.groups) %} ## for encounter_rate in wild_encounter_field.encounter_rates -{% if trackVar(encounter_rate, 100) %} +{% if loop.index == 0 %} #define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} {{ encounter_rate }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ subtract(loop.index, 1) }} + {{ encounter_rate }}{% endif %} {{ setVarInt(wild_encounter_field.type, loop.index) }} ## endfor #define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_TOTAL (ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ getVar(wild_encounter_field.type) }}) +{% else %} +## for field_subgroup_key, field_subgroup_subarray in wild_encounter_field.groups +## for field_subgroup_index in field_subgroup_subarray +{% if loop.index == 0 %} +#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ field_subgroup_index }} {{ at(wild_encounter_field.encounter_rates, field_subgroup_index) }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ field_subgroup_index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ getVar("previous_slot") }} + {{ at(wild_encounter_field.encounter_rates, field_subgroup_index) }}{% endif %}{{ setVarInt(concat(wild_encounter_field.type, field_subgroup_key), field_subgroup_index) }}{{ setVarInt("previous_slot", field_subgroup_index) }} +## endfor +#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_TOTAL (ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ getVar(concat(wild_encounter_field.type, field_subgroup_key)) }}) +## endfor +{% endif %} ## endfor {% endif %} + + ## for encounter in wild_encounter_group.encounters {% if contains(encounter.base_label, "Sapphire") %}#ifdef SAPPHIRE {% else if contains(encounter.base_label, "Ruby") %}#ifdef RUBY{% endif %} -- cgit v1.2.3 From 0bc41d1fd304e205e0db23bf502dfcbc7f1142bc Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 14 Oct 2019 13:05:07 -0400 Subject: remove empty groups from wild encounter fields json objects --- src/data/wild_encounters.json | 9 +++------ src/data/wild_encounters.json.txt | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src/data') diff --git a/src/data/wild_encounters.json b/src/data/wild_encounters.json index 37cffbca9..46d6feea4 100644 --- a/src/data/wild_encounters.json +++ b/src/data/wild_encounters.json @@ -8,22 +8,19 @@ "type": "land_mons", "encounter_rates": [ 20, 20, 10, 10, 10, 10, 5, 5, 4, 4, 1, 1 - ], - "groups": {} + ] }, { "type": "water_mons", "encounter_rates": [ 60, 30, 5, 4, 1 - ], - "groups": {} + ] }, { "type": "rock_smash_mons", "encounter_rates": [ 60, 30, 5, 4, 1 - ], - "groups": {} + ] }, { "type": "fishing_mons", diff --git a/src/data/wild_encounters.json.txt b/src/data/wild_encounters.json.txt index 5e0286b61..c6bbdd34e 100644 --- a/src/data/wild_encounters.json.txt +++ b/src/data/wild_encounters.json.txt @@ -3,7 +3,7 @@ ## for wild_encounter_group in wild_encounter_groups {% if wild_encounter_group.for_maps %} ## for wild_encounter_field in wild_encounter_group.fields -{% if isEmpty(wild_encounter_field.groups) %} +{% if not existsIn(wild_encounter_field, "groups") %} ## for encounter_rate in wild_encounter_field.encounter_rates {% if loop.index == 0 %} #define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} {{ encounter_rate }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ subtract(loop.index, 1) }} + {{ encounter_rate }}{% endif %} {{ setVarInt(wild_encounter_field.type, loop.index) }} -- cgit v1.2.3