暂无描述

LouYihua 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
3ds e981e3d77a Further move of platform-specific code 7 年之前
3rd cf81b91075 Simpilify unit test framework for win32/linux 7 年之前
SDL2 6e9a88be0b Add README.md 7 年之前
adplug 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 9 年之前
android 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
dingux 12dea8595c Deal with input code & move osx->macos 7 年之前
emscripten a9871d8d68 Move most platform-specific code into separate files. 7 年之前
gph 12dea8595c Deal with input code & move osx->macos 7 年之前
incomplete_ports e981e3d77a Further move of platform-specific code 7 年之前
ios 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
libmad e386b838ac fix libmad att asm syntax error for x86/amd64 7 年之前
liboggvorbis a0681238ce HTML5 support via emscripten( no audio/sfx now) 7 年之前
macos d40013bfc2 add back sys/time.h for iOS/emscripten, please dont remove it in future; add xcode schemes 7 年之前
native_midi a7235db0d7 Added VS.net 2008 Project 11 年之前
psp a9871d8d68 Move most platform-specific code into separate files. 7 年之前
tests 467f44b529 Added the README file 7 年之前
unix 2ffebe310b Merge pull request #6 from sdlpal/unittest 7 年之前
wii 12dea8595c Deal with input code & move osx->macos 7 年之前
win32 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
winrt da5b597b20 Fix UWP certificate 7 年之前
.appveyor.yml 1c41898314 appveyor support for building Win32+UWP in VS 7 年之前
.gitignore 3ffefb52a0 update travis script for android compilation 7 年之前
.gitmodules e9991b6aa1 unittest: unix make check && osx xctest done 7 年之前
.travis.yml 3ffefb52a0 update travis script for android compilation 7 年之前
AUTHORS.txt 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 9 年之前
README.md 39eeb1dc36 Mark some features deprecated and make v140_xp as default 7 年之前
ascii.h 614e33d3c2 Bug fix: dead lock on exit, overlay on non-touch devices 9 年之前
audio.c 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
audio.h a9871d8d68 Move most platform-specific code into separate files. 7 年之前
battle.c 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
battle.h 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
codepage.h 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 9 年之前
common.h 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
ending.c 11b1d86215 Remove direct calls to SDL_SetPaletteSurface & remove SDL_HWSURFACE 7 年之前
ending.h fd9a91e7c6 Unified version 9 年之前
fight.c 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
fight.h fd9a91e7c6 Unified version 9 年之前
font.c 8e8cdecdd4 OSX compilation fix & travis-ci fix 7 年之前
font.h db959a75bb added bdf font support 8 年之前
fontglyph.h 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 9 年之前
game.c 1d74726652 Audio system refactor 8 年之前
game.h d70187aec1 Emacs 11 年之前
global.c fd53774a0a save path customable in config file like game path( behaviour same as before if unspecified ); now savefile-only sync is possible 7 年之前
global.h 764f0fed3b Try fix enemy magic sound & animation in battle 8 年之前
gpl.txt 8d4be3267d Initial check-in. 12 年之前
input.c 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
input.h 12dea8595c Deal with input code & move osx->macos 7 年之前
itemmenu.c cc1edf8f0d [WIP] Various change for refactor 8 年之前
itemmenu.h d70187aec1 Emacs 11 年之前
magicmenu.c 889f9d766f fix several render problem introduced by UI shadow; make script FFFF behaviour more like original version in dialogs; hidden exp upgrade dialog tweak 7 年之前
magicmenu.h d6035000dc SDL 1.2.15 compatibility 10 年之前
main.c 9ed8b65201 audio & video & input modify for SDL & SDL2 compatibility 7 年之前
main.h f3ae0012c5 New sound play model: Moving major processing steps (resample & convert) from main thread to audio thread 8 年之前
makemessage.py 9c43187b03 Added two missing newline marks in makemessage.py 8 年之前
map.c e5ac3699f1 Change SWAPxx into SDL's built-in SDL_SwapLExx. 9 年之前
map.h d70187aec1 Emacs 11 年之前
midi.c 1d74726652 Audio system refactor 8 年之前
midi.h 124361ef8a Eliminate MIDI calls when PAL_HAS_NATIVEMIDI is not defined 8 年之前
mp3play.c c0f0d0230a Use SDL's LockAudio() & UnlockAudio() instead of customized mutex 8 年之前
oggplay.c c0f0d0230a Use SDL's LockAudio() & UnlockAudio() instead of customized mutex 8 年之前
overlay.c a0681238ce HTML5 support via emscripten( no audio/sfx now) 7 年之前
palcfg.c 8c4619bf59 save path follow game path when unspecified 7 年之前
palcfg.h fd53774a0a save path customable in config file like game path( behaviour same as before if unspecified ); now savefile-only sync is possible 7 年之前
palcommon.c 9f9b818ec5 add back dialog shadow effect from original version 7 年之前
palcommon.h 9f9b818ec5 add back dialog shadow effect from original version 7 年之前
palette.c 5fa74edd95 SDL_GetTicks() ralted fix, avoiding possible bugs on extreme cases when SDL_GetTicks() wrapped, and remove some redundant codes on SDL 2.0 drawing. 9 年之前
palette.h d70187aec1 Emacs 11 年之前
play.c 3d484b530d Resource version auto-detection & bug fixes & fullscreen enabled 8 年之前
play.h d70187aec1 Emacs 11 年之前
players.h c0f0d0230a Use SDL's LockAudio() & UnlockAudio() instead of customized mutex 8 年之前
private.c d6035000dc SDL 1.2.15 compatibility 10 年之前
res.c d6035000dc SDL 1.2.15 compatibility 10 年之前
res.h d6035000dc SDL 1.2.15 compatibility 10 年之前
resampler.c a9871d8d68 Move most platform-specific code into separate files. 7 年之前
resampler.h 2c3f1ef5d4 Fix rix play 9 年之前
rixplay.cpp c0f0d0230a Use SDL's LockAudio() & UnlockAudio() instead of customized mutex 8 年之前
rngplay.c 5fa74edd95 SDL_GetTicks() ralted fix, avoiding possible bugs on extreme cases when SDL_GetTicks() wrapped, and remove some redundant codes on SDL 2.0 drawing. 9 年之前
rngplay.h d70187aec1 Emacs 11 年之前
scene.c d6035000dc SDL 1.2.15 compatibility 10 年之前
scene.h d6035000dc SDL 1.2.15 compatibility 10 年之前
script.c 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
script.h fd9a91e7c6 Unified version 9 年之前
sdlpal.cfg.example 3d484b530d Resource version auto-detection & bug fixes & fullscreen enabled 8 年之前
sdlpal.ico 305aba1c83 Change ICON & fix dialog 9 年之前
sdlpal.xpm 8d4be3267d Initial check-in. 12 年之前
sound.c a9871d8d68 Move most platform-specific code into separate files. 7 年之前
text.c 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
text.h 2ae14ef18f Added the PAL_swprintf function to avoid incorrect Chinese character output in OSX/iOS/Android. 7 年之前
ui.c 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
ui.h c14510fee0 status UI: applied 8x8/shadow for most labels used here 7 年之前
uibattle.c 1080ef28b3 some UI text tweak, mainly for using in international project 7 年之前
uibattle.h 112754ca15 Remove PAL_UNICODE definition 9 年之前
uigame.c 2de87ad8a9 Remove some direct calls to "SDL_xxx" outside video.c 7 年之前
uigame.h 3d484b530d Resource version auto-detection & bug fixes & fullscreen enabled 8 年之前
util.c fd53774a0a save path customable in config file like game path( behaviour same as before if unspecified ); now savefile-only sync is possible 7 年之前
util.h 12dea8595c Deal with input code & move osx->macos 7 年之前
video.c 11b1d86215 Remove direct calls to SDL_SetPaletteSurface & remove SDL_HWSURFACE 7 年之前
video.h 11b1d86215 Remove direct calls to SDL_SetPaletteSurface & remove SDL_HWSURFACE 7 年之前
yj1.c 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 9 年之前

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).

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. Portions of the code are based on the work done by Baldur and louyihua, and the resampler code is based on the code in Kode54's foo_input_adplug project.

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.

