暂无描述

Yihua LOU af76e5dff9 Merge pull request #22 from sdlpal/native_midi 7 年之前
3ds 2c677d7ee4 License update 7 年之前
3rd af76e5dff9 Merge pull request #22 from sdlpal/native_midi 7 年之前
SDL2 55d87b6290 README update for submodules 7 年之前
adplug 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 8 年之前
android af76e5dff9 Merge pull request #22 from sdlpal/native_midi 7 年之前
dingux 12dea8595c Deal with input code & move osx->macos 7 年之前
emscripten 2c677d7ee4 License update 7 年之前
gph 12dea8595c Deal with input code & move osx->macos 7 年之前
incomplete_ports e981e3d77a Further move of platform-specific code 7 年之前
ios c217f24b46 iOS/macOS interface matching 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 c217f24b46 iOS/macOS interface matching 7 年之前
native_midi bcdb2ae6fc New MIDI framework: base & WIN32 & UWP 7 年之前
psp a9871d8d68 Move most platform-specific code into separate files. 7 年之前
tests 467f44b529 Added the README file 7 年之前
unix 3ca9be4dc0 tweak for ubuntu 7 年之前
wii 12dea8595c Deal with input code & move osx->macos 7 年之前
win32 039b1017b7 Native MIDI: Completely fix MinGW compilation problem 7 年之前
winrt af76e5dff9 Merge pull request #22 from sdlpal/native_midi 7 年之前
.appveyor.yml b5bc68c0b3 Appveyor update 7 年之前
.gitignore f8b1c6f8c1 iOS/macOS seperate native_midi wrapper for future usage 7 年之前
.gitmodules 039b1017b7 Native MIDI: Completely fix MinGW compilation problem 7 年之前
.travis.yml 0e90da18c9 MinGW build optimization 7 年之前
AUTHORS.txt 77bf04e2cc Minor change in licensing information & bug fix in makemessage.py 8 年之前
README.md 484ab17b7a README update 7 年之前
ascii.h 2c677d7ee4 License update 7 年之前
audio.c c706728e89 Reduce conditional compilation of PAL_HAS_NATIVEMIDI 7 年之前
audio.h 2c677d7ee4 License update 7 年之前
battle.c 2c677d7ee4 License update 7 年之前
battle.h 2c677d7ee4 License update 7 年之前
codepage.h 2c677d7ee4 License update 7 年之前
common.h 2c677d7ee4 License update 7 年之前
ending.c 8062397152 Fix issue #21 7 年之前
ending.h 2c677d7ee4 License update 7 年之前
fight.c 2c677d7ee4 License update 7 年之前
fight.h 2c677d7ee4 License update 7 年之前
font.c 2c677d7ee4 License update 7 年之前
font.h 2c677d7ee4 License update 7 年之前
fontglyph.h 2c677d7ee4 License update 7 年之前
game.c 2c677d7ee4 License update 7 年之前
game.h 2c677d7ee4 License update 7 年之前
global.c 2c677d7ee4 License update 7 年之前
global.h 2c677d7ee4 License update 7 年之前
gpl.txt 8d4be3267d Initial check-in. 11 年之前
input.c bcdb2ae6fc New MIDI framework: base & WIN32 & UWP 7 年之前
input.h 2c677d7ee4 License update 7 年之前
itemmenu.c 2c677d7ee4 License update 7 年之前
itemmenu.h 2c677d7ee4 License update 7 年之前
magicmenu.c 2c677d7ee4 License update 7 年之前
magicmenu.h 2c677d7ee4 License update 7 年之前
main.c 8062397152 Fix issue #21 7 年之前
main.h 2c677d7ee4 License update 7 年之前
makemessage.py 9c43187b03 Added two missing newline marks in makemessage.py 8 年之前
map.c 2c677d7ee4 License update 7 年之前
map.h 2c677d7ee4 License update 7 年之前
midi.c 3685f08ddb Native MIDI: Fix MinGW playing speed & Fix Win32 playing bug 7 年之前
midi.h bcdb2ae6fc New MIDI framework: base & WIN32 & UWP 7 年之前
mp3play.c 2c677d7ee4 License update 7 年之前
oggplay.c 2c677d7ee4 License update 7 年之前
overlay.c 2c677d7ee4 License update 7 年之前
palcfg.c 2c677d7ee4 License update 7 年之前
palcfg.h 2c677d7ee4 License update 7 年之前
palcommon.c 2c677d7ee4 License update 7 年之前
palcommon.h 2c677d7ee4 License update 7 年之前
palette.c 2c677d7ee4 License update 7 年之前
palette.h 2c677d7ee4 License update 7 年之前
play.c 2c677d7ee4 License update 7 年之前
play.h 2c677d7ee4 License update 7 年之前
players.h 2c677d7ee4 License update 7 年之前
private.c d6035000dc SDL 1.2.15 compatibility 9 年之前
res.c 2c677d7ee4 License update 7 年之前
res.h 2c677d7ee4 License update 7 年之前
resampler.c a9871d8d68 Move most platform-specific code into separate files. 7 年之前
resampler.h 2c3f1ef5d4 Fix rix play 9 年之前
rixplay.cpp 2c677d7ee4 License update 7 年之前
rngplay.c 2c677d7ee4 License update 7 年之前
rngplay.h 2c677d7ee4 License update 7 年之前
scene.c 2c677d7ee4 License update 7 年之前
scene.h 2c677d7ee4 License update 7 年之前
script.c 2c677d7ee4 License update 7 年之前
script.h 2c677d7ee4 License update 7 年之前
sdlpal.cfg.example 3d484b530d Resource version auto-detection & bug fixes & fullscreen enabled 8 年之前
sdlpal.ico 305aba1c83 Change ICON & fix dialog 8 年之前
sdlpal.xpm 8d4be3267d Initial check-in. 11 年之前
sound.c 2c677d7ee4 License update 7 年之前
text.c 2c677d7ee4 License update 7 年之前
text.h 2c677d7ee4 License update 7 年之前
ui.c 2c677d7ee4 License update 7 年之前
ui.h 2c677d7ee4 License update 7 年之前
uibattle.c 2c677d7ee4 License update 7 年之前
uibattle.h 2c677d7ee4 License update 7 年之前
uigame.c 2c677d7ee4 License update 7 年之前
uigame.h 2c677d7ee4 License update 7 年之前
util.c bcdb2ae6fc New MIDI framework: base & WIN32 & UWP 7 年之前
util.h 2c677d7ee4 License update 7 年之前
video.c 8062397152 Fix issue #21 7 年之前
video.h 8062397152 Fix issue #21 7 年之前
yj1.c 2c677d7ee4 License update 7 年之前

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.

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:

    $ 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
    $ # 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, open the project ios/SDLPal/SDLPal.xcodeproj with Xcode, and click Build.

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.

Configuration GUI is available under Windows Desktop, Universal Windows Platform and Linux (X11), which is able to change the most common configurations. 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, it will default not to show again on following launches. However, you can bring it back again through the in-game system menu. You will also have the opportunity to bring it again if you encountered fatal game program errors. Configuration GUIs for Android and iOS/macOS are still unavailable for now and we welcome contributions to implement them.

To set these 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.