diff --git a/CMakeLists.txt b/CMakeLists.txt index a70dea2fa3..af469ae70b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -983,13 +983,13 @@ if(HEADLESS) endif() set(NativeAppSource - android/jni/NativeApp.cpp - android/jni/EmuScreen.cpp - android/jni/TestRunner.cpp - android/jni/MenuScreens.cpp - android/jni/GamepadEmu.cpp - android/jni/UIShader.cpp - android/jni/ui_atlas.cpp) + UI/NativeApp.cpp + UI/EmuScreen.cpp + UI/TestRunner.cpp + UI/MenuScreens.cpp + UI/GamepadEmu.cpp + UI/UIShader.cpp + UI/ui_atlas.cpp) if(ANDROID) set(NativeAppSource ${NativeAppSource} android/jni/ArmEmitterTest.cpp) endif() diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters index 7fb8bd3b30..bad49cce4e 100644 --- a/Core/Core.vcxproj.filters +++ b/Core/Core.vcxproj.filters @@ -1,4 +1,4 @@ - + @@ -384,7 +384,6 @@ MIPS\ARM - Font @@ -395,6 +394,9 @@ HLE\Libraries + + HLE\Libraries + @@ -718,7 +720,6 @@ MIPS\ARM - Font @@ -728,6 +729,9 @@ HLE\Libraries + + HLE\Libraries + @@ -735,4 +739,4 @@ - + \ No newline at end of file diff --git a/Core/ELF/ParamSFO.h b/Core/ELF/ParamSFO.h index 119ec72b3b..85686a256a 100644 --- a/Core/ELF/ParamSFO.h +++ b/Core/ELF/ParamSFO.h @@ -18,8 +18,11 @@ #pragma once +#include #include +#include "Common/CommonTypes.h" + class ParamSFOData { public: diff --git a/Core/FileSystems/BlockDevices.cpp b/Core/FileSystems/BlockDevices.cpp index 4b74a422e1..bafadc50a6 100644 --- a/Core/FileSystems/BlockDevices.cpp +++ b/Core/FileSystems/BlockDevices.cpp @@ -24,6 +24,19 @@ extern "C" #include #include + +BlockDevice *constructBlockDevice(const char *filename) { + // Check for CISO + FILE *f = fopen(filename, "rb"); + char buffer[4]; + auto size = fread(buffer, 1, 4, f); //size_t + fclose(f); + if (!memcmp(buffer, "CISO", 4) && size == 4) + return new CISOFileBlockDevice(filename); + else + return new FileBlockDevice(filename); +} + FileBlockDevice::FileBlockDevice(std::string _filename) : filename(_filename) { diff --git a/Core/FileSystems/BlockDevices.h b/Core/FileSystems/BlockDevices.h index 68c4652596..e9c95939d0 100644 --- a/Core/FileSystems/BlockDevices.h +++ b/Core/FileSystems/BlockDevices.h @@ -67,3 +67,6 @@ private: FILE *f; size_t filesize; }; + + +BlockDevice *constructBlockDevice(const char *filename); diff --git a/Core/FileSystems/FileSystem.h b/Core/FileSystems/FileSystem.h index d24efafeff..6f3c447acf 100644 --- a/Core/FileSystems/FileSystem.h +++ b/Core/FileSystems/FileSystem.h @@ -44,14 +44,22 @@ enum FileType }; -class IHandleAllocator -{ +class IHandleAllocator { public: virtual ~IHandleAllocator() {} virtual u32 GetNewHandle() = 0; virtual void FreeHandle(u32 handle) = 0; }; +class SequentialHandleAllocator : public IHandleAllocator { +public: + SequentialHandleAllocator() : handle_(1) {} + virtual u32 GetNewHandle() { return handle_++; } + virtual void FreeHandle(u32 handle) {} +private: + int handle_; +}; + struct PSPFileInfo { PSPFileInfo() diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 2e582d22d1..813a6795eb 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -17,6 +17,7 @@ #include "ELF/ElfReader.h" +#include "FileSystems/BlockDevices.h" #include "FileSystems/DirectoryFileSystem.h" #include "FileSystems/ISOFileSystem.h" @@ -39,20 +40,6 @@ #include "HLE/sceKernelMemory.h" #include "ELF/ParamSFO.h" -BlockDevice *constructBlockDevice(const char *filename) -{ - // Check for CISO - FILE *f = fopen(filename, "rb"); - char buffer[4]; - auto size = fread(buffer, 1, 4, f); //size_t - fclose(f); - if (!memcmp(buffer, "CISO", 4) && size == 4) - return new CISOFileBlockDevice(filename); - else - return new FileBlockDevice(filename); -} - - bool Load_PSP_ISO(const char *filename, std::string *error_string) { ISOFileSystem *umd2 = new ISOFileSystem(&pspFileSystem, constructBlockDevice(filename)); diff --git a/Qt/PPSSPP.pro b/Qt/PPSSPP.pro index 7152d016de..fb97b72c93 100755 --- a/Qt/PPSSPP.pro +++ b/Qt/PPSSPP.pro @@ -35,12 +35,12 @@ SOURCES += ../native/base/QtMain.cpp HEADERS += ../native/base/QtMain.h # Native -SOURCES += ../android/jni/EmuScreen.cpp \ - ../android/jni/MenuScreens.cpp \ - ../android/jni/GamepadEmu.cpp \ +SOURCES += ../UI/EmuScreen.cpp \ + ../UI/MenuScreens.cpp \ + ../UI/GamepadEmu.cpp \ ../android/jni/TestRunner.cpp \ - ../android/jni/UIShader.cpp \ - ../android/jni/ui_atlas.cpp + ../UI/UIShader.cpp \ + ../UI/ui_atlas.cpp INCLUDEPATH += .. ../Common ../native diff --git a/android/jni/EmuScreen.cpp b/UI/EmuScreen.cpp similarity index 100% rename from android/jni/EmuScreen.cpp rename to UI/EmuScreen.cpp diff --git a/android/jni/EmuScreen.h b/UI/EmuScreen.h similarity index 100% rename from android/jni/EmuScreen.h rename to UI/EmuScreen.h diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp new file mode 100644 index 0000000000..b552c03a09 --- /dev/null +++ b/UI/GameInfoCache.cpp @@ -0,0 +1,130 @@ +// Copyright (c) 2013- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#include +#include + +#include "base/timeutil.h" +#include "base/stringutil.h" +#include "image/png_load.h" +#include "GameInfoCache.h" +#include "Core/FileSystems/ISOFileSystem.h" +#include "Core/FileSystems/DirectoryFileSystem.h" + +GameInfoCache::~GameInfoCache() +{ + for (auto iter = info_.begin(); iter != info_.end(); iter++) { + delete iter->second; + } +} + +static bool ReadFileToString(IFileSystem *fs, const char *filename, std::string *contents) +{ + PSPFileInfo info = fs->GetFileInfo(filename); + if (!info.exists) + return false; + + int handle = fs->OpenFile(filename, FILEACCESS_READ); + if (!handle) + return false; + + contents->resize(info.size); + fs->ReadFile(handle, (u8 *)contents->data(), info.size); + fs->CloseFile(handle); + return true; +} + +void GameInfoCache::Save() +{ + // TODO +} + +void GameInfoCache::Load() +{ + // TODO +} + +void GameInfoCache::Decimate() +{ + // TODO +} + +void GameInfoCache::FlushBGs() +{ + // TODO +} + +// This may run off-main-thread and we thus can't use the global +// pspFileSystem (well, we could with synchronization but there might not +// even be a game running). +GameInfo *GameInfoCache::GetInfo(const std::string &gamePath, bool wantBG) { + auto iter = info_.find(gamePath); + if (iter != info_.end()) { + iter->second->lastAccessedTime = time_now_d(); + return iter->second; + } + + GameInfo *info = new GameInfo(); + info_[gamePath] = info; + + // return info; + + // TODO: Everything below here should be asynchronous and run on a thread, + // filling in the info as it goes. + + // A game can be either an UMD or a directory under ms0:/PSP/GAME . + if (startsWith(gamePath, "ms0:/PSP/GAME")) { + + } else { + SequentialHandleAllocator handles; + // Let's assume it's an ISO. + // TODO: This will currently read in the whole directory tree. Not really necessary for just a + // few files. + ISOFileSystem umd(&handles, constructBlockDevice(gamePath.c_str())); + + // Alright, let's fetch the PARAM.SFO. + std::string paramSFOcontents; + if (ReadFileToString(&umd, "/PSP_GAME/PARAM.SFO", ¶mSFOcontents)) { + lock_guard lock(info->lock); + info->paramSFO.ReadSFO((const u8 *)paramSFOcontents.data(), paramSFOcontents.size()); + info->title = info->paramSFO.GetValueString("TITLE"); + } + + std::string imgContents; + if (ReadFileToString(&umd, "/PSP_GAME/ICON0.PNG", &imgContents)) { + lock_guard lock(info->lock); + info->iconTexture = new Texture(); + if (info->iconTexture->LoadPNG((const u8 *)imgContents.data(), imgContents.size())) { + info->timeIconWasLoaded = time_now_d(); + } + } + + if (wantBG) { + if (ReadFileToString(&umd, "/PSP_GAME/PIC1.PNG", &imgContents)) { + lock_guard lock(info->lock); + info->bgTexture = new Texture(); + info->bgTexture->LoadPNG((const u8 *)imgContents.data(), imgContents.size()); + if (info->bgTexture->LoadPNG((const u8 *)imgContents.data(), imgContents.size())) { + info->timeBGWasLoaded = time_now_d(); + } + } + } + } + + info_[gamePath] = info; + return info; +} diff --git a/UI/GameInfoCache.h b/UI/GameInfoCache.h new file mode 100644 index 0000000000..6cbb4ce8ae --- /dev/null +++ b/UI/GameInfoCache.h @@ -0,0 +1,69 @@ +// Copyright (c) 2013- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#pragma once + +#include +#include + +#include "base/mutex.h" +#include "gfx/texture.h" +#include "Core/ELF/ParamSFO.h" + +struct GameInfo { + GameInfo() : iconTexture(NULL), bgTexture(NULL) {} + // Hold this when reading or writing from the GameInfo. + // Don't need to hold it when just passing around the pointer, + // and obviously also not when creating it and holding the only pointer + // to it. + recursive_mutex lock; + + std::string title; // for easy access, also available in paramSFO. + ParamSFOData paramSFO; + + // For display. + Texture *iconTexture; + Texture *bgTexture; + + double lastAccessedTime; + + // The time at which the Icon and the BG were loaded. + // Can be useful to fade them in smoothly once they appear. + double timeIconWasLoaded; + double timeBGWasLoaded; +}; + +class GameInfoCache { +public: + ~GameInfoCache(); + + // All data in GameInfo including iconTexture may be zero the first time you call this + // but filled in later asynchronously in the background. So keep calling this, + // redrawing the UI often. Only set wantBG if you really want it because + // it's big. bgTextures may be discarded over time as well. + GameInfo *GetInfo(const std::string &gamePath, bool wantBG); + void Decimate(); // Deletes old info. + void FlushBGs(); // Gets rid of all BG textures. + + // TODO - save cache between sessions + void Save(); + void Load(); + +private: + // Maps ISO path to info. + std::map info_; +}; \ No newline at end of file diff --git a/android/jni/GamepadEmu.cpp b/UI/GamepadEmu.cpp similarity index 100% rename from android/jni/GamepadEmu.cpp rename to UI/GamepadEmu.cpp diff --git a/android/jni/GamepadEmu.h b/UI/GamepadEmu.h similarity index 100% rename from android/jni/GamepadEmu.h rename to UI/GamepadEmu.h diff --git a/android/jni/MenuScreens.cpp b/UI/MenuScreens.cpp similarity index 98% rename from android/jni/MenuScreens.cpp rename to UI/MenuScreens.cpp index e700dac68c..3b03f7f50e 100644 --- a/android/jni/MenuScreens.cpp +++ b/UI/MenuScreens.cpp @@ -55,7 +55,7 @@ namespace MainWindow { #include "MenuScreens.h" #include "EmuScreen.h" -#include "TestRunner.h" +#include "android/jni/TestRunner.h" #ifdef USING_QT_UI #include @@ -91,12 +91,16 @@ static const uint32_t colors[4] = { static void DrawBackground(float alpha) { static float xbase[100] = {0}; static float ybase[100] = {0}; - if (xbase[0] == 0.0f) { + static int last_dp_xres = 0; + static int last_dp_yres = 0; + if (xbase[0] == 0.0f || last_dp_xres != dp_xres || last_dp_yres != dp_yres) { GMRng rng; for (int i = 0; i < 100; i++) { xbase[i] = rng.F() * dp_xres; ybase[i] = rng.F() * dp_yres; } + last_dp_xres = dp_xres; + last_dp_yres = dp_yres; } glstate.depthWrite.set(GL_TRUE); glstate.colorMask.set(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); diff --git a/android/jni/MenuScreens.h b/UI/MenuScreens.h similarity index 100% rename from android/jni/MenuScreens.h rename to UI/MenuScreens.h diff --git a/android/jni/NativeApp.cpp b/UI/NativeApp.cpp similarity index 100% rename from android/jni/NativeApp.cpp rename to UI/NativeApp.cpp diff --git a/UI/ReadMe.txt b/UI/ReadMe.txt new file mode 100644 index 0000000000..9f9060e341 --- /dev/null +++ b/UI/ReadMe.txt @@ -0,0 +1,29 @@ +======================================================================== + STATIC LIBRARY : UI Project Overview +======================================================================== + +AppWizard has created this UI library project for you. + +No source files were created as part of your project. + + +UI.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +UI.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/UI/UI.vcxproj b/UI/UI.vcxproj new file mode 100644 index 0000000000..62037d6c7c --- /dev/null +++ b/UI/UI.vcxproj @@ -0,0 +1,154 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F} + Win32Proj + UI + + + + StaticLibrary + true + v100 + MultiByte + + + StaticLibrary + true + v100 + MultiByte + + + StaticLibrary + false + v100 + true + MultiByte + + + StaticLibrary + false + v100 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + ../common;..;../native;../native/ext/glew;../ext/zlib + + + Windows + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + ../common;..;../native;../native/ext/glew;../ext/zlib + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + ../common;..;../native;../native/ext/glew;../ext/zlib + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + ../common;..;../native;../native/ext/glew;../ext/zlib + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/UI/UI.vcxproj.filters b/UI/UI.vcxproj.filters new file mode 100644 index 0000000000..1252386915 --- /dev/null +++ b/UI/UI.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/jni/UIShader.cpp b/UI/UIShader.cpp similarity index 100% rename from android/jni/UIShader.cpp rename to UI/UIShader.cpp diff --git a/android/jni/UIShader.h b/UI/UIShader.h similarity index 100% rename from android/jni/UIShader.h rename to UI/UIShader.h diff --git a/android/jni/ui_atlas.cpp b/UI/ui_atlas.cpp similarity index 100% rename from android/jni/ui_atlas.cpp rename to UI/ui_atlas.cpp diff --git a/android/jni/ui_atlas.h b/UI/ui_atlas.h similarity index 100% rename from android/jni/ui_atlas.h rename to UI/ui_atlas.h diff --git a/Windows/PPSSPP.sln b/Windows/PPSSPP.sln index 80fee88f3b..daaf15c25a 100644 --- a/Windows/PPSSPP.sln +++ b/Windows/PPSSPP.sln @@ -1,7 +1,8 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPPWindows", "PPSSPP.vcxproj", "{567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}" ProjectSection(ProjectDependencies) = postProject + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F} = {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F} {533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36} {F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34} {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} @@ -42,6 +43,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libkirk", "..\ext\libkirk\l EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "..\unittest\UnitTests.vcxproj", "{37CBC214-7CE7-4655-B619-F7CEE16E3313}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UI", "..\UI\UI.vcxproj", "{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}" + ProjectSection(ProjectDependencies) = postProject + {533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36} + {C4DF647E-80EA-4111-A0A8-218B1B711E18} = {C4DF647E-80EA-4111-A0A8-218B1B711E18} + {457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED} + {3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -122,6 +131,14 @@ Global {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Release|Win32.Build.0 = Release|Win32 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Release|x64.ActiveCfg = Release|x64 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Release|x64.Build.0 = Release|x64 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|Win32.ActiveCfg = Debug|Win32 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|Win32.Build.0 = Debug|Win32 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|x64.ActiveCfg = Debug|x64 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|x64.Build.0 = Debug|x64 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|Win32.ActiveCfg = Release|Win32 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|Win32.Build.0 = Release|Win32 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|x64.ActiveCfg = Release|x64 + {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index 8d502b20c4..3e521213a1 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -225,13 +225,7 @@ true true - - - - - - NotUsing @@ -281,12 +275,7 @@ - - - - - @@ -346,6 +335,9 @@ {f761046e-6c38-4428-a5f1-38391a37bb34} + + {004b8d11-2be3-4bd9-ab40-2be04cf2096f} + diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters index 29b56840a3..576c9e2946 100644 --- a/Windows/PPSSPP.vcxproj.filters +++ b/Windows/PPSSPP.vcxproj.filters @@ -77,21 +77,6 @@ Windows - - Android - - - Android - - - Android - - - Android - - - Android - Windows\Input @@ -110,9 +95,6 @@ Android - - Android - @@ -169,18 +151,6 @@ Windows - - Android - - - Android - - - Android - - - Android - Windows\Input @@ -197,9 +167,6 @@ Android - - Android - diff --git a/android/buildatlas.sh b/android/buildatlas.sh deleted file mode 100644 index 7e9c8b5223..0000000000 --- a/android/buildatlas.sh +++ /dev/null @@ -1,2 +0,0 @@ -../native/tools/build/atlastool atlasscript.txt ui 8888 && cp ui_atlas.zim assets && mv ui_atlas.cpp ui_atlas.h jni -#/d/workspace/native/tools/build/atlastool atlasscript.txt ui 8888 && cp ui_atlas.zim assets && mv ui_atlas.cpp ui_atlas.h jni diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 97994acc10..ed8452ed2e 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -113,13 +113,13 @@ endif LOCAL_SRC_FILES := \ $(ARCH_FILES) \ - NativeApp.cpp \ - EmuScreen.cpp \ - MenuScreens.cpp \ - UIShader.cpp \ - GamepadEmu.cpp \ TestRunner.cpp \ - ui_atlas.cpp \ + $(SRC)/UI/ui_atlas.cpp \ + $(SRC)/UI/NativeApp.cpp \ + $(SRC)/UI/EmuScreen.cpp \ + $(SRC)/UI/MenuScreens.cpp \ + $(SRC)/UI/UIShader.cpp \ + $(SRC)/UI/GamepadEmu.cpp \ $(SRC)/native/android/app-android.cpp \ $(SRC)/ext/disarm.cpp \ $(SRC)/ext/libkirk/AES.c \ diff --git a/android/atlasscript.txt b/atlasscript.txt similarity index 100% rename from android/atlasscript.txt rename to atlasscript.txt diff --git a/buildatlas.sh b/buildatlas.sh new file mode 100644 index 0000000000..2f71e25bc1 --- /dev/null +++ b/buildatlas.sh @@ -0,0 +1,2 @@ +#../native/tools/build/atlastool atlasscript.txt ui 8888 && cp ui_atlas.zim assets && cp ui_atlas.zim android/assets && mv ui_atlas.cpp ui_atlas.h UI +/c/workspace/native/tools/build/atlastool atlasscript.txt ui 8888 && cp ui_atlas.zim assets && cp ui_atlas.zim android/assets && mv ui_atlas.cpp ui_atlas.h UI diff --git a/native b/native index abc38a90f6..1f34f8ff60 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit abc38a90f6ec067090dbbc68ecd7f489732d54c0 +Subproject commit 1f34f8ff60e32396d39f3c5add58841dff772e34 diff --git a/android/source_assets/font/garrisonlightsansbold.ttf b/source_assets/font/garrisonlightsansbold.ttf similarity index 100% rename from android/source_assets/font/garrisonlightsansbold.ttf rename to source_assets/font/garrisonlightsansbold.ttf diff --git a/android/source_assets/font/zrnic.ttf b/source_assets/font/zrnic.ttf similarity index 100% rename from android/source_assets/font/zrnic.ttf rename to source_assets/font/zrnic.ttf diff --git a/android/source_assets/image/L.png b/source_assets/image/L.png similarity index 100% rename from android/source_assets/image/L.png rename to source_assets/image/L.png diff --git a/android/source_assets/image/R.png b/source_assets/image/R.png similarity index 100% rename from android/source_assets/image/R.png rename to source_assets/image/R.png diff --git a/android/source_assets/image/active_item.png b/source_assets/image/active_item.png similarity index 100% rename from android/source_assets/image/active_item.png rename to source_assets/image/active_item.png diff --git a/android/source_assets/image/arrow.png b/source_assets/image/arrow.png similarity index 100% rename from android/source_assets/image/arrow.png rename to source_assets/image/arrow.png diff --git a/android/source_assets/image/background.png b/source_assets/image/background.png similarity index 100% rename from android/source_assets/image/background.png rename to source_assets/image/background.png diff --git a/android/source_assets/image/button.png b/source_assets/image/button.png similarity index 100% rename from android/source_assets/image/button.png rename to source_assets/image/button.png diff --git a/android/source_assets/image/button_selected.png b/source_assets/image/button_selected.png similarity index 100% rename from android/source_assets/image/button_selected.png rename to source_assets/image/button_selected.png diff --git a/android/source_assets/image/buttons.svg b/source_assets/image/buttons.svg similarity index 100% rename from android/source_assets/image/buttons.svg rename to source_assets/image/buttons.svg diff --git a/android/source_assets/image/checkedbox.png b/source_assets/image/checkedbox.png similarity index 100% rename from android/source_assets/image/checkedbox.png rename to source_assets/image/checkedbox.png diff --git a/android/source_assets/image/circle.png b/source_assets/image/circle.png similarity index 100% rename from android/source_assets/image/circle.png rename to source_assets/image/circle.png diff --git a/android/source_assets/image/cross.png b/source_assets/image/cross.png similarity index 100% rename from android/source_assets/image/cross.png rename to source_assets/image/cross.png diff --git a/android/source_assets/image/dir.png b/source_assets/image/dir.png similarity index 100% rename from android/source_assets/image/dir.png rename to source_assets/image/dir.png diff --git a/android/source_assets/image/exe.png b/source_assets/image/exe.png similarity index 100% rename from android/source_assets/image/exe.png rename to source_assets/image/exe.png diff --git a/android/source_assets/image/folder.png b/source_assets/image/folder.png similarity index 100% rename from android/source_assets/image/folder.png rename to source_assets/image/folder.png diff --git a/android/source_assets/image/inactive_item.png b/source_assets/image/inactive_item.png similarity index 100% rename from android/source_assets/image/inactive_item.png rename to source_assets/image/inactive_item.png diff --git a/android/source_assets/image/rect.png b/source_assets/image/rect.png similarity index 100% rename from android/source_assets/image/rect.png rename to source_assets/image/rect.png diff --git a/android/source_assets/image/round.png b/source_assets/image/round.png similarity index 100% rename from android/source_assets/image/round.png rename to source_assets/image/round.png diff --git a/android/source_assets/image/select.png b/source_assets/image/select.png similarity index 100% rename from android/source_assets/image/select.png rename to source_assets/image/select.png diff --git a/android/source_assets/image/shoulder.png b/source_assets/image/shoulder.png similarity index 100% rename from android/source_assets/image/shoulder.png rename to source_assets/image/shoulder.png diff --git a/android/source_assets/image/square.png b/source_assets/image/square.png similarity index 100% rename from android/source_assets/image/square.png rename to source_assets/image/square.png diff --git a/android/source_assets/image/start.png b/source_assets/image/start.png similarity index 100% rename from android/source_assets/image/start.png rename to source_assets/image/start.png diff --git a/android/source_assets/image/stick.png b/source_assets/image/stick.png similarity index 100% rename from android/source_assets/image/stick.png rename to source_assets/image/stick.png diff --git a/android/source_assets/image/stick_bg.png b/source_assets/image/stick_bg.png similarity index 100% rename from android/source_assets/image/stick_bg.png rename to source_assets/image/stick_bg.png diff --git a/android/source_assets/image/triangle.png b/source_assets/image/triangle.png similarity index 100% rename from android/source_assets/image/triangle.png rename to source_assets/image/triangle.png diff --git a/android/source_assets/image/umd256.png b/source_assets/image/umd256.png similarity index 100% rename from android/source_assets/image/umd256.png rename to source_assets/image/umd256.png diff --git a/android/source_assets/image/umd48.png b/source_assets/image/umd48.png similarity index 100% rename from android/source_assets/image/umd48.png rename to source_assets/image/umd48.png