Move non-Android specific stuff from android/jni to /UI.

Move source_assets one level up, too.
Also, start prototyping GameInfoCache, you'll see what it's for soon...
This commit is contained in:
Henrik Rydgard 2013-03-30 15:44:10 +01:00
parent fc8674b496
commit 7425532e99
60 changed files with 488 additions and 88 deletions

View File

@ -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()

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="ELF">
@ -384,7 +384,6 @@
<ClCompile Include="MIPS\ARM\ArmRegCacheFPU.cpp">
<Filter>MIPS\ARM</Filter>
</ClCompile>
<ClCompile Include="HLE\sceChnnlsv.cpp" />
<ClCompile Include="Font\PGF.cpp">
<Filter>Font</Filter>
</ClCompile>
@ -395,6 +394,9 @@
<ClCompile Include="HLE\scePspNpDrm_user.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
<ClCompile Include="HLE\sceChnnlsv.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="ELF\ElfReader.h">
@ -718,7 +720,6 @@
<ClInclude Include="MIPS\ARM\ArmRegCacheFPU.h">
<Filter>MIPS\ARM</Filter>
</ClInclude>
<ClInclude Include="HLE\sceChnnlsv.h" />
<ClInclude Include="Font\PGF.h">
<Filter>Font</Filter>
</ClInclude>
@ -728,6 +729,9 @@
<ClInclude Include="HLE\scePspNpDrm_user.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
<ClInclude Include="HLE\sceChnnlsv.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
@ -735,4 +739,4 @@
<None Include="..\android\jni\Android.mk" />
<None Include="GameLogNotes.txt" />
</ItemGroup>
</Project>
</Project>

View File

@ -18,8 +18,11 @@
#pragma once
#include <string>
#include <map>
#include "Common/CommonTypes.h"
class ParamSFOData
{
public:

View File

@ -24,6 +24,19 @@ extern "C"
#include <cstdio>
#include <cstring>
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)
{

View File

@ -67,3 +67,6 @@ private:
FILE *f;
size_t filesize;
};
BlockDevice *constructBlockDevice(const char *filename);

View File

@ -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()

View File

@ -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));

View File

@ -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

130
UI/GameInfoCache.cpp Normal file
View File

@ -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 <string>
#include <map>
#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", &paramSFOcontents)) {
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;
}

69
UI/GameInfoCache.h Normal file
View File

@ -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 <string>
#include <map>
#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<std::string, GameInfo *> info_;
};

View File

@ -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 <QFileDialog>
@ -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);

29
UI/ReadMe.txt Normal file
View File

@ -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.
/////////////////////////////////////////////////////////////////////////////

154
UI/UI.vcxproj Normal file
View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="EmuScreen.cpp" />
<ClCompile Include="GameInfoCache.cpp" />
<ClCompile Include="GamepadEmu.cpp" />
<ClCompile Include="MenuScreens.cpp" />
<ClCompile Include="NativeApp.cpp" />
<ClCompile Include="UIShader.cpp" />
<ClCompile Include="ui_atlas.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="EmuScreen.h" />
<ClInclude Include="GameInfoCache.h" />
<ClInclude Include="GamepadEmu.h" />
<ClInclude Include="MenuScreens.h" />
<ClInclude Include="UIShader.h" />
<ClInclude Include="ui_atlas.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>UI</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v100</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v100</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v100</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v100</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common;..;../native;../native/ext/glew;../ext/zlib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common;..;../native;../native/ext/glew;../ext/zlib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common;..;../native;../native/ext/glew;../ext/zlib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common;..;../native;../native/ext/glew;../ext/zlib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

20
UI/UI.vcxproj.filters Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="EmuScreen.cpp" />
<ClCompile Include="GameInfoCache.cpp" />
<ClCompile Include="GamepadEmu.cpp" />
<ClCompile Include="MenuScreens.cpp" />
<ClCompile Include="NativeApp.cpp" />
<ClCompile Include="ui_atlas.cpp" />
<ClCompile Include="UIShader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="EmuScreen.h" />
<ClInclude Include="GameInfoCache.h" />
<ClInclude Include="GamepadEmu.h" />
<ClInclude Include="MenuScreens.h" />
<ClInclude Include="ui_atlas.h" />
<ClInclude Include="UIShader.h" />
</ItemGroup>
</Project>

View File

@ -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

View File

