Dump LeafGreen encounters
This commit is contained in:
+12675
-132
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,8 @@
|
||||
|
||||
|
||||
## for encounter in wild_encounter_group.encounters
|
||||
{% if contains(encounter.base_label, "LeafGreen") %}#ifdef LEAFGREEN
|
||||
{% else if contains(encounter.base_label, "FireRed") %}#ifdef FIRERED{% endif %}
|
||||
{% if existsIn(encounter, "land_mons") %}
|
||||
const struct WildPokemon {{ encounter.base_label }}_LandMons[] =
|
||||
{
|
||||
@@ -64,11 +66,15 @@ const struct WildPokemon {{ encounter.base_label }}_FishingMons[] =
|
||||
|
||||
const struct WildPokemonInfo {{ encounter.base_label }}_FishingMonsInfo = { {{encounter.fishing_mons.encounter_rate}}, {{ encounter.base_label }}_FishingMons };
|
||||
{% endif %}
|
||||
#endif
|
||||
|
||||
## endfor
|
||||
|
||||
const struct WildPokemonHeader {{ wild_encounter_group.label }}[] =
|
||||
{
|
||||
## for encounter in wild_encounter_group.encounters
|
||||
{% if contains(encounter.base_label, "LeafGreen") %}#ifdef LEAFGREEN
|
||||
{% else if contains(encounter.base_label, "FireRed") %}#ifdef FIRERED{% endif %}
|
||||
{
|
||||
.mapGroup = {% if wild_encounter_group.for_maps %}MAP_GROUP({{ removePrefix(encounter.map, "MAP_") }}){% else %}0{% endif %},
|
||||
.mapNum = {% if wild_encounter_group.for_maps %}MAP_NUM({{ removePrefix(encounter.map, "MAP_") }}){% else %}{{ loop.index1 }}{% endif %},
|
||||
@@ -77,6 +83,7 @@ const struct WildPokemonHeader {{ wild_encounter_group.label }}[] =
|
||||
.rockSmashMonsInfo = {% if existsIn(encounter, "rock_smash_mons") %}&{{ encounter.base_label }}_RockSmashMonsInfo{% else %}NULL{% endif %},
|
||||
.fishingMonsInfo = {% if existsIn(encounter, "fishing_mons") %}&{{ encounter.base_label }}_FishingMonsInfo{% else %}NULL{% endif %},
|
||||
},
|
||||
#endif
|
||||
## endfor
|
||||
{
|
||||
.mapGroup = MAP_GROUP(UNDEFINED),
|
||||
|
||||
+12
-4
@@ -162,14 +162,21 @@ static const struct SpriteTemplate sSpriteTemplate_FlameOrLeaf_State1 = {
|
||||
};
|
||||
|
||||
#if defined(FIRERED)
|
||||
#define sOamData_LG_83BF950 sOamData_FlameOrLeaf
|
||||
static const struct SpriteTemplate sSpriteTemplate_FlameOrLeaf_State0 = {
|
||||
.tileTag = 1,
|
||||
.paletteTag = 0,
|
||||
.oam = &sOamData_FlameOrLeaf,
|
||||
.anims = sSpriteAnimTable_FlameOrLeaf,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
#elif defined(LEAFGREEN)
|
||||
static const struct OamData sOamData_LG_83BF950 = {
|
||||
.shape = SPRITE_SHAPE(32x16),
|
||||
.size = SPRITE_SIZE(32x16),
|
||||
.priority = 3
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_FlameOrLeaf_State0 = {
|
||||
.tileTag = 1,
|
||||
@@ -180,8 +187,9 @@ static const struct SpriteTemplate sSpriteTemplate_FlameOrLeaf_State0 = {
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct OamData sOamData_UnknownTemptySprite = {
|
||||
static const struct OamData sOamData_UnknownEmptySprite = {
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.shape = ST_OAM_V_RECTANGLE,
|
||||
.size = ST_OAM_SIZE_3,
|
||||
@@ -193,7 +201,7 @@ static const struct OamData sOamData_UnknownTemptySprite = {
|
||||
static const struct SpriteTemplate sUnknownEmptySprite = {
|
||||
.tileTag = 2,
|
||||
.paletteTag = 2,
|
||||
.oam = &sOamData_UnknownTemptySprite,
|
||||
.oam = &sOamData_UnknownEmptySprite,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
|
||||
@@ -39,6 +39,13 @@ int main(int argc, char *argv[])
|
||||
return "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from " + jsonfilepath +" and Inja template " + templateFilepath + "\n//\n";
|
||||
});
|
||||
|
||||
env.add_callback("contains", 2, [](Arguments& args) {
|
||||
string word = args.at(0)->get<string>();
|
||||
string check = args.at(1)->get<string>();
|
||||
|
||||
return word.find(check) != std::string::npos;
|
||||
});
|
||||
|
||||
env.add_callback("subtract", 2, [](Arguments& args) {
|
||||
int minuend = args.at(0)->get<int>();
|
||||
int subtrahend = args.at(1)->get<int>();
|
||||
|
||||
Reference in New Issue
Block a user