diff --git a/.gitignore b/.gitignore index 06e1534c65..24c7472226 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,3 @@ xcuserdata **/gemrb_path.txt **/GemRB.log -.vscode/settings.json diff --git a/README.md b/README.md index f7dc262f9a..04ad09680d 100644 --- a/README.md +++ b/README.md @@ -46,18 +46,34 @@ Debug output can be previewed with psp2shell https://github.com/Cpasjuste/psp2shell ## Port info -Keyboard input is not supported and there's no virtual keyboard in SDL1. To auto-fill desired character name during character creation, edit VitaCharName parameter in GemRB.cfg. -To input savegame names (it's impossible to save a game with blank name) just use TRIANGLE or SQUARE buttons. +### Input + +Keyboard input is done with D-Pad (on character creation and game saves. 'a-z', '0-9' and 'space' are supported). + +- Left - Remove character +- Right - Add new character +- Down - Next character (alphabetically) +- Up - Previous character +- R1, L1 - Switch current character between uppercase/lowercase + +### Vita specific options Pointer movement speed can be changed with 'VitaPointerSpeed' parameter in GemRB.cfg. -Performance with 640x480 resolution is "kinda playable". To improve it I STRONGLY recommend disabling character movement and attack sounds in game options. Disabling sound altogether (by seting "AudioDriver = none" in GemRB.cfg) can improve performance even further. -The game is pretty IO heavy for Vita, so loading can take some time. +Use "Fullscreen=1" to scale game area to native Vita resolution or "Fullscreen=0" to keep game area at the center of the screen. + +VitaKeepAspectRatio=1 keeps aspect ratio of original image when scaling. VitaKeepAspectRatio=0 just scales it to 960x544. + +VitaBilinear=1 uses bilinear filtering when scaling. + +### Performance + +Widescreen mod is supported, but performance with native resolution can be poor in areas with a lot of characters. -Custom portraits, character imports, voice selection during character creation are not supported right now (but you can copy saves from PC with all of these and they should work fine) +The game is pretty IO heavy. Loading can take quite some time. And a big number of sound effects playing at the same time can cause a lot of stuttering. To improve the situation I STRONGLY recommend disabling character movement and attack sounds in game options. Disabling sound altogether (by seting "AudioDriver = none" in GemRB.cfg) can improve it even further. -Port probably contains some bugs, since I haven't tested it that much. +"Bpp=16" option is recommended for better performance. ## Controls - Left analog stick - Pointer movement @@ -69,6 +85,7 @@ Port probably contains some bugs, since I haven't tested it that much. - R1 - Pause - L1 - Highlight items - SELECT - Open menu +- START - Escape # GemRB diff --git a/cmake/modules/FindSDL2_mixer.cmake b/cmake/modules/FindSDL2_mixer.cmake index d41340b9a0..92cdbc30f6 100644 --- a/cmake/modules/FindSDL2_mixer.cmake +++ b/cmake/modules/FindSDL2_mixer.cmake @@ -85,8 +85,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer set(SDL2MIXER_LIBRARY ${SDL2_MIXER_LIBRARIES}) set(SDL2MIXER_INCLUDE_DIR ${SDL2_MIXER_INCLUDE_DIRS}) set(SDL2MIXER_FOUND ${SDL2_MIXER_FOUND}) -set(SDL_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARIES}) -set(SDL_MIXER_INCLUDE_DIR ${SDL2_MIXER_INCLUDE_DIRS}) -set(SDL_MIXER_FOUND ${SDL2_MIXER_FOUND}) mark_as_advanced(SDL2_MIXER_LIBRARY SDL2_MIXER_INCLUDE_DIR) diff --git a/gemrb/GemRB.cfg.vita b/gemrb/GemRB.cfg.vita index bbc29e1ff6..b24c2e7f55 100644 --- a/gemrb/GemRB.cfg.vita +++ b/gemrb/GemRB.cfg.vita @@ -1,6 +1,6 @@ -VitaPointerSpeed = 10 -VitaKeepAspectRatio = 1 -VitaBilinear = 1 +VitaPointerSpeed=10 +VitaKeepAspectRatio=1 +VitaBilinear=1 ##################################################### # # diff --git a/gemrb/core/System/Logging.h b/gemrb/core/System/Logging.h index 2aa27f0292..dba6155921 100644 --- a/gemrb/core/System/Logging.h +++ b/gemrb/core/System/Logging.h @@ -29,6 +29,14 @@ #include "exports.h" #include "win32def.h" +#ifdef VITA +#if defined(__sgi) +# include +#else +# include +#endif +#endif + namespace GemRB { #ifdef WIN32 diff --git a/gemrb/plugins/BIKPlayer/mem.cpp b/gemrb/plugins/BIKPlayer/mem.cpp index 320e8ee143..9f155396ad 100644 --- a/gemrb/plugins/BIKPlayer/mem.cpp +++ b/gemrb/plugins/BIKPlayer/mem.cpp @@ -52,7 +52,7 @@ void *av_malloc(unsigned int size) ptr = NULL; #elif HAVE_ALIGNED_MALLOC ptr = _aligned_malloc(size, 16); -#elif defined(HAVE_MEMALIGN) +#elif HAVE_MEMALIGN ptr = memalign(16, size); #else ptr = malloc(size + 16); diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 1fc9a958c2..4c8576b63b 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -15997,7 +15997,6 @@ bool GUIScript::Init(void) Py_NoSiteFlag = 1; Py_IgnoreEnvironmentFlag = 1; Py_NoUserSiteDirectory = 1; - Py_SetPythonHome((char*)"ux0:/data/GemRB/python2.7"); #endif Py_Initialize(); diff --git a/gemrb/plugins/SDLVideo/SDLVideo.cpp b/gemrb/plugins/SDLVideo/SDLVideo.cpp index 84c808f352..09a8121d08 100644 --- a/gemrb/plugins/SDLVideo/SDLVideo.cpp +++ b/gemrb/plugins/SDLVideo/SDLVideo.cpp @@ -159,6 +159,10 @@ int SDLVideoDriver::SwapBuffers(void) } lastTime = time; +#ifdef VITA + ProcessAxisMotion(); +#endif + if (Cursor[CursorIndex] && !(MouseFlags & (MOUSE_DISABLED | MOUSE_HIDDEN))) { if (MouseFlags&MOUSE_GRAYED) { @@ -412,10 +416,6 @@ int SDLVideoDriver::ProcessEvent(const SDL_Event & event) break; } -#ifdef VITA - ProcessAxisMotion(); -#endif - return GEM_OK; } @@ -650,11 +650,11 @@ void SDLVideoDriver::HandleJoyButtonEvent(const SDL_JoyButtonEvent & button) GamepadKeyboardEvent(SDLK_o, button.state); break; } - //F6 shortcut + //ESC case BTN_START: { if (button.state == SDL_PRESSED) - EvntManager->OnSpecialKeyPress(GEM_FUNCTION1 + SDLK_F6-SDLK_F1); + EvntManager->OnSpecialKeyPress(GEM_ESCAPE); break; } //pause combat