Commit a1e3fdbb authored by Martin Quinson's avatar Martin Quinson

Imported Upstream version 1.0.2

parents
*~
*.swp
*.class
*.pyc
.DS_Store
.cproject
.project
.classpath
.settings
.csettings
tags
valgrind.out
callgrind.out.*
core
doc/html/
doc/0.*
doc/1.*
developer_doc/1.*
tools/javadoc/
tools/solaruskeystore
work/unversioned/
CMakeCache.txt
install_manifest.txt
CMakeFiles/
Makefile
cmake_install.cmake
libsolarus_static.a
/solarus
error.txt
cmake_minimum_required(VERSION 2.6)
project(SOLARUS_ENGINE)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif()
set(CMAKE_MODULE_PATH "${SOLARUS_ENGINE_SOURCE_DIR}/cmake/modules/")
set(SOLARUS_INSTALL_DESTINATION "bin")
# find the headers and the libraries of dependencies
find_package(SDL REQUIRED)
find_package(SDL_image REQUIRED)
find_package(SDL_ttf REQUIRED)
find_package(OpenAL REQUIRED)
find_package(VorbisFile REQUIRED)
find_package(Ogg REQUIRED)
find_package(ModPlug REQUIRED)
find_package(Lua51 REQUIRED)
find_package(PhysFS REQUIRED)
# source files
file(
GLOB
source_files
src/*.cpp
src/entities/*.cpp
src/hero/*.cpp
src/hud/*.cpp
src/lowlevel/*.cpp
src/lua/*.cpp
src/menus/*.cpp
src/movements/*.cpp
src/snes_spc/*.cpp
include/*.h
include/entities/*.h
include/hero/*.h
include/hud/*.h
include/lowlevel/*.h
include/lua/*.h
include/menus/*.h
include/movements/*.h
include/snes_spc/*.h
)
# Configuration for OSX and iOS build and deployment
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(NOT SOLARUS_IOS_BUILD)
include(OSX)
else()
include(iOS)
endif()
endif()
# additional source files for Apple systems
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(source_files
${source_files}
src/lowlevel/apple/AppleInterface.mm
include/lowlevel/apple/AppleInterface.h
)
# SDL 1.3 avoid to link SDLMain
if(SDL_VERSION VERSION_LESS "1.3")
set(source_files
${source_files}
src/lowlevel/apple/SDLMain.m
include/lowlevel/apple/SDLMain.h
)
endif()
endif()
# build the executable
set(main_source_file src/lowlevel/Main.cc)
add_library(solarus_static
STATIC
${source_files}
)
#Add executable target, into CFBundle form if requested or iOS build
if(SOLARUS_BUNDLE OR SOLARUS_IOS_BUILD)
include(addCFBundleTarget)
else()
add_executable(solarus
${main_source_file}
)
endif()
# generate -I flags
include_directories(
${SOLARUS_ENGINE_SOURCE_DIR}/include
${SOLARUS_ENGINE_SOURCE_DIR}/include/snes_spc
${SDL_INCLUDE_DIR}
${SDLTTF_INCLUDE_DIR}
${SDLIMAGE_INCLUDE_DIR}
${OPENAL_INCLUDE_DIR}
${VORBISFILE_INCLUDE_DIR}
${OGG_INCLUDE_DIR}
${MODPLUG_INCLUDE_DIR}
${LUA_INCLUDE_DIR}
${PHYSFS_INCLUDE_DIR}
)
# generate -l flags
target_link_libraries(solarus
solarus_static
${SDL_LIBRARY}
${SDLIMAGE_LIBRARY}
${SDLTTF_LIBRARY}
${OPENAL_LIBRARY}
${LUA_LIBRARY}
${PHYSFS_LIBRARY}
${VORBISFILE_LIBRARY}
${OGG_LIBRARY}
${MODPLUG_LIBRARY}
)
# default compilation flags
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
# Force to be the less pedantic possible with the Release build
set(CMAKE_CXX_FLAGS "-Wno-error -Wno-all -Wno-unknown-pragmas")
# Some "no-warning" flags are not supported with gcc < 4.0
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
exec_program(gcc ARGS --version OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION)
if(NOT CMAKE_C_COMPILER_VERSION MATCHES "[0-3]\\.[0-9]\\.[0-9]")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-fatal-errors -Wno-extra")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-fatal-errors -Wno-extra")
endif()
else()
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-Werror ${CMAKE_CXX_FLAGS_DEBUG}")
endif()
# solarus options
option(DEBUG_KEYS "Enable the debugging keys." OFF)
if(DEBUG_KEYS)
add_definitions(-DSOLARUS_DEBUG_KEYS)
endif()
set(DEFAULT_QUEST "." CACHE STRING "Path to the quest to launch if none is specified at runtime.")
if(DEFAULT_QUEST)
add_definitions(-DSOLARUS_DEFAULT_QUEST=\"${DEFAULT_QUEST}\")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DEFAULT_WRITE_DIR "Solarus")
else()
set(DEFAULT_WRITE_DIR ".solarus")
endif()
set(WRITE_DIR ${DEFAULT_WRITE_DIR} CACHE STRING "Directory where Solarus savegames are stored, relative to the user's base write directory.")
if(WRITE_DIR)
add_definitions(-DSOLARUS_WRITE_DIR=\"${WRITE_DIR}\")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DEFAULT_BUFFERING OFF)
else()
set(DEFAULT_BUFFERING ON)
endif()
option(SCREEN_DOUBLEBUF "Define if your plaform support double buffering." ${DEFAULT_BUFFERING})
if(SCREEN_DOUBLEBUF)
add_definitions(-DSOLARUS_SCREEN_DOUBLEBUF)
endif()
if(PANDORA)
set(DEFAULT_SCREEN_WIDTH 400)
else()
set(DEFAULT_SCREEN_WIDTH 320)
endif()
set(SCREEN_WIDTH ${DEFAULT_SCREEN_WIDTH} CACHE INTEGER "Width of the logical screen in pixels.")
set(SCREEN_HEIGHT 240 CACHE INTEGER "Height of the logical screen in pixels.")
if(SCREEN_WIDTH)
add_definitions(-DSOLARUS_SCREEN_WIDTH=${SCREEN_WIDTH})
endif()
if(SCREEN_HEIGHT)
add_definitions(-DSOLARUS_SCREEN_HEIGHT=${SCREEN_HEIGHT})
endif()
if(PANDORA OR CAANOO)
set(DEFAULT_COLOR_DEPTH 16)
else()
set(DEFAULT_COLOR_DEPTH 32)
endif()
set(COLOR_DEPTH ${DEFAULT_COLOR_DEPTH} CACHE INTEGER "Number of bits per pixel for surfaces.")
if(COLOR_DEPTH)
add_definitions(-DSOLARUS_COLOR_DEPTH=${COLOR_DEPTH})
endif()
if(CAANOO)
set(DEFAULT_SCREEN_FORCE_MODE 2)
elseif(PANDORA)
set(DEFAULT_SCREEN_FORCE_MODE 5)
else()
set(DEFAULT_SCREEN_FORCE_MODE -1)
endif()
set(SCREEN_FORCE_MODE ${DEFAULT_SCREEN_FORCE_MODE} CACHE INTEGER "Video mode to force (-1 means no restriction).")
if(SCREEN_FORCE_MODE)
add_definitions(-DSOLARUS_SCREEN_FORCE_MODE=${SCREEN_FORCE_MODE})
endif()
# files to install with make install
# install the bundle if requested, or only the binary else
if(SOLARUS_BUNDLE)
install(TARGETS solarus
BUNDLE DESTINATION ${SOLARUS_INSTALL_DESTINATION}
)
else()
install(TARGETS solarus
RUNTIME DESTINATION ${SOLARUS_INSTALL_DESTINATION}
)
endif()
solarus-1.0.2 (2013-06-22)
Bug fixes for the 1.0 release.
Solarus changes:
* Fix a crash when a treasure callback changes the hero's state (#224).
* Fix a crash when a victory callback changes the hero's state.
* Fix a crash due to invalid sprite frame when animation is changed (#26).
* Fix an assertion error with FollowMovement of pickables.
* Fix the fullscreen mode not working on Mac OS X 10.7+ (#213, #220).
* Fix pickable treasures that could be obtained twice sometimes.
* Fix fade-in/fade-out effects on sprites that did not work (#221).
* Fix sol.audio.play_music() that failed with "none" or "same" (#201).
* Fix item:set_sound_when_brandish() that did not work.
* Fix diagonal movement that could bypass sensors since Solarus 1.0.1.
* Fix circle movement not working after entity:set_enabled(true).
* Fix detection of movement finished for NPCs.
* Fix memory issues with menus (#210).
* Fix handling of nil parameter in boolean setters (#225).
* Fix hangling the default language.
* Correctly suspend timers when set_suspended_with_map is called.
* When a sprite is suspended, suspend its transitions (#226).
* Don't die if a music or a sound cannot be found.
* Don't die if an image cannot be found.
* Don't die if running a savegame without starting location specified.
* Don't die if a script refers to a non-existing equipment item.
* Don't die if the self parameter is missing when calling a method (#219).
* Fix dangling pointers after removing some kind of entities.
Solarus Quest Editor changes:
* Editor: allow to create map entities from the quest tree (#208).
* Editor: fix a typo in the bomb flower sprite (#214).
* Editor: fix a possible NullPointerException when opening an invalid map.
Documentation changes:
* Documentation: add the syntax specification of maps and tilesets.
solarus-1.0.1 (2013-05-12)
Bug fixes for the 1.0 release.
Solarus changes:
* Fix the Mac OS X port.
* Fix jump movement accross two maps ending up in a wall (#189).
* Fix a possible crash in TextSurface.
* Fix the hero disappearing a short time after using the sword (#35).
* Fix the boomerang failing to bring back pickables sometimes (#187).
* Fix parallax scrolling tiles not always displayed (#167).
* Fix the setting joypad_enabled that had no effect (#163).
* Fix doors not working when they require equipment items.
* Fix a possible compilation warning in Surface.cpp.
* Fix creating a transition from the callback of a previous one.
* Fix crystal blocks animated late when coming from a teletransporter (#61).
* Fix arrows that got stopped when outside the screen (#73).
* Fix diagonal movement that failed in narrow passages (#39).
* Don't die if a script makes an error with a sprite (#151).
* Don't die if a script makes an error with an enemy attack consequence.
* Allow enemies to lose 0 life points when attacked (#137).
* Pixel-precise collisions can now also be performed on 32-bit images.
Solarus Quest Editor changes:
* Editor: add the possibility to show or hide each type of entity (#60).
* Editor: keep the map coordinates shown when changing the zoom (#183).
* Editor: fix the map view not updated correctly when changing the zoom (#174).
* Editor: show the correct sprite of destructible objects (#77).
* Editor: show an appropriate error message if the LuaJ jar is missing (#173).
* Editor: fix the title bar string (#176).
Documentation changes:
* Split the C++ documentation and the quest data files documentation (#181).
* Add a search feature to the documentation pages.
solarus-1.0.0 (2013-05-03)
The "I love Lua" release.
This is a major release. The version number switches from 0.x to 1.x
because there is a brand new Lua scripting API.
I now consider that Solarus can be used to create your own Zelda-like
games in decent conditions.
By "in decent conditions", I essentially mean: with a clean and stable
scripting API. Clean because there are nice datatypes now and the API is much
easier to use, less error-prone and more with the Lua spirit.
Stable because future versions of the scripting API will now try to keep
compatibility with existing scripts. Any API change that breaks compatibility
will now be clearly documented.
Data files and scripts written for solarus 0.x are not compatible with
solarus 1.x.
Which is not a problem since until now, I never said you could create a quest
in decent conditions :)
More seriously, I guess I'm the only one to have a lot of data files and
scripts created for solarus 0.x.
Anyway, conversion scripts are provided to upgrade your existing data files,
but not your scripts (the scripting API, which was working but ugly and
unstable, has totally changed).
Changes:
* Rewrite the Lua scripting API from scratch. Cleaner, real datatypes, much
easier to use, less error-prone, much more features, fully documentated.
* All scripts now live in a single Lua world.
* Add support of scripted graphics.
* Add support of scripted menus. Menus like the title screen, the savegames
menu, the pause menu and the HUD are no longer hardcoded into the engine.
* Doors, chests, teletransporters and destinations are now much more flexible
and customizable.
* Except tiles, all map entities can now have a name. The name is now optional.
* Change the format of some data files, including maps and tilesets.
* No more ini data files (removed the dependency to SimpleIni).
* Add conversion scripts to upgrade existing data files (but not scripts).
* Fix infinite explosions of bomb flowers.
This version also include changes from 0.9.3, though 0.9.3 is not released
yet:
* The game screen size can now be set at compilation time.
* Change the savegames directory on Mac OS X.
* Improve the support of Mac OS X, Pandora, Caanoo and other platforms.
* Fix the compilation with Visual C++.
* Fix blocks making sometimes only a half move (#33).
* Fix pixel-precise collisions not always correct (#53).
* Fix the end of target movement on slow machines (#34).
* Fix the hero being freezed when using the hookshot on bomb flowers (#119).
Changes in Solarus Quest Editor:
* First release of a working editor.
* Implement creating a new quest.
* Implement edition of project_db.dat through the quest tree view.
* Allow to show a grid on the map editor.
* Fix a lot of bugs.
solarus-0.9.3 (2013-05-08)
This should be the last release of the 0.9 branch.
Existing games must now upgrade to Solarus 1.0.
However, upgrading to Solarus 1.0 represents a lot of work and testing: in the
meantime, this release introduces important fixes that improve the situation
of existing games.
* The game screen size can now be set at compilation time.
* Change the savegames directory on Mac OS X.
* Improve the support of Mac OS X, Pandora, Caanoo and other platforms.
* Images other than 8-bit can now be used for pixel-precise collisions.
* Fix the compilation with Visual C++.
* Fix the compilation of SimpleIni with gcc 4.7.2.
* Fix blocks making sometimes only a half move (#33).
* Fix pixel-precise collisions not always correct (#53).
* Fix the end of target movement on slow machines (#34).
* Fix the hero being freezed when using the hookshot on bomb flowers (#119).
solarus-0.9.2 (2012-04-03)
* Fix a crash using a teletransporter to the same map while an enemy is dying
* Immobilized enemies restarted too early when using a teletransporter
solarus-0.9.1 (2012-02-12)
* The player can now run with the action key if he has the ability "run"
* Fix locked doors and blocks that could consume more than one small key
* Experimental: new syntax of dialog files in Lua that makes parsing, writing
and translating dialogs easier (a conversion script is available)
* Experimental: optimize displaying and collisions far from the visible area
* Experimental: sensors are not obstacles anymore when jumping or using the
hookshot, they are activated instead
* Include Mac OS X packaging changes to the git repository
* HUD: the 11th heart was not displayed correctly when incomplete
* Lua: improve the prototype of sol.map.destructible_item_create
* Lua: add a function sol.enemy.get_angle_to_hero()
* Lua: add a function sol.main.get_distance(x1, y1, x2, y2)
* Allow the ground sprite below the hero to be tileset dependent
* Show a different sprite animation when plunging into lava or water
* Don't stop the super spin attack on shallow water
* Add debug keys to change the hero's layer
solarus-0.9.0 (2011-12-23)
* Initial release of Solarus without quest data
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>