mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-10 01:54:46 -06:00
Merge c4b6b6674f into bfada94b9f
This commit is contained in:
commit
b6e7e55ff6
BIN
bin/Icons/ui/home/256/file-solid.png
Normal file
BIN
bin/Icons/ui/home/256/file-solid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
bin/Icons/ui/home/256/folder-solid.png
Normal file
BIN
bin/Icons/ui/home/256/folder-solid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
BIN
bin/Icons/ui/home/256/usb-solid.png
Normal file
BIN
bin/Icons/ui/home/256/usb-solid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
bin/Icons/ui/home/32/file-solid.png
Normal file
BIN
bin/Icons/ui/home/32/file-solid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 521 B |
BIN
bin/Icons/ui/home/32/folder-solid.png
Normal file
BIN
bin/Icons/ui/home/32/folder-solid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 442 B |
BIN
bin/Icons/ui/home/32/usb-solid.png
Normal file
BIN
bin/Icons/ui/home/32/usb-solid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 509 B |
@ -510,6 +510,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||
RSX/Overlays/Network/overlay_recvmessage_dialog.cpp
|
||||
RSX/Overlays/Network/overlay_sendmessage_dialog.cpp
|
||||
RSX/Overlays/Trophies/overlay_trophy_list_dialog.cpp
|
||||
RSX/Overlays/USBDevices/overlay_skylander_dialog.cpp
|
||||
RSX/Overlays/overlays.cpp
|
||||
RSX/Overlays/overlay_animated_icon.cpp
|
||||
RSX/Overlays/overlay_animation.cpp
|
||||
|
||||
@ -6,6 +6,489 @@ LOG_CHANNEL(skylander_log, "skylander");
|
||||
|
||||
sky_portal g_skyportal;
|
||||
|
||||
const std::map<const std::pair<const u16, const u16>, const std::string> list_skylanders = {
|
||||
{{0, 0x0000}, "Whirlwind"},
|
||||
{{0, 0x1801}, "Series 2 Whirlwind"},
|
||||
{{0, 0x1C02}, "Polar Whirlwind"},
|
||||
{{0, 0x2805}, "Horn Blast Whirlwind"},
|
||||
{{0, 0x3810}, "Eon's Elite Whirlwind"},
|
||||
{{1, 0x0000}, "Sonic Boom"},
|
||||
{{1, 0x1801}, "Series 2 Sonic Boom"},
|
||||
{{2, 0x0000}, "Warnado"},
|
||||
{{2, 0x2206}, "LightCore Warnado"},
|
||||
{{3, 0x0000}, "Lightning Rod"},
|
||||
{{3, 0x1801}, "Series 2 Lightning Rod"},
|
||||
{{4, 0x0000}, "Bash"},
|
||||
{{4, 0x1801}, "Series 2 Bash"},
|
||||
{{5, 0x0000}, "Terrafin"},
|
||||
{{5, 0x1801}, "Series 2 Terrafin"},
|
||||
{{5, 0x2805}, "Knockout Terrafin"},
|
||||
{{5, 0x3810}, "Eon's Elite Terrafin"},
|
||||
{{6, 0x0000}, "Dino Rang"},
|
||||
{{6, 0x4810}, "Eon's Elite Dino Rang"},
|
||||
{{7, 0x0000}, "Prism Break"},
|
||||
{{7, 0x1801}, "Series 2 Prism Break"},
|
||||
{{7, 0x2805}, "Hyper Beam Prism Break"},
|
||||
{{7, 0x1206}, "LightCore Prism Break"},
|
||||
{{8, 0x0000}, "Sunburn"},
|
||||
{{9, 0x0000}, "Eruptor"},
|
||||
{{9, 0x1801}, "Series 2 Eruptor"},
|
||||
{{9, 0x2C02}, "Volcanic Eruptor"},
|
||||
{{9, 0x2805}, "Lava Barf Eruptor"},
|
||||
{{9, 0x1206}, "LightCore Eruptor"},
|
||||
{{9, 0x3810}, "Eon's Elite Eruptor"},
|
||||
{{10, 0x0000}, "Ignitor"},
|
||||
{{10, 0x1801}, "Series 2 Ignitor"},
|
||||
{{10, 0x1C03}, "Legendary Ignitor"},
|
||||
{{11, 0x0000}, "Flameslinger"},
|
||||
{{11, 0x1801}, "Series 2 Flameslinger"},
|
||||
{{12, 0x0000}, "Zap"},
|
||||
{{12, 0x1801}, "Series 2 Zap"},
|
||||
{{13, 0x0000}, "Wham Shell"},
|
||||
{{13, 0x2206}, "LightCore Wham Shell"},
|
||||
{{14, 0x0000}, "Gill Grunt"},
|
||||
{{14, 0x1801}, "Series 2 Gill Grunt"},
|
||||
{{14, 0x2805}, "Anchors Away Gill Grunt"},
|
||||
{{14, 0x3805}, "Tidal Wave Gill Grunt"},
|
||||
{{14, 0x3810}, "Eon's Elite Gill Grunt"},
|
||||
{{15, 0x0000}, "Slam Bam"},
|
||||
{{15, 0x1801}, "Series 2 Slam Bam"},
|
||||
{{15, 0x1C03}, "Legendary Slam Bam"},
|
||||
{{15, 0x4810}, "Eon's Elite Slam Bam"},
|
||||
{{16, 0x0000}, "Spyro"},
|
||||
{{16, 0x1801}, "Series 2 Spyro"},
|
||||
{{16, 0x2C02}, "Dark Mega Ram Spyro"},
|
||||
{{16, 0x2805}, "Mega Ram Spyro"},
|
||||
{{16, 0x3810}, "Eon's Elite Spyro"},
|
||||
{{17, 0x0000}, "Voodood"},
|
||||
{{17, 0x4810}, "Eon's Elite Voodood"},
|
||||
{{18, 0x0000}, "Double Trouble"},
|
||||
{{18, 0x1801}, "Series 2 Double Trouble"},
|
||||
{{18, 0x1C02}, "Royal Double Trouble"},
|
||||
{{19, 0x0000}, "Trigger Happy"},
|
||||
{{19, 0x1801}, "Series 2 Trigger Happy"},
|
||||
{{19, 0x2C02}, "Springtime Trigger Happy"},
|
||||
{{19, 0x2805}, "Big Bang Trigger Happy"},
|
||||
{{19, 0x3810}, "Eon's Elite Trigger Happy"},
|
||||
{{20, 0x0000}, "Drobot"},
|
||||
{{20, 0x1801}, "Series 2 Drobot"},
|
||||
{{20, 0x1206}, "LightCore Drobot"},
|
||||
{{21, 0x0000}, "Drill Sergeant"},
|
||||
{{21, 0x1801}, "Series 2 Drill Sergeant"},
|
||||
{{22, 0x0000}, "Boomer"},
|
||||
{{22, 0x4810}, "Eon's Elite Boomer"},
|
||||
{{23, 0x0000}, "Wrecking Ball"},
|
||||
{{23, 0x1801}, "Series 2 Wrecking Ball"},
|
||||
{{24, 0x0000}, "Camo"},
|
||||
{{24, 0x2805}, "Thorn Horn Camo"},
|
||||
{{25, 0x0000}, "Zook"},
|
||||
{{25, 0x1801}, "Series 2 Zook"},
|
||||
{{25, 0x4810}, "Eon's Elite Zook"},
|
||||
{{26, 0x0000}, "Stealth Elf"},
|
||||
{{26, 0x1801}, "Series 2 Stealth Elf"},
|
||||
{{26, 0x2C02}, "Dark Stealth Elf"},
|
||||
{{26, 0x1C03}, "Legendary Stealth Elf"},
|
||||
{{26, 0x2805}, "Ninja Stealth Elf"},
|
||||
{{26, 0x3810}, "Eon's Elite Stealth Elf"},
|
||||
{{27, 0x0000}, "Stump Smash"},
|
||||
{{27, 0x1801}, "Series 2 Stump Smash"},
|
||||
{{28, 0x0000}, "Dark Spyro"},
|
||||
{{29, 0x0000}, "Hex"},
|
||||
{{29, 0x1801}, "Series 2 Hex"},
|
||||
{{29, 0x1206}, "LightCore Hex"},
|
||||
{{30, 0x0000}, "Chop Chop"},
|
||||
{{30, 0x1801}, "Series 2 Chop Chop"},
|
||||
{{30, 0x2805}, "Twin Blade Chop Chop"},
|
||||
{{30, 0x3810}, "Eon's Elite Chop Chop"},
|
||||
{{31, 0x0000}, "Ghost Roaster"},
|
||||
{{31, 0x4810}, "Eon's Elite Ghost Roaster"},
|
||||
{{32, 0x0000}, "Cynder"},
|
||||
{{32, 0x1801}, "Series 2 Cynder"},
|
||||
{{32, 0x2805}, "Phantom Cynder"},
|
||||
{{100, 0x0000}, "Jet Vac"},
|
||||
{{100, 0x1403}, "Legendary Jet Vac"},
|
||||
{{100, 0x2805}, "Turbo Jet Vac"},
|
||||
{{100, 0x3805}, "Full Blast Jet Vac"},
|
||||
{{100, 0x1206}, "LightCore Jet Vac"},
|
||||
{{101, 0x0000}, "Swarm"},
|
||||
{{102, 0x0000}, "Crusher"},
|
||||
{{102, 0x1602}, "Granite Crusher"},
|
||||
{{103, 0x0000}, "Flashwing"},
|
||||
{{103, 0x1402}, "Jade Flash Wing"},
|
||||
{{103, 0x2206}, "LightCore Flashwing"},
|
||||
{{104, 0x0000}, "Hot Head"},
|
||||
{{105, 0x0000}, "Hot Dog"},
|
||||
{{105, 0x1402}, "Molten Hot Dog"},
|
||||
{{105, 0x2805}, "Fire Bone Hot Dog"},
|
||||
{{106, 0x0000}, "Chill"},
|
||||
{{106, 0x1603}, "Legendary Chill"},
|
||||
{{106, 0x2805}, "Blizzard Chill"},
|
||||
{{106, 0x1206}, "LightCore Chill"},
|
||||
{{107, 0x0000}, "Thumpback"},
|
||||
{{108, 0x0000}, "Pop Fizz"},
|
||||
{{108, 0x1402}, "Punch Pop Fizz"},
|
||||
{{108, 0x3C02}, "Love Potion Pop Fizz"},
|
||||
{{108, 0x2805}, "Super Gulp Pop Fizz"},
|
||||
{{108, 0x3805}, "Fizzy Frenzy Pop Fizz"},
|
||||
{{108, 0x1206}, "LightCore Pop Fizz"},
|
||||
{{109, 0x0000}, "Ninjini"},
|
||||
{{109, 0x1602}, "Scarlet Ninjini"},
|
||||
{{110, 0x0000}, "Bouncer"},
|
||||
{{110, 0x1603}, "Legendary Bouncer"},
|
||||
{{111, 0x0000}, "Sprocket"},
|
||||
{{111, 0x2805}, "Heavy Duty Sprocket"},
|
||||
{{112, 0x0000}, "Tree Rex"},
|
||||
{{112, 0x1602}, "Gnarly Tree Rex"},
|
||||
{{113, 0x0000}, "Shroomboom"},
|
||||
{{113, 0x3805}, "Sure Shot Shroomboom"},
|
||||
{{113, 0x1206}, "LightCore Shroomboom"},
|
||||
{{114, 0x0000}, "Eye Brawl"},
|
||||
{{115, 0x0000}, "Fright Rider"},
|
||||
{{200, 0x0000}, "Anvil Rain"},
|
||||
{{201, 0x0000}, "Hidden Treasure"},
|
||||
{{201, 0x2000}, "Platinum Hidden Treasure"},
|
||||
{{202, 0x0000}, "Healing Elixir"},
|
||||
{{203, 0x0000}, "Ghost Pirate Swords"},
|
||||
{{204, 0x0000}, "Time Twist Hourglass"},
|
||||
{{205, 0x0000}, "Sky Iron Shield"},
|
||||
{{206, 0x0000}, "Winged Boots"},
|
||||
{{207, 0x0000}, "Sparx the Dragonfly"},
|
||||
{{208, 0x1206}, "Dragonfire Cannon"},
|
||||
{{208, 0x1602}, "Golden Dragonfire Cannon"},
|
||||
{{209, 0x1206}, "Scorpion Striker"},
|
||||
{{210, 0x3002}, "Biter's Bane"},
|
||||
{{210, 0x3008}, "Sorcerous Skull"},
|
||||
{{210, 0x300B}, "Axe of Illusion"},
|
||||
{{210, 0x300E}, "Arcane Hourglass"},
|
||||
{{210, 0x3012}, "Spell Slapper"},
|
||||
{{210, 0x3014}, "Rune Rocket"},
|
||||
{{211, 0x3001}, "Tidal Tiki"},
|
||||
{{211, 0x3002}, "Wet Walter"},
|
||||
{{211, 0x3006}, "Flood Flask"},
|
||||
{{211, 0x3406}, "Legendary Flood Flask"},
|
||||
{{211, 0x3007}, "Soaking Staff"},
|
||||
{{211, 0x300B}, "Aqua Axe"},
|
||||
{{211, 0x3016}, "Frost Helm"},
|
||||
{{212, 0x3003}, "Breezy Bird"},
|
||||
{{212, 0x3006}, "Drafty Decanter"},
|
||||
{{212, 0x300D}, "Tempest Timer"},
|
||||
{{212, 0x3010}, "Cloudy Cobra"},
|
||||
{{212, 0x3011}, "Storm Warning"},
|
||||
{{212, 0x3018}, "Cyclone Saber"},
|
||||
{{213, 0x3004}, "Spirit Sphere"},
|
||||
{{213, 0x3404}, "Legendary Spirit Sphere"},
|
||||
{{213, 0x3008}, "Spectral Skull"},
|
||||
{{213, 0x3408}, "Legendary Spectral Skull"},
|
||||
{{213, 0x300B}, "Haunted Hatchet"},
|
||||
{{213, 0x300C}, "Grim Gripper"},
|
||||
{{213, 0x3010}, "Spooky Snake"},
|
||||
{{213, 0x3017}, "Dream Piercer"},
|
||||
{{214, 0x3000}, "Tech Totem"},
|
||||
{{214, 0x3007}, "Automatic Angel"},
|
||||
{{214, 0x3009}, "Factory Flower"},
|
||||
{{214, 0x300C}, "Grabbing Gadget"},
|
||||
{{214, 0x3016}, "Makers Mana"},
|
||||
{{214, 0x301A}, "Topsy Techy"},
|
||||
{{215, 0x3005}, "Eternal Flame"},
|
||||
{{215, 0x3009}, "Fire Flower"},
|
||||
{{215, 0x3011}, "Scorching Stopper"},
|
||||
{{215, 0x3012}, "Searing Spinner"},
|
||||
{{215, 0x3017}, "Spark Spear"},
|
||||
{{215, 0x301B}, "Blazing Belch"},
|
||||
{{216, 0x3000}, "Banded Boulder"},
|
||||
{{216, 0x3003}, "Rock Hawk"},
|
||||
{{216, 0x300A}, "Slag Hammer"},
|
||||
{{216, 0x300E}, "Dust Of Time"},
|
||||
{{216, 0x3013}, "Spinning Sandstorm"},
|
||||
{{216, 0x301A}, "Rubble Trouble"},
|
||||
{{217, 0x3003}, "Oak Eagle"},
|
||||
{{217, 0x3005}, "Emerald Energy"},
|
||||
{{217, 0x300A}, "Weed Whacker"},
|
||||
{{217, 0x3010}, "Seed Serpent"},
|
||||
{{217, 0x3018}, "Jade Blade"},
|
||||
{{217, 0x301B}, "Shrub Shrieker"},
|
||||
{{218, 0x3000}, "Dark Dagger"},
|
||||
{{218, 0x3014}, "Shadow Spider"},
|
||||
{{218, 0x301A}, "Ghastly Grimace"},
|
||||
{{219, 0x3000}, "Shining Ship"},
|
||||
{{219, 0x300F}, "Heavenly Hawk"},
|
||||
{{219, 0x301B}, "Beam Scream"},
|
||||
{{220, 0x301E}, "Kaos Trap"},
|
||||
{{220, 0x351F}, "Ultimate Kaos Trap"},
|
||||
{{230, 0x0000}, "Hand of Fate"},
|
||||
{{230, 0x3403}, "Legendary Hand of Fate"},
|
||||
{{231, 0x0000}, "Piggy Bank"},
|
||||
{{232, 0x0000}, "Rocket Ram"},
|
||||
{{233, 0x0000}, "Tiki Speaky"},
|
||||
{{300, 0x0000}, "Dragon’s Peak"},
|
||||
{{301, 0x0000}, "Empire of Ice"},
|
||||
{{302, 0x0000}, "Pirate Seas"},
|
||||
{{303, 0x0000}, "Darklight Crypt"},
|
||||
{{304, 0x0000}, "Volcanic Vault"},
|
||||
{{305, 0x0000}, "Mirror of Mystery"},
|
||||
{{306, 0x0000}, "Nightmare Express"},
|
||||
{{307, 0x0000}, "Sunscraper Spire"},
|
||||
{{308, 0x0000}, "Midnight Museum"},
|
||||
{{404, 0x0000}, "Legendary Bash"},
|
||||
{{416, 0x0000}, "Legendary Spyro"},
|
||||
{{419, 0x0000}, "Legendary Trigger Happy"},
|
||||
{{430, 0x0000}, "Legendary Chop Chop"},
|
||||
{{450, 0x0000}, "Gusto"},
|
||||
{{451, 0x0000}, "Thunderbolt"},
|
||||
{{452, 0x0000}, "Fling Kong"},
|
||||
{{453, 0x0000}, "Blades"},
|
||||
{{453, 0x3403}, "Legendary Blades"},
|
||||
{{454, 0x0000}, "Wallop"},
|
||||
{{455, 0x0000}, "Head Rush"},
|
||||
{{455, 0x3402}, "Nitro Head Rush"},
|
||||
{{456, 0x0000}, "Fist Bump"},
|
||||
{{457, 0x0000}, "Rocky Roll"},
|
||||
{{458, 0x0000}, "Wildfire"},
|
||||
{{458, 0x3402}, "Dark Wildfire"},
|
||||
{{459, 0x0000}, "Ka Boom"},
|
||||
{{460, 0x0000}, "Trail Blazer"},
|
||||
{{461, 0x0000}, "Torch"},
|
||||
{{462, 0x0000}, "Snap Shot"},
|
||||
{{462, 0x3402}, "Dark Snap Shot"},
|
||||
{{463, 0x0000}, "Lob Star"},
|
||||
{{463, 0x3402}, "Winterfest Lob-Star"},
|
||||
{{464, 0x0000}, "Flip Wreck"},
|
||||
{{465, 0x0000}, "Echo"},
|
||||
{{466, 0x0000}, "Blastermind"},
|
||||
{{467, 0x0000}, "Enigma"},
|
||||
{{468, 0x0000}, "Deja Vu"},
|
||||
{{468, 0x3403}, "Legendary Deja Vu"},
|
||||
{{469, 0x0000}, "Cobra Candabra"},
|
||||
{{469, 0x3402}, "King Cobra Cadabra"},
|
||||
{{470, 0x0000}, "Jawbreaker"},
|
||||
{{470, 0x3403}, "Legendary Jawbreaker"},
|
||||
{{471, 0x0000}, "Gearshift"},
|
||||
{{472, 0x0000}, "Chopper"},
|
||||
{{473, 0x0000}, "Tread Head"},
|
||||
{{474, 0x0000}, "Bushwack"},
|
||||
{{474, 0x3403}, "Legendary Bushwack"},
|
||||
{{475, 0x0000}, "Tuff Luck"},
|
||||
{{476, 0x0000}, "Food Fight"},
|
||||
{{476, 0x3402}, "Dark Food Fight"},
|
||||
{{477, 0x0000}, "High Five"},
|
||||
{{478, 0x0000}, "Krypt King"},
|
||||
{{478, 0x3402}, "Nitro Krypt King"},
|
||||
{{479, 0x0000}, "Short Cut"},
|
||||
{{480, 0x0000}, "Bat Spin"},
|
||||
{{481, 0x0000}, "Funny Bone"},
|
||||
{{482, 0x0000}, "Knight Light"},
|
||||
{{483, 0x0000}, "Spotlight"},
|
||||
{{484, 0x0000}, "Knight Mare"},
|
||||
{{485, 0x0000}, "Blackout"},
|
||||
{{502, 0x0000}, "Bop"},
|
||||
{{505, 0x0000}, "Terrabite"},
|
||||
{{506, 0x0000}, "Breeze"},
|
||||
{{508, 0x0000}, "Pet Vac"},
|
||||
{{508, 0x3402}, "Power Punch Pet Vac"},
|
||||
{{507, 0x0000}, "Weeruptor"},
|
||||
{{507, 0x3402}, "Eggcellent Weeruptor"},
|
||||
{{509, 0x0000}, "Small Fry"},
|
||||
{{510, 0x0000}, "Drobit"},
|
||||
{{519, 0x0000}, "Trigger Snappy"},
|
||||
{{526, 0x3000}, "Whisper Elf"},
|
||||
{{540, 0x3000}, "Barkley"},
|
||||
{{540, 0x3402}, "Gnarly Barkley"},
|
||||
{{541, 0x3000}, "Thumpling"},
|
||||
{{514, 0x0000}, "Gill Runt"},
|
||||
{{542, 0x3000}, "Mini-Jini"},
|
||||
{{503, 0x0000}, "Spry"},
|
||||
{{504, 0x0000}, "Hijinx"},
|
||||
{{543, 0x1000}, "Eye Small"},
|
||||
{{601, 0x0000}, "King Pen"},
|
||||
{{602, 0x0000}, "Tri-Tip"},
|
||||
{{603, 0x0000}, "Chopscotch"},
|
||||
{{604, 0x0000}, "Boom Bloom"},
|
||||
{{605, 0x0000}, "Pit Boss"},
|
||||
{{606, 0x0000}, "Barbella"},
|
||||
{{607, 0x0000}, "Air Strike"},
|
||||
{{608, 0x0000}, "Ember"},
|
||||
{{609, 0x0000}, "Ambush"},
|
||||
{{610, 0x0000}, "Dr. Krankcase"},
|
||||
{{611, 0x0000}, "Hood Sickle"},
|
||||
{{612, 0x0000}, "Tae Kwon Crow"},
|
||||
{{613, 0x0000}, "Golden Queen"},
|
||||
{{614, 0x0000}, "Wolfgang"},
|
||||
{{615, 0x0000}, "Pain-Yatta"},
|
||||
{{616, 0x0000}, "Mysticat"},
|
||||
{{617, 0x0000}, "Starcast"},
|
||||
{{618, 0x0000}, "Buckshot"},
|
||||
{{619, 0x0000}, "Aurora"},
|
||||
{{620, 0x0000}, "Flare Wolf"},
|
||||
{{621, 0x0000}, "Chompy Mage"},
|
||||
{{622, 0x0000}, "Bad Juju"},
|
||||
{{623, 0x0000}, "Grave Clobber"},
|
||||
{{624, 0x0000}, "Blaster-Tron"},
|
||||
{{625, 0x0000}, "Ro-Bow"},
|
||||
{{626, 0x0000}, "Chain Reaction"},
|
||||
{{627, 0x0000}, "Kaos"},
|
||||
{{628, 0x0000}, "Wild Storm"},
|
||||
{{629, 0x0000}, "Tidepool"},
|
||||
{{630, 0x0000}, "Crash Bandicoot"},
|
||||
{{631, 0x0000}, "Dr. Neo Cortex"},
|
||||
{{1000, 0x0000}, "Boom Jet (Bottom)"},
|
||||
{{1001, 0x0000}, "Free Ranger (Bottom)"},
|
||||
{{1001, 0x2403}, "Legendary Free Ranger (Bottom)"},
|
||||
{{1002, 0x0000}, "Rubble Rouser (Bottom)"},
|
||||
{{1003, 0x0000}, "Doom Stone (Bottom)"},
|
||||
{{1004, 0x0000}, "Blast Zone (Bottom)"},
|
||||
{{1004, 0x2402}, "Dark Blast Zone (Bottom)"},
|
||||
{{1005, 0x0000}, "Fire Kraken (Bottom)"},
|
||||
{{1005, 0x2402}, "Jade Fire Kraken (Bottom)"},
|
||||
{{1006, 0x0000}, "Stink Bomb (Bottom)"},
|
||||
{{1007, 0x0000}, "Grilla Drilla (Bottom)"},
|
||||
{{1008, 0x0000}, "Hoot Loop (Bottom)"},
|
||||
{{1008, 0x2402}, "Enchanted Hoot Loop (Bottom)"},
|
||||
{{1009, 0x0000}, "Trap Shadow (Bottom)"},
|
||||
{{1010, 0x0000}, "Magna Charge (Bottom)"},
|
||||
{{1010, 0x2402}, "Nitro Magna Charge (Bottom)"},
|
||||
{{1011, 0x0000}, "Spy Rise (Bottom)"},
|
||||
{{1012, 0x0000}, "Night Shift (Bottom)"},
|
||||
{{1012, 0x2403}, "Legendary Night Shift (Bottom)"},
|
||||
{{1013, 0x0000}, "Rattle Shake (Bottom)"},
|
||||
{{1013, 0x2402}, "Quick Draw Rattle Shake (Bottom)"},
|
||||
{{1014, 0x0000}, "Freeze Blade (Bottom)"},
|
||||
{{1014, 0x2402}, "Nitro Freeze Blade (Bottom)"},
|
||||
{{1015, 0x0000}, "Wash Buckler (Bottom)"},
|
||||
{{1015, 0x2402}, "Dark Wash Buckler (Bottom)"},
|
||||
{{2000, 0x0000}, "Boom Jet (Top)"},
|
||||
{{2001, 0x0000}, "Free Ranger (Top)"},
|
||||
{{2001, 0x2403}, "Legendary Free Ranger (Top)"},
|
||||
{{2002, 0x0000}, "Rubble Rouser (Top)"},
|
||||
{{2003, 0x0000}, "Doom Stone (Top)"},
|
||||
{{2004, 0x0000}, "Blast Zone (Top)"},
|
||||
{{2004, 0x2402}, "Dark Blast Zone (Top)"},
|
||||
{{2005, 0x0000}, "Fire Kraken (Top)"},
|
||||
{{2005, 0x2402}, "Jade Fire Kraken (Top)"},
|
||||
{{2006, 0x0000}, "Stink Bomb (Top)"},
|
||||
{{2007, 0x0000}, "Grilla Drilla (Top)"},
|
||||
{{2008, 0x0000}, "Hoot Loop (Top)"},
|
||||
{{2008, 0x2402}, "Enchanted Hoot Loop (Top)"},
|
||||
{{2009, 0x0000}, "Trap Shadow (Top)"},
|
||||
{{2010, 0x0000}, "Magna Charge (Top)"},
|
||||
{{2010, 0x2402}, "Nitro Magna Charge (Top)"},
|
||||
{{2011, 0x0000}, "Spy Rise (Top)"},
|
||||
{{2012, 0x0000}, "Night Shift (Top)"},
|
||||
{{2012, 0x2403}, "Legendary Night Shift (Top)"},
|
||||
{{2013, 0x0000}, "Rattle Shake (Top)"},
|
||||
{{2013, 0x2402}, "Quick Draw Rattle Shake (Top)"},
|
||||
{{2014, 0x0000}, "Freeze Blade (Top)"},
|
||||
{{2014, 0x2402}, "Nitro Freeze Blade (Top)"},
|
||||
{{2015, 0x0000}, "Wash Buckler (Top)"},
|
||||
{{2015, 0x2402}, "Dark Wash Buckler (Top)"},
|
||||
{{3000, 0x0000}, "Scratch"},
|
||||
{{3001, 0x0000}, "Pop Thorn"},
|
||||
{{3002, 0x0000}, "Slobber Tooth"},
|
||||
{{3002, 0x2402}, "Dark Slobber Tooth"},
|
||||
{{3003, 0x0000}, "Scorp"},
|
||||
{{3004, 0x0000}, "Fryno"},
|
||||
{{3004, 0x3805}, "Hog Wild Fryno"},
|
||||
{{3005, 0x0000}, "Smolderdash"},
|
||||
{{3005, 0x2206}, "LightCore Smolderdash"},
|
||||
{{3006, 0x0000}, "Bumble Blast"},
|
||||
{{3006, 0x2402}, "Jolly Bumble Blast"},
|
||||
{{3006, 0x2206}, "LightCore Bumble Blast"},
|
||||
{{3007, 0x0000}, "Zoo Lou"},
|
||||
{{3007, 0x2403}, "Legendary Zoo Lou"},
|
||||
{{3008, 0x0000}, "Dune Bug"},
|
||||
{{3009, 0x0000}, "Star Strike"},
|
||||
{{3009, 0x2602}, "Enchanted Star Strike"},
|
||||
{{3009, 0x2206}, "LightCore Star Strike"},
|
||||
{{3010, 0x0000}, "Countdown"},
|
||||
{{3010, 0x2402}, "Kickoff Countdown"},
|
||||
{{3010, 0x2206}, "LightCore Countdown"},
|
||||
{{3011, 0x0000}, "Wind Up"},
|
||||
{{3012, 0x0000}, "Roller Brawl"},
|
||||
{{3013, 0x0000}, "Grim Creeper"},
|
||||
{{3013, 0x2603}, "Legendary Grim Creeper"},
|
||||
{{3013, 0x2206}, "LightCore Grim Creeper"},
|
||||
{{3014, 0x0000}, "Rip Tide"},
|
||||
{{3015, 0x0000}, "Punk Shock"},
|
||||
{{3200, 0x2000}, "Battle Hammer"},
|
||||
{{3201, 0x2000}, "Sky Diamond"},
|
||||
{{3202, 0x2000}, "Platinum Sheep"},
|
||||
{{3203, 0x2000}, "Groove Machine"},
|
||||
{{3204, 0x0000}, "UFO Hat"},
|
||||
{{3300, 0x2000}, "Sheep Wreck Island"},
|
||||
{{3301, 0x2000}, "Tower of Time"},
|
||||
{{3302, 0x2206}, "Fiery Forge"},
|
||||
{{3303, 0x2206}, "Arkeyan Crossbow"},
|
||||
{{3220, 0x0000}, "Jet Stream"},
|
||||
{{3221, 0x0000}, "Tomb Buggy"},
|
||||
{{3222, 0x0000}, "Reef Ripper"},
|
||||
{{3223, 0x0000}, "Burn Cycle"},
|
||||
{{3224, 0x0000}, "Hot Streak"},
|
||||
{{3224, 0x4402}, "Dark Hot Streak"},
|
||||
{{3224, 0x4004}, "E3 Hot Streak"},
|
||||
{{3224, 0x441E}, "Golden Hot Streak"},
|
||||
{{3225, 0x0000}, "Shark Tank"},
|
||||
{{3226, 0x0000}, "Thump Truck"},
|
||||
{{3227, 0x0000}, "Crypt Crusher"},
|
||||
{{3228, 0x0000}, "Stealth Stinger"},
|
||||
{{3228, 0x4402}, "Nitro Stealth Stinger"},
|
||||
{{3231, 0x0000}, "Dive Bomber"},
|
||||
{{3231, 0x4402}, "Spring Ahead Dive Bomber"},
|
||||
{{3232, 0x0000}, "Sky Slicer"},
|
||||
//{{3233, 0x0000}, "Clown Cruiser (Nintendo Only)"},
|
||||
//{{3233, 0x4402}, "Dark Clown Cruiser (Nintendo Only)"},
|
||||
{{3234, 0x0000}, "Gold Rusher"},
|
||||
{{3234, 0x4402}, "Power Blue Gold Rusher"},
|
||||
{{3235, 0x0000}, "Shield Striker"},
|
||||
{{3236, 0x0000}, "Sun Runner"},
|
||||
{{3236, 0x4403}, "Legendary Sun Runner"},
|
||||
{{3237, 0x0000}, "Sea Shadow"},
|
||||
{{3237, 0x4402}, "Dark Sea Shadow"},
|
||||
{{3238, 0x0000}, "Splatter Splasher"},
|
||||
{{3238, 0x4402}, "Power Blue Splatter Splasher"},
|
||||
{{3239, 0x0000}, "Soda Skimmer"},
|
||||
{{3239, 0x4402}, "Nitro Soda Skimmer"},
|
||||
//{{3240, 0x0000}, "Barrel Blaster (Nintendo Only)"},
|
||||
//{{3240, 0x4402}, "Dark Barrel Blaster (Nintendo Only)"},
|
||||
{{3241, 0x0000}, "Buzz Wing"},
|
||||
{{3400, 0x0000}, "Fiesta"},
|
||||
{{3400, 0x4515}, "Frightful Fiesta"},
|
||||
{{3401, 0x0000}, "High Volt"},
|
||||
{{3402, 0x0000}, "Splat"},
|
||||
{{3402, 0x4502}, "Power Blue Splat"},
|
||||
{{3406, 0x0000}, "Stormblade"},
|
||||
{{3411, 0x0000}, "Smash Hit"},
|
||||
{{3411, 0x4502}, "Steel Plated Smash Hit"},
|
||||
{{3412, 0x0000}, "Spitfire"},
|
||||
{{3412, 0x4502}, "Dark Spitfire"},
|
||||
{{3413, 0x0000}, "Hurricane Jet Vac"},
|
||||
{{3413, 0x4503}, "Legendary Hurricane Jet Vac"},
|
||||
{{3414, 0x0000}, "Double Dare Trigger Happy"},
|
||||
{{3414, 0x4502}, "Power Blue Double Dare Trigger Happy"},
|
||||
{{3415, 0x0000}, "Super Shot Stealth Elf"},
|
||||
{{3415, 0x4502}, "Dark Super Shot Stealth Elf"},
|
||||
{{3416, 0x0000}, "Shark Shooter Terrafin"},
|
||||
{{3417, 0x0000}, "Bone Bash Roller Brawl"},
|
||||
{{3417, 0x4503}, "Legendary Bone Bash Roller Brawl"},
|
||||
{{3420, 0x0000}, "Big Bubble Pop Fizz"},
|
||||
{{3420, 0x450E}, "Birthday Bash Big Bubble Pop Fizz"},
|
||||
{{3421, 0x0000}, "Lava Lance Eruptor"},
|
||||
{{3422, 0x0000}, "Deep Dive Gill Grunt"},
|
||||
//{{3423, 0x0000}, "Turbo Charge Donkey Kong (Nintendo Only)"},
|
||||
//{{3423, 0x4502}, "Dark Turbo Charge Donkey Kong (Nintendo Only)"},
|
||||
//{{3424, 0x0000}, "Hammer Slam Bowser (Nintendo Only)"},
|
||||
//{{3424, 0x4502}, "Dark Hammer Slam Bowser (Nintendo Only)"},
|
||||
{{3425, 0x0000}, "Dive-Clops"},
|
||||
{{3425, 0x450E}, "Missile-Tow Dive-Clops"},
|
||||
{{3426, 0x0000}, "Astroblast"},
|
||||
{{3426, 0x4503}, "Legendary Astroblast"},
|
||||
{{3427, 0x0000}, "Nightfall"},
|
||||
{{3428, 0x0000}, "Thrillipede"},
|
||||
{{3428, 0x450D}, "Eggcited Thrillipede"},
|
||||
{{3500, 0x0000}, "Sky Trophy"},
|
||||
{{3501, 0x0000}, "Land Trophy"},
|
||||
{{3502, 0x0000}, "Sea Trophy"},
|
||||
{{3503, 0x0000}, "Kaos Trophy"},
|
||||
};
|
||||
|
||||
void skylander::save()
|
||||
{
|
||||
if (!sky_file)
|
||||
@ -75,7 +558,7 @@ void sky_portal::get_status(u8* reply_buf)
|
||||
|
||||
u16 status = 0;
|
||||
|
||||
for (int i = 7; i >= 0; i--)
|
||||
for (int i = MAX_SKYLANDERS - 1; i >= 0; i--)
|
||||
{
|
||||
auto& s = skylanders[i];
|
||||
|
||||
@ -147,13 +630,15 @@ bool sky_portal::remove_skylander(u8 sky_num)
|
||||
thesky.queued_status.push(2);
|
||||
thesky.queued_status.push(0);
|
||||
thesky.sky_file.close();
|
||||
::at32(ui_skylanders, thesky.ui_slot) = std::nullopt;
|
||||
thesky.ui_slot = 0xFF;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 sky_portal::load_skylander(u8* buf, fs::file in_file)
|
||||
u8 sky_portal::load_skylander(u8 ui_slot, u8* buf, fs::file in_file)
|
||||
{
|
||||
std::lock_guard lock(sky_mutex);
|
||||
|
||||
@ -161,7 +646,7 @@ u8 sky_portal::load_skylander(u8* buf, fs::file in_file)
|
||||
u8 found_slot = 0xFF;
|
||||
|
||||
// mimics spot retaining on the portal
|
||||
for (u8 i = 0; i < 8; i++)
|
||||
for (u8 i = 0; i < MAX_SKYLANDERS; i++)
|
||||
{
|
||||
if ((skylanders[i].status & 1) == 0)
|
||||
{
|
||||
@ -180,6 +665,7 @@ u8 sky_portal::load_skylander(u8* buf, fs::file in_file)
|
||||
|
||||
ensure(found_slot != 0xFF);
|
||||
|
||||
::at32(ui_skylanders, ui_slot) = std::make_tuple(found_slot, reinterpret_cast<le_t<u16>&>(buf[0x10]), reinterpret_cast<le_t<u16>&>(buf[0x1C]));
|
||||
skylander& thesky = skylanders[found_slot];
|
||||
memcpy(thesky.data.data(), buf, thesky.data.size());
|
||||
thesky.sky_file = std::move(in_file);
|
||||
@ -187,10 +673,17 @@ u8 sky_portal::load_skylander(u8* buf, fs::file in_file)
|
||||
thesky.queued_status.push(3);
|
||||
thesky.queued_status.push(1);
|
||||
thesky.last_id = sky_serial;
|
||||
thesky.ui_slot = ui_slot;
|
||||
|
||||
return found_slot;
|
||||
}
|
||||
|
||||
std::optional<std::tuple<u8, u16, u16>> sky_portal::get_skylander(u8 ui_slot) const
|
||||
{
|
||||
std::lock_guard lock(sky_mutex);
|
||||
return ::at32(ui_skylanders, ui_slot);
|
||||
}
|
||||
|
||||
usb_device_skylander::usb_device_skylander(const std::array<u8, 7>& location)
|
||||
: usb_device_emulated(location)
|
||||
{
|
||||
@ -285,7 +778,7 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
|
||||
ensure(buf_size == 3 || buf_size == 32);
|
||||
|
||||
const u8 sky_num = buf[1] & 0xF;
|
||||
ensure(sky_num < 8);
|
||||
ensure(sky_num < MAX_SKYLANDERS);
|
||||
const u8 block = buf[2];
|
||||
ensure(block < 0x40);
|
||||
|
||||
@ -321,7 +814,7 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
|
||||
ensure(buf_size == 19 || buf_size == 32);
|
||||
|
||||
const u8 sky_num = buf[1] & 0xF;
|
||||
ensure(sky_num < 8);
|
||||
ensure(sky_num < MAX_SKYLANDERS);
|
||||
const u8 block = buf[2];
|
||||
ensure(block < 0x40);
|
||||
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
|
||||
#include "Emu/Io/usb_device.h"
|
||||
#include "Utilities/mutex.h"
|
||||
#include <optional>
|
||||
#include <queue>
|
||||
|
||||
constexpr auto MAX_SKYLANDERS = 8;
|
||||
|
||||
struct skylander
|
||||
{
|
||||
fs::file sky_file;
|
||||
@ -11,9 +14,12 @@ struct skylander
|
||||
std::queue<u8> queued_status;
|
||||
std::array<u8, 0x40 * 0x10> data{};
|
||||
u32 last_id = 0;
|
||||
u8 ui_slot = 0xFF;
|
||||
void save();
|
||||
};
|
||||
|
||||
extern const std::map<const std::pair<const u16, const u16>, const std::string> list_skylanders;
|
||||
|
||||
class sky_portal
|
||||
{
|
||||
public:
|
||||
@ -26,16 +32,20 @@ public:
|
||||
void write_block(u8 sky_num, u8 block, const u8* to_write_buf, u8* reply_buf);
|
||||
|
||||
bool remove_skylander(u8 sky_num);
|
||||
u8 load_skylander(u8* buf, fs::file in_file);
|
||||
u8 load_skylander(u8 ui_slot, u8* buf, fs::file in_file);
|
||||
std::optional<std::tuple<u8, u16, u16>> get_skylander(u8 ui_slot) const;
|
||||
|
||||
bool is_active() const { return activated; }
|
||||
|
||||
protected:
|
||||
shared_mutex sky_mutex;
|
||||
mutable shared_mutex sky_mutex;
|
||||
|
||||
bool activated = true;
|
||||
bool activated = false;
|
||||
u8 interrupt_counter = 0;
|
||||
u8 r = 0, g = 0, b = 0;
|
||||
|
||||
skylander skylanders[8];
|
||||
std::array<skylander, MAX_SKYLANDERS> skylanders {};
|
||||
std::array<std::optional<std::tuple<u8, u16, u16>>, MAX_SKYLANDERS> ui_skylanders {};
|
||||
};
|
||||
|
||||
extern sky_portal g_skyportal;
|
||||
|
||||
@ -51,6 +51,12 @@ namespace rsx::overlays::home_menu
|
||||
return "sliders-solid.png";
|
||||
case fa_icon::settings_gauge:
|
||||
return "gauge-solid.png";
|
||||
case fa_icon::usb:
|
||||
return "usb-solid.png";
|
||||
case fa_icon::file:
|
||||
return "file-solid.png";
|
||||
case fa_icon::folder:
|
||||
return "folder-solid.png";
|
||||
case fa_icon::bug:
|
||||
return "bug-solid.png";
|
||||
}
|
||||
|
||||
@ -25,6 +25,9 @@ namespace rsx::overlays::home_menu
|
||||
gamepad,
|
||||
settings_sliders,
|
||||
settings_gauge,
|
||||
usb,
|
||||
file,
|
||||
folder,
|
||||
bug,
|
||||
};
|
||||
|
||||
|
||||
@ -5,10 +5,12 @@
|
||||
#include "overlay_home_menu_savestate.h"
|
||||
#include "Emu/RSX/Overlays/FriendsList/overlay_friends_list_dialog.h"
|
||||
#include "Emu/RSX/Overlays/Trophies/overlay_trophy_list_dialog.h"
|
||||
#include "Emu/RSX/Overlays/USBDevices/overlay_skylander_dialog.h"
|
||||
#include "Emu/RSX/Overlays/overlay_manager.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/Cell/Modules/sceNpTrophy.h"
|
||||
#include "Emu/Io/Skylander.h"
|
||||
|
||||
extern atomic_t<bool> g_user_asked_for_recording;
|
||||
|
||||
@ -96,6 +98,24 @@ namespace rsx
|
||||
});
|
||||
}
|
||||
|
||||
if (g_skyportal.is_active())
|
||||
{
|
||||
add_item(home_menu::fa_icon::usb, get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_MANAGER), [](pad_button btn) -> page_navigation
|
||||
{
|
||||
if (btn != pad_button::cross) return page_navigation::stay;
|
||||
|
||||
rsx_log.notice("User selected devices in home menu");
|
||||
Emu.CallFromMainThread([]()
|
||||
{
|
||||
if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
|
||||
{
|
||||
manager->create<rsx::overlays::skylander_dialog>()->show();
|
||||
}
|
||||
});
|
||||
return page_navigation::stay;
|
||||
});
|
||||
}
|
||||
|
||||
add_item(home_menu::fa_icon::screenshot, get_localized_string(localized_string_id::HOME_MENU_SCREENSHOT), [](pad_button btn) -> page_navigation
|
||||
{
|
||||
if (btn != pad_button::cross) return page_navigation::stay;
|
||||
|
||||
532
rpcs3/Emu/RSX/Overlays/USBDevices/overlay_skylander_dialog.cpp
Normal file
532
rpcs3/Emu/RSX/Overlays/USBDevices/overlay_skylander_dialog.cpp
Normal file
@ -0,0 +1,532 @@
|
||||
#include "stdafx.h"
|
||||
#include "../overlay_manager.h"
|
||||
#include "overlay_skylander_dialog.h"
|
||||
#include "Emu/Io/Skylander.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/VFS.h"
|
||||
#include "Utilities/File.h"
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
namespace overlays
|
||||
{
|
||||
static constexpr u16 sky_list_y = 85;
|
||||
static constexpr u16 sky_list_h = 540;
|
||||
|
||||
static std::string last_skylander_path = "";
|
||||
|
||||
skylander_dialog::skylander_list_entry::skylander_list_entry(std::string_view name)
|
||||
{
|
||||
std::unique_ptr<overlay_element> label_text = std::make_unique<label>(name);
|
||||
|
||||
label_text->set_size(130, 30);
|
||||
label_text->set_font("Arial", 16);
|
||||
label_text->set_wrap_text(true);
|
||||
label_text->back_color.a = 0.f;
|
||||
|
||||
this->pack_padding = 15;
|
||||
add_element(label_text);
|
||||
}
|
||||
|
||||
skylander_dialog::skylander_dialog()
|
||||
{
|
||||
m_allow_input_on_pause = true;
|
||||
|
||||
m_dim_background = std::make_unique<overlay_element>();
|
||||
m_dim_background->set_size(virtual_width, virtual_height);
|
||||
m_dim_background->back_color.a = 0.9f;
|
||||
|
||||
m_description = std::make_unique<label>();
|
||||
m_description->set_font("Arial", 20);
|
||||
m_description->set_pos(20, 37);
|
||||
m_description->set_text(get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_MANAGER));
|
||||
m_description->auto_resize();
|
||||
m_description->back_color.a = 0.f;
|
||||
|
||||
m_load_button = std::make_unique<image_button>();
|
||||
m_load_button->set_text(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_LOAD);
|
||||
m_load_button->set_image_resource(resource_config::standard_image_resource::cross);
|
||||
m_load_button->set_size(120, 30);
|
||||
m_load_button->set_pos(180, sky_list_y + sky_list_h + 20);
|
||||
m_load_button->set_font("Arial", 16);
|
||||
|
||||
m_clear_button = std::make_unique<image_button>();
|
||||
m_clear_button->set_text(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_CLEAR);
|
||||
m_clear_button->set_image_resource(resource_config::standard_image_resource::square);
|
||||
m_clear_button->set_size(120, 30);
|
||||
m_clear_button->set_pos(360, sky_list_y + sky_list_h + 20);
|
||||
m_clear_button->set_font("Arial", 16);
|
||||
|
||||
// m_create_button = std::make_unique<image_button>();
|
||||
// m_create_button->set_text(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_CREATE);
|
||||
// m_create_button->set_image_resource(resource_config::standard_image_resource::triangle);
|
||||
// m_create_button->set_size(120, 30);
|
||||
// m_create_button->set_pos(540, sky_list_y + sky_list_h + 20);
|
||||
// m_create_button->set_font("Arial", 16);
|
||||
|
||||
fade_animation.duration_sec = 0.15f;
|
||||
|
||||
return_code = selection_code::canceled;
|
||||
}
|
||||
|
||||
void skylander_dialog::update(u64 timestamp_us)
|
||||
{
|
||||
if (fade_animation.active)
|
||||
{
|
||||
fade_animation.update(timestamp_us);
|
||||
}
|
||||
}
|
||||
|
||||
void skylander_dialog::on_button_pressed(pad_button button_press, bool is_auto_repeat)
|
||||
{
|
||||
if (fade_animation.active)
|
||||
return;
|
||||
|
||||
bool close_dialog = false;
|
||||
|
||||
switch (button_press)
|
||||
{
|
||||
case pad_button::circle:
|
||||
play_sound(sound_effect::cancel);
|
||||
close_dialog = true;
|
||||
break;
|
||||
case pad_button::cross:
|
||||
// load
|
||||
load_skylander(m_list->get_selected_index());
|
||||
break;
|
||||
case pad_button::square:
|
||||
// clear
|
||||
clear_skylander(m_list->get_selected_index());
|
||||
break;
|
||||
case pad_button::triangle:
|
||||
// create
|
||||
break;
|
||||
case pad_button::dpad_up:
|
||||
case pad_button::ls_up:
|
||||
m_list->select_previous();
|
||||
break;
|
||||
case pad_button::dpad_down:
|
||||
case pad_button::ls_down:
|
||||
m_list->select_next();
|
||||
break;
|
||||
default:
|
||||
rsx_log.trace("[ui] Button %d pressed", static_cast<u8>(button_press));
|
||||
break;
|
||||
}
|
||||
|
||||
if (close_dialog)
|
||||
{
|
||||
fade_animation.current = color4f(1.f);
|
||||
fade_animation.end = color4f(0.f);
|
||||
fade_animation.active = true;
|
||||
|
||||
fade_animation.on_finish = [this]
|
||||
{
|
||||
close(true, true);
|
||||
};
|
||||
}
|
||||
// Play a sound unless this is a fast auto repeat which would induce a nasty noise
|
||||
else if (!is_auto_repeat || m_auto_repeat_ms_interval >= m_auto_repeat_ms_interval_default)
|
||||
{
|
||||
play_sound(sound_effect::cursor);
|
||||
}
|
||||
}
|
||||
|
||||
compiled_resource skylander_dialog::get_compiled()
|
||||
{
|
||||
if (!visible)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
compiled_resource result;
|
||||
result.add(m_dim_background->get_compiled());
|
||||
if (m_list_dirty.exchange(false))
|
||||
{
|
||||
reload();
|
||||
}
|
||||
if (m_list)
|
||||
{
|
||||
result.add(m_list->get_compiled());
|
||||
}
|
||||
result.add(m_description->get_compiled());
|
||||
result.add(m_load_button->get_compiled());
|
||||
result.add(m_clear_button->get_compiled());
|
||||
// result.add(m_create_button->get_compiled());
|
||||
|
||||
fade_animation.apply(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void skylander_dialog::show()
|
||||
{
|
||||
visible = false;
|
||||
|
||||
fade_animation.current = color4f(0.f);
|
||||
fade_animation.end = color4f(1.f);
|
||||
fade_animation.active = true;
|
||||
|
||||
visible = true;
|
||||
|
||||
const auto notify = std::make_shared<atomic_t<u32>>(0);
|
||||
auto& overlayman = g_fxo->get<display_manager>();
|
||||
|
||||
overlayman.attach_thread_input(
|
||||
uid, "Skylander dialog",
|
||||
[notify]()
|
||||
{
|
||||
*notify = true;
|
||||
notify->notify_one();
|
||||
});
|
||||
|
||||
while (!Emu.IsStopped() && !*notify)
|
||||
{
|
||||
notify->wait(0, atomic_wait_timeout{1'000'000});
|
||||
}
|
||||
}
|
||||
|
||||
void skylander_dialog::reload()
|
||||
{
|
||||
const s32 selected_index = m_list ? m_list->get_selected_index() : 0;
|
||||
|
||||
std::vector<std::unique_ptr<overlay_element>> entries;
|
||||
for (u8 sky_slot = 0; sky_slot < MAX_SKYLANDERS; ++sky_slot)
|
||||
{
|
||||
if (const auto& slot_infos = g_skyportal.get_skylander(sky_slot))
|
||||
{
|
||||
const auto& [portal_slot, sky_id, sky_var] = slot_infos.value();
|
||||
const auto found_sky = list_skylanders.find(std::make_pair(sky_id, sky_var));
|
||||
if (found_sky != list_skylanders.cend())
|
||||
{
|
||||
entries.emplace_back(std::make_unique<skylander_list_entry>(found_sky->second));
|
||||
}
|
||||
else
|
||||
{
|
||||
entries.emplace_back(std::make_unique<skylander_list_entry>(get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_UNKNOWN) + fmt::format(" (Id:%d Var:%d)", sky_id, sky_var)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entries.emplace_back(std::make_unique<skylander_list_entry>(get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_NO_SKYLANDER)));
|
||||
}
|
||||
}
|
||||
|
||||
// Recreate list
|
||||
if (m_list)
|
||||
{
|
||||
status_flags |= status_bits::invalidate_image_cache;
|
||||
}
|
||||
|
||||
m_list = std::make_unique<list_view>(virtual_width - 2 * 20, sky_list_h);
|
||||
m_list->set_pos(20, sky_list_y);
|
||||
m_list->set_cancel_only(true);
|
||||
|
||||
for (auto& entry : entries)
|
||||
{
|
||||
m_list->add_entry(entry);
|
||||
}
|
||||
|
||||
if (!m_list->m_items.empty())
|
||||
{
|
||||
m_list->select_entry(selected_index);
|
||||
}
|
||||
|
||||
m_description->set_text(get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_MANAGER));
|
||||
m_description->auto_resize();
|
||||
}
|
||||
|
||||
void skylander_dialog::clear_skylander(u8 sky_slot)
|
||||
{
|
||||
ensure(sky_slot < MAX_SKYLANDERS);
|
||||
|
||||
if (const auto& slot_infos = g_skyportal.get_skylander(sky_slot))
|
||||
{
|
||||
const auto& [cur_slot, id, var] = slot_infos.value();
|
||||
if (g_skyportal.remove_skylander(cur_slot))
|
||||
{
|
||||
m_list_dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void skylander_dialog::load_skylander(u8 slot)
|
||||
{
|
||||
ensure(slot < MAX_SKYLANDERS);
|
||||
|
||||
Emu.CallFromMainThread([this, slot]()
|
||||
{
|
||||
if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
|
||||
{
|
||||
manager->create<rsx::overlays::skylander_load_dialog>(slot)->show([this](s32 status)
|
||||
{
|
||||
if (status == selection_code::ok)
|
||||
m_list_dirty = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
skylander_load_dialog::skylander_file_list_entry::skylander_file_list_entry(skylander_file_type type, const std::string& file_name)
|
||||
: file_name(file_name), type(type)
|
||||
{
|
||||
if (type == skylander_file_type::folder)
|
||||
{
|
||||
icon_data = rsx::overlays::resource_config::load_icon("home/32/folder-solid.png");
|
||||
}
|
||||
else
|
||||
{
|
||||
icon_data = rsx::overlays::resource_config::load_icon("home/32/file-solid.png");
|
||||
}
|
||||
auto image = std::make_unique<image_view>(30, 30);
|
||||
image->set_raw_image(icon_data.get());
|
||||
image->set_padding(4, 4, 4, 4);
|
||||
|
||||
auto label_text = std::make_unique<label>(file_name);
|
||||
label_text->set_size(400, 30);
|
||||
label_text->set_font("Arial", 16);
|
||||
label_text->set_wrap_text(true);
|
||||
label_text->back_color.a = 0.f;
|
||||
|
||||
this->pack_padding = 15;
|
||||
this->add_element(image);
|
||||
this->add_element(label_text);
|
||||
}
|
||||
|
||||
skylander_load_dialog::skylander_load_dialog(u8 slot) : slot(slot)
|
||||
{
|
||||
m_allow_input_on_pause = true;
|
||||
|
||||
m_dim_background = std::make_unique<overlay_element>();
|
||||
m_dim_background->set_size(virtual_width, virtual_height);
|
||||
m_dim_background->back_color.a = 0.9f;
|
||||
|
||||
m_description = std::make_unique<label>();
|
||||
m_description->set_font("Arial", 20);
|
||||
m_description->set_pos(20, 37);
|
||||
m_description->set_text(get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_LOAD));
|
||||
m_description->auto_resize();
|
||||
m_description->back_color.a = 0.f;
|
||||
|
||||
fade_animation.duration_sec = 0.15f;
|
||||
|
||||
return_code = selection_code::canceled;
|
||||
}
|
||||
|
||||
void skylander_load_dialog::update(u64 timestamp_us)
|
||||
{
|
||||
if (fade_animation.active)
|
||||
{
|
||||
fade_animation.update(timestamp_us);
|
||||
}
|
||||
}
|
||||
|
||||
void skylander_load_dialog::on_button_pressed(pad_button button_press, bool is_auto_repeat)
|
||||
{
|
||||
if (fade_animation.active)
|
||||
return;
|
||||
|
||||
bool close_dialog = false;
|
||||
|
||||
switch (button_press)
|
||||
{
|
||||
case pad_button::circle:
|
||||
play_sound(sound_effect::cancel);
|
||||
close_dialog = true;
|
||||
break;
|
||||
case pad_button::cross:
|
||||
// load
|
||||
play_sound(sound_effect::accept);
|
||||
if (m_list && !m_list->m_items.empty())
|
||||
{
|
||||
const auto selected_entry = static_cast<const skylander_file_list_entry*>(m_list->get_selected_entry());
|
||||
rsx_log.notice("Selected skylander file entry: %s (type: %d)", selected_entry->get_file_name(), static_cast<u8>(selected_entry->get_type()));
|
||||
if (selected_entry->get_type() == skylander_file_type::folder)
|
||||
{
|
||||
if (selected_entry->get_file_name() == "..")
|
||||
{
|
||||
const auto last_slash_pos = last_skylander_path.find_last_of('/', last_skylander_path.length() - 2);
|
||||
if (last_slash_pos != std::string::npos)
|
||||
{
|
||||
last_skylander_path = last_skylander_path.substr(0, last_slash_pos + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
last_skylander_path += selected_entry->get_file_name() + "/";
|
||||
}
|
||||
m_list_dirty = true;
|
||||
}
|
||||
else if (selected_entry->get_type() == skylander_file_type::file)
|
||||
{
|
||||
const std::string full_path = last_skylander_path + selected_entry->get_file_name();
|
||||
rsx_log.notice("Loading skylander from file: %s", full_path);
|
||||
fs::file sky_file(full_path, fs::read + fs::write + fs::lock);
|
||||
if (!sky_file)
|
||||
{
|
||||
rsx_log.error("Failed to open skylander file: %s", full_path);
|
||||
close_dialog = true;
|
||||
break;
|
||||
}
|
||||
std::array<u8, 0x40 * 0x10> data;
|
||||
if (sky_file.read(data.data(), data.size()) != data.size())
|
||||
{
|
||||
rsx_log.error("Failed to read skylander file: %s", full_path);
|
||||
close_dialog = true;
|
||||
break;
|
||||
}
|
||||
if (const auto skylander = g_skyportal.get_skylander(slot))
|
||||
{
|
||||
const auto& [portal_slot, sky_id, sky_var] = skylander.value();
|
||||
g_skyportal.remove_skylander(portal_slot);
|
||||
}
|
||||
g_skyportal.load_skylander(slot, data.data(), std::move(sky_file));
|
||||
return_code = selection_code::ok;
|
||||
close_dialog = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case pad_button::dpad_up:
|
||||
case pad_button::ls_up:
|
||||
m_list->select_previous();
|
||||
break;
|
||||
case pad_button::dpad_down:
|
||||
case pad_button::ls_down:
|
||||
m_list->select_next();
|
||||
break;
|
||||
case pad_button::L1:
|
||||
m_list->select_previous(10);
|
||||
break;
|
||||
case pad_button::R1:
|
||||
m_list->select_next(10);
|
||||
break;
|
||||
default:
|
||||
rsx_log.trace("[ui] Button %d pressed", static_cast<u8>(button_press));
|
||||
break;
|
||||
}
|
||||
|
||||
if (close_dialog)
|
||||
{
|
||||
fade_animation.current = color4f(1.f);
|
||||
fade_animation.end = color4f(0.f);
|
||||
fade_animation.active = true;
|
||||
|
||||
fade_animation.on_finish = [this]
|
||||
{
|
||||
close(true, true);
|
||||
};
|
||||
}
|
||||
// Play a sound unless this is a fast auto repeat which would induce a nasty noise
|
||||
else if (!is_auto_repeat || m_auto_repeat_ms_interval >= m_auto_repeat_ms_interval_default)
|
||||
{
|
||||
play_sound(sound_effect::cursor);
|
||||
}
|
||||
}
|
||||
|
||||
compiled_resource skylander_load_dialog::get_compiled()
|
||||
{
|
||||
if (!visible)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
compiled_resource result;
|
||||
result.add(m_dim_background->get_compiled());
|
||||
if (m_list_dirty.exchange(false))
|
||||
{
|
||||
reload();
|
||||
}
|
||||
if (m_list)
|
||||
{
|
||||
result.add(m_list->get_compiled());
|
||||
}
|
||||
result.add(m_description->get_compiled());
|
||||
|
||||
fade_animation.apply(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void skylander_load_dialog::show(std::function<void(s32 status)> on_close)
|
||||
{
|
||||
visible = false;
|
||||
|
||||
this->on_close = std::move(on_close);
|
||||
|
||||
fade_animation.current = color4f(0.f);
|
||||
fade_animation.end = color4f(1.f);
|
||||
fade_animation.active = true;
|
||||
|
||||
visible = true;
|
||||
|
||||
const auto notify = std::make_shared<atomic_t<u32>>(0);
|
||||
auto& overlayman = g_fxo->get<display_manager>();
|
||||
|
||||
overlayman.attach_thread_input(
|
||||
uid, "Skylander load dialog",
|
||||
[notify]()
|
||||
{
|
||||
*notify = true;
|
||||
notify->notify_one();
|
||||
});
|
||||
|
||||
while (!Emu.IsStopped() && !*notify)
|
||||
{
|
||||
notify->wait(0, atomic_wait_timeout{1'000'000});
|
||||
}
|
||||
}
|
||||
|
||||
void skylander_load_dialog::reload()
|
||||
{
|
||||
const s32 selected_index = 0;
|
||||
|
||||
std::vector<std::unique_ptr<overlay_element>> entries;
|
||||
|
||||
std::string skylanders_dir = vfs::get("/dev_hdd0");
|
||||
|
||||
if (!last_skylander_path.empty())
|
||||
{
|
||||
skylanders_dir = last_skylander_path;
|
||||
}
|
||||
else
|
||||
{
|
||||
skylanders_dir = skylanders_dir.substr(0, skylanders_dir.find("dev_hdd0"));
|
||||
last_skylander_path = skylanders_dir;
|
||||
}
|
||||
|
||||
for (auto&& dir_entry : fs::dir{skylanders_dir})
|
||||
{
|
||||
if (dir_entry.is_directory)
|
||||
{
|
||||
entries.emplace_back(std::make_unique<skylander_file_list_entry>(skylander_file_type::folder, dir_entry.name));
|
||||
}
|
||||
else if (dir_entry.name.ends_with(".sky") || dir_entry.name.ends_with(".bin") || dir_entry.name.ends_with(".dump"))
|
||||
{
|
||||
entries.emplace_back(std::make_unique<skylander_file_list_entry>(skylander_file_type::file, dir_entry.name));
|
||||
}
|
||||
}
|
||||
// Recreate list
|
||||
if (m_list)
|
||||
{
|
||||
status_flags |= status_bits::invalidate_image_cache;
|
||||
}
|
||||
|
||||
m_list = std::make_unique<list_view>(virtual_width - 2 * 20, sky_list_h);
|
||||
m_list->set_pos(20, sky_list_y);
|
||||
m_list->set_cancel_only(false);
|
||||
|
||||
for (auto& entry : entries)
|
||||
{
|
||||
m_list->add_entry(entry);
|
||||
}
|
||||
|
||||
if (!m_list->m_items.empty())
|
||||
{
|
||||
m_list->select_entry(selected_index);
|
||||
}
|
||||
|
||||
m_description->set_text(get_localized_string(localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_LOAD));
|
||||
m_description->auto_resize();
|
||||
}
|
||||
} // namespace overlays
|
||||
} // namespace rsx
|
||||
96
rpcs3/Emu/RSX/Overlays/USBDevices/overlay_skylander_dialog.h
Normal file
96
rpcs3/Emu/RSX/Overlays/USBDevices/overlay_skylander_dialog.h
Normal file
@ -0,0 +1,96 @@
|
||||
#pragma once
|
||||
|
||||
#include "../overlays.h"
|
||||
#include "../overlay_list_view.hpp"
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
namespace overlays
|
||||
{
|
||||
struct skylander_dialog : public user_interface
|
||||
{
|
||||
private:
|
||||
struct skylander_list_entry : horizontal_layout
|
||||
{
|
||||
public:
|
||||
skylander_list_entry(std::string_view name);
|
||||
};
|
||||
|
||||
void reload();
|
||||
void clear_skylander(u8 sky_slot);
|
||||
void load_skylander(u8 sky_slot);
|
||||
|
||||
std::unique_ptr<overlay_element> m_dim_background;
|
||||
std::unique_ptr<list_view> m_list;
|
||||
std::unique_ptr<label> m_description;
|
||||
std::unique_ptr<image_button> m_load_button;
|
||||
std::unique_ptr<image_button> m_clear_button;
|
||||
std::unique_ptr<image_button> m_create_button;
|
||||
|
||||
animation_color_interpolate fade_animation;
|
||||
|
||||
atomic_t<bool> m_list_dirty{true};
|
||||
|
||||
public:
|
||||
skylander_dialog();
|
||||
|
||||
void update(u64 timestamp_us) override;
|
||||
void on_button_pressed(pad_button button_press, bool is_auto_repeat) override;
|
||||
|
||||
compiled_resource get_compiled() override;
|
||||
|
||||
void show();
|
||||
};
|
||||
|
||||
enum class skylander_file_type
|
||||
{
|
||||
folder,
|
||||
file
|
||||
};
|
||||
|
||||
struct skylander_load_dialog : public user_interface
|
||||
{
|
||||
private:
|
||||
struct skylander_file_list_entry : horizontal_layout
|
||||
{
|
||||
private:
|
||||
std::unique_ptr<image_info> icon_data;
|
||||
std::string file_name;
|
||||
skylander_file_type type;
|
||||
|
||||
public:
|
||||
skylander_file_list_entry(skylander_file_type type, const std::string& file_name);
|
||||
const std::string& get_file_name() const
|
||||
{
|
||||
return file_name;
|
||||
}
|
||||
skylander_file_type get_type() const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
};
|
||||
|
||||
void reload();
|
||||
|
||||
u8 slot = 0xff;
|
||||
|
||||
std::unique_ptr<overlay_element> m_dim_background;
|
||||
std::unique_ptr<list_view> m_list;
|
||||
std::unique_ptr<label> m_description;
|
||||
|
||||
animation_color_interpolate fade_animation;
|
||||
|
||||
atomic_t<bool> m_list_dirty{true};
|
||||
|
||||
public:
|
||||
skylander_load_dialog(u8 slot);
|
||||
|
||||
void update(u64 timestamp_us) override;
|
||||
void on_button_pressed(pad_button button_press, bool is_auto_repeat) override;
|
||||
|
||||
compiled_resource get_compiled() override;
|
||||
|
||||
void show(std::function<void(s32 status)> on_close);
|
||||
};
|
||||
} // namespace overlays
|
||||
} // namespace rsx
|
||||
@ -275,6 +275,14 @@ enum class localized_string_id
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_FONT_SIZE,
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_OPACITY,
|
||||
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_USE_WINDOW_SPACE,
|
||||
HOME_MENU_SETTINGS_USB_DEVICES,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_CLEAR,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_CREATE,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_LOAD,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_LOAD_FILE,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_MANAGER,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_NO_SKYLANDER,
|
||||
HOME_MENU_SETTINGS_SKYLANDER_UNKNOWN,
|
||||
HOME_MENU_SETTINGS_DEBUG,
|
||||
HOME_MENU_SETTINGS_DEBUG_OVERLAY,
|
||||
HOME_MENU_SETTINGS_DEBUG_INPUT_OVERLAY,
|
||||
|
||||
@ -167,6 +167,7 @@
|
||||
<ClCompile Include="Emu\RSX\Overlays\Shaders\shader_loading_dialog.cpp" />
|
||||
<ClCompile Include="Emu\RSX\Overlays\Shaders\shader_loading_dialog_native.cpp" />
|
||||
<ClCompile Include="Emu\RSX\Overlays\Trophies\overlay_trophy_list_dialog.cpp" />
|
||||
<ClCompile Include="Emu\RSX\Overlays\USBDevices\overlay_skylander_dialog.cpp" />
|
||||
<ClCompile Include="Emu\RSX\Program\Assembler\FPASM.cpp" />
|
||||
<ClCompile Include="Emu\RSX\Program\Assembler\FPOpcodes.cpp" />
|
||||
<ClCompile Include="Emu\RSX\Program\Assembler\FPToCFG.cpp" />
|
||||
@ -743,6 +744,7 @@
|
||||
<ClInclude Include="Emu\RSX\Overlays\overlay_tabs.h" />
|
||||
<ClInclude Include="Emu\RSX\Overlays\overlay_video.h" />
|
||||
<ClInclude Include="Emu\RSX\Overlays\Trophies\overlay_trophy_list_dialog.h" />
|
||||
<ClInclude Include="Emu\RSX\Overlays\USBDevices\overlay_skylander_dialog.h" />
|
||||
<ClInclude Include="Emu\RSX\Program\Assembler\CFG.h" />
|
||||
<ClInclude Include="Emu\RSX\Program\Assembler\FPASM.h" />
|
||||
<ClInclude Include="Emu\RSX\Program\Assembler\FPOpcodes.h" />
|
||||
|
||||
@ -1360,6 +1360,9 @@
|
||||
<ClCompile Include="Emu\RSX\Overlays\Trophies\overlay_trophy_list_dialog.cpp">
|
||||
<Filter>Emu\GPU\RSX\Overlays\Trophies</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\RSX\Overlays\USBDevices\overlay_skylander_dialog.cpp">
|
||||
<Filter>Emu\GPU\RSX\Overlays\USBDevices</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\Audio\audio_utils.cpp">
|
||||
<Filter>Emu\Audio</Filter>
|
||||
</ClCompile>
|
||||
@ -2836,6 +2839,9 @@
|
||||
<ClInclude Include="Emu\RSX\Overlays\Trophies\overlay_trophy_list_dialog.h">
|
||||
<Filter>Emu\GPU\RSX\Overlays\Trophies</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\RSX\Overlays\USBDevices\overlay_skylander_dialog.h">
|
||||
<Filter>Emu\GPU\RSX\Overlays\USBDevices</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Audio\audio_utils.h">
|
||||
<Filter>Emu\Audio</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@ -295,6 +295,13 @@ private:
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_FONT_SIZE: return tr("Font Size", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_OPACITY: return tr("Opacity", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_USE_WINDOW_SPACE: return tr("Use Window Space", "Performance Overlay");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_CLEAR: return tr("Clear Skylander");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_CREATE: return tr("Create Skylander");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_LOAD: return tr("Load Skylander");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_LOAD_FILE: return tr("Select Skylander File");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_MANAGER: return tr("Skylander Manager");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_NO_SKYLANDER: return tr("None");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_SKYLANDER_UNKNOWN: return tr("Unknown");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_DEBUG: return tr("Debug");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_DEBUG_OVERLAY: return tr("Debug Overlay", "Debug");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_DEBUG_INPUT_OVERLAY: return tr("Input Debug Overlay", "Debug");
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/File.h"
|
||||
#include "skylander_dialog.h"
|
||||
#include "Emu/Io/Skylander.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QGroupBox>
|
||||
@ -14,492 +13,8 @@
|
||||
#include <QCompleter>
|
||||
|
||||
skylander_dialog* skylander_dialog::inst = nullptr;
|
||||
std::optional<std::tuple<u8, u16, u16>> skylander_dialog::sky_slots[UI_SKY_NUM];
|
||||
QString last_skylander_path;
|
||||
|
||||
static const std::map<const std::pair<const u16, const u16>, const std::string> list_skylanders = {
|
||||
{{0, 0x0000}, "Whirlwind"},
|
||||
{{0, 0x1801}, "Series 2 Whirlwind"},
|
||||
{{0, 0x1C02}, "Polar Whirlwind"},
|
||||
{{0, 0x2805}, "Horn Blast Whirlwind"},
|
||||
{{0, 0x3810}, "Eon's Elite Whirlwind"},
|
||||
{{1, 0x0000}, "Sonic Boom"},
|
||||
{{1, 0x1801}, "Series 2 Sonic Boom"},
|
||||
{{2, 0x0000}, "Warnado"},
|
||||
{{2, 0x2206}, "LightCore Warnado"},
|
||||
{{3, 0x0000}, "Lightning Rod"},
|
||||
{{3, 0x1801}, "Series 2 Lightning Rod"},
|
||||
{{4, 0x0000}, "Bash"},
|
||||
{{4, 0x1801}, "Series 2 Bash"},
|
||||
{{5, 0x0000}, "Terrafin"},
|
||||
{{5, 0x1801}, "Series 2 Terrafin"},
|
||||
{{5, 0x2805}, "Knockout Terrafin"},
|
||||
{{5, 0x3810}, "Eon's Elite Terrafin"},
|
||||
{{6, 0x0000}, "Dino Rang"},
|
||||
{{6, 0x4810}, "Eon's Elite Dino Rang"},
|
||||
{{7, 0x0000}, "Prism Break"},
|
||||
{{7, 0x1801}, "Series 2 Prism Break"},
|
||||
{{7, 0x2805}, "Hyper Beam Prism Break"},
|
||||
{{7, 0x1206}, "LightCore Prism Break"},
|
||||
{{8, 0x0000}, "Sunburn"},
|
||||
{{9, 0x0000}, "Eruptor"},
|
||||
{{9, 0x1801}, "Series 2 Eruptor"},
|
||||
{{9, 0x2C02}, "Volcanic Eruptor"},
|
||||
{{9, 0x2805}, "Lava Barf Eruptor"},
|
||||
{{9, 0x1206}, "LightCore Eruptor"},
|
||||
{{9, 0x3810}, "Eon's Elite Eruptor"},
|
||||
{{10, 0x0000}, "Ignitor"},
|
||||
{{10, 0x1801}, "Series 2 Ignitor"},
|
||||
{{10, 0x1C03}, "Legendary Ignitor"},
|
||||
{{11, 0x0000}, "Flameslinger"},
|
||||
{{11, 0x1801}, "Series 2 Flameslinger"},
|
||||
{{12, 0x0000}, "Zap"},
|
||||
{{12, 0x1801}, "Series 2 Zap"},
|
||||
{{13, 0x0000}, "Wham Shell"},
|
||||
{{13, 0x2206}, "LightCore Wham Shell"},
|
||||
{{14, 0x0000}, "Gill Grunt"},
|
||||
{{14, 0x1801}, "Series 2 Gill Grunt"},
|
||||
{{14, 0x2805}, "Anchors Away Gill Grunt"},
|
||||
{{14, 0x3805}, "Tidal Wave Gill Grunt"},
|
||||
{{14, 0x3810}, "Eon's Elite Gill Grunt"},
|
||||
{{15, 0x0000}, "Slam Bam"},
|
||||
{{15, 0x1801}, "Series 2 Slam Bam"},
|
||||
{{15, 0x1C03}, "Legendary Slam Bam"},
|
||||
{{15, 0x4810}, "Eon's Elite Slam Bam"},
|
||||
{{16, 0x0000}, "Spyro"},
|
||||
{{16, 0x1801}, "Series 2 Spyro"},
|
||||
{{16, 0x2C02}, "Dark Mega Ram Spyro"},
|
||||
{{16, 0x2805}, "Mega Ram Spyro"},
|
||||
{{16, 0x3810}, "Eon's Elite Spyro"},
|
||||
{{17, 0x0000}, "Voodood"},
|
||||
{{17, 0x4810}, "Eon's Elite Voodood"},
|
||||
{{18, 0x0000}, "Double Trouble"},
|
||||
{{18, 0x1801}, "Series 2 Double Trouble"},
|
||||
{{18, 0x1C02}, "Royal Double Trouble"},
|
||||
{{19, 0x0000}, "Trigger Happy"},
|
||||
{{19, 0x1801}, "Series 2 Trigger Happy"},
|
||||
{{19, 0x2C02}, "Springtime Trigger Happy"},
|
||||
{{19, 0x2805}, "Big Bang Trigger Happy"},
|
||||
{{19, 0x3810}, "Eon's Elite Trigger Happy"},
|
||||
{{20, 0x0000}, "Drobot"},
|
||||
{{20, 0x1801}, "Series 2 Drobot"},
|
||||
{{20, 0x1206}, "LightCore Drobot"},
|
||||
{{21, 0x0000}, "Drill Sergeant"},
|
||||
{{21, 0x1801}, "Series 2 Drill Sergeant"},
|
||||
{{22, 0x0000}, "Boomer"},
|
||||
{{22, 0x4810}, "Eon's Elite Boomer"},
|
||||
{{23, 0x0000}, "Wrecking Ball"},
|
||||
{{23, 0x1801}, "Series 2 Wrecking Ball"},
|
||||
{{24, 0x0000}, "Camo"},
|
||||
{{24, 0x2805}, "Thorn Horn Camo"},
|
||||
{{25, 0x0000}, "Zook"},
|
||||
{{25, 0x1801}, "Series 2 Zook"},
|
||||
{{25, 0x4810}, "Eon's Elite Zook"},
|
||||
{{26, 0x0000}, "Stealth Elf"},
|
||||
{{26, 0x1801}, "Series 2 Stealth Elf"},
|
||||
{{26, 0x2C02}, "Dark Stealth Elf"},
|
||||
{{26, 0x1C03}, "Legendary Stealth Elf"},
|
||||
{{26, 0x2805}, "Ninja Stealth Elf"},
|
||||
{{26, 0x3810}, "Eon's Elite Stealth Elf"},
|
||||
{{27, 0x0000}, "Stump Smash"},
|
||||
{{27, 0x1801}, "Series 2 Stump Smash"},
|
||||
{{28, 0x0000}, "Dark Spyro"},
|
||||
{{29, 0x0000}, "Hex"},
|
||||
{{29, 0x1801}, "Series 2 Hex"},
|
||||
{{29, 0x1206}, "LightCore Hex"},
|
||||
{{30, 0x0000}, "Chop Chop"},
|
||||
{{30, 0x1801}, "Series 2 Chop Chop"},
|
||||
{{30, 0x2805}, "Twin Blade Chop Chop"},
|
||||
{{30, 0x3810}, "Eon's Elite Chop Chop"},
|
||||
{{31, 0x0000}, "Ghost Roaster"},
|
||||
{{31, 0x4810}, "Eon's Elite Ghost Roaster"},
|
||||
{{32, 0x0000}, "Cynder"},
|
||||
{{32, 0x1801}, "Series 2 Cynder"},
|
||||
{{32, 0x2805}, "Phantom Cynder"},
|
||||
{{100, 0x0000}, "Jet Vac"},
|
||||
{{100, 0x1403}, "Legendary Jet Vac"},
|
||||
{{100, 0x2805}, "Turbo Jet Vac"},
|
||||
{{100, 0x3805}, "Full Blast Jet Vac"},
|
||||
{{100, 0x1206}, "LightCore Jet Vac"},
|
||||
{{101, 0x0000}, "Swarm"},
|
||||
{{102, 0x0000}, "Crusher"},
|
||||
{{102, 0x1602}, "Granite Crusher"},
|
||||
{{103, 0x0000}, "Flashwing"},
|
||||
{{103, 0x1402}, "Jade Flash Wing"},
|
||||
{{103, 0x2206}, "LightCore Flashwing"},
|
||||
{{104, 0x0000}, "Hot Head"},
|
||||
{{105, 0x0000}, "Hot Dog"},
|
||||
{{105, 0x1402}, "Molten Hot Dog"},
|
||||
{{105, 0x2805}, "Fire Bone Hot Dog"},
|
||||
{{106, 0x0000}, "Chill"},
|
||||
{{106, 0x1603}, "Legendary Chill"},
|
||||
{{106, 0x2805}, "Blizzard Chill"},
|
||||
{{106, 0x1206}, "LightCore Chill"},
|
||||
{{107, 0x0000}, "Thumpback"},
|
||||
{{108, 0x0000}, "Pop Fizz"},
|
||||
{{108, 0x1402}, "Punch Pop Fizz"},
|
||||
{{108, 0x3C02}, "Love Potion Pop Fizz"},
|
||||
{{108, 0x2805}, "Super Gulp Pop Fizz"},
|
||||
{{108, 0x3805}, "Fizzy Frenzy Pop Fizz"},
|
||||
{{108, 0x1206}, "LightCore Pop Fizz"},
|
||||
{{109, 0x0000}, "Ninjini"},
|
||||
{{109, 0x1602}, "Scarlet Ninjini"},
|
||||
{{110, 0x0000}, "Bouncer"},
|
||||
{{110, 0x1603}, "Legendary Bouncer"},
|
||||
{{111, 0x0000}, "Sprocket"},
|
||||
{{111, 0x2805}, "Heavy Duty Sprocket"},
|
||||
{{112, 0x0000}, "Tree Rex"},
|
||||
{{112, 0x1602}, "Gnarly Tree Rex"},
|
||||
{{113, 0x0000}, "Shroomboom"},
|
||||
{{113, 0x3805}, "Sure Shot Shroomboom"},
|
||||
{{113, 0x1206}, "LightCore Shroomboom"},
|
||||
{{114, 0x0000}, "Eye Brawl"},
|
||||
{{115, 0x0000}, "Fright Rider"},
|
||||
{{200, 0x0000}, "Anvil Rain"},
|
||||
{{201, 0x0000}, "Hidden Treasure"},
|
||||
{{201, 0x2000}, "Platinum Hidden Treasure"},
|
||||
{{202, 0x0000}, "Healing Elixir"},
|
||||
{{203, 0x0000}, "Ghost Pirate Swords"},
|
||||
{{204, 0x0000}, "Time Twist Hourglass"},
|
||||
{{205, 0x0000}, "Sky Iron Shield"},
|
||||
{{206, 0x0000}, "Winged Boots"},
|
||||
{{207, 0x0000}, "Sparx the Dragonfly"},
|
||||
{{208, 0x1206}, "Dragonfire Cannon"},
|
||||
{{208, 0x1602}, "Golden Dragonfire Cannon"},
|
||||
{{209, 0x1206}, "Scorpion Striker"},
|
||||
{{210, 0x3002}, "Biter's Bane"},
|
||||
{{210, 0x3008}, "Sorcerous Skull"},
|
||||
{{210, 0x300B}, "Axe of Illusion"},
|
||||
{{210, 0x300E}, "Arcane Hourglass"},
|
||||
{{210, 0x3012}, "Spell Slapper"},
|
||||
{{210, 0x3014}, "Rune Rocket"},
|
||||
{{211, 0x3001}, "Tidal Tiki"},
|
||||
{{211, 0x3002}, "Wet Walter"},
|
||||
{{211, 0x3006}, "Flood Flask"},
|
||||
{{211, 0x3406}, "Legendary Flood Flask"},
|
||||
{{211, 0x3007}, "Soaking Staff"},
|
||||
{{211, 0x300B}, "Aqua Axe"},
|
||||
{{211, 0x3016}, "Frost Helm"},
|
||||
{{212, 0x3003}, "Breezy Bird"},
|
||||
{{212, 0x3006}, "Drafty Decanter"},
|
||||
{{212, 0x300D}, "Tempest Timer"},
|
||||
{{212, 0x3010}, "Cloudy Cobra"},
|
||||
{{212, 0x3011}, "Storm Warning"},
|
||||
{{212, 0x3018}, "Cyclone Saber"},
|
||||
{{213, 0x3004}, "Spirit Sphere"},
|
||||
{{213, 0x3404}, "Legendary Spirit Sphere"},
|
||||
{{213, 0x3008}, "Spectral Skull"},
|
||||
{{213, 0x3408}, "Legendary Spectral Skull"},
|
||||
{{213, 0x300B}, "Haunted Hatchet"},
|
||||
{{213, 0x300C}, "Grim Gripper"},
|
||||
{{213, 0x3010}, "Spooky Snake"},
|
||||
{{213, 0x3017}, "Dream Piercer"},
|
||||
{{214, 0x3000}, "Tech Totem"},
|
||||
{{214, 0x3007}, "Automatic Angel"},
|
||||
{{214, 0x3009}, "Factory Flower"},
|
||||
{{214, 0x300C}, "Grabbing Gadget"},
|
||||
{{214, 0x3016}, "Makers Mana"},
|
||||
{{214, 0x301A}, "Topsy Techy"},
|
||||
{{215, 0x3005}, "Eternal Flame"},
|
||||
{{215, 0x3009}, "Fire Flower"},
|
||||
{{215, 0x3011}, "Scorching Stopper"},
|
||||
{{215, 0x3012}, "Searing Spinner"},
|
||||
{{215, 0x3017}, "Spark Spear"},
|
||||
{{215, 0x301B}, "Blazing Belch"},
|
||||
{{216, 0x3000}, "Banded Boulder"},
|
||||
{{216, 0x3003}, "Rock Hawk"},
|
||||
{{216, 0x300A}, "Slag Hammer"},
|
||||
{{216, 0x300E}, "Dust Of Time"},
|
||||
{{216, 0x3013}, "Spinning Sandstorm"},
|
||||
{{216, 0x301A}, "Rubble Trouble"},
|
||||
{{217, 0x3003}, "Oak Eagle"},
|
||||
{{217, 0x3005}, "Emerald Energy"},
|
||||
{{217, 0x300A}, "Weed Whacker"},
|
||||
{{217, 0x3010}, "Seed Serpent"},
|
||||
{{217, 0x3018}, "Jade Blade"},
|
||||
{{217, 0x301B}, "Shrub Shrieker"},
|
||||
{{218, 0x3000}, "Dark Dagger"},
|
||||
{{218, 0x3014}, "Shadow Spider"},
|
||||
{{218, 0x301A}, "Ghastly Grimace"},
|
||||
{{219, 0x3000}, "Shining Ship"},
|
||||
{{219, 0x300F}, "Heavenly Hawk"},
|
||||
{{219, 0x301B}, "Beam Scream"},
|
||||
{{220, 0x301E}, "Kaos Trap"},
|
||||
{{220, 0x351F}, "Ultimate Kaos Trap"},
|
||||
{{230, 0x0000}, "Hand of Fate"},
|
||||
{{230, 0x3403}, "Legendary Hand of Fate"},
|
||||
{{231, 0x0000}, "Piggy Bank"},
|
||||
{{232, 0x0000}, "Rocket Ram"},
|
||||
{{233, 0x0000}, "Tiki Speaky"},
|
||||
{{300, 0x0000}, "Dragon’s Peak"},
|
||||
{{301, 0x0000}, "Empire of Ice"},
|
||||
{{302, 0x0000}, "Pirate Seas"},
|
||||
{{303, 0x0000}, "Darklight Crypt"},
|
||||
{{304, 0x0000}, "Volcanic Vault"},
|
||||
{{305, 0x0000}, "Mirror of Mystery"},
|
||||
{{306, 0x0000}, "Nightmare Express"},
|
||||
{{307, 0x0000}, "Sunscraper Spire"},
|
||||
{{308, 0x0000}, "Midnight Museum"},
|
||||
{{404, 0x0000}, "Legendary Bash"},
|
||||
{{416, 0x0000}, "Legendary Spyro"},
|
||||
{{419, 0x0000}, "Legendary Trigger Happy"},
|
||||
{{430, 0x0000}, "Legendary Chop Chop"},
|
||||
{{450, 0x0000}, "Gusto"},
|
||||
{{451, 0x0000}, "Thunderbolt"},
|
||||
{{452, 0x0000}, "Fling Kong"},
|
||||
{{453, 0x0000}, "Blades"},
|
||||
{{453, 0x3403}, "Legendary Blades"},
|
||||
{{454, 0x0000}, "Wallop"},
|
||||
{{455, 0x0000}, "Head Rush"},
|
||||
{{455, 0x3402}, "Nitro Head Rush"},
|
||||
{{456, 0x0000}, "Fist Bump"},
|
||||
{{457, 0x0000}, "Rocky Roll"},
|
||||
{{458, 0x0000}, "Wildfire"},
|
||||
{{458, 0x3402}, "Dark Wildfire"},
|
||||
{{459, 0x0000}, "Ka Boom"},
|
||||
{{460, 0x0000}, "Trail Blazer"},
|
||||
{{461, 0x0000}, "Torch"},
|
||||
{{462, 0x0000}, "Snap Shot"},
|
||||
{{462, 0x3402}, "Dark Snap Shot"},
|
||||
{{463, 0x0000}, "Lob Star"},
|
||||
{{463, 0x3402}, "Winterfest Lob-Star"},
|
||||
{{464, 0x0000}, "Flip Wreck"},
|
||||
{{465, 0x0000}, "Echo"},
|
||||
{{466, 0x0000}, "Blastermind"},
|
||||
{{467, 0x0000}, "Enigma"},
|
||||
{{468, 0x0000}, "Deja Vu"},
|
||||
{{468, 0x3403}, "Legendary Deja Vu"},
|
||||
{{469, 0x0000}, "Cobra Candabra"},
|
||||
{{469, 0x3402}, "King Cobra Cadabra"},
|
||||
{{470, 0x0000}, "Jawbreaker"},
|
||||
{{470, 0x3403}, "Legendary Jawbreaker"},
|
||||
{{471, 0x0000}, "Gearshift"},
|
||||
{{472, 0x0000}, "Chopper"},
|
||||
{{473, 0x0000}, "Tread Head"},
|
||||
{{474, 0x0000}, "Bushwack"},
|
||||
{{474, 0x3403}, "Legendary Bushwack"},
|
||||
{{475, 0x0000}, "Tuff Luck"},
|
||||
{{476, 0x0000}, "Food Fight"},
|
||||
{{476, 0x3402}, "Dark Food Fight"},
|
||||
{{477, 0x0000}, "High Five"},
|
||||
{{478, 0x0000}, "Krypt King"},
|
||||
{{478, 0x3402}, "Nitro Krypt King"},
|
||||
{{479, 0x0000}, "Short Cut"},
|
||||
{{480, 0x0000}, "Bat Spin"},
|
||||
{{481, 0x0000}, "Funny Bone"},
|
||||
{{482, 0x0000}, "Knight Light"},
|
||||
{{483, 0x0000}, "Spotlight"},
|
||||
{{484, 0x0000}, "Knight Mare"},
|
||||
{{485, 0x0000}, "Blackout"},
|
||||
{{502, 0x0000}, "Bop"},
|
||||
{{505, 0x0000}, "Terrabite"},
|
||||
{{506, 0x0000}, "Breeze"},
|
||||
{{508, 0x0000}, "Pet Vac"},
|
||||
{{508, 0x3402}, "Power Punch Pet Vac"},
|
||||
{{507, 0x0000}, "Weeruptor"},
|
||||
{{507, 0x3402}, "Eggcellent Weeruptor"},
|
||||
{{509, 0x0000}, "Small Fry"},
|
||||
{{510, 0x0000}, "Drobit"},
|
||||
{{519, 0x0000}, "Trigger Snappy"},
|
||||
{{526, 0x3000}, "Whisper Elf"},
|
||||
{{540, 0x3000}, "Barkley"},
|
||||
{{540, 0x3402}, "Gnarly Barkley"},
|
||||
{{541, 0x3000}, "Thumpling"},
|
||||
{{514, 0x0000}, "Gill Runt"},
|
||||
{{542, 0x3000}, "Mini-Jini"},
|
||||
{{503, 0x0000}, "Spry"},
|
||||
{{504, 0x0000}, "Hijinx"},
|
||||
{{543, 0x1000}, "Eye Small"},
|
||||
{{601, 0x0000}, "King Pen"},
|
||||
{{602, 0x0000}, "Tri-Tip"},
|
||||
{{603, 0x0000}, "Chopscotch"},
|
||||
{{604, 0x0000}, "Boom Bloom"},
|
||||
{{605, 0x0000}, "Pit Boss"},
|
||||
{{606, 0x0000}, "Barbella"},
|
||||
{{607, 0x0000}, "Air Strike"},
|
||||
{{608, 0x0000}, "Ember"},
|
||||
{{609, 0x0000}, "Ambush"},
|
||||
{{610, 0x0000}, "Dr. Krankcase"},
|
||||
{{611, 0x0000}, "Hood Sickle"},
|
||||
{{612, 0x0000}, "Tae Kwon Crow"},
|
||||
{{613, 0x0000}, "Golden Queen"},
|
||||
{{614, 0x0000}, "Wolfgang"},
|
||||
{{615, 0x0000}, "Pain-Yatta"},
|
||||
{{616, 0x0000}, "Mysticat"},
|
||||
{{617, 0x0000}, "Starcast"},
|
||||
{{618, 0x0000}, "Buckshot"},
|
||||
{{619, 0x0000}, "Aurora"},
|
||||
{{620, 0x0000}, "Flare Wolf"},
|
||||
{{621, 0x0000}, "Chompy Mage"},
|
||||
{{622, 0x0000}, "Bad Juju"},
|
||||
{{623, 0x0000}, "Grave Clobber"},
|
||||
{{624, 0x0000}, "Blaster-Tron"},
|
||||
{{625, 0x0000}, "Ro-Bow"},
|
||||
{{626, 0x0000}, "Chain Reaction"},
|
||||
{{627, 0x0000}, "Kaos"},
|
||||
{{628, 0x0000}, "Wild Storm"},
|
||||
{{629, 0x0000}, "Tidepool"},
|
||||
{{630, 0x0000}, "Crash Bandicoot"},
|
||||
{{631, 0x0000}, "Dr. Neo Cortex"},
|
||||
{{1000, 0x0000}, "Boom Jet (Bottom)"},
|
||||
{{1001, 0x0000}, "Free Ranger (Bottom)"},
|
||||
{{1001, 0x2403}, "Legendary Free Ranger (Bottom)"},
|
||||
{{1002, 0x0000}, "Rubble Rouser (Bottom)"},
|
||||
{{1003, 0x0000}, "Doom Stone (Bottom)"},
|
||||
{{1004, 0x0000}, "Blast Zone (Bottom)"},
|
||||
{{1004, 0x2402}, "Dark Blast Zone (Bottom)"},
|
||||
{{1005, 0x0000}, "Fire Kraken (Bottom)"},
|
||||
{{1005, 0x2402}, "Jade Fire Kraken (Bottom)"},
|
||||
{{1006, 0x0000}, "Stink Bomb (Bottom)"},
|
||||
{{1007, 0x0000}, "Grilla Drilla (Bottom)"},
|
||||
{{1008, 0x0000}, "Hoot Loop (Bottom)"},
|
||||
{{1008, 0x2402}, "Enchanted Hoot Loop (Bottom)"},
|
||||
{{1009, 0x0000}, "Trap Shadow (Bottom)"},
|
||||
{{1010, 0x0000}, "Magna Charge (Bottom)"},
|
||||
{{1010, 0x2402}, "Nitro Magna Charge (Bottom)"},
|
||||
{{1011, 0x0000}, "Spy Rise (Bottom)"},
|
||||
{{1012, 0x0000}, "Night Shift (Bottom)"},
|
||||
{{1012, 0x2403}, "Legendary Night Shift (Bottom)"},
|
||||
{{1013, 0x0000}, "Rattle Shake (Bottom)"},
|
||||
{{1013, 0x2402}, "Quick Draw Rattle Shake (Bottom)"},
|
||||
{{1014, 0x0000}, "Freeze Blade (Bottom)"},
|
||||
{{1014, 0x2402}, "Nitro Freeze Blade (Bottom)"},
|
||||
{{1015, 0x0000}, "Wash Buckler (Bottom)"},
|
||||
{{1015, 0x2402}, "Dark Wash Buckler (Bottom)"},
|
||||
{{2000, 0x0000}, "Boom Jet (Top)"},
|
||||
{{2001, 0x0000}, "Free Ranger (Top)"},
|
||||
{{2001, 0x2403}, "Legendary Free Ranger (Top)"},
|
||||
{{2002, 0x0000}, "Rubble Rouser (Top)"},
|
||||
{{2003, 0x0000}, "Doom Stone (Top)"},
|
||||
{{2004, 0x0000}, "Blast Zone (Top)"},
|
||||
{{2004, 0x2402}, "Dark Blast Zone (Top)"},
|
||||
{{2005, 0x0000}, "Fire Kraken (Top)"},
|
||||
{{2005, 0x2402}, "Jade Fire Kraken (Top)"},
|
||||
{{2006, 0x0000}, "Stink Bomb (Top)"},
|
||||
{{2007, 0x0000}, "Grilla Drilla (Top)"},
|
||||
{{2008, 0x0000}, "Hoot Loop (Top)"},
|
||||
{{2008, 0x2402}, "Enchanted Hoot Loop (Top)"},
|
||||
{{2009, 0x0000}, "Trap Shadow (Top)"},
|
||||
{{2010, 0x0000}, "Magna Charge (Top)"},
|
||||
{{2010, 0x2402}, "Nitro Magna Charge (Top)"},
|
||||
{{2011, 0x0000}, "Spy Rise (Top)"},
|
||||
{{2012, 0x0000}, "Night Shift (Top)"},
|
||||
{{2012, 0x2403}, "Legendary Night Shift (Top)"},
|
||||
{{2013, 0x0000}, "Rattle Shake (Top)"},
|
||||
{{2013, 0x2402}, "Quick Draw Rattle Shake (Top)"},
|
||||
{{2014, 0x0000}, "Freeze Blade (Top)"},
|
||||
{{2014, 0x2402}, "Nitro Freeze Blade (Top)"},
|
||||
{{2015, 0x0000}, "Wash Buckler (Top)"},
|
||||
{{2015, 0x2402}, "Dark Wash Buckler (Top)"},
|
||||
{{3000, 0x0000}, "Scratch"},
|
||||
{{3001, 0x0000}, "Pop Thorn"},
|
||||
{{3002, 0x0000}, "Slobber Tooth"},
|
||||
{{3002, 0x2402}, "Dark Slobber Tooth"},
|
||||
{{3003, 0x0000}, "Scorp"},
|
||||
{{3004, 0x0000}, "Fryno"},
|
||||
{{3004, 0x3805}, "Hog Wild Fryno"},
|
||||
{{3005, 0x0000}, "Smolderdash"},
|
||||
{{3005, 0x2206}, "LightCore Smolderdash"},
|
||||
{{3006, 0x0000}, "Bumble Blast"},
|
||||
{{3006, 0x2402}, "Jolly Bumble Blast"},
|
||||
{{3006, 0x2206}, "LightCore Bumble Blast"},
|
||||
{{3007, 0x0000}, "Zoo Lou"},
|
||||
{{3007, 0x2403}, "Legendary Zoo Lou"},
|
||||
{{3008, 0x0000}, "Dune Bug"},
|
||||
{{3009, 0x0000}, "Star Strike"},
|
||||
{{3009, 0x2602}, "Enchanted Star Strike"},
|
||||
{{3009, 0x2206}, "LightCore Star Strike"},
|
||||
{{3010, 0x0000}, "Countdown"},
|
||||
{{3010, 0x2402}, "Kickoff Countdown"},
|
||||
{{3010, 0x2206}, "LightCore Countdown"},
|
||||
{{3011, 0x0000}, "Wind Up"},
|
||||
{{3012, 0x0000}, "Roller Brawl"},
|
||||
{{3013, 0x0000}, "Grim Creeper"},
|
||||
{{3013, 0x2603}, "Legendary Grim Creeper"},
|
||||
{{3013, 0x2206}, "LightCore Grim Creeper"},
|
||||
{{3014, 0x0000}, "Rip Tide"},
|
||||
{{3015, 0x0000}, "Punk Shock"},
|
||||
{{3200, 0x2000}, "Battle Hammer"},
|
||||
{{3201, 0x2000}, "Sky Diamond"},
|
||||
{{3202, 0x2000}, "Platinum Sheep"},
|
||||
{{3203, 0x2000}, "Groove Machine"},
|
||||
{{3204, 0x0000}, "UFO Hat"},
|
||||
{{3300, 0x2000}, "Sheep Wreck Island"},
|
||||
{{3301, 0x2000}, "Tower of Time"},
|
||||
{{3302, 0x2206}, "Fiery Forge"},
|
||||
{{3303, 0x2206}, "Arkeyan Crossbow"},
|
||||
{{3220, 0x0000}, "Jet Stream"},
|
||||
{{3221, 0x0000}, "Tomb Buggy"},
|
||||
{{3222, 0x0000}, "Reef Ripper"},
|
||||
{{3223, 0x0000}, "Burn Cycle"},
|
||||
{{3224, 0x0000}, "Hot Streak"},
|
||||
{{3224, 0x4402}, "Dark Hot Streak"},
|
||||
{{3224, 0x4004}, "E3 Hot Streak"},
|
||||
{{3224, 0x441E}, "Golden Hot Streak"},
|
||||
{{3225, 0x0000}, "Shark Tank"},
|
||||
{{3226, 0x0000}, "Thump Truck"},
|
||||
{{3227, 0x0000}, "Crypt Crusher"},
|
||||
{{3228, 0x0000}, "Stealth Stinger"},
|
||||
{{3228, 0x4402}, "Nitro Stealth Stinger"},
|
||||
{{3231, 0x0000}, "Dive Bomber"},
|
||||
{{3231, 0x4402}, "Spring Ahead Dive Bomber"},
|
||||
{{3232, 0x0000}, "Sky Slicer"},
|
||||
//{{3233, 0x0000}, "Clown Cruiser (Nintendo Only)"},
|
||||
//{{3233, 0x4402}, "Dark Clown Cruiser (Nintendo Only)"},
|
||||
{{3234, 0x0000}, "Gold Rusher"},
|
||||
{{3234, 0x4402}, "Power Blue Gold Rusher"},
|
||||
{{3235, 0x0000}, "Shield Striker"},
|
||||
{{3236, 0x0000}, "Sun Runner"},
|
||||
{{3236, 0x4403}, "Legendary Sun Runner"},
|
||||
{{3237, 0x0000}, "Sea Shadow"},
|
||||
{{3237, 0x4402}, "Dark Sea Shadow"},
|
||||
{{3238, 0x0000}, "Splatter Splasher"},
|
||||
{{3238, 0x4402}, "Power Blue Splatter Splasher"},
|
||||
{{3239, 0x0000}, "Soda Skimmer"},
|
||||
{{3239, 0x4402}, "Nitro Soda Skimmer"},
|
||||
//{{3240, 0x0000}, "Barrel Blaster (Nintendo Only)"},
|
||||
//{{3240, 0x4402}, "Dark Barrel Blaster (Nintendo Only)"},
|
||||
{{3241, 0x0000}, "Buzz Wing"},
|
||||
{{3400, 0x0000}, "Fiesta"},
|
||||
{{3400, 0x4515}, "Frightful Fiesta"},
|
||||
{{3401, 0x0000}, "High Volt"},
|
||||
{{3402, 0x0000}, "Splat"},
|
||||
{{3402, 0x4502}, "Power Blue Splat"},
|
||||
{{3406, 0x0000}, "Stormblade"},
|
||||
{{3411, 0x0000}, "Smash Hit"},
|
||||
{{3411, 0x4502}, "Steel Plated Smash Hit"},
|
||||
{{3412, 0x0000}, "Spitfire"},
|
||||
{{3412, 0x4502}, "Dark Spitfire"},
|
||||
{{3413, 0x0000}, "Hurricane Jet Vac"},
|
||||
{{3413, 0x4503}, "Legendary Hurricane Jet Vac"},
|
||||
{{3414, 0x0000}, "Double Dare Trigger Happy"},
|
||||
{{3414, 0x4502}, "Power Blue Double Dare Trigger Happy"},
|
||||
{{3415, 0x0000}, "Super Shot Stealth Elf"},
|
||||
{{3415, 0x4502}, "Dark Super Shot Stealth Elf"},
|
||||
{{3416, 0x0000}, "Shark Shooter Terrafin"},
|
||||
{{3417, 0x0000}, "Bone Bash Roller Brawl"},
|
||||
{{3417, 0x4503}, "Legendary Bone Bash Roller Brawl"},
|
||||
{{3420, 0x0000}, "Big Bubble Pop Fizz"},
|
||||
{{3420, 0x450E}, "Birthday Bash Big Bubble Pop Fizz"},
|
||||
{{3421, 0x0000}, "Lava Lance Eruptor"},
|
||||
{{3422, 0x0000}, "Deep Dive Gill Grunt"},
|
||||
//{{3423, 0x0000}, "Turbo Charge Donkey Kong (Nintendo Only)"},
|
||||
//{{3423, 0x4502}, "Dark Turbo Charge Donkey Kong (Nintendo Only)"},
|
||||
//{{3424, 0x0000}, "Hammer Slam Bowser (Nintendo Only)"},
|
||||
//{{3424, 0x4502}, "Dark Hammer Slam Bowser (Nintendo Only)"},
|
||||
{{3425, 0x0000}, "Dive-Clops"},
|
||||
{{3425, 0x450E}, "Missile-Tow Dive-Clops"},
|
||||
{{3426, 0x0000}, "Astroblast"},
|
||||
{{3426, 0x4503}, "Legendary Astroblast"},
|
||||
{{3427, 0x0000}, "Nightfall"},
|
||||
{{3428, 0x0000}, "Thrillipede"},
|
||||
{{3428, 0x450D}, "Eggcited Thrillipede"},
|
||||
{{3500, 0x0000}, "Sky Trophy"},
|
||||
{{3501, 0x0000}, "Land Trophy"},
|
||||
{{3502, 0x0000}, "Sea Trophy"},
|
||||
{{3503, 0x0000}, "Kaos Trophy"},
|
||||
};
|
||||
|
||||
u16 skylander_crc16(u16 init_value, const u8* buffer, u32 size)
|
||||
{
|
||||
constexpr unsigned short CRC_CCITT_TABLE[256] = {
|
||||
@ -696,7 +211,7 @@ skylander_dialog::skylander_dialog(QWidget* parent)
|
||||
QGroupBox* group_skylanders = new QGroupBox(tr("Active Portal Skylanders:"));
|
||||
QVBoxLayout* vbox_group = new QVBoxLayout();
|
||||
|
||||
for (auto i = 0; i < UI_SKY_NUM; i++)
|
||||
for (auto i = 0; i < MAX_SKYLANDERS; i++)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
@ -705,8 +220,8 @@ skylander_dialog::skylander_dialog(QWidget* parent)
|
||||
|
||||
QHBoxLayout* hbox_skylander = new QHBoxLayout();
|
||||
QLabel* label_skyname = new QLabel(QString(tr("Skylander %1")).arg(i + 1));
|
||||
edit_skylanders[i] = new QLineEdit();
|
||||
edit_skylanders[i]->setEnabled(false);
|
||||
::at32(edit_skylanders, i) = new QLineEdit();
|
||||
::at32(edit_skylanders, i)->setEnabled(false);
|
||||
|
||||
QPushButton* clear_btn = new QPushButton(tr("Clear"));
|
||||
QPushButton* create_btn = new QPushButton(tr("Create"));
|
||||
@ -717,7 +232,7 @@ skylander_dialog::skylander_dialog(QWidget* parent)
|
||||
connect(load_btn, &QAbstractButton::clicked, this, [this, i]() { load_skylander(i); });
|
||||
|
||||
hbox_skylander->addWidget(label_skyname);
|
||||
hbox_skylander->addWidget(edit_skylanders[i]);
|
||||
hbox_skylander->addWidget(::at32(edit_skylanders, i));
|
||||
hbox_skylander->addWidget(clear_btn);
|
||||
hbox_skylander->addWidget(create_btn);
|
||||
hbox_skylander->addWidget(load_btn);
|
||||
@ -740,18 +255,23 @@ skylander_dialog::~skylander_dialog()
|
||||
skylander_dialog* skylander_dialog::get_dlg(QWidget* parent)
|
||||
{
|
||||
if (inst == nullptr)
|
||||
{
|
||||
inst = new skylander_dialog(parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
inst->update_edits();
|
||||
}
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
void skylander_dialog::clear_skylander(u8 slot)
|
||||
{
|
||||
if (const auto& slot_infos = sky_slots[slot])
|
||||
if (const auto& slot_infos = g_skyportal.get_skylander(slot))
|
||||
{
|
||||
const auto& [cur_slot, id, var] = slot_infos.value();
|
||||
g_skyportal.remove_skylander(cur_slot);
|
||||
sky_slots[slot] = {};
|
||||
update_edits();
|
||||
}
|
||||
}
|
||||
@ -796,21 +316,17 @@ void skylander_dialog::load_skylander_path(u8 slot, const QString& path)
|
||||
|
||||
clear_skylander(slot);
|
||||
|
||||
u16 sky_id = reinterpret_cast<le_t<u16>&>(data[0x10]);
|
||||
u16 sky_var = reinterpret_cast<le_t<u16>&>(data[0x1C]);
|
||||
|
||||
u8 portal_slot = g_skyportal.load_skylander(data.data(), std::move(sky_file));
|
||||
sky_slots[slot] = std::tuple(portal_slot, sky_id, sky_var);
|
||||
g_skyportal.load_skylander(slot, data.data(), std::move(sky_file));
|
||||
|
||||
update_edits();
|
||||
}
|
||||
|
||||
void skylander_dialog::update_edits()
|
||||
{
|
||||
for (auto i = 0; i < UI_SKY_NUM; i++)
|
||||
for (auto i = 0; i < MAX_SKYLANDERS; i++)
|
||||
{
|
||||
QString display_string;
|
||||
if (const auto& sd = sky_slots[i])
|
||||
if (const auto& sd = g_skyportal.get_skylander(i))
|
||||
{
|
||||
const auto& [portal_slot, sky_id, sky_var] = sd.value();
|
||||
const auto found_sky = list_skylanders.find(std::make_pair(sky_id, sky_var));
|
||||
@ -828,6 +344,6 @@ void skylander_dialog::update_edits()
|
||||
display_string = tr("None");
|
||||
}
|
||||
|
||||
edit_skylanders[i]->setText(display_string);
|
||||
::at32(edit_skylanders, i)->setText(display_string);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include "util/types.hpp"
|
||||
#include "Emu/Io/Skylander.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLineEdit>
|
||||
|
||||
constexpr auto UI_SKY_NUM = 8;
|
||||
|
||||
class skylander_creator_dialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -41,8 +39,7 @@ protected:
|
||||
void update_edits();
|
||||
|
||||
protected:
|
||||
QLineEdit* edit_skylanders[UI_SKY_NUM]{};
|
||||
static std::optional<std::tuple<u8, u16, u16>> sky_slots[UI_SKY_NUM];
|
||||
std::array<QLineEdit*, MAX_SKYLANDERS> edit_skylanders{};
|
||||
|
||||
private:
|
||||
static skylander_dialog* inst;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user