@ -225,13 +225,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\android\jni\EmuScreen.cpp" />
<ClCompile Include="..\android\jni\GamepadEmu.cpp" />
<ClCompile Include="..\android\jni\MenuScreens.cpp" />
<ClCompile Include="..\android\jni\NativeApp.cpp" />
<ClCompile Include="..\android\jni\TestRunner.cpp" />
<ClCompile Include="..\android\jni\UIShader.cpp" />
<ClCompile Include="..\android\jni\ui_atlas.cpp" />
<ClCompile Include="..\native\ext\glew\glew.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -281,12 +275,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\android\jni\ARMEmitterTest.h" />
<ClInclude Include="..\android\jni\EmuScreen.h" />
<ClInclude Include="..\android\jni\GamepadEmu.h" />
<ClInclude Include="..\android\jni\MenuScreens.h" />
<ClInclude Include="..\android\jni\TestRunner.h" />
<ClInclude Include="..\android\jni\UIShader.h" />
<ClInclude Include="..\android\jni\ui_atlas.h" />
<ClInclude Include="Debugger\CtrlDisAsmView.h" />
<ClInclude Include="Debugger\CtrlMemView.h" />
<ClInclude Include="Debugger\CtrlRegisterList.h" />
@ -346,6 +335,9 @@
<ProjectReference Include="..\ext\zlib\zlib.vcxproj">
<Project>{f761046e-6c38-4428-a5f1-38391a37bb34}</Project>
</ProjectReference>
<ProjectReference Include="..\UI\UI.vcxproj">
<Project>{004b8d11-2be3-4bd9-ab40-2be04cf2096f}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -77,21 +77,6 @@
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="..\native\ext\glew\glew.c" />
<ClCompile Include="..\android\jni\NativeApp.cpp">
<Filter>Android</Filter>
</ClCompile>
<ClCompile Include="..\android\jni\GamepadEmu.cpp">
<Filter>Android</Filter>
</ClCompile>
<ClCompile Include="..\android\jni\MenuScreens.cpp">
<Filter>Android</Filter>
</ClCompile>
<ClCompile Include="..\android\jni\EmuScreen.cpp">
<Filter>Android</Filter>
</ClCompile>
<ClCompile Include="..\android\jni\UIShader.cpp">
<Filter>Android</Filter>
</ClCompile>
<ClCompile Include="XinputDevice.cpp">
<Filter>Windows\Input</Filter>
</ClCompile>
@ -110,9 +95,6 @@
<ClCompile Include="..\android\jni\TestRunner.cpp">
<Filter>Android</Filter>
</ClCompile>
<ClCompile Include="..\android\jni\ui_atlas.cpp">
<Filter>Android</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Debugger\CtrlDisAsmView.h">
@ -169,18 +151,6 @@
<ClInclude Include="EmuThread.h">
<Filter>Windows</Filter>
</ClInclude>
<ClInclude Include="..\android\jni\MenuScreens.h">
<Filter>Android</Filter>
</ClInclude>
<ClInclude Include="..\android\jni\GamepadEmu.h">
<Filter>Android</Filter>
</ClInclude>
<ClInclude Include="..\android\jni\EmuScreen.h">
<Filter>Android</Filter>
</ClInclude>
<ClInclude Include="..\android\jni\UIShader.h">
<Filter>Android</Filter>
</ClInclude>
<ClInclude Include="InputDevice.h">
<Filter>Windows\Input</Filter>
</ClInclude>
@ -197,9 +167,6 @@
<ClInclude Include="..\android\jni\TestRunner.h">
<Filter>Android</Filter>
</ClInclude>
<ClInclude Include="..\android\jni\ui_atlas.h">
<Filter>Android</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="icon1.ico">

View File

@ -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

View File

@ -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 \

2
buildatlas.sh Normal file
View File

@ -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

2
native

@ -1 +1 @@
Subproject commit abc38a90f6ec067090dbbc68ecd7f489732d54c0
Subproject commit 1f34f8ff60e32396d39f3c5add58841dff772e34

View File

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

View File

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 260 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

View File

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 501 B

View File

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 584 B

View File

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 369 B

View File

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 774 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 649 B

View File

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

View File

Before

Width:  |  Height:  |  Size: 281 B

After

Width:  |  Height:  |  Size: 281 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

View File

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 818 B

View File

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

View File

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 863 B

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 633 B

View File

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB