diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a4a4787..79325303 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -733,12 +733,15 @@ if(VITA) ScePafStdc_stub ) - set(VITA_MAKE_FSELF_FLAGS "${VITA_MAKE_FSELF_FLAGS} -a 0x2F00000000000101") - vita_create_self(isle-config.self isle-config - UNSAFE - STRIPPED - REL_OPTIMIZE - ) + block() + set(VITA_MAKE_FSELF_FLAGS "${VITA_MAKE_FSELF_FLAGS} -a 0x2F00000000000101") + vita_create_self(isle-config.self isle-config + CONFIG CONFIG_vita/exports.yml + UNSAFE + STRIPPED + REL_OPTIMIZE + ) + endblock() include(${scepaf_external_SOURCE_DIR}/rco.cmake) make_rco(CONFIG_vita/cxml/config_plugin.xml config_plugin.rco) diff --git a/CONFIG_vita/cxml/config_plugin.xml b/CONFIG_vita/cxml/config_plugin.xml index 716f1934..d6f66d71 100644 --- a/CONFIG_vita/cxml/config_plugin.xml +++ b/CONFIG_vita/cxml/config_plugin.xml @@ -2,92 +2,23 @@ - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - diff --git a/CONFIG_vita/src/app.cpp b/CONFIG_vita/src/app.cpp index a5704745..69720394 100644 --- a/CONFIG_vita/src/app.cpp +++ b/CONFIG_vita/src/app.cpp @@ -17,40 +17,41 @@ void operator delete(void *ptr, unsigned int n) { int paf_main(void); -extern "C" { - typedef struct _ScePafInit { // size is 0x18 - SceSize global_heap_size; - int a2; - int a3; - int cdlg_mode; - int heap_opt_param1; - int heap_opt_param2; - } ScePafInit; +typedef struct _ScePafInit { // size is 0x18 + SceSize global_heap_size; + int a2; + int a3; + int cdlg_mode; + int heap_opt_param1; + int heap_opt_param2; +} ScePafInit; - int module_start(SceSize args, void *argp){ - int load_res; - ScePafInit init_param; - SceSysmoduleOpt sysmodule_opt; +extern "C" int module_start(SceSize args, void *argp) { + int load_res; + ScePafInit init_param; + SceSysmoduleOpt sysmodule_opt; - init_param.global_heap_size = 0x1000000; - init_param.a2 = 0xEA60; - init_param.a3 = 0x40000; - init_param.cdlg_mode = 0; - init_param.heap_opt_param1 = 0; - init_param.heap_opt_param2 = 0; + init_param.global_heap_size = 0x1000000; + init_param.a2 = 0xEA60; + init_param.a3 = 0x40000; + init_param.cdlg_mode = 0; + init_param.heap_opt_param1 = 0; + init_param.heap_opt_param2 = 0; - load_res = 0xDEADBEEF; - sysmodule_opt.flags = 0; - sysmodule_opt.result = &load_res; + load_res = 0xDEADBEEF; + sysmodule_opt.flags = 0; + sysmodule_opt.result = &load_res; - int res = sceSysmoduleLoadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, sizeof(init_param), &init_param, &sysmodule_opt); - if((res | load_res) != 0){ - sceClibPrintf("[PAF PRX Loader] Failed to load the PAF prx. (return value 0x%x, result code 0x%x )\n", res, load_res); - } - - paf_main(); - - return SCE_KERNEL_START_SUCCESS; + int res = sceSysmoduleLoadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, sizeof(init_param), &init_param, &sysmodule_opt); + if((res | load_res) != 0){ + sceClibPrintf("[PAF PRX Loader] Failed to load the PAF prx. (return value 0x%x, result code 0x%x )\n", res, load_res); } -} \ No newline at end of file + paf_main(); + + return SCE_KERNEL_START_SUCCESS; +} + +extern "C" void _start() { + module_start(0, nullptr); +} diff --git a/CONFIG_vita/src/main.cpp b/CONFIG_vita/src/main.cpp index d0321a64..4f073729 100644 --- a/CONFIG_vita/src/main.cpp +++ b/CONFIG_vita/src/main.cpp @@ -3,60 +3,43 @@ #include -paf::Framework *g_fw; -void *g_rootPage; +paf::Framework* g_fw; +paf::ui::Scene* g_rootPage; void loadPluginCB(paf::Plugin *plugin){ + paf::Plugin::PageOpenParam pageOpenParam; + pageOpenParam.option = paf::Plugin::PageOption_None; - { - paf::Plugin::PageOpenParam pageOpenParam; - pageOpenParam.option = paf::Plugin::PageOption_None; + paf::ui::Scene *pScene = plugin->PageOpen("page_main", pageOpenParam); + g_rootPage = pScene; - paf::ui::Scene *pScene = plugin->PageOpen("page_main", pageOpenParam); - - g_rootPage = pScene; - - paf::ui::Widget *pPlane = pScene->FindChild("plane_sample_black"); - paf::ui::ProgressBar *pProgressbar = (paf::ui::ProgressBar *)pPlane->FindChild("progressbar"); - - pProgressbar->SetMinValue(0); - pProgressbar->SetMaxValue(100); - - pProgressbar->SetValue(24, true); - - wchar_t *msg_progressbar_text = plugin->GetString("msg_progressbar_text"); - - paf::ui::Text *pText = (paf::ui::Text *)pPlane->FindChild("progressbar_text"); - pText->SetString(paf::wstring(msg_progressbar_text)); - } + paf::ui::Widget *pText = pScene->FindChild("test_strings_id"); + pText->SetString(L"Test Text"); } int paf_main(void){ + paf::Framework::InitParam fwParam; + fwParam.mode = paf::Framework::Mode_Normal; - { - paf::Framework::InitParam fwParam; - fwParam.mode = paf::Framework::Mode_Normal; + paf::Framework *paf_fw = new paf::Framework(fwParam); + if(paf_fw != NULL){ + g_fw = paf_fw; - paf::Framework *paf_fw = new paf::Framework(fwParam); - if(paf_fw != NULL){ - g_fw = paf_fw; + paf_fw->LoadCommonResourceSync(); - paf_fw->LoadCommonResourceSync(); + paf::Plugin::InitParam pluginParam; - paf::Plugin::InitParam pluginParam; + pluginParam.name = "config_plugin"; + pluginParam.caller_name = "__main__"; + pluginParam.resource_file = "app0:/config_plugin.rco"; + pluginParam.init_func = NULL; + pluginParam.start_func = loadPluginCB; + pluginParam.stop_func = NULL; + pluginParam.exit_func = NULL; - pluginParam.name = "sample_plugin"; - pluginParam.caller_name = "__main__"; - pluginParam.resource_file = "app0:/sample_plugin.rco"; - pluginParam.init_func = NULL; - pluginParam.start_func = loadPluginCB; - pluginParam.stop_func = NULL; - pluginParam.exit_func = NULL; - - paf::Plugin::LoadSync(pluginParam); - paf_fw->Run(); - } + paf::Plugin::LoadSync(pluginParam); + paf_fw->Run(); } sceClibPrintf("[SAMPLE] Failed to run PAF instance\n"); diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 82fe774a..59530459 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -275,6 +275,7 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv) char buffer[2048]; sceAppUtilAppEventParseLiveArea(&eventParam, buffer); if (strstr(buffer, "-config")) { + sceClibPrintf("Loading Config App.\n"); sceAppMgrLoadExec("app0:/isle-config.self", NULL, NULL); } } diff --git a/miniwin/src/d3drm/backends/gxm/renderer.cpp b/miniwin/src/d3drm/backends/gxm/renderer.cpp index b5c966f6..f5930a0c 100644 --- a/miniwin/src/d3drm/backends/gxm/renderer.cpp +++ b/miniwin/src/d3drm/backends/gxm/renderer.cpp @@ -148,7 +148,9 @@ static void load_razor() } } #else -bool load_razor() {} +bool load_razor() { + return true; +} #endif int gxm_library_init() diff --git a/miniwin/src/d3drm/backends/gxm/shaders/main.color.frag.gxp b/miniwin/src/d3drm/backends/gxm/shaders/main.color.frag.gxp index bc881a9e..b7c3853f 100644 Binary files a/miniwin/src/d3drm/backends/gxm/shaders/main.color.frag.gxp and b/miniwin/src/d3drm/backends/gxm/shaders/main.color.frag.gxp differ diff --git a/miniwin/src/d3drm/backends/gxm/shaders/main.frag.cg b/miniwin/src/d3drm/backends/gxm/shaders/main.frag.cg index 5867df1a..cb8173cf 100644 --- a/miniwin/src/d3drm/backends/gxm/shaders/main.frag.cg +++ b/miniwin/src/d3drm/backends/gxm/shaders/main.frag.cg @@ -30,10 +30,15 @@ void main( float isDirectional = uLights[i].direction.w; float isPositional = uLights[i].position.w; + // TODO: make faster by removing the if statements // directional - float3 pointLightVec = uLights[i].position.xyz - vViewPos; - float3 directionalLightVec = -uLights[i].direction.xyz; - float3 lightVec = normalize(lerp(pointLightVec, directionalLightVec, isDirectional)); + float3 lightVec; + if (isDirectional) { + lightVec = -normalize(uLights[i].direction.xyz); + } else { + lightVec = uLights[i].position.xyz - vViewPos; + } + lightVec = normalize(lightVec); // Diffuse contribution float dotNL = max(dot(vNormal, lightVec), 0.0); diff --git a/miniwin/src/d3drm/backends/gxm/shaders/main.texture.frag.gxp b/miniwin/src/d3drm/backends/gxm/shaders/main.texture.frag.gxp index 08717777..ae023e52 100644 Binary files a/miniwin/src/d3drm/backends/gxm/shaders/main.texture.frag.gxp and b/miniwin/src/d3drm/backends/gxm/shaders/main.texture.frag.gxp differ