No Description

Pal Lockheart 6812f9afc8 iPhone X adaptation 6 years ago
3ds 7918a25173 Remove some possible illegal resources from ported versions 6 years ago
3rd 660fe8e044 WinRT: Update project files, SDL submodule & appveyor 6 years ago
adplug 065a35cec7 Wii backport(rebased). Saving works( previous is really a stupid error ). 6 years ago
android 96721fa1f1 temporarily hackfix failure to save game on some phones (one of the most frequently reported issues at google play). Not tested. 6 years ago
emscripten 065a35cec7 Wii backport(rebased). Saving works( previous is really a stupid error ). 6 years ago
incomplete_ports 438424ae47 Try always using longjmp to perform exit (#35) 6 years ago
ios 6812f9afc8 iPhone X adaptation 6 years ago
libmad 651bf2a27b Eliminate more warnings & fix one typo bug 6 years ago
liboggvorbis fa9227ac46 silenced compiler warnings 6 years ago
macos be409bea7b dialog disappear behaviour changed to original DOS version; fixes #68, thanks to testing of M-HT 6 years ago
native_midi 28e861dac9 allow disabling ALSA in command-line when compiling 6 years ago
scripts 02e5d994c6 derestrict l10n template generator, parser & usage, makes translation of mod version possible 6 years ago
tests 467f44b529 Added the README file 7 years ago
unix 28e861dac9 allow disabling ALSA in command-line when compiling 6 years ago
wii 9c7f7f0565 re-config wii joystick; almost all shortcut key works now in all 3 modes(wiimote only/wiimote+nunchuk/wiimote-classic) 6 years ago
win32 1230770a98 force audio driver to directsound, fix audio glitching in new wasapi driver introduced in SDL 2.0.6. thanks for solution provided by @louyihua 6 years ago
winrt d3f03aeff0 basic unicode bdf support 6 years ago
.appveyor.yml d56259ba01 Drop support for Windows Store 8.1 6 years ago
.gitignore 94679794e0 Generalized version of resource checking 6 years ago
.gitmodules 039b1017b7 Native MIDI: Completely fix MinGW compilation problem 6 years ago
.travis.yml 53b99808c5 use UPX to compress the GNU/Linux binary as well 6 years ago
AUTHORS.txt 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 8 years ago
README.md 1d563ef121 markdown: update links as relative; set theme jekyll-theme-cayman 6 years ago
_config.yml 1d563ef121 markdown: update links as relative; set theme jekyll-theme-cayman 6 years ago
ascii.h 5d008cd57a replace iso_font with the complete version for European languages (French, etc.) 6 years ago
audio.c a7a3891e34 set MIDI volume based on global music volume; set Native MIDI volume range as 0-127 6 years ago
audio.h 2c677d7ee4 License update 7 years ago
aviplay.c f39d0f4693 Merge pull request #61 from sdlpal/wii 6 years ago
aviplay.h 71fa931095 More robust AVI playing 6 years ago
battle.c 15073fe811 make keyrepeat work outside battle 6 years ago
battle.h 224cb0a0cc revert R behavior (#45) 6 years ago
codepage.h 40cbf83060 silence some compiler warnings 6 years ago
common.h 5541564ada fix various win32 ONLY problems 6 years ago
ending.c 405f42da7e a hacky fix for a dirty index in MGO; this patch makes importing map/gop from win95 version to DOS version possible without makes the latter ending renders wrong 6 years ago
ending.h 2c677d7ee4 License update 7 years ago
fight.c e30580bb0e Fix issue #62 6 years ago
fight.h 2c677d7ee4 License update 7 years ago
font.c fa9227ac46 silenced compiler warnings 6 years ago
font.h 2c677d7ee4 License update 7 years ago
fontglyph.h 2c677d7ee4 License update 7 years ago
fontglyph_cn.h 36bcfd96a8 Add separate font flavors for Simplified Chinese, Traditional Chinese and Japanese 6 years ago
fontglyph_jp.h 36bcfd96a8 Add separate font flavors for Simplified Chinese, Traditional Chinese and Japanese 6 years ago
fontglyph_tw.h 36bcfd96a8 Add separate font flavors for Simplified Chinese, Traditional Chinese and Japanese 6 years ago
game.c 2c677d7ee4 License update 7 years ago
game.h 2c677d7ee4 License update 7 years ago
global.c 5be5a2ca73 fix win95 saving 6 years ago
global.h cd314c930d Further improvement of case-insensitive file opening 6 years ago
gpl.txt 8d4be3267d Initial check-in. 11 years ago
input.c 2476714d20 also disable keyrepeat for touchscreen by default 6 years ago
input.h c479813b80 fix joystick deny keyboard movement 6 years ago
itemmenu.c a48fac29f2 tweak desc as #58 mentioned: make gap in dialog and text; relative positioning in picture dialog. 6 years ago
itemmenu.h 2c677d7ee4 License update 7 years ago
magicmenu.c d46840acab Fix issue #26 6 years ago
magicmenu.h 2c677d7ee4 License update 7 years ago
main.c f39d0f4693 Merge pull request #61 from sdlpal/wii 6 years ago
main.h af4b5b3a71 avi support 6 years ago
map.c 2c677d7ee4 License update 7 years ago
map.h 2c677d7ee4 License update 7 years ago
midi.c a7a3891e34 set MIDI volume based on global music volume; set Native MIDI volume range as 0-127 6 years ago
midi.h a7a3891e34 set MIDI volume based on global music volume; set Native MIDI volume range as 0-127 6 years ago
mp3play.c 8925ac1548 fix #72; change index of player no matter whether the file exist, since the invalide index was used explicitly as flag for stopping playback 6 years ago
oggplay.c fa9227ac46 silenced compiler warnings 6 years ago
overlay.c 2c677d7ee4 License update 7 years ago
palcfg.c 40cbf83060 silence some compiler warnings 6 years ago
palcfg.h 62822eef8b add keyrepeat to config (still disabled by default) 6 years ago
palcommon.c 405f42da7e a hacky fix for a dirty index in MGO; this patch makes importing map/gop from win95 version to DOS version possible without makes the latter ending renders wrong 6 years ago
palcommon.h d3f03aeff0 basic unicode bdf support 6 years ago
palette.c 42b6b53958 keyrepeat in SDL2 is non-customizable, so use PAL_GetKeyboardState() instead 6 years ago
palette.h fc3a6dcf75 iOS config page done; need manually rename main() in SDL source to avoid name confliction for now 6 years ago
play.c 2c677d7ee4 License update 7 years ago
play.h 2c677d7ee4 License update 7 years ago
players.h 328f8c52e7 Eliminate most warnings & fix potential bugs 6 years ago
private.c d6035000dc SDL 1.2.15 compatibility 9 years ago
res.c 2c677d7ee4 License update 7 years ago
res.h 2c677d7ee4 License update 7 years ago
resampler.c a9871d8d68 Move most platform-specific code into separate files. 7 years ago
resampler.h 2c3f1ef5d4 Fix rix play 8 years ago
riff.h 71fa931095 More robust AVI playing 6 years ago
rixplay.cpp 065a35cec7 Wii backport(rebased). Saving works( previous is really a stupid error ). 6 years ago
rngplay.c dd8346b822 Optimize RNG playing code 6 years ago
rngplay.h 2c677d7ee4 License update 7 years ago
scene.c 2c677d7ee4 License update 7 years ago
scene.h 2c677d7ee4 License update 7 years ago
script.c e3a94557f7 fix: the scroll direction in staff of DOS version was inverted from original implementation 6 years ago
script.h 2c677d7ee4 License update 7 years ago
sdlpal.cfg.example b78537e3b7 Update REAMDE & configuration example 6 years ago
sdlpal.ico 305aba1c83 Change ICON & fix dialog 8 years ago
sdlpal.xpm 8d4be3267d Initial check-in. 11 years ago
sound.c cac511fe3e Big-Endian fix: sfx not play in win95 version 6 years ago
text.c 36bcfd96a8 Add separate font flavors for Simplified Chinese, Traditional Chinese and Japanese 6 years ago
text.h 36bcfd96a8 Add separate font flavors for Simplified Chinese, Traditional Chinese and Japanese 6 years ago
ui.c cd314c930d Further improvement of case-insensitive file opening 6 years ago
ui.h 2c677d7ee4 License update 7 years ago
uibattle.c 651bf2a27b Eliminate more warnings & fix one typo bug 6 years ago
uibattle.h 2c677d7ee4 License update 7 years ago
uigame.c 302dba9565 fix #55: tweak item picture as dialog background moved in #54; remove shadow in dialog of money/price due to original version dont have it too; when item amount reduced to zero and the item is not last one cursor will not move 6 years ago
uigame.h 2c677d7ee4 License update 7 years ago
util.c e8a57dcc09 silence several compiler warnings 6 years ago
util.h 065a35cec7 Wii backport(rebased). Saving works( previous is really a stupid error ). 6 years ago
video.c 5541564ada fix various win32 ONLY problems 6 years ago
video.h 38efd10524 use better colors when playing avi files using SDL 1.2 6 years ago
yj1.c af4b5b3a71 avi support 6 years ago

README.md

SDLPAL

Travis CI Build status

SDLPAL is an SDL-based open-source cross-platform reimplementation of the classic Chinese RPG game Xiān jiàn Qí Xiá Zhuàn (Chinese: 仙剑奇侠传/仙劍奇俠傳) (also known as Chinese Paladin or Legend of Sword and Fairy, or PAL for short).

Google Play

LICENSE

SDLPAL is originally created by Wei Mingzhi from 2009.

Copyright (c) 2009-2011, Wei Mingzhi <whistler_wmz@users.sf.net>.
Copyright (c) 2011-2017, SDLPAL development team.
All rights reserved.

SDLPAL is distributed under the terms of GNU General Public License, version 3 (or any later version) as published by the Free Software Foundation. See gpl.txt for details.

Many of the ideas of this program are based on documents from PAL Research Project, and portions of the code are based on the work done by Baldur and louyihua.

This program made extensive use of the following libraries:

Please see AUTHORS.txt for additional authors.

This program does NOT include any code or data files of the original game, which are proprietary and copyrighted by SoftStar Inc.

Chat Room

Want to chat with other members of the SDLPal community?

We have a Gitter Room which you can join below.

Building the game

Currently, SDLPAL supports the following platforms:

  • Desktop platforms: Windows (both Windows Desktop and Universal Windows Platform), Linux and macOS
  • Mobile platforms: Android, iOS and Windows
  • Home consoles: 3DS, WII, PSP and others (some of them are not actively maintained now)

To build SDLPAL, there are three major steps you need to do:

  1. Clone the source code from Github into your local folder using git or through corresponding GUI: shell $ cd <parent-path-of-sdlpal> $ git clone https://github.com/sdlpal/sdlpal.git
  2. Update all the submodules used by SDLPAL using git submodule or through corresponding GUI: shell $ cd <parent-path-of-sdlpal>/sdlpal $ git submodule update --init --recursive
  3. Follow the platform-specific steps listed below.

Windows

Visual Studio

To build SDLPAL as a Windows desktop app, you can use Microsoft Visual Studio 2015 or Microsoft Visual Studio 2017 to open the solution file sdlpal.sln under the win32 directory.

To build SDLPAL as a Universal Windows Platform app, you can use Microsoft Visual Studio 2015 or Microsoft Visual Studio 2017 to open the solution file SDLPal.UWP.sln under the winrt directory.

There are also solution files for building traditional Windows (phone) store app under the winrt directory, but they are deprecated (which means there will be no further platform-specific feature update for these two platforms) and may be removed in future.

MinGW

To build SDLPAL as a Windows desktop app, you can also use MinGW. Steps for building under MinGW varies depends on the compiling environment you have:

  • If you need to compile SDLPAL under Windows shell environment, please go to the root of the source code tree and type:

    C:\sdlpal> cd win32
    C:\sdlpal> make -f Makefile.mingw
    
  • If you need to compile SDLPAL under msys shell environment, please go to the root of the source code tree and type:

    $ cd win32
    $ make
    
  • If you need to cross-compile SDLPAL under Linux shell environment, please go to the root of the source code tree and type:

    $ cd win32
    $ # This builds a 32-bit executable.
    $ make HOST=i686-w64-mingw32-
    $ # This builds a 64-bit executable.
    $ make HOST=x86_64-w64-mingw32-
    

Linux or Unix

To build the game, please go to the root of the source code tree and type:

$ cd unix
$ make

You also need to have SDL 2.0 development files installed in the system. The compiled executable should be generated with the filename sdlpal at the current directory. By default, SDLPAL uses the FLTK library to provide setting GUI at launch. If you do not want to use the library, please define he macro PAL_NO_LAUNCH_UI in the Makefile. SDLPAL should also be able to compile and run under other Unix-like systems, however it's not tested.

macOS (OS X)

To compile, open Pal.xcodeproj with Xcode, and click Build. You need to have SDL framework installed at /Library/Frameworks.

iOS

To compile, please first install dependencies via CocoaPods following the above instruments, then open the project ios/SDLPal/SDLPal.xcworkplace with Xcode, and click Build.

$ cd iOS/SDLPAL
$ sudo gem install cocoapods # ONLY need do once on one machine
$ pod install # ONLY need do once in one repository

Android

To build the game, open the android directory through Android Studio, and click Make Project.

Nintendo 3DS

To build the game, please go to the root of the source code tree and type:

cd 3ds
make
make cia

You need to have DevkitPro ARM and SDL 1.2 for 3DS portlib installed. The compiled executable should be generated with the filename sdlpal at the current directory.

Other platforms

To be written.

Choosing the battle system

By default, SDLPAL builds a "classic" turn-based battle system which is designed to be 100% the same as the original game.

SDLPAL also provides a revised battle system (deprecated and will be removed in future) which is more exciting yet somewhat harder than the original game. If you prefer this battle system, please define the macro ENABLE_REVISIED_BATTLE in Makefile or in common.h and recompile the project.

Running the game

The data files required for running the game are not included with the source package due to copyright issues, so you need to obtain them from a licensed game copy before you can run the game.

To run the game, copy all the files in the original game CD to a directory, then copy the built SDLPAL executable to the same directory, and run the executable.

Note that the filenames of data files should be all in lower-case under systems that use case-sensitive filesystems such as Linux or other Unix-like operating systems.

If you prefer using MIDI as background music source, please note that the MIDI playing feature is not yet complete under every supported platform. Currently, offical support is provided under Windows Desktop, Universal Windows Platform, Android, iOS and macOS. There is also a preliminary support for Linux that relys upon package timidity. Other platforms do not support playing MIDI for now.

Configuring the game

PAL has several variants using different and incompatible resource files, and SDLPAL supports several configuration options for supporting such variants. The default values are used to support the resources from original DOS version. If you want to change these configurations, you have two options: through the configuration GUI or by manipulating the configuration file sdlpal.cfg manually.

GUI

The configuration GUI provides options for you to change the most common configuration options. If you launch SDLPAL for the first time, it will bring you to the configuration GUI by default. Once you have saved configurations from the GUI, the GUI will not to show again on subsequent launches. However, you have the opportunity to bring the GUI back on fatal game program errors or through the in-game system menu.

Currently, the configuration GUI is available under the following platforms:

  • Desktop platforms: Windows (both Windows Desktop and Universal Windows Platform) and Linux
  • Mobile platforms: Android, Windows and iOS

Configuration GUIs for macOS is still unavailable for now and we welcome contributions to implement it.

Manually

To set the configuration options manually, create a file named as sdlpal.cfg (make sure to use lower-case file name in case-sensitive filesystems) in the game directory created by the above step. Please refer to the file sdlpal.cfg.example for format specfication.

Reporting issues

If you find any issues of SDLPAL, please feel free to report them to the development team through Github's issue tracking system using either English or Chinese.

Contributing to the game

Any original code & documentation contributions are welcomed as long as the contributed code & documentation is licensed under GPL. You can use Github's pull request system to submit your changes to the main repository here. But remember, as a step to keep the quality of code, you should write corresponding unit tests before your changes can be merged. The guidance of writting unit tests can be found here.