Building the game

The steps for building SDLPAL varies in different platforms. Currently, SDLPAL supports most desktop platforms including Windows (including Windows Store), Linux and macOS, as well as most popular mobile platforms including Android, iOS and Windows Phone. It is also ported to several home console platforms.

Windows

Visual Studio

To build SDLPAL as a Windows desktop app, you can use Microsoft Visual Studio 2015 or Microsoft Visual Studio 2017 (the support of Visual Studio 2013 is deprecated now and will be removed in future) to open the solution file sdlpal.sln under the win32 directory. As a dependency, you need to have SDL 2.0 development or source files installed at the SDL2 directory under the source tree.

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. As a dependency, you need to have SDL 2.0 source files installed at the SDL2 directory under the source tree.

There are also solution files for building traditional Windows (phone) store app under the winrt directory, but they are deprecated and will 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:

    $ cd win32
    $ 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
    $ make HOST=i686-w64-mingw32-  # This builds a 32-bit executable. To build a 64-bit executable, replace 'i686' by 'x86_64'.
    

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, open the project ios/SDLPal/SDLPal.xcodeproj with Xcode, and click Build. You need to have SDL2 source files (not development files) extracted in the SDL2 folder.

Android

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

cd android/jni
ndk-build
cd ..
ant debug

You need to have SDL2 source files (not development files) extracted in the SDL2 folder.

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.

Configuring the game

PAL has several variants using different and incompatible resource files, and SDLPAL supports several configuration options for supporting such variants.

To set these configuration options, 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. If no configuration file exists, SDLPAL uses default values that supports the resources from original DOS version.

Please refer to the file sdlpal.cfg.example for configuration file format.

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.