mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-04-20 14:07:17 -05:00
Add PokeShop background and reorder shop entries
This commit is contained in:
parent
b685258851
commit
08ef4fe2eb
1
Makefile
1
Makefile
|
|
@ -51,6 +51,7 @@ filesystem/logo-pkhex.sprite: MKSPRITE_FLAGS += -f RGBA32
|
|||
filesystem/logo-gbdevio.sprite: MKSPRITE_FLAGS += -f RGBA32
|
||||
filesystem/logo-nesdevwiki.sprite: MKSPRITE_FLAGS += -f RGBA32
|
||||
filesystem/menu-bg-9slice.sprite: MKSPRITE_FLAGS += -f RGBA16
|
||||
filesystem/rocketshop.sprite: MKSPRITE_FLAGS += -f RGBA32
|
||||
|
||||
pokemegb:
|
||||
$(MAKE) -C libpokemegb CC=$(N64_CC) CXX=$(N64_CXX) LD=$(N64_LD) PNG_SUPPORT=0 libpokemegb.a
|
||||
|
|
|
|||
BIN
assets/rocketshop.png
Normal file
BIN
assets/rocketshop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/rocketshop.xcf
Normal file
BIN
assets/rocketshop.xcf
Normal file
Binary file not shown.
|
|
@ -23,6 +23,8 @@ public:
|
|||
|
||||
bool handleUserInput(joypad_port_t port, const joypad_inputs_t& inputs) override;
|
||||
|
||||
void render(RDPQGraphics& gfx, const Rectangle& sceneBounds) override;
|
||||
|
||||
/**
|
||||
* This function will start the pokémon injection. and show a non-skippable "saving" dialog
|
||||
* The actual injection will be done on the next handleUserInput() call.
|
||||
|
|
@ -50,6 +52,7 @@ private:
|
|||
PokemonPartyIconFactory iconFactory_;
|
||||
ListItemFiller<VerticalList, PokeShopMenuItemData, PokeShopMenuItem, PokeShopMenuItemStyle> customListFiller_;
|
||||
DialogData diag_;
|
||||
sprite_t* backgroundImgSprite_;
|
||||
sprite_t* iconBackgroundSprite_;
|
||||
const void* pokeToInject_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2166,18 +2166,6 @@ static Gen1PokeShopEntry dummyGen1Entries[] = {};
|
|||
static Gen2PokeShopEntry dummyGen2Entries[] = {};
|
||||
|
||||
static Gen1PokeShopEntry g1_shop_red_entries[] = {
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_versionexclusive_Sandshrew,
|
||||
.price = 5000
|
||||
|
|
@ -2206,6 +2194,18 @@ static Gen1PokeShopEntry g1_shop_red_entries[] = {
|
|||
.pokemon = &g1_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_mutex_Hitmonlee,
|
||||
.price = 20000
|
||||
|
|
@ -2225,18 +2225,6 @@ static Gen1PokeShopEntry g1_shop_red_entries[] = {
|
|||
};
|
||||
|
||||
static Gen1PokeShopEntry g1_shop_green_entries[] = {
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_versionexclusive_Ekans,
|
||||
.price = 5000
|
||||
|
|
@ -2265,6 +2253,18 @@ static Gen1PokeShopEntry g1_shop_green_entries[] = {
|
|||
.pokemon = &g1_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_mutex_Hitmonlee,
|
||||
.price = 20000
|
||||
|
|
@ -2284,18 +2284,6 @@ static Gen1PokeShopEntry g1_shop_green_entries[] = {
|
|||
};
|
||||
|
||||
static Gen1PokeShopEntry g1_shop_jpn_blue_entries[] = {
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_versionexclusive_Ekans,
|
||||
.price = 5000
|
||||
|
|
@ -2324,6 +2312,18 @@ static Gen1PokeShopEntry g1_shop_jpn_blue_entries[] = {
|
|||
.pokemon = &g1_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_mutex_Hitmonlee,
|
||||
.price = 20000
|
||||
|
|
@ -2343,18 +2343,6 @@ static Gen1PokeShopEntry g1_shop_jpn_blue_entries[] = {
|
|||
};
|
||||
|
||||
static Gen1PokeShopEntry g1_shop_yellow_entries[] = {
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_versionexclusive_Weedle,
|
||||
.price = 5000
|
||||
|
|
@ -2391,6 +2379,18 @@ static Gen1PokeShopEntry g1_shop_yellow_entries[] = {
|
|||
.pokemon = &g1_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Charmander,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Squirtle,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_starter_Bulbasaur,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g1_mutex_Hitmonlee,
|
||||
.price = 20000
|
||||
|
|
@ -2410,30 +2410,6 @@ static Gen1PokeShopEntry g1_shop_yellow_entries[] = {
|
|||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_gold_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_starter_Cyndaquil,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Totodile,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Chikorita,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Charmander,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Squirtle,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Bulbasaur,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Vulpix,
|
||||
.price = 5000
|
||||
|
|
@ -2462,21 +2438,6 @@ static Gen2PokeShopEntry g2_shop_gold_entries[] = {
|
|||
.pokemon = &g2_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_silver_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_starter_Cyndaquil,
|
||||
.price = 10000
|
||||
|
|
@ -2501,6 +2462,21 @@ static Gen2PokeShopEntry g2_shop_silver_entries[] = {
|
|||
.pokemon = &g2_starter_Bulbasaur,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_silver_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Mankey,
|
||||
.price = 5000
|
||||
|
|
@ -2529,21 +2505,6 @@ static Gen2PokeShopEntry g2_shop_silver_entries[] = {
|
|||
.pokemon = &g2_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_crystal_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_starter_Cyndaquil,
|
||||
.price = 10000
|
||||
|
|
@ -2568,6 +2529,21 @@ static Gen2PokeShopEntry g2_shop_crystal_entries[] = {
|
|||
.pokemon = &g2_starter_Bulbasaur,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_crystal_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Vulpix,
|
||||
.price = 5000
|
||||
|
|
@ -2592,21 +2568,6 @@ static Gen2PokeShopEntry g2_shop_crystal_entries[] = {
|
|||
.pokemon = &g2_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_jpn_kor_gold_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_starter_Cyndaquil,
|
||||
.price = 10000
|
||||
|
|
@ -2631,6 +2592,21 @@ static Gen2PokeShopEntry g2_shop_jpn_kor_gold_entries[] = {
|
|||
.pokemon = &g2_starter_Bulbasaur,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_jpn_kor_gold_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Vulpix,
|
||||
.price = 5000
|
||||
|
|
@ -2659,21 +2635,6 @@ static Gen2PokeShopEntry g2_shop_jpn_kor_gold_entries[] = {
|
|||
.pokemon = &g2_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_jpn_kor_silver_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_starter_Cyndaquil,
|
||||
.price = 10000
|
||||
|
|
@ -2698,6 +2659,21 @@ static Gen2PokeShopEntry g2_shop_jpn_kor_silver_entries[] = {
|
|||
.pokemon = &g2_starter_Bulbasaur,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Kabuto,
|
||||
.price = 40000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Omanyte,
|
||||
.price = 40000
|
||||
}
|
||||
};
|
||||
|
||||
static Gen2PokeShopEntry g2_shop_jpn_kor_silver_entries[] = {
|
||||
{
|
||||
.pokemon = &g2_versionexclusive_Mankey,
|
||||
.price = 5000
|
||||
|
|
@ -2726,6 +2702,30 @@ static Gen2PokeShopEntry g2_shop_jpn_kor_silver_entries[] = {
|
|||
.pokemon = &g2_mutex_Eevee,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Cyndaquil,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Totodile,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Chikorita,
|
||||
.price = 10000
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Charmander,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Squirtle,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_starter_Bulbasaur,
|
||||
.price = 12500
|
||||
},
|
||||
{
|
||||
.pokemon = &g2_mutex_Tyrogue,
|
||||
.price = 12500
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ PokeShopScene::PokeShopScene(SceneDependencies& deps, void* context)
|
|||
, iconFactory_(romReader_)
|
||||
, customListFiller_(menuList_)
|
||||
, diag_()
|
||||
, backgroundImgSprite_(nullptr)
|
||||
, iconBackgroundSprite_(nullptr)
|
||||
, pokeToInject_(nullptr)
|
||||
{
|
||||
|
|
@ -34,6 +35,7 @@ PokeShopScene::~PokeShopScene()
|
|||
|
||||
void PokeShopScene::init()
|
||||
{
|
||||
backgroundImgSprite_ = sprite_load("rom://rocketshop.sprite");
|
||||
iconBackgroundSprite_ = sprite_load("rom://bg-party-icon.sprite");
|
||||
loadShopList();
|
||||
MenuScene::init();
|
||||
|
|
@ -49,6 +51,8 @@ void PokeShopScene::destroy()
|
|||
|
||||
sprite_free(iconBackgroundSprite_);
|
||||
iconBackgroundSprite_ = nullptr;
|
||||
sprite_free(backgroundImgSprite_);
|
||||
backgroundImgSprite_ = nullptr;
|
||||
}
|
||||
|
||||
bool PokeShopScene::handleUserInput(joypad_port_t port, const joypad_inputs_t& inputs)
|
||||
|
|
@ -65,6 +69,20 @@ bool PokeShopScene::handleUserInput(joypad_port_t port, const joypad_inputs_t& i
|
|||
}
|
||||
}
|
||||
|
||||
void PokeShopScene::render(RDPQGraphics& gfx, const Rectangle& sceneBounds)
|
||||
{
|
||||
// draw the background image
|
||||
if(backgroundImgSprite_)
|
||||
{
|
||||
const SpriteRenderSettings renderSettings = {
|
||||
.renderMode = SpriteRenderMode::NORMAL
|
||||
};
|
||||
gfx.drawSprite({0, 0, backgroundImgSprite_->width, backgroundImgSprite_->height}, backgroundImgSprite_, renderSettings);
|
||||
}
|
||||
|
||||
MenuScene::render(gfx, sceneBounds);
|
||||
}
|
||||
|
||||
void PokeShopScene::triggerPokemonInjection(const void* data)
|
||||
{
|
||||
pokeToInject_ = data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user