├── txt ├── LINGUAS ├── quot.sed ├── boldquot.sed ├── remove-potcdate.sin ├── build_mo_linux.sh ├── insert-header.sin ├── en@quot.header ├── POTFILES.in ├── en@boldquot.header ├── Rules-quot └── Makevars ├── src ├── engine │ ├── audio │ │ ├── audio_effects.h │ │ └── audio_effects.cpp │ └── video │ │ ├── shake.h │ │ └── context.h ├── luabind │ ├── luabind │ │ ├── version.hpp │ │ ├── get_main_thread.hpp │ │ ├── detail │ │ │ ├── property.hpp │ │ │ ├── conversion_storage.hpp │ │ │ ├── yes_no.hpp │ │ │ ├── pcall.hpp │ │ │ ├── pointee_typeid.hpp │ │ │ ├── most_derived.hpp │ │ │ ├── stack_utils.hpp │ │ │ ├── open.hpp │ │ │ ├── debug.hpp │ │ │ ├── garbage_collector.hpp │ │ │ ├── pointee_sizeof.hpp │ │ │ ├── object_call.hpp │ │ │ ├── link_compatibility.hpp │ │ │ ├── signature_match.hpp │ │ │ ├── call_operator_iterate.hpp │ │ │ ├── operator_id.hpp │ │ │ └── primitives.hpp │ │ ├── no_dependency.hpp │ │ ├── prefix.hpp │ │ ├── object.hpp │ │ ├── std_shared_ptr_converter.hpp │ │ ├── luabind.hpp │ │ ├── lua_include.hpp │ │ ├── lua_state_fwd.hpp │ │ ├── open.hpp │ │ ├── nil.hpp │ │ ├── get_pointer.hpp │ │ ├── copy_policy.hpp │ │ ├── typeid.hpp │ │ ├── back_reference_fwd.hpp │ │ ├── from_stack.hpp │ │ ├── function.hpp │ │ ├── class_info.hpp │ │ ├── error_callback_fun.hpp │ │ ├── yield_policy.hpp │ │ ├── weak_ref.hpp │ │ ├── set_package_preload.hpp │ │ ├── function_introspection.hpp │ │ ├── raw_policy.hpp │ │ ├── tag_function.hpp │ │ ├── shared_ptr_converter.hpp │ │ ├── discard_result_policy.hpp │ │ └── return_reference_to_policy.hpp │ ├── LICENSE │ └── src │ │ ├── operator.cpp │ │ ├── link_compatibility.cpp │ │ ├── wrapper_base.cpp │ │ ├── error.cpp │ │ ├── pcall.cpp │ │ ├── set_package_preload.cpp │ │ ├── stack_content_by_name.cpp │ │ └── exception_handler.cpp ├── editor │ ├── editor_utils.cpp │ └── editor_main.cpp └── modes │ ├── shop │ ├── shop_trade.h │ └── shop_trade.cpp │ ├── scene.cpp │ ├── menu │ ├── menu_character.h │ └── menu_formation.h │ └── custom.cpp ├── .gitignore ├── lua ├── data │ ├── config │ │ ├── restore_settings.lua │ │ ├── languages.lua │ │ ├── gui_themes.lua │ │ ├── boot.lua │ │ ├── fonts.lua │ │ └── settings.lua │ ├── tilesets │ │ ├── graveyard.lua │ │ ├── graphics_test.lua │ │ ├── sprites_example.lua │ │ ├── desert_cave_walls2.lua │ │ ├── ship_dock.lua │ │ ├── outdoor_market.lua │ │ ├── desert_house_interior.lua │ │ ├── mountain_house_exterior2.lua │ │ ├── castle_greystone_interior_01.lua │ │ ├── desert_cave.lua │ │ ├── desert_house_exterior.lua │ │ ├── desert_cave_water.lua │ │ ├── castle_exterior_01.lua │ │ ├── desert_town_exterior.lua │ │ ├── mountain_house_interior.lua │ │ ├── stone_house_interior.lua │ │ ├── mountain_house_exterior.lua │ │ ├── castle_greystone_exterior_02.lua │ │ ├── desert_house_exterior_01.lua │ │ ├── castle_greystone_exterior_01.lua │ │ ├── building_interior_objects_01.lua │ │ ├── building_interior_objects_02.lua │ │ ├── mountain_landscape.lua │ │ ├── harrvah_destruction.lua │ │ └── desert_cave_ground.lua │ ├── inventory │ │ ├── key_items.lua │ │ └── leg_armor.lua │ └── skills │ │ └── defense.lua ├── test │ ├── saves.lua │ ├── customs.lua │ ├── shops.lua │ └── menus.lua ├── scripts │ └── battles │ │ └── battle_events.lua └── graphics │ └── particles │ ├── blue_firework.lua │ ├── rain.lua │ ├── snow.lua │ └── fire_spell.lua └── modules ├── FindOgg.cmake ├── FindVorbis.cmake ├── FindLibIntl.cmake └── FindLibIconv.cmake /txt/LINGUAS: -------------------------------------------------------------------------------- 1 | # List of supported languages. 2 | en@quot 3 | fr 4 | pt_BR 5 | es 6 | de 7 | -------------------------------------------------------------------------------- /src/engine/audio/audio_effects.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootslinux/allacrost/HEAD/src/engine/audio/audio_effects.h -------------------------------------------------------------------------------- /src/engine/audio/audio_effects.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootslinux/allacrost/HEAD/src/engine/audio/audio_effects.cpp -------------------------------------------------------------------------------- /txt/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /txt/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /lua/data/config/restore_settings.lua: -------------------------------------------------------------------------------- 1 | require "settings" 2 | 3 | -- Sets all the settings back to their default values 4 | function settings.SetDefaults () 5 | settings.video_settings = settings.video_defaults; 6 | settings.audio_settings = settings.audio_defaults; 7 | settings.language_settings = settings.language_defaults; 8 | settings.key_settings = settings.key_defaults; 9 | settings.joystick_settings = settings.joystick_defaults; 10 | end 11 | -------------------------------------------------------------------------------- /txt/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /lua/data/config/languages.lua: -------------------------------------------------------------------------------- 1 | -- Add a new language by creating a new entry in the languages table. 2 | -- The first entry after the open-parenthesis is the name of the language 3 | -- as it will appear in the Language Selection menu in the game. 4 | -- The second entry corresponds to the name of the gettext PO file for that 5 | -- language. 6 | languages = {} 7 | languages[1] = { "English", "en@quot" } 8 | languages[2] = { "Français", "fr" } 9 | languages[3] = { "Português do Brasil", "pt_BR" } 10 | languages[4] = { "Español", "es" } 11 | languages[5] = { "Deutsch", "de" } 12 | -------------------------------------------------------------------------------- /src/luabind/luabind/version.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2009. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_VERSION_090216_HPP 6 | # define LUABIND_VERSION_090216_HPP 7 | 8 | # define LUABIND_VERSION 900 9 | 10 | // Each component uses two digits, so: 11 | // 12 | // major = LUABIND_VERSION / 10000 13 | // minor = LUABIND_VERSION / 100 % 100 14 | // patch = LUABIND_VERSION % 100 15 | 16 | #endif // LUABIND_VERSION_090216_HPP 17 | -------------------------------------------------------------------------------- /src/luabind/luabind/get_main_thread.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2009. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_GET_MAIN_THREAD_090321_HPP 6 | # define LUABIND_GET_MAIN_THREAD_090321_HPP 7 | 8 | # include 9 | # include 10 | 11 | namespace luabind { 12 | 13 | LUABIND_API lua_State* get_main_thread(lua_State* L); 14 | 15 | } // namespace luabind 16 | 17 | #endif // LUABIND_GET_MAIN_THREAD_090321_HPP 18 | -------------------------------------------------------------------------------- /txt/build_mo_linux.sh: -------------------------------------------------------------------------------- 1 | rm en@quot -rf 2 | make en@quot.mo 3 | mkdir en@quot 4 | mkdir en@quot/LC_MESSAGES 5 | mv en@quot.mo en@quot/LC_MESSAGES/allacrost.mo 6 | 7 | rm fr -rf 8 | make fr.mo 9 | mkdir fr 10 | mkdir fr/LC_MESSAGES 11 | mv fr.mo fr/LC_MESSAGES/allacrost.mo 12 | 13 | rm es -rf 14 | make es.mo 15 | mkdir es 16 | mkdir es/LC_MESSAGES 17 | mv es.mo es/LC_MESSAGES/allacrost.mo 18 | 19 | rm pt_BR -rf 20 | make pt_BR.mo 21 | mkdir pt_BR 22 | mkdir pt_BR/LC_MESSAGES 23 | mv pt_BR.mo pt_BR/LC_MESSAGES/allacrost.mo 24 | 25 | rm de -rf 26 | make de.mo 27 | mkdir de 28 | mkdir de/LC_MESSAGES 29 | mv de.mo de/LC_MESSAGES/allacrost.mo 30 | -------------------------------------------------------------------------------- /lua/test/saves.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: saves.lua 3 | -- 4 | -- Description: This file contains all tests that create an instance of SaveMode 5 | -- with various configurations. A test may either save a game or load a game, but 6 | -- it is not recommended to do both in the same test. Saved game files must exist 7 | -- in order to run any of the loading tests successfully. 8 | ------------------------------------------------------------------------------]] 9 | 10 | local ns = {} 11 | setmetatable(ns, {__index = _G}) 12 | saves = ns; 13 | setfenv(1, ns); 14 | 15 | -- Test IDs 4,001 - 5,000 are reserved for saves 16 | tests = {} 17 | 18 | -------------------------------------------------------------------------------- /lua/data/config/gui_themes.lua: -------------------------------------------------------------------------------- 1 | -- Contains the definitions for all GUI themes that are available to use in the game 2 | 3 | -- The default theme used when the user settings (from settings.lua) are either invalid or unavailable. 4 | -- This is also the theme that the user will be first exposed to 5 | default_theme = "Black Sleet"; 6 | 7 | -- Each entry in this table defines the image files that make up the gui theme. 8 | -- All entries must contain the full set of files. It is perfectly fine to share 9 | -- the same image between multiple themes. 10 | themes = { 11 | ["Black Sleet"] = { 12 | background = "img/menus/black_sleet_texture.png", 13 | border = "img/menus/black_sleet_skin.png", 14 | cursor = "img/menus/cursor.png" 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /txt/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/property.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2008. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_PROPERTY_081020_HPP 6 | # define LUABIND_PROPERTY_081020_HPP 7 | 8 | namespace luabind { namespace detail { 9 | 10 | template 11 | struct access_member_ptr 12 | { 13 | access_member_ptr(T Class::* mem_ptr) 14 | : mem_ptr(mem_ptr) 15 | {} 16 | 17 | Result operator()(Class const& x) const 18 | { 19 | return const_cast(x).*mem_ptr; 20 | } 21 | 22 | void operator()(Class& x, T const& value) const 23 | { 24 | x.*mem_ptr = value; 25 | } 26 | 27 | T Class::* mem_ptr; 28 | }; 29 | 30 | }} // namespace luabind::detail 31 | 32 | #endif // LUABIND_PROPERTY_081020_HPP 33 | 34 | -------------------------------------------------------------------------------- /modules/FindOgg.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find ogg 2 | # Once done this will define 3 | # 4 | # OGG_FOUND - system has ogg 5 | # OGG_INCLUDE_DIR 6 | # OGG_LIBRARY 7 | # 8 | # $OGGDIR is an environment variable used 9 | # for finding ogg. 10 | # 11 | # Several changes and additions by Fabian 'x3n' Landau 12 | # Most of all rewritten by Adrian Friedli 13 | # Debug versions and simplifications by Reto Grieder 14 | # > www.orxonox.net < 15 | 16 | INCLUDE(FindPackageHandleStandardArgs) 17 | 18 | FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h 19 | PATHS $ENV{OGGDIR} 20 | PATH_SUFFIXES include 21 | ) 22 | IF (WIN32) 23 | FIND_LIBRARY(OGG_LIBRARY 24 | NAMES libogg libogg-static-mt 25 | PATHS $ENV{OGGDIR} 26 | PATH_SUFFIXES Release 27 | ) 28 | ELSE() 29 | FIND_LIBRARY(OGG_LIBRARY 30 | NAMES ogg 31 | PATH_SUFFIXES lib 32 | ) 33 | ENDIF(WIN32) 34 | 35 | 36 | # Handle the REQUIRED argument and set OGG_FOUND 37 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG 38 | OGG_LIBRARY 39 | OGG_INCLUDE_DIR 40 | ) 41 | 42 | MARK_AS_ADVANCED( 43 | OGG_INCLUDE_DIR 44 | OGG_LIBRARY 45 | ) 46 | -------------------------------------------------------------------------------- /src/editor/editor_utils.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file editor_utils.cpp 12 | *** \author Tyler Olsen (Roots) 13 | *** \brief Source file for map editor utility code 14 | *** *****************************************************************************/ 15 | 16 | #include "editor_utils.h" 17 | 18 | namespace hoa_editor { 19 | 20 | // TODO: If no utility functions can be realized for the editor, delete this file from the repository 21 | 22 | } // namespace hoa_editor 23 | 24 | -------------------------------------------------------------------------------- /src/luabind/luabind/no_dependency.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2010. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_NO_DEPENDENCY_100324_HPP 6 | # define LUABIND_NO_DEPENDENCY_100324_HPP 7 | 8 | # include 9 | 10 | namespace luabind { 11 | 12 | namespace detail 13 | { 14 | 15 | struct no_dependency_policy 16 | { 17 | static void precall(lua_State*, index_map const&) 18 | {} 19 | 20 | static void postcall(lua_State*, index_map const&) 21 | {} 22 | }; 23 | 24 | typedef policy_cons 25 | no_dependency_node; 26 | 27 | } // namespace detail 28 | 29 | detail::no_dependency_node const no_dependency = {}; 30 | 31 | namespace detail 32 | { 33 | 34 | inline void ignore_unused_no_dependency() 35 | { 36 | (void)no_dependency; 37 | } 38 | 39 | } // namespace detail 40 | 41 | } // namespace luabind 42 | 43 | #endif // LUABIND_NO_DEPENDENCY_100324_HPP 44 | -------------------------------------------------------------------------------- /lua/scripts/battles/battle_events.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: battle_events.lua 3 | -- 4 | -- Description: This file contains the definitions of all scripted events in 5 | -- Hero of Allacrost battles, generally to be used for boss battles. 6 | ------------------------------------------------------------------------------]] 7 | 8 | -- All item definitions are stored in this table 9 | if (battle_events == nil) then 10 | battle_events = {} 11 | end 12 | 13 | battle_events[1] = { 14 | name = "Duel with Kyle", 15 | --TODO: Add dialogue! 16 | 17 | Before = function(bat_mode) 18 | end, 19 | 20 | During = function(bat_mode) 21 | end, 22 | 23 | After = function(bat_mode) 24 | bat_mode:AddDialogue("Kyle", "Do you really think it's going to matter if I take a little treasure? I just want enough to start a new life, away from this servitude. Can't you understand that?"); 25 | bat_mode:AddDialogue("Claudius", "You’ve tarnished your honor and disgraced the Harrvahan knighthood!"); 26 | bat_mode:AddDialogue("Kyle", "To hell with the knighthood!"); 27 | bat_mode:ShowDialogue(); 28 | end 29 | } 30 | -------------------------------------------------------------------------------- /src/luabind/LICENSE: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /txt/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /modules/FindVorbis.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find ogg/vorbis 2 | # Once done this will define 3 | # 4 | # VORBIS_FOUND - system has vorbis 5 | # VORBIS_INCLUDE_DIR 6 | # VORBIS_LIBRARIES - vorbis and vorbisfile libraries 7 | # 8 | # $VORBISDIR is an environment variable used 9 | # for finding vorbis. 10 | # 11 | # Several changes and additions by Fabian 'x3n' Landau 12 | # Most of all rewritten by Adrian Friedli 13 | # Debug versions and simplifications by Reto Grieder 14 | # > www.orxonox.net < 15 | 16 | INCLUDE(FindPackageHandleStandardArgs) 17 | 18 | FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h 19 | PATHS $ENV{VORBISDIR} 20 | PATH_SUFFIXES include 21 | ) 22 | 23 | IF(WIN32) 24 | FIND_LIBRARY(VORBIS_LIBRARIES 25 | NAMES libvorbis libvorbis-static-mt 26 | PATHS $ENV{VORBISDIR} 27 | PATH_SUFFIXES Release 28 | ) 29 | ELSE() 30 | FIND_LIBRARY(VORBIS_LIBRARIES 31 | NAMES vorbis 32 | PATH_SUFFIXES lib 33 | ) 34 | ENDIF(WIN32) 35 | 36 | # Handle the REQUIRED argument and set VORBIS_FOUND 37 | IF(NOT WIN32) 38 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG 39 | VORBIS_LIBRARIES 40 | VORBIS_INCLUDE_DIR 41 | ) 42 | ELSE() 43 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG 44 | VORBIS_LIBRARIES 45 | VORBIS_INCLUDE_DIR 46 | ) 47 | ENDIF(NOT WIN32) 48 | 49 | MARK_AS_ADVANCED( 50 | VORBIS_INCLUDE_DIR 51 | VORBIS_LIBRARIES 52 | ) 53 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/conversion_storage.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2008. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_CONVERSION_STORAGE_080930_HPP 6 | # define LUABIND_CONVERSION_STORAGE_080930_HPP 7 | 8 | # include 9 | # include 10 | 11 | namespace luabind { namespace detail { 12 | 13 | typedef void(*destruction_function)(void*); 14 | 15 | // This is used by the converters in policy.hpp, and 16 | // class_rep::convert_to as temporary storage when constructing 17 | // holders. 18 | 19 | struct conversion_storage 20 | { 21 | conversion_storage() 22 | : destructor(0) 23 | {} 24 | 25 | ~conversion_storage() 26 | { 27 | if (destructor) 28 | destructor(&data); 29 | } 30 | 31 | // Unfortunately the converters currently doesn't have access to 32 | // the actual type being converted when this is instantiated, so 33 | // we have to guess a max size. 34 | boost::aligned_storage<128> data; 35 | destruction_function destructor; 36 | }; 37 | 38 | }} // namespace luabind::detail 39 | 40 | #endif // LUABIND_CONVERSION_STORAGE_080930_HPP 41 | 42 | -------------------------------------------------------------------------------- /modules/FindLibIntl.cmake: -------------------------------------------------------------------------------- 1 | # Try to find the libintl library. Explicit searching is currently 2 | # only required for Win32, though it might be useful for some UNIX 3 | # variants, too. Therefore code for searching common UNIX include 4 | # directories is included, too. 5 | # 6 | # Once done this will define 7 | # 8 | # LIBINTL_FOUND - system has libintl 9 | # LIBINTL_LIBRARIES - the library needed for linking 10 | 11 | IF (LibIntl_LIBRARY) 12 | SET(LibIntl_FIND_QUIETLY TRUE) 13 | ENDIF () 14 | 15 | # for Windows we rely on the environement variables 16 | # %INCLUDE% and %LIB%; FIND_LIBRARY checks %LIB% 17 | # automatically on Windows 18 | IF(WIN32) 19 | FIND_LIBRARY(LibIntl_LIBRARY 20 | NAMES intl 21 | ) 22 | ELSE() 23 | FIND_LIBRARY(LibIntl_LIBRARY 24 | NAMES intl 25 | PATHS /usr/lib /usr/local/lib 26 | ) 27 | ENDIF() 28 | 29 | IF (LibIntl_LIBRARY) 30 | SET(LIBINTL_FOUND TRUE) 31 | SET(LIBINTL_LIBRARIES ${LibIntl_LIBRARY}) 32 | ELSE () 33 | SET(LIBINTL_FOUND FALSE) 34 | ENDIF () 35 | 36 | IF (LIBINTL_FOUND) 37 | IF (NOT LibIntl_FIND_QUIETLY) 38 | MESSAGE(STATUS "Found libintl: ${LibIntl_LIBRARY}") 39 | ENDIF () 40 | ELSE () 41 | IF (LibIntl_FIND_REQUIRED) 42 | MESSAGE(FATAL_ERROR "Could NOT find libintl") 43 | ENDIF () 44 | ENDIF () 45 | 46 | MARK_AS_ADVANCED(LibIntl_LIBRARY) 47 | -------------------------------------------------------------------------------- /lua/data/tilesets/graveyard.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | graveyard = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Graveyard" 7 | image = "img/tilesets/graveyard.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/graphics_test.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | graphics_test = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "graphics_test" 7 | image = "img/tilesets/graphics_test.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/sprites_example.lua: -------------------------------------------------------------------------------- 1 | local ns = {} 2 | setmetatable(ns, {__index = _G}) 3 | sprites_example = ns 4 | setfenv(1, ns) 5 | 6 | tileset_name = "Sprites Example (Testing Only)" 7 | image = "img/tilesets/sprites_example.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/prefix.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef PREFIX_040218_HPP 24 | #define PREFIX_040218_HPP 25 | 26 | #ifdef LUABIND_PREFIX_INCLUDE 27 | # include LUABIND_PREFIX_INCLUDE 28 | #endif 29 | 30 | #endif // PREFIX_040218_HPP 31 | 32 | -------------------------------------------------------------------------------- /lua/test/customs.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: customs.lua 3 | -- 4 | -- Description: All tests in this file create an instance of CustomMode. The character 5 | -- party and their equipment, amount of drunes, and inventory is configured along 6 | -- with the shop properties such as buy/sell prices, available wares, and stocks. 7 | -- These tests are commonly used to test specific shop configurations that will be 8 | -- seen in the game. 9 | 10 | ------------------------------------------------------------------------------]] 11 | 12 | local ns = {} 13 | setmetatable(ns, {__index = _G}) 14 | customs = ns; 15 | setfenv(1, ns); 16 | 17 | -- Test IDs 5,001 - 6,000 are reserved for customs 18 | tests = {} 19 | 20 | tests[5001] = { 21 | name = "Screen Display - Single Line"; 22 | description = "Displays a background image and single line of text, then fades the screen out and starts a map"; 23 | ExecuteTest = function() 24 | local custom = hoa_custom.CustomMode("lua/scripts/custom/screen_display.lua"); 25 | custom:AddOption("image", "img/backdrops/boot_screen00.jpg"); 26 | custom:AddOption("text1", "Several days later..."); 27 | custom:AddOption("initial_time", "1000"); 28 | custom:AddOption("display_time", "2000"); 29 | custom:AddOption("map", "lua/scripts/maps/a01_opening_scene.lua"); 30 | ModeManager:Push(custom); 31 | end 32 | } 33 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_cave_walls2.lua: -------------------------------------------------------------------------------- 1 | local ns = {} 2 | setmetatable(ns, {__index = _G}) 3 | desert_cave_walls2 = ns 4 | setfenv(1, ns) 5 | 6 | tileset_name = "Desert Cave - Walls 2" 7 | image = "img/tilesets/desert_cave_walls2.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 15, 15 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 15, 15 } 12 | collisions[2] = { 0, 0, 0, 0, 10, 0, 0, 5, 15, 15, 15, 10, 5, 15, 15, 15 } 13 | collisions[3] = { 0, 0, 0, 0, 8, 0, 0, 4, 15, 0, 15, 0, 0, 15, 0, 15 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 15, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/object.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_OBJECT_HPP 24 | #define LUABIND_OBJECT_HPP 25 | 26 | #include 27 | #include 28 | 29 | #endif // LUABIND_OBJECT_HPP 30 | 31 | -------------------------------------------------------------------------------- /src/luabind/luabind/std_shared_ptr_converter.hpp: -------------------------------------------------------------------------------- 1 | #ifndef STD_SHAREDPTR_CONVERTER_HPP_INCLUDED 2 | #define STD_SHAREDPTR_CONVERTER_HPP_INCLUDED STD_SHAREDPTR_CONVERTER_HPP_INCLUDED 3 | 4 | #include 5 | 6 | #if BOOST_VERSION >= 105300 7 | #include 8 | 9 | 10 | namespace luabind { namespace detail { namespace has_get_pointer_ { 11 | template 12 | struct impl> { 13 | BOOST_STATIC_CONSTANT(bool, value = true); 14 | typedef boost::mpl::bool_ type; 15 | }; 16 | 17 | template 18 | struct impl>: impl> { }; 19 | 20 | template 21 | struct impl>: impl> { }; 22 | 23 | template 24 | struct impl>: impl> { }; 25 | }} 26 | using boost::get_pointer; 27 | } 28 | 29 | 30 | 31 | #else // if BOOST_VERSION < 105300 32 | 33 | // Not standard conforming: add function to ::std(::tr1) 34 | namespace std { 35 | 36 | #if defined(_MSC_VER) && _MSC_VER < 1700 37 | namespace tr1 { 38 | #endif 39 | 40 | template 41 | T * get_pointer(shared_ptr const& p) { return p.get(); } 42 | 43 | #if defined(_MSC_VER) && _MSC_VER < 1700 44 | } // namespace tr1 45 | #endif 46 | 47 | } // namespace std 48 | 49 | #endif // if BOOST_VERSION < 105300 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /txt/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files which contain translatable strings. 2 | # File globbing (*.cpp, *.lua) is not supported. 3 | lua/data/actors/map_sprites_stock.lua 4 | lua/data/actors/characters.lua 5 | lua/data/actors/enemies_set_01.lua 6 | lua/data/actors/enemies_set_02.lua 7 | lua/data/effects/status.lua 8 | lua/data/inventory/arm_armor.lua 9 | lua/data/inventory/head_armor.lua 10 | lua/data/inventory/items.lua 11 | lua/data/inventory/leg_armor.lua 12 | lua/data/inventory/torso_armor.lua 13 | lua/data/inventory/weapons.lua 14 | lua/data/skills/attack.lua 15 | lua/data/skills/defense.lua 16 | lua/data/skills/support.lua 17 | lua/scripts/battles/first_battle.lua 18 | lua/scripts/maps/a01_opening_scene.lua 19 | lua/scripts/maps/a01_unblock_underground_river.lua 20 | lua/scripts/maps/a01_return_scene.lua 21 | lua/scripts/maps/a01_harrvah_capital_attack.lua 22 | src/modes/pause.cpp 23 | src/modes/battle/battle_actors.cpp 24 | src/modes/battle/battle_command.cpp 25 | src/modes/battle/battle_finish.cpp 26 | src/modes/boot/boot.cpp 27 | src/modes/boot/boot_welcome.cpp 28 | src/modes/map/map_treasure.cpp 29 | src/modes/menu/menu.cpp 30 | src/modes/menu/menu_views.cpp 31 | src/modes/save/save_mode.cpp 32 | src/modes/shop/shop.cpp 33 | src/modes/shop/shop_buy.cpp 34 | src/modes/shop/shop_confirm.cpp 35 | src/modes/shop/shop_leave.cpp 36 | src/modes/shop/shop_root.cpp 37 | src/modes/shop/shop_sell.cpp 38 | src/modes/shop/shop_trade.cpp 39 | -------------------------------------------------------------------------------- /src/luabind/src/operator.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define LUABIND_BUILDING 24 | 25 | #include 26 | 27 | namespace luabind 28 | { 29 | LUABIND_API self_type self; 30 | LUABIND_API const_self_type const_self; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /lua/data/tilesets/ship_dock.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | ship_dock = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Ship Dock" 7 | image = "img/tilesets/ship_dock.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 1, 3, 3, 3, 2, 10, 15, 5, 14, 15, 13, 10, 15, 15, 13, 5 } 11 | collisions[1] = { 5, 0, 0, 0, 10, 2, 3, 1, 10, 3, 5, 2, 3, 3, 1, 5 } 12 | collisions[2] = { 5, 0, 0, 0, 10, 8, 12, 4, 12, 12, 12, 12, 12, 12, 12, 4 } 13 | collisions[3] = { 5, 0, 0, 0, 10, 10, 15, 5, 5, 10, 12, 12, 12, 12, 0, 10 } 14 | collisions[4] = { 4, 12, 12, 12, 8, 8, 12, 4, 5, 10, 12, 12, 2, 1, 0, 10 } 15 | collisions[5] = { 5, 14, 15, 13, 15, 15, 13, 11, 7, 0, 0, 0, 12, 12, 0, 8 } 16 | collisions[6] = { 0, 10, 5, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 10, 15, 15, 5, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 15, 5, 10, 15, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 5, 10, 5, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 10, 5, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 15, 0, 3, 7, 15, 15, 3, 7, 10, 15, 3, 3, 0, 0, 0, 0 } 22 | collisions[12] = { 5, 10, 12, 13, 15, 12, 15, 15, 10, 15, 12, 12, 15, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /txt/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /lua/data/tilesets/outdoor_market.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | outdoor_market = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Outdoor Market" 7 | image = "img/tilesets/outdoor_market.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 3, 15, 15, 15, 0, 3, 10, 5 } 11 | collisions[1] = { 15, 15, 15, 15, 15, 15, 15, 15, 12, 15, 15, 15, 0, 15, 10, 5 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 10, 5 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 15, 10, 5 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 10, 0, 5 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 10, 0, 5 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 10, 0, 5 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 11 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 15, 0, 3, 7, 11, 3, 5, 10, 3, 7, 11 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 5, 10, 12, 13, 15, 12, 15, 15, 12, 15, 15 } 23 | collisions[13] = { 15, 0, 0, 0, 0, 15, 0, 3, 7, 10, 15, 5, 3, 3, 3, 2 } 24 | collisions[14] = { 15, 0, 0, 0, 1, 5, 10, 12, 12, 15, 5, 10, 12, 15, 13, 10 } 25 | collisions[15] = { 15, 10, 15, 10, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_house_interior.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | desert_house_interior = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Desert House Interior" 7 | image = "img/tilesets/desert_house_interior.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 10, 5, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0 } 12 | collisions[2] = { 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 10, 5, 0, 10, 15, 15, 15, 15, 15, 15, 15, 14, 12, 15, 15, 15 } 14 | collisions[4] = { 10, 5, 0, 10, 15, 15, 15, 15, 15, 15, 14, 0, 0, 4, 15, 15 } 15 | collisions[5] = { 10, 5, 0, 10, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 } 16 | collisions[6] = { 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 } 17 | collisions[7] = { 5, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 } 18 | collisions[8] = { 5, 0, 0, 0, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15 } 19 | collisions[9] = { 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/mountain_house_exterior2.lua: -------------------------------------------------------------------------------- 1 | local ns = {} 2 | setmetatable(ns, {__index = _G}) 3 | mountain_house_exterior2 = ns 4 | setfenv(1, ns) 5 | 6 | tileset_name = "Mountain - House Exterior 2" 7 | image = "img/tilesets/mountain_house_exterior2.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/yes_no.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef YES_NO_040211_HPP 24 | #define YES_NO_040211_HPP 25 | 26 | namespace luabind { namespace detail { 27 | 28 | typedef char(&yes_t)[1]; 29 | typedef char(&no_t)[2]; 30 | 31 | }} // namespace luabind::detail 32 | 33 | #endif // YES_NO_040211_HPP 34 | 35 | -------------------------------------------------------------------------------- /lua/data/tilesets/castle_greystone_interior_01.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | castle_greystone_interior_01 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Castle Greystone Interior 01" 7 | image = "img/tilesets/castle_greystone_interior_01.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 14, 12, 13, 4, 12, 8, 5, 10, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 15, 15, 15, 5, 15, 10, 5, 10, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 15, 15, 15, 15, 15, 15, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 15, 15, 15, 15, 15, 15, 0, 0, 0, 5, 0, 0, 10, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 3, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0 } 17 | collisions[7] = { 3, 3, 3, 15, 15, 15, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 15, 15, 15, 15, 15, 15, 15, 0, 12, 12, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 12, 12, 12, 0, 0, 15, 0, 0, 15, 15, 0, 0, 15, 15, 15, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 1, 15, 1, 15, 15, 2, 15, 2, 1, 15, 1, 15, 15, 2, 15, 2 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/config/boot.lua: -------------------------------------------------------------------------------- 1 | -- Boot mode configuration parameters and data files to load 2 | 3 | -- -------------------------------------------------- -- 4 | -- ----------------- VIDEO STUFF -------------------- -- 5 | -- -------------------------------------------------- -- 6 | background_image = "img/backdrops/boot_screen00.jpg"; 7 | background_image_width = 1024; 8 | background_image_height = 768; 9 | 10 | logo_background = "img/logos/main_logo_background.png"; 11 | logo_background_width = 666; 12 | logo_background_height = 239; 13 | 14 | logo_sword = "img/logos/main_logo_sword.png"; 15 | logo_sword_width = 130; 16 | logo_sword_height = 282; 17 | 18 | logo_text = "img/logos/main_logo_text.png"; 19 | logo_text_width = 666; 20 | logo_text_height = 239; 21 | 22 | coord_sys_x_left = 0; 23 | coord_sys_x_right = 1024; 24 | coord_sys_y_bottom = 0; 25 | coord_sys_y_top = 768; 26 | coord_sys_nl = 1; 27 | -- -------------------------------------------------- -- 28 | 29 | 30 | 31 | -- -------------------------------------------------- -- 32 | -- ----------------- AUDIO STUFF -------------------- -- 33 | -- -------------------------------------------------- -- 34 | music_files = { 35 | "mus/Allacrost_Opening_Theme.ogg", 36 | "mus/Opening_Effect.ogg" 37 | }; 38 | 39 | sound_files = { 40 | "snd/confirm.wav", 41 | "snd/cancel.wav", 42 | "snd/obtain.wav", 43 | "snd/bump.wav", 44 | "snd/volume_test.wav" 45 | }; 46 | 47 | -- -------------------------------------------------- -- 48 | 49 | -------------------------------------------------------------------------------- /src/luabind/luabind/luabind.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_BIND_HPP_INCLUDED 25 | #define LUABIND_BIND_HPP_INCLUDED 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #endif // LUABIND_BIND_HPP_INCLUDED 33 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_cave.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | desert_cave = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Desert Cave" 7 | image = "img/tilesets/desert_cave.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 23 | collisions[13] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 24 | collisions[14] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0 } 26 | 27 | animations = {} 28 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_house_exterior.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | desert_house_exterior = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Desert House Exterior" 7 | image = "img/tilesets/desert_house_exterior.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15 } 11 | collisions[1] = { 0, 7, 15, 15, 15, 15, 15, 15, 15, 15, 11, 0, 15, 15, 15, 15 } 12 | collisions[2] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 3 } 13 | collisions[3] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 12, 12, 12 } 14 | collisions[4] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 5, 10, 15 } 15 | collisions[5] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 3, 1, 2 } 16 | collisions[6] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 12, 4, 8 } 17 | collisions[7] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 0 } 18 | collisions[8] = { 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 15, 0, 0, 0, 0, 15, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_cave_water.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | desert_cave_water = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Desert Cave - Water" 7 | image = "img/tilesets/desert_cave_water.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 11 | collisions[1] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 12 | collisions[2] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 14 | collisions[4] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0 } 16 | collisions[6] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | animations = {} 28 | -------------------------------------------------------------------------------- /src/luabind/luabind/lua_include.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUA_INCLUDE_HPP_INCLUDED 24 | #define LUA_INCLUDE_HPP_INCLUDED 25 | 26 | #ifndef LUABIND_CPLUSPLUS_LUA 27 | extern "C" 28 | { 29 | #endif 30 | 31 | #include "lua.h" 32 | #include "lauxlib.h" 33 | 34 | #ifndef LUABIND_CPLUSPLUS_LUA 35 | } 36 | #endif 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /lua/data/tilesets/castle_exterior_01.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | castle_exterior_01 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Castle Exterior - 01" 7 | image = "img/tilesets/castle_exterior_01.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 15, 12, 14, 13, 15, 15, 15, 15 } 11 | collisions[1] = { 15, 15, 15, 0, 0, 15, 15, 15, 15, 0, 10, 5, 15, 0, 0, 15 } 12 | collisions[2] = { 3, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 13, 15, 15, 14 } 14 | collisions[4] = { 15, 0, 0, 0, 0, 0, 15, 15, 0, 14, 12, 13, 15, 15, 15, 15 } 15 | collisions[5] = { 15, 0, 0, 0, 0, 0, 12, 12, 0, 10, 0, 5, 15, 15, 15, 15 } 16 | collisions[6] = { 15, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15 } 19 | collisions[9] = { 15, 15, 15, 0, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0, 15 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 0, 15, 15, 15 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 5, 0, 0, 0, 15 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0, 15 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0, 15 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0, 15 } 25 | collisions[15] = { 15, 15, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_town_exterior.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | desert_town_exterior = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Desert Town Exterior" 7 | image = "img/tilesets/desert_town_exterior.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15 } 16 | collisions[6] = { 15, 15, 15, 15, 15, 15, 15, 15, 0, 7, 15, 11, 7, 15, 11, 15 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 18 | collisions[8] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 19 | collisions[9] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 11, 7, 10, 15 } 20 | collisions[10] = { 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 10, 15 } 21 | collisions[11] = { 3, 15, 11, 15, 0, 15, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15 } 22 | collisions[12] = { 0, 13, 15, 3, 15, 15, 0, 0, 0, 0, 15, 5, 10, 15, 15, 15 } 23 | collisions[13] = { 12, 13, 14, 0, 15, 15, 3, 0, 0, 0, 0, 15, 15, 15, 15, 15 } 24 | collisions[14] = { 15, 7, 11, 0, 7, 11, 15, 5, 10, 15, 3, 0, 0, 3, 3, 15 } 25 | collisions[15] = { 15, 15, 15, 15, 15, 15, 15, 5, 10, 15, 12, 15, 15, 15, 15, 15 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/mountain_house_interior.lua: -------------------------------------------------------------------------------- 1 | local ns = {} 2 | setmetatable(ns, {__index = _G}) 3 | mountain_house_interior = ns 4 | setfenv(1, ns) 5 | 6 | tileset_name = "Mountain - House Interior" 7 | image = "img/tilesets/mountain_house_interior.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15 } 11 | collisions[1] = { 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15, 15 } 12 | collisions[2] = { 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 15, 0, 0, 0, 0, 15, 0, 15, 15, 0, 15, 15, 15, 15, 0, 0 } 14 | collisions[4] = { 15, 0, 0, 0, 0, 15, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15 } 16 | collisions[6] = { 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 0, 0, 15, 15, 0 } 18 | collisions[8] = { 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 0, 0, 15, 15, 15 } 19 | collisions[9] = { 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 0, 0, 15, 15, 15 } 20 | collisions[10] = { 15, 0, 0, 0, 0, 15, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 15, 0, 0, 0, 0, 15, 0, 15, 15, 0, 3, 3, 3, 0, 0, 0 } 22 | collisions[12] = { 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0 } 23 | collisions[13] = { 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/stone_house_interior.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | stone_house_interior = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Stone House Interior" 7 | image = "img/tilesets/stone_house_interior.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15 } 13 | collisions[3] = { 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 7, 11, 15, 15, 15 } 14 | collisions[4] = { 15, 15, 15, 0, 15, 15, 4, 12, 12, 8, 15, 14, 13, 15, 15, 15 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 3, 3 } 16 | collisions[6] = { 15, 15, 15, 15, 13, 14, 15, 15, 13, 14, 15, 15, 15, 15, 15, 15 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 10, 5, 15, 15, 15, 15, 15, 15 } 18 | collisions[8] = { 15, 0, 7, 11, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 19 | collisions[9] = { 15, 15, 15, 15, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 20 | collisions[10] = { 0, 0, 0, 11, 3, 7, 10, 5, 5, 10, 0, 0, 0, 0, 12, 12 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 10, 5, 5, 10, 0, 0, 0, 0, 15, 15 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 10, 5, 5, 10, 0, 3, 3, 0, 12, 12 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 10, 5, 5, 10, 0, 14, 13, 3, 3, 3 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 10, 5, 5, 10, 0, 10, 5, 12, 12, 12 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 7, 3, 3, 3 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/lua_state_fwd.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_LUA_STATE_FWD_HPP 24 | #define LUABIND_LUA_STATE_FWD_HPP 25 | 26 | #ifndef LUABIND_CPLUSPLUS_LUA 27 | extern "C" 28 | { 29 | #endif 30 | 31 | struct lua_State; 32 | 33 | #ifndef LUABIND_CPLUSPLUS_LUA 34 | } 35 | #endif 36 | 37 | #endif // LUABIND_BACK_REFERENCE_FWD_040510_HPP 38 | 39 | -------------------------------------------------------------------------------- /src/luabind/luabind/open.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_OPEN_HPP_INCLUDED 25 | #define LUABIND_OPEN_HPP_INCLUDED 26 | 27 | #include 28 | 29 | #include 30 | 31 | namespace luabind { 32 | 33 | LUABIND_API void open(lua_State* L); 34 | 35 | } 36 | 37 | #endif // LUABIND_OPEN_HPP_INCLUDED 38 | 39 | -------------------------------------------------------------------------------- /lua/data/tilesets/mountain_house_exterior.lua: -------------------------------------------------------------------------------- 1 | local ns = {} 2 | setmetatable(ns, {__index = _G}) 3 | mountain_house_exterior = ns 4 | setfenv(1, ns) 5 | 6 | tileset_name = "Mountain - House Exterior" 7 | image = "img/tilesets/mountain_house_exterior.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15 } 12 | collisions[2] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 0, 0 } 14 | collisions[4] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 0, 0 } 15 | collisions[5] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 15, 15, 0, 0 } 16 | collisions[6] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 0, 15, 15 } 17 | collisions[7] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 0, 15, 15 } 18 | collisions[8] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/nil.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_NIL_HPP 24 | #define LUABIND_NIL_HPP 25 | 26 | #include 27 | 28 | namespace luabind 29 | { 30 | namespace detail 31 | { 32 | struct nil_type {}; 33 | } 34 | 35 | // defined in class.cpp 36 | extern LUABIND_API detail::nil_type nil; 37 | } 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /lua/data/tilesets/castle_greystone_exterior_02.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | castle_greystone_exterior_02 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Castle Greystone Exterior - 02" 7 | image = "img/tilesets/castle_greystone_exterior_02.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 5, 7, 15, 15, 15, 11 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 5, 15, 15, 15, 15, 15 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 5, 15, 8, 0, 0, 15 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 15, 15, 11 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 12, 12, 15 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15 } 17 | collisions[7] = { 0, 0, 15, 15, 15, 15, 0, 0, 0, 0, 0, 12, 12, 15, 0, 15 } 18 | collisions[8] = { 14, 13, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 13, 15, 15, 14 } 19 | collisions[9] = { 10, 5, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 15, 0 } 20 | collisions[10] = { 10, 5, 15, 0, 0, 0, 15, 15, 15, 15, 15, 15, 1, 2, 15, 0 } 21 | collisions[11] = { 10, 5, 15, 0, 0, 0, 12, 15, 15, 10, 5, 15, 5, 10, 15, 0 } 22 | collisions[12] = { 15, 14, 12, 13, 15, 15, 15, 15, 15, 15, 15, 15, 4, 8, 15, 15 } 23 | collisions[13] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 11, 3, 7, 0 } 24 | collisions[14] = { 15, 15, 3, 15, 15, 15, 15, 15, 15, 15, 0, 15, 11, 3, 7, 0 } 25 | collisions[15] = { 15, 3, 15, 15, 15, 15, 15, 15, 15, 11, 3, 7, 11, 3, 7, 0 } 26 | 27 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_house_exterior_01.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | desert_house_exterior_01 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Desert House Exterior 01" 7 | image = "img/tilesets/desert_house_exterior_01.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 15, 15, 15, 15, 12 } 11 | collisions[1] = { 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 1, 14, 13, 2 } 12 | collisions[2] = { 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 12, 0, 0, 12 } 13 | collisions[3] = { 0, 15, 3, 3, 3, 3, 3, 3, 3, 3, 15, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 15, 15, 15, 15 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 18 | collisions[8] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 19 | collisions[9] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 20 | collisions[10] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 } 21 | collisions[11] = { 15, 15, 15, 15, 0, 0, 0, 15, 15, 15, 15, 15, 15, 10, 5, 12 } 22 | collisions[12] = { 15, 15, 15, 15, 0, 0, 0, 12, 12, 12, 12, 15, 3, 10, 5, 12 } 23 | collisions[13] = { 15, 15, 15, 15, 1, 15, 15, 2, 3, 3, 3, 5, 15, 15, 12, 12 } 24 | collisions[14] = { 15, 15, 15, 15, 5, 15, 15, 10, 15, 15, 15, 1, 2, 1, 2, 12 } 25 | collisions[15] = { 15, 12, 12, 15, 5, 12, 12, 10, 15, 15, 15, 4, 8, 4, 8, 12 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/get_pointer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005 Daniel Wallin 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_GET_POINTER_051023_HPP 24 | # define LUABIND_GET_POINTER_051023_HPP 25 | 26 | // 27 | // We need these overloads in the luabind namespace. 28 | // 29 | 30 | # include 31 | 32 | namespace luabind { 33 | 34 | using boost::get_pointer; 35 | 36 | } // namespace luabind 37 | 38 | #endif // LUABIND_GET_POINTER_051023_HPP 39 | 40 | -------------------------------------------------------------------------------- /lua/data/config/fonts.lua: -------------------------------------------------------------------------------- 1 | -- The fonts table is used to load the available fonts in game. 2 | 3 | -- One and one only font should be set as default. 4 | 5 | -- If no valid font is defined or if the default one is invalid, the game won't start 6 | -- and log why. 7 | 8 | fonts = { 9 | -- Text style internal name = { "font file path", font size } 10 | -- TODO: Rename the text style to some non size dependant name. 11 | ["title20"] = {font = "img/fonts/LinLibertine_aBS.ttf", size = 18}, 12 | ["title22"] = {font = "img/fonts/LinLibertine_aBS.ttf", size = 20}, 13 | ["title24"] = {font = "img/fonts/LinLibertine_aBS.ttf", size = 22}, 14 | ["title28"] = {font = "img/fonts/LinLibertine_aBS.ttf", size = 24}, 15 | 16 | ["text18"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 16}, 17 | ["text20"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 18}, 18 | ["text22"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 20}, 19 | ["text24"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 22}, 20 | ["text24.2"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 24}, 21 | ["text26"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 26}, 22 | ["text28"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 28}, 23 | ["text36"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 36}, 24 | ["text48"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 48}, 25 | 26 | -- Map title font 27 | ["map_title"] = {font = "img/fonts/Berenika-Oblique.ttf", size = 30} 28 | } 29 | 30 | -- The font is white with a black shadow anyway. 31 | font_default = "text22"; 32 | -------------------------------------------------------------------------------- /src/luabind/luabind/copy_policy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2008. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_COPY_POLICY_081021_HPP 6 | # define LUABIND_COPY_POLICY_081021_HPP 7 | 8 | # include 9 | 10 | namespace luabind { 11 | 12 | namespace detail 13 | { 14 | 15 | struct copy_converter 16 | { 17 | template 18 | void apply(lua_State* L, T const& x) 19 | { 20 | value_converter().apply(L, x); 21 | } 22 | 23 | template 24 | void apply(lua_State* L, T* x) 25 | { 26 | if (!x) 27 | lua_pushnil(L); 28 | else 29 | apply(L, *x); 30 | } 31 | }; 32 | 33 | template 34 | struct copy_policy : conversion_policy 35 | { 36 | static void precall(lua_State*, index_map const&) 37 | {} 38 | 39 | static void postcall(lua_State*, index_map const&) 40 | {} 41 | 42 | template 43 | struct apply 44 | { 45 | typedef copy_converter type; 46 | }; 47 | }; 48 | 49 | } // namespace detail 50 | 51 | template 52 | detail::policy_cons, detail::null_type> 53 | copy(LUABIND_PLACEHOLDER_ARG(N)) 54 | { 55 | return detail::policy_cons, detail::null_type>(); 56 | } 57 | 58 | } // namespace luabind 59 | 60 | #endif // LUABIND_COPY_POLICY_081021_HPP 61 | 62 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/pcall.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_PCALL_HPP_INCLUDED 24 | #define LUABIND_PCALL_HPP_INCLUDED 25 | 26 | #include 27 | 28 | #include 29 | 30 | namespace luabind { namespace detail 31 | { 32 | LUABIND_API int pcall(lua_State *L, int nargs, int nresults); 33 | LUABIND_API int resume_impl(lua_State *L, int nargs, int nresults); 34 | }} 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/luabind/luabind/typeid.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2008. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_TYPEID_081227_HPP 6 | # define LUABIND_TYPEID_081227_HPP 7 | 8 | # include 9 | # include 10 | # include 11 | 12 | namespace luabind { 13 | 14 | # ifdef BOOST_MSVC 15 | # pragma warning(push) 16 | // std::type_info::before() returns int, rather than bool. 17 | // At least on MSVC7.1, this is true for the comparison 18 | // operators as well. 19 | # pragma warning(disable:4800) 20 | # endif 21 | 22 | class type_id 23 | : public boost::less_than_comparable 24 | { 25 | public: 26 | type_id() 27 | : id(&typeid(detail::null_type)) 28 | {} 29 | 30 | type_id(std::type_info const& id) 31 | : id(&id) 32 | {} 33 | 34 | bool operator!=(type_id const& other) const 35 | { 36 | return *id != *other.id; 37 | } 38 | 39 | bool operator==(type_id const& other) const 40 | { 41 | return *id == *other.id; 42 | } 43 | 44 | bool operator<(type_id const& other) const 45 | { 46 | return id->before(*other.id); 47 | } 48 | 49 | char const* name() const 50 | { 51 | return id->name(); 52 | } 53 | 54 | private: 55 | std::type_info const* id; 56 | }; 57 | 58 | # ifdef BOOST_MSVC 59 | # pragma warning(pop) 60 | # endif 61 | 62 | } // namespace luabind 63 | 64 | #endif // LUABIND_TYPEID_081227_HPP 65 | 66 | -------------------------------------------------------------------------------- /lua/data/tilesets/castle_greystone_exterior_01.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | castle_greystone_exterior_01 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Castle Greystone Exterior - 01" 7 | image = "img/tilesets/castle_greystone_exterior_01.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 15, 15, 11 } 11 | collisions[1] = { 15, 15, 15, 15, 15, 15, 10, 5, 15, 15, 15, 15, 15, 0, 0, 15 } 12 | collisions[2] = { 15, 15, 15, 15, 15, 15, 10, 5, 15, 0, 0, 15, 15, 15, 15, 15 } 13 | collisions[3] = { 15, 15, 15, 15, 15, 15, 10, 5, 15, 15, 15, 15, 15, 15, 15, 15 } 14 | collisions[4] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15 } 16 | collisions[6] = { 15, 15, 15, 15, 15, 15, 10, 0, 0, 5, 15, 15, 15, 15, 15, 15 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 10, 0, 0, 5, 15, 15, 15, 0, 0, 15 } 18 | collisions[8] = { 15, 15, 0, 15, 15, 15, 10, 0, 0, 5, 15, 15, 15, 15, 15, 15 } 19 | collisions[9] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 13, 15, 15, 14 } 20 | collisions[10] = { 15, 15, 7, 15, 11, 15, 15, 15, 15, 15, 15, 0, 7, 11, 0, 0 } 21 | collisions[11] = { 15, 15, 15, 0, 15, 7, 11, 15, 15, 15, 0, 7, 15, 15, 11, 0 } 22 | collisions[12] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 5, 15, 15, 15, 15, 10 } 23 | collisions[13] = { 15, 15, 5, 15, 15, 15, 10, 15, 15, 15, 0, 13, 15, 15, 14, 0 } 24 | collisions[14] = { 15, 15, 15, 0, 0, 0, 15, 7, 15, 15, 11, 15, 0, 0, 15, 0 } 25 | collisions[15] = { 15, 15, 15, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0 } 26 | 27 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/pointee_typeid.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef POINTEE_TYPEID_040211_HPP 24 | #define POINTEE_TYPEID_040211_HPP 25 | 26 | #include 27 | #include 28 | 29 | namespace luabind { namespace detail { 30 | 31 | template 32 | type_id pointee_typeid(T*) 33 | { 34 | return typeid(T); 35 | } 36 | 37 | }} // namespace luabind::detail 38 | 39 | #endif // POINTEE_TYPEID_040211_HPP 40 | 41 | -------------------------------------------------------------------------------- /src/luabind/luabind/back_reference_fwd.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_BACK_REFERENCE_FWD_040510_HPP 24 | #define LUABIND_BACK_REFERENCE_FWD_040510_HPP 25 | 26 | #include 27 | 28 | namespace luabind { 29 | 30 | template 31 | bool get_back_reference(lua_State* L, T const& x); 32 | 33 | template 34 | bool move_back_reference(lua_State* L, T const& x); 35 | 36 | } // namespace luabind 37 | 38 | #endif // LUABIND_BACK_REFERENCE_FWD_040510_HPP 39 | 40 | -------------------------------------------------------------------------------- /src/luabind/luabind/from_stack.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_FROM_STACK_050715_HPP 24 | #define LUABIND_FROM_STACK_050715_HPP 25 | 26 | #include 27 | 28 | namespace luabind { 29 | 30 | struct from_stack 31 | { 32 | from_stack(lua_State* interpreter, int index) 33 | : interpreter(interpreter) 34 | , index(index) 35 | {} 36 | 37 | lua_State* interpreter; 38 | int index; 39 | }; 40 | 41 | } // namespace luabind 42 | 43 | #endif // LUABIND_FROM_STACK_050715_HPP 44 | 45 | -------------------------------------------------------------------------------- /src/luabind/src/link_compatibility.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define LUABIND_BUILDING 24 | 25 | #include 26 | 27 | namespace luabind { namespace detail 28 | { 29 | 30 | #ifdef LUABIND_NOT_THREADSAFE 31 | void not_threadsafe_defined_conflict() {} 32 | #else 33 | void not_threadsafe_not_defined_conflict() {} 34 | #endif 35 | 36 | #ifdef LUABIND_NO_ERROR_CHECKING 37 | void no_error_checking_defined_conflict() {} 38 | #else 39 | void no_error_checking_not_defined_conflict() {} 40 | #endif 41 | 42 | }} 43 | 44 | -------------------------------------------------------------------------------- /lua/data/tilesets/building_interior_objects_01.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | building_interior_objects_01 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Interior Objects - 01" 7 | image = "img/tilesets/building_interior_objects_01.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0 } 18 | collisions[8] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 0 } 19 | collisions[9] = { 3, 3, 3, 3, 3, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 15, 15, 3, 15, 15, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 3, 3, 3, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 15, 15, 15, 15, 3, 3, 3, 15, 15, 15, 0, 15, 15, 15, 15 } 24 | collisions[14] = { 3, 0, 0, 0, 15, 12, 12, 12, 3, 15, 0, 0, 0, 3, 3, 7 } 25 | collisions[15] = { 15, 15, 15, 15, 15, 15, 3, 12, 12, 15, 15, 15, 0, 3, 3, 3 } 26 | 27 | animations = {} 28 | animations[0] = { 239, 200, 240, 200, 241, 200, 242, 200, 243, 200, 244, 200, 245, 200, 246, 200 } 29 | animations[1] = { 247, 150, 248, 150, 249, 150, 250, 150, 252, 150 } 30 | 31 | -------------------------------------------------------------------------------- /lua/data/tilesets/building_interior_objects_02.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | building_interior_objects_02 = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Interior Objects - 02" 7 | image = "img/tilesets/building_interior_objects_02.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 15, 3, 3, 0 } 11 | collisions[1] = { 15, 15, 15, 3, 12, 12, 15, 12, 3, 15, 3, 3, 15, 3, 3, 0 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 15, 15, 15, 15, 15, 15, 15, 15, 3, 3, 3, 3, 3, 3, 3, 3 } 26 | 27 | animations = {} 28 | animations[0] = { 224, 150, 225, 150, 226, 150, 227, 150, 228, 150 } 29 | animations[1] = { 240, 150, 241, 150, 242, 150, 243, 150, 244, 150, 245, 150, 246, 150, 247, 150 } 30 | animations[2] = { 248, 150, 249, 150, 250, 150, 251, 150, 252, 150, 253, 150, 254, 150, 255, 150 } 31 | -------------------------------------------------------------------------------- /src/luabind/luabind/function.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2008. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_FUNCTION2_081014_HPP 6 | # define LUABIND_FUNCTION2_081014_HPP 7 | 8 | # include 9 | # include 10 | # include 11 | 12 | namespace luabind { 13 | 14 | namespace detail 15 | { 16 | 17 | template 18 | struct function_registration : registration 19 | { 20 | function_registration(char const* name, F f, Policies const& policies) 21 | : name(name) 22 | , f(f) 23 | , policies(policies) 24 | {} 25 | 26 | void register_(lua_State* L) const 27 | { 28 | object fn = make_function(L, f, deduce_signature(f), policies); 29 | 30 | add_overload( 31 | object(from_stack(L, -1)) 32 | , name 33 | , fn 34 | ); 35 | } 36 | 37 | char const* name; 38 | F f; 39 | Policies policies; 40 | }; 41 | 42 | LUABIND_API bool is_luabind_function(lua_State* L, int index); 43 | 44 | } // namespace detail 45 | 46 | template 47 | scope def(char const* name, F f, Policies const& policies) 48 | { 49 | return scope(std::auto_ptr( 50 | new detail::function_registration(name, f, policies))); 51 | } 52 | 53 | template 54 | scope def(char const* name, F f) 55 | { 56 | return def(name, f, detail::null_type()); 57 | } 58 | 59 | } // namespace luabind 60 | 61 | #endif // LUABIND_FUNCTION2_081014_HPP 62 | 63 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/most_derived.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef MOST_DERIVED_051018_HPP 24 | # define MOST_DERIVED_051018_HPP 25 | 26 | # include 27 | # include 28 | 29 | namespace luabind { namespace detail { 30 | 31 | template 32 | struct most_derived 33 | { 34 | typedef typename boost::mpl::if_< 35 | boost::is_base_and_derived 36 | , WrappedClass 37 | , Class 38 | >::type type; 39 | }; 40 | 41 | }} // namespace luabind::detail 42 | 43 | #endif // MOST_DERIVED_051018_HPP 44 | 45 | -------------------------------------------------------------------------------- /lua/data/tilesets/mountain_landscape.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | mountain_landscape = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Mountain - Landscape" 7 | image = "img/tilesets/mountain_landscape.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 1, 3, 3, 3, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 1, 14, 0, 0, 5, 2, 7, 12, 4, 15, 0, 0, 0, 0, 0, 0 } 12 | collisions[2] = { 5, 0, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 5, 0, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 5, 0, 0, 0, 5, 10, 11, 3, 3, 3, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 5, 15, 15, 15, 15, 8, 13, 15, 15, 15, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 4, 15, 15, 15, 15, 0, 4, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 14, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 11, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 15, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 11, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 15, 11, 7, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 5, 15, 15, 10, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 5, 15, 15, 0, 13, 15, 14, 15, 15, 15, 15, 15, 15, 15, 5, 10 } 26 | 27 | autotiling = {} 28 | autotiling[10] = "CrackedEarth" 29 | autotiling[14] = "Pavers" 30 | autotiling[15] = "Pavers" 31 | autotiling[26] = "CrackedEarth" 32 | autotiling[30] = "Pavers" 33 | autotiling[31] = "Pavers" 34 | autotiling[42] = "CrackedEarth" 35 | autotiling[76] = "Pavers" 36 | autotiling[78] = "Grass" 37 | autotiling[79] = "Grass" 38 | autotiling[94] = "Grass" 39 | autotiling[95] = "Grass" 40 | 41 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/stack_utils.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_STACK_UTILS_HPP_INCLUDED 24 | #define LUABIND_STACK_UTILS_HPP_INCLUDED 25 | 26 | #ifndef LUA_INCLUDE_HPP_INCLUDED 27 | #include 28 | #endif 29 | 30 | #include 31 | 32 | namespace luabind { namespace detail 33 | { 34 | 35 | struct stack_pop 36 | { 37 | stack_pop(lua_State* L, int n) 38 | : m_state(L) 39 | , m_n(n) 40 | { 41 | } 42 | 43 | ~stack_pop() 44 | { 45 | lua_pop(m_state, m_n); 46 | } 47 | 48 | private: 49 | 50 | lua_State* m_state; 51 | int m_n; 52 | }; 53 | }} 54 | 55 | #endif // LUABIND_STACK_UTILS_HPP_INCLUDED 56 | 57 | -------------------------------------------------------------------------------- /src/luabind/luabind/class_info.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_CLASS_INFO_HPP_INCLUDED 25 | #define LUABIND_CLASS_INFO_HPP_INCLUDED 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace luabind 33 | { 34 | struct LUABIND_API class_info 35 | { 36 | std::string name; 37 | object methods; 38 | object attributes; 39 | }; 40 | 41 | LUABIND_API class_info get_class_info(argument const&); 42 | 43 | // returns a table of bound class names 44 | LUABIND_API object get_class_names(lua_State* L); 45 | 46 | LUABIND_API void bind_class_info(lua_State*); 47 | } 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /lua/data/inventory/key_items.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: key_items.lua 3 | -- 4 | -- Description: This file contains the definitions of all key items that exist in 5 | -- Hero of Allacrost. Each key item has a unique integer identifier that is used 6 | -- as its key in the key_items table below. Key item IDs are unique not only among 7 | -- each other, but among other inventory game objects as well (items, weapons, armor, 8 | -- etc). 9 | -- 10 | -- Object IDs 70,001 through 80,000 are reserved for items. Do not break this 11 | -- limit, because other value ranges correspond to other types of inventory objects. 12 | -- 13 | -- Key item IDs do -not- need to be sequential. When you make a new key item, keep it 14 | -- grouped with items that are similar (used for the same map or quest, for example). 15 | -- 16 | -- All item entries needs the following data to be defined: 17 | -- {name}: Text that defines the name of the item. 18 | -- {description}: A brief description about the item. 19 | -- {icon}: The filepath to the image icon representing this icon. 20 | -- 21 | -- Key items do not do anything by themselves. Rather, their presence or absence 22 | -- in the player's inventory is checked throughout the game to determine if some 23 | -- event should happen or other change in the game state should take place. For 24 | -- example, a certain door key must be held by the player to access a dungeon. 25 | ------------------------------------------------------------------------------]] 26 | 27 | -- All item definitions are stored in this table 28 | if (key_items == nil) then 29 | key_items = {} 30 | end 31 | 32 | 33 | -------------------------------------------------------------------------------- 34 | -- IDs 70,001 - 80,000 are reserved for key items 35 | -------------------------------------------------------------------------------- 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/open.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_OPEN_HPP_INCLUDED 25 | #define LUABIND_OPEN_HPP_INCLUDED 26 | 27 | #include 28 | 29 | namespace luabind 30 | { 31 | namespace detail 32 | { 33 | LUABIND_API void add_operator_to_metatable(lua_State* L, int op_index); 34 | LUABIND_API int create_cpp_class_metatable(lua_State* L); 35 | LUABIND_API int create_cpp_instance_metatable(lua_State* L); 36 | LUABIND_API int create_lua_class_metatable(lua_State* L); 37 | LUABIND_API int create_lua_instance_metatable(lua_State* L); 38 | LUABIND_API int create_lua_function_metatable(lua_State* L); 39 | } 40 | 41 | LUABIND_API void open(lua_State* L); 42 | } 43 | 44 | #endif // LUABIND_OPEN_HPP_INCLUDED 45 | 46 | -------------------------------------------------------------------------------- /src/luabind/luabind/error_callback_fun.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef INCLUDED_error_callback_fun_hpp_GUID_1150976a_4348_495f_99ce_9d7edd00a0b8 24 | #define INCLUDED_error_callback_fun_hpp_GUID_1150976a_4348_495f_99ce_9d7edd00a0b8 25 | 26 | // Internal Includes 27 | #include 28 | #include 29 | 30 | // Library/third-party includes 31 | // - none 32 | 33 | // Standard includes 34 | // - none 35 | 36 | namespace luabind 37 | { 38 | class type_id; 39 | 40 | typedef void(*error_callback_fun)(lua_State*); 41 | typedef void(*cast_failed_callback_fun)(lua_State*, type_id const&); 42 | typedef int(*pcall_callback_fun)(lua_State*); 43 | } 44 | 45 | #endif // INCLUDED_error_callback_fun_hpp_GUID_1150976a_4348_495f_99ce_9d7edd00a0b8 46 | -------------------------------------------------------------------------------- /src/luabind/luabind/yield_policy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_YIELD_POLICY_HPP_INCLUDED 25 | #define LUABIND_YIELD_POLICY_HPP_INCLUDED 26 | 27 | #include 28 | #include 29 | 30 | namespace luabind { namespace detail 31 | { 32 | struct yield_policy 33 | { 34 | static void precall(lua_State*, const index_map&) {} 35 | static void postcall(lua_State*, const index_map&) {} 36 | }; 37 | }} 38 | 39 | namespace luabind 40 | { 41 | detail::policy_cons const yield = {}; 42 | 43 | namespace detail 44 | { 45 | inline void ignore_unused_yield() 46 | { 47 | (void)yield; 48 | } 49 | } 50 | } 51 | 52 | #endif // LUABIND_YIELD_POLICY_HPP_INCLUDED 53 | 54 | -------------------------------------------------------------------------------- /src/modes/shop/shop_trade.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file shop_trade.h 12 | *** \author Tyler Olsen (Roots) 13 | *** \brief Header file for trade interface of shop mode 14 | *** ***************************************************************************/ 15 | 16 | #pragma once 17 | 18 | #include "defs.h" 19 | #include "utils.h" 20 | 21 | #include "video.h" 22 | #include "global.h" 23 | 24 | #include "shop_utils.h" 25 | 26 | namespace hoa_shop { 27 | 28 | namespace private_shop { 29 | 30 | /** **************************************************************************** 31 | *** \brief Manages the shop where the player is allowed to trade current equipment on their characters 32 | *** 33 | *** \todo This interface remains incomplete and will be finished at a later time. 34 | *** ***************************************************************************/ 35 | class TradeInterface : public ShopInterface { 36 | public: 37 | TradeInterface(); 38 | 39 | ~TradeInterface(); 40 | 41 | void Initialize(); 42 | 43 | void MakeActive(); 44 | 45 | void TransactionNotification(); 46 | 47 | void Update(); 48 | 49 | void Draw(); 50 | 51 | //! \brief Temporary text image stating that this interface is unavailable 52 | hoa_video::TextImage TEMP_feature_unavailable; 53 | }; // class TradeInterface : public ShopInterface 54 | 55 | } // namespace private_shop 56 | 57 | } // namespace hoa_shop 58 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/debug.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_DEBUG_HPP_INCLUDED 24 | #define LUABIND_DEBUG_HPP_INCLUDED 25 | 26 | #ifndef NDEBUG 27 | 28 | #include 29 | #include 30 | 31 | namespace luabind { namespace detail 32 | { 33 | struct stack_checker_type 34 | { 35 | stack_checker_type(lua_State* L) 36 | : m_L(L) 37 | , m_stack(lua_gettop(m_L)) 38 | {} 39 | 40 | ~stack_checker_type() 41 | { 42 | assert(m_stack == lua_gettop(m_L)); 43 | } 44 | 45 | lua_State* m_L; 46 | int m_stack; 47 | }; 48 | 49 | }} 50 | #define LUABIND_CHECK_STACK(L) luabind::detail::stack_checker_type stack_checker_object(L) 51 | #else 52 | #define LUABIND_CHECK_STACK(L) do {} while (0) 53 | #endif 54 | 55 | #endif // LUABIND_DEBUG_HPP_INCLUDED 56 | -------------------------------------------------------------------------------- /txt/Rules-quot: -------------------------------------------------------------------------------- 1 | # Special Makefile rules for English message catalogs with quotation marks. 2 | 3 | DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 4 | 5 | .SUFFIXES: .insert-header .po-update-en 6 | 7 | en@quot.po-create: 8 | $(MAKE) en@quot.po-update 9 | en@boldquot.po-create: 10 | $(MAKE) en@boldquot.po-update 11 | 12 | en@quot.po-update: en@quot.po-update-en 13 | en@boldquot.po-update: en@boldquot.po-update-en 14 | 15 | .insert-header.po-update-en: 16 | @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 17 | if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 18 | tmpdir=`pwd`; \ 19 | echo "$$lang:"; \ 20 | ll=`echo $$lang | sed -e 's/@.*//'`; \ 21 | LC_ALL=C; export LC_ALL; \ 22 | cd $(srcdir); \ 23 | if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ 24 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 25 | rm -f $$tmpdir/$$lang.new.po; \ 26 | else \ 27 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 28 | :; \ 29 | else \ 30 | echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 31 | exit 1; \ 32 | fi; \ 33 | fi; \ 34 | else \ 35 | echo "creation of $$lang.po failed!" 1>&2; \ 36 | rm -f $$tmpdir/$$lang.new.po; \ 37 | fi 38 | 39 | en@quot.insert-header: insert-header.sin 40 | sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header 41 | 42 | en@boldquot.insert-header: insert-header.sin 43 | sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header 44 | 45 | mostlyclean: mostlyclean-quot 46 | mostlyclean-quot: 47 | rm -f *.insert-header 48 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/garbage_collector.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_GARBAGE_COLLECTOR_HPP_INCLUDED 25 | #define LUABIND_GARBAGE_COLLECTOR_HPP_INCLUDED 26 | 27 | #include 28 | 29 | namespace luabind { namespace detail 30 | { 31 | // function that is used as __gc metafunction on several objects 32 | template 33 | inline int garbage_collector(lua_State* L) 34 | { 35 | T* obj = static_cast(lua_touserdata(L, -1)); 36 | obj->~T(); 37 | return 0; 38 | } 39 | 40 | template 41 | struct garbage_collector_s 42 | { 43 | static int apply(lua_State* L) 44 | { 45 | T* obj = static_cast(lua_touserdata(L, -1)); 46 | obj->~T(); 47 | return 0; 48 | } 49 | }; 50 | 51 | }} 52 | 53 | #endif // LUABIND_GARBAGE_COLLECTOR_HPP_INCLUDED 54 | -------------------------------------------------------------------------------- /txt/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = txt 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=Translate --keyword=UTranslate --keyword=hoa_system.Translate --sort-by-file --from-code=UTF-8 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = The Allacrost Project 22 | 23 | # This is the email address or URL to which the translators shall report 24 | # bugs in the untranslated strings: 25 | # - Strings which are not entire sentences, see the maintainer guidelines 26 | # in the GNU gettext documentation, section 'Preparing Strings'. 27 | # - Strings which use unclear terms or require additional context to be 28 | # understood. 29 | # - Strings which make invalid assumptions about notation of date, time or 30 | # money. 31 | # - Pluralisation problems. 32 | # - Incorrect English spelling. 33 | # - Incorrect formatting. 34 | # It can be your email address, or a mailing list address where translators 35 | # can write to without being subscribed, or the URL of a web page through 36 | # which the translators can contact you. 37 | MSGID_BUGS_ADDRESS = http://bugs.allacrost.org/ 38 | 39 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 40 | # message catalogs shall be used. It is usually empty. 41 | EXTRA_LOCALE_CATEGORIES = 42 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/pointee_sizeof.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef POINTEE_SIZEOF_040211_HPP 24 | #define POINTEE_SIZEOF_040211_HPP 25 | 26 | #include 27 | 28 | namespace luabind { 29 | 30 | namespace detail { 31 | 32 | template T& deref_type(T(*)(), int); 33 | template T& deref_type(T*(*)(), long); 34 | 35 | } // namespace detail 36 | 37 | // returns the indirect sizeof U, as in 38 | // sizeof(T*) = sizeof(T) 39 | // sizeof(T&) = sizeof(T) 40 | // sizeof(T) = sizeof(T) 41 | template 42 | struct pointee_sizeof 43 | { 44 | BOOST_STATIC_CONSTANT(int, value = ( 45 | sizeof(detail::deref_type((T(*)())0), 0L) 46 | )); 47 | 48 | typedef boost::mpl::int_ type; 49 | }; 50 | 51 | } // namespace luabind 52 | 53 | #endif // POINTEE_SIZEOF_040211_HPP 54 | 55 | -------------------------------------------------------------------------------- /src/luabind/luabind/weak_ref.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef WEAK_REF_040402_HPP 24 | #define WEAK_REF_040402_HPP 25 | 26 | #include 27 | 28 | #include 29 | 30 | namespace luabind { 31 | 32 | class LUABIND_API weak_ref 33 | { 34 | public: 35 | weak_ref(); 36 | weak_ref(lua_State* main, lua_State* L, int index); 37 | weak_ref(weak_ref const&); 38 | ~weak_ref(); 39 | 40 | weak_ref& operator=(weak_ref const&); 41 | 42 | void swap(weak_ref&); 43 | 44 | // returns a unique id that no 45 | // other weak ref will return 46 | int id() const; 47 | 48 | lua_State* state() const; 49 | void get(lua_State* L) const; 50 | 51 | private: 52 | struct impl; 53 | impl* m_impl; 54 | }; 55 | 56 | } // namespace luabind 57 | 58 | #endif // WEAK_REF_040402_HPP 59 | 60 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/object_call.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #if !BOOST_PP_IS_ITERATING 24 | # error Do not include object_call.hpp directly! 25 | #endif 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define N BOOST_PP_ITERATION() 32 | 33 | template 34 | call_proxy< 35 | Derived 36 | , boost::tuples::tuple< 37 | BOOST_PP_ENUM_BINARY_PARAMS(N, A, const* BOOST_PP_INTERCEPT) 38 | > 39 | > operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a)) 40 | { 41 | typedef boost::tuples::tuple< 42 | BOOST_PP_ENUM_BINARY_PARAMS(N, A, const* BOOST_PP_INTERCEPT) 43 | > arguments; 44 | 45 | return call_proxy( 46 | derived() 47 | , arguments(BOOST_PP_ENUM_PARAMS(N, &a)) 48 | ); 49 | } 50 | 51 | #undef N 52 | 53 | -------------------------------------------------------------------------------- /src/luabind/luabind/set_package_preload.hpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Header 3 | 4 | @date 2012 5 | 6 | @author 7 | Ryan Pavlik 8 | and 9 | http://academic.cleardefinition.com/ 10 | Iowa State University Virtual Reality Applications Center 11 | Human-Computer Interaction Graduate Program 12 | */ 13 | 14 | // Copyright Iowa State University 2012. 15 | // Permission is hereby granted, free of charge, to any person obtaining a 16 | // copy of this software and associated documentation files (the "Software"), 17 | // to deal in the Software without restriction, including without limitation 18 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 19 | // and/or sell copies of the Software, and to permit persons to whom the 20 | // Software is furnished to do so, subject to the following conditions: 21 | 22 | // The above copyright notice and this permission notice shall be included 23 | // in all copies or substantial portions of the Software. 24 | 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 26 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 27 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 28 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 29 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 30 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 31 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 32 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 33 | // OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | #pragma once 36 | #ifndef INCLUDED_set_package_preload_hpp_GUID_563c882e_86f7_4ea7_8603_4594ea41737e 37 | #define INCLUDED_set_package_preload_hpp_GUID_563c882e_86f7_4ea7_8603_4594ea41737e 38 | 39 | // Internal Includes 40 | #include 41 | #include 42 | 43 | // Library/third-party includes 44 | // - none 45 | 46 | // Standard includes 47 | // - none 48 | 49 | 50 | namespace luabind { 51 | 52 | LUABIND_API void set_package_preload(lua_State * L, const char * modulename, int (*loader) (lua_State *)); 53 | } 54 | #endif // INCLUDED_set_package_preload_hpp_GUID_563c882e_86f7_4ea7_8603_4594ea41737e 55 | -------------------------------------------------------------------------------- /src/luabind/luabind/function_introspection.hpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Header 3 | 4 | @date 2012 5 | 6 | @author 7 | Ryan Pavlik 8 | and 9 | http://academic.cleardefinition.com/ 10 | Iowa State University Virtual Reality Applications Center 11 | Human-Computer Interaction Graduate Program 12 | */ 13 | 14 | // Copyright Iowa State University 2012. 15 | // Permission is hereby granted, free of charge, to any person obtaining a 16 | // copy of this software and associated documentation files (the "Software"), 17 | // to deal in the Software without restriction, including without limitation 18 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 19 | // and/or sell copies of the Software, and to permit persons to whom the 20 | // Software is furnished to do so, subject to the following conditions: 21 | 22 | // The above copyright notice and this permission notice shall be included 23 | // in all copies or substantial portions of the Software. 24 | 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 26 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 27 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 28 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 29 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 30 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 31 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 32 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 33 | // OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | #pragma once 36 | #ifndef INCLUDED_function_introspection_hpp_GUID_b55783e7_e6da_4816_925e_9256245c1065 37 | #define INCLUDED_function_introspection_hpp_GUID_b55783e7_e6da_4816_925e_9256245c1065 38 | 39 | // Internal Includes 40 | #include 41 | #include 42 | 43 | // Library/third-party includes 44 | // - none 45 | 46 | // Standard includes 47 | // - none 48 | 49 | 50 | namespace luabind { 51 | 52 | LUABIND_API int bind_function_introspection(lua_State * L); 53 | 54 | } // end of namespace luabind 55 | 56 | #endif // INCLUDED_function_introspection_hpp_GUID_b55783e7_e6da_4816_925e_9256245c1065 57 | -------------------------------------------------------------------------------- /src/editor/editor_main.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | //////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file editor_main.cpp 12 | *** \author Philip Vorsilak (gorzuate) 13 | *** \brief Source file for the map editor's main function 14 | *** ***************************************************************************/ 15 | 16 | #ifdef __MACH__ 17 | #include 18 | #include 19 | #endif 20 | 21 | #include "utils.h" 22 | 23 | #include "editor.h" 24 | 25 | #if defined(main) && !defined(_WIN32) 26 | #undef main 27 | #endif 28 | 29 | using namespace std; 30 | 31 | using namespace hoa_editor; 32 | 33 | int main(int argc, char** argv) { 34 | #ifndef _WIN32 35 | #ifndef __MACH__ 36 | // Look for data files in DATADIR only if they are not available in the current directory 37 | if (!ifstream("./lua/data/config/settings.lua")) { 38 | if (chdir(DATADIR) != 0) { 39 | PRINT_ERROR << "failed to change directory to data location" << endl; 40 | } 41 | } 42 | #endif 43 | #endif 44 | 45 | #ifdef __MACH__ 46 | string path; 47 | path = argv[0]; 48 | // remove the binary name 49 | path.erase(path.find_last_of('/')); 50 | // remove the MacOS directory 51 | path.erase(path.find_last_of('/')); 52 | // remove the Contents directory 53 | path.erase(path.find_last_of('/')); 54 | // remove the Editor.app directory 55 | path.erase(path.find_last_of('/')); 56 | // we are now in a common directory containing both Allacrost and the Editor 57 | path.append("/Allacrost.app/Contents/Resources/"); 58 | chdir(path.c_str()); 59 | #endif 60 | 61 | QApplication app(argc, argv); 62 | 63 | Editor* editor = new Editor(); 64 | editor->show(); 65 | 66 | return app.exec(); 67 | } 68 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/link_compatibility.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_LINK_COMPATIBILITY_HPP_INCLUDED 24 | #define LUABIND_LINK_COMPATIBILITY_HPP_INCLUDED 25 | 26 | #include 27 | 28 | namespace luabind { namespace detail 29 | { 30 | 31 | #ifdef LUABIND_NOT_THREADSAFE 32 | LUABIND_API void not_threadsafe_defined_conflict(); 33 | #else 34 | LUABIND_API void not_threadsafe_not_defined_conflict(); 35 | #endif 36 | 37 | #ifdef LUABIND_NO_ERROR_CHECKING 38 | LUABIND_API void no_error_checking_defined_conflict(); 39 | #else 40 | LUABIND_API void no_error_checking_not_defined_conflict(); 41 | #endif 42 | 43 | inline void check_link_compatibility() 44 | { 45 | #ifdef LUABIND_NOT_THREADSAFE 46 | not_threadsafe_defined_conflict(); 47 | #else 48 | not_threadsafe_not_defined_conflict(); 49 | #endif 50 | 51 | #ifdef LUABIND_NO_ERROR_CHECKING 52 | no_error_checking_defined_conflict(); 53 | #else 54 | no_error_checking_not_defined_conflict(); 55 | #endif 56 | } 57 | 58 | }} 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/luabind/src/wrapper_base.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define LUABIND_BUILDING 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace luabind { namespace detail 33 | { 34 | LUABIND_API void do_call_member_selection(lua_State* L, char const* name) 35 | { 36 | object_rep* obj = static_cast(lua_touserdata(L, -1)); 37 | assert(obj); 38 | 39 | lua_pushstring(L, name); 40 | lua_gettable(L, -2); 41 | lua_replace(L, -2); 42 | 43 | if (!is_luabind_function(L, -1)) 44 | return; 45 | 46 | // this (usually) means the function has not been 47 | // overridden by lua, call the default implementation 48 | lua_pop(L, 1); 49 | obj->crep()->get_default_table(L); // push the crep table 50 | lua_pushstring(L, name); 51 | lua_gettable(L, -2); 52 | lua_remove(L, -2); // remove the crep table 53 | } 54 | }} 55 | -------------------------------------------------------------------------------- /lua/data/tilesets/harrvah_destruction.lua: -------------------------------------------------------------------------------- 1 | local ns = {}; 2 | setmetatable(ns, {__index = _G}); 3 | harrvah_destruction = ns; 4 | setfenv(1, ns); 5 | 6 | tileset_name = "Harrvah Destruction" 7 | image = "img/tilesets/harrvah_destruction.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 3, 3, 3, 3, 1, 2, 1, 15, 1, 2, 1, 3, 0, 0, 3, 0 } 11 | collisions[1] = { 12, 12, 12, 12, 4, 8, 7, 15, 15, 11, 5, 15, 2, 1, 15, 10 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 15 | collisions[5] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 16 | collisions[6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 17 | collisions[7] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 20 | collisions[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 26 | 27 | animations = {} 28 | animations[1] = { 176, 200, 177, 200, 178, 200, 179, 200, 180, 200 } 29 | animations[2] = { 192, 200, 193, 200, 194, 200, 195, 200, 196, 200 } 30 | animations[3] = { 208, 200, 210, 200, 212, 200, 214, 200, 216, 200 } 31 | animations[4] = { 209, 200, 211, 200, 213, 200, 215, 200, 217, 200 } 32 | animations[5] = { 224, 200, 226, 200, 228, 200, 230, 200, 232, 200 } 33 | animations[6] = { 225, 200, 227, 200, 229, 200, 231, 200, 233, 200 } 34 | animations[7] = { 240, 200, 242, 200, 244, 200, 246, 200, 248, 200 } 35 | animations[8] = { 241, 200, 243, 200, 245, 200, 247, 200, 249, 200 } 36 | animations[9] = { 218, 200, 219, 200, 220, 200, 221, 200, 222, 200 } 37 | animations[10] = { 234, 200, 235, 200, 236, 200, 237, 200, 238, 200, 239, 200 } 38 | animations[11] = { 250, 200, 251, 200, 252, 200, 253, 200, 254, 200, 255, 200 } 39 | 40 | -------------------------------------------------------------------------------- /src/luabind/src/error.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define LUABIND_BUILDING 24 | 25 | #include 26 | 27 | 28 | namespace luabind 29 | { 30 | 31 | namespace 32 | { 33 | pcall_callback_fun pcall_callback = 0; 34 | #ifdef LUABIND_NO_EXCEPTIONS 35 | error_callback_fun error_callback = 0; 36 | cast_failed_callback_fun cast_failed_callback = 0; 37 | #endif 38 | } 39 | 40 | 41 | #ifdef LUABIND_NO_EXCEPTIONS 42 | 43 | void set_error_callback(error_callback_fun e) 44 | { 45 | error_callback = e; 46 | } 47 | 48 | void set_cast_failed_callback(cast_failed_callback_fun c) 49 | { 50 | cast_failed_callback = c; 51 | } 52 | 53 | error_callback_fun get_error_callback() 54 | { 55 | return error_callback; 56 | } 57 | 58 | cast_failed_callback_fun get_cast_failed_callback() 59 | { 60 | return cast_failed_callback; 61 | } 62 | 63 | #endif 64 | 65 | void set_pcall_callback(pcall_callback_fun e) 66 | { 67 | pcall_callback = e; 68 | } 69 | 70 | pcall_callback_fun get_pcall_callback() 71 | { 72 | return pcall_callback; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/luabind/src/pcall.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define LUABIND_BUILDING 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace luabind { namespace detail 30 | { 31 | int pcall(lua_State *L, int nargs, int nresults) 32 | { 33 | pcall_callback_fun e = get_pcall_callback(); 34 | int en = 0; 35 | if ( e ) 36 | { 37 | int base = lua_gettop(L) - nargs; 38 | lua_pushcfunction(L, e); 39 | lua_insert(L, base); // push pcall_callback under chunk and args 40 | en = base; 41 | } 42 | int result = lua_pcall(L, nargs, nresults, en); 43 | if ( en ) 44 | lua_remove(L, en); // remove pcall_callback 45 | return result; 46 | } 47 | 48 | int resume_impl(lua_State *L, int nargs, int) 49 | { 50 | #if LUA_VERSION_NUM >= 502 51 | int res = lua_resume(L, NULL, nargs); 52 | #else 53 | int res = lua_resume(L, nargs); 54 | #endif 55 | // Lua 5.1 added LUA_YIELD as a possible return value, 56 | // this was causing crashes, because the caller expects 0 on success. 57 | return (res == LUA_YIELD) ? 0 : res; 58 | } 59 | 60 | }} 61 | -------------------------------------------------------------------------------- /src/luabind/src/set_package_preload.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | @file 3 | @brief Implementation 4 | 5 | @date 2012 6 | 7 | @author 8 | Ryan Pavlik 9 | and 10 | http://academic.cleardefinition.com/ 11 | Iowa State University Virtual Reality Applications Center 12 | Human-Computer Interaction Graduate Program 13 | */ 14 | 15 | // Copyright Iowa State University 2012. 16 | // Permission is hereby granted, free of charge, to any person obtaining a 17 | // copy of this software and associated documentation files (the "Software"), 18 | // to deal in the Software without restriction, including without limitation 19 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 20 | // and/or sell copies of the Software, and to permit persons to whom the 21 | // Software is furnished to do so, subject to the following conditions: 22 | 23 | // The above copyright notice and this permission notice shall be included 24 | // in all copies or substantial portions of the Software. 25 | 26 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 27 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 28 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 29 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 30 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 31 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 32 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 33 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 34 | // OR OTHER DEALINGS IN THE SOFTWARE. 35 | 36 | #define LUABIND_BUILDING 37 | 38 | // Internal Includes 39 | #include 40 | #include // for LUABIND_API 41 | #include // for object, rawget, globals 42 | 43 | // Library/third-party includes 44 | #include // for lua_pushstring, lua_rawset, etc 45 | 46 | // Standard includes 47 | // - none 48 | 49 | 50 | namespace luabind { 51 | LUABIND_API void set_package_preload(lua_State * L, const char * modulename, int (*loader) (lua_State *)) { 52 | rawget(rawget(globals(L), "package"), "preload").push(L); 53 | lua_pushcclosure(L, loader, 0); 54 | lua_setfield(L, -2, modulename); 55 | lua_pop(L, 1); 56 | } 57 | 58 | } // namespace luabind 59 | -------------------------------------------------------------------------------- /lua/test/shops.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: shops.lua 3 | -- 4 | -- Description: All tests in this file create an instance of ShopMode. The character 5 | -- party and their equipment, amount of drunes, and inventory is configured along 6 | -- with the shop properties such as buy/sell prices, available wares, and stocks. 7 | -- These tests are commonly used to test specific shop configurations that will be 8 | -- seen in the game. 9 | -- 10 | -- Note: To keep the tests in this file organized, reserve the first 50 tests (3001-3050) 11 | -- for tests intended to test ShopMode itself. Tests primarily intended for shop balancing 12 | -- should follow after this set. Try to keep tests sorted in order from more basic to more 13 | -- advanced, or from early-game shops to late-game shops. 14 | ------------------------------------------------------------------------------]] 15 | 16 | local ns = {} 17 | setmetatable(ns, {__index = _G}) 18 | shops = ns; 19 | setfenv(1, ns); 20 | 21 | -- Test IDs 3,001 - 4,000 are reserved for shops 22 | tests = {} 23 | 24 | -- Begin tests intended for ShopMode interface testing 25 | 26 | tests[3001] = { 27 | name = "Basic Early Game Shop"; 28 | description = "A shop containing items found in the beginning of the game along with Claudius as the only party character. " .. 29 | "This is used primarily as a test of the basic functionalities of shop mode."; 30 | ExecuteTest = function() 31 | GlobalManager:AddCharacter(1); -- Claudius 32 | GlobalManager:AddDrunes(100); 33 | GlobalManager:AddToInventory(1, 5); 34 | GlobalManager:AddToInventory(1001, 2); 35 | GlobalManager:AddToInventory(10001, 1); 36 | 37 | local shop = hoa_shop.ShopMode(); 38 | shop:AddObject(1, 12); 39 | shop:AddObject(1001, 5); 40 | shop:AddObject(10001, 2); 41 | shop:AddObject(10002, 4); 42 | shop:AddObject(10003, 12); 43 | shop:AddObject(20002, 1); 44 | shop:AddObject(20003, 2); 45 | shop:AddObject(30001, 3); 46 | shop:AddObject(30002, 10); 47 | shop:AddObject(30003, 11); 48 | shop:AddObject(40001, 2); 49 | shop:AddObject(40002, 1); 50 | shop:AddObject(40003, 1); 51 | shop:AddObject(40004, 1); 52 | shop:AddObject(50001, 1); 53 | shop:AddObject(50002, 1); 54 | ModeManager:Push(shop); 55 | end 56 | } 57 | 58 | -- Begin tests intended for shop balancing 59 | -------------------------------------------------------------------------------- /lua/data/tilesets/desert_cave_ground.lua: -------------------------------------------------------------------------------- 1 | local ns = {} 2 | setmetatable(ns, {__index = _G}) 3 | desert_cave_ground = ns 4 | setfenv(1, ns) 5 | 6 | tileset_name = "Desert Cave - Ground" 7 | image = "img/tilesets/desert_cave_ground.png" 8 | 9 | collisions = {} 10 | collisions[0] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 11 | collisions[1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15 } 12 | collisions[2] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15 } 13 | collisions[3] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 14 | collisions[4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 0, 0, 0 } 15 | collisions[5] = { 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 0, 0, 0 } 16 | collisions[6] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15 } 17 | collisions[7] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0 } 18 | collisions[8] = { 5, 10, 14, 13, 0, 0, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0 } 19 | collisions[9] = { 5, 10, 0, 0, 0, 0, 0, 15, 15, 0, 0, 5, 10, 0, 10, 0 } 20 | collisions[10] = { 4, 8, 15, 15, 15, 0, 0, 0, 0, 0, 15, 0, 0, 15, 5, 0 } 21 | collisions[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 15, 0, 10 } 22 | collisions[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 } 23 | collisions[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 3, 3, 3, 3, 7, 11 } 24 | collisions[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15 } 25 | collisions[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15 } 26 | 27 | autotiling = {} 28 | autotiling[0] = "CaveDirt" 29 | autotiling[1] = "CaveDirt" 30 | autotiling[2] = "CaveDirt" 31 | autotiling[4] = "CaveFloor_CaveDirt_South" 32 | autotiling[7] = "CaveFloor_CaveDirt_North" 33 | autotiling[9] = "CaveFloor" 34 | autotiling[10] = "CaveFloor" 35 | autotiling[11] = "CaveFloor" 36 | autotiling[12] = "CaveFloor" 37 | autotiling[19] = "CaveFloor_CaveDirt_East" 38 | autotiling[21] = "CaveFloor_CaveDirt_West" 39 | autotiling[22] = "CaveFloor_CaveDirt_West" 40 | autotiling[24] = "CaveFloor_CaveDirt_East" 41 | autotiling[25] = "CaveFloor" 42 | autotiling[26] = "CaveFloor" 43 | autotiling[27] = "CaveFloor" 44 | autotiling[28] = "CaveFloor" 45 | autotiling[36] = "CaveFloor_CaveDirt_North" 46 | autotiling[39] = "CaveFloor_CaveDirt_South" 47 | autotiling[41] = "CaveFloor" 48 | autotiling[42] = "CaveFloor" 49 | autotiling[43] = "CaveFloor" 50 | autotiling[44] = "CaveFloor" 51 | 52 | -------------------------------------------------------------------------------- /src/luabind/src/stack_content_by_name.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define LUABIND_BUILDING 24 | 25 | #include // for lua_gettop, lua_touserdata, etc 26 | 27 | #include // for class_rep, is_class_rep 28 | #include // for get_instance, object_rep 29 | 30 | #include // for string 31 | 32 | using namespace luabind::detail; 33 | 34 | std::string luabind::detail::stack_content_by_name(lua_State* L, int start_index) 35 | { 36 | std::string ret; 37 | int top = lua_gettop(L); 38 | for (int i = start_index; i <= top; ++i) 39 | { 40 | object_rep* obj = get_instance(L, i); 41 | class_rep* crep = is_class_rep(L, i)?(class_rep*)lua_touserdata(L, i):0; 42 | if (obj == 0 && crep == 0) 43 | { 44 | int type = lua_type(L, i); 45 | ret += lua_typename(L, type); 46 | } 47 | else if (obj) 48 | { 49 | if (obj->is_const()) ret += "const "; 50 | ret += obj->crep()->name(); 51 | } 52 | else if (crep) 53 | { 54 | ret += "<"; 55 | ret += crep->name(); 56 | ret += ">"; 57 | } 58 | if (i < top) ret += ", "; 59 | } 60 | return ret; 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/signature_match.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_SIGNATURE_MATCH_HPP_INCLUDED 24 | #define LUABIND_SIGNATURE_MATCH_HPP_INCLUDED 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | namespace luabind 39 | { 40 | 41 | namespace adl 42 | { 43 | class argument; 44 | } 45 | 46 | template 47 | struct constructor 48 | { 49 | typedef BOOST_PP_CAT( 50 | boost::mpl::vector, BOOST_PP_INC(BOOST_PP_INC(LUABIND_MAX_ARITY)))< 51 | void, argument const&, BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, A) 52 | > signature0; 53 | 54 | typedef typename boost::mpl::remove< 55 | signature0, detail::null_type>::type signature; 56 | }; 57 | 58 | } 59 | 60 | #endif // LUABIND_SIGNATURE_MATCH_HPP_INCLUDED 61 | 62 | -------------------------------------------------------------------------------- /src/modes/scene.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file scene.cpp 12 | *** \author Tyler Olsen (Roots) 13 | *** \brief Source file for scene mode interface. 14 | *** ***************************************************************************/ 15 | 16 | #include 17 | 18 | #include "audio.h" 19 | #include "video.h" 20 | #include "input.h" 21 | #include "system.h" 22 | 23 | #include "scene.h" 24 | 25 | using namespace std; 26 | using namespace hoa_mode_manager; 27 | using namespace hoa_input; 28 | using namespace hoa_system; 29 | using namespace hoa_video; 30 | using namespace hoa_pause; 31 | using namespace hoa_scene::private_scene; 32 | 33 | namespace hoa_scene { 34 | 35 | bool SCENE_DEBUG = false; 36 | 37 | 38 | 39 | SceneMode::SceneMode() { 40 | if (SCENE_DEBUG) cout << "SCENE: SceneMode constructor invoked" << endl; 41 | mode_type = SCENE_MODE; 42 | 43 | // VideoManager->LoadImage(scene); 44 | } 45 | 46 | 47 | 48 | // The destructor frees up our scene image 49 | SceneMode::~SceneMode() { 50 | if (SCENE_DEBUG) cout << "SCENE: SceneMode destructor invoked" << endl; 51 | // VideoManager->FreeImage(scene); 52 | } 53 | 54 | 55 | // Resets class members appropriately 56 | void SceneMode::Reset() { 57 | _scene_timer = 0; 58 | } 59 | 60 | 61 | 62 | // Restores volume or unpauses audio, then pops itself from the game stack 63 | void SceneMode::Update() { 64 | uint32 time_elapsed = SystemManager->GetUpdateTime(); 65 | _scene_timer += time_elapsed; 66 | 67 | // User must wait 0.75 seconds before they can exit the scene 68 | if ((InputManager->ConfirmPress() || InputManager->CancelPress()) && _scene_timer < MIN_SCENE_UPDATES) { 69 | ModeManager->Pop(); 70 | } 71 | } 72 | 73 | 74 | 75 | // Draws the scene 76 | void SceneMode::Draw() { 77 | // Draw the scene, maybe with a filter that lets it fade in and out....? 78 | } 79 | 80 | } // namespace hoa_scene 81 | -------------------------------------------------------------------------------- /src/engine/video/shake.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file shake.h 12 | *** \author Raj Sharma (roos) 13 | *** \brief Header file for screen shaking code 14 | *** ***************************************************************************/ 15 | 16 | #pragma once 17 | 18 | #include "defs.h" 19 | #include "utils.h" 20 | 21 | namespace hoa_video { 22 | 23 | //! \brief Screen shake fall-off modes, which control the behavior of a screen shake. 24 | enum ShakeFalloff { 25 | VIDEO_FALLOFF_INVALID = -1, 26 | 27 | //! Shake remains at constant force 28 | VIDEO_FALLOFF_NONE = 0, 29 | 30 | //! Shake starts out small, builds up, then dies down 31 | VIDEO_FALLOFF_EASE = 1, 32 | 33 | //! Shake strength decreases linearly until the end 34 | VIDEO_FALLOFF_LINEAR = 2, 35 | 36 | //! Shake decreases slowly and drops off quickly at the end 37 | VIDEO_FALLOFF_GRADUAL = 3, 38 | 39 | //! Shake suddenly falls off, used for "impacts" 40 | VIDEO_FALLOFF_SUDDEN = 4, 41 | 42 | VIDEO_FALLOFF_TOTAL = 5 43 | }; 44 | 45 | namespace private_video { 46 | 47 | /** **************************************************************************** 48 | *** \brief Represents the force of a screen shake 49 | *** 50 | *** The ShakeForce class holds information about a screen shake, and it is used 51 | *** by the video engine to keep track of how to shake the screen. 52 | *** ***************************************************************************/ 53 | class ShakeForce { 54 | public: 55 | //! \brief The initial force of the shake 56 | float initial_force; 57 | 58 | //! \brief Used to interpolate the shaking motion 59 | Interpolator interpolator; 60 | 61 | //! milliseconds that passed since this shake started 62 | uint32 current_time; 63 | 64 | //! milliseconds that this shake was set to last for 65 | uint32 end_time; 66 | }; 67 | 68 | } // namespace private_video 69 | 70 | } // namespace hoa_video 71 | -------------------------------------------------------------------------------- /src/modes/menu/menu_character.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file menu_character.h 12 | *** \author Daniel Steuernol (Steu) 13 | *** \author Andy Gardner (ChopperDave) 14 | *** \brief Header file for character menu. 15 | *** 16 | *** This code handles the character menu. 17 | *** ***************************************************************************/ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | #include "utils.h" 25 | #include "defs.h" 26 | 27 | #include "video.h" 28 | #include "gui.h" 29 | 30 | #include "global.h" 31 | 32 | namespace hoa_menu { 33 | 34 | namespace private_menu { 35 | 36 | /** **************************************************************************** 37 | *** \brief Represents an individual character window 38 | *** 39 | *** There should be one of these windows for each character in the game. 40 | *** It will contain all the information of the character and handle its draw 41 | *** placement. 42 | *** ***************************************************************************/ 43 | class CharacterWindow : public hoa_gui::MenuWindow { 44 | private: 45 | //! The name of the character that this window corresponds) to 46 | uint32 _char_id; 47 | 48 | //! The image of the character 49 | hoa_video::StillImage _portrait; 50 | 51 | public: 52 | CharacterWindow(); 53 | 54 | ~CharacterWindow(); 55 | 56 | /** \brief Set the character for this window 57 | *** \param character the character to associate with this window 58 | **/ 59 | void SetCharacter(hoa_global::GlobalCharacter *character); 60 | 61 | /** \brief render this window to the screen 62 | *** \return success/failure 63 | **/ 64 | void Draw(); 65 | }; // class CharacterWindow : public hoa_video::MenuWindow 66 | 67 | } // private_menu 68 | 69 | } // hoa_menu 70 | -------------------------------------------------------------------------------- /src/modes/shop/shop_trade.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file shop_trade.cpp 12 | *** \author Tyler Olsen (Roots) 13 | *** \brief Source file for trade interface of shop mode 14 | *** ***************************************************************************/ 15 | 16 | #include "defs.h" 17 | #include "utils.h" 18 | 19 | #include "audio.h" 20 | #include "input.h" 21 | #include "system.h" 22 | #include "video.h" 23 | 24 | #include "global.h" 25 | 26 | #include "shop.h" 27 | #include "shop_trade.h" 28 | 29 | using namespace std; 30 | 31 | using namespace hoa_utils; 32 | using namespace hoa_audio; 33 | using namespace hoa_input; 34 | using namespace hoa_system; 35 | using namespace hoa_video; 36 | using namespace hoa_global; 37 | 38 | namespace hoa_shop { 39 | 40 | namespace private_shop { 41 | 42 | // ***************************************************************************** 43 | // ***** TradeInterface class methods 44 | // ***************************************************************************** 45 | 46 | TradeInterface::TradeInterface() { 47 | TEMP_feature_unavailable.SetStyle(TextStyle("text24")); 48 | TEMP_feature_unavailable.SetText(UTranslate("This feature is not yet available.")); 49 | } 50 | 51 | 52 | 53 | TradeInterface::~TradeInterface() { 54 | 55 | } 56 | 57 | 58 | 59 | void TradeInterface::Initialize() { 60 | 61 | } 62 | 63 | 64 | 65 | void TradeInterface::MakeActive() { 66 | 67 | } 68 | 69 | 70 | 71 | void TradeInterface::TransactionNotification() { 72 | 73 | } 74 | 75 | 76 | 77 | void TradeInterface::Update() { 78 | if (InputManager->ConfirmPress() || InputManager->CancelPress()) { 79 | ShopMode::CurrentInstance()->ChangeState(SHOP_STATE_ROOT); 80 | } 81 | } 82 | 83 | 84 | 85 | void TradeInterface::Draw() { 86 | VideoManager->Move(512.0f, 405.0f); 87 | TEMP_feature_unavailable.Draw(); 88 | } 89 | 90 | } // namespace private_shop 91 | 92 | } // namespace hoa_shop 93 | -------------------------------------------------------------------------------- /src/luabind/src/exception_handler.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2005. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #define LUABIND_BUILDING 6 | 7 | #include 8 | 9 | #include // for LUABIND_API 10 | 11 | #ifndef LUABIND_NO_EXCEPTIONS 12 | #include // for error 13 | #include // for exception_handler_base 14 | 15 | #include // for exception 16 | #include // for logic_error, runtime_error 17 | 18 | namespace luabind { namespace detail { 19 | 20 | namespace 21 | { 22 | exception_handler_base* handler_chain = 0; 23 | 24 | void push_exception_string(lua_State* L, char const* exception, char const* what) 25 | { 26 | lua_pushstring(L, exception); 27 | lua_pushstring(L, ": '"); 28 | lua_pushstring(L, what); 29 | lua_pushstring(L, "'"); 30 | lua_concat(L, 4); 31 | } 32 | } 33 | 34 | void exception_handler_base::try_next(lua_State* L) const 35 | { 36 | if (next) 37 | next->handle(L); 38 | else 39 | throw; 40 | } 41 | 42 | LUABIND_API void handle_exception_aux(lua_State* L) 43 | { 44 | try 45 | { 46 | if (handler_chain) 47 | handler_chain->handle(L); 48 | else 49 | throw; 50 | } 51 | catch (error const&) 52 | {} 53 | catch (std::logic_error const& e) 54 | { 55 | push_exception_string(L, "std::logic_error", e.what()); 56 | } 57 | catch (std::runtime_error const& e) 58 | { 59 | push_exception_string(L, "std::runtime_error", e.what()); 60 | } 61 | catch (std::exception const& e) 62 | { 63 | push_exception_string(L, "std::exception", e.what()); 64 | } 65 | catch (char const* str) 66 | { 67 | push_exception_string(L, "c-string", str); 68 | } 69 | catch (...) 70 | { 71 | lua_pushstring(L, "Unknown C++ exception"); 72 | } 73 | } 74 | 75 | LUABIND_API void register_exception_handler(exception_handler_base* handler) 76 | { 77 | if (!handler_chain) handler_chain = handler; 78 | else 79 | { 80 | exception_handler_base* p = handler_chain; 81 | 82 | for (; p->next; p = p->next); 83 | 84 | handler->next = 0; 85 | p->next = handler; 86 | } 87 | } 88 | 89 | }} // namespace luabind::detail 90 | 91 | #endif // LUABIND_NO_EXCEPTIONS 92 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/call_operator_iterate.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2004 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #define N BOOST_PP_ITERATION() 24 | 25 | #define LUABIND_UNWRAP_PARAMETER(z, n, _) \ 26 | typename detail::unwrap_parameter_type::type \ 27 | BOOST_PP_CAT(_, n) 28 | 29 | template 30 | struct BOOST_PP_CAT(call_operator, N) 31 | : detail::operator_< 32 | BOOST_PP_CAT(call_operator, N)< 33 | Self BOOST_PP_ENUM_TRAILING_PARAMS(N, A) 34 | > 35 | > 36 | { 37 | BOOST_PP_CAT(call_operator, N)(int) {} 38 | 39 | template 40 | struct apply 41 | { 42 | static void execute( 43 | lua_State* L 44 | , typename detail::unwrap_parameter_type::type self 45 | BOOST_PP_ENUM_TRAILING(N, LUABIND_UNWRAP_PARAMETER, _) 46 | ) 47 | { 48 | using namespace detail; 49 | operator_result( 50 | L 51 | #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) 52 | , self(BOOST_PP_ENUM_PARAMS(N, _)) 53 | #else 54 | , (self(BOOST_PP_ENUM_PARAMS(N, _)), detail::operator_void_return()) 55 | #endif 56 | , (Policies*)0 57 | ); 58 | } 59 | }; 60 | 61 | static char const* name() { return "__call"; } 62 | }; 63 | 64 | #undef LUABIND_UNWRAP_PARAMETER 65 | #undef N 66 | 67 | -------------------------------------------------------------------------------- /src/luabind/luabind/raw_policy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_RAW_POLICY_HPP_INCLUDED 25 | #define LUABIND_RAW_POLICY_HPP_INCLUDED 26 | 27 | #include 28 | #include 29 | 30 | namespace luabind { namespace detail { 31 | 32 | struct raw_converter 33 | { 34 | int consumed_args(...) const 35 | { 36 | return 0; 37 | } 38 | 39 | lua_State* apply(lua_State* L, by_pointer, int) 40 | { 41 | return L; 42 | } 43 | 44 | static int match(...) 45 | { 46 | return 0; 47 | } 48 | 49 | void converter_postcall(lua_State*, by_pointer, int) {} 50 | }; 51 | 52 | template 53 | struct raw_policy : conversion_policy 54 | { 55 | static void precall(lua_State*, const index_map&) {} 56 | static void postcall(lua_State*, const index_map&) {} 57 | 58 | template 59 | struct apply 60 | { 61 | typedef raw_converter type; 62 | }; 63 | }; 64 | 65 | }} // namespace luabind::detail 66 | 67 | namespace luabind { 68 | 69 | template 70 | detail::policy_cons< 71 | detail::raw_policy 72 | , detail::null_type 73 | > 74 | inline raw(LUABIND_PLACEHOLDER_ARG(N)) 75 | { 76 | return detail::policy_cons< 77 | detail::raw_policy 78 | , detail::null_type 79 | >(); 80 | } 81 | 82 | } // namespace luabind 83 | 84 | #endif // LUABIND_RAW_POLICY_HPP_INCLUDED 85 | 86 | -------------------------------------------------------------------------------- /src/modes/custom.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2016 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** *************************************************************************** 11 | *** \file custom.cpp 12 | *** \author Tyler Olsen (Roots) 13 | *** \brief Source file for custom mode code 14 | *** **************************************************************************/ 15 | 16 | #include "custom.h" 17 | 18 | #include "mode_manager.h" 19 | #include "script.h" 20 | 21 | using namespace std; 22 | using namespace hoa_utils; 23 | 24 | using namespace hoa_mode_manager; 25 | using namespace hoa_script; 26 | 27 | namespace hoa_custom { 28 | 29 | CustomMode::CustomMode(const std::string& script_filename) : 30 | GameMode(CUSTOM_MODE), 31 | _load_complete(false), 32 | _options() 33 | { 34 | if (_script_file.OpenFile(script_filename) == false) { 35 | PRINT_ERROR << "Failed to open custom mode script file: " << script_filename << endl; 36 | return; 37 | } 38 | std::string tablespace = DetermineLuaFileTablespaceName(script_filename); 39 | _script_file.OpenTable(tablespace); 40 | _reset_function = _script_file.ReadFunctionPointer("Reset"); 41 | _update_function = _script_file.ReadFunctionPointer("Update"); 42 | _draw_function = _script_file.ReadFunctionPointer("Draw"); 43 | _script_file.CloseTable(); 44 | } 45 | 46 | 47 | 48 | CustomMode::~CustomMode() { 49 | _script_file.CloseFile(); 50 | } 51 | 52 | 53 | 54 | void CustomMode::Reset() { 55 | // A pointer to the class instance is passed in to the reset function so that the Lua script can access the members and methods 56 | ScriptCallFunction(_reset_function, this); 57 | _load_complete = true; 58 | } 59 | 60 | 61 | 62 | void CustomMode::Update() { 63 | _script_file.ExecuteFunction(_update_function);} 64 | 65 | 66 | 67 | void CustomMode::Draw() { 68 | _script_file.ExecuteFunction(_draw_function); 69 | } 70 | 71 | 72 | 73 | const std::string CustomMode::GetOption(const std::string& option_key) const { 74 | std::map::const_iterator option = _options.find(option_key); 75 | if (option != _options.end()) 76 | return option->second; 77 | else 78 | return ""; 79 | } 80 | 81 | } // namespace hoa_custom 82 | -------------------------------------------------------------------------------- /src/luabind/luabind/tag_function.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2008. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #if !BOOST_PP_IS_ITERATING 6 | 7 | # ifndef LUABIND_TAG_FUNCTION_081129_HPP 8 | # define LUABIND_TAG_FUNCTION_081129_HPP 9 | 10 | # if LUABIND_MAX_ARITY <= 8 11 | # include 12 | # else 13 | # include 14 | # endif 15 | # include 16 | # include 17 | # include 18 | # include 19 | 20 | #include 21 | 22 | namespace luabind { 23 | 24 | namespace detail 25 | { 26 | 27 | struct invoke_context; 28 | struct function_object; 29 | 30 | template 31 | struct tagged_function 32 | { 33 | tagged_function(F f) 34 | : f(f) 35 | {} 36 | 37 | F f; 38 | }; 39 | 40 | template 41 | Signature deduce_signature(tagged_function const&, ...) 42 | { 43 | return Signature(); 44 | } 45 | 46 | template 47 | int invoke( 48 | lua_State* L, function_object const& self, invoke_context& ctx 49 | , tagged_function const& tagged 50 | , Signature, Policies const& policies) 51 | { 52 | return invoke(L, self, ctx, tagged.f, Signature(), policies); 53 | } 54 | 55 | template 56 | struct signature_from_function; 57 | 58 | # define BOOST_PP_ITERATION_PARAMS_1 \ 59 | (3, (0, LUABIND_MAX_ARITY, )) 60 | # include BOOST_PP_ITERATE() 61 | 62 | } // namespace detail 63 | 64 | template 65 | detail::tagged_function< 66 | typename detail::signature_from_function::type 67 | , F 68 | > 69 | tag_function(F f) 70 | { 71 | return f; 72 | } 73 | 74 | } // namespace luabind 75 | 76 | # endif // LUABIND_TAG_FUNCTION_081129_HPP 77 | 78 | #else // BOOST_PP_IS_ITERATING 79 | 80 | # define N BOOST_PP_ITERATION() 81 | # define NPLUS1 BOOST_PP_INC(N) 82 | 83 | template 84 | struct signature_from_function 85 | { 86 | typedef BOOST_PP_CAT(boost::mpl::vector, NPLUS1)< 87 | R BOOST_PP_ENUM_TRAILING_PARAMS(N, A) 88 | > type; 89 | }; 90 | 91 | #endif // BOOST_PP_IS_ITERATING 92 | 93 | 94 | -------------------------------------------------------------------------------- /lua/test/menus.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: menus.lua 3 | -- 4 | -- Description: Tests for the MenuMode interface. These tests are used to make sure 5 | -- that all menus display correctly. Tests are also used to check that any items or 6 | -- skills that are usable in the field are executed successfully from within MenuMode. 7 | -- 8 | -- Note: Please try to keep these tests organized from the most simple to the most 9 | -- complex. Generally, adding more characters, equipment, and skills contribute 10 | -- to making MenuMode more complex as it has more data it needs to organize and process. 11 | ------------------------------------------------------------------------------]] 12 | 13 | local ns = {} 14 | setmetatable(ns, {__index = _G}) 15 | menus = ns; 16 | setfenv(1, ns); 17 | 18 | -- Test IDs 2,001 - 3,000 are reserved for menus 19 | tests = {} 20 | 21 | tests[2001] = { 22 | name = "Basic Early Game Menu"; 23 | description = "Party consists of a single character with a minimal amount of equipment. This is the type of menu " .. 24 | "we would expect to see frequently in the early stages of the game."; 25 | ExecuteTest = function() 26 | GlobalManager:AddCharacter(1); -- Claudius 27 | GlobalManager:AddDrunes(100); 28 | GlobalManager:AddToInventory(1, 5); 29 | GlobalManager:AddToInventory(1001, 2); 30 | GlobalManager:AddToInventory(10001, 1); 31 | 32 | local menu = hoa_menu.MenuMode(); 33 | ModeManager:Push(menu); 34 | end 35 | } 36 | 37 | 38 | tests[2002] = { 39 | name = "New Game Party Menu"; 40 | description = "The initial character party when the user selects a new game. Includes multiple pieces of equipment in the inventory."; 41 | ExecuteTest = function() 42 | GlobalManager:AddCharacter(1); -- Claudius 43 | GlobalManager:AddCharacter(2); -- Mark 44 | GlobalManager:AddCharacter(4); -- Lukar 45 | GlobalManager:AddDrunes(12345); 46 | GlobalManager:AddToInventory(1, 12); 47 | GlobalManager:AddToInventory(1001, 3); 48 | GlobalManager:AddToInventory(10001, 2); 49 | GlobalManager:AddToInventory(10002, 1); 50 | GlobalManager:AddToInventory(10003, 1); 51 | GlobalManager:AddToInventory(20002, 1); 52 | GlobalManager:AddToInventory(20003, 1); 53 | GlobalManager:AddToInventory(30002, 1); 54 | GlobalManager:AddToInventory(30003, 1); 55 | GlobalManager:AddToInventory(40002, 1); 56 | GlobalManager:AddToInventory(40003, 1); 57 | GlobalManager:AddToInventory(40004, 3); 58 | GlobalManager:AddToInventory(50001, 1); 59 | GlobalManager:AddToInventory(50002, 2); 60 | local menu = hoa_menu.MenuMode(); 61 | ModeManager:Push(menu); 62 | end 63 | } 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/operator_id.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_OPERATOR_ID_HPP_INCLUDED 25 | #define LUABIND_OPERATOR_ID_HPP_INCLUDED 26 | 27 | #include 28 | 29 | namespace luabind { namespace detail { 30 | 31 | enum operator_id 32 | { 33 | op_add = 0, 34 | op_sub, 35 | op_mul, 36 | op_div, 37 | op_mod, 38 | op_pow, 39 | op_lt, 40 | op_le, 41 | op_eq, 42 | op_call, 43 | op_unm, 44 | op_tostring, 45 | op_concat, 46 | op_len, 47 | 48 | number_of_operators 49 | }; 50 | 51 | inline const char* get_operator_name(int i) 52 | { 53 | static const char* a[number_of_operators] = { 54 | "__add", "__sub", "__mul", "__div", "__mod", "__pow", 55 | "__lt", "__le", "__eq", "__call", "__unm", 56 | "__tostring", "__concat", "__len" }; 57 | return a[i]; 58 | } 59 | 60 | inline const char* get_operator_symbol(int i) 61 | { 62 | static const char* a[number_of_operators] = { 63 | "+", "-", "*", "/", "%", "^", "<", 64 | "<=", "==", "()", "- (unary)", 65 | "tostring", "..", "#" }; 66 | return a[i]; 67 | } 68 | 69 | inline bool is_unary(int i) 70 | { 71 | // the reason why unary minus is not considered a unary operator here is 72 | // that it always is given two parameters, where the second parameter always 73 | // is nil. 74 | return i == op_tostring; 75 | } 76 | 77 | 78 | }} 79 | 80 | #endif // LUABIND_OPERATOR_ID_HPP_INCLUDED 81 | -------------------------------------------------------------------------------- /src/luabind/luabind/shared_ptr_converter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Daniel Wallin 2009. Use, modification and distribution is 2 | // subject to the Boost Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef LUABIND_SHARED_PTR_CONVERTER_090211_HPP 6 | # define LUABIND_SHARED_PTR_CONVERTER_090211_HPP 7 | 8 | # include // for default_converter, etc 9 | # include // for get_main_thread 10 | # include // for handle 11 | # include // for LUABIND_DECORATE_TYPE 12 | 13 | # include // for bool_, false_ 14 | # include // for shared_ptr, get_deleter 15 | 16 | namespace luabind { 17 | 18 | namespace detail 19 | { 20 | 21 | struct shared_ptr_deleter 22 | { 23 | shared_ptr_deleter(lua_State* L, int index) 24 | : life_support(get_main_thread(L), L, index) 25 | {} 26 | 27 | void operator()(void const*) 28 | { 29 | handle().swap(life_support); 30 | } 31 | 32 | handle life_support; 33 | }; 34 | 35 | } // namespace detail 36 | 37 | template 38 | struct default_converter > 39 | : default_converter 40 | { 41 | typedef boost::mpl::false_ is_native; 42 | 43 | template 44 | int match(lua_State* L, U, int index) 45 | { 46 | return default_converter::match( 47 | L, LUABIND_DECORATE_TYPE(T*), index); 48 | } 49 | 50 | template 51 | boost::shared_ptr apply(lua_State* L, U, int index) 52 | { 53 | T* raw_ptr = default_converter::apply( 54 | L, LUABIND_DECORATE_TYPE(T*), index); 55 | if (!raw_ptr) 56 | return boost::shared_ptr(); 57 | return boost::shared_ptr( 58 | raw_ptr, detail::shared_ptr_deleter(L, index)); 59 | } 60 | 61 | void apply(lua_State* L, boost::shared_ptr const& p) 62 | { 63 | if (detail::shared_ptr_deleter* d = 64 | boost::get_deleter(p)) 65 | { 66 | d->life_support.push(L); 67 | } 68 | else 69 | { 70 | detail::value_converter().apply(L, p); 71 | } 72 | } 73 | 74 | template 75 | void converter_postcall(lua_State*, U const&, int) 76 | {} 77 | }; 78 | 79 | template 80 | struct default_converter const&> 81 | : default_converter > 82 | {}; 83 | 84 | } // namespace luabind 85 | 86 | #endif // LUABIND_SHARED_PTR_CONVERTER_090211_HPP 87 | -------------------------------------------------------------------------------- /modules/FindLibIconv.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Iconv on Mac OS X 2 | # Once done this will define 3 | # 4 | # ICONV_FOUND - system has Iconv 5 | # ICONV_INCLUDE_DIR - the Iconv include directory 6 | # ICONV_LIBRARIES - Link these to use Iconv 7 | # ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const 8 | # 9 | 10 | IF(APPLE) 11 | include(CheckCCompilerFlag) 12 | include(CheckCSourceCompiles) 13 | 14 | IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 15 | # Already in cache, be silent 16 | SET(ICONV_FIND_QUIETLY TRUE) 17 | ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 18 | 19 | IF(APPLE) 20 | FIND_PATH(ICONV_INCLUDE_DIR iconv.h 21 | PATHS 22 | /opt/local/include/ 23 | NO_CMAKE_SYSTEM_PATH 24 | ) 25 | 26 | FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c 27 | PATHS 28 | /opt/local/lib/ 29 | NO_CMAKE_SYSTEM_PATH 30 | ) 31 | ENDIF(APPLE) 32 | 33 | FIND_PATH(ICONV_INCLUDE_DIR iconv.h PATHS /opt/local/include /sw/include) 34 | 35 | string(REGEX REPLACE "(.*)/include/?" "\\1" ICONV_INCLUDE_BASE_DIR "${ICONV_INCLUDE_DIR}") 36 | 37 | FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib) 38 | 39 | IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 40 | SET(ICONV_FOUND TRUE) 41 | ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 42 | 43 | set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) 44 | set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) 45 | IF(ICONV_FOUND) 46 | check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR) 47 | set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}") 48 | if(ICONV_HAVE_WERROR) 49 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") 50 | endif(ICONV_HAVE_WERROR) 51 | check_c_source_compiles(" 52 | #include 53 | int main(){ 54 | iconv_t conv = 0; 55 | const char* in = 0; 56 | size_t ilen = 0; 57 | char* out = 0; 58 | size_t olen = 0; 59 | iconv(conv, &in, &ilen, &out, &olen); 60 | return 0; 61 | } 62 | " ICONV_SECOND_ARGUMENT_IS_CONST ) 63 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") 64 | ENDIF(ICONV_FOUND) 65 | set(CMAKE_REQUIRED_INCLUDES) 66 | set(CMAKE_REQUIRED_LIBRARIES) 67 | 68 | IF(ICONV_FOUND) 69 | IF(NOT ICONV_FIND_QUIETLY) 70 | MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") 71 | ENDIF(NOT ICONV_FIND_QUIETLY) 72 | ELSE(ICONV_FOUND) 73 | IF(Iconv_FIND_REQUIRED) 74 | MESSAGE(FATAL_ERROR "Could not find Iconv") 75 | ENDIF(Iconv_FIND_REQUIRED) 76 | ENDIF(ICONV_FOUND) 77 | 78 | MARK_AS_ADVANCED( 79 | ICONV_INCLUDE_DIR 80 | ICONV_LIBRARIES 81 | ICONV_SECOND_ARGUMENT_IS_CONST 82 | ) 83 | ENDIF(APPLE) -------------------------------------------------------------------------------- /src/luabind/luabind/discard_result_policy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_DISCARD_RESULT_POLICY_HPP_INCLUDED 25 | #define LUABIND_DISCARD_RESULT_POLICY_HPP_INCLUDED 26 | 27 | #include 28 | #include // for index_map, etc 29 | #include // for null_type, etc 30 | 31 | #include // for if_ 32 | #include // for is_same 33 | 34 | #include 35 | 36 | namespace luabind { namespace detail 37 | { 38 | struct discard_converter 39 | { 40 | template 41 | void apply(lua_State*, T) {} 42 | }; 43 | 44 | struct discard_result_policy : conversion_policy<0> 45 | { 46 | static void precall(lua_State*, const index_map&) {} 47 | static void postcall(lua_State*, const index_map&) {} 48 | 49 | struct can_only_convert_from_cpp_to_lua {}; 50 | 51 | template 52 | struct apply 53 | { 54 | typedef typename boost::mpl::if_ 55 | , discard_converter 56 | , can_only_convert_from_cpp_to_lua 57 | >::type type; 58 | }; 59 | }; 60 | 61 | }} 62 | 63 | namespace luabind 64 | { 65 | detail::policy_cons< 66 | detail::discard_result_policy, detail::null_type> const discard_result = {}; 67 | 68 | namespace detail 69 | { 70 | inline void ignore_unused_discard_result() 71 | { 72 | (void)discard_result; 73 | } 74 | } 75 | } 76 | 77 | #endif // LUABIND_DISCARD_RESULT_POLICY_HPP_INCLUDED 78 | 79 | -------------------------------------------------------------------------------- /lua/graphics/particles/blue_firework.lua: -------------------------------------------------------------------------------- 1 | -- Blue firework particle effect 2 | -- Last modified on November 10th, 2005 3 | -- Author: roos, modifications by Bertram 4 | 5 | systems = {} 6 | 7 | systems[0] = 8 | { 9 | emitter = 10 | { 11 | x = 0, 12 | y = 0, 13 | x2 = 0, 14 | y2 = 0, 15 | center_x = 0, 16 | center_y = 0, 17 | x_variation = 0, 18 | y_variation = 0, 19 | radius = 30, 20 | shape = 'CIRCLE', 21 | omnidirectional = true, 22 | orientation = 0, 23 | outer_cone = 0, 24 | inner_cone = 0, 25 | initial_speed = 200, 26 | initial_speed_variation = 0, 27 | emission_rate = 800, 28 | start_time = 0, 29 | emitter_mode = 'looping', 30 | spin = 'COUNTERCLOCKWISE' 31 | }, 32 | 33 | keyframes = 34 | { 35 | { -- keyframe 1 36 | size_x = 0.3, 37 | size_y = 0.3, 38 | color = {0, 1, 1, 1}, 39 | rotation_speed = 0, 40 | size_variation_x = 0, 41 | size_variation_y = 0, 42 | rotation_speed_variation = 0, 43 | color_variation = {0.7, 0.3, 0.3, 0}, 44 | time=0 45 | }, 46 | 47 | { -- keyframe 2 48 | size_x = 0.6, 49 | size_y = 0.6, 50 | color = {0 , 0, 1, 0}, 51 | rotation_speed = 0, 52 | size_variation_x = 0, 53 | size_variation_y = 0, 54 | rotation_speed_variation = 0, 55 | color_variation = {0.1, 0.3, 0.3, 0}, 56 | time = 1.0 57 | } 58 | 59 | }, 60 | 61 | animation_frames = 62 | { 63 | 'img/effects/fire.png' 64 | }, 65 | 66 | animation_frame_times = 67 | { 68 | 16 69 | }, 70 | 71 | enabled = true, 72 | blend_mode = 13, 73 | system_lifetime = 3, 74 | particle_lifetime = 0.4, 75 | particle_lifetime_variation = 0.0, 76 | max_particles = 150, 77 | damping = 1, 78 | damping_variation = 0, 79 | acceleration_x = 0, 80 | acceleration_y = 2530, 81 | acceleration_variation_x = 0, 82 | acceleration_variation_y = 0, 83 | wind_velocity_x = 0, 84 | wind_velocity_y = 0, 85 | wind_velocity_variation_x = 0, 86 | wind_velocity_variation_y = 0, 87 | wave_motion_used = true, 88 | wave_length = 0.5, 89 | wave_length_variation = 0, 90 | wave_amplitude = 0, 91 | wave_amplitude_variation = 0, 92 | tangential_acceleration = 7880, 93 | tangential_acceleration_variation = 0, 94 | radial_acceleration = 0, 95 | radial_acceleration_variation = 0, 96 | user_defined_attractor = false, 97 | attractor_falloff = 0, 98 | rotation_used = true, 99 | rotate_to_velocity = true, 100 | speed_scale_used = true, 101 | speed_scale = 0.005, 102 | min_speed_scale = 1.0, 103 | max_speed_scale = 20.0, 104 | smooth_animation = false, 105 | modify_stencil = false, 106 | stencil_op = 'INCR', 107 | use_stencil = false, 108 | scene_lighting = 0.0, 109 | random_initial_angle = false 110 | } 111 | -------------------------------------------------------------------------------- /src/modes/menu/menu_formation.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file menu_formation.h 12 | *** \author Daniel Steuernol (Steu) 13 | *** \author Andy Gardner (ChopperDave) 14 | *** \brief Header file for formation menu. 15 | *** 16 | *** This code handles the formations menu. 17 | *** ***************************************************************************/ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | #include "utils.h" 25 | #include "defs.h" 26 | 27 | #include "video.h" 28 | #include "gui.h" 29 | 30 | #include "global.h" 31 | 32 | namespace hoa_menu { 33 | 34 | namespace private_menu { 35 | 36 | /** **************************************************************************** 37 | *** \brief Represents the Formation window, allowing the party to change order. 38 | *** 39 | *** This window changes party order. 40 | *** ***************************************************************************/ 41 | class FormationWindow : public hoa_gui::MenuWindow { 42 | friend class hoa_menu::MenuMode; 43 | 44 | public: 45 | FormationWindow(); 46 | ~FormationWindow(); 47 | void Update(); 48 | void Draw(); 49 | 50 | /*! 51 | * \brief Activates the window 52 | * \param new_value true to activate window, false to deactivate window 53 | */ 54 | void Activate(bool new_status); 55 | 56 | /*! 57 | * \brief Checks to see if the skills window is active 58 | * \return true if the window is active, false if it's not 59 | */ 60 | bool IsActive() 61 | { 62 | return _active_box; 63 | } 64 | 65 | private: 66 | //! Flag to specify the active option box 67 | uint32 _active_box; 68 | 69 | //! The character select option box 70 | hoa_gui::OptionBox _char_select; 71 | 72 | //! The character select option box once first character has been selected 73 | hoa_gui::OptionBox _second_char_select; 74 | 75 | /*! 76 | * \brief initialize character selection option box 77 | */ 78 | void _InitCharSelect(); 79 | 80 | }; // class FormationWindow : public hoa_video::MenuWindow 81 | 82 | } // private_menu 83 | 84 | } // hoa_menu 85 | -------------------------------------------------------------------------------- /lua/graphics/particles/rain.lua: -------------------------------------------------------------------------------- 1 | -- Rain particle effect 2 | -- Last modified on November 10th, 2005 3 | -- Author: roos, modifications by Bertram 4 | 5 | -- Example of use: 6 | -- :GetParticleManager():AddParticleEffect("lua/graphics/particles/rain.lua", 512.0, 384.0, false); 7 | 8 | systems = {} 9 | 10 | systems[0] = 11 | { 12 | emitter = 13 | { 14 | x=-612, 15 | y=-384, 16 | x2=512, 17 | y2=-384, 18 | center_x=0, 19 | center_y=0, 20 | x_variation=0, 21 | y_variation=0, 22 | radius=500, 23 | shape='line', 24 | omnidirectional=false, 25 | orientation=1.57, 26 | outer_cone=0, 27 | inner_cone=0, 28 | initial_speed=800, 29 | initial_speed_variation=230, 30 | emission_rate=656, 31 | start_time=0, 32 | emitter_mode='LOOPING', 33 | spin='RANDOM' 34 | }, 35 | 36 | keyframes = 37 | { 38 | { -- keyframe 1 39 | size_x=0.1, 40 | size_y=0.3, 41 | color={1,1,1,.15}, 42 | rotation_speed=0, 43 | size_variation_x=.2, 44 | size_variation_y=.2, 45 | rotation_speed_variation=0, 46 | color_variation={.3,.3,0,0}, 47 | time=0 48 | }, 49 | 50 | { -- keyframe 2 51 | size_x=0.1, 52 | size_y=0.3, 53 | color={1,1,1,.17}, 54 | rotation_speed=0, 55 | size_variation_x=.2, 56 | size_variation_y=.2, 57 | rotation_speed_variation=0, 58 | color_variation={0,0,0,0}, 59 | time=1.0 60 | } 61 | 62 | }, 63 | 64 | animation_frames = 65 | { 66 | 'img/effects/outlined_circle_small.png' 67 | }, 68 | animation_frame_times = 69 | { 70 | 16 71 | }, 72 | enabled = true, 73 | blend_mode = 13, 74 | system_lifetime = .3, 75 | particle_lifetime = 3.8, 76 | particle_lifetime_variation = 0.00, 77 | max_particles = 100000, 78 | damping = 1, 79 | damping_variation = 0, 80 | acceleration_x = 0, 81 | acceleration_y = 0, 82 | acceleration_variation_x = 0, 83 | acceleration_variation_y = 0, 84 | wind_velocity_x = 100, 85 | wind_velocity_y = 0, 86 | wind_velocity_variation_x = 0, 87 | wind_velocity_variation_y = 0, 88 | wave_motion_used = false, 89 | wave_length = .5, 90 | wave_length_variation = 0, 91 | wave_amplitude = 0, 92 | wave_amplitude_variation = 0, 93 | tangential_acceleration = 0, 94 | tangential_acceleration_variation = 0, 95 | radial_acceleration = 0, 96 | radial_acceleration_variation = 0, 97 | user_defined_attractor = false, 98 | attractor_falloff = 0, 99 | rotation_used = true, 100 | rotate_to_velocity = true, 101 | speed_scale_used = true, 102 | speed_scale = 0.005, 103 | min_speed_scale = 1.0, 104 | max_speed_scale = 20.0, 105 | smooth_animation = true, 106 | modify_stencil = false, 107 | stencil_op = 'INCR', 108 | use_stencil = false, 109 | scene_lighting = 0.0, 110 | random_initial_angle = false 111 | } 112 | -------------------------------------------------------------------------------- /lua/graphics/particles/snow.lua: -------------------------------------------------------------------------------- 1 | -- Snow particle effect 2 | -- Last modified on November 10th, 2005 3 | -- Author: roos, modifications by Bertram 4 | 5 | -- Example of use: 6 | -- :GetParticleManager():AddParticleEffect("lua/graphics/particles/snow.lua", 512.0, 384.0, false); 7 | 8 | systems = {} 9 | 10 | systems[0] = 11 | { 12 | emitter = 13 | { 14 | x=-612, 15 | y=-384, 16 | x2=512, 17 | y2=-384, 18 | center_x=0, 19 | center_y=0, 20 | x_variation=0, 21 | y_variation=0, 22 | radius=500, 23 | shape='line', 24 | omnidirectional=false, 25 | orientation=1.57, 26 | outer_cone=0, 27 | inner_cone=0, 28 | initial_speed=200, 29 | initial_speed_variation=50, 30 | emission_rate=156, 31 | start_time=0, 32 | emitter_mode='LOOPING', 33 | spin='RANDOM' 34 | }, 35 | 36 | keyframes = 37 | { 38 | { -- keyframe 1 39 | size_x=0.3, 40 | size_y=0.3, 41 | color={1,1,1,.6}, 42 | rotation_speed=1, 43 | size_variation_x=.2, 44 | size_variation_y=.2, 45 | rotation_speed_variation=.5, 46 | color_variation={.3,.3,0,0}, 47 | time=0 48 | }, 49 | 50 | { -- keyframe 2 51 | size_x=0.3, 52 | size_y=0.3, 53 | color={1,1,1,.4}, 54 | rotation_speed=1, 55 | size_variation_x=.2, 56 | size_variation_y=.2, 57 | rotation_speed_variation=.5, 58 | color_variation={0,0,0,0}, 59 | time=1.0 60 | } 61 | 62 | }, 63 | 64 | animation_frames = 65 | { 66 | 'img/effects/outlined_circle_small.png' 67 | }, 68 | animation_frame_times = 69 | { 70 | 16 71 | }, 72 | enabled = true, 73 | blend_mode = 13, 74 | system_lifetime = .3, 75 | particle_lifetime = 3.8, 76 | particle_lifetime_variation = 0.00, 77 | max_particles = 1000, 78 | damping = 1, 79 | damping_variation = 0, 80 | acceleration_x = 0, 81 | acceleration_y = 0, 82 | acceleration_variation_x = 0, 83 | acceleration_variation_y = 0, 84 | wind_velocity_x = 70, 85 | wind_velocity_y = 0, 86 | wind_velocity_variation_x = 60, 87 | wind_velocity_variation_y = 0, 88 | wave_motion_used = false, 89 | wave_length = .5, 90 | wave_length_variation = 0, 91 | wave_amplitude = 0, 92 | wave_amplitude_variation = 0, 93 | tangential_acceleration = 0, 94 | tangential_acceleration_variation = 0, 95 | radial_acceleration = 0, 96 | radial_acceleration_variation = 0, 97 | user_defined_attractor = false, 98 | attractor_falloff = 0, 99 | rotation_used = true, 100 | rotate_to_velocity = false, 101 | speed_scale_used = false, 102 | speed_scale = 0.005, 103 | min_speed_scale = 1.0, 104 | max_speed_scale = 20.0, 105 | smooth_animation = true, 106 | modify_stencil = false, 107 | stencil_op = 'INCR', 108 | use_stencil = false, 109 | scene_lighting = 0.0, 110 | random_initial_angle = true 111 | } 112 | 113 | -------------------------------------------------------------------------------- /src/luabind/luabind/detail/primitives.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | 24 | #ifndef LUABIND_PRIMITIVES_HPP_INCLUDED 25 | #define LUABIND_PRIMITIVES_HPP_INCLUDED 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | namespace luabind { namespace detail 34 | { 35 | template 36 | struct identity 37 | { 38 | typedef T type; 39 | }; 40 | 41 | template 42 | struct type_ {}; 43 | 44 | struct null_type {}; 45 | 46 | /* typedef char yes_t; 47 | typedef double no_t;*/ 48 | 49 | struct lua_to_cpp {}; 50 | struct cpp_to_lua {}; 51 | 52 | template struct by_value {}; 53 | template struct by_reference {}; 54 | template struct by_const_reference {}; 55 | template struct by_pointer {}; 56 | template struct by_const_pointer {}; 57 | 58 | struct converter_policy_tag {}; 59 | 60 | struct ltstr 61 | { 62 | bool operator()(const char* s1, const char* s2) const { return std::strcmp(s1, s2) < 0; } 63 | }; 64 | 65 | template 66 | struct aligned 67 | { 68 | char storage[N]; 69 | }; 70 | 71 | // returns the offset added to a Derived* when cast to a Base* 72 | // TODO: return ptrdiff 73 | template 74 | int ptr_offset(type_, type_) 75 | { 76 | aligned obj; 77 | Derived* ptr = reinterpret_cast(&obj); 78 | 79 | return int(static_cast(static_cast(static_cast(ptr))) 80 | - static_cast(static_cast(ptr))); 81 | } 82 | 83 | }} 84 | 85 | #endif // LUABIND_PRIMITIVES_HPP_INCLUDED 86 | -------------------------------------------------------------------------------- /src/luabind/luabind/return_reference_to_policy.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2003 Daniel Wallin and Arvid Norberg 2 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the "Software"), 5 | // to deal in the Software without restriction, including without limitation 6 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | // and/or sell copies of the Software, and to permit persons to whom the 8 | // Software is furnished to do so, subject to the following conditions: 9 | 10 | // The above copyright notice and this permission notice shall be included 11 | // in all copies or substantial portions of the Software. 12 | 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 14 | // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 | // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 17 | // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 18 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | // OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | #ifndef LUABIND_RETURN_REFERENCE_TO_POLICY_HPP_INCLUDED 24 | #define LUABIND_RETURN_REFERENCE_TO_POLICY_HPP_INCLUDED 25 | 26 | #include // for index_map, policy_cons, etc 27 | 28 | #include // for lua_State, lua_pushnil, etc 29 | 30 | namespace luabind { namespace detail 31 | { 32 | struct cpp_to_lua; 33 | struct null_type; 34 | 35 | template 36 | struct return_reference_to_converter; 37 | 38 | template<> 39 | struct return_reference_to_converter 40 | { 41 | template 42 | void apply(lua_State* L, const T&) 43 | { 44 | lua_pushnil(L); 45 | } 46 | }; 47 | 48 | template 49 | struct return_reference_to_policy : conversion_policy<0> 50 | { 51 | static void precall(lua_State*, const index_map&) {} 52 | static void postcall(lua_State* L, const index_map& indices) 53 | { 54 | int result_index = indices[0]; 55 | int ref_to_index = indices[N]; 56 | 57 | lua_pushvalue(L, ref_to_index); 58 | lua_replace(L, result_index); 59 | } 60 | 61 | template 62 | struct apply 63 | { 64 | typedef return_reference_to_converter type; 65 | }; 66 | }; 67 | }} 68 | 69 | namespace luabind 70 | { 71 | template 72 | detail::policy_cons, detail::null_type> 73 | return_reference_to(LUABIND_PLACEHOLDER_ARG(N)) 74 | { 75 | return detail::policy_cons, detail::null_type>(); 76 | } 77 | } 78 | 79 | #endif // LUABIND_RETURN_REFERENCE_TO_POLICY_HPP_INCLUDED 80 | 81 | -------------------------------------------------------------------------------- /lua/data/config/settings.lua: -------------------------------------------------------------------------------- 1 | settings = {} 2 | settings.key_defaults = {} 3 | settings.key_defaults.up = "Up" 4 | settings.key_defaults.down = "Down" 5 | settings.key_defaults.left = "Left" 6 | settings.key_defaults.right = "Right" 7 | settings.key_defaults.confirm = "F" 8 | settings.key_defaults.cancel = "D" 9 | settings.key_defaults.menu = "S" 10 | settings.key_defaults.swap = "A" 11 | settings.key_defaults.left_select = "W" 12 | settings.key_defaults.right_select = "E" 13 | settings.key_defaults.pause = "Space" 14 | settings.welcome = 0 15 | settings.joystick_settings = {} 16 | settings.joystick_settings.cancel = 1 17 | settings.joystick_settings.index = 0 18 | settings.joystick_settings.y_axis = 1 19 | settings.joystick_settings.left_select = 4 20 | settings.joystick_settings.x_axis = 0 21 | settings.joystick_settings.quit = 7 22 | settings.joystick_settings.pause = 6 23 | settings.joystick_settings.menu = 2 24 | settings.joystick_settings.right_select = 5 25 | settings.joystick_settings.confirm = 0 26 | settings.joystick_settings.threshold = 8192 27 | settings.joystick_settings.input_disabled = false 28 | settings.joystick_settings.swap = 3 29 | settings.language_defaults = 0 30 | settings.key_settings = {} 31 | settings.key_settings.up = "Up" 32 | settings.key_settings.down = "Down" 33 | settings.key_settings.left = "Left" 34 | settings.key_settings.right = "Right" 35 | settings.key_settings.confirm = "F" 36 | settings.key_settings.cancel = "D" 37 | settings.key_settings.menu = "S" 38 | settings.key_settings.swap = "A" 39 | settings.key_settings.left_select = "W" 40 | settings.key_settings.right_select = "E" 41 | settings.key_settings.pause = "Space" 42 | settings.joystick_defaults = {} 43 | settings.joystick_defaults.cancel = 1 44 | settings.joystick_defaults.index = 0 45 | settings.joystick_defaults.y_axis = 1 46 | settings.joystick_defaults.left_select = 4 47 | settings.joystick_defaults.x_axis = 0 48 | settings.joystick_defaults.quit = 7 49 | settings.joystick_defaults.pause = 6 50 | settings.joystick_defaults.menu = 2 51 | settings.joystick_defaults.right_select = 5 52 | settings.joystick_defaults.confirm = 0 53 | settings.joystick_defaults.threshold = 8192 54 | settings.joystick_defaults.input_disabled = false 55 | settings.joystick_defaults.swap = 3 56 | settings.language = "en@quot" 57 | settings.video_defaults = {} 58 | settings.video_defaults.full_screen = true 59 | settings.video_defaults.screen_resx = 1280 60 | settings.video_defaults.screen_resy = 1024 61 | settings.audio_settings = {} 62 | settings.audio_settings.sound_vol = 1 63 | settings.audio_settings.music_vol = 1 64 | settings.video_settings = {} 65 | settings.video_settings.full_screen = false 66 | settings.video_settings.screen_resx = 1024 67 | settings.video_settings.screen_resy = 768 68 | settings.language_settings = 0 69 | settings.audio_defaults = {} 70 | settings.audio_defaults.sound_vol = 1 71 | settings.audio_defaults.music_vol = 1 72 | -------------------------------------------------------------------------------- /src/engine/video/context.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // Copyright (C) 2004-2018 by The Allacrost Project 3 | // All Rights Reserved 4 | // 5 | // This code is licensed under the GNU GPL version 2. It is free software 6 | // and you may modify it and/or redistribute it under the terms of this license. 7 | // See http://www.gnu.org/copyleft/gpl.html for details. 8 | //////////////////////////////////////////////////////////////////////////////// 9 | 10 | /** **************************************************************************** 11 | *** \file context.h 12 | *** \author Raj Sharma (roos) 13 | *** \brief Header file for the Context class. 14 | *** ***************************************************************************/ 15 | 16 | #pragma once 17 | 18 | #include 19 | 20 | #include "defs.h" 21 | #include "utils.h" 22 | 23 | #include "color.h" 24 | #include "coord_sys.h" 25 | #include "screen_rect.h" 26 | 27 | namespace hoa_video { 28 | 29 | namespace private_video { 30 | 31 | /** **************************************************************************** 32 | *** \brief Retains the current graphics context. 33 | *** 34 | *** The Context class holds the current state of the video engine. This is 35 | *** used so that the context can be pushed and popped, so that a function which 36 | *** changes a lot of internal settings can easily leave the video engine in the 37 | *** same state that it was when it entered in. The graphics context includes 38 | *** properties such as draw flags, axis transformations, and the current coordinate 39 | *** system. The context must be pushed and then popped by any method of the VideoEngine 40 | *** class which modifies this context. 41 | *** 42 | *** \note Transformations are actually handled separately by the OpenGL 43 | *** transformation stack 44 | *** ***************************************************************************/ 45 | class Context { 46 | public: 47 | //! \brief Flag to indicate whether normal alpha blending is to take place. 48 | int8 blend; 49 | 50 | //! \brief Draw alignment flags to determine where an element is drawn relative to the cursor. 51 | int8 x_align, y_align; 52 | 53 | //! \brief Draw flip flags to determine if an element should be drawn flipped across an axis. 54 | int8 x_flip, y_flip; 55 | 56 | //! \brief The coordinate system being used by this context. 57 | CoordSys coordinate_system; 58 | 59 | //! \brief Defines the screen subset to draw the graphics into. 60 | ScreenRect viewport; 61 | 62 | //! \brief A rectangle to define which portions of the viewport should be cut away when drawing. 63 | ScreenRect scissor_rectangle; 64 | 65 | //! \brief Used to enable or disable the scissoring rectangle. 66 | bool scissoring_enabled; 67 | }; // class Context 68 | 69 | } // namespace private_video 70 | 71 | } // namespace hoa_video 72 | -------------------------------------------------------------------------------- /lua/data/inventory/leg_armor.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: leg_armor.lua 3 | -- 4 | -- Description: This file contains the definitions of all leg armor that exist in 5 | -- Hero of Allacrost. Each armor has a unique integer identifier that is used 6 | -- as its key in the armor table below. Armor IDs are unique not only among 7 | -- each other, but among other inventory game objects as well (items, weapons, 8 | -- other classes of armor, etc). 9 | -- 10 | -- Object IDs 50,001 through 60,000 are reserved for leg armor. Do not break this 11 | -- limit, because other value ranges correspond to other types of inventory objects. 12 | -- 13 | -- Armor IDs do -not- need to be sequential. When you make a new armor, keep it 14 | -- grouped with similar armor types (greaves with greaves, etc.) and keep a buffer of 15 | -- space between group types. This way we won't get a mess of random leg armor all over 16 | -- this file. 17 | -- 18 | -- All armor entries need the following data to be defined: 19 | -- {name}: Text that defines the name of the armor. 20 | -- {description}: A brief description about the armor. 21 | -- {icon}: The filepath to the image icon representing this armor. 22 | -- {physical_defense}: The amount of physical defense that the armor provides. 23 | -- {ethereal_defense}: The amount of ethereal defense that the armor casues. 24 | -- {standard_price}: The standard asking price of this armor from merchants. 25 | -- {usable_by}: A list of characters which may equip this armor, 26 | -- {slots}: The number of slots available to equip shards on the armor. 27 | ------------------------------------------------------------------------------]] 28 | 29 | -- All armor definitions are stored in this table 30 | if (armor == nil) then 31 | armor = {} 32 | end 33 | 34 | 35 | -- ----------------------------------------------------------------------------- 36 | -- IDs 50,001 - 50,500 are reserved for greaves 37 | -- ----------------------------------------------------------------------------- 38 | 39 | armor[50001] = { 40 | name = hoa_system.Translate("Standard Greaves"), 41 | description = hoa_system.Translate("Standard equipment. Light metal alloy protects the legs while minimizing the negative impact on movement."), 42 | icon = "img/icons/armor/standard_greaves.png", 43 | physical_defense = 10, 44 | ethereal_defense = 10, 45 | standard_price = 120, 46 | usable_by = CLAUDIUS + MARK + LUKAR, 47 | slots = 0 48 | } 49 | 50 | armor[50002] = { 51 | name = hoa_system.Translate("Tempered Greaves"), 52 | description = hoa_system.Translate("Standard greaves that have undergone an additional tempering process, increasing their durability and strength."), 53 | icon = "img/icons/armor/tempered_greaves.png", 54 | physical_defense = 10, 55 | ethereal_defense = 10, 56 | standard_price = 195, 57 | usable_by = CLAUDIUS + MARK + LUKAR, 58 | slots = 0 59 | } 60 | 61 | -------------------------------------------------------------------------------- /lua/graphics/particles/fire_spell.lua: -------------------------------------------------------------------------------- 1 | -- Fire spell particle effect 2 | -- Last modified on November 10th, 2005 3 | -- Author: roos, modifications by Bertram 4 | -- Modified from fire.lua to pop the fire only once 5 | 6 | systems = {} 7 | 8 | systems[0] = 9 | { 10 | emitter = 11 | { 12 | x=0, 13 | y=-20, 14 | x2=0, 15 | y2=0, 16 | center_x=0, 17 | center_y=0, 18 | x_variation=0, 19 | y_variation=0, 20 | radius=30, 21 | shape='CIRCLE', 22 | omnidirectional=true, 23 | orientation=0, 24 | outer_cone=0, 25 | inner_cone=0, 26 | initial_speed=200, 27 | initial_speed_variation=0, 28 | emission_rate=100, 29 | start_time=0, 30 | emitter_mode='burst', 31 | spin='RANDOM' 32 | }, 33 | 34 | keyframes = 35 | { 36 | { -- keyframe 1 37 | size_x=0.9, 38 | size_y=0.9, 39 | color={1,1,1,.8}, 40 | rotation_speed=1, 41 | size_variation_x=0, 42 | size_variation_y=0, 43 | rotation_speed_variation=.5, 44 | color_variation={0,0,0,0}, 45 | time=0 46 | }, 47 | 48 | { -- keyframe 2 49 | size_x=0.8, 50 | size_y=0.8, 51 | color={1,1,1,0}, 52 | rotation_speed=1, 53 | size_variation_x=0, 54 | size_variation_y=0, 55 | rotation_speed_variation=.5, 56 | color_variation={0,0,0,0}, 57 | time=1.0 58 | } 59 | 60 | }, 61 | 62 | animation_frames = 63 | { 64 | 'img/effects/flame1.png', 65 | 'img/effects/flame2.png', 66 | 'img/effects/flame3.png', 67 | 'img/effects/flame4.png', 68 | 'img/effects/flame5.png', 69 | 'img/effects/flame6.png', 70 | 'img/effects/flame7.png', 71 | 'img/effects/flame8.png' 72 | }, 73 | animation_frame_times = 74 | { 75 | 16, 16, 16, 16, 16, 16, 16, 16 76 | }, 77 | enabled = true, 78 | blend_mode = 13, 79 | system_lifetime = 3, 80 | particle_lifetime = 0.4, 81 | particle_lifetime_variation = 0.00, 82 | max_particles = 50, 83 | damping = 0.01, 84 | damping_variation = 0, 85 | acceleration_x = 0, 86 | acceleration_y = 0, 87 | acceleration_variation_x = 0, 88 | acceleration_variation_y = 0, 89 | wind_velocity_x = 0, 90 | wind_velocity_y = -155, 91 | wind_velocity_variation_x = 0, 92 | wind_velocity_variation_y = 0, 93 | wave_motion_used = false, 94 | wave_length = .5, 95 | wave_length_variation = 0, 96 | wave_amplitude = 0, 97 | wave_amplitude_variation = 0, 98 | tangential_acceleration = 0, 99 | tangential_acceleration_variation = 0, 100 | radial_acceleration = 0, 101 | radial_acceleration_variation = 0, 102 | user_defined_attractor = false, 103 | attractor_falloff = 0, 104 | rotation_used = true, 105 | rotate_to_velocity = false, 106 | speed_scale_used = false, 107 | speed_scale = 0.005, 108 | min_speed_scale = 1.0, 109 | max_speed_scale = 20.0, 110 | smooth_animation = true, 111 | modify_stencil = false, 112 | stencil_op = 'INCR', 113 | use_stencil = false, 114 | scene_lighting = 0.0, 115 | random_initial_angle = true 116 | } 117 | -------------------------------------------------------------------------------- /lua/data/skills/defense.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------[[ 2 | -- Filename: defense.lua 3 | -- 4 | -- Description: This file contains the definitions of all defense skills that 5 | -- exist in Hero of Allacrost. Each defense skill has a unique integer identifier 6 | -- that is used as its key in the skills table below. Some skills are primarily 7 | -- intended for characters to use while others are intended for enemies to use. 8 | -- Normally, we do not want to share skills between characters and enemies as 9 | -- character skills animate the sprites while enemy skills do not. 10 | -- 11 | -- Skill IDs 10,001 through 20,000 are reserved for defense skills. 12 | -- 13 | -- Each skill entry requires the following data to be defined: 14 | -- {name}: Text that defines the name of the skill 15 | -- {description}: A brief (one sentence) description of the skill 16 | -- (This field is required only for character skills and is optional for enemy skills) 17 | -- {sp_required}: The number of skill points (SP) that are required to use the skill 18 | -- (Zero is a valid value for this field, but a negative number is not) 19 | -- {warmup_time}: The number of milliseconds that the actor using the skill must wait between 20 | -- selecting the skill and executing it (a value of zero is valid). 21 | -- {target_type}: The type of target the skill affects, which may be an actor or party. 22 | -- 23 | -- Each skill entry requires a function called {BattleExecute} to be defined. This function implements the 24 | -- execution of the skill in battle, buffing defense, causing status changes, playing sounds, and animating 25 | -- sprites. 26 | ------------------------------------------------------------------------------]] 27 | 28 | -- All defense skills definitions are stored in this table 29 | if (skills == nil) then 30 | skills = {} 31 | end 32 | 33 | -------------------------------------------------------------------------------- 34 | -- IDs 10,001 - 11,000 are reserved for character defense skills 35 | -------------------------------------------------------------------------------- 36 | 37 | skills[10001] = { 38 | name = hoa_system.Translate("Defensive Stance"), 39 | description = hoa_system.Translate("Take a stance to briefly increase defense and recover SP"), 40 | sp_required = 0, 41 | warmup_time = 2000, 42 | target_type = hoa_global.GameGlobal.GLOBAL_TARGET_SELF, 43 | 44 | BattleExecute = function(user, target) 45 | target_actor = target:GetActor(); 46 | target_actor:RegisterStatusChange(hoa_global.GameGlobal.GLOBAL_STATUS_FORTITUDE_RAISE, hoa_global.GameGlobal.GLOBAL_INTENSITY_POS_LESSER); 47 | target_actor:AddSkillPoints(1); 48 | end 49 | } 50 | 51 | -------------------------------------------------------------------------------- 52 | -- IDs 11,001 - 20,000 are reserved for enemy defense skills 53 | -------------------------------------------------------------------------------- 54 | 55 | 56 | --------------------------------------------------------------------------------