mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Merge pull request #11490 from deReeperJosh/skylandersportalandroid
Android: Skylanders Portal UI
This commit is contained in:
commit
643726110b
@ -9,6 +9,7 @@ import android.content.SharedPreferences;
|
|||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Pair;
|
||||||
import android.util.SparseIntArray;
|
import android.util.SparseIntArray;
|
||||||
import android.view.InputDevice;
|
import android.view.InputDevice;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
@ -33,12 +34,14 @@ import androidx.fragment.app.Fragment;
|
|||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import org.dolphinemu.dolphinemu.NativeLibrary;
|
import org.dolphinemu.dolphinemu.NativeLibrary;
|
||||||
import org.dolphinemu.dolphinemu.R;
|
import org.dolphinemu.dolphinemu.R;
|
||||||
import org.dolphinemu.dolphinemu.databinding.ActivityEmulationBinding;
|
import org.dolphinemu.dolphinemu.databinding.ActivityEmulationBinding;
|
||||||
import org.dolphinemu.dolphinemu.databinding.DialogInputAdjustBinding;
|
import org.dolphinemu.dolphinemu.databinding.DialogInputAdjustBinding;
|
||||||
import org.dolphinemu.dolphinemu.databinding.DialogIrSensitivityBinding;
|
import org.dolphinemu.dolphinemu.databinding.DialogIrSensitivityBinding;
|
||||||
|
import org.dolphinemu.dolphinemu.databinding.DialogSkylandersManagerBinding;
|
||||||
import org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting;
|
import org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting;
|
||||||
import org.dolphinemu.dolphinemu.features.settings.model.IntSetting;
|
import org.dolphinemu.dolphinemu.features.settings.model.IntSetting;
|
||||||
import org.dolphinemu.dolphinemu.features.settings.model.Settings;
|
import org.dolphinemu.dolphinemu.features.settings.model.Settings;
|
||||||
@ -46,6 +49,10 @@ import org.dolphinemu.dolphinemu.features.settings.model.StringSetting;
|
|||||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity;
|
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity;
|
||||||
import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile;
|
import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile;
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.SkylanderConfig;
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.model.Skylander;
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.ui.SkylanderSlot;
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.ui.SkylanderSlotAdapter;
|
||||||
import org.dolphinemu.dolphinemu.fragments.EmulationFragment;
|
import org.dolphinemu.dolphinemu.fragments.EmulationFragment;
|
||||||
import org.dolphinemu.dolphinemu.fragments.MenuFragment;
|
import org.dolphinemu.dolphinemu.fragments.MenuFragment;
|
||||||
import org.dolphinemu.dolphinemu.fragments.SaveLoadStateFragment;
|
import org.dolphinemu.dolphinemu.fragments.SaveLoadStateFragment;
|
||||||
@ -63,6 +70,7 @@ import org.dolphinemu.dolphinemu.utils.ThemeHelper;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||||
@ -75,6 +83,8 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
private static final String BACKSTACK_NAME_MENU = "menu";
|
private static final String BACKSTACK_NAME_MENU = "menu";
|
||||||
private static final String BACKSTACK_NAME_SUBMENU = "submenu";
|
private static final String BACKSTACK_NAME_SUBMENU = "submenu";
|
||||||
public static final int REQUEST_CHANGE_DISC = 1;
|
public static final int REQUEST_CHANGE_DISC = 1;
|
||||||
|
public static final int REQUEST_SKYLANDER_FILE = 2;
|
||||||
|
public static final int REQUEST_CREATE_SKYLANDER = 3;
|
||||||
|
|
||||||
private EmulationFragment mEmulationFragment;
|
private EmulationFragment mEmulationFragment;
|
||||||
|
|
||||||
@ -101,6 +111,10 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
public static final String EXTRA_SYSTEM_MENU = "SystemMenu";
|
public static final String EXTRA_SYSTEM_MENU = "SystemMenu";
|
||||||
public static final String EXTRA_USER_PAUSED_EMULATION = "sUserPausedEmulation";
|
public static final String EXTRA_USER_PAUSED_EMULATION = "sUserPausedEmulation";
|
||||||
public static final String EXTRA_MENU_TOAST_SHOWN = "MenuToastShown";
|
public static final String EXTRA_MENU_TOAST_SHOWN = "MenuToastShown";
|
||||||
|
public static final String EXTRA_SKYLANDER_SLOT = "SkylanderSlot";
|
||||||
|
public static final String EXTRA_SKYLANDER_ID = "SkylanderId";
|
||||||
|
public static final String EXTRA_SKYLANDER_VAR = "SkylanderVar";
|
||||||
|
public static final String EXTRA_SKYLANDER_NAME = "SkylanderName";
|
||||||
|
|
||||||
@Retention(SOURCE)
|
@Retention(SOURCE)
|
||||||
@IntDef(
|
@IntDef(
|
||||||
@ -115,7 +129,7 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
MENU_ACTION_RESET_OVERLAY, MENU_SET_IR_RECENTER, MENU_SET_IR_MODE,
|
MENU_ACTION_RESET_OVERLAY, MENU_SET_IR_RECENTER, MENU_SET_IR_MODE,
|
||||||
MENU_SET_IR_SENSITIVITY, MENU_ACTION_CHOOSE_DOUBLETAP, MENU_ACTION_MOTION_CONTROLS,
|
MENU_SET_IR_SENSITIVITY, MENU_ACTION_CHOOSE_DOUBLETAP, MENU_ACTION_MOTION_CONTROLS,
|
||||||
MENU_ACTION_PAUSE_EMULATION, MENU_ACTION_UNPAUSE_EMULATION, MENU_ACTION_OVERLAY_CONTROLS,
|
MENU_ACTION_PAUSE_EMULATION, MENU_ACTION_UNPAUSE_EMULATION, MENU_ACTION_OVERLAY_CONTROLS,
|
||||||
MENU_ACTION_SETTINGS})
|
MENU_ACTION_SETTINGS, MENU_ACTION_SKYLANDERS})
|
||||||
public @interface MenuAction
|
public @interface MenuAction
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -156,6 +170,15 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
public static final int MENU_ACTION_UNPAUSE_EMULATION = 33;
|
public static final int MENU_ACTION_UNPAUSE_EMULATION = 33;
|
||||||
public static final int MENU_ACTION_OVERLAY_CONTROLS = 34;
|
public static final int MENU_ACTION_OVERLAY_CONTROLS = 34;
|
||||||
public static final int MENU_ACTION_SETTINGS = 35;
|
public static final int MENU_ACTION_SETTINGS = 35;
|
||||||
|
public static final int MENU_ACTION_SKYLANDERS = 36;
|
||||||
|
|
||||||
|
private Skylander mSkylanderData = new Skylander(-1, -1, "Slot");
|
||||||
|
|
||||||
|
private int mSkylanderSlot = -1;
|
||||||
|
|
||||||
|
private DialogSkylandersManagerBinding mSkylandersBinding;
|
||||||
|
|
||||||
|
private static List<SkylanderSlot> sSkylanderSlots = new ArrayList<>();
|
||||||
|
|
||||||
private static final SparseIntArray buttonsActionsMap = new SparseIntArray();
|
private static final SparseIntArray buttonsActionsMap = new SparseIntArray();
|
||||||
|
|
||||||
@ -361,6 +384,14 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
|
|
||||||
if (NativeLibrary.IsGameMetadataValid())
|
if (NativeLibrary.IsGameMetadataValid())
|
||||||
setTitle(NativeLibrary.GetCurrentTitleDescription());
|
setTitle(NativeLibrary.GetCurrentTitleDescription());
|
||||||
|
|
||||||
|
if (sSkylanderSlots.isEmpty())
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
sSkylanderSlots.add(new SkylanderSlot(getString(R.string.skylander_slot, i + 1), i));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -373,6 +404,10 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
outState.putStringArray(EXTRA_SELECTED_GAMES, mPaths);
|
outState.putStringArray(EXTRA_SELECTED_GAMES, mPaths);
|
||||||
outState.putBoolean(EXTRA_USER_PAUSED_EMULATION, sUserPausedEmulation);
|
outState.putBoolean(EXTRA_USER_PAUSED_EMULATION, sUserPausedEmulation);
|
||||||
outState.putBoolean(EXTRA_MENU_TOAST_SHOWN, mMenuToastShown);
|
outState.putBoolean(EXTRA_MENU_TOAST_SHOWN, mMenuToastShown);
|
||||||
|
outState.putInt(EXTRA_SKYLANDER_SLOT, mSkylanderSlot);
|
||||||
|
outState.putInt(EXTRA_SKYLANDER_ID, mSkylanderData.getId());
|
||||||
|
outState.putInt(EXTRA_SKYLANDER_VAR, mSkylanderData.getVar());
|
||||||
|
outState.putString(EXTRA_SKYLANDER_NAME, mSkylanderData.getName());
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,6 +416,10 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
mPaths = savedInstanceState.getStringArray(EXTRA_SELECTED_GAMES);
|
mPaths = savedInstanceState.getStringArray(EXTRA_SELECTED_GAMES);
|
||||||
sUserPausedEmulation = savedInstanceState.getBoolean(EXTRA_USER_PAUSED_EMULATION);
|
sUserPausedEmulation = savedInstanceState.getBoolean(EXTRA_USER_PAUSED_EMULATION);
|
||||||
mMenuToastShown = savedInstanceState.getBoolean(EXTRA_MENU_TOAST_SHOWN);
|
mMenuToastShown = savedInstanceState.getBoolean(EXTRA_MENU_TOAST_SHOWN);
|
||||||
|
mSkylanderSlot = savedInstanceState.getInt(EXTRA_SKYLANDER_SLOT);
|
||||||
|
mSkylanderData = new Skylander(savedInstanceState.getInt(EXTRA_SKYLANDER_ID),
|
||||||
|
savedInstanceState.getInt(EXTRA_SKYLANDER_VAR),
|
||||||
|
savedInstanceState.getString(EXTRA_SKYLANDER_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -486,13 +525,40 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
protected void onActivityResult(int requestCode, int resultCode, Intent result)
|
protected void onActivityResult(int requestCode, int resultCode, Intent result)
|
||||||
{
|
{
|
||||||
super.onActivityResult(requestCode, resultCode, result);
|
super.onActivityResult(requestCode, resultCode, result);
|
||||||
if (requestCode == REQUEST_CHANGE_DISC)
|
// If the user picked a file, as opposed to just backing out.
|
||||||
|
if (resultCode == RESULT_OK)
|
||||||
{
|
{
|
||||||
// If the user picked a file, as opposed to just backing out.
|
if (requestCode == REQUEST_CHANGE_DISC)
|
||||||
if (resultCode == RESULT_OK)
|
|
||||||
{
|
{
|
||||||
NativeLibrary.ChangeDisc(result.getData().toString());
|
NativeLibrary.ChangeDisc(result.getData().toString());
|
||||||
}
|
}
|
||||||
|
else if (requestCode == REQUEST_SKYLANDER_FILE)
|
||||||
|
{
|
||||||
|
Pair<Integer, String> slot =
|
||||||
|
SkylanderConfig.loadSkylander(sSkylanderSlots.get(mSkylanderSlot).getPortalSlot(),
|
||||||
|
result.getData().toString());
|
||||||
|
clearSkylander(mSkylanderSlot);
|
||||||
|
sSkylanderSlots.get(mSkylanderSlot).setPortalSlot(slot.first);
|
||||||
|
sSkylanderSlots.get(mSkylanderSlot).setLabel(slot.second);
|
||||||
|
mSkylandersBinding.skylandersManager.getAdapter().notifyItemChanged(mSkylanderSlot);
|
||||||
|
mSkylanderSlot = -1;
|
||||||
|
mSkylanderData = Skylander.BLANK_SKYLANDER;
|
||||||
|
}
|
||||||
|
else if (requestCode == REQUEST_CREATE_SKYLANDER)
|
||||||
|
{
|
||||||
|
if (!(mSkylanderData.getId() == -1) && !(mSkylanderData.getVar() == -1))
|
||||||
|
{
|
||||||
|
Pair<Integer, String> slot = SkylanderConfig.createSkylander(mSkylanderData.getId(),
|
||||||
|
mSkylanderData.getVar(),
|
||||||
|
result.getData().toString(), sSkylanderSlots.get(mSkylanderSlot).getPortalSlot());
|
||||||
|
clearSkylander(mSkylanderSlot);
|
||||||
|
sSkylanderSlots.get(mSkylanderSlot).setPortalSlot(slot.first);
|
||||||
|
sSkylanderSlots.get(mSkylanderSlot).setLabel(slot.second);
|
||||||
|
mSkylandersBinding.skylandersManager.getAdapter().notifyItemChanged(mSkylanderSlot);
|
||||||
|
mSkylanderSlot = -1;
|
||||||
|
mSkylanderData = Skylander.BLANK_SKYLANDER;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -773,6 +839,10 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
SettingsActivity.launch(this, MenuTag.SETTINGS);
|
SettingsActivity.launch(this, MenuTag.SETTINGS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MENU_ACTION_SKYLANDERS:
|
||||||
|
showSkylanderPortalSettings();
|
||||||
|
break;
|
||||||
|
|
||||||
case MENU_ACTION_EXIT:
|
case MENU_ACTION_EXIT:
|
||||||
mEmulationFragment.stopEmulation();
|
mEmulationFragment.stopEmulation();
|
||||||
break;
|
break;
|
||||||
@ -1110,6 +1180,33 @@ public final class EmulationActivity extends AppCompatActivity implements ThemeP
|
|||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showSkylanderPortalSettings()
|
||||||
|
{
|
||||||
|
mSkylandersBinding =
|
||||||
|
DialogSkylandersManagerBinding.inflate(getLayoutInflater());
|
||||||
|
mSkylandersBinding.skylandersManager.setLayoutManager(new LinearLayoutManager(this));
|
||||||
|
|
||||||
|
mSkylandersBinding.skylandersManager.setAdapter(
|
||||||
|
new SkylanderSlotAdapter(sSkylanderSlots, this));
|
||||||
|
|
||||||
|
new MaterialAlertDialogBuilder(this)
|
||||||
|
.setTitle(R.string.skylanders_manager)
|
||||||
|
.setView(mSkylandersBinding.getRoot())
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSkylanderData(int id, int var, String name, int slot)
|
||||||
|
{
|
||||||
|
mSkylanderData = new Skylander(id, var, name);
|
||||||
|
mSkylanderSlot = slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearSkylander(int slot)
|
||||||
|
{
|
||||||
|
sSkylanderSlots.get(slot).setLabel(getString(R.string.skylander_slot, slot + 1));
|
||||||
|
mSkylandersBinding.skylandersManager.getAdapter().notifyItemChanged(slot);
|
||||||
|
}
|
||||||
|
|
||||||
private void resetOverlay()
|
private void resetOverlay()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this)
|
||||||
|
@ -89,6 +89,9 @@ public enum BooleanSetting implements AbstractBooleanSetting
|
|||||||
MAIN_DEBUG_JIT_REGISTER_CACHE_OFF(Settings.FILE_DOLPHIN, Settings.SECTION_DEBUG,
|
MAIN_DEBUG_JIT_REGISTER_CACHE_OFF(Settings.FILE_DOLPHIN, Settings.SECTION_DEBUG,
|
||||||
"JitRegisterCacheOff", false),
|
"JitRegisterCacheOff", false),
|
||||||
|
|
||||||
|
MAIN_EMULATE_SKYLANDER_PORTAL(Settings.FILE_DOLPHIN, Settings.SECTION_EMULATED_USB_DEVICES,
|
||||||
|
"EmulateSkylanderPortal", false),
|
||||||
|
|
||||||
MAIN_SHOW_GAME_TITLES(Settings.FILE_DOLPHIN, Settings.SECTION_INI_ANDROID,
|
MAIN_SHOW_GAME_TITLES(Settings.FILE_DOLPHIN, Settings.SECTION_INI_ANDROID,
|
||||||
"ShowGameTitles", true),
|
"ShowGameTitles", true),
|
||||||
MAIN_USE_BLACK_BACKGROUNDS(Settings.FILE_DOLPHIN, Settings.SECTION_INI_ANDROID,
|
MAIN_USE_BLACK_BACKGROUNDS(Settings.FILE_DOLPHIN, Settings.SECTION_INI_ANDROID,
|
||||||
@ -273,6 +276,7 @@ public enum BooleanSetting implements AbstractBooleanSetting
|
|||||||
MAIN_RAM_OVERRIDE_ENABLE,
|
MAIN_RAM_OVERRIDE_ENABLE,
|
||||||
MAIN_CUSTOM_RTC_ENABLE,
|
MAIN_CUSTOM_RTC_ENABLE,
|
||||||
MAIN_DSP_JIT,
|
MAIN_DSP_JIT,
|
||||||
|
MAIN_EMULATE_SKYLANDER_PORTAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Set<BooleanSetting> NOT_RUNTIME_EDITABLE =
|
private static final Set<BooleanSetting> NOT_RUNTIME_EDITABLE =
|
||||||
|
@ -42,6 +42,7 @@ public class Settings implements Closeable
|
|||||||
public static final String SECTION_GFX_HACKS = "Hacks";
|
public static final String SECTION_GFX_HACKS = "Hacks";
|
||||||
|
|
||||||
public static final String SECTION_DEBUG = "Debug";
|
public static final String SECTION_DEBUG = "Debug";
|
||||||
|
public static final String SECTION_EMULATED_USB_DEVICES = "EmulatedUSBDevices";
|
||||||
|
|
||||||
public static final String SECTION_STEREOSCOPY = "Stereoscopy";
|
public static final String SECTION_STEREOSCOPY = "Stereoscopy";
|
||||||
|
|
||||||
|
@ -263,7 +263,9 @@ public final class SettingsFragmentPresenter
|
|||||||
{
|
{
|
||||||
sl.add(new SubmenuSetting(mContext, R.string.gcpad_settings, MenuTag.GCPAD_TYPE));
|
sl.add(new SubmenuSetting(mContext, R.string.gcpad_settings, MenuTag.GCPAD_TYPE));
|
||||||
if (mSettings.isWii())
|
if (mSettings.isWii())
|
||||||
|
{
|
||||||
sl.add(new SubmenuSetting(mContext, R.string.wiimote_settings, MenuTag.WIIMOTE));
|
sl.add(new SubmenuSetting(mContext, R.string.wiimote_settings, MenuTag.WIIMOTE));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sl.add(new HeaderSetting(mContext, R.string.setting_clear_info, 0));
|
sl.add(new HeaderSetting(mContext, R.string.setting_clear_info, 0));
|
||||||
@ -633,6 +635,10 @@ public final class SettingsFragmentPresenter
|
|||||||
R.string.wiimote_scanning, R.string.wiimote_scanning_description));
|
R.string.wiimote_scanning, R.string.wiimote_scanning_description));
|
||||||
sl.add(new SwitchSetting(mContext, BooleanSetting.MAIN_WIIMOTE_ENABLE_SPEAKER,
|
sl.add(new SwitchSetting(mContext, BooleanSetting.MAIN_WIIMOTE_ENABLE_SPEAKER,
|
||||||
R.string.wiimote_speaker, R.string.wiimote_speaker_description));
|
R.string.wiimote_speaker, R.string.wiimote_speaker_description));
|
||||||
|
|
||||||
|
sl.add(new HeaderSetting(mContext, R.string.emulated_usb_devices, 0));
|
||||||
|
sl.add(new SwitchSetting(mContext, BooleanSetting.MAIN_EMULATE_SKYLANDER_PORTAL,
|
||||||
|
R.string.emulate_skylander_portal, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addAdvancedSettings(ArrayList<SettingsItem> sl)
|
private void addAdvancedSettings(ArrayList<SettingsItem> sl)
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
package org.dolphinemu.dolphinemu.features.skylanders;
|
||||||
|
|
||||||
|
import android.util.Pair;
|
||||||
|
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.model.SkylanderPair;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class SkylanderConfig
|
||||||
|
{
|
||||||
|
public static final Map<SkylanderPair, String> LIST_SKYLANDERS;
|
||||||
|
public static final Map<String, SkylanderPair> REVERSE_LIST_SKYLANDERS;
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
LIST_SKYLANDERS = getSkylanderMap();
|
||||||
|
REVERSE_LIST_SKYLANDERS = getInverseSkylanderMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static native Map<SkylanderPair, String> getSkylanderMap();
|
||||||
|
|
||||||
|
public static native Map<String, SkylanderPair> getInverseSkylanderMap();
|
||||||
|
|
||||||
|
public static native boolean removeSkylander(int slot);
|
||||||
|
|
||||||
|
public static native Pair<Integer, String> loadSkylander(int slot, String fileName);
|
||||||
|
|
||||||
|
public static native Pair<Integer, String> createSkylander(int id, int var, String fileName,
|
||||||
|
int slot);
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
package org.dolphinemu.dolphinemu.features.skylanders.model;
|
||||||
|
|
||||||
|
public class Skylander
|
||||||
|
{
|
||||||
|
private SkylanderPair mPair;
|
||||||
|
private String mName;
|
||||||
|
|
||||||
|
public final static Skylander BLANK_SKYLANDER = new Skylander(-1, -1, "Blank");
|
||||||
|
|
||||||
|
public Skylander(int id, int var, String name)
|
||||||
|
{
|
||||||
|
mPair = new SkylanderPair(id, var);
|
||||||
|
mName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return mName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.mName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId()
|
||||||
|
{
|
||||||
|
return mPair.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVar()
|
||||||
|
{
|
||||||
|
return mPair.getVar();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
package org.dolphinemu.dolphinemu.features.skylanders.model;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
public class SkylanderPair
|
||||||
|
{
|
||||||
|
private int mId;
|
||||||
|
private int mVar;
|
||||||
|
|
||||||
|
public SkylanderPair(int id, int var)
|
||||||
|
{
|
||||||
|
mId = id;
|
||||||
|
mVar = var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId()
|
||||||
|
{
|
||||||
|
return mId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int mId)
|
||||||
|
{
|
||||||
|
this.mId = mId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVar()
|
||||||
|
{
|
||||||
|
return mVar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVar(int mVar)
|
||||||
|
{
|
||||||
|
this.mVar = mVar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int hashCode()
|
||||||
|
{
|
||||||
|
return (mId << 16) + mVar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public boolean equals(@Nullable Object obj)
|
||||||
|
{
|
||||||
|
if (!(obj instanceof SkylanderPair))
|
||||||
|
return false;
|
||||||
|
SkylanderPair pairObj = (SkylanderPair) obj;
|
||||||
|
if (pairObj.getId() != mId)
|
||||||
|
return false;
|
||||||
|
if (pairObj.getVar() != mVar)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
package org.dolphinemu.dolphinemu.features.skylanders.ui;
|
||||||
|
|
||||||
|
public class SkylanderSlot
|
||||||
|
{
|
||||||
|
private String mLabel;
|
||||||
|
private final int mSlotNum;
|
||||||
|
private int mPortalSlot;
|
||||||
|
|
||||||
|
public SkylanderSlot(String label, int slot)
|
||||||
|
{
|
||||||
|
mLabel = label;
|
||||||
|
mSlotNum = slot;
|
||||||
|
mPortalSlot = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel()
|
||||||
|
{
|
||||||
|
return mLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label)
|
||||||
|
{
|
||||||
|
mLabel = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSlotNum()
|
||||||
|
{
|
||||||
|
return mSlotNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPortalSlot()
|
||||||
|
{
|
||||||
|
return mPortalSlot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPortalSlot(int mPortalSlot)
|
||||||
|
{
|
||||||
|
this.mPortalSlot = mPortalSlot;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,160 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
package org.dolphinemu.dolphinemu.features.skylanders.ui;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
|
import org.dolphinemu.dolphinemu.R;
|
||||||
|
import org.dolphinemu.dolphinemu.activities.EmulationActivity;
|
||||||
|
import org.dolphinemu.dolphinemu.databinding.DialogCreateSkylanderBinding;
|
||||||
|
import org.dolphinemu.dolphinemu.databinding.ListItemSkylanderSlotBinding;
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.SkylanderConfig;
|
||||||
|
import org.dolphinemu.dolphinemu.features.skylanders.model.SkylanderPair;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SkylanderSlotAdapter extends RecyclerView.Adapter<SkylanderSlotAdapter.ViewHolder>
|
||||||
|
implements AdapterView.OnItemClickListener
|
||||||
|
{
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder
|
||||||
|
{
|
||||||
|
public ListItemSkylanderSlotBinding binding;
|
||||||
|
|
||||||
|
public ViewHolder(@NonNull ListItemSkylanderSlotBinding binding)
|
||||||
|
{
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.binding = binding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private final List<SkylanderSlot> mSlots;
|
||||||
|
private final EmulationActivity mActivity;
|
||||||
|
|
||||||
|
private DialogCreateSkylanderBinding mBinding;
|
||||||
|
|
||||||
|
public SkylanderSlotAdapter(List<SkylanderSlot> slots, EmulationActivity context)
|
||||||
|
{
|
||||||
|
mSlots = slots;
|
||||||
|
mActivity = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public SkylanderSlotAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||||
|
{
|
||||||
|
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||||
|
ListItemSkylanderSlotBinding binding =
|
||||||
|
ListItemSkylanderSlotBinding.inflate(inflater, parent, false);
|
||||||
|
return new ViewHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position)
|
||||||
|
{
|
||||||
|
SkylanderSlot slot = mSlots.get(position);
|
||||||
|
holder.binding.textSkylanderName.setText(slot.getLabel());
|
||||||
|
|
||||||
|
holder.binding.buttonClearSkylander.setOnClickListener(v ->
|
||||||
|
{
|
||||||
|
SkylanderConfig.removeSkylander(slot.getPortalSlot());
|
||||||
|
mActivity.clearSkylander(slot.getSlotNum());
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.binding.buttonLoadSkylander.setOnClickListener(v ->
|
||||||
|
{
|
||||||
|
Intent loadSkylander = new Intent(Intent.ACTION_OPEN_DOCUMENT);
|
||||||
|
loadSkylander.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
|
loadSkylander.setType("*/*");
|
||||||
|
mActivity.setSkylanderData(0, 0, "", position);
|
||||||
|
mActivity.startActivityForResult(loadSkylander, EmulationActivity.REQUEST_SKYLANDER_FILE);
|
||||||
|
});
|
||||||
|
|
||||||
|
LayoutInflater inflater = LayoutInflater.from(mActivity);
|
||||||
|
mBinding = DialogCreateSkylanderBinding.inflate(inflater);
|
||||||
|
|
||||||
|
List<String> skylanderNames = new ArrayList<>(SkylanderConfig.REVERSE_LIST_SKYLANDERS.keySet());
|
||||||
|
skylanderNames.sort(String::compareToIgnoreCase);
|
||||||
|
|
||||||
|
mBinding.skylanderDropdown.setAdapter(
|
||||||
|
new ArrayAdapter<>(mActivity, R.layout.support_simple_spinner_dropdown_item,
|
||||||
|
skylanderNames));
|
||||||
|
mBinding.skylanderDropdown.setOnItemClickListener(this);
|
||||||
|
|
||||||
|
holder.binding.buttonCreateSkylander.setOnClickListener(v ->
|
||||||
|
{
|
||||||
|
if (mBinding.getRoot().getParent() != null)
|
||||||
|
{
|
||||||
|
((ViewGroup) mBinding.getRoot().getParent()).removeAllViews();
|
||||||
|
}
|
||||||
|
AlertDialog createDialog = new MaterialAlertDialogBuilder(mActivity)
|
||||||
|
.setTitle(R.string.create_skylander_title)
|
||||||
|
.setView(mBinding.getRoot())
|
||||||
|
.setPositiveButton(R.string.create_skylander, null)
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show();
|
||||||
|
createDialog.getButton(android.app.AlertDialog.BUTTON_POSITIVE).setOnClickListener(
|
||||||
|
v1 ->
|
||||||
|
{
|
||||||
|
if (!mBinding.skylanderId.getText().toString().isBlank() &&
|
||||||
|
!mBinding.skylanderVar.getText().toString().isBlank())
|
||||||
|
{
|
||||||
|
Intent createSkylander = new Intent(Intent.ACTION_CREATE_DOCUMENT);
|
||||||
|
createSkylander.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
|
createSkylander.setType("*/*");
|
||||||
|
int id = Integer.parseInt(mBinding.skylanderId.getText().toString());
|
||||||
|
int var = Integer.parseInt(mBinding.skylanderVar.getText().toString());
|
||||||
|
String name = SkylanderConfig.LIST_SKYLANDERS.get(new SkylanderPair(id, var));
|
||||||
|
if (name != null)
|
||||||
|
{
|
||||||
|
createSkylander.putExtra(Intent.EXTRA_TITLE,
|
||||||
|
name + ".sky");
|
||||||
|
mActivity.setSkylanderData(id, var, name, position);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
createSkylander.putExtra(Intent.EXTRA_TITLE,
|
||||||
|
"Unknown(ID" + id + "Var" + var + ").sky");
|
||||||
|
mActivity.setSkylanderData(id, var, "Unknown", position);
|
||||||
|
}
|
||||||
|
mActivity.startActivityForResult(createSkylander,
|
||||||
|
EmulationActivity.REQUEST_CREATE_SKYLANDER);
|
||||||
|
createDialog.dismiss();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Toast.makeText(mActivity, R.string.invalid_skylander,
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount()
|
||||||
|
{
|
||||||
|
return mSlots.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||||
|
{
|
||||||
|
SkylanderPair skylanderIdVar =
|
||||||
|
SkylanderConfig.REVERSE_LIST_SKYLANDERS.get(parent.getItemAtPosition(position));
|
||||||
|
mBinding.skylanderId.setText(String.valueOf(skylanderIdVar.getId()));
|
||||||
|
mBinding.skylanderVar.setText(String.valueOf(skylanderIdVar.getVar()));
|
||||||
|
}
|
||||||
|
}
|
@ -60,6 +60,7 @@ public final class MenuFragment extends Fragment implements View.OnClickListener
|
|||||||
buttonsActionsMap.append(R.id.menu_change_disc, EmulationActivity.MENU_ACTION_CHANGE_DISC);
|
buttonsActionsMap.append(R.id.menu_change_disc, EmulationActivity.MENU_ACTION_CHANGE_DISC);
|
||||||
buttonsActionsMap.append(R.id.menu_exit, EmulationActivity.MENU_ACTION_EXIT);
|
buttonsActionsMap.append(R.id.menu_exit, EmulationActivity.MENU_ACTION_EXIT);
|
||||||
buttonsActionsMap.append(R.id.menu_settings, EmulationActivity.MENU_ACTION_SETTINGS);
|
buttonsActionsMap.append(R.id.menu_settings, EmulationActivity.MENU_ACTION_SETTINGS);
|
||||||
|
buttonsActionsMap.append(R.id.menu_skylanders, EmulationActivity.MENU_ACTION_SKYLANDERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private FragmentIngameMenuBinding mBinding;
|
private FragmentIngameMenuBinding mBinding;
|
||||||
@ -110,6 +111,12 @@ public final class MenuFragment extends Fragment implements View.OnClickListener
|
|||||||
if (!getArguments().getBoolean(KEY_WII, true))
|
if (!getArguments().getBoolean(KEY_WII, true))
|
||||||
{
|
{
|
||||||
mBinding.menuRefreshWiimotes.setVisibility(View.GONE);
|
mBinding.menuRefreshWiimotes.setVisibility(View.GONE);
|
||||||
|
mBinding.menuSkylanders.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!BooleanSetting.MAIN_EMULATE_SKYLANDER_PORTAL.getBooleanGlobal())
|
||||||
|
{
|
||||||
|
mBinding.menuSkylanders.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinearLayout options = mBinding.layoutOptions;
|
LinearLayout options = mBinding.layoutOptions;
|
||||||
|
9
Source/Android/app/src/main/res/drawable/ic_clear.xml
Normal file
9
Source/Android/app/src/main/res/drawable/ic_clear.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12 19,6.41z"/>
|
||||||
|
</vector>
|
9
Source/Android/app/src/main/res/drawable/ic_load.xml
Normal file
9
Source/Android/app/src/main/res/drawable/ic_load.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/colorControlNormal"
|
||||||
|
android:pathData="M6,20Q5.175,20 4.588,19.413Q4,18.825 4,18V15H6V18Q6,18 6,18Q6,18 6,18H18Q18,18 18,18Q18,18 18,18V15H20V18Q20,18.825 19.413,19.413Q18.825,20 18,20ZM11,16V7.85L8.4,10.45L7,9L12,4L17,9L15.6,10.45L13,7.85V16Z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/root"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="@dimen/spacing_medlarge">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/layout_skylander_dropdown"
|
||||||
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/spacing_medlarge"
|
||||||
|
android:paddingHorizontal="@dimen/spacing_medlarge"
|
||||||
|
android:hint="@string/skylander_label"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||||
|
android:id="@+id/skylander_dropdown"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:spinnerMode="dialog"
|
||||||
|
android:imeOptions="actionDone" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/layout_skylander_dropdown"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:baselineAligned="false">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/layout_skylander_id"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/skylander_id"
|
||||||
|
android:paddingHorizontal="@dimen/spacing_medlarge">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/skylander_id"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/layout_skylander_var"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/skylander_variant"
|
||||||
|
android:paddingHorizontal="@dimen/spacing_medlarge">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/skylander_var"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="number" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/skylanders_manager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:fadeScrollbars="false"/>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
@ -101,6 +101,11 @@
|
|||||||
android:text="@string/emulation_change_disc"
|
android:text="@string/emulation_change_disc"
|
||||||
style="@style/InGameMenuOption" />
|
style="@style/InGameMenuOption" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_skylanders"
|
||||||
|
android:text="@string/emulate_skylander_portal"
|
||||||
|
style="@style/InGameMenuOption" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout android:id="@+id/root"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="@dimen/spacing_medlarge">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_create_skylander"
|
||||||
|
style="?attr/materialIconButtonFilledTonalStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_small"
|
||||||
|
android:layout_toStartOf="@id/button_load_skylander"
|
||||||
|
android:contentDescription="@string/create_skylander"
|
||||||
|
android:tooltipText="@string/create_skylander"
|
||||||
|
app:icon="@drawable/ic_add" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_load_skylander"
|
||||||
|
style="?attr/materialIconButtonFilledTonalStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_small"
|
||||||
|
android:layout_toStartOf="@+id/button_clear_skylander"
|
||||||
|
android:contentDescription="@string/load_skylander"
|
||||||
|
android:tooltipText="@string/load_skylander"
|
||||||
|
app:icon="@drawable/ic_load" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_clear_skylander"
|
||||||
|
style="?attr/materialIconButtonFilledTonalStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_large"
|
||||||
|
android:contentDescription="@string/remove_skylander"
|
||||||
|
android:tooltipText="@string/remove_skylander"
|
||||||
|
app:icon="@drawable/ic_clear" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/text_skylander_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginBottom="@dimen/spacing_medlarge"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_large"
|
||||||
|
android:layout_marginStart="@dimen/spacing_large"
|
||||||
|
android:layout_toStartOf="@+id/button_create_skylander"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnSurface"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="Wii Remote with Motion Plus Pointing" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -909,4 +909,18 @@ It can efficiently compress both junk data and encrypted Wii data.
|
|||||||
<string name="about_support"><a href="https://forums.dolphin-emu.org/">Support</a></string>
|
<string name="about_support"><a href="https://forums.dolphin-emu.org/">Support</a></string>
|
||||||
<string name="about_copyright_warning">\u00A9 2003–2015+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.</string>
|
<string name="about_copyright_warning">\u00A9 2003–2015+ Dolphin Team. \u201cGameCube\u201d and \u201cWii\u201d are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.</string>
|
||||||
|
|
||||||
|
<!-- Emulated USB Devices -->
|
||||||
|
<string name="emulated_usb_devices">Emulated USB Devices</string>
|
||||||
|
<string name="emulate_skylander_portal">Skylanders Portal</string>
|
||||||
|
<string name="skylanders_manager">Skylanders Manager</string>
|
||||||
|
<string name="load_skylander">Load</string>
|
||||||
|
<string name="remove_skylander">Remove</string>
|
||||||
|
<string name="create_skylander">Create</string>
|
||||||
|
<string name="create_skylander_title">Create Skylander</string>
|
||||||
|
<string name="skylander_label">Skylander</string>
|
||||||
|
<string name="skylander_slot">Slot %1$d</string>
|
||||||
|
<string name="skylander_id">ID</string>
|
||||||
|
<string name="skylander_variant">Variant</string>
|
||||||
|
<string name="invalid_skylander">Invalid Skylander Selection</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -14,6 +14,7 @@ add_library(main SHARED
|
|||||||
IniFile.cpp
|
IniFile.cpp
|
||||||
MainAndroid.cpp
|
MainAndroid.cpp
|
||||||
RiivolutionPatches.cpp
|
RiivolutionPatches.cpp
|
||||||
|
SkylanderConfig.cpp
|
||||||
WiiUtils.cpp
|
WiiUtils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
168
Source/Android/jni/SkylanderConfig.cpp
Normal file
168
Source/Android/jni/SkylanderConfig.cpp
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
// Copyright 2023 Dolphin Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <jni.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
#include "AndroidCommon/AndroidCommon.h"
|
||||||
|
#include "Core/IOS/USB/Emulated/Skylander.h"
|
||||||
|
#include "Core/System.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
JNIEXPORT jobject JNICALL
|
||||||
|
Java_org_dolphinemu_dolphinemu_features_skylanders_SkylanderConfig_getSkylanderMap(JNIEnv* env,
|
||||||
|
jclass clazz)
|
||||||
|
{
|
||||||
|
jclass hash_map_class = env->FindClass("java/util/HashMap");
|
||||||
|
jmethodID hash_map_init = env->GetMethodID(hash_map_class, "<init>", "(I)V");
|
||||||
|
jobject hash_map_obj = env->NewObject(hash_map_class, hash_map_init,
|
||||||
|
static_cast<u16>(IOS::HLE::USB::list_skylanders.size()));
|
||||||
|
jmethodID hash_map_put = env->GetMethodID(
|
||||||
|
hash_map_class, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
|
||||||
|
|
||||||
|
jclass skylander_class =
|
||||||
|
env->FindClass("org/dolphinemu/dolphinemu/features/skylanders/model/SkylanderPair");
|
||||||
|
|
||||||
|
jmethodID skylander_init = env->GetMethodID(skylander_class, "<init>", "(II)V");
|
||||||
|
|
||||||
|
for (const auto& it : IOS::HLE::USB::list_skylanders)
|
||||||
|
{
|
||||||
|
const std::string& name = it.second;
|
||||||
|
jobject skylander_obj =
|
||||||
|
env->NewObject(skylander_class, skylander_init, it.first.first, it.first.second);
|
||||||
|
env->CallObjectMethod(hash_map_obj, hash_map_put, skylander_obj, ToJString(env, name));
|
||||||
|
env->DeleteLocalRef(skylander_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hash_map_obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jobject JNICALL
|
||||||
|
Java_org_dolphinemu_dolphinemu_features_skylanders_SkylanderConfig_getInverseSkylanderMap(
|
||||||
|
JNIEnv* env, jclass clazz)
|
||||||
|
{
|
||||||
|
jclass hash_map_class = env->FindClass("java/util/HashMap");
|
||||||
|
jmethodID hash_map_init = env->GetMethodID(hash_map_class, "<init>", "(I)V");
|
||||||
|
jobject hash_map_obj = env->NewObject(hash_map_class, hash_map_init,
|
||||||
|
static_cast<u16>(IOS::HLE::USB::list_skylanders.size()));
|
||||||
|
jmethodID hash_map_put = env->GetMethodID(
|
||||||
|
hash_map_class, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
|
||||||
|
|
||||||
|
jclass skylander_class =
|
||||||
|
env->FindClass("org/dolphinemu/dolphinemu/features/skylanders/model/SkylanderPair");
|
||||||
|
|
||||||
|
jmethodID skylander_init = env->GetMethodID(skylander_class, "<init>", "(II)V");
|
||||||
|
|
||||||
|
for (const auto& it : IOS::HLE::USB::list_skylanders)
|
||||||
|
{
|
||||||
|
const std::string& name = it.second;
|
||||||
|
jobject skylander_obj =
|
||||||
|
env->NewObject(skylander_class, skylander_init, it.first.first, it.first.second);
|
||||||
|
env->CallObjectMethod(hash_map_obj, hash_map_put, ToJString(env, name), skylander_obj);
|
||||||
|
env->DeleteLocalRef(skylander_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hash_map_obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jboolean JNICALL
|
||||||
|
Java_org_dolphinemu_dolphinemu_features_skylanders_SkylanderConfig_removeSkylander(JNIEnv* env,
|
||||||
|
jclass clazz,
|
||||||
|
jint slot)
|
||||||
|
{
|
||||||
|
auto& system = Core::System::GetInstance();
|
||||||
|
return static_cast<jboolean>(system.GetSkylanderPortal().RemoveSkylander(slot));
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jobject JNICALL
|
||||||
|
Java_org_dolphinemu_dolphinemu_features_skylanders_SkylanderConfig_loadSkylander(JNIEnv* env,
|
||||||
|
jclass clazz,
|
||||||
|
jint slot,
|
||||||
|
jstring file_name)
|
||||||
|
{
|
||||||
|
File::IOFile sky_file(GetJString(env, file_name), "r+b");
|
||||||
|
if (!sky_file)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
std::array<u8, 0x40 * 0x10> file_data;
|
||||||
|
if (!sky_file.ReadBytes(file_data.data(), file_data.size()))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
jclass pair_class = env->FindClass("android/util/Pair");
|
||||||
|
jmethodID pair_init =
|
||||||
|
env->GetMethodID(pair_class, "<init>", "(Ljava/lang/Object;Ljava/lang/Object;)V");
|
||||||
|
jclass integer_class = env->FindClass("java/lang/Integer");
|
||||||
|
jmethodID int_init = env->GetMethodID(integer_class, "<init>", "(I)V");
|
||||||
|
|
||||||
|
auto& system = Core::System::GetInstance();
|
||||||
|
system.GetSkylanderPortal().RemoveSkylander(slot);
|
||||||
|
std::string name = "Unknown";
|
||||||
|
|
||||||
|
std::pair<u16, u16> id_var = system.GetSkylanderPortal().CalculateIDs(file_data);
|
||||||
|
|
||||||
|
const auto it = IOS::HLE::USB::list_skylanders.find(std::make_pair(id_var.first, id_var.second));
|
||||||
|
|
||||||
|
if (it != IOS::HLE::USB::list_skylanders.end())
|
||||||
|
{
|
||||||
|
name = it->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
return env->NewObject(pair_class, pair_init,
|
||||||
|
env->NewObject(integer_class, int_init,
|
||||||
|
system.GetSkylanderPortal().LoadSkylander(
|
||||||
|
file_data.data(), std::move(sky_file))),
|
||||||
|
ToJString(env, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jobject JNICALL
|
||||||
|
Java_org_dolphinemu_dolphinemu_features_skylanders_SkylanderConfig_createSkylander(
|
||||||
|
JNIEnv* env, jclass clazz, jint id, jint var, jstring fileName, jint slot)
|
||||||
|
{
|
||||||
|
u16 sky_id = static_cast<u16>(id);
|
||||||
|
u16 sky_var = static_cast<u16>(var);
|
||||||
|
|
||||||
|
std::string file_name = GetJString(env, fileName);
|
||||||
|
|
||||||
|
auto& system = Core::System::GetInstance();
|
||||||
|
system.GetSkylanderPortal().CreateSkylander(file_name, sky_id, sky_var);
|
||||||
|
system.GetSkylanderPortal().RemoveSkylander(slot);
|
||||||
|
|
||||||
|
jclass pair_class = env->FindClass("android/util/Pair");
|
||||||
|
jmethodID pair_init =
|
||||||
|
env->GetMethodID(pair_class, "<init>", "(Ljava/lang/Object;Ljava/lang/Object;)V");
|
||||||
|
|
||||||
|
jclass integer_class = env->FindClass("java/lang/Integer");
|
||||||
|
jmethodID integer_init = env->GetMethodID(integer_class, "<init>", "(I)V");
|
||||||
|
|
||||||
|
File::IOFile sky_file(file_name, "r+b");
|
||||||
|
if (!sky_file)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
std::array<u8, 0x40 * 0x10> file_data;
|
||||||
|
if (!sky_file.ReadBytes(file_data.data(), file_data.size()))
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string name = "Unknown";
|
||||||
|
|
||||||
|
const auto it = IOS::HLE::USB::list_skylanders.find(std::make_pair(sky_id, sky_var));
|
||||||
|
|
||||||
|
if (it != IOS::HLE::USB::list_skylanders.end())
|
||||||
|
{
|
||||||
|
name = it->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
return env->NewObject(pair_class, pair_init,
|
||||||
|
env->NewObject(integer_class, integer_init,
|
||||||
|
system.GetSkylanderPortal().LoadSkylander(
|
||||||
|
file_data.data(), std::move(sky_file))),
|
||||||
|
ToJString(env, name));
|
||||||
|
}
|
||||||
|
}
|
@ -17,6 +17,489 @@
|
|||||||
|
|
||||||
namespace IOS::HLE::USB
|
namespace IOS::HLE::USB
|
||||||
{
|
{
|
||||||
|
const std::map<const std::pair<const u16, const u16>, const char*> 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 Seargeant"},
|
||||||
|
{{21, 0x1801}, "Series 2 Drill Seargeant"},
|
||||||
|
{{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, 0x0000}, "Dragonfire Cannon"},
|
||||||
|
{{208, 0x1602}, "Golden Dragonfire Cannon"},
|
||||||
|
{{209, 0x0000}, "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, 0x0000}, "Whisper Elf"},
|
||||||
|
{{540, 0x0000}, "Barkley"},
|
||||||
|
{{540, 0x3402}, "Gnarly Barkley"},
|
||||||
|
{{541, 0x0000}, "Thumpling"},
|
||||||
|
{{514, 0x0000}, "Gill Runt"},
|
||||||
|
{{542, 0x0000}, "Mini-Jini"},
|
||||||
|
{{503, 0x0000}, "Spry"},
|
||||||
|
{{504, 0x0000}, "Hijinx"},
|
||||||
|
{{543, 0x0000}, "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, 0x0000}, "Battle Hammer"},
|
||||||
|
{{3201, 0x0000}, "Sky Diamond"},
|
||||||
|
{{3202, 0x0000}, "Platinum Sheep"},
|
||||||
|
{{3203, 0x0000}, "Groove Machine"},
|
||||||
|
{{3204, 0x0000}, "UFO Hat"},
|
||||||
|
{{3300, 0x0000}, "Sheep Wreck Island"},
|
||||||
|
{{3301, 0x0000}, "Tower of Time"},
|
||||||
|
{{3302, 0x0000}, "Fiery Forge"},
|
||||||
|
{{3303, 0x0000}, "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"},
|
||||||
|
{{3240, 0x0000}, "Barrel Blaster (Nintendo Only)"},
|
||||||
|
{{3240, 0x4402}, "Dark Barrel Blaster (Nintendo Only)"},
|
||||||
|
{{3239, 0x4402}, "Nitro Soda Skimmer"},
|
||||||
|
{{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"},
|
||||||
|
};
|
||||||
|
|
||||||
SkylanderUSB::SkylanderUSB(Kernel& ios, const std::string& device_name) : m_ios(ios)
|
SkylanderUSB::SkylanderUSB(Kernel& ios, const std::string& device_name) : m_ios(ios)
|
||||||
{
|
{
|
||||||
m_vid = 0x1430;
|
m_vid = 0x1430;
|
||||||
@ -852,4 +1335,15 @@ bool SkylanderPortal::IsBlockNumberValid(u8 block)
|
|||||||
return block < 64;
|
return block < 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::pair<u16, u16> SkylanderPortal::CalculateIDs(const std::array<u8, 0x40 * 0x10>& file_data)
|
||||||
|
{
|
||||||
|
u16 sky_id = file_data[0x11];
|
||||||
|
u16 sky_var = file_data[0x1D];
|
||||||
|
sky_id <<= 8;
|
||||||
|
sky_var <<= 8;
|
||||||
|
sky_id |= file_data[0x10];
|
||||||
|
sky_var |= file_data[0x1C];
|
||||||
|
return std::make_pair(sky_id, sky_var);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace IOS::HLE::USB
|
} // namespace IOS::HLE::USB
|
||||||
|
@ -19,6 +19,7 @@ constexpr u8 MAX_SKYLANDERS = 16;
|
|||||||
|
|
||||||
namespace IOS::HLE::USB
|
namespace IOS::HLE::USB
|
||||||
{
|
{
|
||||||
|
extern const std::map<const std::pair<const u16, const u16>, const char*> list_skylanders;
|
||||||
class SkylanderUSB final : public Device
|
class SkylanderUSB final : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -95,6 +96,7 @@ public:
|
|||||||
bool CreateSkylander(const std::string& file_path, u16 sky_id, u16 sky_var);
|
bool CreateSkylander(const std::string& file_path, u16 sky_id, u16 sky_var);
|
||||||
bool RemoveSkylander(u8 sky_num);
|
bool RemoveSkylander(u8 sky_num);
|
||||||
u8 LoadSkylander(u8* buf, File::IOFile in_file);
|
u8 LoadSkylander(u8* buf, File::IOFile in_file);
|
||||||
|
std::pair<u16, u16> CalculateIDs(const std::array<u8, 0x40 * 0x10>& file_data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::mutex sky_mutex;
|
std::mutex sky_mutex;
|
||||||
|
@ -36,489 +36,6 @@
|
|||||||
// static variable to ensure we open at the most recent Skylander file location
|
// static variable to ensure we open at the most recent Skylander file location
|
||||||
static QString s_last_skylander_path;
|
static QString s_last_skylander_path;
|
||||||
|
|
||||||
const std::map<const std::pair<const u16, const u16>, const char*> 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 Seargeant"},
|
|
||||||
{{21, 0x1801}, "Series 2 Drill Seargeant"},
|
|
||||||
{{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, 0x0000}, "Dragonfire Cannon"},
|
|
||||||
{{208, 0x1602}, "Golden Dragonfire Cannon"},
|
|
||||||
{{209, 0x0000}, "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, 0x0000}, "Whisper Elf"},
|
|
||||||
{{540, 0x0000}, "Barkley"},
|
|
||||||
{{540, 0x3402}, "Gnarly Barkley"},
|
|
||||||
{{541, 0x0000}, "Thumpling"},
|
|
||||||
{{514, 0x0000}, "Gill Runt"},
|
|
||||||
{{542, 0x0000}, "Mini-Jini"},
|
|
||||||
{{503, 0x0000}, "Spry"},
|
|
||||||
{{504, 0x0000}, "Hijinx"},
|
|
||||||
{{543, 0x0000}, "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, 0x0000}, "Battle Hammer"},
|
|
||||||
{{3201, 0x0000}, "Sky Diamond"},
|
|
||||||
{{3202, 0x0000}, "Platinum Sheep"},
|
|
||||||
{{3203, 0x0000}, "Groove Machine"},
|
|
||||||
{{3204, 0x0000}, "UFO Hat"},
|
|
||||||
{{3300, 0x0000}, "Sheep Wreck Island"},
|
|
||||||
{{3301, 0x0000}, "Tower of Time"},
|
|
||||||
{{3302, 0x0000}, "Fiery Forge"},
|
|
||||||
{{3303, 0x0000}, "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"},
|
|
||||||
{{3240, 0x0000}, "Barrel Blaster (Nintendo Only)"},
|
|
||||||
{{3240, 0x4402}, "Dark Barrel Blaster (Nintendo Only)"},
|
|
||||||
{{3239, 0x4402}, "Nitro Soda Skimmer"},
|
|
||||||
{{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"},
|
|
||||||
};
|
|
||||||
|
|
||||||
SkylanderPortalWindow::SkylanderPortalWindow(QWidget* parent) : QWidget(parent)
|
SkylanderPortalWindow::SkylanderPortalWindow(QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Skylanders Manager"));
|
setWindowTitle(tr("Skylanders Manager"));
|
||||||
@ -618,7 +135,7 @@ CreateSkylanderDialog::CreateSkylanderDialog(QWidget* parent) : QDialog(parent)
|
|||||||
|
|
||||||
auto* combo_skylist = new QComboBox();
|
auto* combo_skylist = new QComboBox();
|
||||||
QStringList filterlist;
|
QStringList filterlist;
|
||||||
for (const auto& entry : list_skylanders)
|
for (const auto& entry : IOS::HLE::USB::list_skylanders)
|
||||||
{
|
{
|
||||||
const uint qvar = (entry.first.first << 16) | entry.first.second;
|
const uint qvar = (entry.first.first << 16) | entry.first.second;
|
||||||
combo_skylist->addItem(QString::fromStdString(entry.second), QVariant(qvar));
|
combo_skylist->addItem(QString::fromStdString(entry.second), QVariant(qvar));
|
||||||
@ -692,8 +209,8 @@ CreateSkylanderDialog::CreateSkylanderDialog(QWidget* parent) : QDialog(parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString predef_name = s_last_skylander_path;
|
QString predef_name = s_last_skylander_path;
|
||||||
const auto found_sky = list_skylanders.find(std::make_pair(sky_id, sky_var));
|
const auto found_sky = IOS::HLE::USB::list_skylanders.find(std::make_pair(sky_id, sky_var));
|
||||||
if (found_sky != list_skylanders.end())
|
if (found_sky != IOS::HLE::USB::list_skylanders.end())
|
||||||
{
|
{
|
||||||
predef_name += QString::fromStdString(std::string(found_sky->second) + ".sky");
|
predef_name += QString::fromStdString(std::string(found_sky->second) + ".sky");
|
||||||
}
|
}
|
||||||
@ -790,19 +307,8 @@ void SkylanderPortalWindow::LoadSkylanderPath(u8 slot, const QString& path)
|
|||||||
|
|
||||||
ClearSkylander(slot);
|
ClearSkylander(slot);
|
||||||
|
|
||||||
u16 sky_id = file_data[0x11];
|
|
||||||
u16 sky_var = file_data[0x1D];
|
|
||||||
sky_id <<= 8;
|
|
||||||
sky_var <<= 8;
|
|
||||||
sky_id |= file_data[0x10];
|
|
||||||
sky_var |= file_data[0x1C];
|
|
||||||
|
|
||||||
DEBUG_LOG_FMT(IOS_USB, "Sky Id: {}, 0x10: {} 0x11: {}", sky_id, file_data[0x10], file_data[0x11]);
|
|
||||||
DEBUG_LOG_FMT(IOS_USB, "Sky Var: {}, 0x1D: {} 0x1C: {}", sky_var, file_data[0x1D],
|
|
||||||
file_data[0x1C]);
|
|
||||||
|
|
||||||
auto& system = Core::System::GetInstance();
|
auto& system = Core::System::GetInstance();
|
||||||
|
std::pair<u16, u16> id_var = system.GetSkylanderPortal().CalculateIDs(file_data);
|
||||||
u8 portal_slot = system.GetSkylanderPortal().LoadSkylander(file_data.data(), std::move(sky_file));
|
u8 portal_slot = system.GetSkylanderPortal().LoadSkylander(file_data.data(), std::move(sky_file));
|
||||||
if (portal_slot == 0xFF)
|
if (portal_slot == 0xFF)
|
||||||
{
|
{
|
||||||
@ -810,7 +316,7 @@ void SkylanderPortalWindow::LoadSkylanderPath(u8 slot, const QString& path)
|
|||||||
tr("Failed to load the Skylander file(%1)!\n").arg(path), QMessageBox::Ok);
|
tr("Failed to load the Skylander file(%1)!\n").arg(path), QMessageBox::Ok);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_sky_slots[slot] = {portal_slot, sky_id, sky_var};
|
m_sky_slots[slot] = {portal_slot, id_var.first, id_var.second};
|
||||||
UpdateEdits();
|
UpdateEdits();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -839,8 +345,8 @@ void SkylanderPortalWindow::UpdateEdits()
|
|||||||
QString display_string;
|
QString display_string;
|
||||||
if (auto sd = m_sky_slots[i])
|
if (auto sd = m_sky_slots[i])
|
||||||
{
|
{
|
||||||
auto found_sky = list_skylanders.find(std::make_pair(sd->sky_id, sd->sky_var));
|
auto found_sky = IOS::HLE::USB::list_skylanders.find(std::make_pair(sd->sky_id, sd->sky_var));
|
||||||
if (found_sky != list_skylanders.end())
|
if (found_sky != IOS::HLE::USB::list_skylanders.end())
|
||||||
{
|
{
|
||||||
display_string = QString::fromStdString(found_sky->second);
|
display_string = QString::fromStdString(found_sky->second);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user